Merge remote-tracking branch 'citadel/master' into combat_rework_experimental
This commit is contained in:
@@ -144,6 +144,10 @@
|
||||
#define WINGCOLOR 26
|
||||
#define CAN_SCAR 27 // If this species can be scarred (fleshy)
|
||||
|
||||
/// Used for determining which wounds are applicable to this species.
|
||||
#define HAS_FLESH 28 /// if we have flesh (can suffer slash/piercing/burn wounds, requires they don't have NOBLOOD)
|
||||
#define HAS_BONE 29 /// if we have bones (can suffer bone wounds)
|
||||
|
||||
//organ slots
|
||||
#define ORGAN_SLOT_BRAIN "brain"
|
||||
#define ORGAN_SLOT_APPENDIX "appendix"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
#define EXTOOLS (world.system_type == MS_WINDOWS ? "byond-extools.dll" : "libbyond-extools.so")
|
||||
@@ -98,7 +98,7 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
|
||||
#define ZAP_MOB_DAMAGE (1<<3)
|
||||
#define ZAP_MOB_STUN (1<<4)
|
||||
|
||||
#define ZAP_DEFAULT_FLAGS ALL
|
||||
#define ZAP_DEFAULT_FLAGS ZAP_MOB_STUN | ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE
|
||||
#define ZAP_FUSION_FLAGS ZAP_OBJ_DAMAGE | ZAP_MOB_DAMAGE | ZAP_MOB_STUN
|
||||
#define ZAP_SUPERMATTER_FLAGS NONE
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
#define ADMIN_PUNISHMENT_SCARIFY "Scarify"
|
||||
#define ADMIN_PUNISHMENT_PICKLE "Pickle-ify"
|
||||
#define ADMIN_PUNISHMENT_FRY "Fry"
|
||||
#define ADMIN_PUNISHMENT_PERFORATE ":B:erforate"
|
||||
|
||||
#define AHELP_ACTIVE 1
|
||||
#define AHELP_CLOSED 2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Defines for managed input/keybinding system.
|
||||
/// Max length of a keypress command before it's considered to be a forged packet/bogus command
|
||||
#define MAX_KEYPRESS_COMMANDLENGTH 32
|
||||
#define MAX_KEYPRESS_COMMANDLENGTH 64
|
||||
/// Maximum keys that can be bound to one button
|
||||
#define MAX_COMMANDS_PER_KEY 5
|
||||
/// Maximum keys per keybind
|
||||
|
||||
@@ -63,6 +63,16 @@
|
||||
#define CONTRACT_UPLINK_PAGE_CONTRACTS "CONTRACTS"
|
||||
#define CONTRACT_UPLINK_PAGE_HUB "HUB"
|
||||
|
||||
|
||||
///Heretics --
|
||||
#define IS_HERETIC(mob) (mob.mind?.has_antag_datum(/datum/antagonist/heretic))
|
||||
|
||||
#define PATH_SIDE "Side"
|
||||
|
||||
#define PATH_ASH "Ash"
|
||||
#define PATH_RUST "Rust"
|
||||
#define PATH_FLESH "Flesh"
|
||||
|
||||
//Overthrow time to update heads obj
|
||||
#define OBJECTIVE_UPDATING_TIME 300
|
||||
|
||||
@@ -91,4 +101,4 @@
|
||||
#define BLOB_REROLL_TIME 2400 // blob gets a free reroll every X time
|
||||
#define BLOB_SPREAD_COST 4
|
||||
#define BLOB_ATTACK_REFUND 2 //blob refunds this much if it attacks and doesn't spread
|
||||
#define BLOB_REFLECTOR_COST 15
|
||||
#define BLOB_REFLECTOR_COST 15
|
||||
|
||||
@@ -281,8 +281,6 @@ GLOBAL_LIST_INIT(atmos_adjacent_savings, list(0,0))
|
||||
#define CALCULATE_ADJACENT_TURFS(T) SSadjacent_air.queue[T] = 1
|
||||
#endif
|
||||
|
||||
#define EXTOOLS (world.system_type == MS_WINDOWS ? "byond-extools.dll" : "libbyond-extools.so")
|
||||
|
||||
GLOBAL_VAR(atmos_extools_initialized) // this must be an uninitialized (null) one or init_monstermos will be called twice because reasons
|
||||
#define ATMOS_EXTOOLS_CHECK if(!GLOB.atmos_extools_initialized){\
|
||||
GLOB.atmos_extools_initialized=TRUE;\
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
#define ANTAG_HUD_BROTHER 23
|
||||
#define ANTAG_HUD_BLOODSUCKER 24
|
||||
#define ANTAG_HUD_FUGITIVE 25
|
||||
#define ANTAG_HUD_HERETIC 26
|
||||
|
||||
// Notification action types
|
||||
#define NOTIFY_JUMP "jump"
|
||||
|
||||
@@ -98,7 +98,9 @@
|
||||
#define NO_APHRO (1<<9)
|
||||
#define NO_ASS_SLAP (1<<10)
|
||||
#define BIMBOFICATION (1<<11)
|
||||
|
||||
#define NO_AUTO_WAG (1<<12)
|
||||
#define GENITAL_EXAMINE (1<<13)
|
||||
#define VORE_EXAMINE (1<<14)
|
||||
#define TOGGLES_CITADEL 0
|
||||
|
||||
//belly sound pref things
|
||||
|
||||
@@ -23,6 +23,7 @@ GLOBAL_VAR_INIT(script_scripture_unlocked, FALSE) //If script scripture is avail
|
||||
GLOBAL_VAR_INIT(application_scripture_unlocked, FALSE) //If application scripture is available
|
||||
GLOBAL_VAR_INIT(judgement_scripture_unlocked, FALSE) //If judgement scripture is available
|
||||
GLOBAL_LIST_EMPTY(all_scripture) //a list containing scripture instances; not used to track existing scripture
|
||||
GLOBAL_LIST_EMPTY(all_clockwork_rites) //a list containing all clockwork rites. Filled the first time any cultist interacts with a sigil of rites.
|
||||
|
||||
//Scripture tiers and requirements; peripherals should never be used
|
||||
#define SCRIPTURE_PERIPHERAL "Peripheral"
|
||||
|
||||
@@ -2,19 +2,6 @@
|
||||
|
||||
#define COLOR_INPUT_DISABLED "#F0F0F0"
|
||||
#define COLOR_INPUT_ENABLED "#D3B5B5"
|
||||
|
||||
#define COLOR_DARKMODE_INFO_BUTTONS_BG "#40628A"
|
||||
#define COLOR_DARKMODE_ISSUE_BUTTON_BG "#A92C2C"
|
||||
#define COLOR_DARKMODE_BACKGROUND "#272727"
|
||||
#define COLOR_DARKMODE_DARKBACKGROUND "#242424"
|
||||
#define COLOR_DARKMODE_TEXT "#E0E0E0"
|
||||
|
||||
#define COLOR_WHITEMODE_INFO_BUTTONS_BG "#90B3DD"
|
||||
#define COLOR_WHITEMODE_ISSUE_BUTTON_BG "#EF7F7F"
|
||||
#define COLOR_WHITEMODE_BACKGROUND "#F0F0F0"
|
||||
#define COLOR_WHITEMODE_DARKBACKGROUND "#E6E6E6"
|
||||
#define COLOR_WHITEMODE_TEXT "#000000"
|
||||
|
||||
#define COLOR_FLOORTILE_GRAY "#8D8B8B"
|
||||
#define COLOR_ALMOST_BLACK "#333333"
|
||||
#define COLOR_BLACK "#000000"
|
||||
@@ -64,4 +51,4 @@
|
||||
#define COLOR_ASSEMBLY_LBLUE "#5D99BE"
|
||||
#define COLOR_ASSEMBLY_BLUE "#38559E"
|
||||
#define COLOR_ASSEMBLY_PURPLE "#6F6192"
|
||||
#define COLOR_ASSEMBLY_PINK "#ff4adc"
|
||||
#define COLOR_ASSEMBLY_PINK "#ff4adc"
|
||||
|
||||
@@ -143,9 +143,10 @@
|
||||
#define SHOVE_KNOCKDOWN_HUMAN 30
|
||||
#define SHOVE_KNOCKDOWN_TABLE 30
|
||||
#define SHOVE_KNOCKDOWN_COLLATERAL 10
|
||||
//for the shove slowdown, see __DEFINES/movespeed_modification.dm
|
||||
#define SHOVE_SLOWDOWN_LENGTH 30
|
||||
#define SHOVE_SLOWDOWN_STRENGTH 0.85 //multiplier
|
||||
/// how long they're staggered for
|
||||
#define SHOVE_STAGGER_DURATION 35
|
||||
/// how long they're off balance for
|
||||
#define SHOVE_OFFBALANCE_DURATION 30
|
||||
//Shove disarming item list
|
||||
GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(
|
||||
/obj/item/gun)))
|
||||
@@ -197,9 +198,9 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(
|
||||
#define GUN_AIMING_TIME (2 SECONDS)
|
||||
|
||||
//Object/Item sharpness
|
||||
#define IS_BLUNT 0
|
||||
#define IS_SHARP 1
|
||||
#define IS_SHARP_ACCURATE 2
|
||||
#define SHARP_NONE 0
|
||||
#define SHARP_EDGED 1
|
||||
#define SHARP_POINTY 2
|
||||
|
||||
//His Grace.
|
||||
#define HIS_GRACE_SATIATED 0 //He hungers not. If bloodthirst is set to this, His Grace is asleep.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
//config files
|
||||
#define CONFIG_GET(X) global.config.Get(/datum/config_entry/##X)
|
||||
#define CONFIG_SET(X, Y) global.config.Set(/datum/config_entry/##X, ##Y)
|
||||
/// Gets the datum of the object, for when editing a const define.
|
||||
#define CONFIG_GET_ENTRY(X) global.config.GetEntryDatum(/datum/config_entry/##X)
|
||||
|
||||
#define CONFIG_MAPS_FILE "maps.txt"
|
||||
|
||||
@@ -15,25 +15,36 @@
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
// /datum signals
|
||||
#define COMSIG_COMPONENT_ADDED "component_added" //sent to the new datum parent when a component is added to them: (/datum/component)
|
||||
#define COMSIG_COMPONENT_REMOVING "component_removing" //sent to the datum parent before a component is removed from them because of RemoveComponent: (/datum/component)
|
||||
#define COMSIG_COMPONENT_UNREGISTER_PARENT "component_unregister_parent" //sent to the component itself when unregistered from a parent
|
||||
#define COMSIG_COMPONENT_REGISTER_PARENT "component_register_parent" //sent to the component itself when registered to a parent
|
||||
#define COMSIG_PARENT_PREQDELETED "parent_preqdeleted" //before a datum's Destroy() is called: (force), returning a nonzero value will cancel the qdel operation
|
||||
#define COMSIG_PARENT_QDELETING "parent_qdeleting" //just before a datum's Destroy() is called: (force), at this point none of the other components chose to interrupt qdel and Destroy will be called
|
||||
|
||||
/// Trait signals
|
||||
#define COMPONENT_ADD_TRAIT (1<<0)
|
||||
#define COMPONENT_REMOVE_TRAIT (1<<1)
|
||||
/// when a component is added to a datum: (/datum/component)
|
||||
#define COMSIG_COMPONENT_ADDED "component_added"
|
||||
/// before a component is removed from a datum because of RemoveComponent: (/datum/component)
|
||||
#define COMSIG_COMPONENT_REMOVING "component_removing"
|
||||
/// before a datum's Destroy() is called: (force), returning a nonzero value will cancel the qdel operation
|
||||
#define COMSIG_PARENT_PREQDELETED "parent_preqdeleted"
|
||||
/// just before a datum's Destroy() is called: (force), at this point none of the other components chose to interrupt qdel and Destroy will be called
|
||||
#define COMSIG_PARENT_QDELETING "parent_qdeleting"
|
||||
/// generic topic handler (usr, href_list)
|
||||
#define COMSIG_TOPIC "handle_topic"
|
||||
|
||||
/// fires on the target datum when an element is attached to it (/datum/element)
|
||||
#define COMSIG_ELEMENT_ATTACH "element_attach"
|
||||
/// fires on the target datum when an element is attached to it (/datum/element)
|
||||
#define COMSIG_ELEMENT_DETACH "element_detach"
|
||||
|
||||
/// sent to the component itself when unregistered from a parent
|
||||
#define COMSIG_COMPONENT_UNREGISTER_PARENT "component_unregister_parent"
|
||||
/// sent to the component itself when registered to a parent
|
||||
#define COMSIG_COMPONENT_REGISTER_PARENT "component_register_parent"
|
||||
|
||||
/// Trait signals
|
||||
#define COMPONENT_ADD_TRAIT (1<<0)
|
||||
#define COMPONENT_REMOVE_TRAIT (1<<1)
|
||||
|
||||
// /atom signals
|
||||
//from base of atom/proc/Initialize(): sent any time a new atom is created
|
||||
#define COMSIG_ATOM_CREATED "atom_created"
|
||||
//from SSatoms InitAtom - Only if the atom was not deleted or failed initialization
|
||||
#define COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE "atom_init_success"
|
||||
#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (/obj/item, /mob/living, params)
|
||||
#define COMPONENT_NO_AFTERATTACK 1 //Return this in response if you don't want afterattack to be called
|
||||
#define COMSIG_ATOM_HULK_ATTACK "hulk_attack" //from base of atom/attack_hulk(): (/mob/living/carbon/human)
|
||||
@@ -56,30 +67,54 @@
|
||||
#define COMSIG_ATOM_EXIT "atom_exit" //from base of atom/Exit(): (/atom/movable/exiting, /atom/newloc)
|
||||
#define COMPONENT_ATOM_BLOCK_EXIT 1
|
||||
#define COMSIG_ATOM_EXITED "atom_exited" //from base of atom/Exited(): (atom/movable/exiting, atom/newloc)
|
||||
#define COMSIG_ATOM_EX_ACT "atom_ex_act" //from base of atom/ex_act(): (severity, target)
|
||||
#define COMSIG_ATOM_EMP_ACT "atom_emp_act" //from base of atom/emp_act(): (severity)
|
||||
#define COMSIG_ATOM_FIRE_ACT "atom_fire_act" //from base of atom/fire_act(): (exposed_temperature, exposed_volume)
|
||||
#define COMSIG_ATOM_BULLET_ACT "atom_bullet_act" //from base of atom/bullet_act(): (/obj/item/projectile, def_zone)
|
||||
#define COMSIG_ATOM_BLOB_ACT "atom_blob_act" //from base of atom/blob_act(): (/obj/structure/blob)
|
||||
#define COMSIG_ATOM_ACID_ACT "atom_acid_act" //from base of atom/acid_act(): (acidpwr, acid_volume)
|
||||
#define COMSIG_ATOM_EMAG_ACT "atom_emag_act" //from base of atom/emag_act(): ()
|
||||
#define COMSIG_ATOM_RAD_ACT "atom_rad_act" //from base of atom/rad_act(intensity)
|
||||
#define COMSIG_ATOM_NARSIE_ACT "atom_narsie_act" //from base of atom/narsie_act(): ()
|
||||
#define COMSIG_ATOM_RATVAR_ACT "atom_ratvar_act" //from base of atom/ratvar_act(): ()
|
||||
#define COMSIG_ATOM_RCD_ACT "atom_rcd_act" //from base of atom/rcd_act(): (/mob, /obj/item/construction/rcd, passed_mode)
|
||||
#define COMSIG_ATOM_SING_PULL "atom_sing_pull" //from base of atom/singularity_pull(): (S, current_size)
|
||||
#define COMSIG_ATOM_SET_LIGHT "atom_set_light" //from base of atom/set_light(): (l_range, l_power, l_color)
|
||||
#define COMSIG_ATOM_DIR_CHANGE "atom_dir_change" //from base of atom/setDir(): (old_dir, new_dir)
|
||||
#define COMSIG_ATOM_CONTENTS_DEL "atom_contents_del" //from base of atom/handle_atom_del(): (atom/deleted)
|
||||
#define COMSIG_ATOM_HAS_GRAVITY "atom_has_gravity" //from base of atom/has_gravity(): (turf/location, list/forced_gravities)
|
||||
#define COMSIG_ATOM_RAD_PROBE "atom_rad_probe" //from proc/get_rad_contents(): ()
|
||||
#define COMPONENT_BLOCK_RADIATION 1
|
||||
#define COMSIG_ATOM_RAD_CONTAMINATING "atom_rad_contam" //from base of datum/radiation_wave/radiate(): (strength)
|
||||
#define COMPONENT_BLOCK_CONTAMINATION 1
|
||||
#define COMSIG_ATOM_RAD_WAVE_PASSING "atom_rad_wave_pass" //from base of datum/radiation_wave/check_obstructions(): (datum/radiation_wave, width)
|
||||
#define COMPONENT_RAD_WAVE_HANDLED 1
|
||||
#define COMSIG_ATOM_CANREACH "atom_can_reach" //from internal loop in atom/movable/proc/CanReach(): (list/next)
|
||||
#define COMPONENT_BLOCK_REACH 1
|
||||
///from base of atom/ex_act(): (severity, target)
|
||||
#define COMSIG_ATOM_EX_ACT "atom_ex_act"
|
||||
///from base of atom/emp_act(): (severity)
|
||||
#define COMSIG_ATOM_EMP_ACT "atom_emp_act"
|
||||
///from base of atom/fire_act(): (exposed_temperature, exposed_volume)
|
||||
#define COMSIG_ATOM_FIRE_ACT "atom_fire_act"
|
||||
///from base of atom/bullet_act(): (/obj/projectile, def_zone)
|
||||
#define COMSIG_ATOM_BULLET_ACT "atom_bullet_act"
|
||||
///from base of atom/blob_act(): (/obj/structure/blob)
|
||||
#define COMSIG_ATOM_BLOB_ACT "atom_blob_act"
|
||||
///from base of atom/acid_act(): (acidpwr, acid_volume)
|
||||
#define COMSIG_ATOM_ACID_ACT "atom_acid_act"
|
||||
///from base of atom/emag_act(): (/mob/user)
|
||||
#define COMSIG_ATOM_EMAG_ACT "atom_emag_act"
|
||||
///from base of atom/rad_act(intensity)
|
||||
#define COMSIG_ATOM_RAD_ACT "atom_rad_act"
|
||||
///from base of atom/narsie_act(): ()
|
||||
#define COMSIG_ATOM_NARSIE_ACT "atom_narsie_act"
|
||||
///from base of atom/ratvar_act(): ()
|
||||
#define COMSIG_ATOM_RATVAR_ACT "atom_ratvar_act"
|
||||
///from base of atom/rcd_act(): (/mob, /obj/item/construction/rcd, passed_mode)
|
||||
#define COMSIG_ATOM_RCD_ACT "atom_rcd_act"
|
||||
///from base of atom/singularity_pull(): (S, current_size)
|
||||
#define COMSIG_ATOM_SING_PULL "atom_sing_pull"
|
||||
///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)
|
||||
#define COMSIG_ATOM_CONTENTS_DEL "atom_contents_del"
|
||||
///from base of atom/has_gravity(): (turf/location, list/forced_gravities)
|
||||
#define COMSIG_ATOM_HAS_GRAVITY "atom_has_gravity"
|
||||
///from proc/get_rad_contents(): ()
|
||||
#define COMSIG_ATOM_RAD_PROBE "atom_rad_probe"
|
||||
#define COMPONENT_BLOCK_RADIATION (1<<0)
|
||||
///from base of datum/radiation_wave/radiate(): (strength)
|
||||
#define COMSIG_ATOM_RAD_CONTAMINATING "atom_rad_contam"
|
||||
#define COMPONENT_BLOCK_CONTAMINATION (1<<0)
|
||||
///from base of datum/radiation_wave/check_obstructions(): (datum/radiation_wave, width)
|
||||
#define COMSIG_ATOM_RAD_WAVE_PASSING "atom_rad_wave_pass"
|
||||
#define COMPONENT_RAD_WAVE_HANDLED (1<<0)
|
||||
///from internal loop in atom/movable/proc/CanReach(): (list/next)
|
||||
#define COMSIG_ATOM_CANREACH "atom_can_reach"
|
||||
#define COMPONENT_BLOCK_REACH (1<<0)
|
||||
|
||||
#define COMSIG_ATOM_SCREWDRIVER_ACT "atom_screwdriver_act" //from base of atom/screwdriver_act(): (mob/living/user, obj/item/I)
|
||||
#define COMSIG_ATOM_INTERCEPT_TELEPORT "intercept_teleport" //called when teleporting into a protected turf: (channel, turf/origin, turf/destination)
|
||||
#define COMPONENT_BLOCK_TELEPORT 1
|
||||
@@ -151,6 +186,7 @@
|
||||
// #define HEARING_SOURCE 8
|
||||
#define COMSIG_MOVABLE_DISPOSING "movable_disposing" //called when the movable is added to a disposal holder object for disposal movement: (obj/structure/disposalholder/holder, obj/machinery/disposal/source)
|
||||
#define COMSIG_MOVABLE_TELEPORTED "movable_teleported" //from base of do_teleport(): (channel, turf/origin, turf/destination)
|
||||
#define COMSIG_MOVABLE_CHASM_DROP "movable_chasm_drop" //from base of /datum/component/chasm/drop() (/datum/component/chasm)
|
||||
|
||||
// /mind signals
|
||||
#define COMSIG_PRE_MIND_TRANSFER "pre_mind_transfer" //from base of mind/transfer_to() before it's done: (new_character, old_character)
|
||||
@@ -209,6 +245,8 @@
|
||||
#define COMSIG_MOB_SWAP_HANDS "mob_swap_hands" //from base of mob/swap_hand(): (obj/item)
|
||||
#define COMPONENT_BLOCK_SWAP 1
|
||||
|
||||
#define COMSIG_PROCESS_BORGCHARGER_OCCUPANT "living_charge"
|
||||
|
||||
// /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)
|
||||
@@ -252,6 +290,10 @@
|
||||
#define COMPONENT_INTERRUPT_LIFE_BIOLOGICAL 1 // interrupt biological processes
|
||||
#define COMPONENT_INTERRUPT_LIFE_PHYSICAL 2 // interrupt physical handling
|
||||
|
||||
#define COMSIG_LIVING_BIOLOGICAL_LIFE "biological_life" //from base of mob/living/BiologicalLife() (seconds, times_fired)
|
||||
|
||||
#define COMSIG_LIVING_PHYSICAL_LIFE "physical_life" //from base of mob/living/PhysicalLife() (seconds, times_fired)
|
||||
|
||||
// /mob/living/carbon physiology signals
|
||||
#define COMSIG_CARBON_GAIN_WOUND "carbon_gain_wound" //from /datum/wound/proc/apply_wound() (/mob/living/carbon/C, /datum/wound/W, /obj/item/bodypart/L)
|
||||
#define COMSIG_CARBON_LOSE_WOUND "carbon_lose_wound" //from /datum/wound/proc/remove_wound() (/mob/living/carbon/C, /datum/wound/W, /obj/item/bodypart/L)
|
||||
@@ -277,6 +319,7 @@
|
||||
#define COMSIG_OBJ_DECONSTRUCT "obj_deconstruct" //from base of obj/deconstruct(): (disassembled)
|
||||
#define COMSIG_OBJ_BREAK "obj_break" //from base of /obj/obj_break(): (damage_flag)
|
||||
#define COMSIG_OBJ_SETANCHORED "obj_setanchored" //called in /obj/structure/setAnchored(): (value)
|
||||
#define COMSIG_OBJ_DEFAULT_UNFASTEN_WRENCH "obj_default_unfasten_wrench" //called exclusively in plumbing, for now
|
||||
#define COMSIG_OBJ_ATTACK_GENERIC "obj_attack_generic" //from base of atom/animal_attack(): (/mob/user)
|
||||
#define COMPONENT_STOP_GENERIC_ATTACK 1
|
||||
|
||||
@@ -356,8 +399,8 @@
|
||||
#define COMSIG_PEN_ROTATED "pen_rotated" //called after rotation in /obj/item/pen/attack_self(): (rotation, mob/living/carbon/user)
|
||||
|
||||
// /obj/item/projectile signals (sent to the firer)
|
||||
#define COMSIG_PROJECTILE_SELF_ON_HIT "projectile_self_on_hit" // from base of /obj/item/projectile/proc/on_hit(): (atom/movable/firer, atom/target, Angle)
|
||||
#define COMSIG_PROJECTILE_ON_HIT "projectile_on_hit" // from base of /obj/item/projectile/proc/on_hit(): (atom/movable/firer, atom/target, Angle)
|
||||
#define COMSIG_PROJECTILE_SELF_ON_HIT "projectile_self_on_hit" ///from base of /obj/item/projectile/proc/on_hit(): (atom/movable/firer, atom/target, Angle, hit_limb)
|
||||
#define COMSIG_PROJECTILE_ON_HIT "projectile_on_hit" ///from base of /obj/item/projectile/proc/on_hit(): (atom/movable/firer, atom/target, Angle, hit_limb)
|
||||
#define COMSIG_PROJECTILE_BEFORE_FIRE "projectile_before_fire" // from base of /obj/item/projectile/proc/fire(): (obj/item/projectile, atom/original_target)
|
||||
#define COMSIG_PROJECTILE_FIRE "projectile_fire" ///from the base of /obj/item/projectile/proc/fire(): ()
|
||||
#define COMSIG_PROJECTILE_RANGE_OUT "projectile_range_out" // sent to targets during the process_hit proc of projectiles
|
||||
@@ -452,6 +495,9 @@
|
||||
#define COMPONENT_TWOHANDED_BLOCK_WIELD 1
|
||||
#define COMSIG_TWOHANDED_UNWIELD "twohanded_unwield" //from base of datum/component/two_handed/proc/unwield(mob/living/carbon/user): (/mob/user)
|
||||
|
||||
// /datum/component/squeak signals
|
||||
#define COMSIG_CROSS_SQUEAKED "cross_squeaked" // sent when a squeak component squeaks from crossing something, to delay anything else crossing that might squeak to prevent ear hurt.
|
||||
|
||||
// /datum/action signals
|
||||
#define COMSIG_ACTION_TRIGGER "action_trigger" //from base of datum/action/proc/Trigger(): (datum/action)
|
||||
#define COMPONENT_ACTION_BLOCK_TRIGGER 1
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#define DYE_REGISTRY_SNEAKERS "sneakers"
|
||||
#define DYE_REGISTRY_FANNYPACK "fannypack"
|
||||
#define DYE_REGISTRY_BEDSHEET "bedsheet"
|
||||
#define DYE_LAWYER_SPECIAL "lawyer_special"
|
||||
|
||||
#define DYE_RED "red"
|
||||
#define DYE_ORANGE "orange"
|
||||
@@ -16,6 +17,7 @@
|
||||
#define DYE_RAINBOW "rainbow"
|
||||
#define DYE_MIME "mime"
|
||||
#define DYE_COSMIC "cosmic"
|
||||
#define DYE_SYNDICATE "syndicate"
|
||||
#define DYE_QM "qm"
|
||||
#define DYE_LAW "law"
|
||||
#define DYE_CAPTAIN "captain"
|
||||
@@ -26,3 +28,5 @@
|
||||
#define DYE_CMO "cmo"
|
||||
#define DYE_REDCOAT "redcoat"
|
||||
#define DYE_CLOWN "clown"
|
||||
#define DYE_CHAP "chap"
|
||||
#define DYE_CENTCOM "centcom"
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/// Module is compatible with Security Cyborg models
|
||||
#define BORG_MODULE_SECURITY (1<<0)
|
||||
/// Module is compatible with Miner Cyborg models
|
||||
#define BORG_MODULE_MINER (1<<1)
|
||||
/// Module is compatible with Janitor Cyborg models
|
||||
#define BORG_MODULE_JANITOR (1<<2)
|
||||
/// Module is compatible with Medical Cyborg models
|
||||
#define BORG_MODULE_MEDICAL (1<<3)
|
||||
/// Module is compatible with Engineering Cyborg models
|
||||
#define BORG_MODULE_ENGINEERING (1<<4)
|
||||
|
||||
/// Module is compatible with Ripley Exosuit models
|
||||
#define EXOSUIT_MODULE_RIPLEY (1<<0)
|
||||
/// Module is compatible with Odyseeus Exosuit models
|
||||
#define EXOSUIT_MODULE_ODYSSEUS (1<<1)
|
||||
/// Module is compatible with Clarke Exosuit models. Rebranded to firefighter because tg nerfed it to this.
|
||||
#define EXOSUIT_MODULE_FIREFIGHTER (1<<2)
|
||||
// #define EXOSUIT_MODULE_CLARKE (1<<2)
|
||||
/// Module is compatible with Gygax Exosuit models
|
||||
#define EXOSUIT_MODULE_GYGAX (1<<3)
|
||||
/// Module is compatible with Durand Exosuit models
|
||||
#define EXOSUIT_MODULE_DURAND (1<<4)
|
||||
/// Module is compatible with H.O.N.K Exosuit models
|
||||
#define EXOSUIT_MODULE_HONK (1<<5)
|
||||
/// Module is compatible with Phazon Exosuit models
|
||||
#define EXOSUIT_MODULE_PHAZON (1<<6)
|
||||
/// Module is compatable with N models
|
||||
#define EXOSUIT_MODULE_GYGAX_MED (1<<7)
|
||||
|
||||
/// Module is compatible with "Working" Exosuit models - Ripley and Clarke
|
||||
#define EXOSUIT_MODULE_WORKING EXOSUIT_MODULE_RIPLEY | EXOSUIT_MODULE_FIREFIGHTER // | EXOSUIT_MODULE_CLARKE
|
||||
/// Module is compatible with "Combat" Exosuit models - Gygax, H.O.N.K, Durand and Phazon
|
||||
#define EXOSUIT_MODULE_COMBAT EXOSUIT_MODULE_GYGAX | EXOSUIT_MODULE_HONK | EXOSUIT_MODULE_DURAND | EXOSUIT_MODULE_PHAZON
|
||||
/// Module is compatible with "Medical" Exosuit modelsm - Odysseus
|
||||
#define EXOSUIT_MODULE_MEDICAL EXOSUIT_MODULE_ODYSSEUS | EXOSUIT_MODULE_GYGAX_MED
|
||||
@@ -12,6 +12,7 @@
|
||||
#define TOXIC (1<<11)
|
||||
#define PINEAPPLE (1<<12)
|
||||
#define BREAKFAST (1<<13)
|
||||
#define ANTITOXIC (1<<14)
|
||||
|
||||
#define DRINK_NICE 1
|
||||
#define DRINK_GOOD 2
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#define FOOTSTEP_WATER "water"
|
||||
#define FOOTSTEP_LAVA "lava"
|
||||
#define FOOTSTEP_MEAT "meat"
|
||||
#define FOOTSTEP_RUST "rust"
|
||||
|
||||
//barefoot sounds
|
||||
#define FOOTSTEP_WOOD_BAREFOOT "woodbarefoot"
|
||||
#define FOOTSTEP_WOOD_CLAW "woodclaw"
|
||||
@@ -91,7 +93,9 @@ GLOBAL_LIST_INIT(footstep, list(
|
||||
'sound/effects/footstep/lava2.ogg',
|
||||
'sound/effects/footstep/lava3.ogg'), 100, 0),
|
||||
FOOTSTEP_MEAT = list(list(
|
||||
'sound/effects/meatslap.ogg'), 100, 0)
|
||||
'sound/effects/meatslap.ogg'), 100, 0),
|
||||
FOOTSTEP_RUST = list(list(
|
||||
'sound/effects/footstep/rustystep1.ogg'), 100, 0)
|
||||
))
|
||||
|
||||
//bare footsteps lists
|
||||
@@ -135,7 +139,9 @@ GLOBAL_LIST_INIT(barefootstep, list(
|
||||
'sound/effects/footstep/lava2.ogg',
|
||||
'sound/effects/footstep/lava3.ogg'), 100, 0),
|
||||
FOOTSTEP_MEAT = list(list(
|
||||
'sound/effects/meatslap.ogg'), 100, 0)
|
||||
'sound/effects/meatslap.ogg'), 100, 0),
|
||||
FOOTSTEP_RUST = list(list(
|
||||
'sound/effects/footstep/rustystep1.ogg'), 100, 0)
|
||||
))
|
||||
|
||||
//claw footsteps lists
|
||||
@@ -179,7 +185,9 @@ GLOBAL_LIST_INIT(clawfootstep, list(
|
||||
'sound/effects/footstep/lava2.ogg',
|
||||
'sound/effects/footstep/lava3.ogg'), 100, 0),
|
||||
FOOTSTEP_MEAT = list(list(
|
||||
'sound/effects/meatslap.ogg'), 100, 0)
|
||||
'sound/effects/meatslap.ogg'), 100, 0),
|
||||
FOOTSTEP_RUST = list(list(
|
||||
'sound/effects/footstep/rustystep1.ogg'), 100, 0)
|
||||
))
|
||||
|
||||
//heavy footsteps list
|
||||
@@ -197,5 +205,7 @@ GLOBAL_LIST_INIT(heavyfootstep, list(
|
||||
'sound/effects/footstep/lava2.ogg',
|
||||
'sound/effects/footstep/lava3.ogg'), 100, 0),
|
||||
FOOTSTEP_MEAT = list(list(
|
||||
'sound/effects/meatslap.ogg'), 100, 0)
|
||||
'sound/effects/meatslap.ogg'), 100, 0),
|
||||
FOOTSTEP_RUST = list(list(
|
||||
'sound/effects/footstep/rustystep1.ogg'), 150, 2)
|
||||
))
|
||||
|
||||
@@ -17,7 +17,7 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(
|
||||
/turf/open/chasm,
|
||||
/turf/open/lava,
|
||||
/turf/open/water,
|
||||
/turf/open/openspace
|
||||
/turf/open/transparent/openspace
|
||||
)))
|
||||
|
||||
#define isgroundlessturf(A) (is_type_in_typecache(A, GLOB.turfs_without_ground))
|
||||
@@ -44,6 +44,8 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(
|
||||
|
||||
#define isplatingturf(A) (istype(A, /turf/open/floor/plating))
|
||||
|
||||
#define istransparentturf(A) (istype(A, /turf/open/transparent))
|
||||
|
||||
//Mobs
|
||||
#define isliving(A) (istype(A, /mob/living))
|
||||
|
||||
@@ -74,6 +76,7 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(
|
||||
#define ismush(A) (is_species(A, /datum/species/mush))
|
||||
#define isshadow(A) (is_species(A, /datum/species/shadow))
|
||||
#define isskeleton(A) (is_species(A, /datum/species/skeleton))
|
||||
#define isethereal(A) (is_species(A, /datum/species/ethereal))
|
||||
|
||||
// Citadel specific species
|
||||
#define isipcperson(A) (is_species(A, /datum/species/ipc))
|
||||
@@ -199,14 +202,6 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(
|
||||
|
||||
#define isclothing(A) (istype(A, /obj/item/clothing))
|
||||
|
||||
GLOBAL_LIST_INIT(pointed_types, typecacheof(list(
|
||||
/obj/item/pen,
|
||||
/obj/item/screwdriver,
|
||||
/obj/item/reagent_containers/syringe,
|
||||
/obj/item/kitchen/fork)))
|
||||
|
||||
#define is_pointed(W) (is_type_in_typecache(W, GLOB.pointed_types))
|
||||
|
||||
#define isbodypart(A) (istype(A, /obj/item/bodypart))
|
||||
|
||||
#define isprojectile(A) (istype(A, /obj/item/projectile))
|
||||
|
||||
@@ -131,6 +131,8 @@
|
||||
#define LIGHTING_LAYER 15
|
||||
#define LIGHTING_RENDER_TARGET "LIGHT_PLANE"
|
||||
|
||||
#define RAD_TEXT_LAYER 15.1
|
||||
|
||||
#define ABOVE_LIGHTING_PLANE 16
|
||||
#define ABOVE_LIGHTING_LAYER 16
|
||||
#define ABOVE_LIGHTING_RENDER_TARGET "ABOVE_LIGHTING_PLANE"
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
//defines for loadout categories
|
||||
//no category defines
|
||||
#define LOADOUT_CATEGORY_NONE "ERROR"
|
||||
#define LOADOUT_SUBCATEGORY_NONE "Miscellaneous"
|
||||
#define LOADOUT_SUBCATEGORIES_NONE list("Miscellaneous")
|
||||
|
||||
//backpack
|
||||
#define LOADOUT_CATEGORY_BACKPACK "In backpack"
|
||||
#define LOADOUT_SUBCATEGORY_BACKPACK_GENERAL "General" //basically anything that there's not enough of to have its own subcategory
|
||||
#define LOADOUT_SUBCATEGORY_BACKPACK_TOYS "Toys"
|
||||
//neck
|
||||
#define LOADOUT_CATEGORY_NECK "Neck"
|
||||
#define LOADOUT_SUBCATEGORY_NECK_GENERAL "General"
|
||||
#define LOADOUT_SUBCATEGORY_NECK_TIE "Ties"
|
||||
#define LOADOUT_SUBCATEGORY_NECK_SCARVES "Scarves"
|
||||
|
||||
//mask
|
||||
#define LOADOUT_CATEGORY_MASK "Mask"
|
||||
|
||||
//hands
|
||||
#define LOADOUT_CATEGORY_HANDS "Hands"
|
||||
|
||||
//uniform
|
||||
#define LOADOUT_CATEGORY_UNIFORM "Uniform" //there's so many types of uniform it's best to have lots of categories
|
||||
#define LOADOUT_SUBCATEGORY_UNIFORM_GENERAL "General"
|
||||
#define LOADOUT_SUBCATEGORY_UNIFORM_JOBS "Jobs"
|
||||
#define LOADOUT_SUBCATEGORY_UNIFORM_SUITS "Suits"
|
||||
#define LOADOUT_SUBCATEGORY_UNIFORM_SKIRTS "Skirts"
|
||||
#define LOADOUT_SUBCATEGORY_UNIFORM_DRESSES "Dresses"
|
||||
#define LOADOUT_SUBCATEGORY_UNIFORM_SWEATERS "Sweaters"
|
||||
#define LOADOUT_SUBCATEGORY_UNIFORM_PANTS "Pants"
|
||||
#define LOADOUT_SUBCATEGORY_UNIFORM_SHORTS "Shorts"
|
||||
|
||||
//suit
|
||||
#define LOADOUT_CATEGORY_SUIT "Suit"
|
||||
#define LOADOUT_SUBCATEGORY_SUIT_GENERAL "General"
|
||||
#define LOADOUT_SUBCATEGORY_SUIT_COATS "Coats"
|
||||
#define LOADOUT_SUBCATEGORY_SUIT_JACKETS "Jackets"
|
||||
#define LOADOUT_SUBCATEGORY_SUIT_JOBS "Jobs"
|
||||
|
||||
//head
|
||||
#define LOADOUT_CATEGORY_HEAD "Head"
|
||||
#define LOADOUT_SUBCATEGORY_HEAD_GENERAL "General"
|
||||
#define LOADOUT_SUBCATEGORY_HEAD_JOBS "Jobs"
|
||||
|
||||
//shoes
|
||||
#define LOADOUT_CATEGORY_SHOES "Shoes"
|
||||
|
||||
//gloves
|
||||
#define LOADOUT_CATEGORY_GLOVES "Gloves"
|
||||
|
||||
//glasses
|
||||
#define LOADOUT_CATEGORY_GLASSES "Glasses"
|
||||
|
||||
//donator items
|
||||
#define LOADOUT_CATEGORY_DONATOR "Donator"
|
||||
|
||||
//how many prosthetics can we have
|
||||
#define MAXIMUM_LOADOUT_PROSTHETICS 2
|
||||
|
||||
//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)
|
||||
|
||||
//options for modifiying limbs
|
||||
#define LOADOUT_LIMB_NORMAL "Normal"
|
||||
#define LOADOUT_LIMB_PROSTHETIC "Prosthetic"
|
||||
#define LOADOUT_LIMB_AMPUTATED "Amputated"
|
||||
|
||||
#define LOADOUT_LIMBS list(LOADOUT_LIMB_NORMAL,LOADOUT_LIMB_PROSTHETIC,LOADOUT_LIMB_AMPUTATED) //you can amputate your legs/arms though
|
||||
@@ -19,6 +19,7 @@
|
||||
#define INVESTIGATE_FERMICHEM "fermichem"
|
||||
#define INVESTIGATE_RCD "rcd"
|
||||
#define INVESTIGATE_CRYOGENICS "cryogenics"
|
||||
#define INVESTIGATE_GHOST "ghost"
|
||||
|
||||
// Logging types for log_message()
|
||||
#define LOG_ATTACK (1 << 0)
|
||||
|
||||
@@ -41,11 +41,13 @@
|
||||
#define MC_HDD "HDD"
|
||||
#define MC_SDD "SDD"
|
||||
#define MC_CARD "CARD"
|
||||
#define MC_CARD2 "CARD2"
|
||||
#define MC_NET "NET"
|
||||
#define MC_PRINT "PRINT"
|
||||
#define MC_CELL "CELL"
|
||||
#define MC_CHARGE "CHARGE"
|
||||
#define MC_AI "AI"
|
||||
#define MC_SENSORS "SENSORS"
|
||||
|
||||
//NTNet stuff, for modular computers
|
||||
// NTNet module-configuration values. Do not change these. If you need to add another use larger number (5..6..7 etc)
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
// Cosecant
|
||||
#define CSC(x) (1 / sin(x))
|
||||
|
||||
#define ATAN2(x, y) ( !(x) && !(y) ? 0 : (y) >= 0 ? arccos((x) / sqrt((x)*(x) + (y)*(y))) : -arccos((x) / sqrt((x)*(x) + (y)*(y))) )
|
||||
|
||||
// Greatest Common Divisor - Euclid's algorithm
|
||||
/proc/Gcd(a, b)
|
||||
return b ? Gcd(b, (a) % (b)) : a
|
||||
|
||||
+12
-7
@@ -116,6 +116,7 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s
|
||||
#define CRAYON_FONT "Comic Sans MS"
|
||||
#define PRINTER_FONT "Times New Roman"
|
||||
#define SIGNFONT "Times New Roman"
|
||||
#define CHARCOAL_FONT "Candara"
|
||||
|
||||
#define RESIZE_DEFAULT_SIZE 1
|
||||
|
||||
@@ -318,9 +319,9 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S
|
||||
#define SHELTER_DEPLOY_ANCHORED_OBJECTS "anchored objects"
|
||||
|
||||
//debug printing macros
|
||||
#define debug_world(msg) if (GLOB.Debug2) to_chat(world, "DEBUG: [msg]")
|
||||
#define debug_usr(msg) if (GLOB.Debug2&&usr) to_chat(usr, "DEBUG: [msg]")
|
||||
#define debug_admins(msg) if (GLOB.Debug2) to_chat(GLOB.admins, "DEBUG: [msg]")
|
||||
#define debug_world(msg) if (GLOB.Debug2) to_chat(world, "<span class=\"filter_debuglog\">DEBUG: [msg]</span>")
|
||||
#define debug_usr(msg) if (GLOB.Debug2&&usr) to_chat(usr, "<span class=\"filter_debuglog\">DEBUG: [msg]</span>")
|
||||
#define debug_admins(msg) if (GLOB.Debug2) to_chat(GLOB.admins, "<span class=\"filter_debuglog\">DEBUG: [msg]</span>")
|
||||
#define debug_world_log(msg) if (GLOB.Debug2) log_world("DEBUG: [msg]")
|
||||
|
||||
#define INCREMENT_TALLY(L, stat) if(L[stat]){L[stat]++}else{L[stat] = 1}
|
||||
@@ -341,10 +342,11 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S
|
||||
#define COLOUR_PRIORITY_AMOUNT 4 //how many priority levels there are.
|
||||
|
||||
//Endgame Results
|
||||
#define NUKE_MISS_STATION 1
|
||||
#define NUKE_SYNDICATE_BASE 2
|
||||
#define STATION_DESTROYED_NUKE 3
|
||||
#define STATION_EVACUATED 4
|
||||
#define NUKE_NEAR_MISS 1
|
||||
#define NUKE_MISS_STATION 2
|
||||
#define NUKE_SYNDICATE_BASE 3
|
||||
#define STATION_DESTROYED_NUKE 4
|
||||
#define STATION_EVACUATED 5
|
||||
#define BLOB_WIN 8
|
||||
#define BLOB_NUKE 9
|
||||
#define BLOB_DESTROYED 10
|
||||
@@ -434,6 +436,9 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S
|
||||
#define ION_FILE "ion_laws.json"
|
||||
#define REDPILL_FILE "redpill.json"
|
||||
#define PIRATE_NAMES_FILE "pirates.json"
|
||||
#define FLESH_SCAR_FILE "wounds/flesh_scar_desc.json"
|
||||
#define BONE_SCAR_FILE "wounds/bone_scar_desc.json"
|
||||
#define SCAR_LOC_FILE "wounds/scar_loc.json"
|
||||
|
||||
|
||||
//Fullscreen overlay resolution in tiles.
|
||||
|
||||
+12
-1
@@ -64,7 +64,6 @@
|
||||
#define DEFAULT_BODYPART_ICON 'icons/mob/human_parts.dmi'
|
||||
#define DEFAULT_BODYPART_ICON_ORGANIC 'icons/mob/human_parts_greyscale.dmi'
|
||||
#define DEFAULT_BODYPART_ICON_ROBOTIC 'icons/mob/augmentation/augments.dmi'
|
||||
#define DEFAULT_BODYPART_ICON_CITADEL 'modular_citadel/icons/mob/mutant_bodyparts.dmi'
|
||||
|
||||
#define MONKEY_BODYPART "monkey"
|
||||
#define ALIEN_BODYPART "alien"
|
||||
@@ -176,6 +175,15 @@
|
||||
#define DISGUST_LEVEL_VERYGROSS 50
|
||||
#define DISGUST_LEVEL_GROSS 25
|
||||
|
||||
//Charge levels for Ethereals
|
||||
#define ETHEREAL_CHARGE_NONE 0
|
||||
#define ETHEREAL_CHARGE_LOWPOWER 20
|
||||
#define ETHEREAL_CHARGE_NORMAL 50
|
||||
#define ETHEREAL_CHARGE_ALMOSTFULL 75
|
||||
#define ETHEREAL_CHARGE_FULL 100
|
||||
#define ETHEREAL_CHARGE_OVERLOAD 125
|
||||
#define ETHEREAL_CHARGE_DANGEROUS 150
|
||||
|
||||
//Slime evolution threshold. Controls how fast slimes can split/grow
|
||||
#define SLIME_EVOLUTION_THRESHOLD 10
|
||||
|
||||
@@ -284,6 +292,7 @@
|
||||
#define DOOR_CRUSH_DAMAGE 15 //the amount of damage that airlocks deal when they crush you
|
||||
|
||||
#define HUNGER_FACTOR 0.1 //factor at which mob nutrition decreases
|
||||
#define ETHEREAL_CHARGE_FACTOR 0.08 //factor at which ethereal's charge decreases
|
||||
#define REAGENTS_METABOLISM 0.4 //How many units of reagent are consumed per tick, by default.
|
||||
#define REAGENTS_EFFECT_MULTIPLIER (REAGENTS_METABOLISM / 0.4) // By defining the effect multiplier this way, it'll exactly adjust all effects according to how they originally were with the 0.4 metabolism
|
||||
|
||||
@@ -322,3 +331,5 @@
|
||||
|
||||
/// If you examine the same atom twice in this timeframe, we call examine_more() instead of examine()
|
||||
#define EXAMINE_MORE_TIME 1 SECONDS
|
||||
|
||||
#define SILENCE_RANGED_MESSAGE (1<<0)
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
#define MOVESPEED_ID_TASED_STATUS "TASED"
|
||||
#define MOVESPEED_ID_ELECTROSTAFF "ELECTROSTAFF"
|
||||
|
||||
#define MOVESPEED_ID_SHOVE "SHOVE"
|
||||
#define MOVESPEED_ID_FAT "FAT"
|
||||
#define MOVESPEED_ID_COLD "COLD"
|
||||
#define MOVESPEED_ID_HUNGRY "HUNGRY"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#define FIRST_DUCT_LAYER 1
|
||||
#define SECOND_DUCT_LAYER 2
|
||||
#define THIRD_DUCT_LAYER 4
|
||||
#define FOURTH_DUCT_LAYER 8
|
||||
#define FIFTH_DUCT_LAYER 16
|
||||
|
||||
#define DUCT_LAYER_DEFAULT THIRD_DUCT_LAYER
|
||||
|
||||
#define MACHINE_REAGENT_TRANSFER 10
|
||||
@@ -8,6 +8,5 @@
|
||||
GLOBAL_LIST_INIT(blacklisted_pool_reagents, list(
|
||||
/datum/reagent/toxin/plasma, /datum/reagent/oxygen, /datum/reagent/nitrous_oxide, /datum/reagent/nitrogen, //gases
|
||||
/datum/reagent/fermi, //blanket fermichem ban sorry. this also covers mkultra, genital enlargers, etc etc.
|
||||
/datum/reagent/drug/aphrodisiac, /datum/reagent/drug/anaphrodisiac, /datum/reagent/drug/aphrodisiacplus, /datum/reagent/drug/anaphrodisiacplus, //literally asking for prefbreaks
|
||||
/datum/reagent/consumable/femcum, /datum/reagent/consumable/semen //NO.
|
||||
/datum/reagent/consumable/semen //NO.
|
||||
))
|
||||
|
||||
+11
-4
@@ -6,10 +6,17 @@
|
||||
#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.
|
||||
#define QDEL_HINT_FINDREFERENCE 5 //functionally identical to QDEL_HINT_QUEUE if TESTING is not enabled in _compiler_options.dm.
|
||||
//if TESTING is enabled, qdel will call this object's find_references() verb.
|
||||
#define QDEL_HINT_IFFAIL_FINDREFERENCE 6 //Above but only if gc fails.
|
||||
//defines for the gc_destroyed var
|
||||
|
||||
#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.
|
||||
*/
|
||||
#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
|
||||
|
||||
@@ -57,6 +57,10 @@
|
||||
#define ADD_REAGENT 2 // reagent added
|
||||
#define REM_REAGENT 3 // reagent removed (may still exist)
|
||||
|
||||
|
||||
#define PILL_STYLE_COUNT 22 //Update this if you add more pill icons or you die (literally, we'll toss a nuke at whever your ip turns up)
|
||||
#define RANDOM_PILL_STYLE 22 //Dont change this one though
|
||||
|
||||
#define THRESHOLD_UNHUSK 50 // health threshold for synthflesh/rezadone to unhusk someone
|
||||
|
||||
//reagent bitflags, used for altering how they works
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
// Anomaly core types
|
||||
/// Bluespace cores
|
||||
#define ANOMALY_CORE_BLUESPACE /obj/item/assembly/signaler/anomaly/bluespace
|
||||
/// Gravitational cores
|
||||
#define ANOMALY_CORE_GRAVITATIONAL /obj/item/assembly/signaler/anomaly/grav
|
||||
/// Flux
|
||||
#define ANOMALY_CORE_FLUX /obj/item/assembly/signaler/anomaly/flux
|
||||
/// Vortex
|
||||
#define ANOMALY_CORE_VORTEX /obj/item/assembly/signaler/anomaly/vortex
|
||||
/// Pyro
|
||||
#define ANOMALY_CORE_PYRO /obj/item/assembly/signaler/anomaly/pyro
|
||||
|
||||
// Max amounts of cores you can make
|
||||
#define MAX_CORES_BLUESPACE 8
|
||||
#define MAX_CORES_GRAVITATIONAL 8
|
||||
#define MAX_CORES_FLUX 8
|
||||
#define MAX_CORES_VORTEX 8
|
||||
#define MAX_CORES_PYRO 8
|
||||
|
||||
/// chance supermatter anomalies drop real cores
|
||||
#define SUPERMATTER_ANOMALY_DROP_CHANCE 20
|
||||
@@ -0,0 +1,7 @@
|
||||
#define ROCKPAPERSCISSORS_RANGE 3
|
||||
#define ROCKPAPERSCISSORS_TIME_LIMIT 20 SECONDS
|
||||
|
||||
#define ROCKPAPERSCISSORS_LOSE "lose"
|
||||
#define ROCKPAPERSCISSORS_WIN "win"
|
||||
#define ROCKPAPERSCISSORS_TIE "tie"
|
||||
#define ROCKPAPERSCISSORS_NOT_DECIDED "not_decided"
|
||||
@@ -17,6 +17,7 @@
|
||||
#define ROLE_ALIEN "xenomorph"
|
||||
#define ROLE_PAI "pAI"
|
||||
#define ROLE_CULTIST "cultist"
|
||||
#define ROLE_HERETIC "Heretic"
|
||||
#define ROLE_BLOB "blob"
|
||||
#define ROLE_NINJA "space ninja"
|
||||
#define ROLE_MONKEY "monkey"
|
||||
@@ -64,6 +65,7 @@ GLOBAL_LIST_INIT(special_roles, list(
|
||||
ROLE_INTERNAL_AFFAIRS = /datum/game_mode/traitor/internal_affairs,
|
||||
ROLE_SENTIENCE,
|
||||
ROLE_GANG = /datum/game_mode/gang,
|
||||
ROLE_HERETIC = /datum/game_mode/heretics,
|
||||
ROLE_BLOODSUCKER = /datum/game_mode/bloodsucker
|
||||
//ROLE_MONSTERHUNTER Disabled for now
|
||||
))
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
|
||||
#define STATUS_EFFECT_FLESHMEND /datum/status_effect/fleshmend //Very fast healing; suppressed by fire, and heals less fire damage
|
||||
|
||||
#define STATUS_EFFECT_PANACEA /datum/status_effect/panacea //Anatomic panacea that directly heals, rather than injecting a small chemical cocktail
|
||||
|
||||
#define STATUS_EFFECT_EXERCISED /datum/status_effect/exercised //Prevents heart disease
|
||||
|
||||
#define STATUS_EFFECT_HIPPOCRATIC_OATH /datum/status_effect/hippocraticOath //Gives you an aura of healing as well as regrowing the Rod of Asclepius if lost
|
||||
@@ -111,6 +113,13 @@
|
||||
|
||||
#define STATUS_EFFECT_LIMP /datum/status_effect/limp //For when you have a busted leg (or two!) and want additional slowdown when walking on that leg
|
||||
|
||||
#define STATUS_EFFECT_AMOK /datum/status_effect/amok //Makes the target automatically strike out at adjecent non-heretics.
|
||||
|
||||
#define STATUS_EFFECT_CLOUDSTRUCK /datum/status_effect/cloudstruck //blinds and applies an overlay.
|
||||
|
||||
/// shoves inflict this to indicate the next shove while this is in effect should disarm guns
|
||||
#define STATUS_EFFECT_OFF_BALANCE /datum/status_effect/off_balance
|
||||
|
||||
/////////////
|
||||
// NEUTRAL //
|
||||
/////////////
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/// Size of EACH left/right border icon for volumetric boxes
|
||||
#define VOLUMETRIC_STORAGE_BOX_BORDER_SIZE 1
|
||||
/// Minimum pixels an item must have in volumetric scaled storage UI
|
||||
#define MINIMUM_PIXELS_PER_ITEM 8
|
||||
#define MINIMUM_PIXELS_PER_ITEM 16
|
||||
/// Maximum number of objects that will be allowed to be displayed using the volumetric display system. Arbitrary number to prevent server lockups.
|
||||
#define MAXIMUM_VOLUMETRIC_ITEMS 256
|
||||
/// How much padding to give between items
|
||||
|
||||
@@ -24,7 +24,10 @@ GLOBAL_LIST_INIT(default_weight_class_to_volume, list(
|
||||
// Let's keep all of this in one place. given what we put above anyways..
|
||||
|
||||
// volume amount for items
|
||||
/// volume for a data disk
|
||||
#define ITEM_VOLUME_DISK 1
|
||||
/// volume for a shotgun stripper clip holding 4 shells
|
||||
#define ITEM_VOLUME_STRIPPER_CLIP (DEFAULT_VOLUME_NORMAL * 0.5)
|
||||
|
||||
// #define SAMPLE_VOLUME_AMOUNT 2
|
||||
|
||||
|
||||
@@ -93,7 +93,6 @@
|
||||
// If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child)
|
||||
|
||||
#define FIRE_PRIORITY_VORE 5
|
||||
#define FIRE_PRIORITY_PING 10
|
||||
#define FIRE_PRIORITY_IDLE_NPC 10
|
||||
#define FIRE_PRIORITY_SERVER_MAINT 10
|
||||
#define FIRE_PRIORITY_RESEARCH 10
|
||||
@@ -146,11 +145,11 @@
|
||||
#define SSAIR_EQUALIZE 8
|
||||
#define SSAIR_ACTIVETURFS 9
|
||||
|
||||
// |= on overlays is not actually guaranteed to not add same appearances but we're optimistically using it anyway.
|
||||
#define COMPILE_OVERLAYS(A)\
|
||||
if (TRUE) {\
|
||||
var/list/ad = A.add_overlays;\
|
||||
var/list/rm = A.remove_overlays;\
|
||||
var/list/po = A.priority_overlays;\
|
||||
if(LAZYLEN(rm)){\
|
||||
A.overlays -= rm;\
|
||||
A.remove_overlays = null;\
|
||||
@@ -159,11 +158,5 @@
|
||||
A.overlays |= ad;\
|
||||
A.add_overlays = null;\
|
||||
}\
|
||||
if(LAZYLEN(po)){\
|
||||
A.overlays |= po;\
|
||||
}\
|
||||
else{\
|
||||
A.priority_overlays = null;\
|
||||
}\
|
||||
A.flags_1 &= ~OVERLAY_QUEUED_1;\
|
||||
}
|
||||
|
||||
+35
-4
@@ -1,4 +1,35 @@
|
||||
#define UI_INTERACTIVE 2 // Green/Interactive
|
||||
#define UI_UPDATE 1 // Orange/Updates Only
|
||||
#define UI_DISABLED 0 // Red/Disabled
|
||||
#define UI_CLOSE -1 // Closed
|
||||
/// Green eye; fully interactive
|
||||
#define UI_INTERACTIVE 2
|
||||
/// Orange eye; updates but is not interactive
|
||||
#define UI_UPDATE 1
|
||||
/// Red eye; disabled, does not update
|
||||
#define UI_DISABLED 0
|
||||
/// UI Should close
|
||||
#define UI_CLOSE -1
|
||||
|
||||
/// Maximum number of windows that can be suspended/reused
|
||||
#define TGUI_WINDOW_SOFT_LIMIT 5
|
||||
/// Maximum number of open windows
|
||||
#define TGUI_WINDOW_HARD_LIMIT 9
|
||||
|
||||
/// Maximum ping timeout allowed to detect zombie windows
|
||||
#define TGUI_PING_TIMEOUT 4 SECONDS
|
||||
|
||||
/// Window does not exist
|
||||
#define TGUI_WINDOW_CLOSED 0
|
||||
/// Window was just opened, but is still not ready to be sent data
|
||||
#define TGUI_WINDOW_LOADING 1
|
||||
/// Window is free and ready to receive data
|
||||
#define TGUI_WINDOW_READY 2
|
||||
|
||||
/// Get a window id based on the provided pool index
|
||||
#define TGUI_WINDOW_ID(index) "tgui-window-[index]"
|
||||
/// Get a pool index of the provided window id
|
||||
#define TGUI_WINDOW_INDEX(window_id) text2num(copytext(window_id, 13))
|
||||
|
||||
/// Creates a message packet for sending via output()
|
||||
#define TGUI_CREATE_MESSAGE(type, payload) ( \
|
||||
url_encode(json_encode(list( \
|
||||
"type" = type, \
|
||||
"payload" = payload, \
|
||||
))))
|
||||
@@ -104,7 +104,9 @@
|
||||
#define TRAIT_RESISTCOLD "resist_cold"
|
||||
#define TRAIT_RESISTHIGHPRESSURE "resist_high_pressure"
|
||||
#define TRAIT_RESISTLOWPRESSURE "resist_low_pressure"
|
||||
#define TRAIT_BOMBIMMUNE "bomb_immunity"
|
||||
#define TRAIT_RADIMMUNE "rad_immunity"
|
||||
#define TRAIT_GENELESS "geneless"
|
||||
#define TRAIT_VIRUSIMMUNE "virus_immunity"
|
||||
#define TRAIT_PIERCEIMMUNE "pierce_immunity"
|
||||
#define TRAIT_NODISMEMBER "dismember_immunity"
|
||||
@@ -178,6 +180,7 @@
|
||||
#define TRAIT_FREERUNNING "freerunning"
|
||||
#define TRAIT_SKITTISH "skittish"
|
||||
#define TRAIT_POOR_AIM "poor_aim"
|
||||
#define TRAIT_INSANE_AIM "insane_aim" //they don't miss. they never miss. it was all part of their immaculate plan.
|
||||
#define TRAIT_PROSOPAGNOSIA "prosopagnosia"
|
||||
#define TRAIT_DRUNK_HEALING "drunk_healing"
|
||||
#define TRAIT_TAGGER "tagger"
|
||||
@@ -202,7 +205,7 @@
|
||||
#define TRAIT_NO_ALCOHOL "alcohol_intolerance"
|
||||
#define TRAIT_MUTATION_STASIS "mutation_stasis" //Prevents processed genetics mutations from processing.
|
||||
#define TRAIT_FAST_PUMP "fast_pump"
|
||||
#define TRAIT_NICE_SHOT "nice_shot" //hnnnnnnnggggg..... you're pretty good....
|
||||
#define TRAIT_NICE_SHOT "nice_shot" //hnnnnnnnggggg..... you're pretty good...
|
||||
|
||||
// mobility flag traits
|
||||
// IN THE FUTURE, IT WOULD BE NICE TO DO SOMETHING SIMILAR TO https://github.com/tgstation/tgstation/pull/48923/files (ofcourse not nearly the same because I have my.. thoughts on it)
|
||||
@@ -256,6 +259,7 @@
|
||||
#define CURSED_ITEM_TRAIT "cursed-item" // The item is magically cursed
|
||||
#define ABSTRACT_ITEM_TRAIT "abstract-item"
|
||||
#define STATUS_EFFECT_TRAIT "status-effect"
|
||||
#define CLOTHING_TRAIT "clothing"
|
||||
#define ROUNDSTART_TRAIT "roundstart" //cannot be removed without admin intervention
|
||||
#define GHOSTROLE_TRAIT "ghostrole"
|
||||
#define APHRO_TRAIT "aphro"
|
||||
@@ -310,4 +314,4 @@
|
||||
#define ACTIVE_BLOCK_TRAIT "active_block"
|
||||
/// This trait is added by the parry system.
|
||||
#define ACTIVE_PARRY_TRAIT "active_parry"
|
||||
#define STICKY_NODROP "sticky-nodrop" //sticky nodrop sounds like a bad soundcloud rapper's name
|
||||
#define STICKY_NODROP "sticky-nodrop" //sticky nodrop sounds like a bad soundcloud rapper's name
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
#define VV_HK_MARK "mark"
|
||||
#define VV_HK_ADDCOMPONENT "addcomponent"
|
||||
#define VV_HK_MODIFY_TRAITS "modtraits"
|
||||
#define VV_HK_VIEW_REFERENCES "viewreferences"
|
||||
|
||||
// /datum/gas_mixture
|
||||
#define VV_HK_SET_MOLES "set_moles"
|
||||
|
||||
+95
-19
@@ -1,4 +1,13 @@
|
||||
#define WOUND_DAMAGE_EXPONENT 1.4
|
||||
|
||||
#define WOUND_DAMAGE_EXPONENT 1.225
|
||||
|
||||
/// an attack must do this much damage after armor in order to roll for being a wound (incremental pressure damage need not apply)
|
||||
#define WOUND_MINIMUM_DAMAGE 5
|
||||
/// an attack must do this much damage after armor in order to be eliigible to dismember a suitably mushed bodypart
|
||||
#define DISMEMBER_MINIMUM_DAMAGE 10
|
||||
/// any damage dealt over this is ignored for damage rolls unless the target has the frail quirk (35^1.4=145)
|
||||
#define WOUND_MAX_CONSIDERED_DAMAGE 35
|
||||
|
||||
|
||||
#define WOUND_SEVERITY_TRIVIAL 0 // for jokey/meme wounds like stubbed toe, no standard messages/sounds or second winds
|
||||
#define WOUND_SEVERITY_MODERATE 1
|
||||
@@ -6,38 +15,105 @@
|
||||
#define WOUND_SEVERITY_CRITICAL 3
|
||||
#define WOUND_SEVERITY_LOSS 4 // theoretical total limb loss, like dismemberment for cuts
|
||||
|
||||
#define WOUND_BRUTE 0
|
||||
#define WOUND_SHARP 1
|
||||
#define WOUND_BURN 2
|
||||
/// any brute weapon/attack that doesn't have sharpness. rolls for blunt bone wounds
|
||||
#define WOUND_BLUNT 1
|
||||
/// any brute weapon/attack with sharpness = SHARP_EDGED. rolls for slash wounds
|
||||
#define WOUND_SLASH 2
|
||||
/// any brute weapon/attack with sharpness = SHARP_POINTY. rolls for piercing wounds
|
||||
#define WOUND_PIERCE 3
|
||||
/// any concentrated burn attack (lasers really). rolls for burning wounds
|
||||
#define WOUND_BURN 4
|
||||
|
||||
// How much determination reagent to add each time someone gains a new wound in [/datum/wound/proc/second_wind()]
|
||||
#define WOUND_DETERMINATION_MODERATE 1
|
||||
#define WOUND_DETERMINATION_SEVERE 2.5
|
||||
#define WOUND_DETERMINATION_CRITICAL 5
|
||||
#define WOUND_DETERMINATION_LOSS 7.5
|
||||
|
||||
/// the max amount of determination you can have
|
||||
#define WOUND_DETERMINATION_MAX 10
|
||||
|
||||
// set wound_bonus on an item or attack to this to disable checking wounding for the attack
|
||||
/// set wound_bonus on an item or attack to this to disable checking wounding for the attack
|
||||
#define CANT_WOUND -100
|
||||
|
||||
// list in order of highest severity to lowest
|
||||
#define WOUND_LIST_BONE list(/datum/wound/brute/bone/critical, /datum/wound/brute/bone/severe, /datum/wound/brute/bone/moderate)
|
||||
#define WOUND_LIST_CUT list(/datum/wound/brute/cut/loss, /datum/wound/brute/cut/critical, /datum/wound/brute/cut/severe, /datum/wound/brute/cut/moderate)
|
||||
#define WOUND_LIST_BURN list(/datum/wound/burn/critical, /datum/wound/burn/severe, /datum/wound/burn/moderate)
|
||||
GLOBAL_LIST_INIT(global_wound_types, list(WOUND_BLUNT = list(/datum/wound/blunt/critical, /datum/wound/blunt/severe, /datum/wound/blunt/moderate),
|
||||
WOUND_SLASH = list(/datum/wound/slash/critical, /datum/wound/slash/severe, /datum/wound/slash/moderate),
|
||||
WOUND_PIERCE = list(/datum/wound/pierce/critical, /datum/wound/pierce/severe, /datum/wound/pierce/moderate),
|
||||
WOUND_BURN = list(/datum/wound/burn/critical, /datum/wound/burn/severe, /datum/wound/burn/moderate)
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(global_all_wound_types, list(/datum/wound/blunt/critical, /datum/wound/blunt/severe, /datum/wound/blunt/moderate,
|
||||
/datum/wound/slash/critical, /datum/wound/slash/severe, /datum/wound/slash/moderate,
|
||||
/datum/wound/pierce/critical, /datum/wound/pierce/severe, /datum/wound/pierce/moderate,
|
||||
/datum/wound/burn/critical, /datum/wound/burn/severe, /datum/wound/burn/moderate))
|
||||
|
||||
// Thresholds for infection for burn wounds, once infestation hits each threshold, things get steadily worse
|
||||
#define WOUND_INFECTION_MODERATE 4 // below this has no ill effects from infection
|
||||
#define WOUND_INFECTION_SEVERE 8 // then below here, you ooze some pus and suffer minor tox damage, but nothing serious
|
||||
#define WOUND_INFECTION_CRITICAL 12 // then below here, your limb occasionally locks up from damage and infection and briefly becomes disabled. Things are getting really bad
|
||||
#define WOUND_INFECTION_SEPTIC 20 // below here, your skin is almost entirely falling off and your limb locks up more frequently. You are within a stone's throw of septic paralysis and losing the limb
|
||||
/// below this has no ill effects from infection
|
||||
#define WOUND_INFECTION_MODERATE 4
|
||||
/// then below here, you ooze some pus and suffer minor tox damage, but nothing serious
|
||||
#define WOUND_INFECTION_SEVERE 8
|
||||
/// then below here, your limb occasionally locks up from damage and infection and briefly becomes disabled. Things are getting really bad
|
||||
#define WOUND_INFECTION_CRITICAL 12
|
||||
/// below here, your skin is almost entirely falling off and your limb locks up more frequently. You are within a stone's throw of septic paralysis and losing the limb
|
||||
#define WOUND_INFECTION_SEPTIC 20
|
||||
// above WOUND_INFECTION_SEPTIC, your limb is completely putrid and you start rolling to lose the entire limb by way of paralyzation. After 3 failed rolls (~4-5% each probably), the limb is paralyzed
|
||||
|
||||
#define WOUND_BURN_SANITIZATION_RATE 0.15 // how quickly sanitization removes infestation and decays per tick
|
||||
#define WOUND_CUT_MAX_BLOODFLOW 8 // how much blood you can lose per tick per cut max. 8 is a LOT of blood for one cut so don't worry about hitting it easily
|
||||
#define WOUND_BONE_HEAD_TIME_VARIANCE 20 // if we suffer a bone wound to the head that creates brain traumas, the timer for the trauma cycle is +/- by this percent (0-100)
|
||||
|
||||
/// how quickly sanitization removes infestation and decays per tick
|
||||
#define WOUND_BURN_SANITIZATION_RATE 0.15
|
||||
/// how much blood you can lose per tick per slash max. 8 is a LOT of blood for one cut so don't worry about hitting it easily
|
||||
#define WOUND_SLASH_MAX_BLOODFLOW 8
|
||||
/// dead people don't bleed, but they can clot! this is the minimum amount of clotting per tick on dead people, so even critical cuts will slowly clot in dead people
|
||||
#define WOUND_SLASH_DEAD_CLOT_MIN 0.05
|
||||
/// if we suffer a bone wound to the head that creates brain traumas, the timer for the trauma cycle is +/- by this percent (0-100)
|
||||
#define WOUND_BONE_HEAD_TIME_VARIANCE 20
|
||||
|
||||
// The following are for persistent scar save formats
|
||||
#define SCAR_SAVE_ZONE 1 // The body_zone we're applying to on granting
|
||||
#define SCAR_SAVE_DESC 2 // The description we're loading
|
||||
#define SCAR_SAVE_PRECISE_LOCATION 3 // The precise location we're loading
|
||||
#define SCAR_SAVE_SEVERITY 4 // The severity the scar had
|
||||
/// The version number of the scar we're saving
|
||||
#define SCAR_SAVE_VERS 1
|
||||
/// The body_zone we're applying to on granting
|
||||
#define SCAR_SAVE_ZONE 2
|
||||
/// The description we're loading
|
||||
#define SCAR_SAVE_DESC 3
|
||||
/// The precise location we're loading
|
||||
#define SCAR_SAVE_PRECISE_LOCATION 4
|
||||
/// The severity the scar had
|
||||
#define SCAR_SAVE_SEVERITY 5
|
||||
///how many fields there are above (NOT INCLUDING THIS OBVIOUSLY)
|
||||
#define SCAR_SAVE_LENGTH 5
|
||||
|
||||
// increment this number when you update the persistent scarring format in a way that invalidates previous saved scars (new fields, reordering, etc)
|
||||
/// saved scars with a version lower than this will be discarded
|
||||
#define SCAR_CURRENT_VERSION 1
|
||||
|
||||
|
||||
// With the wounds pt. 2 update, general dismemberment now requires 2 things for a limb to be dismemberable (bone only creatures just need the second):
|
||||
// 1. Skin is mangled: A critical slash or pierce wound on that limb
|
||||
// 2. Bone is mangled: At least a severe bone wound on that limb
|
||||
// see [/obj/item/bodypart/proc/get_mangled_state] for more information
|
||||
#define BODYPART_MANGLED_NONE 0
|
||||
#define BODYPART_MANGLED_BONE 1
|
||||
#define BODYPART_MANGLED_FLESH 2
|
||||
#define BODYPART_MANGLED_BOTH 3
|
||||
|
||||
// What kind of biology we have, and what wounds we can suffer, mostly relies on the HAS_FLESH and HAS_BONE species traits on human species
|
||||
/// golems and androids, cannot suffer any wounds
|
||||
#define BIO_INORGANIC 0
|
||||
/// skeletons and plasmemes, can only suffer bone wounds, only needs mangled bone to be able to dismember
|
||||
#define BIO_JUST_BONE 1
|
||||
/// nothing right now, maybe slimepeople in the future, can only suffer slashing, piercing, and burn wounds
|
||||
#define BIO_JUST_FLESH 2
|
||||
/// standard humanoids, can suffer all wounds, needs mangled bone and flesh to dismember
|
||||
#define BIO_FLESH_BONE 3
|
||||
|
||||
/// If this wound requires having the HAS_FLESH flag for humanoids
|
||||
#define FLESH_WOUND (1<<0)
|
||||
/// If this wound requires having the HAS_BONE flag for humanaoids
|
||||
#define BONE_WOUND (1<<1)
|
||||
/// If having this wound counts as mangled flesh for dismemberment
|
||||
#define MANGLES_FLESH (1<<2)
|
||||
/// If having this wound counts as mangled bone for dismemberment
|
||||
#define MANGLES_BONE (1<<3)
|
||||
/// If this wound marks the limb as being allowed to have gauze applied
|
||||
#define ACCEPTS_GAUZE (1<<4)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/matrix/mtrx=new()
|
||||
return mtrx.Scale(0.65)
|
||||
|
||||
proc/get_racelist(var/mob/user)//This proc returns a list of species that 'user' has available to them. It searches the list of ckeys attached to the 'whitelist' var for a species and also checks if they're an admin.
|
||||
/proc/get_racelist(mob/user)//This proc returns a list of species that 'user' has available to them. It searches the list of ckeys attached to the 'whitelist' var for a species and also checks if they're an admin.
|
||||
for(var/spath in subtypesof(/datum/species))
|
||||
var/datum/species/S = new spath()
|
||||
var/list/wlist = S.whitelist
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#define EXTOOLS_LOGGING // rust_g is used as a fallback if this is undefined
|
||||
|
||||
/proc/extools_log_write()
|
||||
|
||||
/proc/extools_finalize_logging()
|
||||
@@ -681,3 +681,11 @@
|
||||
continue
|
||||
if(istype(D, path))
|
||||
return TRUE
|
||||
|
||||
/proc/safe_json_encode(list/L, default = "")
|
||||
. = default
|
||||
return json_encode(L)
|
||||
|
||||
/proc/safe_json_decode(string, default = list())
|
||||
. = default
|
||||
return json_decode(string)
|
||||
|
||||
@@ -4,10 +4,15 @@
|
||||
#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)
|
||||
#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)
|
||||
#define WRITE_LOG_NO_FORMAT(log, text) extools_log_write(log,text,FALSE)
|
||||
#else
|
||||
//This is an external call, "true" and "false" are how rust parses out booleans
|
||||
#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)
|
||||
@@ -201,13 +206,26 @@
|
||||
WRITE_LOG(log, "Starting up round ID [GLOB.round_id].\n-------------------------")
|
||||
|
||||
/* ui logging */
|
||||
|
||||
/proc/log_tgui(text)
|
||||
WRITE_LOG(GLOB.tgui_log, text)
|
||||
/proc/log_tgui(user_or_client, text)
|
||||
var/entry = ""
|
||||
if(!user_or_client)
|
||||
entry += "no user"
|
||||
else if(istype(user_or_client, /mob))
|
||||
var/mob/user = user_or_client
|
||||
entry += "[user.ckey] (as [user])"
|
||||
else if(istype(user_or_client, /client))
|
||||
var/client/client = user_or_client
|
||||
entry += "[client.ckey]"
|
||||
entry += ":\n[text]"
|
||||
WRITE_LOG(GLOB.tgui_log, entry)
|
||||
|
||||
/* Close open log handles. This should be called as late as possible, and no logging should hapen after. */
|
||||
/proc/shutdown_logging()
|
||||
#ifdef EXTOOLS_LOGGING
|
||||
extools_finalize_logging()
|
||||
#else
|
||||
rustg_log_close_all()
|
||||
#endif
|
||||
|
||||
|
||||
/* Helper procs for building detailed log lines */
|
||||
|
||||
+13
-6
@@ -85,9 +85,6 @@ GLOBAL_VAR_INIT(cmp_field, "name")
|
||||
/proc/cmp_advdisease_resistance_asc(datum/disease/advance/A, datum/disease/advance/B)
|
||||
return A.totalResistance() - B.totalResistance()
|
||||
|
||||
/proc/cmp_job_display_asc(datum/job/A, datum/job/B)
|
||||
return A.display_order - B.display_order
|
||||
|
||||
/proc/cmp_uplink_items_dsc(datum/uplink_item/A, datum/uplink_item/B)
|
||||
return sorttext(initial(B.name), initial(A.name))
|
||||
|
||||
@@ -97,9 +94,6 @@ GLOBAL_VAR_INIT(cmp_field, "name")
|
||||
/proc/cmp_numbered_displays_name_dsc(datum/numbered_display/A, datum/numbered_display/B)
|
||||
return sorttext(B.sample_object.name, A.sample_object.name)
|
||||
|
||||
/proc/cmp_reagents_asc(datum/reagent/a, datum/reagent/b)
|
||||
return sorttext(initial(b.name),initial(a.name))
|
||||
|
||||
/proc/cmp_quirk_asc(datum/quirk/A, datum/quirk/B)
|
||||
var/a_sign = num2sign(initial(A.value) * -1)
|
||||
var/b_sign = num2sign(initial(B.value) * -1)
|
||||
@@ -133,3 +127,16 @@ GLOBAL_VAR_INIT(cmp_field, "name")
|
||||
return A.required_temp - B.required_temp //return coldest
|
||||
else
|
||||
return B.required_temp - A.required_temp //return hottest
|
||||
|
||||
|
||||
/proc/cmp_mob_realname_dsc(mob/A,mob/B)
|
||||
return sorttext(A.real_name,B.real_name)
|
||||
|
||||
/proc/cmp_job_display_asc(datum/job/A, datum/job/B)
|
||||
return A.display_order - B.display_order
|
||||
|
||||
/proc/cmp_reagents_asc(datum/reagent/a, datum/reagent/b)
|
||||
return sorttext(initial(b.name),initial(a.name))
|
||||
|
||||
/proc/cmp_typepaths_asc(A, B)
|
||||
return sorttext("[B]","[A]")
|
||||
|
||||
@@ -17,9 +17,9 @@ For fast lookups, this is generated using regenerate_donator_grouping_list()
|
||||
/proc/regenerate_donator_grouping_list()
|
||||
GLOB.donators_by_group = list() //reinit everything
|
||||
var/list/donator_list = GLOB.donators_by_group //cache
|
||||
var/list/tier_1 = TIER_1_DONATORS
|
||||
donator_list[DONATOR_GROUP_TIER_1] = tier_1.Copy() //The .Copy() is to "decouple"/make a new list, rather than letting the global list impact the config list.
|
||||
var/list/tier_2 = tier_1 + TIER_2_DONATORS //Using + on lists implies making new lists, so we don't need to manually Copy().
|
||||
var/list/tier_3 = TIER_3_DONATORS
|
||||
donator_list[DONATOR_GROUP_TIER_3] = tier_3.Copy() //The .Copy() is to "decouple"/make a new list, rather than letting the global list impact the config list.
|
||||
var/list/tier_2 = tier_3 + TIER_2_DONATORS //Using + on lists implies making new lists, so we don't need to manually Copy().
|
||||
donator_list[DONATOR_GROUP_TIER_2] = tier_2
|
||||
var/list/tier_3 = tier_2 + TIER_3_DONATORS
|
||||
donator_list[DONATOR_GROUP_TIER_3] = tier_3
|
||||
var/list/tier_1 = tier_2 + TIER_1_DONATORS
|
||||
donator_list[DONATOR_GROUP_TIER_1] = tier_1
|
||||
|
||||
@@ -71,3 +71,18 @@
|
||||
|
||||
/proc/pathflatten(path)
|
||||
return replacetext(path, "/", "_")
|
||||
|
||||
/// Returns the md5 of a file at a given path.
|
||||
/proc/md5filepath(path)
|
||||
. = md5(file(path))
|
||||
|
||||
/// Save file as an external file then md5 it.
|
||||
/// Used because md5ing files stored in the rsc sometimes gives incorrect md5 results.
|
||||
/proc/md5asfile(file)
|
||||
var/static/notch = 0
|
||||
// its importaint this code can handle md5filepath sleeping instead of hard blocking, if it's converted to use rust_g.
|
||||
var/filename = "tmp/md5asfile.[world.realtime].[world.timeofday].[world.time].[world.tick_usage].[notch]"
|
||||
notch = WRAP(notch+1, 0, 2^15)
|
||||
fcopy(file, filename)
|
||||
. = md5filepath(filename)
|
||||
fdel(filename)
|
||||
|
||||
@@ -37,10 +37,10 @@
|
||||
//CIT CHANGES START HERE, ADDS SNOWFLAKE BODYPARTS AND MORE
|
||||
//mammal bodyparts (fucking furries)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_body_markings, GLOB.mam_body_markings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails, GLOB.mam_tails_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_ears, GLOB.mam_ears_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_snouts, GLOB.mam_snouts_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails_animated, GLOB.mam_tails_animated_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/mam_tails, GLOB.mam_tails_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/ears/mam_ears, GLOB.mam_ears_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/snouts/mam_snouts, GLOB.mam_snouts_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails_animated/mam_tails_animated, GLOB.mam_tails_animated_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/taur, GLOB.taur_list)
|
||||
//xeno parts (hiss?)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_head, GLOB.xeno_head_list)
|
||||
|
||||
+38
-17
@@ -1103,24 +1103,36 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
|
||||
alpha += 25
|
||||
obj_flags &= ~FROZEN
|
||||
|
||||
/// Save file used in icon2base64. Used for converting icons to base64.
|
||||
GLOBAL_DATUM_INIT(dummySave, /savefile, new("tmp/dummySave.sav")) //Cache of icons for the browser output
|
||||
|
||||
//Converts an icon to base64. Operates by putting the icon in the iconCache savefile,
|
||||
// exporting it as text, and then parsing the base64 from that.
|
||||
// (This relies on byond automatically storing icons in savefiles as base64)
|
||||
/proc/icon2base64(icon/icon, iconKey = "misc")
|
||||
|
||||
/// Generate a filename for this asset
|
||||
/// The same asset will always lead to the same asset name
|
||||
/// (Generated names do not include file extention.)
|
||||
/proc/generate_asset_name(file)
|
||||
return "asset.[md5(fcopy_rsc(file))]"
|
||||
|
||||
/**
|
||||
* Converts an icon to base64. Operates by putting the icon in the iconCache savefile,
|
||||
* exporting it as text, and then parsing the base64 from that.
|
||||
* (This relies on byond automatically storing icons in savefiles as base64)
|
||||
*/
|
||||
/proc/icon2base64(icon/icon)
|
||||
if (!isicon(icon))
|
||||
return FALSE
|
||||
WRITE_FILE(GLOB.iconCache[iconKey], icon)
|
||||
var/iconData = GLOB.iconCache.ExportText(iconKey)
|
||||
WRITE_FILE(GLOB.dummySave["dummy"], icon)
|
||||
var/iconData = GLOB.dummySave.ExportText("dummy")
|
||||
var/list/partial = splittext(iconData, "{")
|
||||
return replacetext(copytext_char(partial[2], 3, -5), "\n", "")
|
||||
|
||||
/proc/icon2html(thing, target, icon_state, dir, frame = 1, moving = FALSE)
|
||||
/proc/icon2html(thing, target, icon_state, dir = SOUTH, frame = 1, moving = FALSE, sourceonly = FALSE)
|
||||
if (!thing)
|
||||
return
|
||||
|
||||
var/key
|
||||
var/icon/I = thing
|
||||
|
||||
if (!target)
|
||||
return
|
||||
if (target == world)
|
||||
@@ -1136,17 +1148,26 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
|
||||
if (!isicon(I))
|
||||
if (isfile(thing)) //special snowflake
|
||||
var/name = sanitize_filename("[generate_asset_name(thing)].png")
|
||||
if(!SSassets.cache[name])
|
||||
register_asset(name, thing)
|
||||
if (!SSassets.cache[name])
|
||||
SSassets.transport.register_asset(name, thing)
|
||||
for (var/thing2 in targets)
|
||||
send_asset(thing2, key)
|
||||
return "<img class='icon icon-misc' src=\"[url_encode(name)]\">"
|
||||
SSassets.transport.send_assets(thing2, name)
|
||||
if(sourceonly)
|
||||
return SSassets.transport.get_asset_url(name)
|
||||
return "<img class='icon icon-misc' src='[SSassets.transport.get_asset_url(name)]'>"
|
||||
var/atom/A = thing
|
||||
if (isnull(dir))
|
||||
dir = A.dir
|
||||
|
||||
I = A.icon
|
||||
if (isnull(icon_state))
|
||||
icon_state = A.icon_state
|
||||
I = A.icon
|
||||
if (!(icon_state in icon_states(I, 1)))
|
||||
icon_state = initial(A.icon_state)
|
||||
if (isnull(dir))
|
||||
dir = initial(A.dir)
|
||||
|
||||
if (isnull(dir))
|
||||
dir = A.dir
|
||||
|
||||
if (ishuman(thing)) // Shitty workaround for a BYOND issue.
|
||||
var/icon/temp = I
|
||||
I = icon()
|
||||
@@ -1162,11 +1183,11 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
|
||||
|
||||
key = "[generate_asset_name(I)].png"
|
||||
if(!SSassets.cache[key])
|
||||
register_asset(key, I)
|
||||
SSassets.transport.register_asset(key, I)
|
||||
for (var/thing2 in targets)
|
||||
send_asset(thing2, key)
|
||||
SSassets.transport.send_assets(thing2, key)
|
||||
|
||||
return "<img class='icon icon-[icon_state]' src=\"[url_encode(key)]\">"
|
||||
return "<img class='icon icon-[icon_state]' src='[SSassets.transport.get_asset_url(key)]'>"
|
||||
|
||||
/proc/icon2base64html(thing)
|
||||
if (!thing)
|
||||
|
||||
+14
-7
@@ -93,16 +93,16 @@
|
||||
if(!GLOB.mam_body_markings_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_body_markings, GLOB.mam_body_markings_list)
|
||||
if(!GLOB.mam_tails_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails, GLOB.mam_tails_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/mam_tails, GLOB.mam_tails_list)
|
||||
if(!GLOB.mam_ears_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_ears, GLOB.mam_ears_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/ears/mam_ears, GLOB.mam_ears_list)
|
||||
if(!GLOB.mam_snouts_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_snouts, GLOB.mam_snouts_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/snouts/mam_snouts, GLOB.mam_snouts_list)
|
||||
|
||||
//snowflake check so people's ckey features don't get randomly put on unmonkeys/spawns
|
||||
var/list/snowflake_mam_tails_list = list()
|
||||
for(var/mtpath in GLOB.mam_tails_list)
|
||||
var/datum/sprite_accessory/mam_tails/instance = GLOB.mam_tails_list[mtpath]
|
||||
var/datum/sprite_accessory/tails/mam_tails/instance = GLOB.mam_tails_list[mtpath]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(intendedspecies && S.recommended_species && !S.recommended_species.Find(intendedspecies))
|
||||
@@ -120,7 +120,7 @@
|
||||
snowflake_markings_list[S.name] = mmpath
|
||||
var/list/snowflake_ears_list = list()
|
||||
for(var/mepath in GLOB.mam_ears_list)
|
||||
var/datum/sprite_accessory/mam_ears/instance = GLOB.mam_ears_list[mepath]
|
||||
var/datum/sprite_accessory/ears/mam_ears/instance = GLOB.mam_ears_list[mepath]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(intendedspecies && S.recommended_species && !S.recommended_species.Find(intendedspecies))
|
||||
@@ -129,7 +129,7 @@
|
||||
snowflake_ears_list[S.name] = mepath
|
||||
var/list/snowflake_mam_snouts_list = list()
|
||||
for(var/mspath in GLOB.mam_snouts_list)
|
||||
var/datum/sprite_accessory/mam_snouts/instance = GLOB.mam_snouts_list[mspath]
|
||||
var/datum/sprite_accessory/snouts/mam_snouts/instance = GLOB.mam_snouts_list[mspath]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(intendedspecies && S.recommended_species && !S.recommended_species.Find(intendedspecies))
|
||||
@@ -138,7 +138,7 @@
|
||||
snowflake_mam_snouts_list[S.name] = mspath
|
||||
var/list/snowflake_ipc_antenna_list = list()
|
||||
for(var/mspath in GLOB.ipc_antennas_list)
|
||||
var/datum/sprite_accessory/mam_snouts/instance = GLOB.ipc_antennas_list[mspath]
|
||||
var/datum/sprite_accessory/snouts/mam_snouts/instance = GLOB.ipc_antennas_list[mspath]
|
||||
if(istype(instance, /datum/sprite_accessory))
|
||||
var/datum/sprite_accessory/S = instance
|
||||
if(intendedspecies && S.recommended_species && !S.recommended_species.Find(intendedspecies))
|
||||
@@ -264,6 +264,13 @@
|
||||
if(!findname(.))
|
||||
break
|
||||
|
||||
/proc/random_unique_ethereal_name(attempts_to_find_unique_name=10)
|
||||
for(var/i in 1 to attempts_to_find_unique_name)
|
||||
. = capitalize(ethereal_name())
|
||||
|
||||
if(!findname(.))
|
||||
break
|
||||
|
||||
/proc/random_unique_moth_name(attempts_to_find_unique_name=10)
|
||||
for(var/i in 1 to attempts_to_find_unique_name)
|
||||
. = capitalize(pick(GLOB.moth_first)) + " " + capitalize(pick(GLOB.moth_last))
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
else
|
||||
return "[pick(GLOB.lizard_names_female)]-[pick(GLOB.lizard_names_female)]"
|
||||
|
||||
/proc/ethereal_name()
|
||||
var/tempname = "[pick(GLOB.ethereal_names)] [random_capital_letter()]"
|
||||
if(prob(65))
|
||||
tempname += random_capital_letter()
|
||||
return tempname
|
||||
|
||||
/proc/plasmaman_name()
|
||||
return "[pick(GLOB.plasmaman_names)] \Roman[rand(1,99)]"
|
||||
|
||||
|
||||
@@ -358,7 +358,7 @@
|
||||
roundend_report.stylesheets = list()
|
||||
roundend_report.add_stylesheet("roundend", 'html/browser/roundend.css')
|
||||
roundend_report.add_stylesheet("font-awesome", 'html/font-awesome/css/all.min.css')
|
||||
roundend_report.open(0)
|
||||
roundend_report.open(FALSE)
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/personal_report(client/C, popcount)
|
||||
var/list/parts = list()
|
||||
@@ -402,7 +402,7 @@
|
||||
for (var/i in GLOB.ai_list)
|
||||
var/mob/living/silicon/ai/aiPlayer = i
|
||||
if(aiPlayer.mind)
|
||||
parts += "<b>[aiPlayer.name]</b> (Played by: <b>[aiPlayer.mind.key]</b>)'s laws [aiPlayer.stat != DEAD ? "at the end of the round" : "when it was <span class='redtext'>deactivated</span>"] were:"
|
||||
parts += "<b>[aiPlayer.name]</b>[aiPlayer.mind.hide_ckey ? "" : " (Played by: <b>[aiPlayer.mind.key]</b>)"]'s laws [aiPlayer.stat != DEAD ? "at the end of the round" : "when it was <span class='redtext'>deactivated</span>"] were:"
|
||||
parts += aiPlayer.laws.get_law_list(include_zeroth=TRUE)
|
||||
|
||||
parts += "<b>Total law changes: [aiPlayer.law_change_counter]</b>"
|
||||
@@ -413,14 +413,14 @@
|
||||
for(var/mob/living/silicon/robot/robo in aiPlayer.connected_robots)
|
||||
borg_num--
|
||||
if(robo.mind)
|
||||
robolist += "<b>[robo.name]</b> (Played by: <b>[robo.mind.key]</b>)[robo.stat == DEAD ? " <span class='redtext'>(Deactivated)</span>" : ""][borg_num ?", ":""]<br>"
|
||||
robolist += "<b>[robo.name]</b>[robo.mind.hide_ckey ? "" : " (Played by: <b>[robo.mind.key]</b>)"] [robo.stat == DEAD ? " <span class='redtext'>(Deactivated)</span>" : ""][borg_num ?", ":""]<br>"
|
||||
parts += "[robolist]"
|
||||
if(!borg_spacer)
|
||||
borg_spacer = TRUE
|
||||
|
||||
for (var/mob/living/silicon/robot/robo in GLOB.silicon_mobs)
|
||||
if (!robo.connected_ai && robo.mind)
|
||||
parts += "[borg_spacer?"<br>":""]<b>[robo.name]</b> (Played by: <b>[robo.mind.key]</b>) [(robo.stat != DEAD)? "<span class='greentext'>survived</span> as an AI-less borg!" : "was <span class='redtext'>unable to survive</span> the rigors of being a cyborg without an AI."] Its laws were:"
|
||||
parts += "[borg_spacer?"<br>":""]<b>[robo.name]</b>[robo.mind.hide_ckey ? "" : " (Played by: <b>[robo.mind.key]</b>)"] [(robo.stat != DEAD)? "<span class='greentext'>survived</span> as an AI-less borg!" : "was <span class='redtext'>unable to survive</span> the rigors of being a cyborg without an AI."] Its laws were:"
|
||||
|
||||
if(robo) //How the hell do we lose robo between here and the world messages directly above this?
|
||||
parts += robo.laws.get_law_list(include_zeroth=TRUE)
|
||||
@@ -529,7 +529,7 @@
|
||||
var/jobtext = ""
|
||||
if(ply.assigned_role)
|
||||
jobtext = " the <b>[ply.assigned_role]</b>"
|
||||
var/text = "<b>[ply.key]</b> was <b>[ply.name]</b>[jobtext] and"
|
||||
var/text = "<b>[ply.hide_ckey ? "<b>[ply.name]</b>[jobtext] " : "[ply.key]</b> was <b>[ply.name]</b>[jobtext] and "]"
|
||||
if(ply.current)
|
||||
if(ply.current.stat == DEAD)
|
||||
text += " <span class='redtext'>died</span>"
|
||||
|
||||
+21
-1
@@ -113,6 +113,22 @@
|
||||
else
|
||||
return trim(html_encode(name), max_length)
|
||||
|
||||
/**
|
||||
* stripped_multiline_input but reflects to the user instead if it's too big and returns null.
|
||||
*/
|
||||
/proc/stripped_multiline_input_or_reflect(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN, no_trim=FALSE)
|
||||
var/name = input(user, message, title, default) as message|null
|
||||
if(isnull(name)) // Return null if canceled.
|
||||
return null
|
||||
if(length(name) > max_length)
|
||||
to_chat(user, name)
|
||||
to_chat(user, "<span class='danger'>^^^----- The preceeding message has been DISCARDED for being over the maximum length of [max_length]. It has NOT been sent! -----^^^</span>")
|
||||
return null
|
||||
if(no_trim)
|
||||
return copytext(html_encode(name), 1, max_length)
|
||||
else
|
||||
return trim(html_encode(name), max_length)
|
||||
|
||||
#define NO_CHARS_DETECTED 0
|
||||
#define SPACES_DETECTED 1
|
||||
#define SYMBOLS_DETECTED 2
|
||||
@@ -760,6 +776,10 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
|
||||
else
|
||||
return "[number]\th"
|
||||
|
||||
|
||||
/proc/random_capital_letter()
|
||||
return uppertext(pick(GLOB.alphabet))
|
||||
|
||||
/proc/unintelligize(message)
|
||||
var/regex/word_boundaries = regex(@"\b[\S]+\b", "g")
|
||||
var/prefix = message[1]
|
||||
@@ -811,4 +831,4 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
|
||||
corrupted_text += pick(corruption_options)
|
||||
if(prob(15))
|
||||
corrupted_text += pick(corruption_options)
|
||||
return corrupted_text
|
||||
return corrupted_text
|
||||
|
||||
+14
-10
@@ -462,16 +462,14 @@
|
||||
else
|
||||
. = max(0, min(255, 138.5177312231 * log(temp - 10) - 305.0447927307))
|
||||
|
||||
/proc/fusionpower2text(power) //used when displaying fusion power on analyzers
|
||||
switch(power)
|
||||
if(0 to 5)
|
||||
return "low"
|
||||
if(5 to 20)
|
||||
return "mid"
|
||||
if(20 to 50)
|
||||
return "high"
|
||||
if(50 to INFINITY)
|
||||
return "super"
|
||||
/proc/instability2text(instability) //used when displaying fusion power on analyzers
|
||||
switch(instability)
|
||||
if(0 to 2)
|
||||
return "stable, meaning that its heat will always increase."
|
||||
if(2 to 3)
|
||||
return "metastable, meaning that its heat will trend upwards."
|
||||
if (3 to INFINITY)
|
||||
return "unstable, meaning that its heat will trend downwards."
|
||||
|
||||
/proc/color2hex(color) //web colors
|
||||
if(!color)
|
||||
@@ -620,6 +618,12 @@
|
||||
else //regex everything else (works for /proc too)
|
||||
return lowertext(replacetext("[the_type]", "[type2parent(the_type)]/", ""))
|
||||
|
||||
|
||||
/// Return html to load a url.
|
||||
/// for use inside of browse() calls to html assets that might be loaded on a cdn.
|
||||
/proc/url2htmlloader(url)
|
||||
return {"<html><head><meta http-equiv="refresh" content="0;URL='[url]'"/></head><body onLoad="parent.location='[url]'"></body></html>"}
|
||||
|
||||
/proc/strtohex(str)
|
||||
if(!istext(str)||!str)
|
||||
return
|
||||
|
||||
@@ -11,15 +11,28 @@
|
||||
#ifdef TESTING
|
||||
#define DATUMVAR_DEBUGGING_MODE
|
||||
|
||||
//#define GC_FAILURE_HARD_LOOKUP //makes paths that fail to GC call find_references before del'ing.
|
||||
//implies FIND_REF_NO_CHECK_TICK
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
//#define REFERENCE_TRACKING
|
||||
|
||||
//#define FIND_REF_NO_CHECK_TICK //Sets world.loop_checks to false and prevents find references from sleeping
|
||||
///Method of tracking references without using extools. Slower, kept to avoid over-reliance on extools.
|
||||
//#define LEGACY_REFERENCE_TRACKING
|
||||
#ifdef LEGACY_REFERENCE_TRACKING
|
||||
|
||||
///Use the legacy reference 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
|
||||
|
||||
//#define VISUALIZE_ACTIVE_TURFS //Highlights atmos active turfs in green
|
||||
#endif
|
||||
|
||||
#endif //ifdef TESTING
|
||||
//#define UNIT_TESTS //Enables unit tests via TEST_RUN_PARAMETER
|
||||
|
||||
#ifndef PRELOAD_RSC //set to:
|
||||
|
||||
@@ -9,4 +9,8 @@ GLOBAL_DATUM(start_state, /datum/station_state) // Used in round-end report
|
||||
|
||||
|
||||
//TODO clear this one up too
|
||||
GLOBAL_DATUM(cult_narsie, /obj/singularity/narsie/large/cult)
|
||||
GLOBAL_DATUM(cult_narsie, /obj/singularity/narsie/large/cult)
|
||||
|
||||
|
||||
///We want reality_smash_tracker to exist only once and be accesable from anywhere.
|
||||
GLOBAL_DATUM_INIT(reality_smash_track, /datum/reality_smash_tracker, new)
|
||||
|
||||
@@ -40,6 +40,46 @@ GLOBAL_LIST_EMPTY(insect_fluffs_list)
|
||||
GLOBAL_LIST_EMPTY(insect_markings_list)
|
||||
GLOBAL_LIST_EMPTY(caps_list)
|
||||
|
||||
//a way to index the right bodypart list given the type of bodypart
|
||||
GLOBAL_LIST_INIT(mutant_reference_list, list(
|
||||
"tail_lizard" = GLOB.tails_list_lizard,
|
||||
"waggingtail_lizard" = GLOB.animated_tails_list_lizard,
|
||||
"tail_human" = GLOB.tails_list_human,
|
||||
"waggingtail_human" = GLOB.animated_tails_list_human,
|
||||
"spines" = GLOB.spines_list,
|
||||
"waggingspines" = GLOB.animated_spines_list,
|
||||
"snout" = GLOB.snouts_list,
|
||||
"frills" = GLOB.frills_list,
|
||||
"horns" = GLOB.horns_list,
|
||||
"ears" = GLOB.ears_list,
|
||||
"body_markings" = GLOB.body_markings_list,
|
||||
"wings" = GLOB.wings_list,
|
||||
"wingsopen" = GLOB.wings_open_list,
|
||||
"deco_wings" = GLOB.deco_wings_list,
|
||||
"legs" = GLOB.legs_list,
|
||||
"insect_wings" = GLOB.insect_wings_list,
|
||||
"insect_fluff" = GLOB.insect_fluffs_list,
|
||||
"insect_markings" = GLOB.insect_markings_list,
|
||||
"caps" = GLOB.caps_list,
|
||||
"ipc_screen" = GLOB.ipc_screens_list,
|
||||
"ipc_antenna" = GLOB.ipc_antennas_list,
|
||||
"mam_tail" = GLOB.mam_tails_list,
|
||||
"mam_waggingtail" = GLOB.mam_tails_animated_list,
|
||||
"mam_body_markings" = GLOB.mam_body_markings_list,
|
||||
"mam_ears" = GLOB.mam_ears_list,
|
||||
"mam_snouts" = GLOB.mam_snouts_list,
|
||||
"taur" = GLOB.taur_list,
|
||||
"xenodorsal" = GLOB.xeno_dorsal_list,
|
||||
"xenohead" = GLOB.xeno_head_list,
|
||||
"xenotail" = GLOB.xeno_tail_list))
|
||||
|
||||
//references wag types to regular types, wings open to wings, etc
|
||||
GLOBAL_LIST_INIT(mutant_transform_list, list("wingsopen" = "wings",
|
||||
"waggingtail_human" = "tail_human",
|
||||
"waggingtail_lizard" = "tail_lizard",
|
||||
"waggingspines" = "spines",
|
||||
"mam_waggingtail" = "mam_tail"))
|
||||
|
||||
GLOBAL_LIST_INIT(ghost_forms_with_directions_list, list("ghost")) //stores the ghost forms that support directional sprites
|
||||
GLOBAL_LIST_INIT(ghost_forms_with_accessories_list, list("ghost")) //stores the ghost forms that support hair and other such things
|
||||
|
||||
@@ -231,4 +271,16 @@ GLOBAL_LIST_INIT(speech_verbs, list("default","says","gibbers", "states", "chitt
|
||||
|
||||
GLOBAL_LIST_INIT(roundstart_tongues, list("default","human tongue" = /obj/item/organ/tongue, "lizard tongue" = /obj/item/organ/tongue/lizard, "skeleton tongue" = /obj/item/organ/tongue/bone, "fly tongue" = /obj/item/organ/tongue/fly, "ipc tongue" = /obj/item/organ/tongue/robot/ipc))
|
||||
|
||||
//locked parts are those that your picked species requires to have
|
||||
//unlocked parts are those that anyone can choose on customisation regardless
|
||||
//parts not in unlocked, but in all, are thus locked
|
||||
GLOBAL_LIST_INIT(all_mutant_parts, list("tail_lizard" = "Tail", "mam_tail" = "Tail", "tail_human" = "Tail", "snout" = "Snout", "frills" = "Frills", "spines" = "Spines", "body_markings" = "Body Markings", "mam_body_markings" = "Species Markings" , "mam_ears" = "Ears", "ears" = "Ears", "mam_snouts" = "Snout", "legs" = "Legs", "deco_wings" = "Decorative Wings", "insect_wings" = "Insect Wings", "insect_fluff" = "Insect Fluff", "taur" = "Tauric Body", "insect_markings" = "Insect Markings", "wings" = "Wings", "xenohead" = "Caste Head", "xenotail" = "Tail", "xenodorsal" = "Dorsal Spines", "ipc_screen" = "Screen", "ipc_antenna" = "Antenna", "meat_type" = "Meat Type", "horns" = "Horns"))
|
||||
GLOBAL_LIST_INIT(unlocked_mutant_parts, list("horns", "insect_fluff"))
|
||||
//parts in either of the above two lists that require a second option that allows them to be coloured
|
||||
GLOBAL_LIST_INIT(colored_mutant_parts, list("insect_wings" = "wings_color", "deco_wings" = "wings_color", "horns" = "horns_color"))
|
||||
|
||||
//body ids that have greyscale sprites
|
||||
GLOBAL_LIST_INIT(greyscale_limb_types, list("human","moth","lizard","pod","plant","jelly","slime","golem","lum","stargazer","mush","ethereal","snail","c_golem","b_golem","mammal","xeno","ipc","insect","synthliz","avian","aquatic"))
|
||||
|
||||
//body ids that have prosthetic sprites
|
||||
GLOBAL_LIST_INIT(prosthetic_limb_types, list("xion","bishop","cybersolutions","grayson","hephaestus","nanotrasen","talon"))
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
GLOBAL_LIST_INIT(loadout_categories, list(
|
||||
LOADOUT_CATEGORY_BACKPACK = list(LOADOUT_SUBCATEGORY_BACKPACK_GENERAL, LOADOUT_SUBCATEGORY_BACKPACK_TOYS),
|
||||
LOADOUT_CATEGORY_NECK = list(LOADOUT_SUBCATEGORY_NECK_GENERAL, LOADOUT_SUBCATEGORY_NECK_TIE, LOADOUT_SUBCATEGORY_NECK_SCARVES),
|
||||
LOADOUT_CATEGORY_MASK = LOADOUT_SUBCATEGORIES_NONE,
|
||||
LOADOUT_CATEGORY_HANDS = LOADOUT_SUBCATEGORIES_NONE,
|
||||
LOADOUT_CATEGORY_UNIFORM = list(LOADOUT_SUBCATEGORY_UNIFORM_GENERAL, LOADOUT_SUBCATEGORY_UNIFORM_JOBS, LOADOUT_SUBCATEGORY_UNIFORM_SUITS, LOADOUT_SUBCATEGORY_UNIFORM_SKIRTS, LOADOUT_SUBCATEGORY_UNIFORM_DRESSES, LOADOUT_SUBCATEGORY_UNIFORM_SWEATERS, LOADOUT_SUBCATEGORY_UNIFORM_PANTS, LOADOUT_SUBCATEGORY_UNIFORM_SHORTS),
|
||||
LOADOUT_CATEGORY_SUIT = list(LOADOUT_SUBCATEGORY_SUIT_GENERAL, LOADOUT_SUBCATEGORY_SUIT_COATS, LOADOUT_SUBCATEGORY_SUIT_JACKETS, LOADOUT_SUBCATEGORY_SUIT_JOBS),
|
||||
LOADOUT_CATEGORY_HEAD = list(LOADOUT_SUBCATEGORY_HEAD_GENERAL, LOADOUT_SUBCATEGORY_HEAD_JOBS),
|
||||
LOADOUT_CATEGORY_SHOES = LOADOUT_SUBCATEGORIES_NONE,
|
||||
LOADOUT_CATEGORY_GLOVES = LOADOUT_SUBCATEGORIES_NONE,
|
||||
LOADOUT_CATEGORY_GLASSES = LOADOUT_SUBCATEGORIES_NONE,
|
||||
LOADOUT_CATEGORY_DONATOR = LOADOUT_SUBCATEGORIES_NONE
|
||||
))
|
||||
@@ -107,13 +107,8 @@ GLOBAL_LIST_INIT(maintenance_loot, list(
|
||||
/obj/item/toy/eightball = 1,
|
||||
/obj/item/reagent_containers/pill/floorpill = 1,
|
||||
/obj/item/reagent_containers/food/snacks/cannedpeaches/maint = 2,
|
||||
/obj/item/storage/daki = 3, //VERY IMPORTANT CIT CHANGE - adds bodypillows to maint
|
||||
/obj/item/storage/pill_bottle/penis_enlargement = 2,
|
||||
/obj/item/storage/pill_bottle/breast_enlargement = 2,
|
||||
/obj/item/clothing/shoes/wheelys = 1,
|
||||
/obj/item/clothing/shoes/kindleKicks = 1,
|
||||
/obj/item/autosurgeon/penis = 1,
|
||||
/obj/item/autosurgeon/testicles = 1,
|
||||
/obj/item/storage/box/marshmallow = 2,
|
||||
/obj/item/clothing/gloves/tackler/offbrand = 1,
|
||||
/obj/item/stack/sticky_tape = 1,
|
||||
|
||||
@@ -17,6 +17,7 @@ GLOBAL_LIST_INIT(golem_names, world.file2list("strings/names/golem.txt"))
|
||||
GLOBAL_LIST_INIT(moth_first, world.file2list("strings/names/moth_first.txt"))
|
||||
GLOBAL_LIST_INIT(moth_last, world.file2list("strings/names/moth_last.txt"))
|
||||
GLOBAL_LIST_INIT(plasmaman_names, world.file2list("strings/names/plasmaman.txt"))
|
||||
GLOBAL_LIST_INIT(ethereal_names, world.file2list("strings/names/ethereal.txt"))
|
||||
GLOBAL_LIST_INIT(posibrain_names, world.file2list("strings/names/posibrain.txt"))
|
||||
GLOBAL_LIST_INIT(nightmare_names, world.file2list("strings/names/nightmare.txt"))
|
||||
GLOBAL_LIST_INIT(megacarp_first_names, world.file2list("strings/names/megacarp1.txt"))
|
||||
|
||||
@@ -13,6 +13,7 @@ GLOBAL_LIST_EMPTY(deliverybeacontags) //list of all tags associated with d
|
||||
GLOBAL_LIST_EMPTY(nuke_list)
|
||||
GLOBAL_LIST_EMPTY(alarmdisplay) //list of all machines or programs that can display station alerts
|
||||
GLOBAL_LIST_EMPTY(singularities) //list of all singularities on the station (actually technically all engines)
|
||||
GLOBAL_LIST_EMPTY(grounding_rods) //list of all grounding rods on the station
|
||||
|
||||
GLOBAL_LIST(chemical_reactions_list) //list of all /datum/chemical_reaction datums. Used during chemical reactions
|
||||
GLOBAL_LIST(chemical_reagents_list) //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
|
||||
@@ -41,3 +42,6 @@ GLOBAL_LIST_EMPTY(ai_status_displays)
|
||||
|
||||
GLOBAL_LIST_EMPTY(mob_spawners) // All mob_spawn objects
|
||||
GLOBAL_LIST_EMPTY(alert_consoles) // Station alert consoles, /obj/machinery/computer/station_alert
|
||||
|
||||
//list of everyone playing rock paper scissors
|
||||
GLOBAL_LIST_EMPTY(rockpaperscissors_players)
|
||||
|
||||
@@ -37,7 +37,9 @@ GLOBAL_LIST_INIT(traits_by_type, list(
|
||||
"TRAIT_RESISTCOLD" = TRAIT_RESISTCOLD,
|
||||
"TRAIT_RESISTHIGHPRESSURE" = TRAIT_RESISTHIGHPRESSURE,
|
||||
"TRAIT_RESISTLOWPRESSURE" = TRAIT_RESISTLOWPRESSURE,
|
||||
"TRAIT_BOMBIMMUNE" = TRAIT_BOMBIMMUNE,
|
||||
"TRAIT_RADIMMUNE" = TRAIT_RADIMMUNE,
|
||||
"TRAIT_GENELESS" = TRAIT_GENELESS,
|
||||
"TRAIT_VIRUSIMMUNE" = TRAIT_VIRUSIMMUNE,
|
||||
"TRAIT_PIERCEIMMUNE" = TRAIT_PIERCEIMMUNE,
|
||||
"TRAIT_NODISMEMBER" = TRAIT_NODISMEMBER,
|
||||
|
||||
@@ -184,14 +184,23 @@
|
||||
|
||||
/obj/screen/alert/hot
|
||||
name = "Too Hot"
|
||||
desc = "You're flaming hot! Get somewhere cooler and take off any insulating clothing like a fire suit."
|
||||
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
|
||||
name = "Too Cold"
|
||||
desc = "You're freezing cold! Get somewhere warmer and take off any insulating clothing like a space suit."
|
||||
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
|
||||
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
|
||||
name = "Shivering"
|
||||
desc = "You're shivering! Get somewhere warmer and take off any insulating clothing like a space suit."
|
||||
|
||||
/obj/screen/alert/lowpressure
|
||||
name = "Low Pressure"
|
||||
desc = "The air around you is hazardously thin. A space suit would protect you."
|
||||
@@ -493,6 +502,16 @@ Recharging stations are available in robotics, the dormitory bathrooms, and the
|
||||
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
|
||||
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
|
||||
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
|
||||
name = "Hacked"
|
||||
|
||||
@@ -122,13 +122,13 @@
|
||||
if(pixel_size == pixels)
|
||||
return
|
||||
pixel_size = pixels
|
||||
cut_overlays(TRUE)
|
||||
cut_overlays()
|
||||
//our icon size is 32 pixels.
|
||||
transform = matrix((pixels - (VOLUMETRIC_STORAGE_BOX_BORDER_SIZE * 2)) / VOLUMETRIC_STORAGE_BOX_ICON_SIZE, 0, 0, 0, 1, 0)
|
||||
left.pixel_x = -((pixels - VOLUMETRIC_STORAGE_BOX_ICON_SIZE) * 0.5) - VOLUMETRIC_STORAGE_BOX_BORDER_SIZE
|
||||
right.pixel_x = ((pixels - VOLUMETRIC_STORAGE_BOX_ICON_SIZE) * 0.5) + VOLUMETRIC_STORAGE_BOX_BORDER_SIZE
|
||||
add_overlay(left, TRUE)
|
||||
add_overlay(right, TRUE)
|
||||
add_overlay(left)
|
||||
add_overlay(right)
|
||||
|
||||
/obj/screen/storage/volumetric_edge
|
||||
layer = VOLUMETRIC_STORAGE_BOX_LAYER
|
||||
|
||||
@@ -214,25 +214,24 @@
|
||||
else
|
||||
return clamp(w_class * 6, 10, 100) // Multiply the item's weight class by 6, then clamp the value between 10 and 100
|
||||
|
||||
/mob/living/proc/send_item_attack_message(obj/item/I, mob/living/user, hit_area, current_force)
|
||||
/mob/living/proc/send_item_attack_message(obj/item/I, mob/living/user, hit_area, obj/item/bodypart/hit_bodypart)
|
||||
var/message_verb = "attacked"
|
||||
if(I.attack_verb && I.attack_verb.len)
|
||||
if(length(I.attack_verb))
|
||||
message_verb = "[pick(I.attack_verb)]"
|
||||
if(current_force < I.force * FEEBLE_ATTACK_MSG_THRESHOLD)
|
||||
message_verb = "[pick("feebly", "limply", "saplessly")] [message_verb]"
|
||||
else if(!I.force)
|
||||
return
|
||||
var/message_hit_area = ""
|
||||
if(hit_area)
|
||||
message_hit_area = " in the [hit_area]"
|
||||
var/attack_message = "[src] has been [message_verb][message_hit_area] with [I]."
|
||||
var/attack_message = "[src] is [message_verb][message_hit_area] with [I]!"
|
||||
var/attack_message_local = "You're [message_verb][message_hit_area] with [I]!"
|
||||
if(user in viewers(src, null))
|
||||
attack_message = "[user] has [message_verb] [src][message_hit_area] with [I]!"
|
||||
attack_message = "[user] [message_verb] [src][message_hit_area] with [I]!"
|
||||
attack_message_local = "[user] [message_verb] you[message_hit_area] with [I]!"
|
||||
if(user == src)
|
||||
attack_message_local = "You [message_verb] yourself[message_hit_area] with [I]"
|
||||
visible_message("<span class='danger'>[attack_message]</span>",\
|
||||
"<span class='userdanger'>[attack_message]</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
if(hit_area == BODY_ZONE_HEAD)
|
||||
if(prob(2))
|
||||
playsound(src, 'sound/weapons/dink.ogg', 30, 1)
|
||||
"<span class='userdanger'>[attack_message_local]</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 1
|
||||
|
||||
/// How much stamina this takes to swing this is not for realism purposes hecc off.
|
||||
|
||||
@@ -32,4 +32,4 @@
|
||||
/mob/camera/blob/AltClickOn(atom/A) //Remove a blob
|
||||
var/turf/T = get_turf(A)
|
||||
if(T)
|
||||
remove_blob(T)
|
||||
remove_blob(T)
|
||||
|
||||
@@ -14,13 +14,15 @@
|
||||
var/list/modes // allowed modes
|
||||
var/list/gamemode_cache
|
||||
var/list/votable_modes // votable modes
|
||||
// var/list/ic_filter_regex
|
||||
var/list/storyteller_cache
|
||||
var/list/mode_names
|
||||
var/list/mode_reports
|
||||
var/list/mode_false_report_weight
|
||||
|
||||
var/motd
|
||||
// var/policy
|
||||
|
||||
// var/static/regex/ic_filter_regex
|
||||
|
||||
/datum/controller/configuration/proc/admin_reload()
|
||||
if(IsAdminAdvancedProcCall())
|
||||
@@ -50,6 +52,11 @@
|
||||
break
|
||||
loadmaplist(CONFIG_MAPS_FILE)
|
||||
LoadMOTD()
|
||||
// LoadPolicy()
|
||||
// LoadChatFilter()
|
||||
|
||||
if (Master)
|
||||
Master.OnConfigLoad()
|
||||
|
||||
/datum/controller/configuration/proc/full_wipe()
|
||||
if(IsAdminAdvancedProcCall())
|
||||
@@ -135,7 +142,7 @@
|
||||
|
||||
if(entry == "$include")
|
||||
if(!value)
|
||||
log_config("LINE [linenumber]: Invalid $include directive: [value]")
|
||||
log_config("LINE [linenumber]: Warning: Invalid $include directive: [value]")
|
||||
else
|
||||
LoadEntries(value, stack)
|
||||
++.
|
||||
@@ -143,7 +150,7 @@
|
||||
|
||||
var/datum/config_entry/E = _entries[entry]
|
||||
if(!E)
|
||||
log_config("LINE [linenumber]: Unknown setting: '[entry]'")
|
||||
log_config("LINE [linenumber]: Unknown setting in configuration: '[entry]'")
|
||||
continue
|
||||
|
||||
if(lockthis)
|
||||
@@ -153,9 +160,9 @@
|
||||
var/datum/config_entry/new_ver = entries_by_type[E.deprecated_by]
|
||||
var/new_value = E.DeprecationUpdate(value)
|
||||
var/good_update = istext(new_value)
|
||||
log_config("LINE [linenumber]: [entry] is deprecated and will be removed soon. Migrate to [new_ver.name]![good_update ? " Suggested new value is: [new_value]" : ""]")
|
||||
log_config("LINE [linenumber]: Entry [entry] is deprecated and will be removed soon. Migrate to [new_ver.name]![good_update ? " Suggested new value is: [new_value]" : ""]")
|
||||
if(!warned_deprecated_configs)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/message_admins, "This server is using deprecated configuration settings. Please check the logs and update accordingly."), 0)
|
||||
DelayedMessageAdmins("This server is using deprecated configuration settings. Please check the logs and update accordingly.")
|
||||
warned_deprecated_configs = TRUE
|
||||
if(good_update)
|
||||
value = new_value
|
||||
@@ -163,7 +170,7 @@
|
||||
else
|
||||
warning("[new_ver.type] is deprecated but gave no proper return for DeprecationUpdate()")
|
||||
|
||||
var/validated = E.ValidateAndSet(value, TRUE)
|
||||
var/validated = E.ValidateAndSet(value)
|
||||
if(!validated)
|
||||
log_config("LINE [linenumber]: Failed to validate setting \"[value]\" for [entry]")
|
||||
else
|
||||
@@ -195,13 +202,7 @@
|
||||
statclick = new/obj/effect/statclick/debug(null, "Edit", src)
|
||||
stat("[name]:", statclick)
|
||||
|
||||
/datum/controller/configuration/proc/Get(entry_type)
|
||||
var/datum/config_entry/E = GetEntryDatum(entry_type)
|
||||
if((E.protection & CONFIG_ENTRY_HIDDEN) && IsAdminAdvancedProcCall() && GLOB.LastAdminCalledProc == "Get" && GLOB.LastAdminCalledTargetRef == "[REF(src)]")
|
||||
log_admin_private("Config access of [entry_type] attempted by [key_name(usr)]")
|
||||
return
|
||||
return E.config_entry_value
|
||||
|
||||
/// Your typical GET but returns a config.
|
||||
/datum/controller/configuration/proc/GetEntryDatum(entry_type)
|
||||
var/datum/config_entry/E = entry_type
|
||||
var/entry_is_abstract = initial(E.abstract_type) == entry_type
|
||||
@@ -210,8 +211,24 @@
|
||||
E = entries_by_type[entry_type]
|
||||
if(!E)
|
||||
CRASH("Missing config entry for [entry_type]!")
|
||||
if((E.protection & CONFIG_ENTRY_HIDDEN) && IsAdminAdvancedProcCall() && GLOB.LastAdminCalledProc == "Get" && GLOB.LastAdminCalledTargetRef == "[REF(src)]")
|
||||
log_admin_private("Config access of [entry_type] attempted by [key_name(usr)]")
|
||||
return
|
||||
return E
|
||||
|
||||
/datum/controller/configuration/proc/Get(entry_type)
|
||||
var/datum/config_entry/E = entry_type
|
||||
var/entry_is_abstract = initial(E.abstract_type) == entry_type
|
||||
if(entry_is_abstract)
|
||||
CRASH("Tried to retrieve an abstract config_entry: [entry_type]")
|
||||
E = entries_by_type[entry_type]
|
||||
if(!E)
|
||||
CRASH("Missing config entry for [entry_type]!")
|
||||
if((E.protection & CONFIG_ENTRY_HIDDEN) && IsAdminAdvancedProcCall() && GLOB.LastAdminCalledProc == "Get" && GLOB.LastAdminCalledTargetRef == "[REF(src)]")
|
||||
log_admin_private("Config access of [entry_type] attempted by [key_name(usr)]")
|
||||
return
|
||||
return E.config_entry_value
|
||||
|
||||
/datum/controller/configuration/proc/Set(entry_type, new_val)
|
||||
var/datum/config_entry/E = entry_type
|
||||
var/entry_is_abstract = initial(E.abstract_type) == entry_type
|
||||
@@ -236,7 +253,6 @@
|
||||
for(var/T in gamemode_cache)
|
||||
// I wish I didn't have to instance the game modes in order to look up
|
||||
// their information, but it is the only way (at least that I know of).
|
||||
// for future reference: just use initial() lol
|
||||
var/datum/game_mode/M = new T()
|
||||
|
||||
if(M.config_tag)
|
||||
@@ -258,7 +274,37 @@
|
||||
var/tm_info = GLOB.revdata.GetTestMergeInfo()
|
||||
if(motd || tm_info)
|
||||
motd = motd ? "[motd]<br>[tm_info]" : tm_info
|
||||
/*
|
||||
Policy file should be a json file with a single object.
|
||||
Value is raw html.
|
||||
|
||||
Possible keywords :
|
||||
Job titles / Assigned roles (ghost spawners for example) : Assistant , Captain , Ash Walker
|
||||
Mob types : /mob/living/simple_animal/hostile/carp
|
||||
Antagonist types : /datum/antagonist/highlander
|
||||
Species types : /datum/species/lizard
|
||||
special keywords defined in _DEFINES/admin.dm
|
||||
|
||||
Example config:
|
||||
{
|
||||
"Assistant" : "Don't kill everyone",
|
||||
"/datum/antagonist/highlander" : "<b>Kill everyone</b>",
|
||||
"Ash Walker" : "Kill all spacemans"
|
||||
}
|
||||
|
||||
*/
|
||||
/*
|
||||
/datum/controller/configuration/proc/LoadPolicy()
|
||||
policy = list()
|
||||
var/rawpolicy = file2text("[directory]/policy.json")
|
||||
if(rawpolicy)
|
||||
var/parsed = safe_json_decode(rawpolicy)
|
||||
if(!parsed)
|
||||
log_config("JSON parsing failure for policy.json")
|
||||
DelayedMessageAdmins("JSON parsing failure for policy.json")
|
||||
else
|
||||
policy = parsed
|
||||
*/
|
||||
/datum/controller/configuration/proc/loadmaplist(filename)
|
||||
log_config("Loading config file [filename]...")
|
||||
filename = "[directory]/[filename]"
|
||||
@@ -305,6 +351,8 @@
|
||||
currentmap.voteweight = text2num(data)
|
||||
if ("default","defaultmap")
|
||||
defaultmap = currentmap
|
||||
//if ("votable")
|
||||
// currentmap.votable = TRUE
|
||||
if ("endmap")
|
||||
LAZYINITLIST(maplist)
|
||||
maplist[currentmap.map_name] = currentmap
|
||||
@@ -326,6 +374,7 @@
|
||||
return new T
|
||||
return new /datum/game_mode/extended()
|
||||
|
||||
/// For dynamic.
|
||||
/datum/controller/configuration/proc/pick_storyteller(storyteller_name)
|
||||
for(var/T in storyteller_cache)
|
||||
var/datum/dynamic_storyteller/S = T
|
||||
@@ -334,6 +383,32 @@
|
||||
return T
|
||||
return /datum/dynamic_storyteller/classic
|
||||
|
||||
/// Same with this
|
||||
/datum/controller/configuration/proc/get_runnable_storytellers()
|
||||
var/list/datum/dynamic_storyteller/runnable_storytellers = new
|
||||
var/list/probabilities = Get(/datum/config_entry/keyed_list/storyteller_weight)
|
||||
var/list/repeated_mode_adjust = Get(/datum/config_entry/number_list/repeated_mode_adjust)
|
||||
var/list/min_player_counts = Get(/datum/config_entry/keyed_list/storyteller_min_players)
|
||||
for(var/T in storyteller_cache)
|
||||
var/datum/dynamic_storyteller/S = T
|
||||
var/config_tag = initial(S.config_tag)
|
||||
var/probability = (config_tag in probabilities) ? probabilities[config_tag] : initial(S.weight)
|
||||
var/min_players = (config_tag in min_player_counts) ? min_player_counts[config_tag] : initial(S.min_players)
|
||||
if(probability <= 0)
|
||||
continue
|
||||
if(length(GLOB.player_list) < min_players)
|
||||
continue
|
||||
if(SSpersistence.saved_storytellers.len == repeated_mode_adjust.len)
|
||||
var/name = initial(S.name)
|
||||
var/recent_round = min(SSpersistence.saved_storytellers.Find(name),3)
|
||||
var/adjustment = 0
|
||||
while(recent_round)
|
||||
adjustment += repeated_mode_adjust[recent_round]
|
||||
recent_round = SSpersistence.saved_modes.Find(name,recent_round+1,0)
|
||||
probability *= ((100-adjustment)/100)
|
||||
runnable_storytellers[S] = probability
|
||||
return runnable_storytellers
|
||||
|
||||
/datum/controller/configuration/proc/get_runnable_modes()
|
||||
var/list/datum/game_mode/runnable_modes = new
|
||||
var/list/probabilities = Get(/datum/config_entry/keyed_list/probability)
|
||||
@@ -367,32 +442,6 @@
|
||||
runnable_modes[M] = final_weight
|
||||
return runnable_modes
|
||||
|
||||
/datum/controller/configuration/proc/get_runnable_storytellers()
|
||||
var/list/datum/dynamic_storyteller/runnable_storytellers = new
|
||||
var/list/probabilities = Get(/datum/config_entry/keyed_list/storyteller_weight)
|
||||
var/list/repeated_mode_adjust = Get(/datum/config_entry/number_list/repeated_mode_adjust)
|
||||
var/list/min_player_counts = Get(/datum/config_entry/keyed_list/storyteller_min_players)
|
||||
for(var/T in storyteller_cache)
|
||||
var/datum/dynamic_storyteller/S = T
|
||||
var/config_tag = initial(S.config_tag)
|
||||
var/probability = (config_tag in probabilities) ? probabilities[config_tag] : initial(S.weight)
|
||||
var/min_players = (config_tag in min_player_counts) ? min_player_counts[config_tag] : initial(S.min_players)
|
||||
if(probability <= 0)
|
||||
continue
|
||||
if(length(GLOB.player_list) < min_players)
|
||||
continue
|
||||
if(SSpersistence.saved_storytellers.len == repeated_mode_adjust.len)
|
||||
var/name = initial(S.name)
|
||||
var/recent_round = min(SSpersistence.saved_storytellers.Find(name),3)
|
||||
var/adjustment = 0
|
||||
while(recent_round)
|
||||
adjustment += repeated_mode_adjust[recent_round]
|
||||
recent_round = SSpersistence.saved_modes.Find(name,recent_round+1,0)
|
||||
probability *= ((100-adjustment)/100)
|
||||
runnable_storytellers[S] = probability
|
||||
return runnable_storytellers
|
||||
|
||||
|
||||
/datum/controller/configuration/proc/get_runnable_midround_modes(crew)
|
||||
var/list/datum/game_mode/runnable_modes = new
|
||||
var/list/probabilities = Get(/datum/config_entry/keyed_list/probability)
|
||||
@@ -418,7 +467,6 @@
|
||||
/*
|
||||
/datum/controller/configuration/proc/LoadChatFilter()
|
||||
var/list/in_character_filter = list()
|
||||
|
||||
if(!fexists("[directory]/in_character_filter.txt"))
|
||||
return
|
||||
log_config("Loading config file in_character_filter.txt...")
|
||||
@@ -428,8 +476,8 @@
|
||||
if(findtextEx(line,"#",1,2))
|
||||
continue
|
||||
in_character_filter += REGEX_QUOTE(line)
|
||||
|
||||
ic_filter_regex = in_character_filter.len ? regex("\\b([jointext(in_character_filter, "|")])\\b", "i") : null
|
||||
|
||||
syncChatRegexes()
|
||||
*/
|
||||
//Message admins when you can.
|
||||
/datum/controller/configuration/proc/DelayedMessageAdmins(text)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/message_admins, text), 0)
|
||||
|
||||
@@ -98,6 +98,11 @@
|
||||
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
|
||||
@@ -529,4 +534,4 @@
|
||||
config_entry_value = 6
|
||||
|
||||
/datum/config_entry/number/max_shuttle_size
|
||||
config_entry_value = 250
|
||||
config_entry_value = 500
|
||||
|
||||
@@ -368,6 +368,10 @@
|
||||
|
||||
/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
|
||||
@@ -384,6 +388,10 @@
|
||||
/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
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/datum/config_entry/keyed_list/external_rsc_urls
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_FLAG
|
||||
|
||||
/datum/config_entry/flag/asset_simple_preload
|
||||
|
||||
/datum/config_entry/string/asset_transport
|
||||
/datum/config_entry/string/asset_transport/ValidateAndSet(str_val)
|
||||
return (lowertext(str_val) in list("simple", "webroot")) && ..(lowertext(str_val))
|
||||
|
||||
/datum/config_entry/string/asset_cdn_webroot
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/string/asset_cdn_webroot/ValidateAndSet(str_var)
|
||||
if (!str_var || trim(str_var) == "")
|
||||
return FALSE
|
||||
if (str_var && str_var[length(str_var)] != "/")
|
||||
str_var += "/"
|
||||
return ..(str_var)
|
||||
|
||||
/datum/config_entry/string/asset_cdn_url
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
default = null
|
||||
|
||||
/datum/config_entry/string/asset_cdn_url/ValidateAndSet(str_var)
|
||||
if (!str_var || trim(str_var) == "")
|
||||
return FALSE
|
||||
if (str_var && str_var[length(str_var)] != "/")
|
||||
str_var += "/"
|
||||
return ..(str_var)
|
||||
@@ -16,4 +16,4 @@
|
||||
|
||||
/datum/controller/proc/Recover()
|
||||
|
||||
/datum/controller/proc/stat_entry()
|
||||
/datum/controller/proc/stat_entry()
|
||||
|
||||
@@ -76,7 +76,11 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
// Highlander-style: there can only be one! Kill off the old and replace it with the new.
|
||||
|
||||
if(!random_seed)
|
||||
random_seed = (TEST_RUN_PARAMETER in world.params) ? 29051994 : rand(1, 1e9)
|
||||
#ifdef UNIT_TESTS
|
||||
random_seed = 29051994
|
||||
#else
|
||||
random_seed = rand(1, 1e9)
|
||||
#endif
|
||||
rand_seed(random_seed)
|
||||
|
||||
var/list/_subsystems = list()
|
||||
@@ -184,9 +188,6 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
if(delay)
|
||||
sleep(delay)
|
||||
|
||||
if(tgs_prime)
|
||||
world.TgsInitializationComplete()
|
||||
|
||||
if(init_sss)
|
||||
init_subtypes(/datum/controller/subsystem, subsystems)
|
||||
|
||||
@@ -219,6 +220,9 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
world.fps = CONFIG_GET(number/fps)
|
||||
var/initialized_tod = REALTIMEOFDAY
|
||||
|
||||
if(tgs_prime)
|
||||
world.TgsInitializationComplete()
|
||||
|
||||
if(sleep_offline_after_initializations)
|
||||
world.sleep_offline = TRUE
|
||||
sleep(1)
|
||||
@@ -643,3 +647,8 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
processing = CONFIG_GET(number/mc_tick_rate/base_mc_tick_rate)
|
||||
else if (client_count > CONFIG_GET(number/mc_tick_rate/high_pop_mc_mode_amount))
|
||||
processing = CONFIG_GET(number/mc_tick_rate/high_pop_mc_tick_rate)
|
||||
|
||||
/datum/controller/master/proc/OnConfigLoad()
|
||||
for (var/thing in subsystems)
|
||||
var/datum/controller/subsystem/SS = thing
|
||||
SS.OnConfigLoad()
|
||||
|
||||
@@ -1,39 +1,91 @@
|
||||
/**
|
||||
* # Subsystem base class
|
||||
*
|
||||
* Defines a subsystem to be managed by the [Master Controller][/datum/controller/master]
|
||||
*
|
||||
* Simply define a child of this subsystem, using the [SUBSYSTEM_DEF] macro, and the MC will handle registration.
|
||||
* Changing the name is required
|
||||
**/
|
||||
|
||||
/datum/controller/subsystem
|
||||
// Metadata; you should define these.
|
||||
name = "fire coderbus" //name of the subsystem
|
||||
var/init_order = INIT_ORDER_DEFAULT //order of initialization. Higher numbers are initialized first, lower numbers later. Use defines in __DEFINES/subsystems.dm for easy understanding of order.
|
||||
var/wait = 20 //time to wait (in deciseconds) between each call to fire(). Must be a positive integer.
|
||||
var/priority = FIRE_PRIORITY_DEFAULT //When mutiple subsystems need to run in the same tick, higher priority subsystems will run first and be given a higher share of the tick before MC_TICK_CHECK triggers a sleep
|
||||
|
||||
var/flags = 0 //see MC.dm in __DEFINES Most flags must be set on world start to take full effect. (You can also restart the mc to force them to process again)
|
||||
/// Name of the subsystem - you must change this
|
||||
name = "fire coderbus"
|
||||
|
||||
var/initialized = FALSE //set to TRUE after it has been initialized, will obviously never be set if the subsystem doesn't initialize
|
||||
/// Order of initialization. Higher numbers are initialized first, lower numbers later. Use or create defines such as [INIT_ORDER_DEFAULT] so we can see the order in one file.
|
||||
var/init_order = INIT_ORDER_DEFAULT
|
||||
|
||||
//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 the list
|
||||
/// Time to wait (in deciseconds) between each call to fire(). Must be a positive integer.
|
||||
var/wait = 20
|
||||
|
||||
/// Priority Weight: When mutiple subsystems need to run in the same tick, higher priority subsystems will be given a higher share of the tick before MC_TICK_CHECK triggers a sleep, higher priority subsystems also run before lower priority subsystems
|
||||
var/priority = FIRE_PRIORITY_DEFAULT
|
||||
|
||||
/// [Subsystem Flags][SS_NO_INIT] to control binary behavior. Flags must be set at compile time or before preinit finishes to take full effect. (You can also restart the mc to force them to process again)
|
||||
var/flags = 0
|
||||
|
||||
/// This var is set to TRUE after the subsystem has been initialized.
|
||||
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
|
||||
var/can_fire = TRUE
|
||||
|
||||
// Bookkeeping variables; probably shouldn't mess with these.
|
||||
var/last_fire = 0 //last world.time we called fire()
|
||||
var/next_fire = 0 //scheduled world.time for next fire()
|
||||
var/cost = 0 //average time to execute
|
||||
var/tick_usage = 0 //average tick usage
|
||||
var/tick_overrun = 0 //average tick overrun
|
||||
var/state = SS_IDLE //tracks the current state of the ss, running, paused, etc.
|
||||
var/paused_ticks = 0 //ticks this ss is taking to run right now.
|
||||
var/paused_tick_usage //total tick_usage of all of our runs while pausing this run
|
||||
var/ticks = 1 //how many ticks does this ss take to run on avg.
|
||||
var/times_fired = 0 //number of times we have called fire()
|
||||
var/queued_time = 0 //time we entered the queue, (for timing and priority reasons)
|
||||
var/queued_priority //we keep a running total to make the math easier, if priority changes mid-fire that would break our running total, so we store it here
|
||||
//linked list stuff for the queue
|
||||
var/datum/controller/subsystem/queue_next
|
||||
var/datum/controller/subsystem/queue_prev
|
||||
|
||||
///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/static/list/failure_strikes //How many times we suspect a subsystem type has crashed the MC, 3 strikes and you're out!
|
||||
/*
|
||||
* The following variables are managed by the MC and should not be modified directly.
|
||||
*/
|
||||
|
||||
/// Last world.time the subsystem completed a run (as in wasn't paused by [MC_TICK_CHECK])
|
||||
var/last_fire = 0
|
||||
|
||||
/// Scheduled world.time for next fire()
|
||||
var/next_fire = 0
|
||||
|
||||
/// Running average of the amount of milliseconds it takes the subsystem to complete a run (including all resumes but not the time spent paused)
|
||||
var/cost = 0
|
||||
|
||||
/// Running average of the amount of tick usage in percents of a tick it takes the subsystem to complete a run
|
||||
var/tick_usage = 0
|
||||
|
||||
/// Running average of the amount of tick usage (in percents of a game tick) the subsystem has spent past its allocated time without pausing
|
||||
var/tick_overrun = 0
|
||||
|
||||
/// Tracks the current execution state of the subsystem. Used to handle subsystems that sleep in fire so the mc doesn't run them again while they are sleeping
|
||||
var/state = SS_IDLE
|
||||
|
||||
/// Tracks how many fires the subsystem has consecutively paused on in the current run
|
||||
var/paused_ticks = 0
|
||||
|
||||
/// Tracks how much of a tick the subsystem has consumed in the current run
|
||||
var/paused_tick_usage
|
||||
|
||||
/// Tracks how many fires the subsystem takes to complete a run on average.
|
||||
var/ticks = 1
|
||||
|
||||
/// Tracks the amount of completed runs for the subsystem
|
||||
var/times_fired = 0
|
||||
|
||||
/// Time the subsystem entered the queue, (for timing and priority reasons)
|
||||
var/queued_time = 0
|
||||
|
||||
/// Priority at the time the subsystem entered the queue. Needed to avoid changes in priority (by admins and the like) from breaking things.
|
||||
var/queued_priority
|
||||
|
||||
/// How many times we suspect a subsystem type has crashed the MC, 3 strikes and you're out!
|
||||
var/static/list/failure_strikes
|
||||
|
||||
/// Next subsystem in the queue of subsystems to run this tick
|
||||
var/datum/controller/subsystem/queue_next
|
||||
/// Previous subsystem in the queue of subsystems to run this tick
|
||||
var/datum/controller/subsystem/queue_prev
|
||||
|
||||
//Do not blindly add vars here to the bottom, put it where it goes above
|
||||
//If your var only has two values, put it in as a flag.
|
||||
|
||||
|
||||
//Do not override
|
||||
///datum/controller/subsystem/New()
|
||||
@@ -46,6 +98,7 @@
|
||||
|
||||
//This is used so the mc knows when the subsystem sleeps. do not override.
|
||||
/datum/controller/subsystem/proc/ignite(resumed = 0)
|
||||
SHOULD_NOT_OVERRIDE(TRUE)
|
||||
set waitfor = 0
|
||||
. = SS_SLEEPING
|
||||
fire(resumed)
|
||||
@@ -87,7 +140,7 @@
|
||||
queue_node_flags = queue_node.flags
|
||||
|
||||
if (queue_node_flags & SS_TICKER)
|
||||
if (!(SS_flags & SS_TICKER))
|
||||
if ((SS_flags & (SS_TICKER|SS_BACKGROUND)) != SS_TICKER)
|
||||
continue
|
||||
if (queue_node_priority < SS_priority)
|
||||
break
|
||||
@@ -155,6 +208,9 @@
|
||||
if(SS_SLEEPING)
|
||||
state = SS_PAUSING
|
||||
|
||||
/// Called after the config has been loaded or reloaded.
|
||||
/datum/controller/subsystem/proc/OnConfigLoad()
|
||||
|
||||
/datum/controller/subsystem/proc/subsystem_log(msg)
|
||||
return log_subsystem(name, msg)
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ SUBSYSTEM_DEF(acid)
|
||||
|
||||
if(O.acid_level && O.acid_processing())
|
||||
else
|
||||
O.cut_overlay(GLOB.acid_overlay, TRUE)
|
||||
O.update_icon()
|
||||
processing -= O
|
||||
|
||||
if (MC_TICK_CHECK)
|
||||
|
||||
@@ -4,6 +4,23 @@ SUBSYSTEM_DEF(assets)
|
||||
flags = SS_NO_FIRE
|
||||
var/list/cache = list()
|
||||
var/list/preload = list()
|
||||
var/datum/asset_transport/transport = new()
|
||||
|
||||
/datum/controller/subsystem/assets/OnConfigLoad()
|
||||
var/newtransporttype = /datum/asset_transport
|
||||
switch (CONFIG_GET(string/asset_transport))
|
||||
if ("webroot")
|
||||
newtransporttype = /datum/asset_transport/webroot
|
||||
|
||||
if (newtransporttype == transport.type)
|
||||
return
|
||||
|
||||
var/datum/asset_transport/newtransport = new newtransporttype ()
|
||||
if (newtransport.validate_config())
|
||||
transport = newtransport
|
||||
transport.Load()
|
||||
|
||||
|
||||
|
||||
/datum/controller/subsystem/assets/Initialize(timeofday)
|
||||
for(var/type in typesof(/datum/asset))
|
||||
@@ -11,8 +28,6 @@ SUBSYSTEM_DEF(assets)
|
||||
if (type != initial(A._abstract))
|
||||
get_asset_datum(type)
|
||||
|
||||
preload = cache.Copy() //don't preload assets generated during the round
|
||||
transport.Initialize(cache)
|
||||
|
||||
for(var/client/C in GLOB.clients)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/getFilesSlow, C, preload, FALSE), 10)
|
||||
..()
|
||||
|
||||
@@ -90,6 +90,8 @@ SUBSYSTEM_DEF(atoms)
|
||||
qdeleted = TRUE
|
||||
else if(!(A.flags_1 & INITIALIZED_1))
|
||||
BadInitializeCalls[the_type] |= BAD_INIT_DIDNT_INIT
|
||||
else
|
||||
SEND_SIGNAL(A,COMSIG_ATOM_AFTER_SUCCESSFUL_INITIALIZE)
|
||||
|
||||
return qdeleted || QDELING(A)
|
||||
|
||||
|
||||
@@ -5,91 +5,35 @@ SUBSYSTEM_DEF(chat)
|
||||
priority = FIRE_PRIORITY_CHAT
|
||||
init_order = INIT_ORDER_CHAT
|
||||
|
||||
var/list/payload = list()
|
||||
|
||||
var/list/payload_by_client = list()
|
||||
|
||||
/datum/controller/subsystem/chat/fire()
|
||||
for(var/i in payload)
|
||||
var/client/C = i
|
||||
C << output(payload[C], "browseroutput:output")
|
||||
payload -= C
|
||||
|
||||
for(var/key in payload_by_client)
|
||||
var/client/client = key
|
||||
var/payload = payload_by_client[key]
|
||||
payload_by_client -= key
|
||||
if(client)
|
||||
// Send to tgchat
|
||||
client.tgui_panel?.window.send_message("chat/message", payload)
|
||||
// Send to old chat
|
||||
for(var/msg in payload)
|
||||
SEND_TEXT(client, msg["text"])
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
|
||||
/datum/controller/subsystem/chat/proc/queue(target, message, handle_whitespace = TRUE, trailing_newline = TRUE, confidential = TRUE)
|
||||
if(!target || !message)
|
||||
return
|
||||
|
||||
if(!istext(message))
|
||||
stack_trace("to_chat called with invalid input type")
|
||||
return
|
||||
|
||||
if(target == world)
|
||||
target = GLOB.clients
|
||||
|
||||
//Some macros remain in the string even after parsing and fuck up the eventual output
|
||||
var/original_message = message
|
||||
|
||||
//url_encode it TWICE, this way any UTF-8 characters are able to be decoded by the Javascript.
|
||||
//Do the double-encoding here to save nanoseconds
|
||||
var/twiceEncoded
|
||||
|
||||
/datum/controller/subsystem/chat/proc/queue(target, text, flags)
|
||||
if(islist(target))
|
||||
var/sanitized_message = FALSE
|
||||
for(var/I in target)
|
||||
var/client/C = CLIENT_FROM_VAR(I) //Grab us a client if possible
|
||||
|
||||
if(!C)
|
||||
continue
|
||||
|
||||
//Send it to the old style output window.
|
||||
SEND_TEXT(C, original_message)
|
||||
|
||||
if(!C?.chatOutput || C.chatOutput.broken) //A player who hasn't updated his skin file.
|
||||
continue
|
||||
|
||||
if(!sanitized_message)
|
||||
message = replacetext(message, "\improper", "")
|
||||
message = replacetext(message, "\proper", "")
|
||||
if(handle_whitespace)
|
||||
message = replacetext(message, "\n", "<br>")
|
||||
message = replacetext(message, "\t", "[FOURSPACES][FOURSPACES]")
|
||||
if (trailing_newline)
|
||||
message += "<br>"
|
||||
twiceEncoded = url_encode(url_encode(message))
|
||||
sanitized_message = TRUE
|
||||
|
||||
if(!C.chatOutput.loaded) //Client still loading, put their messages in a queue
|
||||
C.chatOutput.messageQueue += message
|
||||
continue
|
||||
|
||||
payload[C] += twiceEncoded
|
||||
|
||||
else
|
||||
var/client/C = CLIENT_FROM_VAR(target) //Grab us a client if possible
|
||||
|
||||
if(!C)
|
||||
return
|
||||
|
||||
//Send it to the old style output window.
|
||||
SEND_TEXT(C, original_message)
|
||||
|
||||
if(!C?.chatOutput || C.chatOutput.broken) //A player who hasn't updated his skin file.
|
||||
return
|
||||
|
||||
message = replacetext(message, "\improper", "")
|
||||
message = replacetext(message, "\proper", "")
|
||||
if(handle_whitespace)
|
||||
message = replacetext(message, "\n", "<br>")
|
||||
message = replacetext(message, "\t", "[FOURSPACES][FOURSPACES]")
|
||||
if (trailing_newline)
|
||||
message += "<br>"
|
||||
twiceEncoded = url_encode(url_encode(message))
|
||||
|
||||
if(!C.chatOutput.loaded) //Client still loading, put their messages in a queue
|
||||
C.chatOutput.messageQueue += message
|
||||
return
|
||||
|
||||
payload[C] += twiceEncoded
|
||||
for(var/_target in target)
|
||||
var/client/client = CLIENT_FROM_VAR(_target)
|
||||
if(client)
|
||||
LAZYADD(payload_by_client[client], list(list(
|
||||
"text" = text,
|
||||
"flags" = flags,
|
||||
)))
|
||||
return
|
||||
var/client/client = CLIENT_FROM_VAR(target)
|
||||
if(client)
|
||||
LAZYADD(payload_by_client[client], list(list(
|
||||
"text" = text,
|
||||
"flags" = flags,
|
||||
)))
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
PROCESSING_SUBSYSTEM_DEF(fluids)
|
||||
name = "Fluids"
|
||||
wait = 20
|
||||
stat_tag = "FD" //its actually Fluid Ducts
|
||||
flags = SS_NO_INIT | SS_TICKER
|
||||
@@ -25,7 +25,7 @@ SUBSYSTEM_DEF(garbage)
|
||||
//Queue
|
||||
var/list/queues
|
||||
|
||||
#ifdef TESTING
|
||||
#ifdef LEGACY_REFERENCE_TRACKING
|
||||
var/list/reference_find_on_fail = list()
|
||||
var/list/reference_find_on_fail_types = list()
|
||||
#endif
|
||||
@@ -134,7 +134,7 @@ SUBSYSTEM_DEF(garbage)
|
||||
++gcedlasttick
|
||||
++totalgcs
|
||||
pass_counts[level]++
|
||||
#ifdef TESTING
|
||||
#ifdef LEGACY_REFERENCE_TRACKING
|
||||
reference_find_on_fail -= refID //It's deleted we don't care anymore.
|
||||
#endif
|
||||
if (MC_TICK_CHECK)
|
||||
@@ -145,7 +145,9 @@ SUBSYSTEM_DEF(garbage)
|
||||
fail_counts[level]++
|
||||
switch (level)
|
||||
if (GC_QUEUE_CHECK)
|
||||
#ifdef TESTING
|
||||
#ifdef REFERENCE_TRACKING
|
||||
D.find_references()
|
||||
#elif defined(LEGACY_REFERENCE_TRACKING)
|
||||
if(reference_find_on_fail[refID])
|
||||
D.find_references()
|
||||
#ifdef GC_FAILURE_HARD_LOOKUP
|
||||
@@ -156,7 +158,19 @@ SUBSYSTEM_DEF(garbage)
|
||||
#endif
|
||||
var/type = D.type
|
||||
var/datum/qdel_item/I = items[type]
|
||||
#ifdef TESTING
|
||||
log_world("## TESTING: GC: -- \ref[D] | [type] was unable to be GC'd --")
|
||||
for(var/c in GLOB.admins) //Using testing() here would fill the logs with ADMIN_VV garbage
|
||||
var/client/admin = c
|
||||
if(!check_rights_for(admin, R_ADMIN))
|
||||
continue
|
||||
to_chat(admin, "## TESTING: GC: -- [ADMIN_VV(D)] | [type] was unable to be GC'd --")
|
||||
testing("GC: -- \ref[src] | [type] was unable to be GC'd --")
|
||||
#endif
|
||||
#ifdef REFERENCE_TRACKING
|
||||
GLOB.deletion_failures += D //It should no longer be bothered by the GC, manual deletion only.
|
||||
continue
|
||||
#endif
|
||||
I.failures++
|
||||
if (GC_QUEUE_HARDDELETE)
|
||||
HardDelete(D)
|
||||
@@ -181,7 +195,7 @@ SUBSYSTEM_DEF(garbage)
|
||||
var/gctime = world.time
|
||||
var/refid = "\ref[D]"
|
||||
|
||||
#ifdef TESTING
|
||||
#ifdef LEGACY_REFERENCE_TRACKING
|
||||
if(reference_find_on_fail_types[D.type])
|
||||
reference_find_on_fail["\ref[D]"] = TRUE
|
||||
#endif
|
||||
@@ -193,7 +207,7 @@ SUBSYSTEM_DEF(garbage)
|
||||
|
||||
queue[refid] = gctime
|
||||
|
||||
#ifdef TESTING
|
||||
#ifdef LEGACY_REFERENCE_TRACKING
|
||||
/datum/controller/subsystem/garbage/proc/add_type_to_findref(type)
|
||||
if(!ispath(type))
|
||||
return "NOT A VAILD PATH"
|
||||
@@ -260,12 +274,6 @@ SUBSYSTEM_DEF(garbage)
|
||||
/datum/qdel_item/New(mytype)
|
||||
name = "[mytype]"
|
||||
|
||||
#ifdef TESTING
|
||||
/proc/qdel_and_find_ref_if_fail(datum/D, force = FALSE)
|
||||
SSgarbage.reference_find_on_fail["\ref[D]"] = TRUE
|
||||
qdel(D, force)
|
||||
#endif
|
||||
|
||||
// Should be treated as a replacement for the 'del' keyword.
|
||||
// Datums passed to this will be given a chance to clean up references to allow the GC to collect them.
|
||||
/proc/qdel(datum/D, force=FALSE, ...)
|
||||
@@ -319,16 +327,13 @@ SUBSYSTEM_DEF(garbage)
|
||||
SSgarbage.Queue(D, GC_QUEUE_HARDDELETE)
|
||||
if (QDEL_HINT_HARDDEL_NOW) //qdel should assume this object won't gc, and hard del it post haste.
|
||||
SSgarbage.HardDelete(D)
|
||||
if (QDEL_HINT_FINDREFERENCE)//qdel will, if TESTING is enabled, display all references to this object, then queue the object for deletion.
|
||||
#ifdef LEGACY_REFERENCE_TRACKING
|
||||
if (QDEL_HINT_FINDREFERENCE) //qdel will, if LEGACY_REFERENCE_TRACKING is enabled, display all references to this object, then queue the object for deletion.
|
||||
SSgarbage.Queue(D)
|
||||
#ifdef TESTING
|
||||
D.find_references()
|
||||
#endif
|
||||
if (QDEL_HINT_IFFAIL_FINDREFERENCE)
|
||||
SSgarbage.Queue(D)
|
||||
#ifdef TESTING
|
||||
SSgarbage.reference_find_on_fail["\ref[D]"] = TRUE
|
||||
#endif
|
||||
#endif
|
||||
else
|
||||
#ifdef TESTING
|
||||
if(!I.no_hint)
|
||||
@@ -339,119 +344,6 @@ SUBSYSTEM_DEF(garbage)
|
||||
else if(D.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)
|
||||
CRASH("[D.type] destroy proc was called multiple times, likely due to a qdel loop in the Destroy logic")
|
||||
|
||||
#ifdef TESTING
|
||||
|
||||
/datum/verb/find_refs()
|
||||
set category = "Debug"
|
||||
set name = "Find References"
|
||||
set src in world
|
||||
|
||||
find_references(FALSE)
|
||||
|
||||
/datum/proc/find_references(skip_alert)
|
||||
running_find_references = type
|
||||
if(usr && usr.client)
|
||||
if(usr.client.running_find_references)
|
||||
testing("CANCELLED search for references to a [usr.client.running_find_references].")
|
||||
usr.client.running_find_references = null
|
||||
running_find_references = null
|
||||
//restart the garbage collector
|
||||
SSgarbage.can_fire = 1
|
||||
SSgarbage.next_fire = world.time + world.tick_lag
|
||||
return
|
||||
|
||||
if(!skip_alert)
|
||||
if(alert("Running this will lock everything up for about 5 minutes. Would you like to begin the search?", "Find References", "Yes", "No") == "No")
|
||||
running_find_references = null
|
||||
return
|
||||
|
||||
//this keeps the garbage collector from failing to collect objects being searched for in here
|
||||
SSgarbage.can_fire = 0
|
||||
|
||||
if(usr && usr.client)
|
||||
usr.client.running_find_references = type
|
||||
|
||||
testing("Beginning search for references to a [type].")
|
||||
last_find_references = world.time
|
||||
|
||||
DoSearchVar(GLOB) //globals
|
||||
for(var/datum/thing in world) //atoms (don't beleive it's lies)
|
||||
DoSearchVar(thing, "World -> [thing]")
|
||||
|
||||
for (var/datum/thing) //datums
|
||||
DoSearchVar(thing, "World -> [thing]")
|
||||
|
||||
for (var/client/thing) //clients
|
||||
DoSearchVar(thing, "World -> [thing]")
|
||||
|
||||
testing("Completed search for references to a [type].")
|
||||
if(usr && usr.client)
|
||||
usr.client.running_find_references = null
|
||||
running_find_references = null
|
||||
|
||||
//restart the garbage collector
|
||||
SSgarbage.can_fire = 1
|
||||
SSgarbage.next_fire = world.time + world.tick_lag
|
||||
|
||||
/datum/verb/qdel_then_find_references()
|
||||
set category = "Debug"
|
||||
set name = "qdel() then Find References"
|
||||
set src in world
|
||||
|
||||
qdel(src, TRUE) //Force.
|
||||
if(!running_find_references)
|
||||
find_references(TRUE)
|
||||
|
||||
/datum/verb/qdel_then_if_fail_find_references()
|
||||
set category = "Debug"
|
||||
set name = "qdel() then Find References if GC failure"
|
||||
set src in world
|
||||
|
||||
qdel_and_find_ref_if_fail(src, TRUE)
|
||||
|
||||
/datum/proc/DoSearchVar(X, Xname, recursive_limit = 64)
|
||||
if(usr && usr.client && !usr.client.running_find_references)
|
||||
return
|
||||
if (!recursive_limit)
|
||||
return
|
||||
|
||||
if(istype(X, /datum))
|
||||
var/datum/D = X
|
||||
if(D.last_find_references == last_find_references)
|
||||
return
|
||||
|
||||
D.last_find_references = last_find_references
|
||||
var/list/L = D.vars
|
||||
|
||||
for(var/varname in L)
|
||||
if (varname == "vars")
|
||||
continue
|
||||
var/variable = L[varname]
|
||||
|
||||
if(variable == src)
|
||||
testing("Found [src.type] \ref[src] in [D.type]'s [varname] var. [Xname]")
|
||||
|
||||
else if(islist(variable))
|
||||
DoSearchVar(variable, "[Xname] -> list", recursive_limit-1)
|
||||
|
||||
else if(islist(X))
|
||||
var/normal = IS_NORMAL_LIST(X)
|
||||
for(var/I in X)
|
||||
if (I == src)
|
||||
testing("Found [src.type] \ref[src] in list [Xname].")
|
||||
|
||||
else if (I && !isnum(I) && normal && X[I] == src)
|
||||
testing("Found [src.type] \ref[src] in list [Xname]\[[I]\]")
|
||||
|
||||
else if (islist(I))
|
||||
DoSearchVar(I, "[Xname] -> list", recursive_limit-1)
|
||||
|
||||
#ifndef FIND_REF_NO_CHECK_TICK
|
||||
CHECK_TICK
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef TESTING
|
||||
/proc/writeDatumCount()
|
||||
var/list/datums = list()
|
||||
|
||||
@@ -674,7 +674,7 @@ SUBSYSTEM_DEF(job)
|
||||
return
|
||||
for(var/i in the_mob.client.prefs.chosen_gear)
|
||||
var/datum/gear/G = i
|
||||
G = GLOB.loadout_items[slot_to_string(initial(G.category))][initial(G.name)]
|
||||
G = GLOB.loadout_items[initial(G.category)][initial(G.subcategory)][initial(G.name)]
|
||||
if(!G)
|
||||
continue
|
||||
var/permitted = TRUE
|
||||
@@ -682,14 +682,14 @@ SUBSYSTEM_DEF(job)
|
||||
permitted = FALSE
|
||||
if(G.donoritem && !G.donator_ckey_check(the_mob.client.ckey))
|
||||
permitted = FALSE
|
||||
if(!equipbackpackstuff && G.category == SLOT_IN_BACKPACK)//snowflake check since plopping stuff in the backpack doesnt work for pre-job equip loadout stuffs
|
||||
if(!equipbackpackstuff && G.slot == SLOT_IN_BACKPACK)//snowflake check since plopping stuff in the backpack doesnt work for pre-job equip loadout stuffs
|
||||
permitted = FALSE
|
||||
if(equipbackpackstuff && G.category != SLOT_IN_BACKPACK)//ditto
|
||||
if(equipbackpackstuff && G.slot != SLOT_IN_BACKPACK)//ditto
|
||||
permitted = FALSE
|
||||
if(!permitted)
|
||||
continue
|
||||
var/obj/item/I = new G.path
|
||||
if(!M.equip_to_slot_if_possible(I, G.category, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // If the job's dresscode compliant, try to put it in its slot, first
|
||||
if(!M.equip_to_slot_if_possible(I, G.slot, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // If the job's dresscode compliant, try to put it in its slot, first
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
var/obj/item/storage/backpack/B = C.back
|
||||
|
||||
@@ -113,7 +113,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
// needs to be whitelisted for underground too so place_below ruins work
|
||||
seedRuins(ice_ruins, CONFIG_GET(number/icemoon_budget), list(/area/icemoon/surface/outdoors/unexplored, /area/icemoon/underground/unexplored), ice_ruins_templates)
|
||||
for (var/ice_z in ice_ruins)
|
||||
spawn_rivers(ice_z, 4, /turf/open/openspace/icemoon, /area/icemoon/surface/outdoors/unexplored/rivers)
|
||||
spawn_rivers(ice_z, 4, /turf/open/transparent/openspace/icemoon, /area/icemoon/surface/outdoors/unexplored/rivers)
|
||||
|
||||
var/list/ice_ruins_underground = levels_by_trait(ZTRAIT_ICE_RUINS_UNDERGROUND)
|
||||
if (ice_ruins_underground.len)
|
||||
|
||||
@@ -114,67 +114,47 @@ SUBSYSTEM_DEF(overlays)
|
||||
|
||||
#define NOT_QUEUED_ALREADY (!(flags_1 & OVERLAY_QUEUED_1))
|
||||
#define QUEUE_FOR_COMPILE flags_1 |= OVERLAY_QUEUED_1; SSoverlays.queue += src;
|
||||
/atom/proc/cut_overlays(priority = FALSE)
|
||||
LAZYINITLIST(priority_overlays)
|
||||
/atom/proc/cut_overlays()
|
||||
LAZYINITLIST(remove_overlays)
|
||||
LAZYINITLIST(add_overlays)
|
||||
remove_overlays = overlays.Copy()
|
||||
add_overlays.Cut()
|
||||
|
||||
if(priority)
|
||||
priority_overlays.Cut()
|
||||
|
||||
//If not already queued for work and there are overlays to remove
|
||||
if(NOT_QUEUED_ALREADY && remove_overlays.len)
|
||||
QUEUE_FOR_COMPILE
|
||||
|
||||
/atom/proc/cut_overlay(list/overlays, priority)
|
||||
/atom/proc/cut_overlay(list/overlays)
|
||||
if(!overlays)
|
||||
return
|
||||
overlays = build_appearance_list(overlays)
|
||||
LAZYINITLIST(add_overlays) //always initialized after this point
|
||||
LAZYINITLIST(priority_overlays)
|
||||
LAZYINITLIST(remove_overlays)
|
||||
var/a_len = add_overlays.len
|
||||
var/r_len = remove_overlays.len
|
||||
var/p_len = priority_overlays.len
|
||||
remove_overlays += overlays
|
||||
add_overlays -= overlays
|
||||
|
||||
|
||||
if(priority)
|
||||
var/list/cached_priority = priority_overlays
|
||||
LAZYREMOVE(cached_priority, overlays)
|
||||
|
||||
var/fa_len = add_overlays.len
|
||||
var/fr_len = remove_overlays.len
|
||||
var/fp_len = priority_overlays.len
|
||||
|
||||
//If not already queued and there is work to be done
|
||||
if(NOT_QUEUED_ALREADY && (fa_len != a_len || fr_len != r_len || fp_len != p_len))
|
||||
if(NOT_QUEUED_ALREADY && (fa_len != a_len || fr_len != r_len))
|
||||
QUEUE_FOR_COMPILE
|
||||
|
||||
/atom/proc/add_overlay(list/overlays, priority = FALSE)
|
||||
/atom/proc/add_overlay(list/overlays)
|
||||
if(!overlays)
|
||||
return
|
||||
|
||||
overlays = build_appearance_list(overlays)
|
||||
|
||||
LAZYINITLIST(add_overlays) //always initialized after this point
|
||||
LAZYINITLIST(priority_overlays)
|
||||
var/a_len = add_overlays.len
|
||||
var/p_len = priority_overlays.len
|
||||
|
||||
if(priority)
|
||||
priority_overlays += overlays //or in the image. Can we use [image] = image?
|
||||
var/fp_len = priority_overlays.len
|
||||
if(NOT_QUEUED_ALREADY && fp_len != p_len)
|
||||
QUEUE_FOR_COMPILE
|
||||
else
|
||||
add_overlays += overlays
|
||||
var/fa_len = add_overlays.len
|
||||
if(NOT_QUEUED_ALREADY && fa_len != a_len)
|
||||
QUEUE_FOR_COMPILE
|
||||
add_overlays += overlays
|
||||
var/fa_len = add_overlays.len
|
||||
if(NOT_QUEUED_ALREADY && fa_len != a_len)
|
||||
QUEUE_FOR_COMPILE
|
||||
|
||||
/atom/proc/copy_overlays(atom/other, cut_old) //copys our_overlays from another atom
|
||||
if(!other)
|
||||
|
||||
@@ -48,25 +48,6 @@ SUBSYSTEM_DEF(persistence)
|
||||
/datum/controller/subsystem/persistence/proc/LoadSatchels()
|
||||
var/placed_satchel = 0
|
||||
var/path
|
||||
if(fexists("data/npc_saves/SecretSatchels.sav")) //legacy conversion. Will only ever run once.
|
||||
var/savefile/secret_satchels = new /savefile("data/npc_saves/SecretSatchels.sav")
|
||||
for(var/map in secret_satchels)
|
||||
var/json_file = file("data/npc_saves/SecretSatchels[map].json")
|
||||
var/list/legacy_secret_satchels = splittext(secret_satchels[map],"#")
|
||||
var/list/satchels = list()
|
||||
for(var/i=1,i<=legacy_secret_satchels.len,i++)
|
||||
var/satchel_string = legacy_secret_satchels[i]
|
||||
var/list/chosen_satchel = splittext(satchel_string,"|")
|
||||
if(chosen_satchel.len == 3)
|
||||
var/list/data = list()
|
||||
data["x"] = text2num(chosen_satchel[1])
|
||||
data["y"] = text2num(chosen_satchel[2])
|
||||
data["saved_obj"] = chosen_satchel[3]
|
||||
satchels += list(data)
|
||||
var/list/file_data = list()
|
||||
file_data["data"] = satchels
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
fdel("data/npc_saves/SecretSatchels.sav")
|
||||
|
||||
var/json_file = file("data/npc_saves/SecretSatchels[SSmapping.config.map_name].json")
|
||||
var/list/json = list()
|
||||
@@ -561,8 +542,8 @@ SUBSYSTEM_DEF(persistence)
|
||||
ending_human.client.prefs.scars_list["[ending_human.client.prefs.scars_index]"] = ""
|
||||
else
|
||||
for(var/k in ending_human.all_wounds)
|
||||
var/datum/wound/W = k
|
||||
W.remove_wound() // so we can get the scars for open wounds
|
||||
var/datum/wound/iter_wound = k
|
||||
iter_wound.remove_wound() // so we can get the scars for open wounds
|
||||
if(!ending_human.client)
|
||||
return
|
||||
ending_human.client.prefs.scars_list["[ending_human.client.prefs.scars_index]"] = ending_human.format_scars()
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
SUBSYSTEM_DEF(ping)
|
||||
name = "Ping"
|
||||
priority = FIRE_PRIORITY_PING
|
||||
wait = 3 SECONDS
|
||||
flags = SS_NO_INIT
|
||||
runlevels = RUNLEVEL_LOBBY | RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
|
||||
var/list/currentrun = list()
|
||||
|
||||
/datum/controller/subsystem/ping/stat_entry()
|
||||
..("P:[GLOB.clients.len]")
|
||||
|
||||
|
||||
/datum/controller/subsystem/ping/fire(resumed = 0)
|
||||
if (!resumed)
|
||||
src.currentrun = GLOB.clients.Copy()
|
||||
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
|
||||
while (currentrun.len)
|
||||
var/client/C = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
|
||||
if (!C || !C.chatOutput || !C.chatOutput.loaded)
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
continue
|
||||
|
||||
// softPang isn't handled anywhere but it'll always reset the opts.lastPang.
|
||||
C.chatOutput.ehjax_send(data = C.is_afk(29) ? "softPang" : "pang")
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
@@ -50,20 +50,17 @@ PROCESSING_SUBSYSTEM_DEF(circuit)
|
||||
/obj/item/electronic_assembly/simple,
|
||||
/obj/item/electronic_assembly/hook,
|
||||
/obj/item/electronic_assembly/pda,
|
||||
/obj/item/electronic_assembly/dildo,
|
||||
/obj/item/electronic_assembly/small/default,
|
||||
/obj/item/electronic_assembly/small/cylinder,
|
||||
/obj/item/electronic_assembly/small/scanner,
|
||||
/obj/item/electronic_assembly/small/hook,
|
||||
/obj/item/electronic_assembly/small/box,
|
||||
/obj/item/electronic_assembly/small/dildo,
|
||||
/obj/item/electronic_assembly/medium/default,
|
||||
/obj/item/electronic_assembly/medium/box,
|
||||
/obj/item/electronic_assembly/medium/clam,
|
||||
/obj/item/electronic_assembly/medium/medical,
|
||||
/obj/item/electronic_assembly/medium/gun,
|
||||
/obj/item/electronic_assembly/medium/radio,
|
||||
/obj/item/electronic_assembly/medium/dildo,
|
||||
/obj/item/electronic_assembly/large/default,
|
||||
/obj/item/electronic_assembly/large/scope,
|
||||
/obj/item/electronic_assembly/large/terminal,
|
||||
|
||||
@@ -4,16 +4,26 @@ PROCESSING_SUBSYSTEM_DEF(instruments)
|
||||
init_order = INIT_ORDER_INSTRUMENTS
|
||||
flags = SS_KEEP_TIMING
|
||||
priority = FIRE_PRIORITY_INSTRUMENTS
|
||||
var/static/list/datum/instrument/instrument_data = list() //id = datum
|
||||
/// List of all instrument data, associative id = datum
|
||||
var/static/list/datum/instrument/instrument_data = list()
|
||||
/// List of all song datums.
|
||||
var/static/list/datum/song/songs = list()
|
||||
/// Max lines in songs
|
||||
var/static/musician_maxlines = 600
|
||||
/// Max characters per line in songs
|
||||
var/static/musician_maxlinechars = 300
|
||||
/// Deciseconds between hearchecks. Too high and instruments seem to lag when people are moving around in terms of who can hear it. Too low and the server lags from this.
|
||||
var/static/musician_hearcheck_mindelay = 5
|
||||
/// Maximum instrument channels total instruments are allowed to use. This is so you don't have instruments deadlocking all sound channels.
|
||||
var/static/max_instrument_channels = MAX_INSTRUMENT_CHANNELS
|
||||
/// Current number of channels allocated for instruments
|
||||
var/static/current_instrument_channels = 0
|
||||
/// Single cached list for synthesizer instrument ids, so you don't have to have a new list with every synthesizer.
|
||||
var/static/list/synthesizer_instrument_ids
|
||||
|
||||
/datum/controller/subsystem/processing/instruments/Initialize()
|
||||
initialize_instrument_data()
|
||||
synthesizer_instrument_ids = get_allowed_instrument_ids()
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/processing/instruments/proc/on_song_new(datum/song/S)
|
||||
@@ -29,7 +39,10 @@ PROCESSING_SUBSYSTEM_DEF(instruments)
|
||||
continue
|
||||
I = new path
|
||||
I.Initialize()
|
||||
instrument_data[I.id || "[I.type]"] = I
|
||||
if(!I.id)
|
||||
qdel(I)
|
||||
continue
|
||||
instrument_data[I.id] = I
|
||||
CHECK_TICK
|
||||
|
||||
/datum/controller/subsystem/processing/instruments/proc/get_instrument(id_or_path)
|
||||
|
||||
@@ -294,6 +294,17 @@ SUBSYSTEM_DEF(research)
|
||||
//[88nodes * 5000points/node] / [1.5hr * 90min/hr * 60s/min]
|
||||
//Around 450000 points max???
|
||||
|
||||
/// The global list of raw anomaly types that have been refined, for hard limits.
|
||||
var/list/created_anomaly_types = list()
|
||||
/// The hard limits of cores created for each anomaly type. For faster code lookup without switch statements.
|
||||
var/list/anomaly_hard_limit_by_type = list(
|
||||
ANOMALY_CORE_BLUESPACE = MAX_CORES_BLUESPACE,
|
||||
ANOMALY_CORE_PYRO = MAX_CORES_PYRO,
|
||||
ANOMALY_CORE_GRAVITATIONAL = MAX_CORES_GRAVITATIONAL,
|
||||
ANOMALY_CORE_VORTEX = MAX_CORES_VORTEX,
|
||||
ANOMALY_CORE_FLUX = MAX_CORES_FLUX
|
||||
)
|
||||
|
||||
/datum/controller/subsystem/research/Initialize()
|
||||
point_types = TECHWEB_POINT_TYPE_LIST_ASSOCIATIVE_NAMES
|
||||
initialize_all_techweb_designs()
|
||||
|
||||
@@ -76,9 +76,7 @@ SUBSYSTEM_DEF(server_maint)
|
||||
if(!thing)
|
||||
continue
|
||||
var/client/C = thing
|
||||
var/datum/chatOutput/co = C.chatOutput
|
||||
if(co)
|
||||
co.ehjax_send(data = "roundrestart")
|
||||
C?.tgui_panel?.send_roundrestart()
|
||||
if(server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
|
||||
C << link("byond://[server]")
|
||||
var/datum/tgs_version/tgsversion = world.TgsVersion()
|
||||
|
||||
@@ -775,12 +775,14 @@ SUBSYSTEM_DEF(shuttle)
|
||||
preview_shuttle = null
|
||||
|
||||
|
||||
/datum/controller/subsystem/shuttle/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.admin_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "ShuttleManipulator", name, 800, 600, master_ui, state)
|
||||
ui.open()
|
||||
/datum/controller/subsystem/shuttle/ui_state(mob/user)
|
||||
return GLOB.admin_state
|
||||
|
||||
/datum/controller/subsystem/shuttle/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "ShuttleManipulator")
|
||||
ui.open()
|
||||
|
||||
/datum/controller/subsystem/shuttle/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
/**
|
||||
* tgui subsystem
|
||||
*
|
||||
* Contains all tgui state and subsystem code.
|
||||
*
|
||||
* Copyright (c) 2020 Aleksej Komarov
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
SUBSYSTEM_DEF(tgui)
|
||||
name = "tgui"
|
||||
wait = 9
|
||||
@@ -5,33 +14,338 @@ SUBSYSTEM_DEF(tgui)
|
||||
priority = FIRE_PRIORITY_TGUI
|
||||
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
|
||||
|
||||
var/list/currentrun = list()
|
||||
var/list/open_uis = list() // A list of open UIs, grouped by src_object and ui_key.
|
||||
var/list/processing_uis = list() // A list of processing UIs, ungrouped.
|
||||
var/basehtml // The HTML base used for all UIs.
|
||||
/// A list of UIs scheduled to process
|
||||
var/list/current_run = list()
|
||||
/// A list of open UIs
|
||||
var/list/open_uis = list()
|
||||
/// A list of open UIs, grouped by src_object.
|
||||
var/list/open_uis_by_src = list()
|
||||
/// The HTML base used for all UIs.
|
||||
var/basehtml
|
||||
|
||||
/datum/controller/subsystem/tgui/PreInit()
|
||||
basehtml = file2text('tgui/packages/tgui/public/tgui.html')
|
||||
basehtml = file2text('tgui/packages/tgui/public/tgui.html')
|
||||
|
||||
/datum/controller/subsystem/tgui/Shutdown()
|
||||
close_all_uis()
|
||||
|
||||
/datum/controller/subsystem/tgui/stat_entry()
|
||||
..("P:[processing_uis.len]")
|
||||
..("P:[open_uis.len]")
|
||||
|
||||
/datum/controller/subsystem/tgui/fire(resumed = 0)
|
||||
if (!resumed)
|
||||
src.currentrun = processing_uis.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
|
||||
while(currentrun.len)
|
||||
var/datum/tgui/ui = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
if(!resumed)
|
||||
src.current_run = open_uis.Copy()
|
||||
// Cache for sanic speed (lists are references anyways)
|
||||
var/list/current_run = src.current_run
|
||||
while(current_run.len)
|
||||
var/datum/tgui/ui = current_run[current_run.len]
|
||||
current_run.len--
|
||||
// TODO: Move user/src_object check to process()
|
||||
if(ui && ui.user && ui.src_object)
|
||||
ui.process()
|
||||
else
|
||||
processing_uis.Remove(ui)
|
||||
if (MC_TICK_CHECK)
|
||||
open_uis.Remove(ui)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/**
|
||||
* public
|
||||
*
|
||||
* Requests a usable tgui window from the pool.
|
||||
* Returns null if pool was exhausted.
|
||||
*
|
||||
* required user mob
|
||||
* return datum/tgui
|
||||
*/
|
||||
/datum/controller/subsystem/tgui/proc/request_pooled_window(mob/user)
|
||||
if(!user.client)
|
||||
return null
|
||||
var/list/windows = user.client.tgui_windows
|
||||
var/window_id
|
||||
var/datum/tgui_window/window
|
||||
var/window_found = FALSE
|
||||
// Find a usable window
|
||||
for(var/i in 1 to TGUI_WINDOW_HARD_LIMIT)
|
||||
window_id = TGUI_WINDOW_ID(i)
|
||||
window = windows[window_id]
|
||||
// As we are looping, create missing window datums
|
||||
if(!window)
|
||||
window = new(user.client, window_id, pooled = TRUE)
|
||||
// Skip windows with acquired locks
|
||||
if(window.locked)
|
||||
continue
|
||||
if(window.status == TGUI_WINDOW_READY)
|
||||
return window
|
||||
if(window.status == TGUI_WINDOW_CLOSED)
|
||||
window.status = TGUI_WINDOW_LOADING
|
||||
window_found = TRUE
|
||||
break
|
||||
if(!window_found)
|
||||
log_tgui(user, "Error: Pool exhausted")
|
||||
return null
|
||||
return window
|
||||
|
||||
/**
|
||||
* public
|
||||
*
|
||||
* Force closes all tgui windows.
|
||||
*
|
||||
* required user mob
|
||||
*/
|
||||
/datum/controller/subsystem/tgui/proc/force_close_all_windows(mob/user)
|
||||
log_tgui(user, "force_close_all_windows")
|
||||
if(user.client)
|
||||
user.client.tgui_windows = list()
|
||||
for(var/i in 1 to TGUI_WINDOW_HARD_LIMIT)
|
||||
var/window_id = TGUI_WINDOW_ID(i)
|
||||
user << browse(null, "window=[window_id]")
|
||||
|
||||
/**
|
||||
* public
|
||||
*
|
||||
* Force closes the tgui window by window_id.
|
||||
*
|
||||
* required user mob
|
||||
* required window_id string
|
||||
*/
|
||||
/datum/controller/subsystem/tgui/proc/force_close_window(mob/user, window_id)
|
||||
log_tgui(user, "force_close_window")
|
||||
// Close all tgui datums based on window_id.
|
||||
for(var/datum/tgui/ui in user.tgui_open_uis)
|
||||
if(ui.window && ui.window.id == window_id)
|
||||
ui.close(can_be_suspended = FALSE)
|
||||
// Unset machine just to be sure.
|
||||
user.unset_machine()
|
||||
// Close window directly just to be sure.
|
||||
user << browse(null, "window=[window_id]")
|
||||
|
||||
/**
|
||||
* public
|
||||
*
|
||||
* Try to find an instance of a UI, and push an update to it.
|
||||
*
|
||||
* required user mob The mob who opened/is using the UI.
|
||||
* required src_object datum The object/datum which owns the UI.
|
||||
* optional ui datum/tgui The UI to be updated, if it exists.
|
||||
* optional force_open bool If the UI should be re-opened instead of updated.
|
||||
*
|
||||
* return datum/tgui The found UI.
|
||||
*/
|
||||
/datum/controller/subsystem/tgui/proc/try_update_ui(
|
||||
mob/user,
|
||||
datum/src_object,
|
||||
datum/tgui/ui)
|
||||
// Look up a UI if it wasn't passed
|
||||
if(isnull(ui))
|
||||
ui = get_open_ui(user, src_object)
|
||||
// Couldn't find a UI.
|
||||
if(isnull(ui))
|
||||
return null
|
||||
ui.process_status()
|
||||
// UI ended up with the closed status
|
||||
// or is actively trying to close itself.
|
||||
// FIXME: Doesn't actually fix the paper bug.
|
||||
if(ui.status <= UI_CLOSE)
|
||||
ui.close()
|
||||
return null
|
||||
ui.send_update()
|
||||
return ui
|
||||
|
||||
/**
|
||||
* public
|
||||
*
|
||||
* Get a open UI given a user and src_object.
|
||||
*
|
||||
* required user mob The mob who opened/is using the UI.
|
||||
* required src_object datum The object/datum which owns the UI.
|
||||
*
|
||||
* return datum/tgui The found UI.
|
||||
*/
|
||||
/datum/controller/subsystem/tgui/proc/get_open_ui(mob/user, datum/src_object)
|
||||
var/key = "[REF(src_object)]"
|
||||
// No UIs opened for this src_object
|
||||
if(isnull(open_uis_by_src[key]) || !istype(open_uis_by_src[key], /list))
|
||||
return null
|
||||
for(var/datum/tgui/ui in open_uis_by_src[key])
|
||||
// Make sure we have the right user
|
||||
if(ui.user == user)
|
||||
return ui
|
||||
return null
|
||||
|
||||
/**
|
||||
* public
|
||||
*
|
||||
* Update all UIs attached to src_object.
|
||||
*
|
||||
* required src_object datum The object/datum which owns the UIs.
|
||||
*
|
||||
* return int The number of UIs updated.
|
||||
*/
|
||||
/datum/controller/subsystem/tgui/proc/update_uis(datum/src_object)
|
||||
var/count = 0
|
||||
var/key = "[REF(src_object)]"
|
||||
// No UIs opened for this src_object
|
||||
if(isnull(open_uis_by_src[key]) || !istype(open_uis_by_src[key], /list))
|
||||
return count
|
||||
for(var/datum/tgui/ui in open_uis_by_src[key])
|
||||
// Check if UI is valid.
|
||||
if(ui && ui.src_object && ui.user && ui.src_object.ui_host(ui.user))
|
||||
ui.process(force = 1)
|
||||
count++
|
||||
return count
|
||||
|
||||
/**
|
||||
* public
|
||||
*
|
||||
* Close all UIs attached to src_object.
|
||||
*
|
||||
* required src_object datum The object/datum which owns the UIs.
|
||||
*
|
||||
* return int The number of UIs closed.
|
||||
*/
|
||||
/datum/controller/subsystem/tgui/proc/close_uis(datum/src_object)
|
||||
var/count = 0
|
||||
var/key = "[REF(src_object)]"
|
||||
// No UIs opened for this src_object
|
||||
if(isnull(open_uis_by_src[key]) || !istype(open_uis_by_src[key], /list))
|
||||
return count
|
||||
for(var/datum/tgui/ui in open_uis_by_src[key])
|
||||
// Check if UI is valid.
|
||||
if(ui && ui.src_object && ui.user && ui.src_object.ui_host(ui.user))
|
||||
ui.close()
|
||||
count++
|
||||
return count
|
||||
|
||||
/**
|
||||
* public
|
||||
*
|
||||
* Close all UIs regardless of their attachment to src_object.
|
||||
*
|
||||
* return int The number of UIs closed.
|
||||
*/
|
||||
/datum/controller/subsystem/tgui/proc/close_all_uis()
|
||||
var/count = 0
|
||||
for(var/key in open_uis_by_src)
|
||||
for(var/datum/tgui/ui in open_uis_by_src[key])
|
||||
// Check if UI is valid.
|
||||
if(ui && ui.src_object && ui.user && ui.src_object.ui_host(ui.user))
|
||||
ui.close()
|
||||
count++
|
||||
return count
|
||||
|
||||
/**
|
||||
* public
|
||||
*
|
||||
* Update all UIs belonging to a user.
|
||||
*
|
||||
* required user mob The mob who opened/is using the UI.
|
||||
* optional src_object datum If provided, only update UIs belonging this src_object.
|
||||
*
|
||||
* return int The number of UIs updated.
|
||||
*/
|
||||
/datum/controller/subsystem/tgui/proc/update_user_uis(mob/user, datum/src_object)
|
||||
var/count = 0
|
||||
if(length(user?.tgui_open_uis) == 0)
|
||||
return count
|
||||
for(var/datum/tgui/ui in user.tgui_open_uis)
|
||||
if(isnull(src_object) || ui.src_object == src_object)
|
||||
ui.process(force = 1)
|
||||
count++
|
||||
return count
|
||||
|
||||
/**
|
||||
* public
|
||||
*
|
||||
* Close all UIs belonging to a user.
|
||||
*
|
||||
* required user mob The mob who opened/is using the UI.
|
||||
* optional src_object datum If provided, only close UIs belonging this src_object.
|
||||
*
|
||||
* return int The number of UIs closed.
|
||||
*/
|
||||
/datum/controller/subsystem/tgui/proc/close_user_uis(mob/user, datum/src_object)
|
||||
var/count = 0
|
||||
if(length(user?.tgui_open_uis) == 0)
|
||||
return count
|
||||
for(var/datum/tgui/ui in user.tgui_open_uis)
|
||||
if(isnull(src_object) || ui.src_object == src_object)
|
||||
ui.close()
|
||||
count++
|
||||
return count
|
||||
|
||||
/**
|
||||
* private
|
||||
*
|
||||
* Add a UI to the list of open UIs.
|
||||
*
|
||||
* required ui datum/tgui The UI to be added.
|
||||
*/
|
||||
/datum/controller/subsystem/tgui/proc/on_open(datum/tgui/ui)
|
||||
var/key = "[REF(ui.src_object)]"
|
||||
if(isnull(open_uis_by_src[key]) || !istype(open_uis_by_src[key], /list))
|
||||
open_uis_by_src[key] = list()
|
||||
ui.user.tgui_open_uis |= ui
|
||||
var/list/uis = open_uis_by_src[key]
|
||||
uis |= ui
|
||||
open_uis |= ui
|
||||
|
||||
/**
|
||||
* private
|
||||
*
|
||||
* Remove a UI from the list of open UIs.
|
||||
*
|
||||
* required ui datum/tgui The UI to be removed.
|
||||
*
|
||||
* return bool If the UI was removed or not.
|
||||
*/
|
||||
/datum/controller/subsystem/tgui/proc/on_close(datum/tgui/ui)
|
||||
var/key = "[REF(ui.src_object)]"
|
||||
if(isnull(open_uis_by_src[key]) || !istype(open_uis_by_src[key], /list))
|
||||
return FALSE
|
||||
// Remove it from the list of processing UIs.
|
||||
open_uis.Remove(ui)
|
||||
// If the user exists, remove it from them too.
|
||||
if(ui.user)
|
||||
ui.user.tgui_open_uis.Remove(ui)
|
||||
var/list/uis = open_uis_by_src[key]
|
||||
uis.Remove(ui)
|
||||
if(length(uis) == 0)
|
||||
open_uis_by_src.Remove(key)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* private
|
||||
*
|
||||
* Handle client logout, by closing all their UIs.
|
||||
*
|
||||
* required user mob The mob which logged out.
|
||||
*
|
||||
* return int The number of UIs closed.
|
||||
*/
|
||||
/datum/controller/subsystem/tgui/proc/on_logout(mob/user)
|
||||
close_user_uis(user)
|
||||
|
||||
/**
|
||||
* private
|
||||
*
|
||||
* Handle clients switching mobs, by transferring their UIs.
|
||||
*
|
||||
* required user source The client's original mob.
|
||||
* required user target The client's new mob.
|
||||
*
|
||||
* return bool If the UIs were transferred.
|
||||
*/
|
||||
/datum/controller/subsystem/tgui/proc/on_transfer(mob/source, mob/target)
|
||||
// The old mob had no open UIs.
|
||||
if(length(source?.tgui_open_uis) == 0)
|
||||
return FALSE
|
||||
if(isnull(target.tgui_open_uis) || !istype(target.tgui_open_uis, /list))
|
||||
target.tgui_open_uis = list()
|
||||
// Transfer all the UIs.
|
||||
for(var/datum/tgui/ui in source.tgui_open_uis)
|
||||
// Inform the UIs of their new owner.
|
||||
ui.user = target
|
||||
target.tgui_open_uis.Add(ui)
|
||||
// Clear the old list.
|
||||
source.tgui_open_uis.Cut()
|
||||
return TRUE
|
||||
|
||||
@@ -396,6 +396,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
SSjob.EquipRank(N, player.mind.assigned_role, 0)
|
||||
if(CONFIG_GET(flag/roundstart_traits) && ishuman(N.new_character))
|
||||
SSquirks.AssignQuirks(N.new_character, N.client, TRUE, TRUE, SSjob.GetJob(player.mind.assigned_role), FALSE, N)
|
||||
N.client.prefs.post_copy_to(player)
|
||||
CHECK_TICK
|
||||
if(captainless)
|
||||
for(var/mob/dead/new_player/N in GLOB.player_list)
|
||||
@@ -711,7 +712,8 @@ SUBSYSTEM_DEF(ticker)
|
||||
'sound/roundend/yeehaw.ogg',
|
||||
'sound/roundend/disappointed.ogg',
|
||||
'sound/roundend/gondolabridge.ogg',
|
||||
'sound/roundend/haveabeautifultime.ogg'\
|
||||
'sound/roundend/haveabeautifultime.ogg',
|
||||
'sound/roundend/CitadelStationHasSeenBetterDays.ogg'\
|
||||
)
|
||||
|
||||
SEND_SOUND(world, sound(round_end_sound))
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/datum/accent
|
||||
|
||||
/datum/accent/proc/modify_speech(list/speech_args, datum/source, mob/living/carbon/owner) //transforms the message in some way
|
||||
return speech_args
|
||||
|
||||
/datum/accent/lizard/modify_speech(list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
var/static/regex/lizard_hiss = new("s+", "g")
|
||||
var/static/regex/lizard_hiSS = new("S+", "g")
|
||||
if(message[1] != "*")
|
||||
message = lizard_hiss.Replace(message, "sss")
|
||||
message = lizard_hiSS.Replace(message, "SSS")
|
||||
speech_args[SPEECH_MESSAGE] = message
|
||||
return speech_args
|
||||
|
||||
/datum/accent/fly/modify_speech(list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
var/static/regex/fly_buzz = new("z+", "g")
|
||||
var/static/regex/fly_buZZ = new("Z+", "g")
|
||||
if(message[1] != "*")
|
||||
message = fly_buzz.Replace(message, "zzz")
|
||||
message = fly_buZZ.Replace(message, "ZZZ")
|
||||
speech_args[SPEECH_MESSAGE] = message
|
||||
return speech_args
|
||||
|
||||
/datum/accent/abductor/modify_speech(list/speech_args, datum/source)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
var/mob/living/carbon/human/user = source
|
||||
var/rendered = "<span class='abductor'><b>[user.name]:</b> [message]</span>"
|
||||
user.log_talk(message, LOG_SAY, tag="abductor")
|
||||
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
||||
var/obj/item/organ/tongue/T = H.getorganslot(ORGAN_SLOT_TONGUE)
|
||||
if(!T || T.type != type)
|
||||
continue
|
||||
if(H.dna && H.dna.species.id == "abductor" && user.dna && user.dna.species.id == "abductor")
|
||||
var/datum/antagonist/abductor/A = user.mind.has_antag_datum(/datum/antagonist/abductor)
|
||||
if(!A || !(H.mind in A.team.members))
|
||||
continue
|
||||
to_chat(H, rendered)
|
||||
for(var/mob/M in GLOB.dead_mob_list)
|
||||
var/link = FOLLOW_LINK(M, user)
|
||||
to_chat(M, "[link] [rendered]")
|
||||
speech_args[SPEECH_MESSAGE] = ""
|
||||
return speech_args
|
||||
|
||||
/datum/accent/zombie/modify_speech(list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
var/list/message_list = splittext(message, " ")
|
||||
var/maxchanges = max(round(message_list.len / 1.5), 2)
|
||||
|
||||
for(var/i = rand(maxchanges / 2, maxchanges), i > 0, i--)
|
||||
var/insertpos = rand(1, message_list.len - 1)
|
||||
var/inserttext = message_list[insertpos]
|
||||
|
||||
if(!(copytext(inserttext, -3) == "..."))//3 == length("...")
|
||||
message_list[insertpos] = inserttext + "..."
|
||||
|
||||
if(prob(20) && message_list.len > 3)
|
||||
message_list.Insert(insertpos, "[pick("BRAINS", "Brains", "Braaaiinnnsss", "BRAAAIIINNSSS")]...")
|
||||
|
||||
speech_args[SPEECH_MESSAGE] = jointext(message_list, " ")
|
||||
return speech_args
|
||||
|
||||
/datum/accent/alien/modify_speech(list/speech_args, datum/source)
|
||||
playsound(source, "hiss", 25, 1, 1)
|
||||
return speech_args
|
||||
|
||||
/datum/accent/fluffy/modify_speech(list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message[1] != "*")
|
||||
message = replacetext(message, "ne", "nye")
|
||||
message = replacetext(message, "nu", "nyu")
|
||||
message = replacetext(message, "na", "nya")
|
||||
message = replacetext(message, "no", "nyo")
|
||||
message = replacetext(message, "ove", "uv")
|
||||
message = replacetext(message, "l", "w")
|
||||
message = replacetext(message, "r", "w")
|
||||
speech_args[SPEECH_MESSAGE] = lowertext(message)
|
||||
return speech_args
|
||||
|
||||
/datum/accent/span
|
||||
var/span_flag
|
||||
|
||||
/datum/accent/span/modify_speech(list/speech_args)
|
||||
speech_args[SPEECH_SPANS] |= span_flag
|
||||
return speech_args
|
||||
|
||||
//bone tongues either have the sans accent or the papyrus accent
|
||||
/datum/accent/span/sans
|
||||
span_flag = SPAN_SANS
|
||||
|
||||
/datum/accent/span/papyrus
|
||||
span_flag = SPAN_PAPYRUS
|
||||
|
||||
/datum/accent/span/robot
|
||||
span_flag = SPAN_ROBOT
|
||||
|
||||
/datum/accent/dullahan/modify_speech(list/speech_args, datum/source, mob/living/carbon/owner)
|
||||
if(owner)
|
||||
if(isdullahan(owner))
|
||||
var/datum/species/dullahan/D = owner.dna.species
|
||||
if(isobj(D.myhead.loc))
|
||||
var/obj/O = D.myhead.loc
|
||||
O.say(speech_args[SPEECH_MESSAGE])
|
||||
speech_args[SPEECH_MESSAGE] = ""
|
||||
return speech_args
|
||||
@@ -157,7 +157,7 @@
|
||||
|
||||
/datum/action/proc/ApplyIcon(obj/screen/movable/action_button/current_button, force = FALSE)
|
||||
if(icon_icon && button_icon_state && ((current_button.button_icon_state != button_icon_state) || force))
|
||||
current_button.cut_overlays(TRUE)
|
||||
current_button.cut_overlays()
|
||||
current_button.add_overlay(mutable_appearance(icon_icon, button_icon_state))
|
||||
current_button.button_icon_state = button_icon_state
|
||||
|
||||
|
||||
+17
-10
@@ -431,25 +431,31 @@
|
||||
if(!owner)
|
||||
owner = M
|
||||
|
||||
/datum/ai_laws/proc/get_law_list(include_zeroth = 0, show_numbers = 1)
|
||||
/**
|
||||
* Generates a list of all laws on this datum, including rendered HTML tags if required
|
||||
*
|
||||
* Arguments:
|
||||
* * include_zeroth - Operator that controls if law 0 or law 666 is returned in the set
|
||||
* * show_numbers - Operator that controls if law numbers are prepended to the returned laws
|
||||
* * render_html - Operator controlling if HTML tags are rendered on the returned laws
|
||||
*/
|
||||
/datum/ai_laws/proc/get_law_list(include_zeroth = FALSE, show_numbers = TRUE, render_html = TRUE)
|
||||
var/list/data = list()
|
||||
|
||||
if (include_zeroth && devillaws && devillaws.len)
|
||||
for(var/i in devillaws)
|
||||
data += "[show_numbers ? "666:" : ""] <font color='#cc5500'>[i]</font>"
|
||||
if (include_zeroth && devillaws)
|
||||
for(var/law in devillaws)
|
||||
data += "[show_numbers ? "666:" : ""] [render_html ? "<font color='#cc5500'>[law]</font>" : law]"
|
||||
|
||||
if (include_zeroth && zeroth)
|
||||
data += "[show_numbers ? "0:" : ""] <font color='#ff0000'><b>[zeroth]</b></font>"
|
||||
data += "[show_numbers ? "0:" : ""] [render_html ? "<font color='#ff0000'><b>[zeroth]</b></font>" : zeroth]"
|
||||
|
||||
for(var/law in hacked)
|
||||
if (length(law) > 0)
|
||||
var/num = ionnum()
|
||||
data += "[show_numbers ? "[num]:" : ""] <font color='#660000'>[law]</font>"
|
||||
data += "[show_numbers ? "[ionnum()]:" : ""] [render_html ? "<font color='#660000'>[law]</font>" : law]"
|
||||
|
||||
for(var/law in ion)
|
||||
if (length(law) > 0)
|
||||
var/num = ionnum()
|
||||
data += "[show_numbers ? "[num]:" : ""] <font color='#547DFE'>[law]</font>"
|
||||
data += "[show_numbers ? "[ionnum()]:" : ""] [render_html ? "<font color='#547DFE'>[law]</font>" : law]"
|
||||
|
||||
var/number = 1
|
||||
for(var/law in inherent)
|
||||
@@ -459,6 +465,7 @@
|
||||
|
||||
for(var/law in supplied)
|
||||
if (length(law) > 0)
|
||||
data += "[show_numbers ? "[number]:" : ""] <font color='#990099'>[law]</font>"
|
||||
data += "[show_numbers ? "[number]:" : ""] [render_html ? "<font color='#990099'>[law]</font>" : law]"
|
||||
number++
|
||||
return data
|
||||
|
||||
|
||||
+17
-20
@@ -8,14 +8,14 @@
|
||||
var/window_options = "can_close=1;can_minimize=1;can_maximize=0;can_resize=1;titlebar=1;" // window option is set using window_id
|
||||
var/stylesheets[0]
|
||||
var/scripts[0]
|
||||
var/title_image
|
||||
var/head_elements
|
||||
var/body_elements
|
||||
var/head_content = ""
|
||||
var/content = ""
|
||||
var/static/datum/asset/simple/namespaced/common/common_asset = get_asset_datum(/datum/asset/simple/namespaced/common)
|
||||
|
||||
|
||||
/datum/browser/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null)
|
||||
/datum/browser/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, atom/nref = null)
|
||||
|
||||
user = nuser
|
||||
window_id = nwindow_id
|
||||
@@ -27,7 +27,6 @@
|
||||
height = nheight
|
||||
if (nref)
|
||||
ref = nref
|
||||
add_stylesheet("common", 'html/browser/common.css') // this CSS sheet is common to all UIs
|
||||
|
||||
/datum/browser/proc/add_head_content(nhead_content)
|
||||
head_content = nhead_content
|
||||
@@ -35,22 +34,21 @@
|
||||
/datum/browser/proc/set_window_options(nwindow_options)
|
||||
window_options = nwindow_options
|
||||
|
||||
/datum/browser/proc/set_title_image(ntitle_image)
|
||||
//title_image = ntitle_image
|
||||
|
||||
/datum/browser/proc/add_stylesheet(name, file)
|
||||
if(istype(name, /datum/asset/spritesheet))
|
||||
var/datum/asset/spritesheet/sheet = name
|
||||
stylesheets["spritesheet_[sheet.name].css"] = "data/spritesheets/[sheet.name]"
|
||||
else
|
||||
var/asset_name = "[name].css"
|
||||
|
||||
stylesheets[asset_name] = file
|
||||
if(!SSassets.cache[asset_name])
|
||||
register_asset(asset_name, file)
|
||||
|
||||
if (!SSassets.cache[asset_name])
|
||||
SSassets.transport.register_asset(asset_name, file)
|
||||
|
||||
/datum/browser/proc/add_script(name, file)
|
||||
scripts["[ckey(name)].js"] = file
|
||||
register_asset("[ckey(name)].js", file)
|
||||
SSassets.transport.register_asset("[ckey(name)].js", file)
|
||||
|
||||
/datum/browser/proc/set_content(ncontent)
|
||||
content = ncontent
|
||||
@@ -60,15 +58,13 @@
|
||||
|
||||
/datum/browser/proc/get_header()
|
||||
var/file
|
||||
head_content += "<link rel='stylesheet' type='text/css' href='[common_asset.get_url_mappings()["common.css"]]'>"
|
||||
for (file in stylesheets)
|
||||
head_content += "<link rel='stylesheet' type='text/css' href='[file]'>"
|
||||
head_content += "<link rel='stylesheet' type='text/css' href='[SSassets.transport.get_asset_url(file)]'>"
|
||||
|
||||
|
||||
for (file in scripts)
|
||||
head_content += "<script type='text/javascript' src='[file]'></script>"
|
||||
|
||||
var/title_attributes = "class='uiTitle'"
|
||||
if (title_image)
|
||||
title_attributes = "class='uiTitle icon' style='background-image: url([title_image]);'"
|
||||
head_content += "<script type='text/javascript' src='[SSassets.transport.get_asset_url(file)]'></script>"
|
||||
|
||||
return {"<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
@@ -79,7 +75,7 @@
|
||||
</head>
|
||||
<body scroll=auto>
|
||||
<div class='uiWrapper'>
|
||||
[title ? "<div class='uiTitleWrapper'><div [title_attributes]><tt>[title]</tt></div></div>" : ""]
|
||||
[title ? "<div class='uiTitleWrapper'><div class='uiTitle'><tt>[title]</tt></div></div>" : ""]
|
||||
<div class='uiContent'>
|
||||
"}
|
||||
//" This is here because else the rest of the file looks like a string in notepad++.
|
||||
@@ -105,10 +101,11 @@
|
||||
var/window_size = ""
|
||||
if(width && height)
|
||||
window_size = "size=[width]x[height];"
|
||||
common_asset.send(user)
|
||||
if(stylesheets.len)
|
||||
send_asset_list(user, stylesheets)
|
||||
SSassets.transport.send_assets(user, stylesheets)
|
||||
if(scripts.len)
|
||||
send_asset_list(user, scripts)
|
||||
SSassets.transport.send_assets(user, scripts)
|
||||
user << browse(get_content(), "window=[window_id];[window_size][window_options]")
|
||||
if(use_onclose)
|
||||
setup_onclose()
|
||||
@@ -169,7 +166,7 @@
|
||||
return Button3
|
||||
|
||||
//Same shit, but it returns the button number, could at some point support unlimited button amounts.
|
||||
/proc/askuser(var/mob/User,Message, Title, Button1="Ok", Button2, Button3, StealFocus = 1, Timeout = 6000)
|
||||
/proc/askuser(mob/User,Message, Title, Button1="Ok", Button2, Button3, StealFocus = 1, Timeout = 6000)
|
||||
if (!istype(User))
|
||||
if (istype(User, /client/))
|
||||
var/client/C = User
|
||||
@@ -188,7 +185,7 @@
|
||||
var/selectedbutton = 0
|
||||
var/stealfocus
|
||||
|
||||
/datum/browser/modal/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null, StealFocus = 1, Timeout = 6000)
|
||||
/datum/browser/modal/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, atom/nref = null, StealFocus = 1, Timeout = 6000)
|
||||
..()
|
||||
stealfocus = StealFocus
|
||||
if (!StealFocus)
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
H.apply_damage(source.force, BRUTE, BODY_ZONE_HEAD, wound_bonus=CANT_WOUND) // easy tiger, we'll get to that in a sec
|
||||
var/obj/item/bodypart/slit_throat = H.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(slit_throat)
|
||||
var/datum/wound/brute/cut/critical/screaming_through_a_slit_throat = new
|
||||
var/datum/wound/slash/critical/screaming_through_a_slit_throat = new
|
||||
screaming_through_a_slit_throat.apply_wound(slit_throat)
|
||||
H.apply_status_effect(/datum/status_effect/neck_slice)
|
||||
|
||||
|
||||
@@ -76,19 +76,11 @@
|
||||
return FALSE
|
||||
if(M.is_flying())
|
||||
return FALSE
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if(istype(H.belt, /obj/item/wormhole_jaunter))
|
||||
var/obj/item/wormhole_jaunter/J = H.belt
|
||||
//To freak out any bystanders
|
||||
H.visible_message("<span class='boldwarning'>[H] falls into [parent]!</span>")
|
||||
J.chasm_react(H)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/component/chasm/proc/drop(atom/movable/AM)
|
||||
//Make sure the item is still there after our sleep
|
||||
if(!AM || QDELETED(AM))
|
||||
if(!AM || QDELETED(AM) || SEND_SIGNAL(AM, COMSIG_MOVABLE_CHASM_DROP, src))
|
||||
return
|
||||
falling_atoms[AM] = (falling_atoms[AM] || 0) + 1
|
||||
var/turf/T = target_turf
|
||||
|
||||
@@ -203,9 +203,9 @@
|
||||
Set var amt to the value current cycle req is pointing to, its amount of type we need to delete
|
||||
Get var/surroundings list of things accessable to crafting by get_environment()
|
||||
Check the type of the current cycle req
|
||||
If its reagent then do a while loop, inside it try to locate() reagent containers, inside such containers try to locate needed reagent, if there isnt remove thing from surroundings
|
||||
If its reagent then do a while loop, inside it try to locate() reagent containers, inside such containers try to locate needed reagent, if there isn't remove thing from surroundings
|
||||
If there is enough reagent in the search result then delete the needed amount, create the same type of reagent with the same data var and put it into deletion list
|
||||
If there isnt enough take all of that reagent from the container, put into deletion list, substract the amt var by the volume of reagent, remove the container from surroundings list and keep searching
|
||||
If there isn't enough take all of that reagent from the container, put into deletion list, substract the amt var by the volume of reagent, remove the container from surroundings list and keep searching
|
||||
While doing above stuff check deletion list if it already has such reagnet, if yes merge instead of adding second one
|
||||
If its stack check if it has enough amount
|
||||
If yes create new stack with the needed amount and put in into deletion list, substract taken amount from the stack
|
||||
@@ -216,7 +216,7 @@
|
||||
Then do a loop over parts var of the recipe
|
||||
Do similar stuff to what we have done above, but now in deletion list, until the parts conditions are satisfied keep taking from the deletion list and putting it into parts list for return
|
||||
|
||||
After its done loop over deletion list and delete all the shit that wasnt taken by parts loop
|
||||
After its done loop over deletion list and delete all the shit that wasn't taken by parts loop
|
||||
|
||||
del_reqs return the list of parts resulting object will receive as argument of CheckParts proc, on the atom level it will add them all to the contents, on all other levels it calls ..() and does whatever is needed afterwards but from contents list already
|
||||
*/
|
||||
@@ -323,9 +323,12 @@
|
||||
if(user == parent)
|
||||
ui_interact(user)
|
||||
|
||||
/datum/component/personal_crafting/ui_state(mob/user)
|
||||
return GLOB.not_incapacitated_turf_state
|
||||
|
||||
//For the UI related things we're going to assume the user is a mob rather than typesetting it to an atom as the UI isn't generated if the parent is an atom
|
||||
/datum/component/personal_crafting/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.not_incapacitated_turf_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
/datum/component/personal_crafting/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
cur_category = categories[1]
|
||||
if(islist(categories[cur_category]))
|
||||
@@ -333,7 +336,7 @@
|
||||
cur_subcategory = subcats[1]
|
||||
else
|
||||
cur_subcategory = CAT_NONE
|
||||
ui = new(user, src, ui_key, "PersonalCrafting", "Crafting Menu", 700, 800, master_ui, state)
|
||||
ui = new(user, src, "PersonalCrafting")
|
||||
ui.open()
|
||||
|
||||
/datum/component/personal_crafting/ui_data(mob/user)
|
||||
@@ -413,13 +416,8 @@
|
||||
display_compact = !display_compact
|
||||
. = TRUE
|
||||
if("set_category")
|
||||
if(!isnull(params["category"]))
|
||||
cur_category = params["category"]
|
||||
if(!isnull(params["subcategory"]))
|
||||
if(params["subcategory"] == "0")
|
||||
cur_subcategory = ""
|
||||
else
|
||||
cur_subcategory = params["subcategory"]
|
||||
cur_category = params["category"]
|
||||
cur_subcategory = params["subcategory"] || ""
|
||||
. = TRUE
|
||||
|
||||
/datum/component/personal_crafting/proc/build_recipe_data(datum/crafting_recipe/R)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user