Merge branch 'Citadel-Station-13:master' into WanderingFox95-TribalOverhaul

This commit is contained in:
WanderingFox95
2021-09-19 21:32:03 +02:00
committed by GitHub
706 changed files with 34176 additions and 17253 deletions
+9
View File
@@ -0,0 +1,9 @@
#define AUXMOS (world.system_type == MS_WINDOWS ? "auxmos.dll" : __detect_auxmos())
/proc/__detect_auxmos()
if (fexists("./libauxmos.so"))
return "./libauxmos.so"
else if (fexists("[world.GetConfig("env", "HOME")]/.byond/bin/libauxmos.so"))
return "[world.GetConfig("env", "HOME")]/.byond/bin/libauxmos.so"
else
CRASH("Could not find libauxmos.so")
-2
View File
@@ -1,2 +0,0 @@
#define EXTOOLS (world.system_type == MS_WINDOWS ? "byond-extools.dll" : "libbyond-extools.so")
#define AUXMOS (world.system_type == MS_WINDOWS ? "auxmos.dll" : "libauxmos.so")
+1
View File
@@ -15,6 +15,7 @@
#define BLOCK_Z_IN_UP (1<<12) // Should this object block z uprise from below?
#define SHOVABLE_ONTO (1<<13)//called on turf.shove_act() to consider whether an object should have a niche effect (defined in their own shove_act()) when someone is pushed onto it, or do a sanity CanPass() check.
#define EXAMINE_SKIP (1<<14) /// Makes the Examine proc not read out this item.
#define IN_STORAGE (1<<15) //is this item in the storage item, such as backpack? used for tooltips
/// Integrity defines for clothing (not flags but close enough)
#define CLOTHING_PRISTINE 0 // We have no damage on the clothing
+11 -2
View File
@@ -155,10 +155,10 @@
//LAVALAND
#define LAVALAND_EQUIPMENT_EFFECT_PRESSURE 50 //what pressure you have to be under to increase the effect of equipment meant for lavaland
#define LAVALAND_DEFAULT_ATMOS "o2=14;n2=23;TEMP=300"
#define LAVALAND_DEFAULT_ATMOS "LAVALAND_ATMOS"
//SNOSTATION
#define ICEMOON_DEFAULT_ATMOS "o2=17;n2=63;TEMP=180"
#define ICEMOON_DEFAULT_ATMOS "ICEMOON_ATMOS"
//ATMOSIA GAS MONITOR TAGS
#define ATMOS_GAS_MONITOR_INPUT_O2 "o2_in"
@@ -268,6 +268,15 @@
#define GAS_FLAG_DANGEROUS (1<<0)
#define GAS_FLAG_BREATH_PROC (1<<1)
//SUPERMATTER DEFINES
#define HEAT_PENALTY "heat penalties"
#define TRANSMIT_MODIFIER "transmit"
#define RADIOACTIVITY_MODIFIER "radioactivity"
#define HEAT_RESISTANCE "heat resistance"
#define POWERLOSS_INHIBITION "powerloss inhibition"
#define ALL_SUPERMATTER_GASES "gases we care about"
#define POWER_MIX "gas powermix"
//HELPERS
#define PIPING_LAYER_SHIFT(T, PipingLayer) \
if(T.dir & (NORTH|SOUTH)) { \
+1
View File
@@ -24,6 +24,7 @@
#define COLOR_BEIGE "#CEB689"
#define COLOR_BLUE_GRAY "#75A2BB"
#define COLOR_BROWN "#BA9F6D"
#define COLOR_SOFT_RED "#FA8282"
#define COLOR_DARK_BROWN "#997C4F"
#define COLOR_DARK_ORANGE "#C3630C"
#define COLOR_GREEN_GRAY "#99BB76"
+16
View File
@@ -83,3 +83,19 @@
#define COMBAT_MODE_ACTIVE (1<<1)
/// combat mode is not active
#define COMBAT_MODE_INACTIVE (1<<2)
// Update flags for [/atom/proc/update_appearance]
/// Update the atom's name
#define UPDATE_NAME (1<<0)
/// Update the atom's desc
#define UPDATE_DESC (1<<1)
/// Update the atom's icon state
#define UPDATE_ICON_STATE (1<<2)
/// Update the atom's overlays
#define UPDATE_OVERLAYS (1<<3)
/// Update the atom's greyscaling
#define UPDATE_GREYSCALE (1<<4)
/// Update the atom's smoothing. (More accurately, queue it for an update)
#define UPDATE_SMOOTHING (1<<5)
/// Update the atom's icon
#define UPDATE_ICON (UPDATE_ICON_STATE|UPDATE_OVERLAYS)
+58 -8
View File
@@ -74,11 +74,30 @@
#define EXAMINE_POSITION_BEFORE (1<<1)
//End positions
#define COMPONENT_EXNAME_CHANGED (1<<0)
#define COMSIG_ATOM_UPDATE_ICON "atom_update_icon" //from base of atom/update_icon(): ()
#define COMSIG_ATOM_NO_UPDATE_ICON_STATE 1
#define COMSIG_ATOM_NO_UPDATE_OVERLAYS 2
#define COMSIG_ATOM_UPDATE_OVERLAYS "atom_update_overlays" //from base of atom/update_overlays(): (list/new_overlays)
#define COMSIG_ATOM_UPDATED_ICON "atom_updated_icon" //from base of atom/update_icon(): (signalOut, did_anything)
///from base of [/atom/proc/update_appearance]: (updates)
#define COMSIG_ATOM_UPDATE_APPEARANCE "atom_update_appearance"
/// If returned from [COMSIG_ATOM_UPDATE_APPEARANCE] it prevents the atom from updating its name.
#define COMSIG_ATOM_NO_UPDATE_NAME UPDATE_NAME
/// If returned from [COMSIG_ATOM_UPDATE_APPEARANCE] it prevents the atom from updating its desc.
#define COMSIG_ATOM_NO_UPDATE_DESC UPDATE_DESC
/// If returned from [COMSIG_ATOM_UPDATE_APPEARANCE] it prevents the atom from updating its icon.
#define COMSIG_ATOM_NO_UPDATE_ICON UPDATE_ICON
///from base of [/atom/proc/update_name]: (updates)
#define COMSIG_ATOM_UPDATE_NAME "atom_update_name"
///from base of [/atom/proc/update_desc]: (updates)
#define COMSIG_ATOM_UPDATE_DESC "atom_update_desc"
///from base of [/atom/update_icon]: ()
#define COMSIG_ATOM_UPDATE_ICON "atom_update_icon"
/// If returned from [COMSIG_ATOM_UPDATE_ICON] it prevents the atom from updating its icon state.
#define COMSIG_ATOM_NO_UPDATE_ICON_STATE UPDATE_ICON_STATE
/// If returned from [COMSIG_ATOM_UPDATE_ICON] it prevents the atom from updating its overlays.
#define COMSIG_ATOM_NO_UPDATE_OVERLAYS UPDATE_OVERLAYS
///from base of [atom/update_icon_state]: ()
#define COMSIG_ATOM_UPDATE_ICON_STATE "atom_update_icon_state"
///from base of [/atom/update_overlays]: (list/new_overlays)
#define COMSIG_ATOM_UPDATE_OVERLAYS "atom_update_overlays"
///from base of [/atom/update_icon]: (signalOut, did_anything)
#define COMSIG_ATOM_UPDATED_ICON "atom_updated_icon"
#define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable/entering, /atom)
#define COMSIG_ATOM_EXIT "atom_exit" //from base of atom/Exit(): (/atom/movable/exiting, /atom/newloc)
#define COMPONENT_ATOM_BLOCK_EXIT 1
@@ -112,8 +131,6 @@
///from obj/machinery/bsa/full/proc/fire(): ()
#define COMSIG_ATOM_BSA_BEAM "atom_bsa_beam_pass"
#define COMSIG_ATOM_BLOCKS_BSA_BEAM (1<<0)
///from base of atom/set_light(): (l_range, l_power, l_color)
#define COMSIG_ATOM_SET_LIGHT "atom_set_light"
///from base of atom/setDir(): (old_dir, new_dir). Called before the direction changes.
#define COMSIG_ATOM_DIR_CHANGE "atom_dir_change"
///from base of atom/handle_atom_del(): (atom/deleted)
@@ -278,6 +295,32 @@
///from base of mob/AltClickOn(): (atom/A)
#define COMSIG_MOB_ALTCLICKON "mob_altclickon"
// Lighting:
///from base of [atom/proc/set_light]: (l_range, l_power, l_color, l_on)
#define COMSIG_ATOM_SET_LIGHT "atom_set_light"
/// Blocks [/atom/proc/set_light], [/atom/proc/set_light_power], [/atom/proc/set_light_range], [/atom/proc/set_light_color], [/atom/proc/set_light_on], and [/atom/proc/set_light_flags].
#define COMPONENT_BLOCK_LIGHT_UPDATE (1<<0)
///Called right before the atom changes the value of light_power to a different one, from base [atom/proc/set_light_power]: (new_power)
#define COMSIG_ATOM_SET_LIGHT_POWER "atom_set_light_power"
///Called right after the atom changes the value of light_power to a different one, from base of [/atom/proc/set_light_power]: (old_power)
#define COMSIG_ATOM_UPDATE_LIGHT_POWER "atom_update_light_power"
///Called right before the atom changes the value of light_range to a different one, from base [atom/proc/set_light_range]: (new_range)
#define COMSIG_ATOM_SET_LIGHT_RANGE "atom_set_light_range"
///Called right after the atom changes the value of light_range to a different one, from base of [/atom/proc/set_light_range]: (old_range)
#define COMSIG_ATOM_UPDATE_LIGHT_RANGE "atom_update_light_range"
///Called right before the atom changes the value of light_color to a different one, from base [atom/proc/set_light_color]: (new_color)
#define COMSIG_ATOM_SET_LIGHT_COLOR "atom_set_light_color"
///Called right after the atom changes the value of light_color to a different one, from base of [/atom/proc/set_light_color]: (old_color)
#define COMSIG_ATOM_UPDATE_LIGHT_COLOR "atom_update_light_color"
///Called right before the atom changes the value of light_on to a different one, from base [atom/proc/set_light_on]: (new_value)
#define COMSIG_ATOM_SET_LIGHT_ON "atom_set_light_on"
///Called right after the atom changes the value of light_on to a different one, from base of [/atom/proc/set_light_on]: (old_value)
#define COMSIG_ATOM_UPDATE_LIGHT_ON "atom_update_light_on"
///Called right before the atom changes the value of light_flags to a different one, from base [atom/proc/set_light_flags]: (new_flags)
#define COMSIG_ATOM_SET_LIGHT_FLAGS "atom_set_light_flags"
///Called right after the atom changes the value of light_flags to a different one, from base of [/atom/proc/set_light_flags]: (old_flags)
#define COMSIG_ATOM_UPDATE_LIGHT_FLAGS "atom_update_light_flags"
// /client signals
#define COMSIG_MOB_CLIENT_LOGIN "mob_client_login" //sent when a mob/login() finishes: (client)
#define COMSIG_MOB_CLIENT_LOGOUT "mob_client_logout" //sent when a mob/logout() starts: (client)
@@ -361,6 +404,12 @@
// /machinery signals
#define COMSIG_MACHINE_EJECT_OCCUPANT "eject_occupant" //from base of obj/machinery/dropContents() (occupant)
///from base power_change() when power is lost
#define COMSIG_MACHINERY_POWER_LOST "machinery_power_lost"
///from base power_change() when power is restored
#define COMSIG_MACHINERY_POWER_RESTORED "machinery_power_restored"
///from /obj/machinery/obj_break(damage_flag): (damage_flag)
#define COMSIG_MACHINERY_BROKEN "machinery_broken"
// /obj/item signals
#define COMSIG_ITEM_ATTACK "item_attack" //from base of obj/item/attack(): (/mob/living/target, /mob/living/user)
@@ -388,8 +437,9 @@
#define COMPONENT_BLOCK_SHARPEN_BLOCKED 2
#define COMPONENT_BLOCK_SHARPEN_ALREADY 4
#define COMPONENT_BLOCK_SHARPEN_MAXED 8
#define COMSIG_ITEM_MICROWAVE_ACT "microwave_act" //called on item when microwaved (): (obj/machinery/microwave/M)
#define COMSIG_ITEM_MICROWAVE_ACT "microwave_act" //called on item when microwaved (): (obj/machinery/microwave/M)
#define COMSIG_ITEM_WORN_OVERLAYS "item_worn_overlays" //from base of obj/item/worn_overlays(): (isinhands, icon_file, used_state, style_flags, list/overlays)
#define COMSIG_ARMOR_PLATED "armor_plated" //called when an armor plate is successfully applied to an object
// THE FOLLOWING TWO BLOCKS SHOULD RETURN BLOCK FLAGS AS DEFINED IN __DEFINES/combat.dm!
#define COMSIG_ITEM_CHECK_BLOCK "check_block" //from base of obj/item/check_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
#define COMSIG_ITEM_RUN_BLOCK "run_block" //from base of obj/item/run_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
+7
View File
@@ -8,6 +8,7 @@
#define FOOTSTEP_LAVA "lava"
#define FOOTSTEP_MEAT "meat"
#define FOOTSTEP_RUST "rust"
#define FOOTSTEP_CATWALK "catwalk"
//barefoot sounds
#define FOOTSTEP_WOOD_BAREFOOT "woodbarefoot"
@@ -94,6 +95,12 @@ GLOBAL_LIST_INIT(footstep, list(
'sound/effects/footstep/lava3.ogg'), 100, 0),
FOOTSTEP_MEAT = list(list(
'sound/effects/meatslap.ogg'), 100, 0),
FOOTSTEP_CATWALK = list(list(
'sound/effects/footstep/catwalk1.ogg',
'sound/effects/footstep/catwalk2.ogg',
'sound/effects/footstep/catwalk3.ogg',
'sound/effects/footstep/catwalk4.ogg',
'sound/effects/footstep/catwalk5.ogg'), 100, 1),
FOOTSTEP_RUST = list(list(
'sound/effects/footstep/rustystep1.ogg'), 100, 0)
))
+2
View File
@@ -42,6 +42,7 @@
#define CLOWN (1<<11)
#define MIME (1<<12)
#define ASSISTANT (1<<13)
#define PRISONER (1<<14)
#define JOB_AVAILABLE 0
#define JOB_UNAVAILABLE_GENERIC 1
@@ -89,3 +90,4 @@
#define JOB_DISPLAY_ORDER_WARDEN 31
#define JOB_DISPLAY_ORDER_DETECTIVE 32
#define JOB_DISPLAY_ORDER_SECURITY_OFFICER 33
#define JOB_DISPLAY_ORDER_PRISONER 34
+7 -2
View File
@@ -64,8 +64,9 @@
#define GAS_PIPE_VISIBLE_LAYER 2.47
#define GAS_FILTER_LAYER 2.48
#define GAS_PUMP_LAYER 2.49
#define LOW_OBJ_LAYER 2.5
///catwalk overlay of /turf/open/floor/plating/plating_catwalk
#define CATWALK_LAYER 2.51
#define LOW_SIGIL_LAYER 2.52
#define SIGIL_LAYER 2.54
#define HIGH_SIGIL_LAYER 2.56
@@ -124,16 +125,20 @@
#define EMISSIVE_PLANE 13
#define EMISSIVE_LAYER 13
#define EMISSIVE_RENDER_TARGET "*EMISSIVE_PLANE"
#define EMISSIVE_UNBLOCKABLE_PLANE 14
#define EMISSIVE_UNBLOCKABLE_LAYER 14
#define EMISSIVE_LAYER_UNBLOCKABLE 14
#define EMISSIVE_UNBLOCKABLE_RENDER_TARGET "*EMISSIVE_UNBLOCKABLE_PLANE"
#define EMISSIVE_RENDER_TARGET "*EMISSIVE_PLANE"
#define LIGHTING_PLANE 15
#define LIGHTING_LAYER 15
#define LIGHTING_RENDER_TARGET "LIGHT_PLANE"
#define O_LIGHTING_VISUAL_PLANE 110
#define O_LIGHTING_VISUAL_RENDER_TARGET "O_LIGHT_VISUAL_PLANE"
#define RAD_TEXT_LAYER 15.1
#define ABOVE_LIGHTING_PLANE 16
+13
View File
@@ -84,11 +84,24 @@
#define FLASH_LIGHT_POWER 3
#define FLASH_LIGHT_RANGE 3.8
// Emissive blocking.
/// Uses vis_overlays to leverage caching so that very few new items need to be made for the overlay. For anything that doesn't change outline or opaque area much or at all.
#define EMISSIVE_BLOCK_GENERIC 1
/// Uses a dedicated render_target object to copy the entire appearance in real time to the blocking layer. For things that can change in appearance a lot from the base state, like humans.
#define EMISSIVE_BLOCK_UNIQUE 2
/// The color matrix applied to all emissive overlays. Should be solely dependent on alpha and not have RGB overlap with [EM_BLOCK_COLOR].
#define EMISSIVE_COLOR list(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 1,1,1,0)
/// A globaly cached version of [EMISSIVE_COLOR] for quick access.
GLOBAL_LIST_INIT(emissive_color, EMISSIVE_COLOR)
/// The color matrix applied to all emissive blockers. Should be solely dependent on alpha and not have RGB overlap with [EMISSIVE_COLOR].
#define EM_BLOCK_COLOR list(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0)
/// A globaly cached version of [EM_BLOCK_COLOR] for quick access.
GLOBAL_LIST_INIT(em_block_color, EM_BLOCK_COLOR)
/// The color matrix used to mask out emissive blockers on the emissive plane. Alpha should default to zero, be solely dependent on the RGB value of [EMISSIVE_COLOR], and be independant of the RGB value of [EM_BLOCK_COLOR].
#define EM_MASK_MATRIX list(0,0,0,1/3, 0,0,0,1/3, 0,0,0,1/3, 0,0,0,0, 1,1,1,0)
/// A globaly cached version of [EM_MASK_MATRIX] for quick access.
GLOBAL_LIST_INIT(em_mask_matrix, EM_MASK_MATRIX)
/// Returns the red part of a #RRGGBB hex sequence as number
#define GETREDPART(hexa) hex2num(copytext(hexa, 2, 4))
+1 -1
View File
@@ -59,7 +59,7 @@
#define LOADOUT_CATEGORY_UNLOCKABLE "Unlockable"
//how many prosthetics can we have
#define MAXIMUM_LOADOUT_PROSTHETICS 2
#define MAXIMUM_LOADOUT_PROSTHETICS 4
//what limbs can be amputated or be prosthetic
#define LOADOUT_ALLOWED_LIMB_TARGETS list(BODY_ZONE_L_ARM,BODY_ZONE_R_ARM,BODY_ZONE_L_LEG,BODY_ZONE_R_LEG)
+4
View File
@@ -347,3 +347,7 @@
// / Breathing types. Lungs can access either by these or by a string, which will be considered a gas ID.
#define BREATH_OXY /datum/breathing_class/oxygen
#define BREATH_PLASMA /datum/breathing_class/plasma
//Gremlins
#define NPC_TAMPER_ACT_FORGET 1 //Don't try to tamper with this again
#define NPC_TAMPER_ACT_NOMSG 2 //Don't produce a visible message
+5
View File
@@ -1,3 +1,8 @@
#define SOLAR_TRACK_OFF 0
#define SOLAR_TRACK_TIMED 1
#define SOLAR_TRACK_AUTO 2
///conversion ratio from joules to watts
#define WATTS / 0.002
///conversion ratio from watts to joules
#define JOULES * 0.002
+28 -14
View File
@@ -1,30 +1,44 @@
//defines that give qdel hints. these can be given as a return in destory() or by calling
//! Defines that give qdel hints.
//!
//! These can be given as a return in [/atom/proc/Destroy] or by calling [/proc/qdel].
/// `qdel` should queue the object for deletion.
#define QDEL_HINT_QUEUE 0
/// `qdel` should let the object live after calling [/atom/proc/Destroy].
#define QDEL_HINT_LETMELIVE 1
/// Functionally the same as the above. `qdel` should assume the object will gc on its own, and not check it.
#define QDEL_HINT_IWILLGC 2
/// Qdel should assume this object won't GC, and queue a hard delete using a hard reference.
#define QDEL_HINT_HARDDEL 3
// Qdel should assume this object won't gc, and hard delete it posthaste.
#define QDEL_HINT_HARDDEL_NOW 4
#define QDEL_HINT_QUEUE 0 //qdel should queue the object for deletion.
#define QDEL_HINT_LETMELIVE 1 //qdel should let the object live after calling destory.
#define QDEL_HINT_IWILLGC 2 //functionally the same as the above. qdel should assume the object will gc on its own, and not check it.
#define QDEL_HINT_HARDDEL 3 //qdel should assume this object won't gc, and queue a hard delete using a hard reference.
#define QDEL_HINT_HARDDEL_NOW 4 //qdel should assume this object won't gc, and hard del it post haste.
#ifdef LEGACY_REFERENCE_TRACKING
/** If LEGACY_REFERENCE_TRACKING is enabled, qdel will call this object's find_references() verb.
*
* Functionally identical to QDEL_HINT_QUEUE if GC_FAILURE_HARD_LOOKUP is not enabled in _compiler_options.dm.
#ifdef REFERENCE_TRACKING
/** If REFERENCE_TRACKING is enabled, qdel will call this object's find_references() verb.
*
* Functionally identical to [QDEL_HINT_QUEUE] if [GC_FAILURE_HARD_LOOKUP] is not enabled in _compiler_options.dm.
*/
#define QDEL_HINT_FINDREFERENCE 5
/// Behavior as QDEL_HINT_FINDREFERENCE, but only if the GC fails and a hard delete is forced.
#define QDEL_HINT_FINDREFERENCE 5
/// Behavior as [QDEL_HINT_FINDREFERENCE], but only if the GC fails and a hard delete is forced.
#define QDEL_HINT_IFFAIL_FINDREFERENCE 6
#endif
#define GC_QUEUE_CHECK 1
#define GC_QUEUE_HARDDELETE 2
#define GC_QUEUE_COUNT 2 //increase this when adding more steps.
#define QDEL_ITEM_ADMINS_WARNED (1<<0) //! Set when admins are told about lag causing qdels in this type.
#define QDEL_ITEM_SUSPENDED_FOR_LAG (1<<1) //! Set when a type can no longer be hard deleted on failure because of lag it causes while this happens.
// Defines for the [gc_destroyed][/datum/var/gc_destroyed] var.
#define GC_QUEUED_FOR_QUEUING -1
#define GC_CURRENTLY_BEING_QDELETED -2
// Defines for the time left for an item to get its reference cleaned
#define GC_FILTER_QUEUE 5 MINUTES
#define GC_DEL_QUEUE 10 SECONDS
#define QDELING(X) (X.gc_destroyed)
#define QDELETED(X) (!X || QDELING(X))
#define QDESTROYING(X) (!X || X.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)
+5
View File
@@ -76,3 +76,8 @@
//Chemical reaction flags, for determining reaction specialties
#define REACTION_CLEAR_IMPURE (1<<0) //Convert into impure/pure on reaction completion
#define REACTION_CLEAR_INVERSE (1<<1) //Convert into inverse on reaction completion when purity is low enough
//Chemical blacklists for smartdarts
GLOBAL_LIST_INIT(blacklisted_medchems, list(
/datum/reagent/medicine/morphine, /datum/reagent/medicine/haloperidol, //harmful chemicals in medicine
))
+13 -2
View File
@@ -38,6 +38,9 @@
#define RUST_G (__rust_g || __detect_rust_g())
#endif
/// Gets the version of rust_g
/proc/rustg_get_version() return call(RUST_G, "get_version")()
/**
* This proc generates a cellular automata noise grid which can be used in procedural generation methods.
*
@@ -77,8 +80,8 @@
#define RUSTG_HTTP_METHOD_PATCH "patch"
#define RUSTG_HTTP_METHOD_HEAD "head"
#define RUSTG_HTTP_METHOD_POST "post"
#define rustg_http_request_blocking(method, url, body, headers) call(RUST_G, "http_request_blocking")(method, url, body, headers)
#define rustg_http_request_async(method, url, body, headers) call(RUST_G, "http_request_async")(method, url, body, headers)
#define rustg_http_request_blocking(method, url, body, headers, options) call(RUST_G, "http_request_blocking")(method, url, body, headers, options)
#define rustg_http_request_async(method, url, body, headers, options) call(RUST_G, "http_request_async")(method, url, body, headers, options)
#define rustg_http_check_request(req_id) call(RUST_G, "http_check_request")(req_id)
#define RUSTG_JOB_NO_RESULTS_YET "NO RESULTS YET"
@@ -99,3 +102,11 @@
#define rustg_sql_disconnect_pool(handle) call(RUST_G, "sql_disconnect_pool")(handle)
#define rustg_sql_check_query(job_id) call(RUST_G, "sql_check_query")("[job_id]")
#define rustg_url_encode(text) call(RUST_G, "url_encode")(text)
#define rustg_url_decode(text) call(RUST_G, "url_decode")(text)
#ifdef RUSTG_OVERRIDE_BUILTINS
#define url_encode(text) rustg_url_encode(text)
#define url_decode(text) rustg_url_decode(text)
#endif
+3
View File
@@ -0,0 +1,3 @@
// RUSTG_OVERRIDE_BUILTINS is not used since the file APIs don't work well over Linux.
#define url_encode(text) rustg_url_encode("[text]")
#define url_decode(text) rustg_url_decode("[text]")
+114
View File
@@ -0,0 +1,114 @@
// Sorted alphabetically
#define span_abductor(str) ("<span class='abductor'>" + str + "</span>")
#define span_admin(str) ("<span class='admin'>" + str + "</span>")
#define span_adminhelp(str) ("<span class='adminhelp'>" + str + "</span>")
#define span_adminnotice(str) ("<span class='adminnotice'>" + str + "</span>")
#define span_adminobserverooc(str) ("<span class='adminobserverooc'>" + str + "</span>")
#define span_adminooc(str) ("<span class='adminooc'>" + str + "</span>")
#define span_adminsay(str) ("<span class='adminsay'>" + str + "</span>")
#define span_aiprivradio(str) ("<span class='aiprivradio'>" + str + "</span>")
#define span_alert(str) ("<span class='alert'>" + str + "</span>")
#define span_alertalien(str) ("<span class='alertalien'>" + str + "</span>")
#define span_alertsyndie(str) ("<span class='alertsyndie'>" + str + "</span>")
#define span_alertwarning(str) ("<span class='alertwarning'>" + str + "</span>")
#define span_alien(str) ("<span class='alien'>" + str + "</span>")
#define span_announce(str) ("<span class='announce'>" + str + "</span>")
#define span_big(str) ("<span class='big'>" + str + "</span>")
#define span_bigicon(str) ("<span class='bigicon'>" + str + "</span>")
#define span_binarysay(str) ("<span class='binarysay'>" + str + "</span>")
#define span_blue(str) ("<span class='blue'>" + str + "</span>")
#define span_blueteamradio(str) ("<span class='blueteamradio'>" + str + "</span>")
#define span_bold(str) ("<span class='bold'>" + str + "</span>")
#define span_boldannounce(str) ("<span class='boldannounce'>" + str + "</span>")
#define span_boldnotice(str) ("<span class='boldnotice'>" + str + "</span>")
#define span_boldwarning(str) ("<span class='boldwarning'>" + str + "</span>")
#define span_centcomradio(str) ("<span class='centcomradio'>" + str + "</span>")
#define span_changeling(str) ("<span class='changeling'>" + str + "</span>")
#define span_clown(str) ("<span class='clown'>" + str + "</span>")
#define span_colossus(str) ("<span class='colossus'>" + str + "</span>")
#define span_command_headset(str) ("<span class='command_headset'>" + str + "</span>")
#define span_comradio(str) ("<span class='comradio'>" + str + "</span>")
#define span_cult(str) ("<span class='cult'>" + str + "</span>")
#define span_cultbold(str) ("<span class='cultbold'>" + str + "</span>")
#define span_cultboldtalic(str) ("<span class='cultboldtalic'>" + str + "</span>")
#define span_cultitalic(str) ("<span class='cultitalic'>" + str + "</span>")
#define span_cultlarge(str) ("<span class='cultlarge'>" + str + "</span>")
#define span_danger(str) ("<span class='danger'>" + str + "</span>")
#define span_deadsay(str) ("<span class='deadsay'>" + str + "</span>")
#define span_deconversion_message(str) ("<span class='deconversion_message'>" + str + "</span>")
#define span_drone(str) ("<span class='drone'>" + str + "</span>")
#define span_engradio(str) ("<span class='engradio'>" + str + "</span>")
#define span_extremelybig(str) ("<span class='extremelybig'>" + str + "</span>")
#define span_ghostalert(str) ("<span class='ghostalert'>" + str + "</span>")
#define span_green(str) ("<span class='green'>" + str + "</span>")
#define span_greenannounce(str) ("<span class='greenannounce'>" + str + "</span>")
#define span_greenteamradio(str) ("<span class='greenteamradio'>" + str + "</span>")
#define span_greentext(str) ("<span class='greentext'>" + str + "</span>")
#define span_hear(str) ("<span class='hear'>" + str + "</span>")
#define span_hidden(str) ("<span class='hidden'>" + str + "</span>")
#define span_hierophant(str) ("<span class='hierophant'>" + str + "</span>")
#define span_hierophant_warning(str) ("<span class='hierophant_warning'>" + str + "</span>")
#define span_highlight(str) ("<span class='highlight'>" + str + "</span>")
#define span_his_grace(str) ("<span class='his_grace'>" + str + "</span>")
#define span_holoparasite(str) ("<span class='holoparasite'>" + str + "</span>")
#define span_hypnophrase(str) ("<span class='hypnophrase'>" + str + "</span>")
#define span_icon(str) ("<span class='icon'>" + str + "</span>")
#define span_info(str) ("<span class='info'>" + str + "</span>")
#define span_interface(str) ("<span class='interface'>" + str + "</span>")
#define span_looc(str) ("<span class='looc'>" + str + "</span>")
#define span_medal(str) ("<span class='medal'>" + str + "</span>")
#define span_medradio(str) ("<span class='medradio'>" + str + "</span>")
#define span_memo(str) ("<span class='memo'>" + str + "</span>")
#define span_memoedit(str) ("<span class='memoedit'>" + str + "</span>")
#define span_mind_control(str) ("<span class='mind_control'>" + str + "</span>")
#define span_minorannounce(str) ("<span class='minorannounce'>" + str + "</span>")
#define span_monkey(str) ("<span class='monkey'>" + str + "</span>")
#define span_monkeyhive(str) ("<span class='monkeyhive'>" + str + "</span>")
#define span_monkeylead(str) ("<span class='monkeylead'>" + str + "</span>")
#define span_name(str) ("<span class='name'>" + str + "</span>")
#define span_narsie(str) ("<span class='narsie'>" + str + "</span>")
#define span_narsiesmall(str) ("<span class='narsiesmall'>" + str + "</span>")
#define span_nicegreen(str) ("<span class='nicegreen'>" + str + "</span>")
#define span_notice(str) ("<span class='notice'>" + str + "</span>")
#define span_noticealien(str) ("<span class='noticealien'>" + str + "</span>")
#define span_ooc(str) ("<span class='ooc'>" + str + "</span>")
#define span_papyrus(str) ("<span class='papyrus'>" + str + "</span>")
#define span_phobia(str) ("<span class='phobia'>" + str + "</span>")
#define span_prefix(str) ("<span class='prefix'>" + str + "</span>")
#define span_purple(str) ("<span class='purple'>" + str + "</span>")
#define span_radio(str) ("<span class='radio'>" + str + "</span>")
#define span_reallybig(str) ("<span class='reallybig'>" + str + "</span>")
#define span_red(str) ("<span class='red'>" + str + "</span>")
#define span_redteamradio(str) ("<span class='redteamradio'>" + str + "</span>")
#define span_redtext(str) ("<span class='redtext'>" + str + "</span>")
#define span_resonate(str) ("<span class='resonate'>" + str + "</span>")
#define span_revenbignotice(str) ("<span class='revenbignotice'>" + str + "</span>")
#define span_revenboldnotice(str) ("<span class='revenboldnotice'>" + str + "</span>")
#define span_revendanger(str) ("<span class='revendanger'>" + str + "</span>")
#define span_revenminor(str) ("<span class='revenminor'>" + str + "</span>")
#define span_revennotice(str) ("<span class='revennotice'>" + str + "</span>")
#define span_revenwarning(str) ("<span class='revenwarning'>" + str + "</span>")
#define span_robot(str) ("<span class='robot'>" + str + "</span>")
#define span_rose(str) ("<span class='rose'>" + str + "</span>")
#define span_sans(str) ("<span class='sans'>" + str + "</span>")
#define span_sciradio(str) ("<span class='sciradio'>" + str + "</span>")
#define span_secradio(str) ("<span class='secradio'>" + str + "</span>")
#define span_servradio(str) ("<span class='servradio'>" + str + "</span>")
#define span_singing(str) ("<span class='singing'>" + str + "</span>")
#define span_slime(str) ("<span class='slime'>" + str + "</span>")
#define span_small(str) ("<span class='small'>" + str + "</span>")
#define span_smallnotice(str) ("<span class='smallnotice'>" + str + "</span>")
#define span_smallnoticeital(str) ("<span class='smallnoticeital'>" + str + "</span>")
#define span_spider(str) ("<span class='spider'>" + str + "</span>")
#define span_suicide(str) ("<span class='suicide'>" + str + "</span>")
#define span_suppradio(str) ("<span class='suppradio'>" + str + "</span>")
#define span_swarmer(str) ("<span class='swarmer'>" + str + "</span>")
#define span_syndradio(str) ("<span class='syndradio'>" + str + "</span>")
#define span_tape_recorder(str) ("<span class='tape_recorder'>" + str + "</span>")
#define span_tinynotice(str) ("<span class='tinynotice'>" + str + "</span>")
#define span_tinynoticeital(str) ("<span class='tinynoticeital'>" + str + "</span>")
#define span_unconscious(str) ("<span class='unconscious'>" + str + "</span>")
#define span_userdanger(str) ("<span class='userdanger'>" + str + "</span>")
#define span_warning(str) ("<span class='warning'>" + str + "</span>")
#define span_yell(str) ("<span class='yell'>" + str + "</span>")
#define span_yellowteamradio(str) ("<span class='yellowteamradio'>" + str + "</span>")
+6
View File
@@ -215,6 +215,12 @@
#define SSAIR_ATMOSMACHINERY_AIR 12
#define SSAIR_DEFERRED_AIRS 13
// Subsystem delta times or tickrates, in seconds. I.e, how many seconds in between each process() call for objects being processed by that subsystem.
// Only use these defines if you want to access some other objects processing delta_time, otherwise use the delta_time that is sent as a parameter to process()
#define SSFLUIDS_DT (SSfluids.wait/10)
#define SSMACHINES_DT (SSmachines.wait/10)
#define SSMOBS_DT (SSmobs.wait/10)
#define SSOBJ_DT (SSobj.wait/10)
//! ## Overlays subsystem
+6
View File
@@ -49,10 +49,16 @@ When using time2text(), please use "DDD" to find the weekday. Refrain from using
#define TICKS *world.tick_lag
#define MILLISECONDS * 0.01
#define DS2TICKS(DS) ((DS)/world.tick_lag)
#define TICKS2DS(T) ((T) TICKS)
#define MS2DS(T) ((T) MILLISECONDS)
#define DS2MS(T) ((T) * 100)
#define GAMETIMESTAMP(format, wtime) time2text(wtime, format)
#define WORLDTIME2TEXT(format) GAMETIMESTAMP(format, world.time)
#define WORLDTIMEOFDAY2TEXT(format) GAMETIMESTAMP(format, world.timeofday)
+6
View File
@@ -343,3 +343,9 @@
#define STICKY_NODROP "sticky-nodrop" //sticky nodrop sounds like a bad soundcloud rapper's name
#define TRAIT_SACRIFICED "sacrificed" //Makes sure that people cant be cult sacrificed twice.
#define TRAIT_SPACEWALK "spacewalk"
/// obtained from mapping helper
#define MAPPING_HELPER_TRAIT "mapping-helper"
/// Trait associated with mafia
#define MAFIA_TRAIT "mafia"
+9 -5
View File
@@ -10,12 +10,16 @@
GLOBAL_LIST_EMPTY(auxtools_initialized)
#define AUXTOOLS_CHECK(LIB)\
if (!GLOB.auxtools_initialized[LIB] && fexists(LIB)) {\
var/string = call(LIB,"auxtools_init")();\
if(findtext(string, "SUCCESS")) {\
GLOB.auxtools_initialized[LIB] = TRUE;\
if (!GLOB.auxtools_initialized[LIB]) {\
if (fexists(LIB)) {\
var/string = call(LIB,"auxtools_init")();\
if(findtext(string, "SUCCESS")) {\
GLOB.auxtools_initialized[LIB] = TRUE;\
} else {\
CRASH(string);\
}\
} else {\
CRASH(string);\
CRASH("No file named [LIB] found!")\
}\
}\
+10
View File
@@ -1,9 +1,12 @@
//wrapper macros for easier grepping
#define DIRECT_OUTPUT(A, B) A << B
#define DIRECT_INPUT(A, B) A >> B
#define SEND_IMAGE(target, image) DIRECT_OUTPUT(target, image)
#define SEND_SOUND(target, sound) DIRECT_OUTPUT(target, sound)
#define SEND_TEXT(target, text) DIRECT_OUTPUT(target, text)
#define WRITE_FILE(file, text) DIRECT_OUTPUT(file, text)
#define READ_FILE(file, text) DIRECT_INPUT(file, text)
#ifdef EXTOOLS_LOGGING
// proc hooked, so we can just put in standard TRUE and FALSE
#define WRITE_LOG(log, text) extools_log_write(log,text,TRUE)
@@ -13,6 +16,7 @@
#define WRITE_LOG(log, text) rustg_log_write(log, text, "true")
#define WRITE_LOG_NO_FORMAT(log, text) rustg_log_write(log, text, "false")
#endif
//print a warning message to world.log
#define WARNING(MSG) warning("[MSG] in [__FILE__] at line [__LINE__] src: [UNLINT(src)] usr: [usr].")
/proc/warning(msg)
@@ -38,6 +42,12 @@
SEND_TEXT(world.log, text)
#endif
#ifdef REFERENCE_TRACKING_LOG
#define log_reftracker(msg) log_world("## REF SEARCH [msg]")
#else
#define log_reftracker(msg)
#endif
/* Items with ADMINPRIVATE prefixed are stripped from public logs. */
/proc/log_admin(text)
+1 -1
View File
@@ -395,7 +395,7 @@
/proc/ScreenText(obj/O, maptext="", screen_loc="CENTER-7,CENTER-7", maptext_height=480, maptext_width=480)
if(!isobj(O))
O = new /obj/screen/text()
O = new /atom/movable/screen/text()
O.maptext = maptext
O.maptext_height = maptext_height
O.maptext_width = maptext_width
+6
View File
@@ -78,6 +78,12 @@
var/datum/emote/E = new path()
E.emote_list[E.key] = E
// Hair Gradients - Initialise all /datum/sprite_accessory/hair_gradient into an list indexed by gradient-style name
for(var/path in subtypesof(/datum/sprite_accessory/hair_gradient))
var/datum/sprite_accessory/hair_gradient/H = new path()
GLOB.hair_gradients_list[H.name] = H
// Keybindings
init_keybindings()
//Uplink Items
+5
View File
@@ -0,0 +1,5 @@
/// Produces a mutable appearance glued to the [EMISSIVE_PLANE] dyed to be the [EMISSIVE_COLOR].
/proc/emissive_appearance(icon, icon_state = "", layer = FLOAT_LAYER, alpha = 255, appearance_flags = NONE)
var/mutable_appearance/appearance = mutable_appearance(icon, icon_state, layer, EMISSIVE_PLANE, alpha, appearance_flags)
appearance.color = GLOB.emissive_color
return appearance
+61
View File
@@ -0,0 +1,61 @@
#define MAXIMUM_MARKOV_LENGTH 25000
/proc/markov_chain(var/text, var/order = 4, var/length = 250)
if(!text || order < 0 || order > 20 || length < 1 || length > MAXIMUM_MARKOV_LENGTH)
return
var/table = markov_table(text, order)
var/markov = markov_text(length, table, order)
return markov
/proc/markov_table(var/text, var/look_forward = 4)
if(!text)
return
var/list/table = list()
for(var/i = 1, i <= length(text), i++)
var/char = copytext(text, i, look_forward+i)
if(!table[char])
table[char] = list()
for(var/i = 1, i <= (length(text) - look_forward), i++)
var/char_index = copytext(text, i, look_forward+i)
var/char_count = copytext(text, i+look_forward, (look_forward*2)+i)
if(table[char_index][char_count])
table[char_index][char_count]++
else
table[char_index][char_count] = 1
return table
/proc/markov_text(var/length = 250, var/table, var/look_forward = 4)
if(!table)
return
var/char = pick(table)
var/o = char
for(var/i = 0, i <= (length / look_forward), i++)
var/newchar = markov_weighted_char(table[char])
if(newchar)
char = newchar
o += "[newchar]"
else
char = pick(table)
return o
/proc/markov_weighted_char(var/list/array)
if(!array || !array.len)
return
var/total = 0
for(var/i in array)
total += array[i]
var/r = rand(1, total)
for(var/i in array)
var/weight = array[i]
if(r <= weight)
return i
r -= weight
+13 -13
View File
@@ -218,20 +218,14 @@
to_chat(world, "<BR><BR><BR><span class='big bold'>The round has ended.</span>")
log_game("The round has ended.")
if(LAZYLEN(GLOB.round_end_notifiees))
world.TgsTargetedChatBroadcast("[GLOB.round_end_notifiees.Join(", ")] the round has ended.", FALSE)
CONFIG_SET(flag/suicide_allowed,TRUE) // EORG suicides allowed
for(var/I in round_end_events)
var/datum/callback/cb = I
cb.InvokeAsync()
LAZYCLEARLIST(round_end_events)
for(var/client/C in GLOB.clients)
if(!C.credits)
C.RollCredits()
C.playtitlemusic(40)
CONFIG_SET(flag/suicide_allowed,TRUE) // EORG suicides allowed
var/speed_round = FALSE
if(world.time - SSticker.round_start_time <= 300 SECONDS)
speed_round = TRUE
@@ -264,12 +258,15 @@
send2adminchat("Server", "A round of [mode.name] just ended[mode_result == "undefined" ? "." : " with a [mode_result]."] Survival rate: [survival_rate]")
if(LAZYLEN(GLOB.round_end_notifiees))
world.TgsTargetedChatBroadcast("[GLOB.round_end_notifiees.Join(", ")] the round has ended.", FALSE)
if(length(CONFIG_GET(keyed_list/cross_server)))
send_news_report()
//tell the nice people on discord what went on before the salt cannon happens.
world.TgsTargetedChatBroadcast("The current round has ended. Please standby for your shift interlude Nanotrasen News Network's report!", FALSE)
world.TgsTargetedChatBroadcast(send_news_report(),FALSE)
world.TgsTargetedChatBroadcast(send_news_report(), FALSE)
CHECK_TICK
@@ -543,21 +540,24 @@
///Generate a report for how much money is on station, as well as the richest crewmember on the station.
/datum/controller/subsystem/ticker/proc/market_report()
var/list/parts = list()
parts += "<span class='header'>Station Economic Summary:</span>"
///This is the richest account on station at roundend.
var/datum/bank_account/mr_moneybags
///This is the station's total wealth at the end of the round.
var/station_vault = 0
///How many players joined the round.
var/total_players = GLOB.joined_player_list.len
var/list/typecache_bank = typecacheof(list(/datum/bank_account/department, /datum/bank_account/remote))
for(var/datum/bank_account/current_acc in SSeconomy.generated_accounts)
var/static/list/typecache_bank = typecacheof(list(/datum/bank_account/department, /datum/bank_account/remote))
for(var/i in SSeconomy.generated_accounts)
var/datum/bank_account/current_acc = SSeconomy.generated_accounts[i]
if(typecache_bank[current_acc.type])
continue
station_vault += current_acc.account_balance
if(!mr_moneybags || mr_moneybags.account_balance < current_acc.account_balance)
mr_moneybags = current_acc
parts += "<div class='panel stationborder'>There were [station_vault] credits collected by crew this shift.<br>"
parts += "<div class='panel stationborder'><span class='header'>Station Economic Summary:</span><br>"
parts += "<b>General Statistics:</b><br>"
parts += "There were [station_vault] credits collected by crew this shift.<br>"
if(total_players > 0)
parts += "An average of [station_vault/total_players] credits were collected.<br>"
// log_econ("Roundend credit total: [station_vault] credits. Average Credits: [station_vault/total_players]")
+1
View File
@@ -163,6 +163,7 @@ Turf and target are separate in case you want to teleport some distance from a t
//Generalised helper proc for letting mobs rename themselves. Used to be clname() and ainame()
/mob/proc/apply_pref_name(role, client/C)
set waitfor = FALSE
if(!C)
C = client
var/oldname = real_name
+47 -23
View File
@@ -1,7 +1,7 @@
//#define TESTING //By using the testing("message") proc you can create debug-feedback for people with this
//#define TESTING //By using the testing("message") proc you can create debug-feedback for people with this
//uncommented, but not visible in the release version)
//#define DATUMVAR_DEBUGGING_MODE //Enables the ability to cache datum vars and retrieve later for debugging which vars changed.
//#define DATUMVAR_DEBUGGING_MODE //Enables the ability to cache datum vars and retrieve later for debugging which vars changed.
// Comment this out if you are debugging problems that might be obscured by custom error handling in world/Error
#ifdef DEBUG
@@ -11,34 +11,44 @@
#ifdef TESTING
#define DATUMVAR_DEBUGGING_MODE
/*
* Enables extools-powered reference tracking system, letting you see what is referencing objects that refuse to hard delete.
*
* * Requires TESTING to be defined to work.
*/
///Used to find the sources of harddels, quite laggy, don't be surpised if it freezes your client for a good while
//#define REFERENCE_TRACKING
#ifdef REFERENCE_TRACKING
///Method of tracking references without using extools. Slower, kept to avoid over-reliance on extools.
//#define LEGACY_REFERENCE_TRACKING
#ifdef LEGACY_REFERENCE_TRACKING
///alternate to reftracking, extool variant
//#define EXTOOLS_REFERENCE_TRACKING
///Use the legacy reference on things hard deleting by default.
///Should we be logging our findings or not
#define REFERENCE_TRACKING_LOG
///Used for doing dry runs of the reference finder, to test for feature completeness
//#define REFERENCE_TRACKING_DEBUG
///Run a lookup on things hard deleting by default.
//#define GC_FAILURE_HARD_LOOKUP
#ifdef GC_FAILURE_HARD_LOOKUP
#define FIND_REF_NO_CHECK_TICK
#endif //ifdef GC_FAILURE_HARD_LOOKUP
#endif //ifdef LEGACY_REFERENCE_TRACKING
#endif //ifdef REFERENCE_TRACKING
//#define VISUALIZE_ACTIVE_TURFS //Highlights atmos active turfs in green
/*
* Enables debug messages for every single reaction step. This is 1 message per 0.5s for a SINGLE reaction. Useful for tracking down bugs/asking me for help in the main reaction handiler (equilibrium.dm).
*
* * Requires TESTING to be defined to work.
*/
//#define REAGENTS_TESTING
// #define VISUALIZE_ACTIVE_TURFS //Highlights atmos active turfs in green
// #define TRACK_MAX_SHARE //Allows max share tracking, for use in the atmos debugging ui
#endif //ifdef TESTING
//#define UNIT_TESTS //Enables unit tests via TEST_RUN_PARAMETER
#ifndef PRELOAD_RSC //set to:
#define PRELOAD_RSC 2 // 0 to allow using external resources or on-demand behaviour;
#endif // 1 to use the default behaviour;
// 2 for preloading absolutely everything;
//#define UNIT_TESTS //If this is uncommented, we do a single run though of the game setup and tear down process with unit tests in between
#ifndef PRELOAD_RSC //set to:
#define PRELOAD_RSC 2 // 0 to allow using external resources or on-demand behaviour;
#endif // 1 to use the default behaviour;
// 2 for preloading absolutely everything;
#ifdef LOWMEMORYMODE
#define FORCE_MAP "_maps/runtimestation.json"
@@ -47,7 +57,7 @@
//Update this whenever you need to take advantage of more recent byond features
#define MIN_COMPILER_VERSION 513
#define MIN_COMPILER_BUILD 1514
#if DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD
#if (DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD) && !defined(SPACEMAN_DMM)
//Don't forget to update this part
#error Your version of BYOND is too out-of-date to compile this project. Go to https://secure.byond.com/download and update.
#error You need version 513.1514 or higher
@@ -58,10 +68,6 @@
#warn compiling in TESTING mode. testing() debug messages will be visible.
#endif
#ifdef GC_FAILURE_HARD_LOOKUP
#define FIND_REF_NO_CHECK_TICK
#endif
#ifdef CIBUILDING
#define UNIT_TESTS
#endif
@@ -70,6 +76,24 @@
#define TESTING
#endif
#if defined(UNIT_TESTS)
//Hard del testing defines
#define REFERENCE_TRACKING
#define REFERENCE_TRACKING_DEBUG
#define FIND_REF_NO_CHECK_TICK
#endif
#ifdef TGS
// TGS performs its own build of dm.exe, but includes a prepended TGS define.
#define CBT
#endif
// A reasonable number of maximum overlays an object needs
// If you think you need more, rethink it
#define MAX_ATOM_OVERLAYS 100
#if !defined(CBT) && !defined(SPACEMAN_DMM)
#warn Building with Dream Maker is no longer supported and will result in errors.
#warn In order to build, run BUILD.bat in the root directory.
#warn Consider switching to VSCode editor instead, where you can press Ctrl+Shift+B to build.
#endif
+1
View File
@@ -71,6 +71,7 @@ GLOBAL_LIST_INIT(bitfields, list(
"DROPDEL" = DROPDEL,
"NOBLUDGEON" = NOBLUDGEON,
"ABSTRACT" = ABSTRACT,
"IN_STORAGE" = IN_STORAGE,
"ITEM_CAN_BLOCK" = ITEM_CAN_BLOCK,
"ITEM_CAN_PARRY" = ITEM_CAN_PARRY
),
+2
View File
@@ -6,6 +6,7 @@ GLOBAL_LIST_EMPTY(hair_styles_female_list) //stores only hair names
GLOBAL_LIST_EMPTY(facial_hair_styles_list) //stores /datum/sprite_accessory/facial_hair indexed by name
GLOBAL_LIST_EMPTY(facial_hair_styles_male_list) //stores only hair names
GLOBAL_LIST_EMPTY(facial_hair_styles_female_list) //stores only hair names
GLOBAL_LIST_EMPTY(hair_gradients_list) //stores /datum/sprite_accessory/hair_gradient indexed by name
//Underwear
GLOBAL_LIST_EMPTY_TYPED(underwear_list, /datum/sprite_accessory/underwear/bottom) //stores bottoms indexed by name
GLOBAL_LIST_EMPTY(underwear_m) //stores only underwear name
@@ -367,6 +368,7 @@ GLOBAL_LIST_INIT(job_heirlooms, list(
"Janitor" = list(/obj/item/mop),
"Scientist" = list(/obj/item/toy/plush/slimeplushie),
"Assistant" = list(/obj/item/clothing/gloves/cut/family),
"Prisoner" = list (/obj/item/pen/blue),
"Chaplain" = list(/obj/item/camera/spooky/family),
"Head of Personnel" = list(/obj/item/pinpointer/ian)
))
@@ -112,7 +112,6 @@ GLOBAL_LIST_INIT(maintenance_loot, list(
/obj/item/storage/box/marshmallow = 2,
/obj/item/clothing/gloves/tackler/offbrand = 1,
/obj/item/stack/sticky_tape = 1,
/obj/effect/spawner/lootdrop/grille_or_trash = 15,
"" = 3
))
+1 -1
View File
@@ -25,7 +25,7 @@
if(multicam_on)
var/turf/T = get_turf(A)
if(T)
for(var/obj/screen/movable/pic_in_pic/ai/P in T.vis_locs)
for(var/atom/movable/screen/movable/pic_in_pic/ai/P in T.vis_locs)
if(P.ai == src)
P.Click(params)
break
+46 -4
View File
@@ -63,6 +63,8 @@
return ShiftClickOn(A)
if(modifiers["alt"]) // alt and alt-gr (rightalt)
return AltClickOn(A)
if(modifiers["ctrl"] && modifiers["right"]) //CIT CHANGE - right click ctrl for a new form of dropping items
return CtrlRightClickOn(A, params) //CIT CHANGE
if(modifiers["ctrl"])
return CtrlClickOn(A)
@@ -295,6 +297,46 @@
if(!(flags & COMPONENT_DENY_EXAMINATE) && user.client && (user.client.eye == user || user.client.eye == user.loc || flags & COMPONENT_ALLOW_EXAMINATE))
user.examinate(src)
/*
Ctrl + Right click
Combat mode feature
Drop item in hand at position.
*/
/atom/proc/CtrlRightClickOn(atom/A, params)
if(isliving(src) && Adjacent(A)) //honestly only humans can do this given it's combat mode but if it's implemented for any other mobs...
var/mob/living/L = src
if(L.incapacitated())
return
var/obj/item/I = L.get_active_held_item()
var/turf/T = get_turf(A)
if(T)
if(I) //drop item at cursor.
if(T.density) //no, you can't use your funny blue cube or red cube to clip into the fucking wall.
return
for(var/atom/C in T.contents) //nor can you clip into a window or a door/false wall that's not open.
if(C.opacity || (((C.flags_1 & PREVENT_CLICK_UNDER_1) > 0) != (istype(C,/obj/machinery/door) && !C.density))) //XOR operation within because doors always have PREVENT_CLICK_UNDER_1 flag enabled. Dumb, I know.
return
if(L.transferItemToLoc(I, T))
var/list/click_params = params2list(params)
//Center the icon where the user clicked. (shamelessly stole code from tables)
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
return
//Clamp it so that the icon never moves more than 16 pixels in either direction
I.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
return TRUE
else if(isitem(A) && L.has_active_hand()) //if they have an open hand they'll rotate the item instead.
var/obj/item/I2 = A
if(!I2.anchored)
var/matrix/ntransform = matrix(I2.transform)
ntransform.Turn(15)
animate(I2, transform = ntransform, time = 2)
return TRUE
else
A.CtrlClick(src)
/*
Ctrl click
For most objects, pull
@@ -429,14 +471,14 @@
setDir(WEST, ismousemovement)
//debug
/obj/screen/proc/scale_to(x1,y1)
/atom/movable/screen/proc/scale_to(x1,y1)
if(!y1)
y1 = x1
var/matrix/M = new
M.Scale(x1,y1)
transform = M
/obj/screen/click_catcher
/atom/movable/screen/click_catcher
icon = 'icons/mob/screen_gen.dmi'
icon_state = "catcher"
plane = CLICKCATCHER_PLANE
@@ -446,7 +488,7 @@
#define MAX_SAFE_BYOND_ICON_SCALE_TILES (MAX_SAFE_BYOND_ICON_SCALE_PX / world.icon_size)
#define MAX_SAFE_BYOND_ICON_SCALE_PX (33 * 32) //Not using world.icon_size on purpose.
/obj/screen/click_catcher/proc/UpdateGreed(view_size_x = 15, view_size_y = 15)
/atom/movable/screen/click_catcher/proc/UpdateGreed(view_size_x = 15, view_size_y = 15)
var/icon/newicon = icon('icons/mob/screen_gen.dmi', "catcher")
var/ox = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_x)
var/oy = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_y)
@@ -461,7 +503,7 @@
M.Scale(px/sx, py/sy)
transform = M
/obj/screen/click_catcher/Click(location, control, params)
/atom/movable/screen/click_catcher/Click(location, control, params)
var/list/modifiers = params2list(params)
if(modifiers["middle"] && iscarbon(usr))
var/mob/living/carbon/C = usr
+1 -1
View File
@@ -43,7 +43,7 @@
INVOKE_ASYNC(aicamera, /obj/item/camera.proc/captureimage, A, usr)
return
var/obj/item/W = get_active_held_item()
var/obj/item/W = get_active_held_item(TRUE)
if(!W && A.Adjacent(src) && (isobj(A) || ismob(A)))
var/atom/movable/C = A
+2 -2
View File
@@ -80,10 +80,10 @@
/atom/proc/IsAutoclickable()
. = 1
/obj/screen/IsAutoclickable()
/atom/movable/screen/IsAutoclickable()
. = 0
/obj/screen/click_catcher/IsAutoclickable()
/atom/movable/screen/click_catcher/IsAutoclickable()
. = 1
//Please don't roast me too hard
+18 -18
View File
@@ -1,6 +1,6 @@
#define ACTION_BUTTON_DEFAULT_BACKGROUND "default"
/obj/screen/movable/action_button
/atom/movable/screen/movable/action_button
var/datum/action/linked_action
var/actiontooltipstyle = ""
screen_loc = null
@@ -11,7 +11,7 @@
var/id
var/ordered = TRUE //If the button gets placed into the default bar
/obj/screen/movable/action_button/proc/can_use(mob/user)
/atom/movable/screen/movable/action_button/proc/can_use(mob/user)
if (linked_action)
return linked_action.owner == user
else if (isobserver(user))
@@ -20,14 +20,14 @@
else
return TRUE
/obj/screen/movable/action_button/MouseDrop(over_object)
/atom/movable/screen/movable/action_button/MouseDrop(over_object)
if(!can_use(usr))
return
if((istype(over_object, /obj/screen/movable/action_button) && !istype(over_object, /obj/screen/movable/action_button/hide_toggle)))
if((istype(over_object, /atom/movable/screen/movable/action_button) && !istype(over_object, /atom/movable/screen/movable/action_button/hide_toggle)))
if(locked)
to_chat(usr, "<span class='warning'>Action button \"[name]\" is locked, unlock it first.</span>")
return
var/obj/screen/movable/action_button/B = over_object
var/atom/movable/screen/movable/action_button/B = over_object
var/list/actions = usr.actions
actions.Swap(actions.Find(src.linked_action), actions.Find(B.linked_action))
moved = FALSE
@@ -38,7 +38,7 @@
else
return ..()
/obj/screen/movable/action_button/Click(location,control,params)
/atom/movable/screen/movable/action_button/Click(location,control,params)
if (!can_use(usr))
return
@@ -60,7 +60,7 @@
return TRUE
//Hide/Show Action Buttons ... Button
/obj/screen/movable/action_button/hide_toggle
/atom/movable/screen/movable/action_button/hide_toggle
name = "Hide Buttons"
desc = "Shift-click any button to reset its position, and Control-click it to lock it in place. Alt-click this button to reset all buttons to their default positions."
icon = 'icons/mob/actions.dmi'
@@ -72,7 +72,7 @@
var/mutable_appearance/hide_appearance
var/mutable_appearance/show_appearance
/obj/screen/movable/action_button/hide_toggle/Initialize()
/atom/movable/screen/movable/action_button/hide_toggle/Initialize()
. = ..()
var/static/list/icon_cache = list()
@@ -86,7 +86,7 @@
if(!show_appearance)
show_appearance = icon_cache[cache_key] = mutable_appearance(hide_icon, show_state)
/obj/screen/movable/action_button/hide_toggle/Click(location,control,params)
/atom/movable/screen/movable/action_button/hide_toggle/Click(location,control,params)
if (!can_use(usr))
return
@@ -107,7 +107,7 @@
if(modifiers["alt"])
for(var/V in usr.actions)
var/datum/action/A = V
var/obj/screen/movable/action_button/B = A.button
var/atom/movable/screen/movable/action_button/B = A.button
B.moved = FALSE
if(B.id && usr.client)
usr.client.prefs.action_buttons_screen_locs["[B.name]_[B.id]"] = null
@@ -129,10 +129,10 @@
update_icon()
usr.update_action_buttons()
/obj/screen/movable/action_button/hide_toggle/AltClick(mob/user)
/atom/movable/screen/movable/action_button/hide_toggle/AltClick(mob/user)
for(var/V in user.actions)
var/datum/action/A = V
var/obj/screen/movable/action_button/B = A.button
var/atom/movable/screen/movable/action_button/B = A.button
B.moved = FALSE
if(moved)
moved = FALSE
@@ -141,7 +141,7 @@
return TRUE
/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(datum/hud/owner_hud)
/atom/movable/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(datum/hud/owner_hud)
var/settings = owner_hud.get_action_buttons_icons()
icon = settings["bg_icon"]
icon_state = settings["bg_state"]
@@ -150,7 +150,7 @@
show_state = settings["toggle_show"]
update_icon()
/obj/screen/movable/action_button/hide_toggle/update_overlays()
/atom/movable/screen/movable/action_button/hide_toggle/update_overlays()
. = ..()
if(hidden)
. += show_appearance
@@ -158,12 +158,12 @@
. += hide_appearance
/obj/screen/movable/action_button/MouseEntered(location,control,params)
/atom/movable/screen/movable/action_button/MouseEntered(location,control,params)
if(!QDELETED(src))
openToolTip(usr,src,params,title = name,content = desc,theme = actiontooltipstyle)
/obj/screen/movable/action_button/MouseExited()
/atom/movable/screen/movable/action_button/MouseExited()
closeToolTip(usr)
/datum/hud/proc/get_action_buttons_icons()
@@ -203,7 +203,7 @@
else
for(var/datum/action/A in actions)
A.UpdateButtonIcon()
var/obj/screen/movable/action_button/B = A.button
var/atom/movable/screen/movable/action_button/B = A.button
if(B.ordered)
button_number++
if(B.moved)
@@ -235,7 +235,7 @@
return "WEST[coord_col]:[coord_col_offset],NORTH[coord_row]:-6"
/datum/hud/proc/SetButtonCoords(obj/screen/button,number, supportedcolumns)
/datum/hud/proc/SetButtonCoords(atom/movable/screen/button,number, supportedcolumns)
var/row = round((number-1)/supportedcolumns)
var/col = ((number - 1)%(supportedcolumns)) + 1
var/x_offset = 32*(col-1) + 4 + 2*col
+55 -55
View File
@@ -1,136 +1,136 @@
/obj/screen/ai
/atom/movable/screen/ai
icon = 'icons/mob/screen_ai.dmi'
/obj/screen/ai/Click()
/atom/movable/screen/ai/Click()
if(isobserver(usr) || usr.incapacitated())
return TRUE
/obj/screen/ai/aicore
/atom/movable/screen/ai/aicore
name = "AI core"
icon_state = "ai_core"
/obj/screen/ai/aicore/Click()
/atom/movable/screen/ai/aicore/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.view_core()
/obj/screen/ai/camera_list
/atom/movable/screen/ai/camera_list
name = "Show Camera List"
icon_state = "camera"
/obj/screen/ai/camera_list/Click()
/atom/movable/screen/ai/camera_list/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.show_camera_list()
/obj/screen/ai/camera_track
/atom/movable/screen/ai/camera_track
name = "Track With Camera"
icon_state = "track"
/obj/screen/ai/camera_track/Click()
/atom/movable/screen/ai/camera_track/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
var/target_name = input(AI, "Choose who you want to track", "Tracking") as null|anything in AI.trackable_mobs()
AI.ai_camera_track(target_name)
/obj/screen/ai/camera_light
/atom/movable/screen/ai/camera_light
name = "Toggle Camera Light"
icon_state = "camera_light"
/obj/screen/ai/camera_light/Click()
/atom/movable/screen/ai/camera_light/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.toggle_camera_light()
/obj/screen/ai/crew_monitor
/atom/movable/screen/ai/crew_monitor
name = "Crew Monitoring Console"
icon_state = "crew_monitor"
/obj/screen/ai/crew_monitor/Click()
/atom/movable/screen/ai/crew_monitor/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
GLOB.crewmonitor.show(AI,AI)
/obj/screen/ai/crew_manifest
/atom/movable/screen/ai/crew_manifest
name = "Crew Manifest"
icon_state = "manifest"
/obj/screen/ai/crew_manifest/Click()
/atom/movable/screen/ai/crew_manifest/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.ai_roster()
/obj/screen/ai/alerts
/atom/movable/screen/ai/alerts
name = "Show Alerts"
icon_state = "alerts"
/obj/screen/ai/alerts/Click()
/atom/movable/screen/ai/alerts/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.ai_alerts()
/obj/screen/ai/announcement
/atom/movable/screen/ai/announcement
name = "Make Vox Announcement"
icon_state = "announcement"
/obj/screen/ai/announcement/Click()
/atom/movable/screen/ai/announcement/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.announcement()
/obj/screen/ai/call_shuttle
/atom/movable/screen/ai/call_shuttle
name = "Call Emergency Shuttle"
icon_state = "call_shuttle"
/obj/screen/ai/call_shuttle/Click()
/atom/movable/screen/ai/call_shuttle/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.ai_call_shuttle()
/obj/screen/ai/state_laws
/atom/movable/screen/ai/state_laws
name = "State Laws"
icon_state = "state_laws"
/obj/screen/ai/state_laws/Click()
/atom/movable/screen/ai/state_laws/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.checklaws()
/obj/screen/ai/pda_msg_send
/atom/movable/screen/ai/pda_msg_send
name = "PDA - Send Message"
icon_state = "pda_send"
/obj/screen/ai/pda_msg_send/Click()
/atom/movable/screen/ai/pda_msg_send/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.cmd_send_pdamesg(usr)
/obj/screen/ai/pda_msg_show
/atom/movable/screen/ai/pda_msg_show
name = "PDA - Show Message Log"
icon_state = "pda_receive"
/obj/screen/ai/pda_msg_show/Click()
/atom/movable/screen/ai/pda_msg_show/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.cmd_show_message_log(usr)
/obj/screen/ai/image_take
/atom/movable/screen/ai/image_take
name = "Take Image"
icon_state = "take_picture"
/obj/screen/ai/image_take/Click()
/atom/movable/screen/ai/image_take/Click()
if(..())
return
if(isAI(usr))
@@ -140,11 +140,11 @@
var/mob/living/silicon/robot/R = usr
R.aicamera.toggle_camera_mode(usr)
/obj/screen/ai/image_view
/atom/movable/screen/ai/image_view
name = "View Images"
icon_state = "view_images"
/obj/screen/ai/image_view/Click()
/atom/movable/screen/ai/image_view/Click()
if(..())
return
if(isAI(usr))
@@ -154,31 +154,31 @@
var/mob/living/silicon/robot/R = usr
R.aicamera.viewpictures(usr)
/obj/screen/ai/sensors
/atom/movable/screen/ai/sensors
name = "Sensor Augmentation"
icon_state = "ai_sensor"
/obj/screen/ai/sensors/Click()
/atom/movable/screen/ai/sensors/Click()
if(..())
return
var/mob/living/silicon/S = usr
S.toggle_sensors()
/obj/screen/ai/multicam
/atom/movable/screen/ai/multicam
name = "Multicamera Mode"
icon_state = "multicam"
/obj/screen/ai/multicam/Click()
/atom/movable/screen/ai/multicam/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
AI.toggle_multicam()
/obj/screen/ai/add_multicam
/atom/movable/screen/ai/add_multicam
name = "New Camera"
icon_state = "new_cam"
/obj/screen/ai/add_multicam/Click()
/atom/movable/screen/ai/add_multicam/Click()
if(..())
return
var/mob/living/silicon/ai/AI = usr
@@ -190,112 +190,112 @@
/datum/hud/ai/New(mob/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
// Language menu
using = new /obj/screen/language_menu
using = new /atom/movable/screen/language_menu
using.screen_loc = ui_borg_language_menu
using.hud = src
static_inventory += using
//AI core
using = new /obj/screen/ai/aicore()
using = new /atom/movable/screen/ai/aicore()
using.screen_loc = ui_ai_core
using.hud = src
static_inventory += using
//Camera list
using = new /obj/screen/ai/camera_list()
using = new /atom/movable/screen/ai/camera_list()
using.screen_loc = ui_ai_camera_list
using.hud = src
static_inventory += using
//Track
using = new /obj/screen/ai/camera_track()
using = new /atom/movable/screen/ai/camera_track()
using.screen_loc = ui_ai_track_with_camera
using.hud = src
static_inventory += using
//Camera light
using = new /obj/screen/ai/camera_light()
using = new /atom/movable/screen/ai/camera_light()
using.screen_loc = ui_ai_camera_light
using.hud = src
static_inventory += using
//Crew Monitoring
using = new /obj/screen/ai/crew_monitor()
using = new /atom/movable/screen/ai/crew_monitor()
using.screen_loc = ui_ai_crew_monitor
using.hud = src
static_inventory += using
//Crew Manifest
using = new /obj/screen/ai/crew_manifest()
using = new /atom/movable/screen/ai/crew_manifest()
using.screen_loc = ui_ai_crew_manifest
using.hud = src
static_inventory += using
//Alerts
using = new /obj/screen/ai/alerts()
using = new /atom/movable/screen/ai/alerts()
using.screen_loc = ui_ai_alerts
using.hud = src
static_inventory += using
//Announcement
using = new /obj/screen/ai/announcement()
using = new /atom/movable/screen/ai/announcement()
using.screen_loc = ui_ai_announcement
using.hud = src
static_inventory += using
//Shuttle
using = new /obj/screen/ai/call_shuttle()
using = new /atom/movable/screen/ai/call_shuttle()
using.screen_loc = ui_ai_shuttle
using.hud = src
static_inventory += using
//Laws
using = new /obj/screen/ai/state_laws()
using = new /atom/movable/screen/ai/state_laws()
using.screen_loc = ui_ai_state_laws
using.hud = src
static_inventory += using
//PDA message
using = new /obj/screen/ai/pda_msg_send()
using = new /atom/movable/screen/ai/pda_msg_send()
using.screen_loc = ui_ai_pda_send
using.hud = src
static_inventory += using
//PDA log
using = new /obj/screen/ai/pda_msg_show()
using = new /atom/movable/screen/ai/pda_msg_show()
using.screen_loc = ui_ai_pda_log
using.hud = src
static_inventory += using
//Take image
using = new /obj/screen/ai/image_take()
using = new /atom/movable/screen/ai/image_take()
using.screen_loc = ui_ai_take_picture
using.hud = src
static_inventory += using
//View images
using = new /obj/screen/ai/image_view()
using = new /atom/movable/screen/ai/image_view()
using.screen_loc = ui_ai_view_images
using.hud = src
static_inventory += using
//Medical/Security sensors
using = new /obj/screen/ai/sensors()
using = new /atom/movable/screen/ai/sensors()
using.screen_loc = ui_ai_sensor
using.hud = src
static_inventory += using
//Multicamera mode
using = new /obj/screen/ai/multicam()
using = new /atom/movable/screen/ai/multicam()
using.screen_loc = ui_ai_multicam
using.hud = src
static_inventory += using
//Add multicamera camera
using = new /obj/screen/ai/add_multicam()
using = new /atom/movable/screen/ai/add_multicam()
using.screen_loc = ui_ai_add_multicam
using.hud = src
static_inventory += using
+87 -87
View File
@@ -18,7 +18,7 @@
if(!category || QDELETED(src))
return
var/obj/screen/alert/thealert
var/atom/movable/screen/alert/thealert
if(alerts[category])
thealert = alerts[category]
if(thealert.override_alerts)
@@ -69,13 +69,13 @@
thealert.timeout = world.time + thealert.timeout - world.tick_lag
return thealert
/mob/proc/alert_timeout(obj/screen/alert/alert, category)
/mob/proc/alert_timeout(atom/movable/screen/alert/alert, category)
if(alert.timeout && alerts[category] == alert && world.time >= alert.timeout)
clear_alert(category)
// Proc to clear an existing alert.
/mob/proc/clear_alert(category, clear_override = FALSE)
var/obj/screen/alert/alert = alerts[category]
var/atom/movable/screen/alert/alert = alerts[category]
if(!alert)
return 0
if(alert.override_alerts && !clear_override)
@@ -87,7 +87,7 @@
client.screen -= alert
qdel(alert)
/obj/screen/alert
/atom/movable/screen/alert
icon = 'icons/mob/screen_alert.dmi'
icon_state = "default"
name = "Alert"
@@ -100,72 +100,72 @@
var/mob/mob_viewer //the mob viewing this alert
/obj/screen/alert/MouseEntered(location,control,params)
/atom/movable/screen/alert/MouseEntered(location,control,params)
if(!QDELETED(src))
openToolTip(usr,src,params,title = name,content = desc,theme = alerttooltipstyle)
/obj/screen/alert/MouseExited()
/atom/movable/screen/alert/MouseExited()
closeToolTip(usr)
//Gas alerts
/obj/screen/alert/not_enough_oxy
/atom/movable/screen/alert/not_enough_oxy
name = "Choking (No O2)"
desc = "You're not getting enough oxygen. Find some good air before you pass out! The box in your backpack has an oxygen tank and breath mask in it."
icon_state = "not_enough_oxy"
/obj/screen/alert/too_much_oxy
/atom/movable/screen/alert/too_much_oxy
name = "Choking (O2)"
desc = "There's too much oxygen in the air, and you're breathing it in! Find some good air before you pass out!"
icon_state = "too_much_oxy"
/obj/screen/alert/not_enough_nitro
/atom/movable/screen/alert/not_enough_nitro
name = "Choking (No N2)"
desc = "You're not getting enough nitrogen. Find some good air before you pass out!"
icon_state = "not_enough_nitro"
/obj/screen/alert/too_much_nitro
/atom/movable/screen/alert/too_much_nitro
name = "Choking (N2)"
desc = "There's too much nitrogen in the air, and you're breathing it in! Find some good air before you pass out!"
icon_state = "too_much_nitro"
/obj/screen/alert/not_enough_co2
/atom/movable/screen/alert/not_enough_co2
name = "Choking (No CO2)"
desc = "You're not getting enough carbon dioxide. Find some good air before you pass out!"
icon_state = "not_enough_co2"
/obj/screen/alert/too_much_co2
/atom/movable/screen/alert/too_much_co2
name = "Choking (CO2)"
desc = "There's too much carbon dioxide in the air, and you're breathing it in! Find some good air before you pass out!"
icon_state = "too_much_co2"
/obj/screen/alert/not_enough_tox
/atom/movable/screen/alert/not_enough_tox
name = "Choking (No Plasma)"
desc = "You're not getting enough plasma. Find some good air before you pass out!"
icon_state = "not_enough_tox"
/obj/screen/alert/too_much_tox
/atom/movable/screen/alert/too_much_tox
name = "Choking (Plasma)"
desc = "There's highly flammable, toxic plasma in the air and you're breathing it in. Find some fresh air. The box in your backpack has an oxygen tank and gas mask in it."
icon_state = "too_much_tox"
/obj/screen/alert/not_enough_ch4
/atom/movable/screen/alert/not_enough_ch4
name = "Choking (No CH4)"
desc = "You're not getting enough methane. Find some good air before you pass out!"
icon_state = "not_enough_ch4"
/obj/screen/alert/too_much_ch4
/atom/movable/screen/alert/too_much_ch4
name = "Choking (CH4)"
desc = "There's too much methane in the air, and you're breathing it in! Find some good air before you pass out!"
icon_state = "too_much_ch4"
/obj/screen/alert/not_enough_ch3br
/atom/movable/screen/alert/not_enough_ch3br
name = "Choking (No CH3Br)"
desc = "You're not getting enough methyl bromide. Find some good air before you pass out!"
icon_state = "not_enough_tox"
/obj/screen/alert/too_much_ch3br
/atom/movable/screen/alert/too_much_ch3br
name = "Choking (CH3Br)"
desc = "There's highly toxic methyl bromide in the air and you're breathing it in. Find some fresh air. The box in your backpack has an oxygen tank and gas mask in it."
icon_state = "too_much_tox"
@@ -173,109 +173,109 @@
//End gas alerts
/obj/screen/alert/fat
/atom/movable/screen/alert/fat
name = "Fat"
desc = "You ate too much food, lardass. Run around the station and lose some weight."
icon_state = "fat"
/obj/screen/alert/hungry
/atom/movable/screen/alert/hungry
name = "Hungry"
desc = "Some food would be good right about now."
icon_state = "hungry"
/obj/screen/alert/starving
/atom/movable/screen/alert/starving
name = "Starving"
desc = "You're severely malnourished. The hunger pains make moving around a chore."
icon_state = "starving"
/obj/screen/alert/gross
/atom/movable/screen/alert/gross
name = "Grossed out."
desc = "That was kind of gross..."
icon_state = "gross"
/obj/screen/alert/verygross
/atom/movable/screen/alert/verygross
name = "Very grossed out."
desc = "You're not feeling very well..."
icon_state = "gross2"
/obj/screen/alert/disgusted
/atom/movable/screen/alert/disgusted
name = "DISGUSTED"
desc = "ABSOLUTELY DISGUSTIN'"
icon_state = "gross3"
/obj/screen/alert/hot
/atom/movable/screen/alert/hot
name = "Too Hot"
desc = "The air around you is pretty toasty! Consider putting on some insulating clothing, or moving to a cooler area."
icon_state = "hot"
/obj/screen/alert/cold
/atom/movable/screen/alert/cold
name = "Too Cold"
desc = "The air around you is pretty cold! Consider wearing a coat, or moving to a warmer area."
icon_state = "cold"
/obj/screen/alert/sweat
/atom/movable/screen/alert/sweat
name = "Sweating"
desc = "You're sweating! Get somewhere cooler and take off any insulating clothing like a fire suit."
icon_state = "sweat"
/obj/screen/alert/shiver
/atom/movable/screen/alert/shiver
name = "Shivering"
desc = "You're shivering! Get somewhere warmer and take off any insulating clothing like a space suit."
/obj/screen/alert/lowpressure
/atom/movable/screen/alert/lowpressure
name = "Low Pressure"
desc = "The air around you is hazardously thin. A space suit would protect you."
icon_state = "lowpressure"
/obj/screen/alert/highpressure
/atom/movable/screen/alert/highpressure
name = "High Pressure"
desc = "The air around you is hazardously thick. A fire suit would protect you."
icon_state = "highpressure"
/obj/screen/alert/blind
/atom/movable/screen/alert/blind
name = "Blind"
desc = "You can't see! This may be caused by a genetic defect, eye trauma, being unconscious, \
or something covering your eyes."
icon_state = "blind"
/obj/screen/alert/high
/atom/movable/screen/alert/high
name = "High"
desc = "Whoa man, you're tripping balls! Careful you don't get addicted... if you aren't already."
icon_state = "high"
/obj/screen/alert/mind_control
/atom/movable/screen/alert/mind_control
name = "Mind Control"
desc = "Your mind has been hijacked! Click to view the mind control command."
icon_state = "mind_control"
var/command
/obj/screen/alert/mind_control/Click()
/atom/movable/screen/alert/mind_control/Click()
var/mob/living/L = usr
to_chat(L, "<span class='mind_control'>[command]</span>")
/obj/screen/alert/hypnosis
/atom/movable/screen/alert/hypnosis
name = "Hypnosis"
desc = "Something's hypnotizing you, but you're not really sure about what."
icon_state = "hypnosis"
var/phrase
/obj/screen/alert/drunk //Not implemented
/atom/movable/screen/alert/drunk //Not implemented
name = "Drunk"
desc = "All that alcohol you've been drinking is impairing your speech, motor skills, and mental cognition. Make sure to act like it."
icon_state = "drunk"
/obj/screen/alert/embeddedobject
/atom/movable/screen/alert/embeddedobject
name = "Embedded Object"
desc = "Something got lodged into your flesh and is causing major bleeding. It might fall out with time, but surgery is the safest way. \
If you're feeling frisky, examine yourself and click the underlined item to pull the object out."
icon_state = "embeddedobject"
/obj/screen/alert/embeddedobject/Click()
/atom/movable/screen/alert/embeddedobject/Click()
if(isliving(usr))
var/mob/living/carbon/M = usr
return M.help_shake_act(M)
/obj/screen/alert/weightless
/atom/movable/screen/alert/weightless
name = "Weightless"
desc = "Gravity has ceased affecting you, and you're floating around aimlessly. You'll need something large and heavy, like a \
wall or lattice, to push yourself off if you want to move. A jetpack would enable free range of motion. A pair of \
@@ -283,22 +283,22 @@ magboots would let you walk around normally on the floor. Barring those, you can
or shoot a gun to move around via Newton's 3rd Law of Motion."
icon_state = "weightless"
/obj/screen/alert/highgravity
/atom/movable/screen/alert/highgravity
name = "High Gravity"
desc = "You're getting crushed by high gravity, picking up items and movement will be slowed."
icon_state = "paralysis"
/obj/screen/alert/veryhighgravity
/atom/movable/screen/alert/veryhighgravity
name = "Crushing Gravity"
desc = "You're getting crushed by high gravity, picking up items and movement will be slowed. You'll also accumulate brute damage!"
icon_state = "paralysis"
/obj/screen/alert/fire
/atom/movable/screen/alert/fire
name = "On Fire"
desc = "You're on fire. Stop, drop and roll to put the fire out or move to a vacuum area."
icon_state = "fire"
/obj/screen/alert/fire/Click()
/atom/movable/screen/alert/fire/Click()
var/mob/living/L = usr
if(!istype(L) || !L.can_resist())
return
@@ -306,7 +306,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
if(CHECK_MOBILITY(L, MOBILITY_MOVE))
return L.resist_fire() //I just want to start a flame in your hearrrrrrtttttt.
/obj/screen/alert/give // information set when the give alert is made
/atom/movable/screen/alert/give // information set when the give alert is made
icon_state = "default"
var/mob/living/carbon/giver
var/obj/item/receiving
@@ -321,7 +321,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
* * giver - The person giving the alert and item
* * receiving - The item being given by the giver
*/
/obj/screen/alert/give/proc/setup(mob/living/carbon/taker, mob/living/carbon/giver, obj/item/receiving)
/atom/movable/screen/alert/give/proc/setup(mob/living/carbon/taker, mob/living/carbon/giver, obj/item/receiving)
name = "[giver] is offering [receiving]"
desc = "[giver] is offering [receiving]. Click this alert to take it."
icon_state = "template"
@@ -331,31 +331,31 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
src.giver = giver
RegisterSignal(taker, COMSIG_MOVABLE_MOVED, .proc/removeAlert)
/obj/screen/alert/give/proc/removeAlert()
/atom/movable/screen/alert/give/proc/removeAlert()
to_chat(usr, "<span class='warning'>You moved out of range of [giver]!</span>")
usr.clear_alert("[giver]")
/obj/screen/alert/give/Click(location, control, params)
/atom/movable/screen/alert/give/Click(location, control, params)
. = ..()
var/mob/living/carbon/C = usr
C.take(giver, receiving)
//ALIENS
/obj/screen/alert/alien_tox
/atom/movable/screen/alert/alien_tox
name = "Plasma"
desc = "There's flammable plasma in the air. If it lights up, you'll be toast."
icon_state = "alien_tox"
alerttooltipstyle = "alien"
/obj/screen/alert/alien_fire
/atom/movable/screen/alert/alien_fire
// This alert is temporarily gonna be thrown for all hot air but one day it will be used for literally being on fire
name = "Too Hot"
desc = "It's too hot! Flee to space or at least away from the flames. Standing on weeds will heal you."
icon_state = "alien_fire"
alerttooltipstyle = "alien"
/obj/screen/alert/alien_vulnerable
/atom/movable/screen/alert/alien_vulnerable
name = "Severed Matriarchy"
desc = "Your queen has been killed, you will suffer movement penalties and loss of hivemind. A new queen cannot be made until you recover."
icon_state = "alien_noqueen"
@@ -363,7 +363,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
//BLOBS
/obj/screen/alert/nofactory
/atom/movable/screen/alert/nofactory
name = "No Factory"
desc = "You have no factory, and are slowly dying!"
icon_state = "blobbernaut_nofactory"
@@ -371,7 +371,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
// BLOODCULT
/obj/screen/alert/bloodsense
/atom/movable/screen/alert/bloodsense
name = "Blood Sense"
desc = "Allows you to sense blood that is manipulated by dark magicks."
icon_state = "cult_sense"
@@ -380,17 +380,17 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
var/angle = 0
var/mob/living/simple_animal/hostile/construct/Cviewer = null
/obj/screen/alert/bloodsense/Initialize()
/atom/movable/screen/alert/bloodsense/Initialize()
. = ..()
narnar = new('icons/mob/screen_alert.dmi', "mini_nar")
START_PROCESSING(SSprocessing, src)
/obj/screen/alert/bloodsense/Destroy()
/atom/movable/screen/alert/bloodsense/Destroy()
Cviewer = null
STOP_PROCESSING(SSprocessing, src)
return ..()
/obj/screen/alert/bloodsense/process()
/atom/movable/screen/alert/bloodsense/process()
var/atom/blood_target
if(!mob_viewer.mind)
@@ -480,15 +480,15 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
// CLOCKCULT
/obj/screen/alert/clockwork
/atom/movable/screen/alert/clockwork
alerttooltipstyle = "clockcult"
/obj/screen/alert/clockwork/infodump
/atom/movable/screen/alert/clockwork/infodump
name = "Global Records"
desc = "You shouldn't be seeing this description, because it should be dynamically generated."
icon_state = "clockinfo"
/obj/screen/alert/clockwork/infodump/MouseEntered(location,control,params)
/atom/movable/screen/alert/clockwork/infodump/MouseEntered(location,control,params)
if(GLOB.ratvar_awakens)
desc = "<font size=3><b>CHETR<br>NYY<br>HAGEHUGF-NAQ-UBABE<br>RATVAR.</b></font>"
else
@@ -520,19 +520,19 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
//GUARDIANS
/obj/screen/alert/cancharge
/atom/movable/screen/alert/cancharge
name = "Charge Ready"
desc = "You are ready to charge at a location!"
icon_state = "guardian_charge"
alerttooltipstyle = "parasite"
/obj/screen/alert/canstealth
/atom/movable/screen/alert/canstealth
name = "Stealth Ready"
desc = "You are ready to enter stealth!"
icon_state = "guardian_canstealth"
alerttooltipstyle = "parasite"
/obj/screen/alert/instealth
/atom/movable/screen/alert/instealth
name = "In Stealth"
desc = "You are in stealth and your next attack will do bonus damage!"
icon_state = "guardian_instealth"
@@ -540,52 +540,52 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
//SILICONS
/obj/screen/alert/nocell
/atom/movable/screen/alert/nocell
name = "Missing Power Cell"
desc = "Unit has no power cell. No modules available until a power cell is reinstalled. Robotics may provide assistance."
icon_state = "nocell"
/obj/screen/alert/emptycell
/atom/movable/screen/alert/emptycell
name = "Out of Power"
desc = "Unit's power cell has no charge remaining. No modules available until power cell is recharged. \
Recharging stations are available in robotics, the dormitory bathrooms, and the AI satellite."
icon_state = "emptycell"
/obj/screen/alert/lowcell
/atom/movable/screen/alert/lowcell
name = "Low Charge"
desc = "Unit's power cell is running low. Recharging stations are available in robotics, the dormitory bathrooms, and the AI satellite."
icon_state = "lowcell"
/obj/screen/alert/etherealcharge
/atom/movable/screen/alert/etherealcharge
name = "Low Blood Charge"
desc = "Your blood's electric charge is running low, find a source of charge for your blood. Use a recharging station found in robotics or the dormitory bathrooms, or eat some Ethereal-friendly food."
icon_state = "etherealcharge"
/obj/screen/alert/ethereal_overcharge
/atom/movable/screen/alert/ethereal_overcharge
name = "Blood Overcharge"
desc = "Your blood's electric charge is becoming dangerously high, find an outlet for your energy. Use Grab Intent on an APC to channel your energy into it."
icon_state = "ethereal_overcharge"
//Need to cover all use cases - emag, illegal upgrade module, malf AI hack, traitor cyborg
/obj/screen/alert/hacked
/atom/movable/screen/alert/hacked
name = "Hacked"
desc = "Hazardous non-standard equipment detected. Please ensure any usage of this equipment is in line with unit's laws, if any."
icon_state = "hacked"
/obj/screen/alert/locked
/atom/movable/screen/alert/locked
name = "Locked Down"
desc = "Unit has been remotely locked down. Usage of a Robotics Control Console like the one in the Research Director's \
office by your AI master or any qualified human may resolve this matter. Robotics may provide further assistance if necessary."
icon_state = "locked"
/obj/screen/alert/newlaw
/atom/movable/screen/alert/newlaw
name = "Law Update"
desc = "Laws have potentially been uploaded to or removed from this unit. Please be aware of any changes \
so as to remain in compliance with the most up-to-date laws."
icon_state = "newlaw"
timeout = 300
/obj/screen/alert/hackingapc
/atom/movable/screen/alert/hackingapc
name = "Hacking APC"
desc = "An Area Power Controller is being hacked. When the process is \
complete, you will have exclusive control of it, and you will gain \
@@ -594,7 +594,7 @@ so as to remain in compliance with the most up-to-date laws."
timeout = 600
var/atom/target = null
/obj/screen/alert/hackingapc/Click()
/atom/movable/screen/alert/hackingapc/Click()
if(!usr || !usr.client)
return
if(!target)
@@ -606,7 +606,7 @@ so as to remain in compliance with the most up-to-date laws."
//MECHS
/obj/screen/alert/low_mech_integrity
/atom/movable/screen/alert/low_mech_integrity
name = "Mech Damaged"
desc = "Mech integrity is low."
icon_state = "low_mech_integrity"
@@ -614,19 +614,19 @@ so as to remain in compliance with the most up-to-date laws."
//GHOSTS
//TODO: expand this system to replace the pollCandidates/CheckAntagonist/"choose quickly"/etc Yes/No messages
/obj/screen/alert/notify_cloning
/atom/movable/screen/alert/notify_cloning
name = "Revival"
desc = "Someone is trying to revive you. Re-enter your corpse if you want to be revived!"
icon_state = "template"
timeout = 300
/obj/screen/alert/notify_cloning/Click()
/atom/movable/screen/alert/notify_cloning/Click()
if(!usr || !usr.client)
return
var/mob/dead/observer/G = usr
G.reenter_corpse()
/obj/screen/alert/notify_action
/atom/movable/screen/alert/notify_action
name = "Body created"
desc = "A body was created. You can enter it."
icon_state = "template"
@@ -634,7 +634,7 @@ so as to remain in compliance with the most up-to-date laws."
var/atom/target = null
var/action = NOTIFY_JUMP
/obj/screen/alert/notify_action/Click()
/atom/movable/screen/alert/notify_action/Click()
if(!usr || !usr.client)
return
if(!target)
@@ -654,44 +654,44 @@ so as to remain in compliance with the most up-to-date laws."
//OBJECT-BASED
/obj/screen/alert/restrained/buckled
/atom/movable/screen/alert/restrained/buckled
name = "Buckled"
desc = "You've been buckled to something. Click the alert to unbuckle unless you're handcuffed."
icon_state = "buckled"
/obj/screen/alert/restrained/handcuffed
/atom/movable/screen/alert/restrained/handcuffed
name = "Handcuffed"
desc = "You're handcuffed and can't act. If anyone drags you, you won't be able to move. Click the alert to free yourself."
/obj/screen/alert/restrained/legcuffed
/atom/movable/screen/alert/restrained/legcuffed
name = "Legcuffed"
desc = "You're legcuffed, which slows you down considerably. Click the alert to free yourself."
/obj/screen/alert/restrained/Click()
/atom/movable/screen/alert/restrained/Click()
var/mob/living/L = usr
if(!istype(L) || !L.can_resist())
return
L.MarkResistTime()
return L.resist_restraints()
/obj/screen/alert/restrained/buckled/Click()
/atom/movable/screen/alert/restrained/buckled/Click()
var/mob/living/L = usr
if(!istype(L) || !L.can_resist())
return
L.MarkResistTime()
return L.resist_buckle()
/obj/screen/alert/shoes/untied
/atom/movable/screen/alert/shoes/untied
name = "Untied Shoes"
desc = "Your shoes are untied! Click the alert or your shoes to tie them."
icon_state = "shoealert"
/obj/screen/alert/shoes/knotted
/atom/movable/screen/alert/shoes/knotted
name = "Knotted Shoes"
desc = "Someone tied your shoelaces together! Click the alert or your shoes to undo the knot."
icon_state = "shoealert"
/obj/screen/alert/shoes/Click()
/atom/movable/screen/alert/shoes/Click()
var/mob/living/carbon/C = usr
if(!istype(C) || !C.can_resist() || C != mob_viewer || !C.shoes)
return
@@ -708,7 +708,7 @@ so as to remain in compliance with the most up-to-date laws."
mymob.client.screen -= alerts[alerts[i]]
return 1
for(var/i = 1, i <= alerts.len, i++)
var/obj/screen/alert/alert = alerts[alerts[i]]
var/atom/movable/screen/alert/alert = alerts[alerts[i]]
if(alert.icon_state == "template")
alert.icon = ui_style
switch(i)
@@ -728,7 +728,7 @@ so as to remain in compliance with the most up-to-date laws."
mymob.client.screen |= alert
return 1
/obj/screen/alert/Click(location, control, params)
/atom/movable/screen/alert/Click(location, control, params)
if(!usr || !usr.client)
return
var/paramslist = params2list(params)
@@ -738,7 +738,7 @@ so as to remain in compliance with the most up-to-date laws."
if(master)
return usr.client.Click(master, location, control, params)
/obj/screen/alert/Destroy()
/atom/movable/screen/alert/Destroy()
. = ..()
severity = 0
master = null
+20 -20
View File
@@ -1,23 +1,23 @@
/obj/screen/alien
/atom/movable/screen/alien
icon = 'icons/mob/screen_alien.dmi'
/obj/screen/alien/leap
/atom/movable/screen/alien/leap
name = "toggle leap"
icon_state = "leap_off"
/obj/screen/alien/leap/Click()
/atom/movable/screen/alien/leap/Click()
if(isalienhunter(usr))
var/mob/living/carbon/alien/humanoid/hunter/AH = usr
AH.toggle_leap()
/obj/screen/alien/plasma_display
/atom/movable/screen/alien/plasma_display
icon = 'icons/mob/screen_gen.dmi'
icon_state = "power_display2"
name = "plasma stored"
screen_loc = ui_alienplasmadisplay
/obj/screen/alien/alien_queen_finder
/atom/movable/screen/alien/alien_queen_finder
icon = 'icons/mob/screen_alien.dmi'
icon_state = "queen_finder"
name = "queen sense"
@@ -30,7 +30,7 @@
/datum/hud/alien/New(mob/living/carbon/alien/humanoid/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
//equippable shit
@@ -39,55 +39,55 @@
//begin buttons
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_1"
using.screen_loc = ui_swaphand_position(owner,1)
using.hud = src
static_inventory += using
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2)
using.hud = src
static_inventory += using
action_intent = new /obj/screen/act_intent/alien()
action_intent = new /atom/movable/screen/act_intent/alien()
action_intent.icon_state = mymob.a_intent
action_intent.hud = src
static_inventory += action_intent
if(isalienhunter(mymob))
var/mob/living/carbon/alien/humanoid/hunter/H = mymob
H.leap_icon = new /obj/screen/alien/leap()
H.leap_icon = new /atom/movable/screen/alien/leap()
H.leap_icon.screen_loc = ui_alien_storage_r
static_inventory += H.leap_icon
using = new/obj/screen/language_menu
using = new/atom/movable/screen/language_menu
using.screen_loc = ui_alien_language_menu
using.hud = src
static_inventory += using
using = new /obj/screen/drop()
using = new /atom/movable/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drop_throw
using.hud = src
static_inventory += using
using = new /obj/screen/resist()
using = new /atom/movable/screen/resist()
using.icon = ui_style
using.screen_loc = ui_pull_resist
using.hud = src
hotkeybuttons += using
throw_icon = new /obj/screen/throw_catch()
throw_icon = new /atom/movable/screen/throw_catch()
throw_icon.icon = ui_style
throw_icon.screen_loc = ui_drop_throw
throw_icon.hud = src
hotkeybuttons += throw_icon
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.hud = src
pull_icon.update_icon()
@@ -96,25 +96,25 @@
//begin indicators
healths = new /obj/screen/healths/alien()
healths = new /atom/movable/screen/healths/alien()
healths.hud = src
infodisplay += healths
alien_plasma_display = new /obj/screen/alien/plasma_display()
alien_plasma_display = new /atom/movable/screen/alien/plasma_display()
alien_plasma_display.hud = src
infodisplay += alien_plasma_display
if(!isalienqueen(mymob))
alien_queen_finder = new /obj/screen/alien/alien_queen_finder
alien_queen_finder = new /atom/movable/screen/alien/alien_queen_finder
alien_queen_finder.hud = src
infodisplay += alien_queen_finder
zone_select = new /obj/screen/zone_sel/alien()
zone_select = new /atom/movable/screen/zone_sel/alien()
zone_select.hud = src
zone_select.update_icon()
static_inventory += zone_select
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
inv.hud = src
inv_slots[inv.slot_id] = inv
+7 -7
View File
@@ -3,34 +3,34 @@
/datum/hud/larva/New(mob/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
action_intent = new /obj/screen/act_intent/alien()
action_intent = new /atom/movable/screen/act_intent/alien()
action_intent.icon_state = mymob.a_intent
action_intent.hud = src
static_inventory += action_intent
healths = new /obj/screen/healths/alien()
healths = new /atom/movable/screen/healths/alien()
healths.hud = src
infodisplay += healths
alien_queen_finder = new /obj/screen/alien/alien_queen_finder()
alien_queen_finder = new /atom/movable/screen/alien/alien_queen_finder()
alien_queen_finder.hud = src
infodisplay += alien_queen_finder
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = 'icons/mob/screen_alien.dmi'
pull_icon.hud = src
pull_icon.update_icon()
pull_icon.screen_loc = ui_pull_resist
hotkeybuttons += pull_icon
using = new/obj/screen/language_menu
using = new/atom/movable/screen/language_menu
using.screen_loc = ui_alien_language_menu
using.hud = src
static_inventory += using
zone_select = new /obj/screen/zone_sel/alien()
zone_select = new /atom/movable/screen/zone_sel/alien()
zone_select.hud = src
zone_select.update_icon()
static_inventory += zone_select
+35 -35
View File
@@ -1,39 +1,39 @@
/obj/screen/blob
/atom/movable/screen/blob
icon = 'icons/mob/blob.dmi'
/obj/screen/blob/MouseEntered(location,control,params)
/atom/movable/screen/blob/MouseEntered(location,control,params)
openToolTip(usr,src,params,title = name,content = desc, theme = "blob")
/obj/screen/blob/MouseExited()
/atom/movable/screen/blob/MouseExited()
closeToolTip(usr)
/obj/screen/blob/BlobHelp
/atom/movable/screen/blob/BlobHelp
icon_state = "ui_help"
name = "Blob Help"
desc = "Help on playing blob!"
/obj/screen/blob/BlobHelp/Click()
/atom/movable/screen/blob/BlobHelp/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.blob_help()
/obj/screen/blob/JumpToNode
/atom/movable/screen/blob/JumpToNode
icon_state = "ui_tonode"
name = "Jump to Node"
desc = "Moves your camera to a selected blob node."
/obj/screen/blob/JumpToNode/Click()
/atom/movable/screen/blob/JumpToNode/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.jump_to_node()
/obj/screen/blob/JumpToCore
/atom/movable/screen/blob/JumpToCore
icon_state = "ui_tocore"
name = "Jump to Core"
desc = "Moves your camera to your blob core."
/obj/screen/blob/JumpToCore/MouseEntered(location,control,params)
/atom/movable/screen/blob/JumpToCore/MouseEntered(location,control,params)
if(hud && hud.mymob && isovermind(hud.mymob))
var/mob/camera/blob/B = hud.mymob
if(!B.placed)
@@ -44,59 +44,59 @@
desc = initial(desc)
..()
/obj/screen/blob/JumpToCore/Click()
/atom/movable/screen/blob/JumpToCore/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
if(!B.placed)
B.place_blob_core(0)
B.transport_core()
/obj/screen/blob/Blobbernaut
/atom/movable/screen/blob/Blobbernaut
icon_state = "ui_blobbernaut"
name = "Produce Blobbernaut (40)"
desc = "Produces a strong, smart blobbernaut from a factory blob for 40 resources.<br>The factory blob used will become fragile and unable to produce spores."
/obj/screen/blob/Blobbernaut/Click()
/atom/movable/screen/blob/Blobbernaut/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.create_blobbernaut()
/obj/screen/blob/ResourceBlob
/atom/movable/screen/blob/ResourceBlob
icon_state = "ui_resource"
name = "Produce Resource Blob (40)"
desc = "Produces a resource blob for 40 resources.<br>Resource blobs will give you resources every few seconds."
/obj/screen/blob/ResourceBlob/Click()
/atom/movable/screen/blob/ResourceBlob/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.create_resource()
/obj/screen/blob/NodeBlob
/atom/movable/screen/blob/NodeBlob
icon_state = "ui_node"
name = "Produce Node Blob (50)"
desc = "Produces a node blob for 50 resources.<br>Node blobs will expand and activate nearby resource and factory blobs."
/obj/screen/blob/NodeBlob/Click()
/atom/movable/screen/blob/NodeBlob/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.create_node()
/obj/screen/blob/FactoryBlob
/atom/movable/screen/blob/FactoryBlob
icon_state = "ui_factory"
name = "Produce Factory Blob (60)"
desc = "Produces a factory blob for 60 resources.<br>Factory blobs will produce spores every few seconds."
/obj/screen/blob/FactoryBlob/Click()
/atom/movable/screen/blob/FactoryBlob/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.create_factory()
/obj/screen/blob/ReadaptStrain
/atom/movable/screen/blob/ReadaptStrain
icon_state = "ui_chemswap"
name = "Readapt Strain (40)"
desc = "Allows you to choose a new strain from 4 random choices for 40 resources."
/obj/screen/blob/ReadaptStrain/MouseEntered(location,control,params)
/atom/movable/screen/blob/ReadaptStrain/MouseEntered(location,control,params)
if(hud && hud.mymob && isovermind(hud.mymob))
var/mob/camera/blob/B = hud.mymob
if(B.free_strain_rerolls)
@@ -107,26 +107,26 @@
desc = initial(desc)
..()
/obj/screen/blob/ReadaptStrain/Click()
/atom/movable/screen/blob/ReadaptStrain/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.strain_reroll()
/obj/screen/blob/RelocateCore
/atom/movable/screen/blob/RelocateCore
icon_state = "ui_swap"
name = "Relocate Core (80)"
desc = "Swaps a node and your core for 80 resources."
/obj/screen/blob/RelocateCore/Click()
/atom/movable/screen/blob/RelocateCore/Click()
if(isovermind(usr))
var/mob/camera/blob/B = usr
B.relocate_core()
/datum/hud/blob_overmind/New(mob/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
blobpwrdisplay = new /obj/screen()
blobpwrdisplay = new /atom/movable/screen()
blobpwrdisplay.name = "blob power"
blobpwrdisplay.icon_state = "block"
blobpwrdisplay.screen_loc = ui_health
@@ -136,51 +136,51 @@
blobpwrdisplay.hud = src
infodisplay += blobpwrdisplay
healths = new /obj/screen/healths/blob()
healths = new /atom/movable/screen/healths/blob()
healths.hud = src
infodisplay += healths
using = new /obj/screen/blob/BlobHelp()
using = new /atom/movable/screen/blob/BlobHelp()
using.screen_loc = "WEST:6,NORTH:-3"
using.hud = src
static_inventory += using
using = new /obj/screen/blob/JumpToNode()
using = new /atom/movable/screen/blob/JumpToNode()
using.screen_loc = ui_inventory
using.hud = src
static_inventory += using
using = new /obj/screen/blob/JumpToCore()
using = new /atom/movable/screen/blob/JumpToCore()
using.screen_loc = ui_zonesel
using.hud = src
static_inventory += using
using = new /obj/screen/blob/Blobbernaut()
using = new /atom/movable/screen/blob/Blobbernaut()
using.screen_loc = ui_belt
using.hud = src
static_inventory += using
using = new /obj/screen/blob/ResourceBlob()
using = new /atom/movable/screen/blob/ResourceBlob()
using.screen_loc = ui_back
using.hud = src
static_inventory += using
using = new /obj/screen/blob/NodeBlob()
using = new /atom/movable/screen/blob/NodeBlob()
using.screen_loc = ui_hand_position(2)
using.hud = src
static_inventory += using
using = new /obj/screen/blob/FactoryBlob()
using = new /atom/movable/screen/blob/FactoryBlob()
using.screen_loc = ui_hand_position(1)
using.hud = src
static_inventory += using
using = new /obj/screen/blob/ReadaptStrain()
using = new /atom/movable/screen/blob/ReadaptStrain()
using.screen_loc = ui_storage1
using.hud = src
static_inventory += using
using = new /obj/screen/blob/RelocateCore()
using = new /atom/movable/screen/blob/RelocateCore()
using.screen_loc = ui_storage2
using.hud = src
static_inventory += using
+2 -2
View File
@@ -2,10 +2,10 @@
/datum/hud/blobbernaut/New(mob/owner)
..()
blobpwrdisplay = new /obj/screen/healths/blob/naut/core()
blobpwrdisplay = new /atom/movable/screen/healths/blob/naut/core()
blobpwrdisplay.hud = src
infodisplay += blobpwrdisplay
healths = new /obj/screen/healths/blob/naut()
healths = new /atom/movable/screen/healths/blob/naut()
healths.hud = src
infodisplay += healths
+10 -10
View File
@@ -1,20 +1,20 @@
/datum/hud/marauder
var/obj/screen/hosthealth
var/obj/screen/blockchance
var/obj/screen/counterchance
var/atom/movable/screen/hosthealth
var/atom/movable/screen/blockchance
var/atom/movable/screen/counterchance
/datum/hud/marauder/New(mob/living/simple_animal/hostile/clockwork/guardian/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
healths = new /obj/screen/healths/clock()
healths = new /atom/movable/screen/healths/clock()
infodisplay += healths
hosthealth = new /obj/screen/healths/clock()
hosthealth = new /atom/movable/screen/healths/clock()
hosthealth.screen_loc = ui_internal
infodisplay += hosthealth
using = new /obj/screen/marauder/emerge()
using = new /atom/movable/screen/marauder/emerge()
using.screen_loc = ui_zonesel
static_inventory += using
@@ -28,15 +28,15 @@
if(client && !hud_used)
hud_used = new /datum/hud/marauder(src, ui_style2icon(client.prefs.UI_style))
/obj/screen/marauder
/atom/movable/screen/marauder
icon = 'icons/mob/clockwork_mobs.dmi'
/obj/screen/marauder/emerge
/atom/movable/screen/marauder/emerge
icon_state = "clockguard_emerge"
name = "Emerge/Return"
desc = "Emerge or Return."
/obj/screen/marauder/emerge/Click()
/atom/movable/screen/marauder/emerge/Click()
if(istype(usr, /mob/living/simple_animal/hostile/clockwork/guardian))
var/mob/living/simple_animal/hostile/clockwork/guardian/G = usr
if(G.is_in_host())
+2 -2
View File
@@ -3,13 +3,13 @@
/datum/hud/constructs/New(mob/owner)
..()
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.hud = src
pull_icon.update_icon()
pull_icon.screen_loc = ui_construct_pull
static_inventory += pull_icon
healths = new /obj/screen/healths/construct()
healths = new /atom/movable/screen/healths/construct()
healths.hud = src
infodisplay += healths
+5 -5
View File
@@ -18,7 +18,7 @@
for(var/I in credit_order_for_this_round)
if(!credits)
return
_credits += new /obj/screen/credit(null, I, src, credits_icon)
_credits += new /atom/movable/screen/credit(null, I, src, credits_icon)
sleep(CREDIT_SPAWN_SPEED)
sleep(CREDIT_ROLL_SPEED - CREDIT_SPAWN_SPEED)
remove_verb(src, /client/proc/ClearCredits)
@@ -31,7 +31,7 @@
QDEL_LIST(credits)
credits = null
/obj/screen/credit
/atom/movable/screen/credit
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
alpha = 0
screen_loc = "12,1"
@@ -39,7 +39,7 @@
var/client/parent
var/matrix/target
/obj/screen/credit/Initialize(mapload, credited, client/P, icon/I)
/atom/movable/screen/credit/Initialize(mapload, credited, client/P, icon/I)
. = ..()
icon = I
parent = P
@@ -57,7 +57,7 @@
QDEL_IN(src, CREDIT_ROLL_SPEED)
P.screen += src
/obj/screen/credit/Destroy()
/atom/movable/screen/credit/Destroy()
var/client/P = parent
P.screen -= src
icon = null
@@ -65,5 +65,5 @@
parent = null
return ..()
/obj/screen/credit/proc/FadeOut()
/atom/movable/screen/credit/proc/FadeOut()
animate(src, alpha = 0, transform = target, time = CREDIT_EASE_DURATION)
+8 -8
View File
@@ -4,15 +4,15 @@
/datum/hud/devil/New(mob/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
using = new /obj/screen/drop()
using = new /atom/movable/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drone_drop
using.hud = src
static_inventory += using
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.hud = src
pull_icon.update_icon()
@@ -21,7 +21,7 @@
build_hand_slots()
using = new /obj/screen/inventory()
using = new /atom/movable/screen/inventory()
using.name = "hand"
using.icon = ui_style
using.icon_state = "swap_1_m"
@@ -31,7 +31,7 @@
using.hud = src
static_inventory += using
using = new /obj/screen/inventory()
using = new /atom/movable/screen/inventory()
using.name = "hand"
using.icon = ui_style
using.icon_state = "swap_2"
@@ -41,15 +41,15 @@
using.hud = src
static_inventory += using
zone_select = new /obj/screen/zone_sel()
zone_select = new /atom/movable/screen/zone_sel()
zone_select.icon = ui_style
zone_select.hud = src
zone_select.update_icon()
lingchemdisplay = new /obj/screen/ling/chems()
lingchemdisplay = new /atom/movable/screen/ling/chems()
lingchemdisplay.hud = src
devilsouldisplay = new /obj/screen/devil/soul_counter
devilsouldisplay = new /atom/movable/screen/devil/soul_counter
devilsouldisplay.hud = src
infodisplay += devilsouldisplay
+4 -4
View File
@@ -1,8 +1,8 @@
/datum/hud/dextrous/drone/New(mob/owner)
..()
var/obj/screen/inventory/inv_box
var/atom/movable/screen/inventory/inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "internal storage"
inv_box.icon = ui_style
inv_box.icon_state = "suit_storage"
@@ -11,7 +11,7 @@
inv_box.slot_id = SLOT_GENERC_DEXTROUS_STORAGE
static_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "head/mask"
inv_box.icon = ui_style
inv_box.icon_state = "mask"
@@ -20,7 +20,7 @@
inv_box.slot_id = SLOT_HEAD
static_inventory += inv_box
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
inv.hud = src
inv_slots[inv.slot_id] = inv
+28 -28
View File
@@ -1,5 +1,5 @@
/mob/proc/overlay_fullscreen(category, type, severity)
var/obj/screen/fullscreen/screen = screens[category]
var/atom/movable/screen/fullscreen/screen = screens[category]
if (!screen || screen.type != type)
// needs to be recreated
clear_fullscreen(category, FALSE)
@@ -17,7 +17,7 @@
return screen
/mob/proc/clear_fullscreen(category, animated = 10)
var/obj/screen/fullscreen/screen = screens[category]
var/atom/movable/screen/fullscreen/screen = screens[category]
if(!screen)
return
@@ -31,7 +31,7 @@
client.screen -= screen
qdel(screen)
/mob/proc/clear_fullscreen_after_animate(obj/screen/fullscreen/screen)
/mob/proc/clear_fullscreen_after_animate(atom/movable/screen/fullscreen/screen)
if(client)
client.screen -= screen
qdel(screen)
@@ -47,7 +47,7 @@
/mob/proc/reload_fullscreen()
if(client)
var/obj/screen/fullscreen/screen
var/atom/movable/screen/fullscreen/screen
for(var/category in screens)
screen = screens[category]
if(screen.should_show_to(src))
@@ -56,7 +56,7 @@
else
client.screen -= screen
/obj/screen/fullscreen
/atom/movable/screen/fullscreen
icon = 'icons/mob/screen_full.dmi'
icon_state = "default"
screen_loc = "CENTER-7,CENTER-7"
@@ -67,89 +67,89 @@
var/severity = 0
var/show_when_dead = FALSE
/obj/screen/fullscreen/proc/update_for_view(client_view)
/atom/movable/screen/fullscreen/proc/update_for_view(client_view)
if (screen_loc == "CENTER-7,CENTER-7" && view != client_view)
var/list/actualview = getviewsize(client_view)
view = client_view
transform = matrix(actualview[1]/FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2]/FULLSCREEN_OVERLAY_RESOLUTION_Y, 0)
/obj/screen/fullscreen/proc/should_show_to(mob/mymob)
/atom/movable/screen/fullscreen/proc/should_show_to(mob/mymob)
if(!show_when_dead && mymob.stat == DEAD)
return FALSE
return TRUE
/obj/screen/fullscreen/Destroy()
/atom/movable/screen/fullscreen/Destroy()
severity = 0
. = ..()
/obj/screen/fullscreen/brute
/atom/movable/screen/fullscreen/brute
icon_state = "brutedamageoverlay"
layer = UI_DAMAGE_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/oxy
/atom/movable/screen/fullscreen/oxy
icon_state = "oxydamageoverlay"
layer = UI_DAMAGE_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/crit
/atom/movable/screen/fullscreen/crit
icon_state = "passage"
layer = CRIT_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/crit/vision
/atom/movable/screen/fullscreen/crit/vision
icon_state = "oxydamageoverlay"
layer = BLIND_LAYER
/obj/screen/fullscreen/blind
/atom/movable/screen/fullscreen/blind
icon_state = "blackimageoverlay"
layer = BLIND_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/curse
/atom/movable/screen/fullscreen/curse
icon_state = "curse"
layer = CURSE_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/fullscreen/impaired
/atom/movable/screen/fullscreen/impaired
icon_state = "impairedoverlay"
/obj/screen/fullscreen/blurry
/atom/movable/screen/fullscreen/blurry
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "blurry"
/obj/screen/fullscreen/flash
/atom/movable/screen/fullscreen/flash
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "flash"
/obj/screen/fullscreen/flash/static
/atom/movable/screen/fullscreen/flash/static
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "noise"
/obj/screen/fullscreen/high
/atom/movable/screen/fullscreen/high
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "druggy"
/obj/screen/fullscreen/color_vision
/atom/movable/screen/fullscreen/color_vision
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "flash"
alpha = 80
/obj/screen/fullscreen/color_vision/green
/atom/movable/screen/fullscreen/color_vision/green
color = "#00ff00"
/obj/screen/fullscreen/color_vision/red
/atom/movable/screen/fullscreen/color_vision/red
color = "#ff0000"
/obj/screen/fullscreen/color_vision/blue
/atom/movable/screen/fullscreen/color_vision/blue
color = "#0000ff"
/obj/screen/fullscreen/cinematic_backdrop
/atom/movable/screen/fullscreen/cinematic_backdrop
icon = 'icons/mob/screen_gen.dmi'
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "flash"
@@ -158,7 +158,7 @@
color = "#000000"
show_when_dead = TRUE
/obj/screen/fullscreen/lighting_backdrop
/atom/movable/screen/fullscreen/lighting_backdrop
icon = 'icons/mob/screen_gen.dmi'
icon_state = "flash"
transform = matrix(200, 0, 0, 0, 200, 0)
@@ -167,18 +167,18 @@
show_when_dead = TRUE
//Provides darkness to the back of the lighting plane
/obj/screen/fullscreen/lighting_backdrop/lit
/atom/movable/screen/fullscreen/lighting_backdrop/lit
invisibility = INVISIBILITY_LIGHTING
layer = BACKGROUND_LAYER+21
color = "#000"
show_when_dead = TRUE
//Provides whiteness in case you don't see lights so everything is still visible
/obj/screen/fullscreen/lighting_backdrop/unlit
/atom/movable/screen/fullscreen/lighting_backdrop/unlit
layer = BACKGROUND_LAYER+20
show_when_dead = TRUE
/obj/screen/fullscreen/see_through_darkness
/atom/movable/screen/fullscreen/see_through_darkness
icon_state = "nightvision"
plane = LIGHTING_PLANE
layer = LIGHTING_LAYER
+10 -10
View File
@@ -1,15 +1,15 @@
//Used for normal mobs that have hands.
/datum/hud/dextrous/New(mob/living/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
using = new /obj/screen/drop()
using = new /atom/movable/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drone_drop
using.hud = src
static_inventory += using
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.hud = src
pull_icon.update_icon()
@@ -18,14 +18,14 @@
build_hand_slots()
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_1_m"
using.screen_loc = ui_swaphand_position(owner,1)
using.hud = src
static_inventory += using
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2)
@@ -35,29 +35,29 @@
if(mymob.possible_a_intents)
if(mymob.possible_a_intents.len == 4)
// All possible intents - full intent selector
action_intent = new /obj/screen/act_intent/segmented
action_intent = new /atom/movable/screen/act_intent/segmented
else
action_intent = new /obj/screen/act_intent
action_intent = new /atom/movable/screen/act_intent
action_intent.icon = ui_style
action_intent.icon_state = mymob.a_intent
action_intent.hud = src
static_inventory += action_intent
zone_select = new /obj/screen/zone_sel()
zone_select = new /atom/movable/screen/zone_sel()
zone_select.icon = ui_style
zone_select.hud = src
zone_select.update_icon()
static_inventory += zone_select
using = new /obj/screen/area_creator
using = new /atom/movable/screen/area_creator
using.icon = ui_style
using.hud = src
static_inventory += using
mymob.client.screen = list()
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
inv.hud = src
inv_slots[inv.slot_id] = inv
+19 -19
View File
@@ -1,79 +1,79 @@
/obj/screen/ghost
/atom/movable/screen/ghost
icon = 'icons/mob/screen_ghost.dmi'
/obj/screen/ghost/MouseEntered()
/atom/movable/screen/ghost/MouseEntered()
flick(icon_state + "_anim", src)
/obj/screen/ghost/jumptomob
/atom/movable/screen/ghost/jumptomob
name = "Jump to mob"
icon_state = "jumptomob"
/obj/screen/ghost/jumptomob/Click()
/atom/movable/screen/ghost/jumptomob/Click()
var/mob/dead/observer/G = usr
G.jumptomob()
/obj/screen/ghost/orbit
/atom/movable/screen/ghost/orbit
name = "Orbit"
icon_state = "orbit"
/obj/screen/ghost/orbit/Click()
/atom/movable/screen/ghost/orbit/Click()
var/mob/dead/observer/G = usr
G.follow()
/obj/screen/ghost/reenter_corpse
/atom/movable/screen/ghost/reenter_corpse
name = "Reenter corpse"
icon_state = "reenter_corpse"
/obj/screen/ghost/reenter_corpse/Click()
/atom/movable/screen/ghost/reenter_corpse/Click()
var/mob/dead/observer/G = usr
G.reenter_corpse()
/obj/screen/ghost/teleport
/atom/movable/screen/ghost/teleport
name = "Teleport"
icon_state = "teleport"
/obj/screen/ghost/teleport/Click()
/atom/movable/screen/ghost/teleport/Click()
var/mob/dead/observer/G = usr
G.dead_tele()
/obj/screen/ghost/spawners
/atom/movable/screen/ghost/spawners
name = "Ghost role spawners"
icon_state = "spawners"
/obj/screen/ghost/spawners/Click()
/atom/movable/screen/ghost/spawners/Click()
var/mob/dead/observer/G = usr
G.open_spawners_menu()
/datum/hud/ghost/New(mob/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
using = new /obj/screen/ghost/jumptomob()
using = new /atom/movable/screen/ghost/jumptomob()
using.screen_loc = ui_ghost_jumptomob
using.hud = src
static_inventory += using
using = new /obj/screen/ghost/orbit()
using = new /atom/movable/screen/ghost/orbit()
using.screen_loc = ui_ghost_orbit
using.hud = src
static_inventory += using
using = new /obj/screen/ghost/reenter_corpse()
using = new /atom/movable/screen/ghost/reenter_corpse()
using.screen_loc = ui_ghost_reenter_corpse
using.hud = src
static_inventory += using
using = new /obj/screen/ghost/teleport()
using = new /atom/movable/screen/ghost/teleport()
using.screen_loc = ui_ghost_teleport
using.hud = src
static_inventory += using
using = new /obj/screen/ghost/spawners()
using = new /atom/movable/screen/ghost/spawners()
using.screen_loc = ui_ghost_spawners
using.hud = src
static_inventory += using
using = new /obj/screen/language_menu
using = new /atom/movable/screen/language_menu
using.icon = ui_style
using.hud = src
static_inventory += using
+28 -28
View File
@@ -1,18 +1,18 @@
/datum/hud/guardian/New(mob/living/simple_animal/hostile/guardian/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
healths = new /obj/screen/healths/guardian()
healths = new /atom/movable/screen/healths/guardian()
healths.hud = src
infodisplay += healths
using = new /obj/screen/guardian/Manifest()
using = new /atom/movable/screen/guardian/Manifest()
using.screen_loc = ui_hand_position(2)
using.hud = src
static_inventory += using
using = new /obj/screen/guardian/Recall()
using = new /atom/movable/screen/guardian/Recall()
using.screen_loc = ui_hand_position(1)
using.hud = src
static_inventory += using
@@ -22,23 +22,23 @@
using.hud = src
static_inventory += using
using = new /obj/screen/guardian/ToggleLight()
using = new /atom/movable/screen/guardian/ToggleLight()
using.screen_loc = ui_inventory
using.hud = src
static_inventory += using
using = new /obj/screen/guardian/Communicate()
using = new /atom/movable/screen/guardian/Communicate()
using.screen_loc = ui_back
using.hud = src
static_inventory += using
/datum/hud/dextrous/guardian/New(mob/living/simple_animal/hostile/guardian/owner) //for a dextrous guardian
..()
var/obj/screen/using
var/atom/movable/screen/using
if(istype(owner, /mob/living/simple_animal/hostile/guardian/dextrous))
var/obj/screen/inventory/inv_box
var/atom/movable/screen/inventory/inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "internal storage"
inv_box.icon = ui_style
inv_box.icon_state = "suit_storage"
@@ -46,24 +46,24 @@
inv_box.slot_id = SLOT_GENERC_DEXTROUS_STORAGE
static_inventory += inv_box
using = new /obj/screen/guardian/Communicate()
using = new /atom/movable/screen/guardian/Communicate()
using.screen_loc = ui_sstore1
static_inventory += using
else
using = new /obj/screen/guardian/Communicate()
using = new /atom/movable/screen/guardian/Communicate()
using.screen_loc = ui_id
static_inventory += using
healths = new /obj/screen/healths/guardian()
healths = new /atom/movable/screen/healths/guardian()
infodisplay += healths
using = new /obj/screen/guardian/Manifest()
using = new /atom/movable/screen/guardian/Manifest()
using.screen_loc = ui_belt
static_inventory += using
using = new /obj/screen/guardian/Recall()
using = new /atom/movable/screen/guardian/Recall()
using.screen_loc = ui_back
static_inventory += using
@@ -71,7 +71,7 @@
using.screen_loc = ui_storage2
static_inventory += using
using = new /obj/screen/guardian/ToggleLight()
using = new /atom/movable/screen/guardian/ToggleLight()
using.screen_loc = ui_inventory
static_inventory += using
@@ -91,65 +91,65 @@
..()
/obj/screen/guardian
/atom/movable/screen/guardian
icon = 'icons/mob/guardian.dmi'
/obj/screen/guardian/Manifest
/atom/movable/screen/guardian/Manifest
icon_state = "manifest"
name = "Manifest"
desc = "Spring forth into battle!"
/obj/screen/guardian/Manifest/Click()
/atom/movable/screen/guardian/Manifest/Click()
if(isguardian(usr))
var/mob/living/simple_animal/hostile/guardian/G = usr
G.Manifest()
/obj/screen/guardian/Recall
/atom/movable/screen/guardian/Recall
icon_state = "recall"
name = "Recall"
desc = "Return to your user."
/obj/screen/guardian/Recall/Click()
/atom/movable/screen/guardian/Recall/Click()
if(isguardian(usr))
var/mob/living/simple_animal/hostile/guardian/G = usr
G.Recall()
/obj/screen/guardian/ToggleMode
/atom/movable/screen/guardian/ToggleMode
icon_state = "toggle"
name = "Toggle Mode"
desc = "Switch between ability modes."
/obj/screen/guardian/ToggleMode/Click()
/atom/movable/screen/guardian/ToggleMode/Click()
if(isguardian(usr))
var/mob/living/simple_animal/hostile/guardian/G = usr
G.ToggleMode()
/obj/screen/guardian/ToggleMode/Inactive
/atom/movable/screen/guardian/ToggleMode/Inactive
icon_state = "notoggle" //greyed out so it doesn't look like it'll work
/obj/screen/guardian/ToggleMode/Assassin
/atom/movable/screen/guardian/ToggleMode/Assassin
icon_state = "stealth"
name = "Toggle Stealth"
desc = "Enter or exit stealth."
/obj/screen/guardian/Communicate
/atom/movable/screen/guardian/Communicate
icon_state = "communicate"
name = "Communicate"
desc = "Communicate telepathically with your user."
/obj/screen/guardian/Communicate/Click()
/atom/movable/screen/guardian/Communicate/Click()
if(isguardian(usr))
var/mob/living/simple_animal/hostile/guardian/G = usr
G.Communicate()
/obj/screen/guardian/ToggleLight
/atom/movable/screen/guardian/ToggleLight
icon_state = "light"
name = "Toggle Light"
desc = "Glow like star dust."
/obj/screen/guardian/ToggleLight/Click()
/atom/movable/screen/guardian/ToggleLight/Click()
if(isguardian(usr))
var/mob/living/simple_animal/hostile/guardian/G = usr
G.ToggleLight()
+29 -29
View File
@@ -25,38 +25,38 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
var/inventory_shown = FALSE //Equipped item inventory
var/hotkey_ui_hidden = FALSE //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons)
var/obj/screen/ling/chems/lingchemdisplay
var/obj/screen/ling/sting/lingstingdisplay
var/atom/movable/screen/ling/chems/lingchemdisplay
var/atom/movable/screen/ling/sting/lingstingdisplay
var/obj/screen/blobpwrdisplay
var/atom/movable/screen/blobpwrdisplay
var/obj/screen/alien_plasma_display
var/obj/screen/alien_queen_finder
var/atom/movable/screen/alien_plasma_display
var/atom/movable/screen/alien_queen_finder
var/obj/screen/devil/soul_counter/devilsouldisplay
var/atom/movable/screen/devil/soul_counter/devilsouldisplay
var/obj/screen/action_intent
var/obj/screen/zone_select
var/obj/screen/pull_icon
var/obj/screen/rest_icon
var/obj/screen/throw_icon
var/obj/screen/module_store_icon
var/atom/movable/screen/action_intent
var/atom/movable/screen/zone_select
var/atom/movable/screen/pull_icon
var/atom/movable/screen/rest_icon
var/atom/movable/screen/throw_icon
var/atom/movable/screen/module_store_icon
var/list/static_inventory = list() //the screen objects which are static
var/list/toggleable_inventory = list() //the screen objects which can be hidden
var/list/obj/screen/hotkeybuttons = list() //the buttons that can be used via hotkeys
var/list/atom/movable/screen/hotkeybuttons = list() //the buttons that can be used via hotkeys
var/list/infodisplay = list() //the screen objects that display mob info (health, alien plasma, etc...)
var/list/screenoverlays = list() //the screen objects used as whole screen overlays (flash, damageoverlay, etc...)
var/list/inv_slots[SLOTS_AMT] // /obj/screen/inventory objects, ordered by their slot ID.
var/list/hand_slots // /obj/screen/inventory/hand objects, assoc list of "[held_index]" = object
var/list/obj/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object
var/list/inv_slots[SLOTS_AMT] // /atom/movable/screen/inventory objects, ordered by their slot ID.
var/list/hand_slots // /atom/movable/screen/inventory/hand objects, assoc list of "[held_index]" = object
var/list/atom/movable/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
var/atom/movable/screen/movable/action_button/hide_toggle/hide_actions_toggle
var/action_buttons_hidden = FALSE
var/obj/screen/healths
var/obj/screen/healthdoll
var/obj/screen/internals
var/atom/movable/screen/healths
var/atom/movable/screen/healthdoll
var/atom/movable/screen/internals
// subtypes can override this to force a specific UI style
var/ui_style
@@ -75,8 +75,8 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
hand_slots = list()
for(var/mytype in subtypesof(/obj/screen/plane_master))
var/obj/screen/plane_master/instance = new mytype()
for(var/mytype in subtypesof(/atom/movable/screen/plane_master))
var/atom/movable/screen/plane_master/instance = new mytype()
plane_masters["[instance.plane]"] = instance
instance.backdrop(mymob)
@@ -169,7 +169,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
//These ones are a part of 'static_inventory', 'toggleable_inventory' or 'hotkeybuttons' but we want them to stay
for(var/h in hand_slots)
var/obj/screen/hand = hand_slots[h]
var/atom/movable/screen/hand = hand_slots[h]
if(hand)
screenmob.client.screen += hand
if(action_intent)
@@ -207,7 +207,7 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
/datum/hud/proc/plane_masters_update()
// Plane masters are always shown to OUR mob, never to observers
for(var/thing in plane_masters)
var/obj/screen/plane_master/PM = plane_masters[thing]
var/atom/movable/screen/plane_master/PM = plane_masters[thing]
PM.backdrop(mymob)
mymob.client.screen += PM
@@ -261,13 +261,13 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
//9/10 this is only called once per mob and only for 2 hands
/datum/hud/proc/build_hand_slots()
for(var/h in hand_slots)
var/obj/screen/inventory/hand/H = hand_slots[h]
var/atom/movable/screen/inventory/hand/H = hand_slots[h]
if(H)
static_inventory -= H
hand_slots = list()
var/obj/screen/inventory/hand/hand_box
var/atom/movable/screen/inventory/hand/hand_box
for(var/i in 1 to mymob.held_items.len)
hand_box = new /obj/screen/inventory/hand()
hand_box = new /atom/movable/screen/inventory/hand()
hand_box.name = mymob.get_held_index_name(i)
hand_box.icon = ui_style
hand_box.icon_state = "hand_[mymob.held_index_to_dir(i)]"
@@ -279,10 +279,10 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
hand_box.update_icon()
var/i = 1
for(var/obj/screen/swap_hand/SH in static_inventory)
for(var/atom/movable/screen/swap_hand/SH in static_inventory)
SH.screen_loc = ui_swaphand_position(mymob,!(i % 2) ? 2: 1)
i++
for(var/obj/screen/human/equip/E in static_inventory)
for(var/atom/movable/screen/human/equip/E in static_inventory)
E.screen_loc = ui_equip_position(mymob)
if(ismob(mymob) && mymob.hud_used == src)
+66 -66
View File
@@ -1,11 +1,11 @@
/obj/screen/human
/atom/movable/screen/human
icon = 'icons/mob/screen_midnight.dmi'
/obj/screen/human/toggle
/atom/movable/screen/human/toggle
name = "toggle"
icon_state = "toggle"
/obj/screen/human/toggle/Click()
/atom/movable/screen/human/toggle/Click()
var/mob/targetmob = usr
@@ -23,26 +23,26 @@
targetmob.hud_used.hidden_inventory_update(usr)
/obj/screen/human/equip
/atom/movable/screen/human/equip
name = "equip"
icon_state = "act_equip"
/obj/screen/human/equip/Click()
/atom/movable/screen/human/equip/Click()
if(ismecha(usr.loc)) // stops inventory actions in a mech
return 1
var/mob/living/carbon/human/H = usr
H.quick_equip()
/obj/screen/devil
/atom/movable/screen/devil
invisibility = INVISIBILITY_ABSTRACT
/obj/screen/devil/soul_counter
/atom/movable/screen/devil/soul_counter
icon = 'icons/mob/screen_gen.dmi'
name = "souls owned"
icon_state = "Devil-6"
screen_loc = ui_devilsouldisplay
/obj/screen/devil/soul_counter/proc/update_counter(souls = 0)
/atom/movable/screen/devil/soul_counter/proc/update_counter(souls = 0)
invisibility = 0
maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#FF0000'>[souls]</font></div>"
switch(souls)
@@ -59,53 +59,53 @@
else
icon_state = "Devil-6"
/obj/screen/devil/soul_counter/proc/clear()
/atom/movable/screen/devil/soul_counter/proc/clear()
invisibility = INVISIBILITY_ABSTRACT
/obj/screen/ling
/atom/movable/screen/ling
invisibility = INVISIBILITY_ABSTRACT
/obj/screen/ling/sting
/atom/movable/screen/ling/sting
name = "current sting"
screen_loc = ui_lingstingdisplay
/obj/screen/ling/sting/Click()
/atom/movable/screen/ling/sting/Click()
if(isobserver(usr))
return
var/mob/living/carbon/U = usr
U.unset_sting()
/obj/screen/ling/chems
/atom/movable/screen/ling/chems
name = "chemical storage"
icon_state = "power_display"
screen_loc = ui_lingchemdisplay
/datum/hud/human/New(mob/living/carbon/human/owner)
..()
owner.overlay_fullscreen("see_through_darkness", /obj/screen/fullscreen/see_through_darkness)
owner.overlay_fullscreen("see_through_darkness", /atom/movable/screen/fullscreen/see_through_darkness)
var/widescreenlayout = FALSE //CIT CHANGE - adds support for different hud layouts depending on widescreen pref
if(owner.client && owner.client.prefs && owner.client.prefs.widescreenpref) //CIT CHANGE - ditto
widescreenlayout = TRUE // CIT CHANGE - ditto
var/obj/screen/using
var/obj/screen/inventory/inv_box
var/atom/movable/screen/using
var/atom/movable/screen/inventory/inv_box
using = new/obj/screen/language_menu
using = new/atom/movable/screen/language_menu
using.icon = ui_style
if(!widescreenlayout) // CIT CHANGE
using.screen_loc = ui_boxlang // CIT CHANGE
using.hud = src
static_inventory += using
using = new /obj/screen/area_creator
using = new /atom/movable/screen/area_creator
using.icon = ui_style
if(!widescreenlayout) // CIT CHANGE
using.screen_loc = ui_boxarea // CIT CHANGE
using.hud = src
static_inventory += using
using = new /obj/screen/voretoggle() //We fancy Vore now
using = new /atom/movable/screen/voretoggle() //We fancy Vore now
using.icon = tg_ui_icon_to_cit_ui(ui_style)
using.screen_loc = ui_voremode
if(!widescreenlayout)
@@ -113,7 +113,7 @@
using.hud = src
static_inventory += using
action_intent = new /obj/screen/act_intent/segmented
action_intent = new /atom/movable/screen/act_intent/segmented
action_intent.icon_state = mymob.a_intent
action_intent.hud = src
static_inventory += action_intent
@@ -132,13 +132,13 @@
resistdelay.screen_loc = ui_resistdelay
static_inventory += resistdelay
using = new /obj/screen/drop()
using = new /atom/movable/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drop_throw
using.hud = src
static_inventory += using
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "i_clothing"
inv_box.icon = ui_style
inv_box.slot_id = SLOT_W_UNIFORM
@@ -146,7 +146,7 @@
inv_box.screen_loc = ui_iclothing
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "o_clothing"
inv_box.icon = ui_style
inv_box.slot_id = SLOT_WEAR_SUIT
@@ -156,21 +156,21 @@
build_hand_slots()
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_1"
using.screen_loc = ui_swaphand_position(owner,1)
using.hud = src
static_inventory += using
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2)
using.hud = src
static_inventory += using
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "id"
inv_box.icon = ui_style
inv_box.icon_state = "id"
@@ -178,7 +178,7 @@
inv_box.slot_id = SLOT_WEAR_ID
static_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "mask"
inv_box.icon = ui_style
inv_box.icon_state = "mask"
@@ -186,7 +186,7 @@
inv_box.slot_id = SLOT_WEAR_MASK
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "neck"
inv_box.icon = ui_style
inv_box.icon_state = "neck"
@@ -194,7 +194,7 @@
inv_box.slot_id = SLOT_NECK
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "back"
inv_box.icon = ui_style
inv_box.icon_state = "back"
@@ -202,7 +202,7 @@
inv_box.slot_id = SLOT_BACK
static_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "storage1"
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
@@ -210,7 +210,7 @@
inv_box.slot_id = SLOT_L_STORE
static_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "storage2"
inv_box.icon = ui_style
inv_box.icon_state = "pocket"
@@ -218,7 +218,7 @@
inv_box.slot_id = SLOT_R_STORE
static_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "suit storage"
inv_box.icon = ui_style
inv_box.icon_state = "suit_storage"
@@ -226,32 +226,32 @@
inv_box.slot_id = SLOT_S_STORE
static_inventory += inv_box
using = new /obj/screen/resist()
using = new /atom/movable/screen/resist()
using.icon = ui_style
using.screen_loc = ui_overridden_resist // CIT CHANGE - changes this to overridden resist
using.hud = src
hotkeybuttons += using
using = new /obj/screen/rest()
using = new /atom/movable/screen/rest()
using.icon = ui_style
using.screen_loc = ui_pull_resist
using.hud = src
static_inventory += using
//END OF CIT CHANGES
using = new /obj/screen/human/toggle()
using = new /atom/movable/screen/human/toggle()
using.icon = ui_style
using.screen_loc = ui_inventory
using.hud = src
static_inventory += using
using = new /obj/screen/human/equip()
using = new /atom/movable/screen/human/equip()
using.icon = ui_style
using.screen_loc = ui_equip_position(mymob)
using.hud = src
static_inventory += using
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "gloves"
inv_box.icon = ui_style
inv_box.icon_state = "gloves"
@@ -259,7 +259,7 @@
inv_box.slot_id = SLOT_GLOVES
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "eyes"
inv_box.icon = ui_style
inv_box.icon_state = "glasses"
@@ -267,7 +267,7 @@
inv_box.slot_id = SLOT_GLASSES
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "ears"
inv_box.icon = ui_style
inv_box.icon_state = "ears"
@@ -275,7 +275,7 @@
inv_box.slot_id = SLOT_EARS
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "head"
inv_box.icon = ui_style
inv_box.icon_state = "head"
@@ -283,7 +283,7 @@
inv_box.slot_id = SLOT_HEAD
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "shoes"
inv_box.icon = ui_style
inv_box.icon_state = "shoes"
@@ -291,7 +291,7 @@
inv_box.slot_id = SLOT_SHOES
toggleable_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "belt"
inv_box.icon = ui_style
inv_box.icon_state = "belt"
@@ -300,72 +300,72 @@
inv_box.slot_id = SLOT_BELT
static_inventory += inv_box
throw_icon = new /obj/screen/throw_catch()
throw_icon = new /atom/movable/screen/throw_catch()
throw_icon.icon = ui_style
throw_icon.screen_loc = ui_drop_throw
throw_icon.hud = src
hotkeybuttons += throw_icon
internals = new /obj/screen/internals()
internals = new /atom/movable/screen/internals()
internals.hud = src
infodisplay += internals
healths = new /obj/screen/healths()
healths = new /atom/movable/screen/healths()
healths.hud = src
infodisplay += healths
staminas = new /obj/screen/staminas()
staminas = new /atom/movable/screen/staminas()
staminas.hud = src
infodisplay += staminas
if(!CONFIG_GET(flag/disable_stambuffer))
staminabuffer = new /obj/screen/staminabuffer()
staminabuffer = new /atom/movable/screen/staminabuffer()
staminabuffer.hud = src
infodisplay += staminabuffer
//END OF CIT CHANGES
healthdoll = new /obj/screen/healthdoll()
healthdoll = new /atom/movable/screen/healthdoll()
healthdoll.hud = src
infodisplay += healthdoll
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.hud = src
pull_icon.update_icon()
pull_icon.screen_loc = ui_pull_resist
static_inventory += pull_icon
lingchemdisplay = new /obj/screen/ling/chems()
lingchemdisplay = new /atom/movable/screen/ling/chems()
lingchemdisplay.hud = src
infodisplay += lingchemdisplay
lingstingdisplay = new /obj/screen/ling/sting()
lingstingdisplay = new /atom/movable/screen/ling/sting()
lingstingdisplay.hud = src
infodisplay += lingstingdisplay
devilsouldisplay = new /obj/screen/devil/soul_counter
devilsouldisplay = new /atom/movable/screen/devil/soul_counter
devilsouldisplay.hud = src
infodisplay += devilsouldisplay
blood_display = new /obj/screen/bloodsucker/blood_counter // Blood Volume
blood_display = new /atom/movable/screen/bloodsucker/blood_counter // Blood Volume
blood_display.hud = src
infodisplay += blood_display
vamprank_display = new /obj/screen/bloodsucker/rank_counter // Bloodsucker Rank
vamprank_display = new /atom/movable/screen/bloodsucker/rank_counter // Bloodsucker Rank
vamprank_display.hud = src
infodisplay += vamprank_display
sunlight_display = new /obj/screen/bloodsucker/sunlight_counter // Sunlight
sunlight_display = new /atom/movable/screen/bloodsucker/sunlight_counter // Sunlight
sunlight_display.hud = src
infodisplay += sunlight_display
zone_select = new /obj/screen/zone_sel()
zone_select = new /atom/movable/screen/zone_sel()
zone_select.icon = ui_style
zone_select.hud = src
zone_select.update_icon()
static_inventory += zone_select
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
inv.hud = src
inv_slots[inv.slot_id] = inv
@@ -374,12 +374,12 @@
update_locked_slots()
/datum/hud/human/proc/assert_move_intent_ui(mob/living/carbon/human/owner = mymob, on_new = FALSE)
var/obj/screen/using
var/atom/movable/screen/using
// delete old ones
var/list/obj/screen/victims = list()
victims += locate(/obj/screen/mov_intent) in static_inventory
victims += locate(/obj/screen/sprintbutton) in static_inventory
victims += locate(/obj/screen/sprint_buffer) in static_inventory
var/list/atom/movable/screen/victims = list()
victims += locate(/atom/movable/screen/mov_intent) in static_inventory
victims += locate(/atom/movable/screen/sprintbutton) in static_inventory
victims += locate(/atom/movable/screen/sprint_buffer) in static_inventory
if(victims)
static_inventory -= victims
if(mymob?.client)
@@ -388,7 +388,7 @@
// make new ones
// walk/run
using = new /obj/screen/mov_intent
using = new /atom/movable/screen/mov_intent
using.icon = tg_ui_icon_to_cit_ui(ui_style) // CIT CHANGE - overrides mov intent icon
using.screen_loc = ui_movi
using.hud = src
@@ -401,7 +401,7 @@
return
// sprint button
using = new /obj/screen/sprintbutton
using = new /atom/movable/screen/sprintbutton
using.icon = tg_ui_icon_to_cit_ui(ui_style)
using.icon_state = ((owner.combat_flags & COMBAT_FLAG_SPRINT_ACTIVE) ? "act_sprint_on" : "act_sprint")
using.screen_loc = ui_movi
@@ -411,7 +411,7 @@
owner?.client?.screen += using
// same as above but buffer.
sprint_buffer = new /obj/screen/sprint_buffer
sprint_buffer = new /atom/movable/screen/sprint_buffer
sprint_buffer.screen_loc = ui_sprintbufferloc
sprint_buffer.hud = src
static_inventory += sprint_buffer
@@ -425,7 +425,7 @@
if(!istype(H) || !H.dna.species)
return
var/datum/species/S = H.dna.species
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
if(inv.slot_id in S.no_equip)
inv.alpha = 128
+2 -2
View File
@@ -4,13 +4,13 @@
/datum/hud/lavaland_elite/New(mob/living/simple_animal/hostile/asteroid/elite)
..()
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.hud = src
pull_icon.update_icon()
pull_icon.screen_loc = ui_living_pull
static_inventory += pull_icon
healths = new /obj/screen/healths/lavaland_elite()
healths = new /atom/movable/screen/healths/lavaland_elite()
healths.hud = src
infodisplay += healths
+7 -7
View File
@@ -2,7 +2,7 @@
* A screen object, which acts as a container for turfs and other things
* you want to show on the map, which you usually attach to "vis_contents".
*/
/obj/screen/map_view
/atom/movable/screen/map_view
// Map view has to be on the lowest plane to enable proper lighting
layer = GAME_PLANE
plane = GAME_PLANE
@@ -12,7 +12,7 @@
* It is also implicitly used to allocate a rectangle on the map, which will
* be used for auto-scaling the map.
*/
/obj/screen/background
/atom/movable/screen/background
name = "background"
icon = 'icons/mob/map_backgrounds.dmi'
icon_state = "clear"
@@ -25,7 +25,7 @@
*
* If applicable, "assigned_map" has to be assigned before this proc call.
*/
/obj/screen/proc/set_position(x, y, px = 0, py = 0)
/atom/movable/screen/proc/set_position(x, y, px = 0, py = 0)
if(assigned_map)
screen_loc = "[assigned_map]:[x]:[px],[y]:[py]"
else
@@ -36,7 +36,7 @@
*
* If applicable, "assigned_map" has to be assigned before this proc call.
*/
/obj/screen/proc/fill_rect(x1, y1, x2, y2)
/atom/movable/screen/proc/fill_rect(x1, y1, x2, y2)
if(assigned_map)
screen_loc = "[assigned_map]:[x1],[y1] to [x2],[y2]"
else
@@ -46,7 +46,7 @@
* Registers screen obj with the client, which makes it visible on the
* assigned map, and becomes a part of the assigned map's lifecycle.
*/
/client/proc/register_map_obj(obj/screen/screen_obj)
/client/proc/register_map_obj(atom/movable/screen/screen_obj)
if(!screen_obj.assigned_map)
CRASH("Can't register [screen_obj] without 'assigned_map' property.")
if(!screen_maps[screen_obj.assigned_map])
@@ -68,7 +68,7 @@
/client/proc/clear_map(map_name)
if(!map_name || !(map_name in screen_maps))
return FALSE
for(var/obj/screen/screen_obj in screen_maps[map_name])
for(var/atom/movable/screen/screen_obj in screen_maps[map_name])
screen_maps[map_name] -= screen_obj
if(screen_obj.del_on_map_removal)
qdel(screen_obj)
@@ -122,7 +122,7 @@
var/y_value = world.icon_size * tilesize * height
var/map_name = create_popup(popup_name, x_value, y_value)
var/obj/screen/background/background = new
var/atom/movable/screen/background/background = new
background.assigned_map = map_name
background.fill_rect(1, 1, width, height)
if(bg_icon)
+21 -21
View File
@@ -1,28 +1,28 @@
/datum/hud/monkey/New(mob/living/carbon/monkey/owner)
..()
var/obj/screen/using
var/obj/screen/inventory/inv_box
var/atom/movable/screen/using
var/atom/movable/screen/inventory/inv_box
action_intent = new /obj/screen/act_intent()
action_intent = new /atom/movable/screen/act_intent()
action_intent.icon = ui_style
action_intent.icon_state = mymob.a_intent
action_intent.screen_loc = ui_acti
action_intent.hud = src
static_inventory += action_intent
using = new /obj/screen/mov_intent()
using = new /atom/movable/screen/mov_intent()
using.icon = ui_style
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
using.screen_loc = ui_movi
using.hud = src
static_inventory += using
using = new/obj/screen/language_menu
using = new/atom/movable/screen/language_menu
using.icon = ui_style
using.hud = src
static_inventory += using
using = new /obj/screen/drop()
using = new /atom/movable/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drop_throw
using.hud = src
@@ -30,21 +30,21 @@
build_hand_slots()
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_1_m" //extra wide!
using.screen_loc = ui_swaphand_position(owner,1)
using.hud = src
static_inventory += using
using = new /obj/screen/swap_hand()
using = new /atom/movable/screen/swap_hand()
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand_position(owner,2)
using.hud = src
static_inventory += using
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "mask"
inv_box.icon = ui_style
inv_box.icon_state = "mask"
@@ -53,7 +53,7 @@
inv_box.slot_id = SLOT_WEAR_MASK
static_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "neck"
inv_box.icon = ui_style
inv_box.icon_state = "neck"
@@ -62,7 +62,7 @@
inv_box.slot_id = SLOT_NECK
static_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "head"
inv_box.icon = ui_style
inv_box.icon_state = "head"
@@ -71,7 +71,7 @@
inv_box.slot_id = SLOT_HEAD
static_inventory += inv_box
inv_box = new /obj/screen/inventory()
inv_box = new /atom/movable/screen/inventory()
inv_box.name = "back"
inv_box.icon = ui_style
inv_box.icon_state = "back"
@@ -79,37 +79,37 @@
inv_box.slot_id = SLOT_BACK
static_inventory += inv_box
throw_icon = new /obj/screen/throw_catch()
throw_icon = new /atom/movable/screen/throw_catch()
throw_icon.icon = ui_style
throw_icon.screen_loc = ui_drop_throw
throw_icon.hud = src
hotkeybuttons += throw_icon
internals = new /obj/screen/internals()
internals = new /atom/movable/screen/internals()
internals.hud = src
infodisplay += internals
healths = new /obj/screen/healths()
healths = new /atom/movable/screen/healths()
healths.hud = src
infodisplay += healths
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.screen_loc = ui_pull_resist
pull_icon.hud = src
pull_icon.update_icon()
static_inventory += pull_icon
lingchemdisplay = new /obj/screen/ling/chems()
lingchemdisplay = new /atom/movable/screen/ling/chems()
lingchemdisplay.hud = src
infodisplay += lingchemdisplay
lingstingdisplay = new /obj/screen/ling/sting()
lingstingdisplay = new /atom/movable/screen/ling/sting()
lingstingdisplay.hud = src
infodisplay += lingstingdisplay
zone_select = new /obj/screen/zone_sel()
zone_select = new /atom/movable/screen/zone_sel()
zone_select.icon = ui_style
zone_select.hud = src
zone_select.update_icon()
@@ -117,13 +117,13 @@
mymob.client.screen = list()
using = new /obj/screen/resist()
using = new /atom/movable/screen/resist()
using.icon = ui_style
using.screen_loc = ui_pull_resist
using.hud = src
hotkeybuttons += using
for(var/obj/screen/inventory/inv in (static_inventory + toggleable_inventory))
for(var/atom/movable/screen/inventory/inv in (static_inventory + toggleable_inventory))
if(inv.slot_id)
inv.hud = src
inv_slots[inv.slot_id] = inv
+5 -5
View File
@@ -8,7 +8,7 @@
//Movable Screen Object
//Not tied to the grid, places it's center where the cursor is
/obj/screen/movable
/atom/movable/screen/movable
var/snap2grid = FALSE
var/moved = FALSE
var/locked = FALSE
@@ -18,11 +18,11 @@
//Snap Screen Object
//Tied to the grid, snaps to the nearest turf
/obj/screen/movable/snap
/atom/movable/screen/movable/snap
snap2grid = TRUE
/obj/screen/movable/MouseDrop(over_object, src_location, over_location, src_control, over_control, params)
/atom/movable/screen/movable/MouseDrop(over_object, src_location, over_location, src_control, over_control, params)
if(locked) //no! I am locked! begone!
return
var/list/PM = params2list(params)
@@ -56,7 +56,7 @@
set category = "Debug"
set name = "Spawn Movable UI Object"
var/obj/screen/movable/M = new()
var/atom/movable/screen/movable/M = new()
M.name = "Movable UI Object"
M.icon_state = "block"
M.maptext = "Movable"
@@ -75,7 +75,7 @@
set category = "Debug"
set name = "Spawn Snap UI Object"
var/obj/screen/movable/snap/S = new()
var/atom/movable/screen/movable/snap/S = new()
S.name = "Snap UI Object"
S.icon_state = "block"
S.maptext = "Snap"
+26 -26
View File
@@ -7,12 +7,12 @@
if(!length(C.parallax_layers_cached))
C.parallax_layers_cached = list()
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_1(null, C.view)
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_2(null, C.view)
C.parallax_layers_cached += new /obj/screen/parallax_layer/planet(null, C.view)
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/layer_1(null, C.view)
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/layer_2(null, C.view)
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/planet(null, C.view)
if(SSparallax.random_layer)
C.parallax_layers_cached += new SSparallax.random_layer
C.parallax_layers_cached += new /obj/screen/parallax_layer/layer_3(null, C.view)
C.parallax_layers_cached += new /atom/movable/screen/parallax_layer/layer_3(null, C.view)
C.parallax_layers = C.parallax_layers_cached.Copy()
@@ -20,9 +20,9 @@
C.parallax_layers.len = C.parallax_layers_max
C.screen |= (C.parallax_layers)
var/obj/screen/plane_master/PM = screenmob.hud_used.plane_masters["[PLANE_SPACE]"]
var/atom/movable/screen/plane_master/PM = screenmob.hud_used.plane_masters["[PLANE_SPACE]"]
if(screenmob != mymob)
C.screen -= locate(/obj/screen/plane_master/parallax_white) in C.screen
C.screen -= locate(/atom/movable/screen/plane_master/parallax_white) in C.screen
C.screen += PM
PM.color = list(
0, 0, 0, 0,
@@ -37,9 +37,9 @@
var/mob/screenmob = viewmob || mymob
var/client/C = screenmob.client
C.screen -= (C.parallax_layers_cached)
var/obj/screen/plane_master/PM = screenmob.hud_used.plane_masters["[PLANE_SPACE]"]
var/atom/movable/screen/plane_master/PM = screenmob.hud_used.plane_masters["[PLANE_SPACE]"]
if(screenmob != mymob)
C.screen -= locate(/obj/screen/plane_master/parallax_white) in C.screen
C.screen -= locate(/atom/movable/screen/plane_master/parallax_white) in C.screen
C.screen += PM
PM.color = initial(PM.color)
C.parallax_layers = null
@@ -90,7 +90,7 @@
if(new_parallax_movedir == FALSE)
var/animate_time = 0
for(var/thing in C.parallax_layers)
var/obj/screen/parallax_layer/L = thing
var/atom/movable/screen/parallax_layer/L = thing
L.icon_state = initial(L.icon_state)
L.update_o(C.view)
var/T = PARALLAX_LOOP_TIME / L.speed
@@ -113,7 +113,7 @@
var/shortesttimer
if(!skip_windups)
for(var/thing in C.parallax_layers)
var/obj/screen/parallax_layer/L = thing
var/atom/movable/screen/parallax_layer/L = thing
var/T = PARALLAX_LOOP_TIME / L.speed
if (isnull(shortesttimer))
@@ -141,7 +141,7 @@
return
C.parallax_animate_timer = FALSE
for(var/thing in C.parallax_layers)
var/obj/screen/parallax_layer/L = thing
var/atom/movable/screen/parallax_layer/L = thing
if (!new_parallax_movedir)
animate(L)
continue
@@ -188,7 +188,7 @@
C.last_parallax_shift = world.time
for(var/thing in C.parallax_layers)
var/obj/screen/parallax_layer/L = thing
var/atom/movable/screen/parallax_layer/L = thing
L.update_status(mymob)
if (L.view_sized != C.view)
L.update_o(C.view)
@@ -233,7 +233,7 @@
var/area/areaobj = get_area(client.eye)
hud_used.set_parallax_movedir(areaobj.parallax_movedir, TRUE)
/obj/screen/parallax_layer
/atom/movable/screen/parallax_layer
icon = 'icons/effects/parallax.dmi'
var/speed = 1
var/offset_x = 0
@@ -246,13 +246,13 @@
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/parallax_layer/Initialize(mapload, view)
/atom/movable/screen/parallax_layer/Initialize(mapload, view)
. = ..()
if (!view)
view = world.view
update_o(view)
/obj/screen/parallax_layer/proc/update_o(view)
/atom/movable/screen/parallax_layer/proc/update_o(view)
if (!view)
view = world.view
@@ -271,52 +271,52 @@
add_overlay(new_overlays)
view_sized = view
/obj/screen/parallax_layer/proc/update_status(mob/M)
/atom/movable/screen/parallax_layer/proc/update_status(mob/M)
return
/obj/screen/parallax_layer/layer_1
/atom/movable/screen/parallax_layer/layer_1
icon_state = "layer1"
speed = 0.6
layer = 1
/obj/screen/parallax_layer/layer_2
/atom/movable/screen/parallax_layer/layer_2
icon_state = "layer2"
speed = 1
layer = 2
/obj/screen/parallax_layer/layer_3
/atom/movable/screen/parallax_layer/layer_3
icon_state = "layer3"
speed = 1.4
layer = 3
/obj/screen/parallax_layer/random
/atom/movable/screen/parallax_layer/random
blend_mode = BLEND_OVERLAY
speed = 3
layer = 3
/obj/screen/parallax_layer/random/space_gas
/atom/movable/screen/parallax_layer/random/space_gas
icon_state = "space_gas"
/obj/screen/parallax_layer/random/space_gas/Initialize(mapload, view)
/atom/movable/screen/parallax_layer/random/space_gas/Initialize(mapload, view)
. = ..()
src.add_atom_colour(SSparallax.random_parallax_color, ADMIN_COLOUR_PRIORITY)
/obj/screen/parallax_layer/random/asteroids
/atom/movable/screen/parallax_layer/random/asteroids
icon_state = "asteroids"
/obj/screen/parallax_layer/planet
/atom/movable/screen/parallax_layer/planet
icon_state = "planet"
blend_mode = BLEND_OVERLAY
absolute = TRUE //Status of seperation
speed = 3
layer = 30
/obj/screen/parallax_layer/planet/update_status(mob/M)
/atom/movable/screen/parallax_layer/planet/update_status(mob/M)
var/client/C = M.client
var/turf/posobj = get_turf(C.eye)
if(!posobj)
return
invisibility = is_station_level(posobj.z) ? 0 : INVISIBILITY_ABSTRACT
/obj/screen/parallax_layer/planet/update_o()
/atom/movable/screen/parallax_layer/planet/update_o()
return //Shit won't move
+19 -19
View File
@@ -1,4 +1,4 @@
/obj/screen/movable/pic_in_pic
/atom/movable/screen/movable/pic_in_pic
name = "Picture-in-picture"
screen_loc = "CENTER"
plane = FLOOR_PLANE
@@ -7,18 +7,18 @@
var/height = 0
var/list/shown_to = list()
var/list/viewing_turfs = list()
var/obj/screen/component_button/button_x
var/obj/screen/component_button/button_expand
var/obj/screen/component_button/button_shrink
var/atom/movable/screen/component_button/button_x
var/atom/movable/screen/component_button/button_expand
var/atom/movable/screen/component_button/button_shrink
var/mutable_appearance/standard_background
var/const/max_dimensions = 10
/obj/screen/movable/pic_in_pic/Initialize()
/atom/movable/screen/movable/pic_in_pic/Initialize()
. = ..()
make_backgrounds()
/obj/screen/movable/pic_in_pic/Destroy()
/atom/movable/screen/movable/pic_in_pic/Destroy()
for(var/C in shown_to)
unshow_to(C)
QDEL_NULL(button_x)
@@ -26,7 +26,7 @@
QDEL_NULL(button_expand)
return ..()
/obj/screen/movable/pic_in_pic/component_click(obj/screen/component_button/component, params)
/atom/movable/screen/movable/pic_in_pic/component_click(atom/movable/screen/component_button/component, params)
if(component == button_x)
qdel(src)
else if(component == button_expand)
@@ -34,13 +34,13 @@
else if(component == button_shrink)
set_view_size(width-1, height-1)
/obj/screen/movable/pic_in_pic/proc/make_backgrounds()
/atom/movable/screen/movable/pic_in_pic/proc/make_backgrounds()
standard_background = new /mutable_appearance()
standard_background.icon = 'icons/misc/pic_in_pic.dmi'
standard_background.icon_state = "background"
standard_background.layer = SPACE_LAYER
/obj/screen/movable/pic_in_pic/proc/add_buttons()
/atom/movable/screen/movable/pic_in_pic/proc/add_buttons()
var/static/mutable_appearance/move_tab
if(!move_tab)
move_tab = new /mutable_appearance()
@@ -55,7 +55,7 @@
add_overlay(move_tab)
if(!button_x)
button_x = new /obj/screen/component_button(null, src)
button_x = new /atom/movable/screen/component_button(null, src)
var/mutable_appearance/MA = new /mutable_appearance()
MA.name = "close"
MA.icon = 'icons/misc/pic_in_pic.dmi'
@@ -68,7 +68,7 @@
vis_contents += button_x
if(!button_expand)
button_expand = new /obj/screen/component_button(null, src)
button_expand = new /atom/movable/screen/component_button(null, src)
var/mutable_appearance/MA = new /mutable_appearance()
MA.name = "expand"
MA.icon = 'icons/misc/pic_in_pic.dmi'
@@ -81,7 +81,7 @@
vis_contents += button_expand
if(!button_shrink)
button_shrink = new /obj/screen/component_button(null, src)
button_shrink = new /atom/movable/screen/component_button(null, src)
var/mutable_appearance/MA = new /mutable_appearance()
MA.name = "shrink"
MA.icon = 'icons/misc/pic_in_pic.dmi'
@@ -93,7 +93,7 @@
button_shrink.transform = M
vis_contents += button_shrink
/obj/screen/movable/pic_in_pic/proc/add_background()
/atom/movable/screen/movable/pic_in_pic/proc/add_background()
if((width > 0) && (height > 0))
var/matrix/M = matrix()
M.Scale(width + 0.5, height + 0.5)
@@ -101,7 +101,7 @@
standard_background.transform = M
add_overlay(standard_background)
/obj/screen/movable/pic_in_pic/proc/set_view_size(width, height, do_refresh = TRUE)
/atom/movable/screen/movable/pic_in_pic/proc/set_view_size(width, height, do_refresh = TRUE)
width = clamp(width, 0, max_dimensions)
height = clamp(height, 0, max_dimensions)
src.width = width
@@ -115,19 +115,19 @@
if(do_refresh)
refresh_view()
/obj/screen/movable/pic_in_pic/proc/set_view_center(atom/target, do_refresh = TRUE)
/atom/movable/screen/movable/pic_in_pic/proc/set_view_center(atom/target, do_refresh = TRUE)
center = target
if(do_refresh)
refresh_view()
/obj/screen/movable/pic_in_pic/proc/refresh_view()
/atom/movable/screen/movable/pic_in_pic/proc/refresh_view()
vis_contents -= viewing_turfs
if(!width || !height)
return
viewing_turfs = get_visible_turfs()
vis_contents += viewing_turfs
/obj/screen/movable/pic_in_pic/proc/get_visible_turfs()
/atom/movable/screen/movable/pic_in_pic/proc/get_visible_turfs()
var/turf/T = get_turf(center)
if(!T)
return list()
@@ -135,12 +135,12 @@
var/turf/upperright = locate(min(world.maxx, lowerleft.x + width - 1), min(world.maxy, lowerleft.y + height - 1), lowerleft.z)
return block(lowerleft, upperright)
/obj/screen/movable/pic_in_pic/proc/show_to(client/C)
/atom/movable/screen/movable/pic_in_pic/proc/show_to(client/C)
if(C)
shown_to[C] = 1
C.screen += src
/obj/screen/movable/pic_in_pic/proc/unshow_to(client/C)
/atom/movable/screen/movable/pic_in_pic/proc/unshow_to(client/C)
if(C)
shown_to -= C
C.screen -= src
+50 -70
View File
@@ -1,4 +1,4 @@
/obj/screen/plane_master
/atom/movable/screen/plane_master
screen_loc = "CENTER"
icon_state = "blank"
appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR
@@ -6,25 +6,25 @@
var/show_alpha = 255
var/hide_alpha = 0
/obj/screen/plane_master/proc/Show(override)
/atom/movable/screen/plane_master/proc/Show(override)
alpha = override || show_alpha
/obj/screen/plane_master/proc/Hide(override)
/atom/movable/screen/plane_master/proc/Hide(override)
alpha = override || hide_alpha
//Why do plane masters need a backdrop sometimes? Read https://secure.byond.com/forum/?post=2141928
//Trust me, you need one. Period. If you don't think you do, you're doing something extremely wrong.
/obj/screen/plane_master/proc/backdrop(mob/mymob)
/atom/movable/screen/plane_master/proc/backdrop(mob/mymob)
///Things rendered on "openspace"; holes in multi-z
/obj/screen/plane_master/openspace
/atom/movable/screen/plane_master/openspace
name = "open space plane master"
plane = OPENSPACE_BACKDROP_PLANE
appearance_flags = PLANE_MASTER
blend_mode = BLEND_MULTIPLY
alpha = 255
/obj/screen/plane_master/openspace/Initialize()
/atom/movable/screen/plane_master/openspace/Initialize()
. = ..()
filters += filter(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE)
@@ -32,163 +32,143 @@
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -15)
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -20)
/obj/screen/plane_master/proc/outline(_size, _color)
/atom/movable/screen/plane_master/proc/outline(_size, _color)
filters += filter(type = "outline", size = _size, color = _color)
/obj/screen/plane_master/proc/shadow(_size, _offset = 0, _x = 0, _y = 0, _color = "#04080FAA")
/atom/movable/screen/plane_master/proc/shadow(_size, _offset = 0, _x = 0, _y = 0, _color = "#04080FAA")
filters += filter(type = "drop_shadow", x = _x, y = _y, color = _color, size = _size, offset = _offset)
///Contains just the floor
/obj/screen/plane_master/floor
/atom/movable/screen/plane_master/floor
name = "floor plane master"
plane = FLOOR_PLANE
appearance_flags = PLANE_MASTER
blend_mode = BLEND_OVERLAY
/obj/screen/plane_master/wall
/atom/movable/screen/plane_master/wall
name = "wall plane master"
plane = WALL_PLANE
appearance_flags = PLANE_MASTER
/obj/screen/plane_master/wall/backdrop(mob/mymob)
/atom/movable/screen/plane_master/wall/backdrop(mob/mymob)
if(mymob?.client?.prefs.ambientocclusion)
add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(4, "#04080FAA"))
else
remove_filter("ambient_occlusion")
/obj/screen/plane_master/above_wall
/atom/movable/screen/plane_master/above_wall
name = "above wall plane master"
plane = ABOVE_WALL_PLANE
appearance_flags = PLANE_MASTER
/obj/screen/plane_master/above_wall/Initialize()
/atom/movable/screen/plane_master/above_wall/Initialize()
. = ..()
add_filter("vision_cone", 100, list(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE))
/obj/screen/plane_master/above_wall/backdrop(mob/mymob)
/atom/movable/screen/plane_master/above_wall/backdrop(mob/mymob)
if(mymob?.client?.prefs.ambientocclusion)
add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(3, "#04080F64"))
else
remove_filter("ambient_occlusion")
///Contains most things in the game world
/obj/screen/plane_master/game_world
/atom/movable/screen/plane_master/game_world
name = "game world plane master"
plane = GAME_PLANE
appearance_flags = PLANE_MASTER //should use client color
blend_mode = BLEND_OVERLAY
/obj/screen/plane_master/game_world/Initialize()
/atom/movable/screen/plane_master/game_world/Initialize()
. = ..()
add_filter("vision_cone", 100, list(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE))
/obj/screen/plane_master/game_world/backdrop(mob/mymob)
/atom/movable/screen/plane_master/game_world/backdrop(mob/mymob)
if(mymob?.client?.prefs.ambientocclusion)
add_filter("ambient_occlusion", 0, AMBIENT_OCCLUSION(4, "#04080FAA"))
else
remove_filter("ambient_occlusion")
///Contains all shadow cone masks, whose image overrides are displayed only to their respective owners.
/obj/screen/plane_master/field_of_vision
/atom/movable/screen/plane_master/field_of_vision
name = "field of vision mask plane master"
plane = FIELD_OF_VISION_PLANE
render_target = FIELD_OF_VISION_RENDER_TARGET
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/plane_master/field_of_vision/Initialize()
/atom/movable/screen/plane_master/field_of_vision/Initialize()
. = ..()
filters += filter(type="alpha", render_source=FIELD_OF_VISION_BLOCKER_RENDER_TARGET, flags=MASK_INVERSE)
///Used to display the owner and its adjacent surroundings through the FoV plane mask.
/obj/screen/plane_master/field_of_vision_blocker
/atom/movable/screen/plane_master/field_of_vision_blocker
name = "field of vision blocker plane master"
plane = FIELD_OF_VISION_BLOCKER_PLANE
render_target = FIELD_OF_VISION_BLOCKER_RENDER_TARGET
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
///Stores the visible portion of the FoV shadow cone.
/obj/screen/plane_master/field_of_vision_visual
/atom/movable/screen/plane_master/field_of_vision_visual
name = "field of vision visual plane master"
plane = FIELD_OF_VISION_VISUAL_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/plane_master/field_of_vision_visual/Initialize()
/atom/movable/screen/plane_master/field_of_vision_visual/Initialize()
. = ..()
filters += filter(type="alpha", render_source=FIELD_OF_VISION_BLOCKER_RENDER_TARGET, flags=MASK_INVERSE)
///Contains all lighting objects
/obj/screen/plane_master/lighting
/atom/movable/screen/plane_master/lighting
name = "lighting plane master"
plane = LIGHTING_PLANE
blend_mode = BLEND_MULTIPLY
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/plane_master/lighting/backdrop(mob/mymob)
mymob.overlay_fullscreen("lighting_backdrop_lit", /obj/screen/fullscreen/lighting_backdrop/lit)
mymob.overlay_fullscreen("lighting_backdrop_unlit", /obj/screen/fullscreen/lighting_backdrop/unlit)
/atom/movable/screen/plane_master/lighting/backdrop(mob/mymob)
mymob.overlay_fullscreen("lighting_backdrop_lit", /atom/movable/screen/fullscreen/lighting_backdrop/lit)
mymob.overlay_fullscreen("lighting_backdrop_unlit", /atom/movable/screen/fullscreen/lighting_backdrop/unlit)
/obj/screen/plane_master/lighting/Initialize()
/*!
* This system works by exploiting BYONDs color matrix filter to use layers to handle emissive blockers.
*
* Emissive overlays are pasted with an atom color that converts them to be entirely some specific color.
* Emissive blockers are pasted with an atom color that converts them to be entirely some different color.
* Emissive overlays and emissive blockers are put onto the same plane.
* The layers for the emissive overlays and emissive blockers cause them to mask eachother similar to normal BYOND objects.
* A color matrix filter is applied to the emissive plane to mask out anything that isn't whatever the emissive color is.
* This is then used to alpha mask the lighting plane.
*/
/atom/movable/screen/plane_master/lighting/Initialize()
. = ..()
filters += filter(type="alpha", render_source = EMISSIVE_RENDER_TARGET, flags = MASK_INVERSE)
filters += filter(type="alpha", render_source = EMISSIVE_UNBLOCKABLE_RENDER_TARGET, flags = MASK_INVERSE)
add_filter("emissives", 1, alpha_mask_filter(render_source = EMISSIVE_RENDER_TARGET, flags = MASK_INVERSE))
add_filter("object_lighting", 2, alpha_mask_filter(render_source = O_LIGHTING_VISUAL_RENDER_TARGET, flags = MASK_INVERSE))
/**
* Things placed on this mask the lighting plane. Doesn't render directly.
*
* Gets masked by blocking plane. Use for things that you want blocked by
* mobs, items, etc.
*/
/obj/screen/plane_master/emissive
* Handles emissive overlays and emissive blockers.
*/
/atom/movable/screen/plane_master/emissive
name = "emissive plane master"
plane = EMISSIVE_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
render_target = EMISSIVE_RENDER_TARGET
/obj/screen/plane_master/emissive/Initialize()
/atom/movable/screen/plane_master/emissive/Initialize()
. = ..()
filters += filter(type="alpha", render_source=EMISSIVE_BLOCKER_RENDER_TARGET, flags=MASK_INVERSE)
filters += filter(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE)
/**
* Things placed on this always mask the lighting plane. Doesn't render directly.
*
* Always masks the light plane, isn't blocked by anything (except Field of Vision). Use for on mob glows,
* magic stuff, etc.
*/
/obj/screen/plane_master/emissive_unblockable
name = "unblockable emissive plane master"
plane = EMISSIVE_UNBLOCKABLE_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
render_target = EMISSIVE_UNBLOCKABLE_RENDER_TARGET
/obj/screen/plane_master/emissive_unblockable/Initialize()
. = ..()
filters += filter(type="alpha", render_source=FIELD_OF_VISION_RENDER_TARGET, flags=MASK_INVERSE)
/**
* Things placed on this layer mask the emissive layer. Doesn't render directly
*
* You really shouldn't be directly using this, use atom helpers instead
*/
/obj/screen/plane_master/emissive_blocker
name = "emissive blocker plane master"
plane = EMISSIVE_BLOCKER_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
render_target = EMISSIVE_BLOCKER_RENDER_TARGET
add_filter("em_block_masking", 1, color_matrix_filter(GLOB.em_mask_matrix))
///Contains space parallax
/obj/screen/plane_master/parallax
/atom/movable/screen/plane_master/parallax
name = "parallax plane master"
plane = PLANE_SPACE_PARALLAX
blend_mode = BLEND_MULTIPLY
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/plane_master/parallax_white
/atom/movable/screen/plane_master/parallax_white
name = "parallax whitifier plane master"
plane = PLANE_SPACE
/obj/screen/plane_master/camera_static
/atom/movable/screen/plane_master/camera_static
name = "camera static plane master"
plane = CAMERA_STATIC_PLANE
appearance_flags = PLANE_MASTER
@@ -196,7 +176,7 @@
//Reserved to chat messages, so they are still displayed above the field of vision masking.
/obj/screen/plane_master/chat_messages
/atom/movable/screen/plane_master/chat_messages
name = "runechat plane master"
plane = CHAT_PLANE
appearance_flags = PLANE_MASTER
+15 -15
View File
@@ -3,49 +3,49 @@
GLOBAL_LIST_EMPTY(radial_menus)
/obj/screen/radial
/atom/movable/screen/radial
icon = 'icons/mob/radial.dmi'
layer = ABOVE_HUD_LAYER
plane = ABOVE_HUD_PLANE
var/datum/radial_menu/parent
/obj/screen/radial/slice
/atom/movable/screen/radial/slice
icon_state = "radial_slice"
var/choice
var/next_page = FALSE
/obj/screen/radial/slice/MouseEntered(location, control, params)
/atom/movable/screen/radial/slice/MouseEntered(location, control, params)
. = ..()
icon_state = "radial_slice_focus"
if(tooltips)
openToolTip(usr, src, params, title = name)
/obj/screen/radial/slice/MouseExited(location, control, params)
/atom/movable/screen/radial/slice/MouseExited(location, control, params)
. = ..()
icon_state = "radial_slice"
if(tooltips)
closeToolTip(usr)
/obj/screen/radial/slice/Click(location, control, params)
/atom/movable/screen/radial/slice/Click(location, control, params)
if(usr.client == parent.current_user)
if(next_page)
parent.next_page()
else
parent.element_chosen(choice,usr)
/obj/screen/radial/center
/atom/movable/screen/radial/center
name = "Close Menu"
icon_state = "radial_center"
/obj/screen/radial/center/MouseEntered(location, control, params)
/atom/movable/screen/radial/center/MouseEntered(location, control, params)
. = ..()
icon_state = "radial_center_focus"
/obj/screen/radial/center/MouseExited(location, control, params)
/atom/movable/screen/radial/center/MouseExited(location, control, params)
. = ..()
icon_state = "radial_center"
/obj/screen/radial/center/Click(location, control, params)
/atom/movable/screen/radial/center/Click(location, control, params)
if(usr.client == parent.current_user)
parent.finished = TRUE
@@ -57,8 +57,8 @@ GLOBAL_LIST_EMPTY(radial_menus)
var/selected_choice
var/list/obj/screen/elements = list()
var/obj/screen/radial/center/close_button
var/list/atom/movable/screen/elements = list()
var/atom/movable/screen/radial/center/close_button
var/client/current_user
var/atom/anchor
var/image/menu_holder
@@ -120,7 +120,7 @@ GLOBAL_LIST_EMPTY(radial_menus)
if(elements.len < max_elements)
var/elements_to_add = max_elements - elements.len
for(var/i in 1 to elements_to_add) //Create all elements
var/obj/screen/radial/slice/new_element = new /obj/screen/radial/slice
var/atom/movable/screen/radial/slice/new_element = new /atom/movable/screen/radial/slice
new_element.tooltips = use_tooltips
new_element.parent = src
elements += new_element
@@ -152,14 +152,14 @@ GLOBAL_LIST_EMPTY(radial_menus)
var/list/page_choices = page_data[current_page]
var/angle_per_element = round(zone / page_choices.len)
for(var/i in 1 to elements.len)
var/obj/screen/radial/E = elements[i]
var/atom/movable/screen/radial/E = elements[i]
var/angle = WRAP(starting_angle + (i - 1) * angle_per_element,0,360)
if(i > page_choices.len)
HideElement(E)
else
SetElement(E,page_choices[i],angle,anim = anim,anim_order = i)
/datum/radial_menu/proc/HideElement(obj/screen/radial/slice/E)
/datum/radial_menu/proc/HideElement(atom/movable/screen/radial/slice/E)
E.cut_overlays()
E.alpha = 0
E.name = "None"
@@ -168,7 +168,7 @@ GLOBAL_LIST_EMPTY(radial_menus)
E.choice = null
E.next_page = FALSE
/datum/radial_menu/proc/SetElement(obj/screen/radial/slice/E,choice_id,angle,anim,anim_order)
/datum/radial_menu/proc/SetElement(atom/movable/screen/radial/slice/E,choice_id,angle,anim,anim_order)
//Position
var/py = round(cos(angle) * radius) + py_shift
var/px = round(sin(angle) * radius)
+5 -5
View File
@@ -2,19 +2,19 @@
A derivative of radial menu which persists onscreen until closed and invokes a callback each time an element is clicked
*/
/obj/screen/radial/persistent/center
/atom/movable/screen/radial/persistent/center
name = "Close Menu"
icon_state = "radial_center"
/obj/screen/radial/persistent/center/Click(location, control, params)
/atom/movable/screen/radial/persistent/center/Click(location, control, params)
if(usr.client == parent.current_user)
parent.element_chosen(null,usr)
/obj/screen/radial/persistent/center/MouseEntered(location, control, params)
/atom/movable/screen/radial/persistent/center/MouseEntered(location, control, params)
. = ..()
icon_state = "radial_center_focus"
/obj/screen/radial/persistent/center/MouseExited(location, control, params)
/atom/movable/screen/radial/persistent/center/MouseExited(location, control, params)
. = ..()
icon_state = "radial_center"
@@ -25,7 +25,7 @@
var/datum/callback/select_proc_callback
/datum/radial_menu/persistent/New()
close_button = new /obj/screen/radial/persistent/center
close_button = new /atom/movable/screen/radial/persistent/center
close_button.parent = src
+1 -1
View File
@@ -2,6 +2,6 @@
/datum/hud/revenant/New(mob/owner)
..()
healths = new /obj/screen/healths/revenant()
healths = new /atom/movable/screen/healths/revenant()
healths.hud = src
infodisplay += healths
+45 -45
View File
@@ -1,15 +1,15 @@
/obj/screen/robot
/atom/movable/screen/robot
icon = 'icons/mob/screen_cyborg.dmi'
/obj/screen/robot/module
/atom/movable/screen/robot/module
name = "cyborg module"
icon_state = "nomod"
/obj/screen/robot/Click()
/atom/movable/screen/robot/Click()
if(isobserver(usr))
return 1
/obj/screen/robot/module/Click()
/atom/movable/screen/robot/module/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
@@ -18,51 +18,51 @@
return 1
R.pick_module()
/obj/screen/robot/module1
/atom/movable/screen/robot/module1
name = "module1"
icon_state = "inv1"
/obj/screen/robot/module1/Click()
/atom/movable/screen/robot/module1/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
R.toggle_module(1)
/obj/screen/robot/module2
/atom/movable/screen/robot/module2
name = "module2"
icon_state = "inv2"
/obj/screen/robot/module2/Click()
/atom/movable/screen/robot/module2/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
R.toggle_module(2)
/obj/screen/robot/module3
/atom/movable/screen/robot/module3
name = "module3"
icon_state = "inv3"
/obj/screen/robot/module3/Click()
/atom/movable/screen/robot/module3/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
R.toggle_module(3)
/obj/screen/robot/radio
/atom/movable/screen/robot/radio
name = "radio"
icon_state = "radio"
/obj/screen/robot/radio/Click()
/atom/movable/screen/robot/radio/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
R.radio.interact(R)
/obj/screen/robot/store
/atom/movable/screen/robot/store
name = "store"
icon_state = "store"
/obj/screen/robot/store/Click()
/atom/movable/screen/robot/store/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
@@ -75,35 +75,35 @@
..()
// i, Robit
var/mob/living/silicon/robot/robit = mymob
var/obj/screen/using
var/atom/movable/screen/using
using = new/obj/screen/language_menu
using = new/atom/movable/screen/language_menu
using.screen_loc = ui_borg_language_menu
static_inventory += using
//Radio
using = new /obj/screen/robot/radio()
using = new /atom/movable/screen/robot/radio()
using.screen_loc = ui_borg_radio
using.hud = src
static_inventory += using
//Module select
if(!robit.inv1)
robit.inv1 = new /obj/screen/robot/module1()
robit.inv1 = new /atom/movable/screen/robot/module1()
robit.inv1.screen_loc = ui_inv1
robit.inv1.hud = src
static_inventory += robit.inv1
if(!robit.inv2)
robit.inv2 = new /obj/screen/robot/module2()
robit.inv2 = new /atom/movable/screen/robot/module2()
robit.inv2.screen_loc = ui_inv2
robit.inv2.hud = src
static_inventory += robit.inv2
if(!robit.inv3)
robit.inv3 = new /obj/screen/robot/module3()
robit.inv3 = new /atom/movable/screen/robot/module3()
robit.inv3.screen_loc = ui_inv3
robit.inv3.hud = src
@@ -111,73 +111,73 @@
//End of module select
using = new /obj/screen/robot/lamp()
using = new /atom/movable/screen/robot/lamp()
using.screen_loc = ui_borg_lamp
using.hud = src
static_inventory += using
robit.lampButton = using
var/obj/screen/robot/lamp/lampscreen = using
var/atom/movable/screen/robot/lamp/lampscreen = using
lampscreen.robot = robit
//Photography stuff
using = new /obj/screen/ai/image_take()
using = new /atom/movable/screen/ai/image_take()
using.screen_loc = ui_borg_camera
using.hud = src
static_inventory += using
//Sec/Med HUDs
using = new /obj/screen/robot/sensors()
using = new /atom/movable/screen/robot/sensors()
using.screen_loc = ui_borg_sensor
using.hud = src
static_inventory += using
//Borg Integrated Tablet
using = new /obj/screen/robot/modPC()
using = new /atom/movable/screen/robot/modPC()
using.screen_loc = ui_borg_tablet
using.hud = src
static_inventory += using
robit.interfaceButton = using
if(robit.modularInterface)
using.vis_contents += robit.modularInterface
var/obj/screen/robot/modPC/tabletbutton = using
var/atom/movable/screen/robot/modPC/tabletbutton = using
tabletbutton.robot = robit
//Alerts
using = new /obj/screen/robot/alerts()
using = new /atom/movable/screen/robot/alerts()
using.screen_loc = ui_borg_alerts
using.hud = src
static_inventory += using
//Thrusters
using = new /obj/screen/robot/thrusters()
using = new /atom/movable/screen/robot/thrusters()
using.screen_loc = ui_borg_thrusters
using.hud = src
static_inventory += using
robit.thruster_button = using
//Intent
action_intent = new /obj/screen/act_intent/robot()
action_intent = new /atom/movable/screen/act_intent/robot()
action_intent.icon_state = mymob.a_intent
action_intent.hud = src
static_inventory += action_intent
//Health
healths = new /obj/screen/healths/robot()
healths = new /atom/movable/screen/healths/robot()
healths.hud = src
infodisplay += healths
//Installed Module
robit.hands = new /obj/screen/robot/module()
robit.hands = new /atom/movable/screen/robot/module()
robit.hands.screen_loc = ui_borg_module
robit.hands.hud = src
static_inventory += robit.hands
//Store
module_store_icon = new /obj/screen/robot/store()
module_store_icon = new /atom/movable/screen/robot/store()
module_store_icon.screen_loc = ui_borg_store
module_store_icon.hud = src
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = 'icons/mob/screen_cyborg.dmi'
pull_icon.screen_loc = ui_borg_pull
pull_icon.hud = src
@@ -185,7 +185,7 @@
hotkeybuttons += pull_icon
zone_select = new /obj/screen/zone_sel/robot()
zone_select = new /atom/movable/screen/zone_sel/robot()
zone_select.hud = src
zone_select.update_icon()
static_inventory += zone_select
@@ -283,61 +283,61 @@
for(var/obj/item/I in R.held_items)
screenmob.client.screen -= I
/obj/screen/robot/lamp
/atom/movable/screen/robot/lamp
name = "headlamp"
icon_state = "lamp_off"
var/mob/living/silicon/robot/robot
/obj/screen/robot/lamp/Click()
/atom/movable/screen/robot/lamp/Click()
. = ..()
if(.)
return
robot?.toggle_headlamp()
update_icon()
/obj/screen/robot/lamp/update_icon()
/atom/movable/screen/robot/lamp/update_icon()
if(robot?.lamp_enabled)
icon_state = "lamp_on"
else
icon_state = "lamp_off"
/obj/screen/robot/alerts
/atom/movable/screen/robot/alerts
name = "Alert Panel"
icon = 'icons/mob/screen_ai.dmi'
icon_state = "alerts"
/obj/screen/robot/alerts/Click()
/atom/movable/screen/robot/alerts/Click()
. = ..()
if(.)
return
var/mob/living/silicon/robot/borgo = usr
borgo.robot_alerts()
/obj/screen/robot/thrusters
/atom/movable/screen/robot/thrusters
name = "ion thrusters"
icon_state = "ionpulse0"
/obj/screen/robot/thrusters/Click()
/atom/movable/screen/robot/thrusters/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
R.toggle_ionpulse()
/obj/screen/robot/sensors
/atom/movable/screen/robot/sensors
name = "Sensor Augmentation"
icon_state = "cyborg_sensor"
/obj/screen/robot/sensors/Click()
/atom/movable/screen/robot/sensors/Click()
if(..())
return
var/mob/living/silicon/S = usr
S.toggle_sensors()
/obj/screen/robot/modPC
/atom/movable/screen/robot/modPC
name = "Modular Interface"
icon_state = "template"
var/mob/living/silicon/robot/robot
/obj/screen/robot/modPC/Click()
/atom/movable/screen/robot/modPC/Click()
. = ..()
if(.)
return
+99 -85
View File
@@ -6,12 +6,11 @@
They are used with the client/screen list and the screen_loc var.
For more information, see the byond documentation on the screen_loc and screen vars.
*/
/obj/screen
/atom/movable/screen
name = ""
icon = 'icons/mob/screen_gen.dmi'
layer = HUD_LAYER
plane = HUD_PLANE
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
animate_movement = SLIDE_STEPS
speech_span = SPAN_ROBOT
vis_flags = VIS_INHERIT_PLANE
@@ -34,24 +33,21 @@
*/
var/del_on_map_removal = TRUE
/obj/screen/take_damage()
return
/obj/screen/Destroy()
/atom/movable/screen/Destroy()
master = null
hud = null
return ..()
/obj/screen/examine(mob/user)
/atom/movable/screen/examine(mob/user)
return list()
/obj/screen/orbit()
/atom/movable/screen/orbit()
return
/obj/screen/proc/component_click(obj/screen/component_button/component, params)
/atom/movable/screen/proc/component_click(atom/movable/screen/component_button/component, params)
return
/obj/screen/text
/atom/movable/screen/text
icon = null
icon_state = null
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
@@ -59,12 +55,12 @@
maptext_height = 480
maptext_width = 480
/obj/screen/swap_hand
/atom/movable/screen/swap_hand
layer = HUD_LAYER
plane = HUD_PLANE
name = "swap hand"
/obj/screen/swap_hand/Click()
/atom/movable/screen/swap_hand/Click()
// At this point in client Click() code we have passed the 1/10 sec check and little else
// We don't even know if it's a middle click
// if(world.time <= usr.next_move)
@@ -78,19 +74,19 @@
M.swap_hand()
return 1
/obj/screen/craft
/atom/movable/screen/craft
name = "crafting menu"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "craft"
screen_loc = ui_crafting
/obj/screen/area_creator
/atom/movable/screen/area_creator
name = "create new area"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "area_edit"
screen_loc = ui_building
/obj/screen/area_creator/Click()
/atom/movable/screen/area_creator/Click()
if(usr.incapacitated() || (isobserver(usr) && !IsAdminGhost(usr)))
return TRUE
var/area/A = get_area(usr)
@@ -99,18 +95,18 @@
return TRUE
create_area(usr)
/obj/screen/language_menu
/atom/movable/screen/language_menu
name = "language menu"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "talk_wheel"
screen_loc = ui_language_menu
/obj/screen/language_menu/Click()
/atom/movable/screen/language_menu/Click()
var/mob/M = usr
var/datum/language_holder/H = M.get_language_holder()
H.open_language_menu(usr)
/obj/screen/inventory
/atom/movable/screen/inventory
/// The identifier for the slot. It has nothing to do with ID cards.
var/slot_id
/// Icon when empty. For now used only by humans.
@@ -122,7 +118,7 @@
layer = HUD_LAYER
plane = HUD_PLANE
/obj/screen/inventory/Click(location, control, params)
/atom/movable/screen/inventory/Click(location, control, params)
// At this point in client Click() code we have passed the 1/10 sec check and little else
// We don't even know if it's a middle click
// if(world.time <= usr.next_move)
@@ -142,16 +138,34 @@
usr.update_inv_hands()
return TRUE
/obj/screen/inventory/MouseEntered()
/atom/movable/screen/inventory/MouseEntered()
..()
add_overlays()
//Apply the outline affect
add_stored_outline()
/obj/screen/inventory/MouseExited()
/atom/movable/screen/inventory/MouseExited()
..()
cut_overlay(object_overlays)
object_overlays.Cut()
remove_stored_outline()
/obj/screen/inventory/update_icon_state()
/atom/movable/screen/inventory/proc/add_stored_outline()
if(hud?.mymob && slot_id)
var/obj/item/inv_item = hud.mymob.get_item_by_slot(slot_id)
if(inv_item)
if(hud?.mymob.incapacitated() || (slot_id in hud?.mymob.check_obscured_slots()) || !hud?.mymob.canUnEquip(inv_item))
inv_item.apply_outline(_size = 3)
else
inv_item.apply_outline()
/atom/movable/screen/inventory/proc/remove_stored_outline()
if(hud?.mymob && slot_id)
var/obj/item/inv_item = hud.mymob.get_item_by_slot(slot_id)
if(inv_item)
inv_item.remove_outline()
/atom/movable/screen/inventory/update_icon_state()
if(!icon_empty)
icon_empty = icon_state
@@ -161,7 +175,7 @@
else
icon_state = icon_empty
/obj/screen/inventory/proc/add_overlays()
/atom/movable/screen/inventory/proc/add_overlays()
var/mob/user = hud?.mymob
if(!user || !slot_id)
@@ -184,12 +198,12 @@
// object_overlay = item_overlay
add_overlay(object_overlays)
/obj/screen/inventory/hand
/atom/movable/screen/inventory/hand
var/mutable_appearance/handcuff_overlay
var/static/mutable_appearance/blocked_overlay = mutable_appearance('icons/mob/screen_gen.dmi', "blocked")
var/held_index = 0
/obj/screen/inventory/hand/update_overlays()
/atom/movable/screen/inventory/hand/update_overlays()
. = ..()
if(!handcuff_overlay)
@@ -212,7 +226,7 @@
. += "hand_active"
/obj/screen/inventory/hand/Click(location, control, params)
/atom/movable/screen/inventory/hand/Click(location, control, params)
// At this point in client Click() code we have passed the 1/10 sec check and little else
// We don't even know if it's a middle click
var/mob/user = hud?.mymob
@@ -234,26 +248,26 @@
return TRUE
/obj/screen/drop
/atom/movable/screen/drop
name = "drop"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "act_drop"
layer = HUD_LAYER
plane = HUD_PLANE
/obj/screen/drop/Click()
/atom/movable/screen/drop/Click()
if(usr.stat == CONSCIOUS)
usr.dropItemToGround(usr.get_active_held_item())
/obj/screen/act_intent
/atom/movable/screen/act_intent
name = "intent"
icon_state = "help"
screen_loc = ui_acti
/obj/screen/act_intent/Click(location, control, params)
/atom/movable/screen/act_intent/Click(location, control, params)
usr.a_intent_change(INTENT_HOTKEY_RIGHT)
/obj/screen/act_intent/segmented/Click(location, control, params)
/atom/movable/screen/act_intent/segmented/Click(location, control, params)
if(usr.client.prefs.toggles & INTENT_STYLE)
var/_x = text2num(params2list(params)["icon-x"])
var/_y = text2num(params2list(params)["icon-y"])
@@ -272,20 +286,20 @@
else
return ..()
/obj/screen/act_intent/alien
/atom/movable/screen/act_intent/alien
icon = 'icons/mob/screen_alien.dmi'
screen_loc = ui_movi
/obj/screen/act_intent/robot
/atom/movable/screen/act_intent/robot
icon = 'icons/mob/screen_cyborg.dmi'
screen_loc = ui_borg_intents
/obj/screen/internals
/atom/movable/screen/internals
name = "toggle internals"
icon_state = "internal0"
screen_loc = ui_internal
/obj/screen/internals/Click()
/atom/movable/screen/internals/Click()
if(!iscarbon(usr))
return
var/mob/living/carbon/C = usr
@@ -346,71 +360,71 @@
return
C.update_action_buttons_icon()
/obj/screen/mov_intent
/atom/movable/screen/mov_intent
name = "run/walk toggle"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "running"
/obj/screen/mov_intent/Initialize(mapload)
/atom/movable/screen/mov_intent/Initialize(mapload)
. = ..()
update_icon()
/obj/screen/mov_intent/Click()
/atom/movable/screen/mov_intent/Click()
toggle(usr)
/obj/screen/mov_intent/update_icon_state()
/atom/movable/screen/mov_intent/update_icon_state()
switch(hud?.mymob?.m_intent)
if(MOVE_INTENT_WALK)
icon_state = CONFIG_GET(flag/sprint_enabled)? "walking" : "walking_nosprint"
if(MOVE_INTENT_RUN)
icon_state = CONFIG_GET(flag/sprint_enabled)? "running" : "running_nosprint"
/obj/screen/mov_intent/proc/toggle(mob/user)
/atom/movable/screen/mov_intent/proc/toggle(mob/user)
if(isobserver(user))
return
user.toggle_move_intent(user)
/obj/screen/pull
/atom/movable/screen/pull
name = "stop pulling"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "pull"
/obj/screen/pull/Click()
/atom/movable/screen/pull/Click()
if(isobserver(usr))
return
usr.stop_pulling()
/obj/screen/pull/update_icon_state()
/atom/movable/screen/pull/update_icon_state()
if(hud?.mymob?.pulling)
icon_state = "pull"
else
icon_state = "pull0"
/obj/screen/resist
/atom/movable/screen/resist
name = "resist"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "act_resist"
layer = HUD_LAYER
plane = HUD_PLANE
/obj/screen/resist/Click()
/atom/movable/screen/resist/Click()
if(isliving(usr))
var/mob/living/L = usr
L.resist()
/obj/screen/rest
/atom/movable/screen/rest
name = "rest"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "act_rest"
layer = HUD_LAYER
plane = HUD_PLANE
/obj/screen/rest/Click()
/atom/movable/screen/rest/Click()
if(isliving(usr))
var/mob/living/L = usr
L.lay_down()
/obj/screen/rest/update_icon_state()
/atom/movable/screen/rest/update_icon_state()
var/mob/living/user = hud?.mymob
if(!istype(user))
return
@@ -419,17 +433,17 @@
else
icon_state = "act_rest0"
/obj/screen/throw_catch
/atom/movable/screen/throw_catch
name = "throw/catch"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "act_throw_off"
/obj/screen/throw_catch/Click()
/atom/movable/screen/throw_catch/Click()
if(iscarbon(usr))
var/mob/living/carbon/C = usr
C.toggle_throw_mode()
/obj/screen/zone_sel
/atom/movable/screen/zone_sel
name = "damage zone"
icon_state = "zone_sel"
screen_loc = ui_zonesel
@@ -437,7 +451,7 @@
var/static/list/hover_overlays_cache = list()
var/hovering
/obj/screen/zone_sel/Click(location, control,params)
/atom/movable/screen/zone_sel/Click(location, control,params)
if(isobserver(usr))
return
@@ -450,10 +464,10 @@
return set_selected_zone(choice, usr)
/obj/screen/zone_sel/MouseEntered(location, control, params)
/atom/movable/screen/zone_sel/MouseEntered(location, control, params)
MouseMove(location, control, params)
/obj/screen/zone_sel/MouseMove(location, control, params)
/atom/movable/screen/zone_sel/MouseMove(location, control, params)
if(isobserver(usr))
return
@@ -482,12 +496,12 @@
layer = ABOVE_HUD_LAYER
plane = ABOVE_HUD_PLANE
/obj/screen/zone_sel/MouseExited(location, control, params)
/atom/movable/screen/zone_sel/MouseExited(location, control, params)
if(!isobserver(usr) && hovering)
vis_contents -= hover_overlays_cache[hovering]
hovering = null
/obj/screen/zone_sel/proc/get_zone_at(icon_x, icon_y)
/atom/movable/screen/zone_sel/proc/get_zone_at(icon_x, icon_y)
switch(icon_y)
if(1 to 9) //Legs
switch(icon_x)
@@ -525,7 +539,7 @@
return BODY_ZONE_PRECISE_EYES
return BODY_ZONE_HEAD
/obj/screen/zone_sel/proc/set_selected_zone(choice, mob/user)
/atom/movable/screen/zone_sel/proc/set_selected_zone(choice, mob/user)
if(user != hud?.mymob)
return
@@ -535,21 +549,21 @@
return TRUE
/obj/screen/zone_sel/update_overlays()
/atom/movable/screen/zone_sel/update_overlays()
. = ..()
if(!hud?.mymob)
return
. += mutable_appearance(overlay_icon, "[hud.mymob.zone_selected]")
/obj/screen/zone_sel/alien
/atom/movable/screen/zone_sel/alien
icon = 'icons/mob/screen_alien.dmi'
overlay_icon = 'icons/mob/screen_alien.dmi'
/obj/screen/zone_sel/robot
/atom/movable/screen/zone_sel/robot
icon = 'icons/mob/screen_cyborg.dmi'
/obj/screen/flash
/atom/movable/screen/flash
name = "flash"
icon_state = "blank"
blend_mode = BLEND_ADD
@@ -557,7 +571,7 @@
layer = FLASH_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/damageoverlay
/atom/movable/screen/damageoverlay
icon = 'icons/mob/screen_full.dmi'
icon_state = "oxydamageoverlay0"
name = "dmg"
@@ -567,87 +581,87 @@
layer = UI_DAMAGE_LAYER
plane = FULLSCREEN_PLANE
/obj/screen/healths
/atom/movable/screen/healths
name = "health"
icon_state = "health0"
screen_loc = ui_health
/obj/screen/healths/alien
/atom/movable/screen/healths/alien
icon = 'icons/mob/screen_alien.dmi'
screen_loc = ui_alien_health
/obj/screen/healths/robot
/atom/movable/screen/healths/robot
icon = 'icons/mob/screen_cyborg.dmi'
screen_loc = ui_borg_health
/obj/screen/healths/blob
/atom/movable/screen/healths/blob
name = "blob health"
icon_state = "block"
screen_loc = ui_internal
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/healths/blob/naut
/atom/movable/screen/healths/blob/naut
name = "health"
icon = 'icons/mob/blob.dmi'
icon_state = "nauthealth"
/obj/screen/healths/blob/naut/core
/atom/movable/screen/healths/blob/naut/core
name = "overmind health"
screen_loc = ui_health
icon_state = "corehealth"
/obj/screen/healths/guardian
/atom/movable/screen/healths/guardian
name = "summoner health"
icon = 'icons/mob/guardian.dmi'
icon_state = "base"
screen_loc = ui_health
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/healths/clock
/atom/movable/screen/healths/clock
icon = 'icons/mob/actions.dmi'
icon_state = "bg_clock"
screen_loc = ui_health
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/healths/clock/gear
/atom/movable/screen/healths/clock/gear
icon = 'icons/mob/clockwork_mobs.dmi'
icon_state = "bg_gear"
screen_loc = ui_internal
/obj/screen/healths/revenant
/atom/movable/screen/healths/revenant
name = "essence"
icon = 'icons/mob/actions.dmi'
icon_state = "bg_revenant"
screen_loc = ui_health
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/healths/construct
/atom/movable/screen/healths/construct
icon = 'icons/mob/screen_construct.dmi'
icon_state = "artificer_health0"
screen_loc = ui_construct_health
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/healths/lavaland_elite
/atom/movable/screen/healths/lavaland_elite
icon = 'icons/mob/screen_elite.dmi'
icon_state = "elite_health0"
screen_loc = ui_health
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/healthdoll
/atom/movable/screen/healthdoll
name = "health doll"
screen_loc = ui_healthdoll
/obj/screen/healthdoll/living
/atom/movable/screen/healthdoll/living
icon_state = "fullhealth0"
screen_loc = ui_living_healthdoll
var/filtered = FALSE //so we don't repeatedly create the mask of the mob every update
/obj/screen/mood
/atom/movable/screen/mood
name = "mood"
icon_state = "mood5"
screen_loc = ui_mood
/obj/screen/splash
/atom/movable/screen/splash
icon = 'icons/blank_title.png'
icon_state = ""
screen_loc = "1,1"
@@ -655,7 +669,7 @@
plane = SPLASHSCREEN_PLANE
var/client/holder
/obj/screen/splash/New(client/C, visible, use_previous_title) //TODO: Make this use INITIALIZE_IMMEDIATE, except its not easy
/atom/movable/screen/splash/New(client/C, visible, use_previous_title) //TODO: Make this use INITIALIZE_IMMEDIATE, except its not easy
. = ..()
holder = C
@@ -674,7 +688,7 @@
holder.screen += src
/obj/screen/splash/proc/Fade(out, qdel_after = TRUE)
/atom/movable/screen/splash/proc/Fade(out, qdel_after = TRUE)
if(QDELETED(src))
return
if(out)
@@ -685,20 +699,20 @@
if(qdel_after)
QDEL_IN(src, 30)
/obj/screen/splash/Destroy()
/atom/movable/screen/splash/Destroy()
if(holder)
holder.screen -= src
holder = null
return ..()
/obj/screen/component_button
var/obj/screen/parent
/atom/movable/screen/component_button
var/atom/movable/screen/parent
/obj/screen/component_button/Initialize(mapload, obj/screen/parent)
/atom/movable/screen/component_button/Initialize(mapload, atom/movable/screen/parent)
. = ..()
src.parent = parent
/obj/screen/component_button/Click(params)
/atom/movable/screen/component_button/Click(params)
if(parent)
parent.component_click(src, params)
+12 -12
View File
@@ -1,37 +1,37 @@
/obj/screen/action_bar
/atom/movable/screen/action_bar
/obj/screen/action_bar/Destroy()
/atom/movable/screen/action_bar/Destroy()
STOP_PROCESSING(SShuds, src)
return ..()
/obj/screen/action_bar/proc/mark_dirty()
/atom/movable/screen/action_bar/proc/mark_dirty()
var/mob/living/L = hud?.mymob
if(L?.client && update_to_mob(L))
START_PROCESSING(SShuds, src)
/obj/screen/action_bar/process()
/atom/movable/screen/action_bar/process()
var/mob/living/L = hud?.mymob
if(!L?.client || !update_to_mob(L))
return PROCESS_KILL
/obj/screen/action_bar/proc/update_to_mob(mob/living/L)
/atom/movable/screen/action_bar/proc/update_to_mob(mob/living/L)
return FALSE
/datum/hud/var/obj/screen/action_bar/clickdelay/clickdelay
/datum/hud/var/atom/movable/screen/action_bar/clickdelay/clickdelay
/obj/screen/action_bar/clickdelay
/atom/movable/screen/action_bar/clickdelay
name = "click delay"
icon = 'icons/effects/progessbar.dmi'
icon_state = "prog_bar_100"
layer = 20 // under hand buttons
/obj/screen/action_bar/clickdelay/Initialize()
/atom/movable/screen/action_bar/clickdelay/Initialize()
. = ..()
var/matrix/M = new
M.Scale(2, 1)
transform = M
/obj/screen/action_bar/clickdelay/update_to_mob(mob/living/L)
/atom/movable/screen/action_bar/clickdelay/update_to_mob(mob/living/L)
var/estimated = L.EstimatedNextActionTime()
var/diff = estimated - L.last_action
var/left = estimated - world.time
@@ -41,14 +41,14 @@
icon_state = "prog_bar_[round(clamp(((diff - left)/diff) * 100, 0, 100), 5)]"
return TRUE
/datum/hud/var/obj/screen/action_bar/resistdelay/resistdelay
/datum/hud/var/atom/movable/screen/action_bar/resistdelay/resistdelay
/obj/screen/action_bar/resistdelay
/atom/movable/screen/action_bar/resistdelay
name = "resist delay"
icon = 'icons/effects/progessbar.dmi'
icon_state = "prog_bar_100"
/obj/screen/action_bar/resistdelay/update_to_mob(mob/living/L)
/atom/movable/screen/action_bar/resistdelay/update_to_mob(mob/living/L)
var/diff = L.next_resist - L.last_resist
var/left = L.next_resist - world.time
if(left < 0 || diff < 0)
+9 -9
View File
@@ -1,19 +1,19 @@
/obj/screen/mov_intent
/atom/movable/screen/mov_intent
icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
/obj/screen/sprintbutton
/atom/movable/screen/sprintbutton
name = "toggle sprint"
icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
icon_state = "act_sprint"
layer = ABOVE_HUD_LAYER - 0.1
var/mutable_appearance/flashy
/obj/screen/sprintbutton/Click()
/atom/movable/screen/sprintbutton/Click()
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
H.default_toggle_sprint()
/obj/screen/sprintbutton/update_icon_state()
/atom/movable/screen/sprintbutton/update_icon_state()
var/mob/living/user = hud?.mymob
if(!istype(user))
return
@@ -24,7 +24,7 @@
else
icon_state = "act_sprint"
/obj/screen/sprintbutton/update_overlays()
/atom/movable/screen/sprintbutton/update_overlays()
. = ..()
var/mob/living/carbon/user = hud?.mymob
if(!istype(user) || !user.client)
@@ -38,20 +38,20 @@
. += flashy
//Sprint buffer onscreen code.
/datum/hud/var/obj/screen/sprint_buffer/sprint_buffer
/datum/hud/var/atom/movable/screen/sprint_buffer/sprint_buffer
/obj/screen/sprint_buffer
/atom/movable/screen/sprint_buffer
name = "sprint buffer"
icon = 'icons/effects/progessbar.dmi'
icon_state = "prog_bar_100"
/obj/screen/sprint_buffer/Click()
/atom/movable/screen/sprint_buffer/Click()
if(isliving(usr))
var/mob/living/L = usr
to_chat(L, "<span class='boldnotice'>Your sprint buffer's maximum capacity is [L.sprint_buffer_max]. It is currently at [L.sprint_buffer], regenerating at [L.sprint_buffer_regen_ds * 10] per second. \
Sprinting while this is empty will incur a [L.sprint_stamina_cost] stamina cost per tile.</span>")
/obj/screen/sprint_buffer/proc/update_to_mob(mob/living/L)
/atom/movable/screen/sprint_buffer/proc/update_to_mob(mob/living/L)
var/amount = 0
if(L.sprint_buffer_max > 0)
amount = round(clamp((L.sprint_buffer / L.sprint_buffer_max) * 100, 0, 100), 5)
+12 -12
View File
@@ -1,21 +1,21 @@
/datum/hud/var/obj/screen/staminas/staminas
/datum/hud/var/obj/screen/staminabuffer/staminabuffer
/datum/hud/var/atom/movable/screen/staminas/staminas
/datum/hud/var/atom/movable/screen/staminabuffer/staminabuffer
/obj/screen/staminas
/atom/movable/screen/staminas
icon = 'modular_citadel/icons/ui/screen_gen.dmi'
name = "stamina"
icon_state = "stamina0"
screen_loc = ui_stamina
mouse_opacity = 1
/obj/screen/staminas/Click(location,control,params)
/atom/movable/screen/staminas/Click(location,control,params)
if(isliving(usr))
var/mob/living/L = usr
CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/buffer_max, buffer_max)
to_chat(L, "<span class='notice'>You have <b>[L.getStaminaLoss()]</b> stamina loss.<br>\
<br>Your stamina buffer is <b>[round((L.stamina_buffer / buffer_max) * 100, 0.1)]%</b> full.</span>")
/obj/screen/staminas/update_icon_state()
/atom/movable/screen/staminas/update_icon_state()
var/mob/living/carbon/user = hud?.mymob
if(!user)
return
@@ -26,21 +26,21 @@
else
icon_state = "stamina[clamp(FLOOR(user.getStaminaLoss() /20, 1), 0, 6)]"
/obj/screen/staminas/update_overlays()
/atom/movable/screen/staminas/update_overlays()
. = ..()
var/mob/living/carbon/user = hud?.mymob
if(!user)
return
var/percent = user.getStaminaLoss() / STAMINA_CRIT
if((user.stat == DEAD) || (user.combat_flags & COMBAT_FLAG_HARD_STAMCRIT) || (user.hal_screwyhud in 1 to 2))
. += list("stamina_alert3")
. += list("stamina_alert3")
else if(percent >= 0.85)
. += list("stamina_alert2")
else if(percent >= 0.7)
. += list("stamina_alert1")
//stam buffer
/obj/screen/staminabuffer
/atom/movable/screen/staminabuffer
icon = 'modular_citadel/icons/ui/screen_gen.dmi'
name = "stamina buffer"
icon_state = "stambuffer0"
@@ -48,19 +48,19 @@
layer = ABOVE_HUD_LAYER + 0.1
mouse_opacity = 0
/obj/screen/staminabuffer/proc/mark_dirty()
/atom/movable/screen/staminabuffer/proc/mark_dirty()
if(update_to_mob())
START_PROCESSING(SShuds, src)
/obj/screen/staminabuffer/process()
/atom/movable/screen/staminabuffer/process()
if(!update_to_mob())
return PROCESS_KILL
/obj/screen/staminabuffer/Destroy()
/atom/movable/screen/staminabuffer/Destroy()
STOP_PROCESSING(SShuds, src)
return ..()
/obj/screen/staminabuffer/proc/update_to_mob()
/atom/movable/screen/staminabuffer/proc/update_to_mob()
var/mob/living/carbon/user = hud?.mymob
user.UpdateStaminaBuffer(FALSE)
CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/buffer_max, buffer_max)
+42 -42
View File
@@ -1,12 +1,12 @@
/obj/screen/storage
/atom/movable/screen/storage
name = "storage"
var/insertion_click = FALSE
/obj/screen/storage/Initialize(mapload, new_master)
/atom/movable/screen/storage/Initialize(mapload, new_master)
. = ..()
master = new_master
/obj/screen/storage/Click(location, control, params)
/atom/movable/screen/storage/Click(location, control, params)
if(!insertion_click)
return ..()
if(hud?.mymob && (hud.mymob != usr))
@@ -18,7 +18,7 @@
master.attackby(null, I, usr, params)
return TRUE
/obj/screen/storage/boxes
/atom/movable/screen/storage/boxes
name = "storage"
icon_state = "block"
screen_loc = "7,7 to 10,8"
@@ -26,83 +26,83 @@
plane = HUD_PLANE
insertion_click = TRUE
/obj/screen/storage/close
/atom/movable/screen/storage/close
name = "close"
layer = ABOVE_HUD_LAYER
plane = ABOVE_HUD_PLANE
icon_state = "backpack_close"
/obj/screen/storage/close/Click()
/atom/movable/screen/storage/close/Click()
var/datum/component/storage/S = master
S.close(usr)
return TRUE
/obj/screen/storage/left
/atom/movable/screen/storage/left
icon_state = "storage_start"
insertion_click = TRUE
/obj/screen/storage/right
/atom/movable/screen/storage/right
icon_state = "storage_end"
insertion_click = TRUE
/obj/screen/storage/continuous
/atom/movable/screen/storage/continuous
icon_state = "storage_continue"
insertion_click = TRUE
/obj/screen/storage/volumetric_box
/atom/movable/screen/storage/volumetric_box
icon_state = "stored_continue"
layer = VOLUMETRIC_STORAGE_BOX_LAYER
plane = VOLUMETRIC_STORAGE_BOX_PLANE
var/obj/item/our_item
/obj/screen/storage/volumetric_box/Initialize(mapload, new_master, obj/item/our_item)
/atom/movable/screen/storage/volumetric_box/Initialize(mapload, new_master, obj/item/our_item)
src.our_item = our_item
RegisterSignal(our_item, COMSIG_ITEM_MOUSE_ENTER, .proc/on_item_mouse_enter)
RegisterSignal(our_item, COMSIG_ITEM_MOUSE_EXIT, .proc/on_item_mouse_exit)
return ..()
/obj/screen/storage/volumetric_box/Destroy()
/atom/movable/screen/storage/volumetric_box/Destroy()
makeItemInactive()
our_item = null
return ..()
/obj/screen/storage/volumetric_box/Click(location, control, params)
/atom/movable/screen/storage/volumetric_box/Click(location, control, params)
return our_item.Click(location, control, params)
/obj/screen/storage/volumetric_box/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
/atom/movable/screen/storage/volumetric_box/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
return our_item.MouseDrop(over, src_location, over_location, src_control, over_control, params)
/obj/screen/storage/volumetric_box/MouseExited(location, control, params)
/atom/movable/screen/storage/volumetric_box/MouseExited(location, control, params)
makeItemInactive()
/obj/screen/storage/volumetric_box/MouseEntered(location, control, params)
/atom/movable/screen/storage/volumetric_box/MouseEntered(location, control, params)
makeItemActive()
/obj/screen/storage/volumetric_box/proc/on_item_mouse_enter()
/atom/movable/screen/storage/volumetric_box/proc/on_item_mouse_enter()
makeItemActive()
/obj/screen/storage/volumetric_box/proc/on_item_mouse_exit()
/atom/movable/screen/storage/volumetric_box/proc/on_item_mouse_exit()
makeItemInactive()
/obj/screen/storage/volumetric_box/proc/makeItemInactive()
/atom/movable/screen/storage/volumetric_box/proc/makeItemInactive()
return
/obj/screen/storage/volumetric_box/proc/makeItemActive()
/atom/movable/screen/storage/volumetric_box/proc/makeItemActive()
return
/obj/screen/storage/volumetric_box/center
/atom/movable/screen/storage/volumetric_box/center
icon_state = "stored_continue"
var/obj/screen/storage/volumetric_edge/stored_left/left
var/obj/screen/storage/volumetric_edge/stored_right/right
var/obj/screen/storage/item_holder/holder
var/atom/movable/screen/storage/volumetric_edge/stored_left/left
var/atom/movable/screen/storage/volumetric_edge/stored_right/right
var/atom/movable/screen/storage/item_holder/holder
var/pixel_size
/obj/screen/storage/volumetric_box/center/Initialize(mapload, new_master, our_item)
/atom/movable/screen/storage/volumetric_box/center/Initialize(mapload, new_master, our_item)
left = new(null, src, our_item)
right = new(null, src, our_item)
return ..()
/obj/screen/storage/volumetric_box/center/Destroy()
/atom/movable/screen/storage/volumetric_box/center/Destroy()
QDEL_NULL(left)
QDEL_NULL(right)
vis_contents.Cut()
@@ -110,13 +110,13 @@
QDEL_NULL(holder)
return ..()
/obj/screen/storage/volumetric_box/center/proc/on_screen_objects()
/atom/movable/screen/storage/volumetric_box/center/proc/on_screen_objects()
return list(src)
/**
* Sets the size of this box screen object and regenerates its left/right borders. This includes the actual border's size!
*/
/obj/screen/storage/volumetric_box/center/proc/set_pixel_size(pixels)
/atom/movable/screen/storage/volumetric_box/center/proc/set_pixel_size(pixels)
if(pixel_size == pixels)
return
pixel_size = pixels
@@ -139,59 +139,59 @@
add_overlay(left)
add_overlay(right)
/obj/screen/storage/volumetric_box/center/makeItemInactive()
/atom/movable/screen/storage/volumetric_box/center/makeItemInactive()
if(!holder)
return
holder.layer = VOLUMETRIC_STORAGE_ITEM_LAYER
holder.plane = VOLUMETRIC_STORAGE_ITEM_PLANE
/obj/screen/storage/volumetric_box/center/makeItemActive()
/atom/movable/screen/storage/volumetric_box/center/makeItemActive()
if(!holder)
return
holder.our_item.layer = VOLUMETRIC_STORAGE_ACTIVE_ITEM_LAYER //make sure we display infront of the others!
holder.our_item.plane = VOLUMETRIC_STORAGE_ACTIVE_ITEM_PLANE
/obj/screen/storage/volumetric_edge
/atom/movable/screen/storage/volumetric_edge
layer = VOLUMETRIC_STORAGE_BOX_LAYER
plane = VOLUMETRIC_STORAGE_BOX_PLANE
/obj/screen/storage/volumetric_edge/Initialize(mapload, master, our_item)
/atom/movable/screen/storage/volumetric_edge/Initialize(mapload, master, our_item)
src.master = master
return ..()
/obj/screen/storage/volumetric_edge/Click(location, control, params)
/atom/movable/screen/storage/volumetric_edge/Click(location, control, params)
return master.Click(location, control, params)
/obj/screen/storage/volumetric_edge/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
/atom/movable/screen/storage/volumetric_edge/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
return master.MouseDrop(over, src_location, over_location, src_control, over_control, params)
/obj/screen/storage/volumetric_edge/MouseExited(location, control, params)
/atom/movable/screen/storage/volumetric_edge/MouseExited(location, control, params)
return master.MouseExited(location, control, params)
/obj/screen/storage/volumetric_edge/MouseEntered(location, control, params)
/atom/movable/screen/storage/volumetric_edge/MouseEntered(location, control, params)
return master.MouseEntered(location, control, params)
/obj/screen/storage/volumetric_edge/stored_left
/atom/movable/screen/storage/volumetric_edge/stored_left
icon_state = "stored_start"
appearance_flags = APPEARANCE_UI | KEEP_APART | RESET_TRANSFORM // Yes I know RESET_TRANSFORM is in APPEARANCE_UI but we're hard-asserting this incase someone changes it.
/obj/screen/storage/volumetric_edge/stored_right
/atom/movable/screen/storage/volumetric_edge/stored_right
icon_state = "stored_end"
appearance_flags = APPEARANCE_UI | KEEP_APART | RESET_TRANSFORM
/obj/screen/storage/item_holder
/atom/movable/screen/storage/item_holder
var/obj/item/our_item
vis_flags = NONE
/obj/screen/storage/item_holder/Initialize(mapload, new_master, obj/item/I)
/atom/movable/screen/storage/item_holder/Initialize(mapload, new_master, obj/item/I)
. = ..()
our_item = I
vis_contents += I
/obj/screen/storage/item_holder/Destroy()
/atom/movable/screen/storage/item_holder/Destroy()
vis_contents.Cut()
our_item = null
return ..()
/obj/screen/storage/item_holder/Click(location, control, params)
/atom/movable/screen/storage/item_holder/Click(location, control, params)
return our_item.Click(location, control, params)
+3 -3
View File
@@ -1,9 +1,9 @@
/obj/screen/voretoggle
/atom/movable/screen/voretoggle
name = "toggle vore mode"
icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
icon_state = "nom_off"
/obj/screen/voretoggle/Click()
/atom/movable/screen/voretoggle/Click()
if(usr != hud.mymob)
return
var/mob/living/carbon/C = usr
@@ -12,7 +12,7 @@
return
C.toggle_vore_mode()
/obj/screen/voretoggle/update_icon_state()
/atom/movable/screen/voretoggle/update_icon_state()
var/mob/living/carbon/user = hud?.mymob
if(!istype(user))
return
+2 -2
View File
@@ -2,7 +2,7 @@
ui_style = 'icons/mob/screen_gen.dmi'
/datum/hud/living/simple_animal/New(mob/living/owner)
..()
pull_icon = new /obj/screen/pull()
pull_icon = new /atom/movable/screen/pull()
pull_icon.icon = ui_style
pull_icon.update_icon()
pull_icon.screen_loc = ui_living_pull
@@ -10,6 +10,6 @@
static_inventory += pull_icon
//mob health doll! assumes whatever sprite the mob is
healthdoll = new /obj/screen/healthdoll/living()
healthdoll = new /atom/movable/screen/healthdoll/living()
healthdoll.hud = src
infodisplay += healthdoll
+20 -20
View File
@@ -1,98 +1,98 @@
/obj/screen/swarmer
/atom/movable/screen/swarmer
icon = 'icons/mob/swarmer.dmi'
/obj/screen/swarmer/FabricateTrap
/atom/movable/screen/swarmer/FabricateTrap
icon_state = "ui_trap"
name = "Create trap (Costs 5 Resources)"
desc = "Creates a trap that will nonlethally shock any non-swarmer that attempts to cross it. (Costs 5 resources)"
/obj/screen/swarmer/FabricateTrap/Click()
/atom/movable/screen/swarmer/FabricateTrap/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr
S.CreateTrap()
/obj/screen/swarmer/Barricade
/atom/movable/screen/swarmer/Barricade
icon_state = "ui_barricade"
name = "Create barricade (Costs 5 Resources)"
desc = "Creates a destructible barricade that will stop any non swarmer from passing it. Also allows disabler beams to pass through. (Costs 5 resources)"
/obj/screen/swarmer/Barricade/Click()
/atom/movable/screen/swarmer/Barricade/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr
S.CreateBarricade()
/obj/screen/swarmer/Replicate
/atom/movable/screen/swarmer/Replicate
icon_state = "ui_replicate"
name = "Replicate (Costs 50 Resources)"
desc = "Creates another of our kind."
/obj/screen/swarmer/Replicate/Click()
/atom/movable/screen/swarmer/Replicate/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr
S.CreateSwarmer()
/obj/screen/swarmer/RepairSelf
/atom/movable/screen/swarmer/RepairSelf
icon_state = "ui_self_repair"
name = "Repair self"
desc = "Repairs damage to our body."
/obj/screen/swarmer/RepairSelf/Click()
/atom/movable/screen/swarmer/RepairSelf/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr
S.RepairSelf()
/obj/screen/swarmer/ToggleLight
/atom/movable/screen/swarmer/ToggleLight
icon_state = "ui_light"
name = "Toggle light"
desc = "Toggles our inbuilt light on or off."
/obj/screen/swarmer/ToggleLight/Click()
/atom/movable/screen/swarmer/ToggleLight/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr
S.ToggleLight()
/obj/screen/swarmer/ContactSwarmers
/atom/movable/screen/swarmer/ContactSwarmers
icon_state = "ui_contact_swarmers"
name = "Contact swarmers"
desc = "Sends a message to all other swarmers, should they exist."
/obj/screen/swarmer/ContactSwarmers/Click()
/atom/movable/screen/swarmer/ContactSwarmers/Click()
if(isswarmer(usr))
var/mob/living/simple_animal/hostile/swarmer/S = usr
S.ContactSwarmers()
/datum/hud/swarmer/New(mob/owner)
..()
var/obj/screen/using
var/atom/movable/screen/using
using = new /obj/screen/swarmer/FabricateTrap()
using = new /atom/movable/screen/swarmer/FabricateTrap()
using.screen_loc = ui_hand_position(2)
using.hud = src
static_inventory += using
using = new /obj/screen/swarmer/Barricade()
using = new /atom/movable/screen/swarmer/Barricade()
using.screen_loc = ui_hand_position(1)
using.hud = src
static_inventory += using
using = new /obj/screen/swarmer/Replicate()
using = new /atom/movable/screen/swarmer/Replicate()
using.screen_loc = ui_zonesel
using.hud = src
static_inventory += using
using = new /obj/screen/swarmer/RepairSelf()
using = new /atom/movable/screen/swarmer/RepairSelf()
using.screen_loc = ui_storage1
using.hud = src
static_inventory += using
using = new /obj/screen/swarmer/ToggleLight()
using = new /atom/movable/screen/swarmer/ToggleLight()
using.screen_loc = ui_back
using.hud = src
static_inventory += using
using = new /obj/screen/swarmer/ContactSwarmers()
using = new /atom/movable/screen/swarmer/ContactSwarmers()
using.screen_loc = ui_inventory
using.hud = src
static_inventory += using
+39 -1
View File
@@ -1,14 +1,25 @@
// Clickable stat() button.
/obj/effect/statclick
name = "Initializing..."
// blocks_emissive = NONE
var/target
INITIALIZE_IMMEDIATE(/obj/effect/statclick)
/obj/effect/statclick/Initialize(mapload, text, target) //Don't port this to Initialize it's too critical
/obj/effect/statclick/Initialize(mapload, text, target)
. = ..()
name = text
src.target = target
if(istype(target, /datum)) //Harddel man bad
RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/cleanup)
/obj/effect/statclick/Destroy()
target = null
return ..()
/obj/effect/statclick/proc/cleanup()
SIGNAL_HANDLER
qdel(src)
/obj/effect/statclick/proc/update(text)
name = text
@@ -51,3 +62,30 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Restart Failsafe Controller")
message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.")
/client/proc/debug_controller()
set category = "Debug"
set name = "Debug Controller"
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
if(!holder)
return
var/list/controllers = list()
var/list/controller_choices = list()
for (var/datum/controller/controller in world)
if (istype(controller, /datum/controller/subsystem))
continue
controllers["[controller] (controller.type)"] = controller //we use an associated list to ensure clients can't hold references to controllers
controller_choices += "[controller] (controller.type)"
var/datum/controller/controller_string = input("Select controller to debug", "Debug Controller") as null|anything in controller_choices
var/datum/controller/controller = controllers[controller_string]
if (!istype(controller))
return
debug_variables(controller)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Restart Failsafe Controller")
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")
@@ -0,0 +1,66 @@
/datum/config_entry/flag/admin_legacy_system //Defines whether the server uses the legacy admin system with admins.txt or the SQL system
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/protect_legacy_admins //Stops any admins loaded by the legacy system from having their rank edited by the permissions panel
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/protect_legacy_ranks //Stops any ranks loaded by the legacy system from having their flags edited by the permissions panel
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/enable_localhost_rank //Gives the !localhost! rank to any client connecting from 127.0.0.1 or ::1
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/load_legacy_ranks_only //Loads admin ranks only from legacy admin_ranks.txt, while enabled ranks are mirrored to the database
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/mentors_mobname_only
/datum/config_entry/flag/mentor_legacy_system //Defines whether the server uses the legacy mentor system with mentors.txt or the SQL system
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/forbid_singulo_possession
/datum/config_entry/flag/see_own_notes //Can players see their own admin notes
/datum/config_entry/number/note_fresh_days
config_entry_value = null
min_val = 0
integer = FALSE
/datum/config_entry/number/note_stale_days
config_entry_value = null
min_val = 0
integer = FALSE
/datum/config_entry/flag/autoconvert_notes //if all connecting player's notes should attempt to be converted to the database
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/announce_admin_logout
/datum/config_entry/flag/announce_admin_login
/datum/config_entry/string/centcom_ban_db // URL for the CentCom Galactic Ban DB API
/datum/config_entry/string/centcom_source_whitelist
/datum/config_entry/flag/autoadmin // if autoadmin is enabled
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/string/autoadmin_rank // the rank for autoadmins
config_entry_value = "Game Master"
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/allow_admin_ooccolor // Allows admins with relevant permissions to have their own ooc colour
/datum/config_entry/flag/popup_admin_pm // adminPMs to non-admins show in a pop-up 'reply' window when set
/datum/config_entry/flag/guest_jobban
/datum/config_entry/flag/ban_legacy_system //Defines whether the server uses the legacy banning system with the files in /data or the SQL system.
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/guest_ban
/datum/config_entry/flag/automute_on //enables automuting/spam prevention
/datum/config_entry/flag/debug_admin_hrefs
@@ -0,0 +1,26 @@
/datum/config_entry/string/alert_green
config_entry_value = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
/datum/config_entry/string/alert_blue_upto
config_entry_value = "The station has received reliable information about potential threats to the station. Security staff may have weapons visible, random searches are permitted."
/datum/config_entry/string/alert_blue_downto
config_entry_value = "Significant confirmed threats have been neutralized. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still permitted."
/datum/config_entry/string/alert_amber_upto
config_entry_value = "There are significant confirmed threats to the station. Security staff may have weapons unholstered at all times. Random searches are allowed and advised."
/datum/config_entry/string/alert_amber_downto
config_entry_value = "The immediate threat has passed. Security is no longer authorized to use lethal force, but may continue to have weapons drawn. Access requirements have been restored."
/datum/config_entry/string/alert_red_upto
config_entry_value = "There is an immediate serious threat to the station. Security is now authorized to use lethal force. Additionally, access requirements on some machines have been lifted."
/datum/config_entry/string/alert_red_downto
config_entry_value = "The station's destruction has been averted. There is still however an immediate serious threat to the station. Security is still authorized to use lethal force."
/datum/config_entry/string/alert_delta
config_entry_value = "Destruction of the station is imminent. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill."
/datum/config_entry/number/minimum_secborg_alert //Minimum alert level for secborgs to be chosen.
config_entry_value = 3
@@ -0,0 +1,17 @@
/datum/config_entry/flag/use_antag_rep // see game_options.txt for details
/datum/config_entry/number/antag_rep_maximum
config_entry_value = 200
min_val = 0
/datum/config_entry/number/default_antag_tickets
config_entry_value = 100
min_val = 0
/datum/config_entry/number/max_tickets_per_roll
config_entry_value = 100
min_val = 0
/datum/config_entry/keyed_list/antag_rep
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
@@ -0,0 +1,106 @@
/datum/config_entry/flag/panic_bunker // prevents people the server hasn't seen before from connecting
/datum/config_entry/number/panic_bunker_living // living time in minutes that a player needs to pass the panic bunker
/datum/config_entry/string/panic_bunker_message
config_entry_value = "Sorry but the server is currently not accepting connections from never before seen players."
/datum/config_entry/string/panic_server_name
/datum/config_entry/string/panic_server_name/ValidateAndSet(str_val)
return str_val != "\[Put the name here\]" && ..()
/datum/config_entry/string/panic_server_address //Reconnect a player this linked server if this server isn't accepting new players
/datum/config_entry/string/panic_server_address/ValidateAndSet(str_val)
return str_val != "byond://address:port" && ..()
/datum/config_entry/number/max_bunker_days
config_entry_value = 7
min_val = 1
/datum/config_entry/number/notify_new_player_age // how long do we notify admins of a new player
min_val = -1
/datum/config_entry/number/notify_new_player_account_age // how long do we notify admins of a new byond account
min_val = 0
/datum/config_entry/flag/age_verification //are we using the automated age verification which asks users if they're 18+?
config_entry_value = TRUE
/datum/config_entry/flag/irc_first_connection_alert // do we notify the irc channel when somebody is connecting for the first time?
/datum/config_entry/flag/check_randomizer
/datum/config_entry/string/ipintel_email
/datum/config_entry/string/ipintel_email/ValidateAndSet(str_val)
return str_val != "ch@nge.me" && ..()
/datum/config_entry/number/ipintel_rating_bad
config_entry_value = 1
integer = FALSE
min_val = 0
max_val = 1
/datum/config_entry/number/ipintel_save_good
config_entry_value = 12
min_val = 0
/datum/config_entry/number/ipintel_save_bad
config_entry_value = 1
min_val = 0
/datum/config_entry/string/ipintel_domain
config_entry_value = "check.getipintel.net"
/datum/config_entry/flag/aggressive_changelog
/datum/config_entry/flag/allow_webclient
/datum/config_entry/flag/webclient_only_byond_members
/datum/config_entry/number/client_warn_version
config_entry_value = null
min_val = 500
/datum/config_entry/number/client_warn_version
config_entry_value = null
min_val = 500
/datum/config_entry/string/client_warn_message
config_entry_value = "Your version of byond may have issues or be blocked from accessing this server in the future."
/datum/config_entry/flag/client_warn_popup
/datum/config_entry/number/client_error_version
config_entry_value = null
min_val = 500
/datum/config_entry/string/client_error_message
config_entry_value = "Your version of byond is too old, may have issues, and is blocked from accessing this server."
/datum/config_entry/number/client_error_build
config_entry_value = null
min_val = 0
/datum/config_entry/number/soft_popcap
config_entry_value = null
min_val = 0
/datum/config_entry/number/hard_popcap
config_entry_value = null
min_val = 0
/datum/config_entry/number/extreme_popcap
config_entry_value = null
min_val = 0
/datum/config_entry/string/soft_popcap_message
config_entry_value = "Be warned that the server is currently serving a high number of users, consider using alternative game servers."
/datum/config_entry/string/hard_popcap_message
config_entry_value = "The server is currently serving a high number of users, You cannot currently join. You may wait for the number of living crew to decline, observe, or find alternative servers."
/datum/config_entry/string/extreme_popcap_message
config_entry_value = "The server is currently serving a high number of users, find alternative servers."
@@ -0,0 +1,16 @@
/// Amount of dirtyness tiles need to spawn dirt.
/datum/config_entry/number/turf_dirt_threshold
config_entry_value = 100
min_val = 1
integer = TRUE
/// Alpha dirt starts at
/datum/config_entry/number/dirt_alpha_starting
config_entry_value = 127
max_val = 255
min_val = 0
integer = TRUE
/// Dirtyness multiplier for making turfs dirty
/datum/config_entry/number/turf_dirty_multiplier
config_entry_value = 1
@@ -0,0 +1,45 @@
/datum/config_entry/keyed_list/breasts_cups_prefs
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
config_entry_value = list("a", "b", "c", "d", "e") //keep these lowercase
/datum/config_entry/number/penis_min_inches_prefs
config_entry_value = 1
min_val = 0
/datum/config_entry/number/penis_max_inches_prefs
config_entry_value = 20
min_val = 0
/datum/config_entry/keyed_list/safe_visibility_toggles
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
config_entry_value = list(GEN_VISIBLE_NO_CLOTHES, GEN_VISIBLE_NO_UNDIES, GEN_VISIBLE_NEVER) //refer to cit_helpers for all toggles.
//Body size configs, the feature will be disabled if both min and max have the same value.
/datum/config_entry/number/body_size_min
config_entry_value = 0.9
min_val = 0.1 //to avoid issues with zeros and negative values.
max_val = RESIZE_DEFAULT_SIZE
integer = FALSE
/datum/config_entry/number/body_size_max
config_entry_value = 1.25
min_val = RESIZE_DEFAULT_SIZE
integer = FALSE
//Penalties given to characters with a body size smaller than this value,
//to compensate for their smaller hitbox.
//To disable, just make sure the value is lower than 'body_size_min'
/datum/config_entry/number/threshold_body_size_penalty
config_entry_value = RESIZE_DEFAULT_SIZE
min_val = 0
max_val = RESIZE_DEFAULT_SIZE
integer = FALSE
//multiplicative slowdown multiplier. See 'dna.update_body_size' for the operation.
//doesn't apply to floating or crawling mobs
/datum/config_entry/number/body_size_slowdown_multiplier
config_entry_value = 0
min_val = 0
integer = FALSE
@@ -1,619 +0,0 @@
/datum/config_entry/number_list/repeated_mode_adjust
/datum/config_entry/keyed_list/probability
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/keyed_list/probability/ValidateListEntry(key_name)
return key_name in config.modes
/datum/config_entry/keyed_list/chaos_level
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/keyed_list/chaos_level/ValidateListEntry(key_name)
return key_name in config.modes
/datum/config_entry/keyed_list/max_pop
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/keyed_list/max_pop/ValidateListEntry(key_name)
return key_name in config.modes
/datum/config_entry/keyed_list/min_pop
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/keyed_list/min_pop/ValidateListEntry(key_name, key_value)
return key_name in config.modes
/datum/config_entry/keyed_list/continuous // which roundtypes continue if all antagonists die
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
/datum/config_entry/keyed_list/continuous/ValidateListEntry(key_name, key_value)
return key_name in config.modes
/datum/config_entry/keyed_list/midround_antag // which roundtypes use the midround antagonist system
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
/datum/config_entry/keyed_list/midround_antag/ValidateListEntry(key_name, key_value)
return key_name in config.modes
/datum/config_entry/keyed_list/force_antag_count
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
/datum/config_entry/keyed_list/force_antag_count/ValidateListEntry(key_name, key_value)
return key_name in config.modes
/datum/config_entry/keyed_list/policy
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_TEXT
/datum/config_entry/number/damage_multiplier
config_entry_value = 1
integer = FALSE
/datum/config_entry/number/minimal_access_threshold //If the number of players is larger than this threshold, minimal access will be turned on.
min_val = 0
/datum/config_entry/flag/jobs_have_minimal_access //determines whether jobs use minimal access or expanded access.
/datum/config_entry/flag/assistants_have_maint_access
/datum/config_entry/flag/security_has_maint_access
/datum/config_entry/flag/everyone_has_maint_access
/datum/config_entry/flag/sec_start_brig //makes sec start in brig instead of dept sec posts
/datum/config_entry/flag/force_random_names
/datum/config_entry/flag/humans_need_surnames
/datum/config_entry/flag/allow_ai // allow ai job
/datum/config_entry/flag/allow_ai_multicam //whether the AI can use their multicam
/datum/config_entry/flag/disable_human_mood
/datum/config_entry/flag/disable_borg_flash_knockdown //Should borg flashes be capable of knocking humanoid entities down?
/datum/config_entry/flag/weaken_secborg //Brings secborgs and k9s back in-line with the other borg modules
/datum/config_entry/flag/disable_secborg // disallow secborg module to be chosen.
/datum/config_entry/flag/disable_peaceborg
/datum/config_entry/flag/economy //money money money money money money money money money money money money
/datum/config_entry/number/minimum_secborg_alert //Minimum alert level for secborgs to be chosen.
config_entry_value = 3
/datum/config_entry/number/traitor_scaling_coeff //how much does the amount of players get divided by to determine traitors
config_entry_value = 6
min_val = 1
/datum/config_entry/number/brother_scaling_coeff //how many players per brother team
config_entry_value = 25
min_val = 1
/datum/config_entry/number/changeling_scaling_coeff //how much does the amount of players get divided by to determine changelings
config_entry_value = 6
min_val = 1
/datum/config_entry/number/ecult_scaling_coeff //how much does the amount of players get divided by to determine e_cult
config_entry_value = 6
integer = FALSE
min_val = 1
/datum/config_entry/number/security_scaling_coeff //how much does the amount of players get divided by to determine open security officer positions
config_entry_value = 8
min_val = 1
/datum/config_entry/number/abductor_scaling_coeff //how many players per abductor team
config_entry_value = 15
min_val = 1
/datum/config_entry/number/traitor_objectives_amount
config_entry_value = 2
min_val = 0
/datum/config_entry/number/brother_objectives_amount
config_entry_value = 2
min_val = 0
/datum/config_entry/flag/reactionary_explosions //If we use reactionary explosions, explosions that react to walls and doors
/datum/config_entry/flag/protect_roles_from_antagonist //If security and such can be traitor/cult/other
/datum/config_entry/flag/protect_assistant_from_antagonist //If assistants can be traitor/cult/other
/datum/config_entry/flag/enforce_human_authority //If non-human species are barred from joining as a head of staff
/datum/config_entry/flag/allow_latejoin_antagonists // If late-joining players can be traitor/changeling
/datum/config_entry/flag/use_antag_rep // see game_options.txt for details
/datum/config_entry/number/antag_rep_maximum
config_entry_value = 200
min_val = 0
/datum/config_entry/number/default_antag_tickets
config_entry_value = 100
min_val = 0
/datum/config_entry/number/max_tickets_per_roll
config_entry_value = 100
min_val = 0
/datum/config_entry/number/midround_antag_time_check // How late (in minutes you want the midround antag system to stay on, setting this to 0 will disable the system)
config_entry_value = 60
min_val = 0
/datum/config_entry/number/midround_antag_life_check // A ratio of how many people need to be alive in order for the round not to immediately end in midround antagonist
config_entry_value = 0.7
integer = FALSE
min_val = 0
max_val = 1
/datum/config_entry/number/suicide_reenter_round_timer
config_entry_value = 30
min_val = 0
/datum/config_entry/number/roundstart_suicide_time_limit
config_entry_value = 30
min_val = 0
/datum/config_entry/number/shuttle_refuel_delay
config_entry_value = 12000
min_val = 0
/datum/config_entry/flag/show_game_type_odds //if set this allows players to see the odds of each roundtype on the get revision screen
/datum/config_entry/keyed_list/roundstart_races //races you can play as from the get go.
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
/datum/config_entry/flag/join_with_mutant_humans //players can pick mutant bodyparts for humans before joining the game
/datum/config_entry/flag/no_summon_guns //No
/datum/config_entry/flag/no_summon_magic //Fun
/datum/config_entry/flag/no_summon_events //Allowed
/datum/config_entry/flag/no_summon_traumas //!
/datum/config_entry/flag/no_intercept_report //Whether or not to send a communications intercept report roundstart. This may be overridden by gamemodes.
/datum/config_entry/number/arrivals_shuttle_dock_window //Time from when a player late joins on the arrivals shuttle to when the shuttle docks on the station
config_entry_value = 55
min_val = 30
/datum/config_entry/flag/arrivals_shuttle_require_undocked //Require the arrivals shuttle to be undocked before latejoiners can join
/datum/config_entry/flag/arrivals_shuttle_require_safe_latejoin //Require the arrivals shuttle to be operational in order for latejoiners to join
/datum/config_entry/string/alert_green
config_entry_value = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
/datum/config_entry/string/alert_blue_upto
config_entry_value = "The station has received reliable information about potential threats to the station. Security staff may have weapons visible, random searches are permitted."
/datum/config_entry/string/alert_blue_downto
config_entry_value = "Significant confirmed threats have been neutralized. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still permitted."
/datum/config_entry/string/alert_amber_upto
config_entry_value = "There are significant confirmed threats to the station. Security staff may have weapons unholstered at all times. Random searches are allowed and advised."
/datum/config_entry/string/alert_amber_downto
config_entry_value = "The immediate threat has passed. Security is no longer authorized to use lethal force, but may continue to have weapons drawn. Access requirements have been restored."
/datum/config_entry/string/alert_red_upto
config_entry_value = "There is an immediate serious threat to the station. Security is now authorized to use lethal force. Additionally, access requirements on some machines have been lifted."
/datum/config_entry/string/alert_red_downto
config_entry_value = "The station's destruction has been averted. There is still however an immediate serious threat to the station. Security is still authorized to use lethal force."
/datum/config_entry/string/alert_delta
config_entry_value = "Destruction of the station is imminent. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill."
/datum/config_entry/flag/revival_pod_plants
/datum/config_entry/flag/revival_cloning
/datum/config_entry/number/revival_brain_life
config_entry_value = -1
min_val = -1
/datum/config_entry/flag/ooc_during_round
/datum/config_entry/flag/emojis
/datum/config_entry/keyed_list/multiplicative_movespeed
key_mode = KEY_MODE_TYPE
value_mode = VALUE_MODE_NUM
abstract_type = /datum/config_entry/keyed_list/multiplicative_movespeed
/datum/config_entry/keyed_list/multiplicative_movespeed/ValidateAndSet()
. = ..()
if(.)
update_config_movespeed_type_lookup(TRUE)
/datum/config_entry/keyed_list/multiplicative_movespeed/vv_edit_var(var_name, var_value)
. = ..()
if(. && (var_name == NAMEOF(src, config_entry_value)))
update_config_movespeed_type_lookup(TRUE)
/datum/config_entry/keyed_list/multiplicative_movespeed/normal
name = "multiplicative_movespeed"
config_entry_value = list( //DEFAULTS
/mob/living/simple_animal = 1,
/mob/living/silicon/pai = 1,
/mob/living/carbon/alien/humanoid/sentinel = 0.25,
/mob/living/carbon/alien/humanoid/drone = 0.5,
/mob/living/carbon/alien/humanoid/royal/praetorian = 1,
/mob/living/carbon/alien/humanoid/royal/queen = 3
)
/datum/config_entry/keyed_list/multiplicative_movespeed/floating
name = "multiplicative_movespeed_floating"
config_entry_value = list(
/mob/living = 0,
/mob/living/carbon/alien/humanoid = 0,
/mob/living/carbon/alien/humanoid/royal/praetorian = 0,
/mob/living/carbon/alien/humanoid/royal/queen = 2
)
/datum/config_entry/number/sprintless_stagger_slowdown
config_entry_value = 0
/datum/config_entry/number/melee_stagger_factor
config_entry_value = 1
/datum/config_entry/number/sprintless_off_balance_slowdown
config_entry_value = 0.85
/datum/config_entry/number/movedelay //Used for modifying movement speed for mobs.
abstract_type = /datum/config_entry/number/movedelay
integer = FALSE
/datum/config_entry/number/movedelay/ValidateAndSet()
. = ..()
if(.)
update_mob_config_movespeeds()
/datum/config_entry/number/movedelay/vv_edit_var(var_name, var_value)
. = ..()
if(. && (var_name == NAMEOF(src, config_entry_value)))
update_mob_config_movespeeds()
/datum/config_entry/number/movedelay/run_delay
/datum/config_entry/number/movedelay/run_delay/ValidateAndSet()
. = ..()
var/datum/movespeed_modifier/config_walk_run/M = get_cached_movespeed_modifier(/datum/movespeed_modifier/config_walk_run/run)
M.sync()
/datum/config_entry/number/movedelay/walk_delay
/datum/config_entry/number/movedelay/walk_delay/ValidateAndSet()
. = ..()
var/datum/movespeed_modifier/config_walk_run/M = get_cached_movespeed_modifier(/datum/movespeed_modifier/config_walk_run/walk)
M.sync()
/datum/config_entry/flag/sprint_enabled
config_entry_value = TRUE
/datum/config_entry/flag/sprint_enabled/ValidateAndSet(str_val)
. = ..()
for(var/datum/hud/human/H)
H.assert_move_intent_ui()
if(!config_entry_value) // disabled
for(var/mob/living/L in world)
L.disable_intentional_sprint_mode()
/datum/config_entry/number/movedelay/sprint_speed_increase
config_entry_value = 1
/datum/config_entry/number/movedelay/sprint_max_tiles_increase
config_entry_value = 5
/datum/config_entry/number/movedelay/sprint_absolute_max_tiles
config_entry_value = 13
/datum/config_entry/number/movedelay/sprint_buffer_max
config_entry_value = 24
/datum/config_entry/number/movedelay/sprint_stamina_cost
config_entry_value = 1.4
/datum/config_entry/number/movedelay/sprint_buffer_regen_per_ds
config_entry_value = 0.4
/////////////////////////////////////////////////Outdated move delay
/datum/config_entry/number/outdated_movedelay
deprecated_by = /datum/config_entry/keyed_list/multiplicative_movespeed/normal
abstract_type = /datum/config_entry/number/outdated_movedelay
var/movedelay_type
/datum/config_entry/number/outdated_movedelay/DeprecationUpdate(value)
return "[movedelay_type] [value]"
/datum/config_entry/number/outdated_movedelay/human_delay
movedelay_type = /mob/living/carbon/human
/datum/config_entry/number/outdated_movedelay/robot_delay
movedelay_type = /mob/living/silicon/robot
/datum/config_entry/number/outdated_movedelay/monkey_delay
movedelay_type = /mob/living/carbon/monkey
/datum/config_entry/number/outdated_movedelay/alien_delay
movedelay_type = /mob/living/carbon/alien
/datum/config_entry/number/outdated_movedelay/slime_delay
movedelay_type = /mob/living/simple_animal/slime
/datum/config_entry/number/outdated_movedelay/animal_delay
movedelay_type = /mob/living/simple_animal
/////////////////////////////////////////////////
/datum/config_entry/flag/roundstart_away //Will random away mission be loaded.
/datum/config_entry/flag/roundstart_vr //Will virtual reality missions be loaded?
/datum/config_entry/number/gateway_delay //How long the gateway takes before it activates. Default is half an hour. Only matters if roundstart_away is enabled.
config_entry_value = 18000
min_val = 0
/datum/config_entry/flag/ghost_interaction
/datum/config_entry/flag/silent_ai
/datum/config_entry/flag/silent_borg
/datum/config_entry/flag/sandbox_autoclose // close the sandbox panel after spawning an item, potentially reducing griff
/datum/config_entry/number/default_laws //Controls what laws the AI spawns with.
config_entry_value = 0
min_val = 0
max_val = 3
/datum/config_entry/number/silicon_max_law_amount
config_entry_value = 12
min_val = 0
/datum/config_entry/keyed_list/random_laws
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
/datum/config_entry/keyed_list/law_weight
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
splitter = ","
/datum/config_entry/number/overflow_cap
config_entry_value = -1
min_val = -1
/datum/config_entry/string/overflow_job
config_entry_value = "Assistant"
/datum/config_entry/flag/starlight
/datum/config_entry/flag/grey_assistants
/datum/config_entry/number/lavaland_budget
config_entry_value = 60
min_val = 0
/datum/config_entry/number/space_budget
config_entry_value = 16
min_val = 0
/datum/config_entry/number/icemoon_budget
config_entry_value = 90
integer = FALSE
min_val = 0
/datum/config_entry/number/station_space_budget
config_entry_value = 10
min_val = 0
/datum/config_entry/flag/allow_random_events // Enables random events mid-round when set
/datum/config_entry/number/events_min_time_mul // Multipliers for random events minimal starting time and minimal players amounts
config_entry_value = 1
min_val = 0
integer = FALSE
/datum/config_entry/number/events_min_players_mul
config_entry_value = 1
min_val = 0
integer = FALSE
/datum/config_entry/number/mice_roundstart
config_entry_value = 10
min_val = 0
/datum/config_entry/number/bombcap
config_entry_value = 14
min_val = 4
/datum/config_entry/number/bombcap/ValidateAndSet(str_val)
. = ..()
if(.)
GLOB.MAX_EX_DEVESTATION_RANGE = round(config_entry_value / 4)
GLOB.MAX_EX_HEAVY_RANGE = round(config_entry_value / 2)
GLOB.MAX_EX_LIGHT_RANGE = config_entry_value
GLOB.MAX_EX_FLASH_RANGE = config_entry_value
GLOB.MAX_EX_FLAME_RANGE = config_entry_value
/datum/config_entry/number/emergency_shuttle_autocall_threshold
min_val = 0
max_val = 1
integer = FALSE
/datum/config_entry/flag/ic_printing
/datum/config_entry/flag/roundstart_traits
/datum/config_entry/flag/enable_night_shifts
/datum/config_entry/number/night_shift_public_areas_only
config_entry_value = NIGHTSHIFT_AREA_PUBLIC
/datum/config_entry/flag/nightshift_toggle_requires_auth
config_entry_value = FALSE
/datum/config_entry/flag/nightshift_toggle_public_requires_auth
config_entry_value = TRUE
/datum/config_entry/flag/randomize_shift_time
/datum/config_entry/flag/shift_time_realtime
/datum/config_entry/keyed_list/antag_rep
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/keyed_list/job_threat
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/keyed_list/antag_threat
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/number/monkeycap
config_entry_value = 64
min_val = 0
/datum/config_entry/number/ratcap
config_entry_value = 64
min_val = 0
/datum/config_entry/flag/disable_stambuffer
/datum/config_entry/keyed_list/box_random_engine
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
lowercase = FALSE
splitter = ","
/datum/config_entry/flag/pai_custom_holoforms
/datum/config_entry/number/marauder_delay_non_reebe
config_entry_value = 1800
min_val = 0
/datum/config_entry/flag/allow_clockwork_marauder_on_station
config_entry_value = TRUE
/datum/config_entry/flag/modetier_voting
/datum/config_entry/flag/must_be_readied_to_vote_gamemode
/datum/config_entry/number/dropped_modes
config_entry_value = 3
/datum/config_entry/flag/suicide_allowed
/datum/config_entry/keyed_list/breasts_cups_prefs
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
config_entry_value = list("a", "b", "c", "d", "e") //keep these lowercase
/datum/config_entry/number/penis_min_inches_prefs
config_entry_value = 1
min_val = 0
/datum/config_entry/number/penis_max_inches_prefs
config_entry_value = 20
min_val = 0
/datum/config_entry/keyed_list/safe_visibility_toggles
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
config_entry_value = list(GEN_VISIBLE_NO_CLOTHES, GEN_VISIBLE_NO_UNDIES, GEN_VISIBLE_NEVER) //refer to cit_helpers for all toggles.
//Body size configs, the feature will be disabled if both min and max have the same value.
/datum/config_entry/number/body_size_min
config_entry_value = 0.9
min_val = 0.1 //to avoid issues with zeros and negative values.
max_val = RESIZE_DEFAULT_SIZE
integer = FALSE
/datum/config_entry/number/body_size_max
config_entry_value = 1.25
min_val = RESIZE_DEFAULT_SIZE
integer = FALSE
//Penalties given to characters with a body size smaller than this value,
//to compensate for their smaller hitbox.
//To disable, just make sure the value is lower than 'body_size_min'
/datum/config_entry/number/threshold_body_size_penalty
config_entry_value = RESIZE_DEFAULT_SIZE
min_val = 0
max_val = RESIZE_DEFAULT_SIZE
integer = FALSE
//multiplicative slowdown multiplier. See 'dna.update_body_size' for the operation.
//doesn't apply to floating or crawling mobs
/datum/config_entry/number/body_size_slowdown_multiplier
config_entry_value = 0
min_val = 0
integer = FALSE
//Allows players to set a hexadecimal color of their choice as skin tone, on top of the standard ones.
/datum/config_entry/flag/allow_custom_skintones
///Initial loadout points
/datum/config_entry/number/initial_gear_points
config_entry_value = 10
/**
* Enables the FoV component, which hides objects and mobs behind the parent from their sight, unless they turn around, duh.
* Camera mobs, AIs, ghosts and some other are of course exempt from this. This also doesn't influence simplemob AI, for the best.
*/
/datum/config_entry/flag/use_field_of_vision
//Shuttle size limiter
/datum/config_entry/number/max_shuttle_count
config_entry_value = 6
/datum/config_entry/number/max_shuttle_size
config_entry_value = 500
//wound config stuff (increases the max injury roll, making injuries more likely)
/datum/config_entry/number/wound_exponent
config_entry_value = WOUND_DAMAGE_EXPONENT
min_val = 0
integer = FALSE
//adds a set amount to any injury rolls on a limb using get_damage() multiplied by this number
/datum/config_entry/number/wound_damage_multiplier
config_entry_value = 0.333
min_val = 0
integer = FALSE
/// Amount of dirtyness tiles need to spawn dirt.
/datum/config_entry/number/turf_dirt_threshold
config_entry_value = 100
min_val = 1
integer = TRUE
/// Alpha dirt starts at
/datum/config_entry/number/dirt_alpha_starting
config_entry_value = 127
max_val = 255
min_val = 0
integer = TRUE
/// Dirtyness multiplier for making turfs dirty
/datum/config_entry/number/turf_dirty_multiplier
config_entry_value = 1
/datum/config_entry/flag/weigh_by_recent_chaos
/datum/config_entry/number/chaos_exponent
config_entry_value = 1
@@ -0,0 +1,94 @@
/datum/config_entry/number_list/repeated_mode_adjust
/datum/config_entry/flag/weigh_by_recent_chaos
/datum/config_entry/number/chaos_exponent
config_entry_value = 1
/datum/config_entry/keyed_list/probability
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/keyed_list/probability/ValidateListEntry(key_name)
return key_name in config.modes
/datum/config_entry/keyed_list/chaos_level
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/keyed_list/chaos_level/ValidateListEntry(key_name)
return key_name in config.modes
/datum/config_entry/keyed_list/max_pop
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/keyed_list/max_pop/ValidateListEntry(key_name)
return key_name in config.modes
/datum/config_entry/keyed_list/min_pop
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/keyed_list/min_pop/ValidateListEntry(key_name, key_value)
return key_name in config.modes
/datum/config_entry/keyed_list/continuous // which roundtypes continue if all antagonists die
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
/datum/config_entry/keyed_list/continuous/ValidateListEntry(key_name, key_value)
return key_name in config.modes
/datum/config_entry/keyed_list/midround_antag // which roundtypes use the midround antagonist system
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
/datum/config_entry/keyed_list/midround_antag/ValidateListEntry(key_name, key_value)
return key_name in config.modes
/datum/config_entry/keyed_list/force_antag_count
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
/datum/config_entry/keyed_list/force_antag_count/ValidateListEntry(key_name, key_value)
return key_name in config.modes
/datum/config_entry/number/traitor_scaling_coeff //how much does the amount of players get divided by to determine traitors
config_entry_value = 6
min_val = 1
/datum/config_entry/number/brother_scaling_coeff //how many players per brother team
config_entry_value = 25
min_val = 1
/datum/config_entry/number/changeling_scaling_coeff //how much does the amount of players get divided by to determine changelings
config_entry_value = 6
min_val = 1
/datum/config_entry/number/ecult_scaling_coeff //how much does the amount of players get divided by to determine e_cult
config_entry_value = 6
integer = FALSE
min_val = 1
/datum/config_entry/number/security_scaling_coeff //how much does the amount of players get divided by to determine open security officer positions
config_entry_value = 8
min_val = 1
/datum/config_entry/number/abductor_scaling_coeff //how many players per abductor team
config_entry_value = 15
min_val = 1
/datum/config_entry/number/traitor_objectives_amount
config_entry_value = 2
min_val = 0
/datum/config_entry/number/brother_objectives_amount
config_entry_value = 2
min_val = 0
/datum/config_entry/flag/protect_roles_from_antagonist //If security and such can be traitor/cult/other
/datum/config_entry/flag/protect_assistant_from_antagonist //If assistants can be traitor/cult/other
/datum/config_entry/flag/allow_latejoin_antagonists // If late-joining players can be traitor/changeling
+287 -383
View File
@@ -1,21 +1,3 @@
/datum/config_entry/flag/auto_profile // Automatically start profiler on server start
/datum/config_entry/flag/autoadmin // if autoadmin is enabled
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/string/autoadmin_rank // the rank for autoadmins
config_entry_value = "Game Master"
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/string/servername // server name (the name of the game window)
/datum/config_entry/string/servertagline
config_entry_value = "We forgot to set the server's tagline in config.txt"
/datum/config_entry/string/serversqlname // short form server name used for the DB
/datum/config_entry/string/stationname // station name (the name of the station in-game)
/datum/config_entry/number/lobby_countdown // In between round countdown.
config_entry_value = 120
min_val = 0
@@ -24,164 +6,11 @@
config_entry_value = 25
min_val = 0
/datum/config_entry/flag/hub // if the game appears on the hub or not
/datum/config_entry/flag/allow_admin_ooccolor // Allows admins with relevant permissions to have their own ooc colour
/datum/config_entry/flag/allow_vote_restart // allow votes to restart
/datum/config_entry/flag/allow_vote_mode // allow votes to change mode
/datum/config_entry/number/vote_delay // minimum time between voting sessions (deciseconds, 10 minute default)
config_entry_value = 6000
min_val = 0
/datum/config_entry/number/vote_period // length of voting period (deciseconds, default 1 minute)
config_entry_value = 600
min_val = 0
/// Length of time before the first autotransfer vote is called (deciseconds, default 2 hours)
/// Set to 0 to disable the subsystem altogether.
/datum/config_entry/number/vote_autotransfer_initial
config_entry_value = 72000
min_val = 0
///length of time to wait before subsequent autotransfer votes (deciseconds, default 30 minutes)
/datum/config_entry/number/vote_autotransfer_interval
config_entry_value = 18000
min_val = 0
/// maximum extensions until the round autoends.
/// Set to 0 to force automatic crew transfer after the 'vote_autotransfer_initial' elapsed.
/// Set to -1 to disable the maximum extensions cap.
/datum/config_entry/number/vote_autotransfer_maximum
config_entry_value = 4
min_val = -1
/datum/config_entry/flag/default_no_vote // vote does not default to nochange/norestart
/datum/config_entry/flag/no_dead_vote // dead people can't vote
/datum/config_entry/flag/allow_metadata // Metadata is supported.
/datum/config_entry/flag/popup_admin_pm // adminPMs to non-admins show in a pop-up 'reply' window when set
/datum/config_entry/number/fps
config_entry_value = 20
min_val = 1
max_val = 100 //byond will start crapping out at 50, so this is just ridic
var/sync_validate = FALSE
/datum/config_entry/number/fps/ValidateAndSet(str_val)
. = ..()
if(.)
sync_validate = TRUE
var/datum/config_entry/number/ticklag/TL = config.entries_by_type[/datum/config_entry/number/ticklag]
if(!TL.sync_validate)
TL.ValidateAndSet(10 / config_entry_value)
sync_validate = FALSE
/datum/config_entry/number/ticklag
integer = FALSE
var/sync_validate = FALSE
/datum/config_entry/number/ticklag/New() //ticklag weirdly just mirrors fps
var/datum/config_entry/CE = /datum/config_entry/number/fps
config_entry_value = 10 / initial(CE.config_entry_value)
..()
/datum/config_entry/number/ticklag/ValidateAndSet(str_val)
. = text2num(str_val) > 0 && ..()
if(.)
sync_validate = TRUE
var/datum/config_entry/number/fps/FPS = config.entries_by_type[/datum/config_entry/number/fps]
if(!FPS.sync_validate)
FPS.ValidateAndSet(10 / config_entry_value)
sync_validate = FALSE
/datum/config_entry/flag/allow_holidays
/datum/config_entry/number/tick_limit_mc_init //SSinitialization throttling
config_entry_value = TICK_LIMIT_MC_INIT_DEFAULT
min_val = 0 //oranges warned us
integer = FALSE
/datum/config_entry/flag/admin_legacy_system //Defines whether the server uses the legacy admin system with admins.txt or the SQL system
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/protect_legacy_admins //Stops any admins loaded by the legacy system from having their rank edited by the permissions panel
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/protect_legacy_ranks //Stops any ranks loaded by the legacy system from having their flags edited by the permissions panel
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/enable_localhost_rank //Gives the !localhost! rank to any client connecting from 127.0.0.1 or ::1
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/load_legacy_ranks_only //Loads admin ranks only from legacy admin_ranks.txt, while enabled ranks are mirrored to the database
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/mentors_mobname_only
/datum/config_entry/flag/mentor_legacy_system //Defines whether the server uses the legacy mentor system with mentors.txt or the SQL system
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/string/hostedby
/datum/config_entry/flag/guest_jobban
/datum/config_entry/flag/usewhitelist
/datum/config_entry/flag/ban_legacy_system //Defines whether the server uses the legacy banning system with the files in /data or the SQL system.
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/use_age_restriction_for_jobs //Do jobs use account age restrictions? --requires database
/datum/config_entry/flag/use_account_age_for_jobs //Uses the time they made the account for the job restriction stuff. New player joining alerts should be unaffected.
/datum/config_entry/flag/use_exp_tracking
/datum/config_entry/flag/use_exp_restrictions_heads
/datum/config_entry/number/use_exp_restrictions_heads_hours
config_entry_value = 0
min_val = 0
/datum/config_entry/flag/use_exp_restrictions_heads_department
/datum/config_entry/flag/use_exp_restrictions_other
/datum/config_entry/flag/use_exp_restrictions_admin_bypass
/datum/config_entry/string/server
/datum/config_entry/string/banappeals
/datum/config_entry/string/wikiurl
config_entry_value = "https://katlin.dog/citadel-wiki"
/datum/config_entry/string/wikiurltg
config_entry_value = "http://www.tgstation13.org/wiki"
/datum/config_entry/string/forumurl
config_entry_value = "http://tgstation13.org/phpBB/index.php"
/datum/config_entry/string/rulesurl
config_entry_value = "http://www.tgstation13.org/wiki/Rules"
/datum/config_entry/string/githuburl
config_entry_value = "https://www.github.com/tgstation/-tg-station"
/datum/config_entry/string/roundstatsurl
/datum/config_entry/string/gamelogurl
/datum/config_entry/number/githubrepoid
config_entry_value = null
min_val = 0
/datum/config_entry/flag/guest_ban
/datum/config_entry/number/id_console_jobslot_delay
config_entry_value = 30
min_val = 0
@@ -208,181 +37,8 @@
/datum/config_entry/flag/load_jobs_from_txt
/datum/config_entry/flag/forbid_singulo_possession
/datum/config_entry/flag/automute_on //enables automuting/spam prevention
/datum/config_entry/string/panic_server_name
/datum/config_entry/string/panic_server_name/ValidateAndSet(str_val)
return str_val != "\[Put the name here\]" && ..()
/datum/config_entry/string/panic_server_address //Reconnect a player this linked server if this server isn't accepting new players
/datum/config_entry/string/panic_server_address/ValidateAndSet(str_val)
return str_val != "byond://address:port" && ..()
/datum/config_entry/string/invoke_youtubedl
protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN
/datum/config_entry/flag/show_irc_name
/datum/config_entry/flag/see_own_notes //Can players see their own admin notes
/datum/config_entry/number/note_fresh_days
config_entry_value = null
min_val = 0
integer = FALSE
/datum/config_entry/number/note_stale_days
config_entry_value = null
min_val = 0
integer = FALSE
/datum/config_entry/flag/maprotation
/datum/config_entry/flag/tgstyle_maprotation
/datum/config_entry/string/map_vote_type
config_entry_value = APPROVAL_VOTING
/datum/config_entry/number/maprotatechancedelta
config_entry_value = 0.75
min_val = 0
max_val = 1
integer = FALSE
/datum/config_entry/number/soft_popcap
config_entry_value = null
min_val = 0
/datum/config_entry/number/hard_popcap
config_entry_value = null
min_val = 0
/datum/config_entry/number/extreme_popcap
config_entry_value = null
min_val = 0
/datum/config_entry/string/soft_popcap_message
config_entry_value = "Be warned that the server is currently serving a high number of users, consider using alternative game servers."
/datum/config_entry/string/hard_popcap_message
config_entry_value = "The server is currently serving a high number of users, You cannot currently join. You may wait for the number of living crew to decline, observe, or find alternative servers."
/datum/config_entry/string/extreme_popcap_message
config_entry_value = "The server is currently serving a high number of users, find alternative servers."
/datum/config_entry/flag/panic_bunker // prevents people the server hasn't seen before from connecting
/datum/config_entry/number/panic_bunker_living // living time in minutes that a player needs to pass the panic bunker
/datum/config_entry/string/panic_bunker_message
config_entry_value = "Sorry but the server is currently not accepting connections from never before seen players."
/datum/config_entry/number/notify_new_player_age // how long do we notify admins of a new player
min_val = -1
/datum/config_entry/number/notify_new_player_account_age // how long do we notify admins of a new byond account
min_val = 0
/datum/config_entry/flag/age_verification //are we using the automated age verification which asks users if they're 18+?
config_entry_value = TRUE
/datum/config_entry/flag/irc_first_connection_alert // do we notify the irc channel when somebody is connecting for the first time?
/datum/config_entry/flag/check_randomizer
/datum/config_entry/string/ipintel_email
/datum/config_entry/string/ipintel_email/ValidateAndSet(str_val)
return str_val != "ch@nge.me" && ..()
/datum/config_entry/number/ipintel_rating_bad
config_entry_value = 1
integer = FALSE
min_val = 0
max_val = 1
/datum/config_entry/number/ipintel_save_good
config_entry_value = 12
min_val = 0
/datum/config_entry/number/ipintel_save_bad
config_entry_value = 1
min_val = 0
/datum/config_entry/string/ipintel_domain
config_entry_value = "check.getipintel.net"
/datum/config_entry/flag/aggressive_changelog
/datum/config_entry/flag/autoconvert_notes //if all connecting player's notes should attempt to be converted to the database
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/flag/allow_webclient
/datum/config_entry/flag/webclient_only_byond_members
/datum/config_entry/flag/announce_admin_logout
/datum/config_entry/flag/announce_admin_login
/datum/config_entry/flag/allow_map_voting
/datum/config_entry/number/client_warn_version
config_entry_value = null
min_val = 500
/datum/config_entry/number/client_warn_version
config_entry_value = null
min_val = 500
/datum/config_entry/string/client_warn_message
config_entry_value = "Your version of byond may have issues or be blocked from accessing this server in the future."
/datum/config_entry/flag/client_warn_popup
/datum/config_entry/number/client_error_version
config_entry_value = null
min_val = 500
/datum/config_entry/string/client_error_message
config_entry_value = "Your version of byond is too old, may have issues, and is blocked from accessing this server."
/datum/config_entry/number/client_error_build
config_entry_value = null
min_val = 0
/datum/config_entry/number/minute_topic_limit
config_entry_value = null
min_val = 0
/datum/config_entry/number/second_topic_limit
config_entry_value = null
min_val = 0
/datum/config_entry/number/minute_click_limit
config_entry_value = 400
min_val = 0
/datum/config_entry/number/second_click_limit
config_entry_value = 15
min_val = 0
/datum/config_entry/number/error_cooldown // The "cooldown" time for each occurrence of a unique error
config_entry_value = 600
min_val = 0
/datum/config_entry/number/error_limit // How many occurrences before the next will silence them
config_entry_value = 50
/datum/config_entry/number/error_silence_time // How long a unique error will be silenced for
config_entry_value = 6000
/datum/config_entry/number/error_msg_delay // How long to wait between messaging admins about occurrences of a unique error
config_entry_value = 50
/datum/config_entry/flag/irc_announce_new_game
deprecated_by = /datum/config_entry/string/chat_announce_new_game
@@ -390,54 +46,302 @@
return "" //default broadcast
/datum/config_entry/string/chat_announce_new_game
config_entry_value = null
/datum/config_entry/flag/debug_admin_hrefs
/datum/config_entry/number/mc_tick_rate/base_mc_tick_rate
integer = FALSE
config_entry_value = 1
/datum/config_entry/number/mc_tick_rate/high_pop_mc_tick_rate
integer = FALSE
config_entry_value = 1.1
/datum/config_entry/number/mc_tick_rate/high_pop_mc_mode_amount
config_entry_value = 65
/datum/config_entry/number/mc_tick_rate/disable_high_pop_mc_mode_amount
config_entry_value = 60
/datum/config_entry/number/mc_tick_rate
abstract_type = /datum/config_entry/number/mc_tick_rate
/datum/config_entry/number/mc_tick_rate/ValidateAndSet(str_val)
. = ..()
if (.)
Master.UpdateTickRate()
/datum/config_entry/flag/resume_after_initializations
/datum/config_entry/flag/resume_after_initializations/ValidateAndSet(str_val)
. = ..()
if(. && Master.current_runlevel)
world.sleep_offline = !config_entry_value
/datum/config_entry/number/rounds_until_hard_restart
config_entry_value = -1
min_val = 0
/datum/config_entry/string/default_view
config_entry_value = "15x15"
/datum/config_entry/string/default_view_square
config_entry_value = "15x15"
/datum/config_entry/number/max_bunker_days
config_entry_value = 7
min_val = 1
/datum/config_entry/flag/minimaps_enabled
config_entry_value = TRUE
/datum/config_entry/string/centcom_ban_db // URL for the CentCom Galactic Ban DB API
/datum/config_entry/number/damage_multiplier
config_entry_value = 1
integer = FALSE
/datum/config_entry/number/minimal_access_threshold //If the number of players is larger than this threshold, minimal access will be turned on.
min_val = 0
/datum/config_entry/flag/jobs_have_minimal_access //determines whether jobs use minimal access or expanded access.
/datum/config_entry/flag/assistants_have_maint_access
/datum/config_entry/flag/security_has_maint_access
/datum/config_entry/flag/everyone_has_maint_access
/datum/config_entry/flag/sec_start_brig //makes sec start in brig instead of dept sec posts
/datum/config_entry/flag/force_random_names
/datum/config_entry/flag/humans_need_surnames
/datum/config_entry/flag/allow_ai // allow ai job
/datum/config_entry/flag/allow_ai_multicam //whether the AI can use their multicam
/datum/config_entry/flag/disable_human_mood
/datum/config_entry/flag/disable_borg_flash_knockdown //Should borg flashes be capable of knocking humanoid entities down?
/datum/config_entry/flag/weaken_secborg //Brings secborgs and k9s back in-line with the other borg modules
/datum/config_entry/flag/disable_secborg // disallow secborg module to be chosen.
/datum/config_entry/flag/disable_peaceborg
/datum/config_entry/flag/economy //money money money money money money money money money money money money
/datum/config_entry/flag/reactionary_explosions //If we use reactionary explosions, explosions that react to walls and doors
/datum/config_entry/flag/enforce_human_authority //If non-human species are barred from joining as a head of staff
/datum/config_entry/number/midround_antag_time_check // How late (in minutes you want the midround antag system to stay on, setting this to 0 will disable the system)
config_entry_value = 60
min_val = 0
/datum/config_entry/number/midround_antag_life_check // A ratio of how many people need to be alive in order for the round not to immediately end in midround antagonist
config_entry_value = 0.7
integer = FALSE
min_val = 0
max_val = 1
/datum/config_entry/number/suicide_reenter_round_timer
config_entry_value = 30
min_val = 0
/datum/config_entry/number/roundstart_suicide_time_limit
config_entry_value = 30
min_val = 0
/datum/config_entry/number/shuttle_refuel_delay
config_entry_value = 12000
min_val = 0
/datum/config_entry/flag/show_game_type_odds //if set this allows players to see the odds of each roundtype on the get revision screen
/datum/config_entry/keyed_list/roundstart_races //races you can play as from the get go.
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
/datum/config_entry/flag/join_with_mutant_humans //players can pick mutant bodyparts for humans before joining the game
/datum/config_entry/flag/no_summon_guns //No
/datum/config_entry/flag/no_summon_magic //Fun
/datum/config_entry/flag/no_summon_events //Allowed
/datum/config_entry/flag/no_summon_traumas //!
/datum/config_entry/flag/no_intercept_report //Whether or not to send a communications intercept report roundstart. This may be overridden by gamemodes.
/datum/config_entry/number/arrivals_shuttle_dock_window //Time from when a player late joins on the arrivals shuttle to when the shuttle docks on the station
config_entry_value = 55
min_val = 30
/datum/config_entry/flag/arrivals_shuttle_require_undocked //Require the arrivals shuttle to be undocked before latejoiners can join
/datum/config_entry/flag/arrivals_shuttle_require_safe_latejoin //Require the arrivals shuttle to be operational in order for latejoiners to join
/datum/config_entry/flag/revival_pod_plants
/datum/config_entry/flag/revival_cloning
/datum/config_entry/number/revival_brain_life
config_entry_value = -1
min_val = -1
/datum/config_entry/flag/ooc_during_round
/datum/config_entry/flag/emojis
/datum/config_entry/flag/roundstart_away //Will random away mission be loaded.
/datum/config_entry/flag/roundstart_vr //Will virtual reality missions be loaded?
/datum/config_entry/number/gateway_delay //How long the gateway takes before it activates. Default is half an hour. Only matters if roundstart_away is enabled.
config_entry_value = 18000
min_val = 0
/datum/config_entry/flag/ghost_interaction
/datum/config_entry/flag/silent_ai
/datum/config_entry/flag/silent_borg
/datum/config_entry/flag/sandbox_autoclose // close the sandbox panel after spawning an item, potentially reducing griff
/datum/config_entry/number/default_laws //Controls what laws the AI spawns with.
config_entry_value = 0
min_val = 0
max_val = 3
/datum/config_entry/number/silicon_max_law_amount
config_entry_value = 12
min_val = 0
/datum/config_entry/keyed_list/random_laws
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
/datum/config_entry/keyed_list/law_weight
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
splitter = ","
/datum/config_entry/number/overflow_cap
config_entry_value = -1
min_val = -1
/datum/config_entry/string/overflow_job
config_entry_value = "Assistant"
/datum/config_entry/flag/starlight
/datum/config_entry/flag/grey_assistants
/datum/config_entry/number/lavaland_budget
config_entry_value = 60
min_val = 0
/datum/config_entry/number/space_budget
config_entry_value = 16
min_val = 0
/datum/config_entry/number/icemoon_budget
config_entry_value = 90
integer = FALSE
min_val = 0
/datum/config_entry/number/station_space_budget
config_entry_value = 10
min_val = 0
/datum/config_entry/flag/allow_random_events // Enables random events mid-round when set
/datum/config_entry/number/events_min_time_mul // Multipliers for random events minimal starting time and minimal players amounts
config_entry_value = 1
min_val = 0
integer = FALSE
/datum/config_entry/number/events_min_players_mul
config_entry_value = 1
min_val = 0
integer = FALSE
/datum/config_entry/number/mice_roundstart
config_entry_value = 10
min_val = 0
/datum/config_entry/number/bombcap
config_entry_value = 14
min_val = 4
/datum/config_entry/number/bombcap/ValidateAndSet(str_val)
. = ..()
if(.)
GLOB.MAX_EX_DEVESTATION_RANGE = round(config_entry_value / 4)
GLOB.MAX_EX_HEAVY_RANGE = round(config_entry_value / 2)
GLOB.MAX_EX_LIGHT_RANGE = config_entry_value
GLOB.MAX_EX_FLASH_RANGE = config_entry_value
GLOB.MAX_EX_FLAME_RANGE = config_entry_value
/datum/config_entry/number/emergency_shuttle_autocall_threshold
min_val = 0
max_val = 1
integer = FALSE
/datum/config_entry/flag/ic_printing
/datum/config_entry/flag/roundstart_traits
/datum/config_entry/flag/enable_night_shifts
/datum/config_entry/number/night_shift_public_areas_only
config_entry_value = NIGHTSHIFT_AREA_PUBLIC
/datum/config_entry/flag/nightshift_toggle_requires_auth
config_entry_value = FALSE
/datum/config_entry/flag/nightshift_toggle_public_requires_auth
config_entry_value = TRUE
/datum/config_entry/flag/randomize_shift_time
/datum/config_entry/flag/shift_time_realtime
/datum/config_entry/number/monkeycap
config_entry_value = 64
min_val = 0
/datum/config_entry/number/ratcap
config_entry_value = 64
min_val = 0
/datum/config_entry/keyed_list/box_random_engine
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
lowercase = FALSE
splitter = ","
/datum/config_entry/flag/pai_custom_holoforms
/datum/config_entry/number/marauder_delay_non_reebe
config_entry_value = 1800
min_val = 0
/datum/config_entry/flag/allow_clockwork_marauder_on_station
config_entry_value = TRUE
/datum/config_entry/flag/suicide_allowed
//Allows players to set a hexadecimal color of their choice as skin tone, on top of the standard ones.
/datum/config_entry/flag/allow_custom_skintones
///Initial loadout points
/datum/config_entry/number/initial_gear_points
config_entry_value = 10
/**
* Enables the FoV component, which hides objects and mobs behind the parent from their sight, unless they turn around, duh.
* Camera mobs, AIs, ghosts and some other are of course exempt from this. This also doesn't influence simplemob AI, for the best.
*/
/datum/config_entry/flag/use_field_of_vision
//Shuttle size limiter
/datum/config_entry/number/max_shuttle_count
config_entry_value = 6
/datum/config_entry/number/max_shuttle_size
config_entry_value = 500
//wound config stuff (increases the max injury roll, making injuries more likely)
/datum/config_entry/number/wound_exponent
config_entry_value = WOUND_DAMAGE_EXPONENT
min_val = 0
integer = FALSE
//adds a set amount to any injury rolls on a limb using get_damage() multiplied by this number
/datum/config_entry/number/wound_damage_multiplier
config_entry_value = 0.333
min_val = 0
integer = FALSE
/datum/config_entry/number/hard_deletes_overrun_threshold
integer = FALSE
min_val = 0
default = 0.5
/datum/config_entry/number/hard_deletes_overrun_limit
default = 0
min_val = 0
/datum/config_entry/flag/atmos_equalize_enabled
default = FALSE
@@ -0,0 +1,17 @@
/datum/config_entry/flag/use_age_restriction_for_jobs //Do jobs use account age restrictions? --requires database
/datum/config_entry/flag/use_account_age_for_jobs //Uses the time they made the account for the job restriction stuff. New player joining alerts should be unaffected.
/datum/config_entry/flag/use_exp_tracking
/datum/config_entry/flag/use_exp_restrictions_heads
/datum/config_entry/number/use_exp_restrictions_heads_hours
config_entry_value = 0
min_val = 0
/datum/config_entry/flag/use_exp_restrictions_heads_department
/datum/config_entry/flag/use_exp_restrictions_other
/datum/config_entry/flag/use_exp_restrictions_admin_bypass
@@ -9,6 +9,7 @@
/datum/config_entry/flag/log_admin // log admin actions
protection = CONFIG_ENTRY_LOCKED
config_entry_value = TRUE
/datum/config_entry/flag/log_prayer // log prayers
config_entry_value = TRUE
@@ -68,3 +69,16 @@
/// forces log_href for tgui
/datum/config_entry/flag/emergency_tgui_logging
config_entry_value = FALSE
/datum/config_entry/number/error_cooldown // The "cooldown" time for each occurrence of a unique error
config_entry_value = 600
min_val = 0
/datum/config_entry/number/error_limit // How many occurrences before the next will silence them
config_entry_value = 50
/datum/config_entry/number/error_silence_time // How long a unique error will be silenced for
config_entry_value = 6000
/datum/config_entry/number/error_msg_delay // How long to wait between messaging admins about occurrences of a unique error
config_entry_value = 50
@@ -0,0 +1,124 @@
/datum/config_entry/keyed_list/multiplicative_movespeed
key_mode = KEY_MODE_TYPE
value_mode = VALUE_MODE_NUM
abstract_type = /datum/config_entry/keyed_list/multiplicative_movespeed
/datum/config_entry/keyed_list/multiplicative_movespeed/ValidateAndSet()
. = ..()
if(.)
update_config_movespeed_type_lookup(TRUE)
/datum/config_entry/keyed_list/multiplicative_movespeed/vv_edit_var(var_name, var_value)
. = ..()
if(. && (var_name == NAMEOF(src, config_entry_value)))
update_config_movespeed_type_lookup(TRUE)
/datum/config_entry/keyed_list/multiplicative_movespeed/normal
name = "multiplicative_movespeed"
config_entry_value = list( //DEFAULTS
/mob/living/simple_animal = 1,
/mob/living/silicon/pai = 1,
/mob/living/carbon/alien/humanoid/sentinel = 0.25,
/mob/living/carbon/alien/humanoid/drone = 0.5,
/mob/living/carbon/alien/humanoid/royal/praetorian = 1,
/mob/living/carbon/alien/humanoid/royal/queen = 3
)
/datum/config_entry/keyed_list/multiplicative_movespeed/floating
name = "multiplicative_movespeed_floating"
config_entry_value = list(
/mob/living = 0,
/mob/living/carbon/alien/humanoid = 0,
/mob/living/carbon/alien/humanoid/royal/praetorian = 0,
/mob/living/carbon/alien/humanoid/royal/queen = 2
)
/datum/config_entry/number/movedelay //Used for modifying movement speed for mobs.
abstract_type = /datum/config_entry/number/movedelay
integer = FALSE
/datum/config_entry/number/movedelay/ValidateAndSet()
. = ..()
if(.)
update_mob_config_movespeeds()
/datum/config_entry/number/movedelay/vv_edit_var(var_name, var_value)
. = ..()
if(. && (var_name == NAMEOF(src, config_entry_value)))
update_mob_config_movespeeds()
/datum/config_entry/number/movedelay/run_delay
/datum/config_entry/number/movedelay/run_delay/ValidateAndSet()
. = ..()
var/datum/movespeed_modifier/config_walk_run/M = get_cached_movespeed_modifier(/datum/movespeed_modifier/config_walk_run/run)
M.sync()
/datum/config_entry/number/movedelay/walk_delay
/datum/config_entry/number/movedelay/walk_delay/ValidateAndSet()
. = ..()
var/datum/movespeed_modifier/config_walk_run/M = get_cached_movespeed_modifier(/datum/movespeed_modifier/config_walk_run/walk)
M.sync()
/datum/config_entry/flag/sprint_enabled
config_entry_value = TRUE
/datum/config_entry/flag/sprint_enabled/ValidateAndSet(str_val)
. = ..()
for(var/datum/hud/human/H)
H.assert_move_intent_ui()
if(!config_entry_value) // disabled
for(var/mob/living/L in world)
L.disable_intentional_sprint_mode()
/datum/config_entry/number/sprintless_stagger_slowdown
config_entry_value = 0
/datum/config_entry/number/sprintless_off_balance_slowdown
config_entry_value = 0.85
/datum/config_entry/number/melee_stagger_factor
config_entry_value = 1
/datum/config_entry/number/movedelay/sprint_speed_increase
config_entry_value = 1
/datum/config_entry/number/movedelay/sprint_max_tiles_increase
config_entry_value = 5
/datum/config_entry/number/movedelay/sprint_absolute_max_tiles
config_entry_value = 13
/datum/config_entry/number/movedelay/sprint_buffer_max
config_entry_value = 24
/datum/config_entry/number/movedelay/sprint_stamina_cost
config_entry_value = 1.4
/datum/config_entry/number/movedelay/sprint_buffer_regen_per_ds
config_entry_value = 0.4
/////////////////////////////////////////////////Outdated move delay
/datum/config_entry/number/outdated_movedelay
deprecated_by = /datum/config_entry/keyed_list/multiplicative_movespeed/normal
abstract_type = /datum/config_entry/number/outdated_movedelay
var/movedelay_type
/datum/config_entry/number/outdated_movedelay/DeprecationUpdate(value)
return "[movedelay_type] [value]"
/datum/config_entry/number/outdated_movedelay/human_delay
movedelay_type = /mob/living/carbon/human
/datum/config_entry/number/outdated_movedelay/robot_delay
movedelay_type = /mob/living/silicon/robot
/datum/config_entry/number/outdated_movedelay/monkey_delay
movedelay_type = /mob/living/carbon/monkey
/datum/config_entry/number/outdated_movedelay/alien_delay
movedelay_type = /mob/living/carbon/alien
/datum/config_entry/number/outdated_movedelay/slime_delay
movedelay_type = /mob/living/simple_animal/slime
/datum/config_entry/number/outdated_movedelay/animal_delay
movedelay_type = /mob/living/simple_animal
/////////////////////////////////////////////////
@@ -3,9 +3,9 @@
config_entry_value = 300
integer = TRUE
/datum/config_entry/keyed_list/policyconfig
/datum/config_entry/keyed_list/policy
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_TEXT
/datum/config_entry/keyed_list/policyconfig/preprocess_key(key)
/datum/config_entry/keyed_list/policy/preprocess_key(key)
return uppertext(..())
@@ -9,7 +9,6 @@
protection = CONFIG_ENTRY_LOCKED //affects physical server configuration, no touchies!!
/datum/config_entry/flag/fail2topic_enabled
config_entry_value = TRUE
/datum/config_entry/number/topic_max_size
config_entry_value = 8192
@@ -17,3 +16,19 @@
/datum/config_entry/keyed_list/topic_rate_limit_whitelist
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
/datum/config_entry/number/minute_topic_limit
config_entry_value = null
min_val = 0
/datum/config_entry/number/second_topic_limit
config_entry_value = null
min_val = 0
/datum/config_entry/number/minute_click_limit
config_entry_value = 400
min_val = 0
/datum/config_entry/number/second_click_limit
config_entry_value = 15
min_val = 0
@@ -0,0 +1,90 @@
/datum/config_entry/flag/auto_profile // Automatically start profiler on server start
/datum/config_entry/string/servername // server name (the name of the game window)
/datum/config_entry/string/servertagline
config_entry_value = "We forgot to set the server's tagline in config.txt"
/datum/config_entry/string/serversqlname // short form server name used for the DB
/datum/config_entry/string/stationname // station name (the name of the station in-game)
/datum/config_entry/number/fps
config_entry_value = 20
min_val = 1
max_val = 100 //byond will start crapping out at 50, so this is just ridic
var/sync_validate = FALSE
/datum/config_entry/number/fps/ValidateAndSet(str_val)
. = ..()
if(.)
sync_validate = TRUE
var/datum/config_entry/number/ticklag/TL = config.entries_by_type[/datum/config_entry/number/ticklag]
if(!TL.sync_validate)
TL.ValidateAndSet(10 / config_entry_value)
sync_validate = FALSE
/datum/config_entry/number/ticklag
integer = FALSE
var/sync_validate = FALSE
/datum/config_entry/number/ticklag/New() //ticklag weirdly just mirrors fps
var/datum/config_entry/CE = /datum/config_entry/number/fps
config_entry_value = 10 / initial(CE.config_entry_value)
..()
/datum/config_entry/number/ticklag/ValidateAndSet(str_val)
. = text2num(str_val) > 0 && ..()
if(.)
sync_validate = TRUE
var/datum/config_entry/number/fps/FPS = config.entries_by_type[/datum/config_entry/number/fps]
if(!FPS.sync_validate)
FPS.ValidateAndSet(10 / config_entry_value)
sync_validate = FALSE
/datum/config_entry/number/tick_limit_mc_init //SSinitialization throttling
config_entry_value = TICK_LIMIT_MC_INIT_DEFAULT
min_val = 0 //oranges warned us
integer = FALSE
/datum/config_entry/flag/usewhitelist
/datum/config_entry/string/hostedby
/datum/config_entry/flag/hub // if the game appears on the hub or not
/datum/config_entry/string/invoke_youtubedl
protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN
/datum/config_entry/number/mc_tick_rate/base_mc_tick_rate
integer = FALSE
config_entry_value = 1
/datum/config_entry/number/mc_tick_rate/high_pop_mc_tick_rate
integer = FALSE
config_entry_value = 1.1
/datum/config_entry/number/mc_tick_rate/high_pop_mc_mode_amount
config_entry_value = 65
/datum/config_entry/number/mc_tick_rate/disable_high_pop_mc_mode_amount
config_entry_value = 60
/datum/config_entry/number/mc_tick_rate
abstract_type = /datum/config_entry/number/mc_tick_rate
/datum/config_entry/number/mc_tick_rate/ValidateAndSet(str_val)
. = ..()
if (.)
Master.UpdateTickRate()
/datum/config_entry/flag/resume_after_initializations
/datum/config_entry/flag/resume_after_initializations/ValidateAndSet(str_val)
. = ..()
if(. && Master.current_runlevel)
world.sleep_offline = !config_entry_value
/datum/config_entry/number/rounds_until_hard_restart
config_entry_value = -1
min_val = 0
@@ -29,3 +29,5 @@
/// Factor to multiply by for stamina usage past buffer into health
/datum/config_entry/number/stamina_combat/overdraw_penalty_factor
config_entry_value = 1.5
/datum/config_entry/flag/disable_stambuffer
@@ -0,0 +1,7 @@
/datum/config_entry/keyed_list/job_threat
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/keyed_list/antag_threat
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
@@ -0,0 +1,26 @@
/datum/config_entry/string/server
/datum/config_entry/string/banappeals
/datum/config_entry/string/wikiurl
config_entry_value = "https://katlin.dog/citadel-wiki"
/datum/config_entry/string/wikiurltg
config_entry_value = "http://www.tgstation13.org/wiki"
/datum/config_entry/string/forumurl
config_entry_value = "http://tgstation13.org/phpBB/index.php"
/datum/config_entry/string/rulesurl
config_entry_value = "http://www.tgstation13.org/wiki/Rules"
/datum/config_entry/string/githuburl
config_entry_value = "https://www.github.com/tgstation/-tg-station"
/datum/config_entry/string/roundstatsurl
/datum/config_entry/string/gamelogurl
/datum/config_entry/number/githubrepoid
config_entry_value = null
min_val = 0
@@ -0,0 +1,55 @@
/datum/config_entry/flag/allow_vote_restart // allow votes to restart
/datum/config_entry/flag/allow_vote_mode // allow votes to change mode
/datum/config_entry/number/vote_delay // minimum time between voting sessions (deciseconds, 10 minute default)
config_entry_value = 6000
min_val = 0
/datum/config_entry/number/vote_period // length of voting period (deciseconds, default 1 minute)
config_entry_value = 600
min_val = 0
/// Length of time before the first autotransfer vote is called (deciseconds, default 2 hours)
/// Set to 0 to disable the subsystem altogether.
/datum/config_entry/number/vote_autotransfer_initial
config_entry_value = 72000
min_val = 0
///length of time to wait before subsequent autotransfer votes (deciseconds, default 30 minutes)
/datum/config_entry/number/vote_autotransfer_interval
config_entry_value = 18000
min_val = 0
/// maximum extensions until the round autoends.
/// Set to 0 to force automatic crew transfer after the 'vote_autotransfer_initial' elapsed.
/// Set to -1 to disable the maximum extensions cap.
/datum/config_entry/number/vote_autotransfer_maximum
config_entry_value = 4
min_val = -1
/datum/config_entry/flag/default_no_vote // vote does not default to nochange/norestart
/datum/config_entry/flag/no_dead_vote // dead people can't vote
/datum/config_entry/flag/maprotation
/datum/config_entry/flag/tgstyle_maprotation
/datum/config_entry/string/map_vote_type
config_entry_value = APPROVAL_VOTING
/datum/config_entry/number/maprotatechancedelta
config_entry_value = 0.75
min_val = 0
max_val = 1
integer = FALSE
/datum/config_entry/flag/allow_map_voting
/datum/config_entry/flag/modetier_voting
/datum/config_entry/number/dropped_modes
config_entry_value = 3
/datum/config_entry/flag/must_be_readied_to_vote_gamemode
+95 -14
View File
@@ -15,7 +15,7 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
// The alert level. For every failed poke, we drop a DEFCON level. Once we hit DEFCON 1, restart the MC.
var/defcon = 5
//the world.time of the last check, so the mc can restart US if we hang.
// (Real friends look out for *eachother*)
// (Real friends look out for *eachother*)
var/lasttick = 0
// Track the MC iteration to make sure its still on track.
@@ -33,6 +33,22 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
/datum/controller/failsafe/Initialize()
set waitfor = FALSE
Failsafe.Loop()
if (!Master || defcon == 0) //Master is gone/not responding and Failsafe just exited its loop
defcon = 3 //Reset defcon level as its used inside the emergency loop
while (defcon > 0)
var/recovery_result = emergency_loop()
if (recovery_result == 1) //Exit emergency loop and delete self if it was able to recover MC
break
else if (defcon == 1) //Exit Failsafe if we weren't able to recover the MC in the last stage
log_game("FailSafe: Failed to recover MC while in emergency state. Failsafe exiting.")
message_admins(span_boldannounce("Failsafe failed criticaly while trying to recreate broken MC. Please manually fix the MC or reboot the server. Failsafe exiting now."))
message_admins(span_boldannounce("You can try manually calling these two procs:."))
message_admins(span_boldannounce("/proc/recover_all_SS_and_recreate_master: Most stuff should still function but expect instability/runtimes/broken stuff."))
message_admins(span_boldannounce("/proc/delete_all_SS_and_recreate_master: Most stuff will be broken but basic stuff like movement and chat should still work."))
else if (recovery_result == -1) //Failed to recreate MC
defcon--
sleep(initial(processing_interval)) //Wait a bit until the next try
if(!QDELETED(src))
qdel(src) //when Loop() returns, we delete ourselves and let the mc recreate us
@@ -45,42 +61,56 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
while(running)
lasttick = world.time
if(!Master)
// Replace the missing Master! This should never, ever happen.
new /datum/controller/master()
// Break out of the main loop so we go into emergency state
break
// Only poke it if overrides are not in effect.
if(processing_interval > 0)
if(Master.processing && Master.iteration)
if (defcon > 1 && (!Master.stack_end_detector || !Master.stack_end_detector.check()))
to_chat(GLOB.admins, span_boldannounce("ERROR: The Master Controller code stack has exited unexpectedly, Restarting..."))
defcon = 0
var/rtn = Recreate_MC()
if(rtn > 0)
master_iteration = 0
to_chat(GLOB.admins, span_adminnotice("MC restarted successfully"))
else if(rtn < 0)
log_game("FailSafe: Could not restart MC, runtime encountered. Entering defcon 0")
to_chat(GLOB.admins, span_boldannounce("ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying."))
// Check if processing is done yet.
if(Master.iteration == master_iteration)
switch(defcon)
if(4,5)
--defcon
if(3)
message_admins("<span class='adminnotice'>Notice: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks.</span>")
--defcon
if(2)
to_chat(GLOB.admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks.</span>")
--defcon
if(1)
to_chat(GLOB.admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting...</span>")
if(3)
message_admins(span_adminnotice("Notice: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks."))
--defcon
if(2)
to_chat(GLOB.admins, span_boldannounce("Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks."))
--defcon
if(1)
to_chat(GLOB.admins, span_boldannounce("Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting..."))
--defcon
var/rtn = Recreate_MC()
if(rtn > 0)
defcon = 4
master_iteration = 0
to_chat(GLOB.admins, "<span class='adminnotice'>MC restarted successfully</span>")
to_chat(GLOB.admins, span_adminnotice("MC restarted successfully"))
else if(rtn < 0)
log_game("FailSafe: Could not restart MC, runtime encountered. Entering defcon 0")
to_chat(GLOB.admins, "<span class='boldannounce'>ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying.</span>")
to_chat(GLOB.admins, span_boldannounce("ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying."))
//if the return number was 0, it just means the mc was restarted too recently, and it just needs some time before we try again
//no need to handle that specially when defcon 0 can handle it
if(0) //DEFCON 0! (mc failed to restart)
var/rtn = Recreate_MC()
if(rtn > 0)
defcon = 4
master_iteration = 0
to_chat(GLOB.admins, "<span class='adminnotice'>MC restarted successfully</span>")
to_chat(GLOB.admins, span_adminnotice("MC restarted successfully"))
else
defcon = min(defcon + 1,5)
master_iteration = Master.iteration
@@ -92,6 +122,57 @@ GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
defcon = 5
sleep(initial(processing_interval))
//Emergency loop used when Master got deleted or the main loop exited while Defcon == 0
//Loop is driven externally so runtimes only cancel the current recovery attempt
/datum/controller/failsafe/proc/emergency_loop()
//The code in this proc should be kept as simple as possible, anything complicated like to_chat might rely on master existing and runtime
//The goal should always be to get a new Master up and running before anything else
. = -1
switch (defcon) //The lower defcon goes the harder we try to fix the MC
if (2 to 3) //Try to normally recreate the MC two times
. = Recreate_MC()
if (1) //Delete the old MC first so we don't transfer any info, in case that caused any issues
del(Master)
. = Recreate_MC()
if (. == 1) //We were able to create a new master
master_iteration = 0
SSticker.Recover(); //Recover the ticket system so the Masters runlevel gets set
Master.Initialize(10, FALSE, TRUE) //Need to manually start the MC, normally world.new would do this
to_chat(GLOB.admins, span_adminnotice("Failsafe recovered MC while in emergency state [defcon_pretty()]"))
else
log_game("FailSafe: Failsafe in emergency state and was unable to recreate MC while in defcon state [defcon_pretty()].")
message_admins(span_boldannounce("Failsafe in emergency state and master down, trying to recreate MC while in defcon level [defcon_pretty()] failed."))
///Recreate all SSs which will still cause data survive due to Recover(), the new Master will then find and take them from global.vars
/proc/recover_all_SS_and_recreate_master()
del(Master)
var/list/subsytem_types = subtypesof(/datum/controller/subsystem)
sortTim(subsytem_types, /proc/cmp_subsystem_init)
for(var/I in subsytem_types)
new I
. = Recreate_MC()
if (. == 1) //We were able to create a new master
SSticker.Recover(); //Recover the ticket system so the Masters runlevel gets set
Master.Initialize(10, FALSE, TRUE) //Need to manually start the MC, normally world.new would do this
to_chat(GLOB.admins, span_adminnotice("MC successfully recreated after recovering all subsystems!"))
else
message_admins(span_boldannounce("Failed to create new MC!"))
///Delete all existing SS to basically start over
/proc/delete_all_SS_and_recreate_master()
del(Master)
for(var/global_var in global.vars)
if (istype(global.vars[global_var], /datum/controller/subsystem))
del(global.vars[global_var])
. = Recreate_MC()
if (. == 1) //We were able to create a new master
SSticker.Recover(); //Recover the ticket system so the Masters runlevel gets set
Master.Initialize(10, FALSE, TRUE) //Need to manually start the MC, normally world.new would do this
to_chat(GLOB.admins, span_adminnotice("MC successfully recreated after deleting and recreating all subsystems!"))
else
message_admins(span_boldannounce("Failed to create new MC!"))
/datum/controller/failsafe/proc/defcon_pretty()
return defcon
+1 -1
View File
@@ -14,7 +14,7 @@ GLOBAL_REAL(GLOB, /datum/controller/global_vars)
var/datum/controller/exclude_these = new
gvars_datum_in_built_vars = exclude_these.vars + list(NAMEOF(src, gvars_datum_protected_varlist), NAMEOF(src, gvars_datum_in_built_vars), NAMEOF(src, gvars_datum_init_order))
QDEL_IN(exclude_these, 0) //signal logging isn't ready
QDEL_IN(exclude_these, 0) //signal logging isn't ready
log_world("[vars.len - gvars_datum_in_built_vars.len] global variables")
+59 -57
View File
@@ -18,15 +18,17 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
/datum/controller/master
name = "Master"
// Are we processing (higher values increase the processing delay by n ticks)
/// Are we processing (higher values increase the processing delay by n ticks)
var/processing = TRUE
// How many times have we ran
/// How many times have we ran
var/iteration = 0
/// Stack end detector to detect stack overflows that kill the mc's main loop
var/datum/stack_end_detector/stack_end_detector
// world.time of last fire, for tracking lag outside of the mc
/// world.time of last fire, for tracking lag outside of the mc
var/last_run
// List of subsystems to process().
/// List of subsystems to process().
var/list/subsystems
// Vars for keeping track of tick drift.
@@ -34,25 +36,27 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/init_time
var/tickdrift = 0
/// How long is the MC sleeping between runs, read only (set by Loop() based off of anti-tick-contention heuristics)
var/sleep_delta = 1
///Only run ticker subsystems for the next n ticks.
/// Only run ticker subsystems for the next n ticks.
var/skip_ticks = 0
/// makes the mc main loop runtime
var/make_runtime = FALSE
var/initializations_finished_with_no_players_logged_in //I wonder what this could be?
var/initializations_finished_with_no_players_logged_in //I wonder what this could be?
// The type of the last subsystem to be process()'d.
/// The type of the last subsystem to be fire()'d.
var/last_type_processed
var/datum/controller/subsystem/queue_head //Start of queue linked list
var/datum/controller/subsystem/queue_tail //End of queue linked list (used for appending to the list)
var/datum/controller/subsystem/queue_head //!Start of queue linked list
var/datum/controller/subsystem/queue_tail //!End of queue linked list (used for appending to the list)
var/queue_priority_count = 0 //Running total so that we don't have to loop thru the queue each run to split up the tick
var/queue_priority_count_bg = 0 //Same, but for background subsystems
var/map_loading = FALSE //Are we loading in a new map?
var/map_loading = FALSE //!Are we loading in a new map?
var/current_runlevel //for scheduling different subsystems for different stages of the round
var/current_runlevel //!for scheduling different subsystems for different stages of the round
var/sleep_offline_after_initializations = TRUE
var/static/restart_clear = 0
@@ -61,8 +65,8 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/static/random_seed
//current tick limit, assigned before running a subsystem.
//used by CHECK_TICK as well so that the procs subsystems call can obey that SS's tick limits
///current tick limit, assigned before running a subsystem.
///used by CHECK_TICK as well so that the procs subsystems call can obey that SS's tick limits
var/static/current_ticklimit = TICK_LIMIT_RUNNING
/datum/controller/master/New()
@@ -81,15 +85,27 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/list/_subsystems = list()
subsystems = _subsystems
if (Master != src)
if (istype(Master))
if (istype(Master)) //If there is an existing MC take over his stuff and delete it
Recover()
qdel(Master)
Master = src
else
//Code used for first master on game boot or if existing master got deleted
Master = src
var/list/subsytem_types = subtypesof(/datum/controller/subsystem)
sortTim(subsytem_types, /proc/cmp_subsystem_init)
//Find any abandoned subsystem from the previous master (if there was any)
var/list/existing_subsystems = list()
for(var/global_var in global.vars)
if (istype(global.vars[global_var], /datum/controller/subsystem))
existing_subsystems += global.vars[global_var]
//Either init a new SS or if an existing one was found use that
for(var/I in subsytem_types)
_subsystems += new I
Master = src
var/datum/controller/subsystem/existing_subsystem = locate(I) in existing_subsystems
if (istype(existing_subsystem))
_subsystems += existing_subsystem
else
_subsystems += new I
if(!GLOB)
new /datum/controller/global_vars
@@ -109,7 +125,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
log_world("Shutdown complete")
// Returns 1 if we created a new mc, 0 if we couldn't due to a recent restart,
// -1 if we encountered a runtime trying to recreate it
// -1 if we encountered a runtime trying to recreate it
/proc/Recreate_MC()
. = -1 //so if we runtime, things know we failed
if (world.time < Master.restart_timeout)
@@ -120,7 +136,8 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/delay = 50 * ++Master.restart_count
Master.restart_timeout = world.time + delay
Master.restart_clear = world.time + (delay * 2)
Master.processing = FALSE //stop ticking this one
if (Master) //Can only do this if master hasn't been deleted
Master.processing = FALSE //stop ticking this one
try
new/datum/controller/master()
catch
@@ -156,22 +173,22 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
msg = "The [BadBoy.name] subsystem seems to be destabilizing the MC and will be offlined."
BadBoy.flags |= SS_NO_FIRE
if(msg)
to_chat(GLOB.admins, "<span class='boldannounce'>[msg]</span>")
to_chat(GLOB.admins, span_boldannounce("[msg]"))
log_world(msg)
if (istype(Master.subsystems))
if(FireHim)
Master.subsystems += new BadBoy.type //NEW_SS_GLOBAL will remove the old one
Master.subsystems += new BadBoy.type //NEW_SS_GLOBAL will remove the old one
subsystems = Master.subsystems
current_runlevel = Master.current_runlevel
StartProcessing(10)
else
to_chat(world, "<span class='boldannounce'>The Master Controller is having some issues, we will need to re-initialize EVERYTHING</span>")
to_chat(world, span_boldannounce("The Master Controller is having some issues, we will need to re-initialize EVERYTHING"))
Initialize(20, TRUE)
// Please don't stuff random bullshit here,
// Make a subsystem, give it the SS_NO_FIRE flag, and do your work in it's Initialize()
// Make a subsystem, give it the SS_NO_FIRE flag, and do your work in it's Initialize()
/datum/controller/master/Initialize(delay, init_sss, tgs_prime)
set waitfor = 0
@@ -181,7 +198,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
if(init_sss)
init_subtypes(/datum/controller/subsystem, subsystems)
to_chat(world, "<span class='boldannounce'>Initializing subsystems...</span>")
to_chat(world, span_boldannounce("Initializing subsystems..."))
// Sort subsystems by init_order, so they initialize in the correct order.
sortTim(subsystems, /proc/cmp_subsystem_init)
@@ -190,7 +207,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
// Initialize subsystems.
current_ticklimit = CONFIG_GET(number/tick_limit_mc_init)
for (var/datum/controller/subsystem/SS in subsystems)
if (SS.flags & SS_NO_INIT)
if (SS.flags & SS_NO_INIT || SS.initialized) //Don't init SSs with the correspondig flag or if they already are initialzized
continue
SS.Initialize(REALTIMEOFDAY)
CHECK_TICK
@@ -198,7 +215,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/time = (REALTIMEOFDAY - start_timeofday) / 10
var/msg = "Initializations complete within [time] second[time == 1 ? "" : "s"]!"
to_chat(world, "<span class='boldannounce'>[msg]</span>")
to_chat(world, span_boldannounce("[msg]"))
log_world(msg)
if (!current_runlevel)
@@ -255,11 +272,11 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
/datum/controller/master/proc/Loop()
. = -1
//Prep the loop (most of this is because we want MC restarts to reset as much state as we can, and because
// local vars rock
// local vars rock
//all this shit is here so that flag edits can be refreshed by restarting the MC. (and for speed)
var/list/tickersubsystems = list()
var/list/runlevel_sorted_subsystems = list(list()) //ensure we always have at least one runlevel
var/list/runlevel_sorted_subsystems = list(list()) //ensure we always have at least one runlevel
var/timer = world.time
for (var/thing in subsystems)
var/datum/controller/subsystem/SS = thing
@@ -305,8 +322,12 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/error_level = 0
var/sleep_delta = 1
var/list/subsystems_to_check
//the actual loop.
//setup the stack overflow detector
stack_end_detector = new()
var/datum/stack_canary/canary = stack_end_detector.prime_canary()
canary.use_variable()
//the actual loop.
while (1)
tickdrift = max(0, MC_AVERAGE_FAST(tickdrift, (((REALTIMEOFDAY - init_timeofday) - (world.time - init_time)) / world.tick_lag)))
var/starting_tick_usage = TICK_USAGE
@@ -317,7 +338,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
//Anti-tick-contention heuristics:
//if there are mutiple sleeping procs running before us hogging the cpu, we have to run later.
// (because sleeps are processed in the order received, longer sleeps are more likely to run first)
// (because sleeps are processed in the order received, longer sleeps are more likely to run first)
if (starting_tick_usage > TICK_LIMIT_MC) //if there isn't enough time to bother doing anything this tick, sleep a bit.
sleep_delta *= 2
current_ticklimit = TICK_LIMIT_RUNNING * 0.5
@@ -423,6 +444,10 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
continue
if ((SS_flags & (SS_TICKER|SS_KEEP_TIMING)) == SS_KEEP_TIMING && SS.last_fire + (SS.wait * 0.75) > world.time)
continue
if (SS.postponed_fires >= 1)
SS.postponed_fires--
SS.update_nextfire()
continue
SS.enqueue()
. = 1
@@ -439,12 +464,11 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/tick_precentage
var/tick_remaining
var/ran = TRUE //this is right
var/ran_non_ticker = FALSE
var/bg_calc //have we swtiched current_tick_budget to background mode yet?
var/tick_usage
//keep running while we have stuff to run and we haven't gone over a tick
// this is so subsystems paused eariler can use tick time that later subsystems never used
// this is so subsystems paused eariler can use tick time that later subsystems never used
while (ran && queue_head && TICK_USAGE < TICK_LIMIT_MC)
ran = FALSE
bg_calc = FALSE
@@ -459,20 +483,6 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
if (!(queue_node_flags & SS_TICKER) && skip_ticks)
queue_node = queue_node.queue_next
continue
//super special case, subsystems where we can't make them pause mid way through
//if we can't run them this tick (without going over a tick)
//we bump up their priority and attempt to run them next tick
//(unless we haven't even ran anything this tick, since its unlikely they will ever be able run
// in those cases, so we just let them run)
if (queue_node_flags & SS_NO_TICK_CHECK)
if (queue_node.tick_usage > TICK_LIMIT_RUNNING - TICK_USAGE && ran_non_ticker)
if (!(queue_node_flags & SS_BACKGROUND))
queue_node.queued_priority += queue_priority_count * 0.1
queue_priority_count -= queue_node_priority
queue_priority_count += queue_node.queued_priority
current_tick_budget -= queue_node_priority
queue_node = queue_node.queue_next
continue
if (!bg_calc && (queue_node_flags & SS_BACKGROUND))
current_tick_budget = queue_priority_count_bg
@@ -481,7 +491,8 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
tick_remaining = TICK_LIMIT_RUNNING - TICK_USAGE
if (current_tick_budget > 0 && queue_node_priority > 0)
tick_precentage = tick_remaining / (current_tick_budget / queue_node_priority)
//Give the subsystem a precentage of the remaining tick based on the remaning priority
tick_precentage = tick_remaining * (queue_node_priority / current_tick_budget)
else
tick_precentage = tick_remaining
@@ -489,8 +500,6 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
current_ticklimit = round(TICK_USAGE + tick_precentage)
if (!(queue_node_flags & SS_TICKER))
ran_non_ticker = TRUE
ran = TRUE
queue_node_paused = (queue_node.state == SS_PAUSED || queue_node.state == SS_PAUSING)
@@ -535,14 +544,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
queue_node.last_fire = world.time
queue_node.times_fired++
if (queue_node_flags & SS_TICKER)
queue_node.next_fire = world.time + (world.tick_lag * queue_node.wait)
else if (queue_node_flags & SS_POST_FIRE_TIMING)
queue_node.next_fire = world.time + queue_node.wait + (world.tick_lag * (queue_node.tick_overrun/100))
else if (queue_node_flags & SS_KEEP_TIMING)
queue_node.next_fire += queue_node.wait
else
queue_node.next_fire = queue_node.queued_time + queue_node.wait + (world.tick_lag * (queue_node.tick_overrun/100))
queue_node.update_nextfire()
queue_node.queued_time = 0
@@ -554,7 +556,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
. = 1
//resets the queue, and all subsystems, while filtering out the subsystem lists
// called if any mc's queue procs runtime or exit improperly.
// called if any mc's queue procs runtime or exit improperly.
/datum/controller/master/proc/SoftReset(list/ticker_SS, list/runlevel_SS)
. = 0
log_world("MC: SoftReset called, resetting MC queue state.")
+43 -14
View File
@@ -29,11 +29,11 @@
var/initialized = FALSE
/// Set to 0 to prevent fire() calls, mostly for admin use or subsystems that may be resumed later
/// use the [SS_NO_FIRE] flag instead for systems that never fire to keep it from even being added to list that is checked every tick
/// use the [SS_NO_FIRE] flag instead for systems that never fire to keep it from even being added to list that is checked every tick
var/can_fire = TRUE
///Bitmap of what game states can this subsystem fire at. See [RUNLEVELS_DEFAULT] for more details.
var/runlevels = RUNLEVELS_DEFAULT //points of the game at which the SS can fire
var/runlevels = RUNLEVELS_DEFAULT //points of the game at which the SS can fire
/*
* The following variables are managed by the MC and should not be modified directly.
@@ -69,6 +69,9 @@
/// Tracks the amount of completed runs for the subsystem
var/times_fired = 0
/// How many fires have we been requested to postpone
var/postponed_fires = 0
/// Time the subsystem entered the queue, (for timing and priority reasons)
var/queued_time = 0
@@ -122,12 +125,38 @@
dequeue()
can_fire = 0
flags |= SS_NO_FIRE
Master.subsystems -= src
if (Master)
Master.subsystems -= src
return ..()
/** Update next_fire for the next run.
* reset_time (bool) - Ignore things that would normally alter the next fire, like tick_overrun, and last_fire. (also resets postpone)
*/
/datum/controller/subsystem/proc/update_nextfire(reset_time = FALSE)
var/queue_node_flags = flags
if (reset_time)
postponed_fires = 0
if (queue_node_flags & SS_TICKER)
next_fire = world.time + (world.tick_lag * wait)
else
next_fire = world.time + wait
return
if (queue_node_flags & SS_TICKER)
next_fire = world.time + (world.tick_lag * wait)
else if (queue_node_flags & SS_POST_FIRE_TIMING)
next_fire = world.time + wait + (world.tick_lag * (tick_overrun/100))
else if (queue_node_flags & SS_KEEP_TIMING)
next_fire += wait
else
next_fire = queued_time + wait + (world.tick_lag * (tick_overrun/100))
//Queue it to run.
// (we loop thru a linked list until we get to the end or find the right point)
// (this lets us sort our run order correctly without having to re-sort the entire already sorted list)
// (we loop thru a linked list until we get to the end or find the right point)
// (this lets us sort our run order correctly without having to re-sort the entire already sorted list)
/datum/controller/subsystem/proc/enqueue()
var/SS_priority = priority
var/SS_flags = flags
@@ -191,9 +220,9 @@
queue_next.queue_prev = queue_prev
if (queue_prev)
queue_prev.queue_next = queue_next
if (src == Master.queue_tail)
if (Master && (src == Master.queue_tail))
Master.queue_tail = queue_prev
if (src == Master.queue_head)
if (Master && (src == Master.queue_head))
Master.queue_head = queue_next
queued_time = 0
if (state == SS_QUEUED)
@@ -217,10 +246,11 @@
//used to initialize the subsystem AFTER the map has loaded
/datum/controller/subsystem/Initialize(start_timeofday)
initialized = TRUE
// SEND_SIGNAL(src, COMSIG_SUBSYSTEM_POST_INITIALIZE, start_timeofday)
var/time = (REALTIMEOFDAY - start_timeofday) / 10
var/msg = "Initialized [name] subsystem within [time] second[time == 1 ? "" : "s"]!"
to_chat(world, "<span class='boldannounce'>[msg]</span>")
log_subsystem("INIT", msg)
to_chat(world, span_boldannounce("[msg]"))
log_subsystem(msg)
return time
/datum/controller/subsystem/stat_entry(msg)
@@ -243,11 +273,10 @@
if (SS_IDLE)
. = " "
//could be used to postpone a costly subsystem for (default one) var/cycles, cycles
//for instance, during cpu intensive operations like explosions
/// Causes the next "cycle" fires to be missed. Effect is accumulative but can reset by calling update_nextfire(reset_time = TRUE)
/datum/controller/subsystem/proc/postpone(cycles = 1)
if(next_fire - world.time < wait)
next_fire += (wait*cycles)
if (can_fire && cycles >= 1)
postponed_fires += cycles
//usually called via datum/controller/subsystem/New() when replacing a subsystem (i.e. due to a recurring crash)
//should attempt to salvage what it can from the old instance of subsystem
@@ -258,7 +287,7 @@
if (NAMEOF(src, can_fire))
//this is so the subsystem doesn't rapid fire to make up missed ticks causing more lag
if (var_value)
next_fire = world.time + wait
update_nextfire(reset_time = TRUE)
if (NAMEOF(src, queued_priority)) //editing this breaks things.
return FALSE
. = ..()
+5 -1
View File
@@ -11,6 +11,7 @@ SUBSYSTEM_DEF(activity)
/datum/controller/subsystem/activity/Initialize(timeofday)
RegisterSignal(SSdcs,COMSIG_GLOB_EXPLOSION,.proc/on_explosion)
RegisterSignal(SSdcs,COMSIG_GLOB_MOB_DEATH,.proc/on_death)
return ..()
/datum/controller/subsystem/activity/fire(resumed = 0)
calculate_threat()
@@ -54,7 +55,10 @@ SUBSYSTEM_DEF(activity)
var/weight = (text2num(threat_history[i+1])-text2num(threat_history[i]))
total_weight += weight
total_amt += weight * (threat_history[threat_history[i]])
return round(total_amt / total_weight,0.1)
if(total_weight == 0)
return total_amt
else
return round(total_amt / total_weight,0.1)
/datum/controller/subsystem/activity/proc/get_max_threat()
. = 0

Some files were not shown because too many files have changed in this diff Show More