Skip to content

Commit

Permalink
MFx
Browse files Browse the repository at this point in the history
  • Loading branch information
PigeonVerde322 committed Dec 24, 2024
2 parents f8b0f30 + 21b3faf commit 8096db4
Show file tree
Hide file tree
Showing 189 changed files with 2,330 additions and 1,093 deletions.
3 changes: 3 additions & 0 deletions beestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1904,6 +1904,7 @@
#include "code\modules\admin\view_variables\topic_basic.dm"
#include "code\modules\admin\view_variables\topic_list.dm"
#include "code\modules\admin\view_variables\view_variables.dm"
#include "code\modules\admin\view_variables\vv_ghost.dm"
#include "code\modules\antagonists\eldritch.dm"
#include "code\modules\antagonists\toddsie.dm"
#include "code\modules\antagonists\_common\antag_datum.dm"
Expand Down Expand Up @@ -2440,6 +2441,7 @@
#include "code\modules\client\verbs\ooc.dm"
#include "code\modules\client\verbs\ping.dm"
#include "code\modules\client\verbs\suicide.dm"
#include "code\modules\client\verbs\typing.dm"
#include "code\modules\client\verbs\who.dm"
#include "code\modules\clothing\chameleon.dm"
#include "code\modules\clothing\clothing.dm"
Expand Down Expand Up @@ -2477,6 +2479,7 @@
#include "code\modules\clothing\head\tinfoilhat.dm"
#include "code\modules\clothing\head\tophat.dm"
#include "code\modules\clothing\masks\_masks.dm"
#include "code\modules\clothing\masks\bandana.dm"
#include "code\modules\clothing\masks\boxing.dm"
#include "code\modules\clothing\masks\breath.dm"
#include "code\modules\clothing\masks\cluwne.dm"
Expand Down
7 changes: 4 additions & 3 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,10 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(
#define BLOCKING_HUNTER (1<<3) //is the item more suited to fighting fauna?

// Object/Item sharpness
#define IS_BLUNT 0
#define IS_SHARP 1
#define IS_SHARP_ACCURATE 2
#define BLUNT 0 //Can only remove limbs if they're easy to remove
#define SHARP 1 //Can only remove limbs if target is dead
#define SHARP_DISMEMBER 2 //Can only remove limbs if the limb is already disabled
#define SHARP_DISMEMBER_EASY 3 //Has a chance equal to weapon force to remove limb on every attack, in some cases taking them off in one swing

//! ### His Grace.
#define HIS_GRACE_SATIATED 0 //! He hungers not. If bloodthirst is set to this, His Grace is asleep.
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/dye_keys.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define DYE_REGISTRY_JUMPSKIRT "jumpskirt"
#define DYE_REGISTRY_SUITS "suit"
#define DYE_REGISTRY_GLOVES "gloves"
#define DYE_REGISTRY_BANDANA "bandana"
#define DYE_REGISTRY_SNEAKERS "sneakers"
#define DYE_REGISTRY_CAP "softcap"
#define DYE_REGISTRY_BERET "beret"
Expand Down
14 changes: 9 additions & 5 deletions code/__DEFINES/flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,16 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define HTML_USE_INITAL_ICON_1 (1<<13)
/// Prevents direct access for anything in the contents of this atom.
#define NO_DIRECT_ACCESS_FROM_CONTENTS_1 (1<<14)
/// Prevents aggregation of the item in the stack panel
#define STAT_UNIQUE_1 (1<<15)

//turf-only flags. These use flags_1 too.
// These exist to cover /turf and /area at the same time
#define NOJAUNT_1 (1<<15)
#define UNUSED_RESERVATION_TURF_1 (1<<16)
#define CAN_BE_DIRTY_1 (1<<17) //! If a turf can be made dirty at roundstart. This is also used in areas.
#define NO_LAVA_GEN_1 (1<<18) //! Blocks lava rivers being generated on the turf
#define NO_RUINS_1 (1<<19) //! Blocks ruins spawning on the turf
#define NOJAUNT_1 (1<<16)
#define UNUSED_RESERVATION_TURF_1 (1<<17)
#define CAN_BE_DIRTY_1 (1<<18) //! If a turf can be made dirty at roundstart. This is also used in areas.
#define NO_LAVA_GEN_1 (1<<19) //! Blocks lava rivers being generated on the turf
#define NO_RUINS_1 (1<<20) //! Blocks ruins spawning on the turf

// Update flags for [/atom/proc/update_appearance]
/// Update the atom's name
Expand Down Expand Up @@ -111,6 +113,8 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define HIDDEN_STASH_LOCATION (1<<10)
/// Indicates that this area uses an APC from another location (Skips the unit tests for APCs)
#define REMOTE_APC (1<<11)
/// This area is prevented from having gravity (ie. space, nearstation, or outside solars)
#define NO_GRAVITY (1<<12)

/*
These defines are used specifically with the atom/pass_flags bitmask
Expand Down
6 changes: 4 additions & 2 deletions code/__DEFINES/gravity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
* This should only be possible on multi-z maps because it works like shit on maps that aren't.
*/
#define NEGATIVE_GRAVITY -1

#define STANDARD_GRAVITY 1 //Anything above this is high gravity, anything below no grav until negative gravity
/// Used to indicate no gravity
#define ZERO_GRAVITY 0
//Anything above this is high gravity, anything below no grav until negative gravity
#define STANDARD_GRAVITY 1
/// The gravity strength threshold for high gravity damage.
#define GRAVITY_DAMAGE_THRESHOLD 3
/// The scaling factor for high gravity damage.
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ GLOBAL_VAR_INIT(magic_appearance_detecting_image, new /image) // appearances are

// The filters list has the same ref type id as a filter, but isnt one and also isnt a list, so we have to check if the thing has Cut() instead
GLOBAL_VAR_INIT(refid_filter, TYPEID(filter(type="angular_blur")))
#define isfilter(thing) (!hascall(thing, "Cut") && TYPEID(thing) == GLOB.refid_filter)
#define isfilter(thing) (!islist(thing) && hascall(thing, "Cut") && TYPEID(thing) == GLOB.refid_filter)

GLOBAL_DATUM_INIT(regex_rgb_text, /regex, regex(@"^#?(([0-9a-fA-F]{8})|([0-9a-fA-F]{6})|([0-9a-fA-F]{3}))$"))
#define iscolortext(thing) (istext(thing) && GLOB.regex_rgb_text.Find(thing))
Expand Down
22 changes: 21 additions & 1 deletion code/__DEFINES/language.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,22 @@


// LANGUAGE SOURCE DEFINES
#define LANGUAGE_ALL "all" // For use in full removal only.
/// For use in full removal only.
#define LANGUAGE_ALL "all"

// Generic language sources.
/// Language is linked to the movable directly.
#define LANGUAGE_ATOM "atom"
/// Language is linked to the mob's mind.
/// If a mind transfer happens, language follows.
#define LANGUAGE_MIND "mind"
/// Language is linked to the mob's species.
/// If a species change happens, language goes away.
/// If applied to a non-human (no species) atom, this is effectively the same as [LANGUAGE_ATOM].
#define LANGUAGE_SPECIES "species"

// More specific language sources.
// Only ever goes away when dismissed directly.
#define LANGUAGE_FRIEND "friend"
#define LANGUAGE_ABSORB "absorb"
#define LANGUAGE_APHASIA "aphasia"
Expand All @@ -46,6 +59,13 @@
#define LANGUAGE_MULTILINGUAL "multilingual"
#define LANGUAGE_EMP "emp"
#define LANGUAGE_HOLOPARA "holoparasite"
#define LANGUAGE_BABEL "babel"

// Language flags. Used in granting and removing languages.
/// This language can be spoken.
#define SPOKEN_LANGUAGE (1<<0)
/// This language can be understood.
#define UNDERSTOOD_LANGUAGE (1<<1)

// Languages available from Multilingual
GLOBAL_LIST_INIT(multilingual_language_list, typecacheof(list(
Expand Down
89 changes: 51 additions & 38 deletions code/__DEFINES/layers.dm
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
//Defines for atom layers and planes
//KEEP THESE IN A NICE ACSCENDING ORDER, PLEASE

//NEVER HAVE ANYTHING BELOW THIS PLANE ADJUST IF YOU NEED MORE SPACE
#define LOWEST_EVER_PLANE -200

#define CLICKCATCHER_PLANE -99

#define PLANE_SPACE -95
#define PLANE_SPACE_PARALLAX -90

#define GRAVITY_PULSE_PLANE -89
#define GRAVITY_PULSE_RENDER_TARGET "*GRAVPULSE_RENDER_TARGET"

//#define ZMIMIC_MIN_PLANE -80
// ZMIMIC: ----------- -80 to -70
// Highest plane used by zmimic, occupies up to -ZMIMIC_MAX_DEPTH
#define ZMIMIC_MAX_PLANE -70
/// The maxiumum number of planes deep we'll go before we just dump everything on the same plane.
#define ZMIMIC_MAX_DEPTH 10
//KEEP THESE IN A NICE ACSCENDING ORDER, PLEASE

#define FLOOR_PLANE -7
#define GAME_PLANE -4
#define GAME_PLANE_RENDER_TARGET "GAME_PLANE_RENDER_TARGET"
///cinematics are "below" the splash screen
#define CINEMATIC_LAYER -1

#define SPACE_LAYER 1.8
//#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define
Expand Down Expand Up @@ -100,6 +84,54 @@
#define TEXT_EFFECT_UI_LAYER 5.90 // text effects shouldn't be displayed behind.
// maybe it should be custom layer category like 'UI_LAYER 6'

///1000 is an unimportant number, it's just to normalize copied layers
#define RADIAL_LAYER 1000

#define RADIAL_BACKGROUND_LAYER 0
#define RADIAL_CONTENT_LAYER 1000

/**
* Planes
*/

//NEVER HAVE ANYTHING BELOW THIS PLANE ADJUST IF YOU NEED MORE SPACE
#define LOWEST_EVER_PLANE -200

#define CLICKCATCHER_PLANE -99

#define PLANE_SPACE -95
#define PLANE_SPACE_PARALLAX -90

#define GRAVITY_PULSE_PLANE -89
#define GRAVITY_PULSE_RENDER_TARGET "*GRAVPULSE_RENDER_TARGET"

//---------- Z-MIMIC -------------
//#define ZMIMIC_MIN_PLANE -80
// ZMIMIC: ----------- -80 to -70
// Highest plane used by zmimic, occupies up to -ZMIMIC_MAX_DEPTH
#define ZMIMIC_MAX_PLANE -70
/// The maxiumum number of planes deep we'll go before we just dump everything on the same plane.
#define ZMIMIC_MAX_DEPTH 10

//---------- ABSTRACT LIGHTING -------------
// Layering order of these is not particularly meaningful.
// Important part is the seperation of the planes for control via plane_master
// We put these below the standard planes because if they are rendered without a plane-master (RenderIcon)
// then we want them to be as hidden as possible.

///This plane masks out lighting to create an "emissive" effect, ie for glowing lights in otherwise dark areas
#define EMISSIVE_PLANE -50
#define EMISSIVE_RENDER_TARGET "*EMISSIVE_PLANE"

/// The plane for managing the global starlight effect
#define STARLIGHT_PLANE -45

//---------- STANDARD -------------

#define FLOOR_PLANE -7
#define GAME_PLANE -4
#define GAME_PLANE_RENDER_TARGET "GAME_PLANE_RENDER_TARGET"

#define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals

#define AREA_PLANE 60
Expand All @@ -115,9 +147,6 @@
#define LIGHTING_PLANE 100
#define LIGHTING_PLANE_ADDITIVE 101

/// The plane for managing the global starlight effect
#define STARLIGHT_PLANE 105

///Lighting objects that are "free floating"
#define O_LIGHTING_VISUAL_PLANE 110
#define O_LIGHTING_VISUAL_LAYER 110
Expand All @@ -128,13 +157,6 @@

///visibility + hiding of things outside of light source range
#define BYOND_LIGHTING_PLANE 130
//---------- EMISSIVES -------------
//Layering order of these is not particularly meaningful.
//Important part is the seperation of the planes for control via plane_master

///This plane masks out lighting to create an "emissive" effect, ie for glowing lights in otherwise dark areas
#define EMISSIVE_PLANE 150
#define EMISSIVE_RENDER_TARGET "*EMISSIVE_PLANE"

///---------------- MISC -----------------------

Expand Down Expand Up @@ -183,17 +205,8 @@
#define ABOVE_HUD_PLANE 1100
#define ABOVE_HUD_RENDER_TARGET "ABOVE_HUD_PLANE"

///1000 is an unimportant number, it's just to normalize copied layers
#define RADIAL_LAYER 1000

#define RADIAL_BACKGROUND_LAYER 0
#define RADIAL_CONTENT_LAYER 1000

///Plane of the "splash" icon used that shows on the lobby screen. Nothing should ever be above this.
#define SPLASHSCREEN_PLANE 9999

///cinematics are "below" the splash screen
#define CINEMATIC_LAYER -1

///Plane master controller keys
#define PLANE_MASTERS_GAME "plane_masters_game"
4 changes: 4 additions & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai

/// this object has been frozen
#define TRAIT_FROZEN "frozen"

/// Trait given to a mob that is currently thinking (giving off the "thinking" icon), used in an IC context
#define TRAIT_THINKING_IN_CHARACTER "currently_thinking_IC"

///Turf trait for when a turf is transparent
#define TURF_Z_TRANSPARENT_TRAIT "turf_z_transparent"

Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/traits/sources.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@
/// Trait given to an atom/movable when they orbit something.
#define ORBITING_TRAIT "orbiting"

/// This trait comes from when a mob is currently typing.
#define CURRENTLY_TYPING_TRAIT "currently_typing"

#define VENTCRAWLING_TRAIT "ventcrawling"
#define SPECIES_FLIGHT_TRAIT "species-flight"
#define NO_GRAVITY_TRAIT "no-gravity"
Expand Down
48 changes: 46 additions & 2 deletions code/__DEFINES/vv.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
#define VV_MSG_EDITED "<br><font size='1' color='red'><b>Var Edited</b></font>"
#define VV_MSG_DELETED "<br><font size='1' color='red'><b>Deleted</b></font>"

#define VV_NORMAL_LIST_NO_EXPAND_THRESHOLD 50
#define VV_SPECIAL_LIST_NO_EXPAND_THRESHOLD 150
#define VV_BIG_SIZED_LIST_THRESHOLD 50

//#define IS_VALID_ASSOC_KEY(V) (istext(V) || ispath(V) || isdatum(V) || islist(V))
#define IS_VALID_ASSOC_KEY(V) (!isnum_safe(V)) //hhmmm..
Expand All @@ -45,6 +44,9 @@
#define VV_HREF_TARGETREF(targetref, href_key, text) "<a href='[VV_HREF_TARGETREF_INTERNAL(targetref, href_key)]'>[text]</a>"
#define VV_HREF_TARGET_1V(target, href_key, text, varname) "<a href='[VV_HREF_TARGET_INTERNAL(target, href_key)];[VV_HK_VARNAME]=[varname]'>[text]</a>" //for stuff like basic varedits, one variable
#define VV_HREF_TARGETREF_1V(targetref, href_key, text, varname) "<a href='[VV_HREF_TARGETREF_INTERNAL(targetref, href_key)];[VV_HK_VARNAME]=[varname]'>[text]</a>"
//! Non-standard helper for special list vv. this doesn't use VV_HK_TARGET and REF because special list doesn't work in a sane sense.
#define VV_HREF_SPECIAL(dmlist_origin_ref, href_action, text, list_index, dmlist_varname) "<a href='?_src_=vars;[HrefToken()];[href_action]=TRUE;dmlist_origin_ref=[dmlist_origin_ref];dmlist_varname=[dmlist_varname];[VV_HK_VARNAME]=[list_index]'>[text]</a>"
#define VV_HREF_SPECIAL_MENU(dmlist_origin_ref, href_action, dmlist_varname) "?_src_=vars;[HrefToken()];[href_action]=TRUE;[VV_HK_DO_LIST_EDIT]=TRUE;dmlist_origin_ref=[dmlist_origin_ref];dmlist_varname=[dmlist_varname]"

#define GET_VV_TARGET locate(href_list[VV_HK_TARGET])
#define GET_VV_VAR_TARGET href_list[VV_HK_VARNAME]
Expand All @@ -71,6 +73,9 @@
#define VV_HK_LIST_SHUFFLE "listshuffle"
#define VV_HK_LIST_SET_LENGTH "listlen"

// I exist alone here just for special list edit. God, why.
#define VV_HK_DO_LIST_EDIT "do_vv_list_edit"

// vv_do_basic() keys
#define VV_HK_BASIC_EDIT "datumedit"
#define VV_HK_BASIC_CHANGE "datumchange"
Expand Down Expand Up @@ -182,3 +187,42 @@

/// ALWAYS render a reduced list, useful for fuckoff big datums that need to be condensed for the sake of client load
#define VV_ALWAYS_CONTRACT_LIST (1<<0)
#define VV_READ_ONLY (1<<1)


#define VV_LIST_PROTECTED (1) /// Can not vv the list. Doing vv this list is not safe.
#define VV_LIST_READ_ONLY (2) /// Can vv the list, but can not edit.
#define VV_LIST_EDITABLE (3) /// Can vv the list, and edit.

// Becomes read only at live, editable at debug, dynamically
#ifdef DEBUG
#define VV_LIST_READ_ONLY___DEBUG_EDITABLE (3)
#else
#define VV_LIST_READ_ONLY___DEBUG_EDITABLE (2)
#endif

/// A list of all the special byond lists that need to be handled different by vv.
/// manually adding var name is recommanded.
GLOBAL_LIST_INIT(vv_special_lists, list(
// /datum
"vars" = VV_LIST_READ_ONLY,
// /atom
"overlays" = VV_LIST_EDITABLE,
"underlays" = VV_LIST_EDITABLE,
"vis_contents" = VV_LIST_EDITABLE,
"vis_locs" = VV_LIST_READ_ONLY___DEBUG_EDITABLE,
"contents" = VV_LIST_EDITABLE,
"locs" = VV_LIST_READ_ONLY___DEBUG_EDITABLE,
"verbs" = VV_LIST_READ_ONLY___DEBUG_EDITABLE, // verb is not safe to edit in live server
"filters" = VV_LIST_PROTECTED, // This is not good to change in vv, yet.
// /client
"bounds" = VV_LIST_PROTECTED, // DM document says it's read-only. Better not to edit this.
"images" = VV_LIST_EDITABLE,
"screen" = VV_LIST_EDITABLE,
))
// NOTE: this is highly attached to how /datum/vv_ghost works.


#ifndef DEBUG
GLOBAL_PROTECT(vv_special_lists) // changing this in live server is a bad idea
#endif
2 changes: 1 addition & 1 deletion code/__HELPERS/areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/engine/eng
newA = new area_choice
newA.setup(str)
newA.set_dynamic_lighting()
newA.has_gravity = oldA.has_gravity
newA.default_gravity = oldA.default_gravity
else
newA = area_choice

Expand Down
5 changes: 3 additions & 2 deletions code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,17 @@ DEFINE_BITFIELD(flags_1, list(
"HOLOGRAM_1" = HOLOGRAM_1,
"INITIALIZED_1" = INITIALIZED_1,
"IS_ONTOP_1" = IS_ONTOP_1,
//"IS_PLAYER_COLORABLE_1" = IS_PLAYER_COLORABLE_1,
"NODECONSTRUCT_1" = NODECONSTRUCT_1,
"NOJAUNT_1" = NOJAUNT_1,
"NO_RUINS_1" = NO_RUINS_1,
"NO_LAVA_GEN_1" = NO_LAVA_GEN_1,
"UNUSED_RESERVATION_TURF_1" = UNUSED_RESERVATION_TURF_1,
"OVERLAY_QUEUED_1" = OVERLAY_QUEUED_1,
"ON_BORDER_1" = ON_BORDER_1,
"PREVENT_CLICK_UNDER_1" = PREVENT_CLICK_UNDER_1,
"TESLA_IGNORE_1" = TESLA_IGNORE_1,
"PREVENT_CONTENTS_EXPLOSION_1" = PREVENT_CONTENTS_EXPLOSION_1,
"TESLA_IGNORE_1" = TESLA_IGNORE_1,
"UNUSED_RESERVATION_TURF_1" = UNUSED_RESERVATION_TURF_1,
"UNPAINTABLE_1" = UNPAINTABLE_1,
))

Expand Down
Loading

0 comments on commit 8096db4

Please sign in to comment.