Merge branch 'master' into typing_indicators
This commit is contained in:
+19
-4
@@ -1,13 +1,28 @@
|
||||
#define TICK_LIMIT_RUNNING 80
|
||||
/// Percentage of tick to leave for master controller to run
|
||||
#define MAPTICK_MC_MIN_RESERVE 70
|
||||
/// internal_tick_usage is updated every tick by extools
|
||||
#define MAPTICK_LAST_INTERNAL_TICK_USAGE ((GLOB.internal_tick_usage / world.tick_lag) * 100)
|
||||
/// Tick limit while running normally
|
||||
#define TICK_BYOND_RESERVE 2
|
||||
#define TICK_LIMIT_RUNNING (max(100 - TICK_BYOND_RESERVE - MAPTICK_LAST_INTERNAL_TICK_USAGE, MAPTICK_MC_MIN_RESERVE))
|
||||
/// Tick limit used to resume things in stoplag
|
||||
#define TICK_LIMIT_TO_RUN 70
|
||||
/// Tick limit for MC while running
|
||||
#define TICK_LIMIT_MC 70
|
||||
#define TICK_LIMIT_MC_INIT_DEFAULT 98
|
||||
/// Tick limit while initializing
|
||||
#define TICK_LIMIT_MC_INIT_DEFAULT (100 - TICK_BYOND_RESERVE)
|
||||
|
||||
#define TICK_USAGE world.tick_usage //for general usage
|
||||
#define TICK_USAGE_REAL world.tick_usage //to be used where the result isn't checked
|
||||
/// for general usage of tick_usage
|
||||
#define TICK_USAGE world.tick_usage
|
||||
/// to be used where the result isn't checked
|
||||
#define TICK_USAGE_REAL world.tick_usage
|
||||
|
||||
/// Returns true if tick_usage is above the limit
|
||||
#define TICK_CHECK ( TICK_USAGE > Master.current_ticklimit )
|
||||
/// runs stoplag if tick_usage is above the limit
|
||||
#define CHECK_TICK ( TICK_CHECK ? stoplag() : 0 )
|
||||
|
||||
/// Returns true if tick usage is above 95, for high priority usage
|
||||
#define TICK_CHECK_HIGH_PRIORITY ( TICK_USAGE > 95 )
|
||||
/// runs stoplag if tick_usage is above 95, for high priority usage
|
||||
#define CHECK_TICK_HIGH_PRIORITY ( TICK_CHECK_HIGH_PRIORITY? stoplag() : 0 )
|
||||
|
||||
@@ -161,10 +161,14 @@
|
||||
#define ATMOS_TANK_O2 "o2=100000;TEMP=293.15"
|
||||
#define ATMOS_TANK_N2 "n2=100000;TEMP=293.15"
|
||||
#define ATMOS_TANK_AIRMIX "o2=2644;n2=10580;TEMP=293.15"
|
||||
|
||||
//LAVALAND
|
||||
#define LAVALAND_EQUIPMENT_EFFECT_PRESSURE 50 //what pressure you have to be under to increase the effect of equipment meant for lavaland
|
||||
#define LAVALAND_DEFAULT_ATMOS "o2=14;n2=23;TEMP=300"
|
||||
|
||||
//SNOSTATION
|
||||
#define ICEMOON_DEFAULT_ATMOS "o2=17;n2=63;TEMP=180"
|
||||
|
||||
//ATMOSIA GAS MONITOR TAGS
|
||||
#define ATMOS_GAS_MONITOR_INPUT_O2 "o2_in"
|
||||
#define ATMOS_GAS_MONITOR_OUTPUT_O2 "o2_out"
|
||||
|
||||
@@ -111,9 +111,6 @@
|
||||
#define GRAB_NECK 2
|
||||
#define GRAB_KILL 3
|
||||
|
||||
//slowdown when in softcrit
|
||||
#define SOFTCRIT_ADD_SLOWDOWN 6
|
||||
|
||||
/// Attack types for check_block()/run_block(). Flags, combinable.
|
||||
/// Attack was melee, whether or not armed.
|
||||
#define ATTACK_TYPE_MELEE (1<<0)
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#define CALTROP_BYPASS_SHOES 1
|
||||
#define CALTROP_IGNORE_WALKERS 2
|
||||
|
||||
// Spellcasting
|
||||
#define SPELL_SKIP_ALL_REQS (1<<0)
|
||||
#define SPELL_SKIP_CENTCOM (1<<1)
|
||||
#define SPELL_SKIP_STAT (1<<2)
|
||||
@@ -53,3 +54,24 @@
|
||||
#define SPELL_CULT_ARMOR (1<<10)
|
||||
#define SPELL_WIZARD_GARB (SPELL_WIZARD_HAT|SPELL_WIZARD_ROBE)
|
||||
#define SPELL_CULT_GARB (SPELL_CULT_HELMET|SPELL_CULT_ARMOR)
|
||||
|
||||
//// Identification ////
|
||||
// /datum/component/identification/identification_flags
|
||||
/// Delete on successful broad identification (so the main way we "uncover" how an object works, since this won't be on it to obfuscate it)
|
||||
#define ID_COMPONENT_DEL_ON_IDENTIFY (1<<0)
|
||||
/// We've already been successfully deepscanned by a deconstructive analyzer
|
||||
#define ID_COMPONENT_DECONSTRUCTOR_DEEPSCANNED (1<<1)
|
||||
|
||||
// /datum/component/identification/identification_effect_flags
|
||||
/// Block user from getting actions if they don't know how to use this. Triggered on equip.
|
||||
#define ID_COMPONENT_EFFECT_NO_ACTIONS (1<<0)
|
||||
|
||||
// /datum/component/identification/identification_method_flags
|
||||
/// Can be identified in a deconstructive analyzer
|
||||
#define ID_COMPONENT_IDENTIFY_WITH_DECONSTRUCTOR (1<<0)
|
||||
|
||||
// Return values for /datum/component/deitnfication/check_knowledge()
|
||||
/// Has no knowledge, default
|
||||
#define ID_COMPONENT_KNOWLEDGE_NONE 0
|
||||
/// Has full knowledge
|
||||
#define ID_COMPONENT_KNOWLEDGE_FULL 1
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#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)
|
||||
#define COMSIG_PARENT_EXAMINE "atom_examine" //from base of atom/examine(): (/mob)
|
||||
#define COMSIG_PARENT_EXAMINE "atom_examine" //from base of atom/examine(): (/mob, list/examine_return_text)
|
||||
#define COMSIG_ATOM_GET_EXAMINE_NAME "atom_examine_name" //from base of atom/get_examine_name(): (/mob, list/overrides)
|
||||
//Positions for overrides list
|
||||
#define EXAMINE_POSITION_ARTICLE 1
|
||||
@@ -110,7 +110,8 @@
|
||||
#define COMSIG_TURF_MULTIZ_NEW "turf_multiz_new" //from base of turf/New(): (turf/source, direction)
|
||||
|
||||
// /atom/movable signals
|
||||
#define COMSIG_MOVABLE_PRE_MOVE "movable_pre_move" //from base of atom/movable/Moved(): (/atom)
|
||||
#define COMSIG_MOVABLE_PRE_MOVE "movable_pre_move" ///from base of atom/movable/Moved(): (/atom)
|
||||
#define COMPONENT_MOVABLE_BLOCK_PRE_MOVE 1
|
||||
#define COMSIG_MOVABLE_MOVED "movable_moved" //from base of atom/movable/Moved(): (/atom, dir)
|
||||
#define COMSIG_MOVABLE_CROSS "movable_cross" //from base of atom/movable/Cross(): (/atom/movable)
|
||||
#define COMSIG_MOVABLE_CROSSED "movable_crossed" //from base of atom/movable/Crossed(): (/atom/movable)
|
||||
@@ -241,6 +242,8 @@
|
||||
#define COMSIG_ITEM_AFTERATTACK "item_afterattack" //from base of obj/item/afterattack(): (atom/target, mob/user, params)
|
||||
#define COMSIG_ITEM_ALT_AFTERATTACK "item_alt_afterattack" //from base of obj/item/altafterattack(): (atom/target, mob/user, proximity, params)
|
||||
#define COMSIG_ITEM_EQUIPPED "item_equip" //from base of obj/item/equipped(): (/mob/equipper, slot)
|
||||
// Do not grant actions on equip.
|
||||
#define COMPONENT_NO_GRANT_ACTIONS 1
|
||||
#define COMSIG_ITEM_DROPPED "item_drop" //from base of obj/item/dropped(): (mob/user)
|
||||
// relocated, tell inventory procs if those called this that the item isn't available anymore.
|
||||
#define COMPONENT_DROPPED_RELOCATION 1
|
||||
@@ -253,6 +256,9 @@
|
||||
// THE FOLLOWING TWO BLOCKS SHOULD RETURN BLOCK FLAGS AS DEFINED IN __DEFINES/combat.dm!
|
||||
#define COMSIG_ITEM_CHECK_BLOCK "check_block" //from base of obj/item/check_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
#define COMSIG_ITEM_RUN_BLOCK "run_block" //from base of obj/item/run_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
#define COMSIG_ITEM_DECONSTRUCTOR_DEEPSCAN "deconstructor_deepscan" //Called by deconstructive analyzers deepscanning an item: (obj/machinery/rnd/destructive_analyzer/analyzer_machine, mob/user, list/information_list)
|
||||
// Uncovered information
|
||||
#define COMPONENT_DEEPSCAN_UNCOVERED_INFORMATION 1
|
||||
|
||||
// /obj/item/clothing signals
|
||||
#define COMSIG_SHOES_STEP_ACTION "shoes_step_action" //from base of obj/item/clothing/shoes/proc/step_action(): ()
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
#define FEMALE_UNIFORM_FULL 1
|
||||
#define FEMALE_UNIFORM_TOP 2
|
||||
|
||||
//flags for outfits that have mutantrace variants: These are hard sprited too.
|
||||
//flags for outfits that have mutant race variants: Most of these require additional sprites to work.
|
||||
#define STYLE_DIGITIGRADE (1<<0) //jumpsuits, suits and shoes
|
||||
#define STYLE_MUZZLE (1<<1) //hats or masks
|
||||
#define STYLE_SNEK_TAURIC (1<<2) //taur-friendly suits
|
||||
@@ -140,6 +140,9 @@
|
||||
#define STYLE_HOOF_TAURIC (1<<4)
|
||||
#define STYLE_ALL_TAURIC (STYLE_SNEK_TAURIC|STYLE_PAW_TAURIC|STYLE_HOOF_TAURIC)
|
||||
#define STYLE_NO_ANTHRO_ICON (1<<5) //When digis fit the default sprite fine and need no copypasted states. This is the case of skirts and winter coats, for example.
|
||||
#define USE_SNEK_CLIP_MASK (1<<6)
|
||||
#define USE_QUADRUPED_CLIP_MASK (1<<7)
|
||||
#define USE_TAUR_CLIP_MASK (USE_SNEK_CLIP_MASK|USE_QUADRUPED_CLIP_MASK)
|
||||
|
||||
//digitigrade legs settings.
|
||||
#define NOT_DIGITIGRADE 0
|
||||
|
||||
@@ -174,7 +174,10 @@ GLOBAL_LIST_INIT(clawfootmob, typecacheof(list(
|
||||
/mob/living/simple_animal/pet/fox,
|
||||
/mob/living/simple_animal/chicken,
|
||||
/mob/living/simple_animal/hostile/bear,
|
||||
/mob/living/simple_animal/hostile/jungle/mega_arachnid
|
||||
/mob/living/simple_animal/hostile/jungle/mega_arachnid,
|
||||
/mob/living/simple_animal/hostile/asteroid/ice_whelp,
|
||||
/mob/living/simple_animal/hostile/asteroid/wolf,
|
||||
/mob/living/simple_animal/hostile/asteroid/polarbear
|
||||
)))
|
||||
|
||||
GLOBAL_LIST_INIT(barefootmob, typecacheof(list(
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
//Defines for atom layers and planes
|
||||
//KEEP THESE IN A NICE ACSCENDING ORDER, PLEASE
|
||||
|
||||
#define PLANE_VOID -100
|
||||
|
||||
#define CLICKCATCHER_PLANE -99
|
||||
|
||||
#define PLANE_SPACE -95
|
||||
@@ -8,6 +10,10 @@
|
||||
#define PLANE_SPACE_PARALLAX -90
|
||||
#define PLANE_SPACE_PARALLAX_RENDER_TARGET "PLANE_SPACE_PARALLAX"
|
||||
|
||||
#define OPENSPACE_LAYER 17 //Openspace layer over all
|
||||
#define OPENSPACE_PLANE -4 //Openspace plane below all turfs
|
||||
#define OPENSPACE_BACKDROP_PLANE -3 //Black square just over openspace plane to guaranteed cover all in openspace turf
|
||||
|
||||
#define FLOOR_PLANE -2
|
||||
#define FLOOR_PLANE_RENDER_TARGET "FLOOR_PLANE"
|
||||
#define GAME_PLANE -1
|
||||
@@ -61,7 +67,9 @@
|
||||
|
||||
#define BELOW_MOB_LAYER 3.7
|
||||
#define LYING_MOB_LAYER 3.8
|
||||
#define MOB_LOWER_LAYER 3.95
|
||||
//#define MOB_LAYER 4 //For easy recordkeeping; this is a byond define
|
||||
#define MOB_UPPER_LAYER 4.05
|
||||
#define ABOVE_MOB_LAYER 4.1
|
||||
#define WALL_OBJ_LAYER 4.25
|
||||
#define EDGED_TURF_LAYER 4.3
|
||||
@@ -84,6 +92,8 @@
|
||||
#define MASSIVE_OBJ_LAYER 11
|
||||
#define POINT_LAYER 12
|
||||
|
||||
#define CHAT_LAYER 12.1
|
||||
|
||||
#define EMISSIVE_BLOCKER_PLANE 12
|
||||
#define EMISSIVE_BLOCKER_LAYER 12
|
||||
#define EMISSIVE_BLOCKER_RENDER_TARGET "*EMISSIVE_BLOCKER_PLANE"
|
||||
@@ -104,10 +114,6 @@
|
||||
#define ABOVE_LIGHTING_LAYER 16
|
||||
#define ABOVE_LIGHTING_RENDER_TARGET "ABOVE_LIGHTING_PLANE"
|
||||
|
||||
#define FLOOR_OPENSPACE_PLANE 17
|
||||
#define OPENSPACE_LAYER 17
|
||||
#define OPENSPACE_RENDER_TARGET "OPENSPACE_PLANE"
|
||||
|
||||
#define BYOND_LIGHTING_PLANE 18
|
||||
#define BYOND_LIGHTING_LAYER 18
|
||||
#define BYOND_LIGHTING_RENDER_TARGET "BYOND_LIGHTING_PLANE"
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
|
||||
//used in design to specify which machine can build it
|
||||
#define IMPRINTER (1<<0) //For circuits. Uses glass/chemicals.
|
||||
#define PROTOLATHE (1<<1) //New stuff. Uses glass/metal/chemicals
|
||||
#define AUTOLATHE (1<<2) //Uses glass/metal only.
|
||||
#define CRAFTLATHE (1<<3) //Uses fuck if I know. For use eventually.
|
||||
#define MECHFAB (1<<4) //Remember, objects utilising this flag should have construction_time and construction_cost vars.
|
||||
#define BIOGENERATOR (1<<5) //Uses biomass
|
||||
#define LIMBGROWER (1<<6) //Uses synthetic flesh
|
||||
#define SMELTER (1<<7) //uses various minerals
|
||||
#define AUTOYLATHE (1<<8) // CITADEL ADD
|
||||
#define PROTOLATHE (1<<1) //New stuff. Uses materials/chemicals
|
||||
#define AUTOLATHE (1<<2) //Uses materials only.
|
||||
#define TOYLATHE (1<<3) //Glass/metal/plastic. Meant for toys.
|
||||
#define NO_PUBLIC_LATHE (1<<4) //prevents the design from being auto-unlocked by public auto(y)lathes.
|
||||
#define MECHFAB (1<<5) //Remember, objects utilising this flag should have construction_time and construction_cost vars.
|
||||
#define BIOGENERATOR (1<<6) //Uses biomass
|
||||
#define LIMBGROWER (1<<7) //Uses synthetic flesh
|
||||
#define SMELTER (1<<8) //uses various minerals
|
||||
#define NANITE_COMPILER (1<<9) //Prints nanite disks
|
||||
#define AUTOBOTTLER (1<<10) //Uses booze, for printing
|
||||
//Note: More then one of these can be added to a design but imprinter and lathe designs are incompatable.
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
//map template annihilate_bounds
|
||||
#define MAP_TEMPLATE_ANNIHILATE_PRELOAD 1 //annihilate bounds before starting loading
|
||||
#define MAP_TEMPLATE_ANNIHILATE_LOADING 2 //"sweeping" delete during loading
|
||||
+14
-1
@@ -35,10 +35,18 @@ require only minor tweaks.
|
||||
#define ZTRAIT_REEBE "Reebe"
|
||||
#define ZTRAIT_RESERVED "Transit/Reserved"
|
||||
#define ZTRAIT_AWAY "Away Mission"
|
||||
#define ZTRAIT_VR "Virtual Reality"
|
||||
#define ZTRAIT_SPACE_RUINS "Space Ruins"
|
||||
#define ZTRAIT_LAVA_RUINS "Lava Ruins"
|
||||
#define ZTRAIT_ICE_RUINS "Ice Ruins"
|
||||
#define ZTRAIT_ICE_RUINS_UNDERGROUND "Ice Ruins Underground"
|
||||
#define ZTRAIT_ISOLATED_RUINS "Isolated Ruins" //Placing ruins on z levels with this trait will use turf reservation instead of usual placement.
|
||||
|
||||
//boolean - weather types that occur on the level
|
||||
#define ZTRAIT_SNOWSTORM "Weather_Snowstorm"
|
||||
#define ZTRAIT_ASHSTORM "Weather_Ashstorm"
|
||||
#define ZTRAIT_ACIDRAIN "Weather_Acidrain"
|
||||
|
||||
// number - bombcap is multiplied by this before being applied to bombs
|
||||
#define ZTRAIT_BOMBCAP_MULTIPLIER "Bombcap Multiplier"
|
||||
|
||||
@@ -67,6 +75,7 @@ require only minor tweaks.
|
||||
#define ZTRAITS_SPACE list(ZTRAIT_LINKAGE = CROSSLINKED, ZTRAIT_SPACE_RUINS = TRUE)
|
||||
#define ZTRAITS_LAVALAND list(\
|
||||
ZTRAIT_MINING = TRUE, \
|
||||
ZTRAIT_ASHSTORM = TRUE, \
|
||||
ZTRAIT_LAVA_RUINS = TRUE, \
|
||||
ZTRAIT_BOMBCAP_MULTIPLIER = 5, \
|
||||
ZTRAIT_BASETURF = /turf/open/lava/smooth/lava_land_surface)
|
||||
@@ -101,4 +110,8 @@ require only minor tweaks.
|
||||
#define PLACE_BELOW "below" //On z levl below - centered on same tile
|
||||
#define PLACE_ISOLATED "isolated" //On isolated ruin z level
|
||||
//Map type stuff.
|
||||
#define MAP_TYPE_STATION "station"
|
||||
#define MAP_TYPE_STATION "station"
|
||||
|
||||
//Random z-levels name defines.
|
||||
#define AWAY_MISSION_NAME "Away Mission"
|
||||
#define VIRT_REALITY_NAME "Virtual Reality"
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
/// Flag for atoms, this flag ensures it isn't re-colored by materials. Useful for snowflake icons such as default toolboxes.
|
||||
#define MATERIAL_COLOR (1<<0)
|
||||
#define MATERIAL_ADD_PREFIX (1<<1)
|
||||
#define MATERIAL_NO_EFFECTS (1<<2)
|
||||
#define MATERIAL_EFFECTS (1<<2)
|
||||
#define MATERIAL_AFFECT_STATISTICS (1<<3)
|
||||
+23
-17
@@ -35,15 +35,15 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s
|
||||
#define BODY_ADJ_LAYER 27 //certain mutantrace features (snout, body markings) that must appear above the body parts
|
||||
#define GENITALS_FRONT_LAYER 26 //Draws some genitalia above clothes and the TAUR body if need be.
|
||||
#define BODY_LAYER 25 //underwear, undershirts, socks, eyes, lips(makeup)
|
||||
#define FRONT_MUTATIONS_LAYER 24 //mutations that should appear above body, body_adj and bodyparts layer (e.g. laser eyes)
|
||||
#define DAMAGE_LAYER 23 //damage indicators (cuts and burns)
|
||||
#define UNIFORM_LAYER 22
|
||||
#define ID_LAYER 21
|
||||
#define HANDS_PART_LAYER 20
|
||||
#define SHOES_LAYER 19
|
||||
#define GLOVES_LAYER 18
|
||||
#define EARS_LAYER 17
|
||||
#define BODY_TAUR_LAYER 16
|
||||
#define BODY_ADJ_UPPER_LAYER 24
|
||||
#define FRONT_MUTATIONS_LAYER 23 //mutations that should appear above body, body_adj and bodyparts layer (e.g. laser eyes)
|
||||
#define DAMAGE_LAYER 22 //damage indicators (cuts and burns)
|
||||
#define UNIFORM_LAYER 21
|
||||
#define ID_LAYER 20
|
||||
#define HANDS_PART_LAYER 19
|
||||
#define SHOES_LAYER 18
|
||||
#define GLOVES_LAYER 17
|
||||
#define EARS_LAYER 16
|
||||
#define SUIT_LAYER 15
|
||||
#define GENITALS_EXPOSED_LAYER 14
|
||||
#define GLASSES_LAYER 13
|
||||
@@ -71,14 +71,6 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s
|
||||
#define ABOVE_SHOES_LAYER (SHOES_LAYER-1)
|
||||
#define ABOVE_BODY_FRONT_LAYER (BODY_FRONT_LAYER-1)
|
||||
|
||||
|
||||
//Security levels
|
||||
#define SEC_LEVEL_GREEN 0
|
||||
#define SEC_LEVEL_BLUE 1
|
||||
#define SEC_LEVEL_AMBER 2
|
||||
#define SEC_LEVEL_RED 3
|
||||
#define SEC_LEVEL_DELTA 4
|
||||
|
||||
//some arbitrary defines to be used by self-pruning global lists. (see master_controller)
|
||||
#define PROCESS_KILL 26 //Used to trigger removal from a processing list
|
||||
|
||||
@@ -523,3 +515,17 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S
|
||||
#define NIGHTSHIFT_AREA_NONE 4 //default/highest.
|
||||
|
||||
#define UNTIL(X) while(!(X)) stoplag()
|
||||
|
||||
|
||||
//Scavenging element defines for special loot "events".
|
||||
#define SCAVENGING_FOUND_NOTHING "found_nothing"
|
||||
#define SCAVENGING_SPAWN_MOUSE "spawn_mouse"
|
||||
#define SCAVENGING_SPAWN_MICE "spawn_mice"
|
||||
#define SCAVENGING_SPAWN_TOM "spawn_tom_the_mouse"
|
||||
|
||||
//Scavenging element defines for ckey/mind restrictions.
|
||||
#define NO_LOOT_RESTRICTION 0
|
||||
#define LOOT_RESTRICTION_MIND 1
|
||||
#define LOOT_RESTRICTION_CKEY 2
|
||||
#define LOOT_RESTRICTION_MIND_PILE 3 //limited to the current pile.
|
||||
#define LOOT_RESTRICTION_CKEY_PILE 4 //Idem
|
||||
|
||||
@@ -265,6 +265,7 @@
|
||||
#define WIZARD_AGE_MIN 30 //youngest a wizard can be
|
||||
#define APPRENTICE_AGE_MIN 29 //youngest an apprentice can be
|
||||
#define SHOES_SLOWDOWN 0 //How much shoes slow you down by default. Negative values speed you up
|
||||
#define SHOES_SPEED_SLIGHT SHOES_SLOWDOWN - 1 // slightest speed boost to movement
|
||||
#define POCKET_STRIP_DELAY 40 //time taken (in deciseconds) to search somebody's pockets
|
||||
#define DOOR_CRUSH_DAMAGE 15 //the amount of damage that airlocks deal when they crush you
|
||||
|
||||
@@ -288,9 +289,6 @@
|
||||
|
||||
#define HUMAN_FIRE_STACK_ICON_NUM 3
|
||||
|
||||
#define PULL_PRONE_SLOWDOWN 0.6
|
||||
|
||||
#define TYPING_INDICATOR_TIMEOUT 5 MINUTES
|
||||
|
||||
#define FIREMAN_CARRY_SLOWDOWN 0
|
||||
#define PIGGYBACK_CARRY_SLOWDOWN 1
|
||||
#define SLEEP_CHECK_DEATH(X) sleep(X); if(QDELETED(src) || stat == DEAD) return;
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/// How much someone is slowed from pulling a prone human
|
||||
#define PULL_PRONE_SLOWDOWN 0.6
|
||||
/// How much someone is slowed from fireman carrying a human
|
||||
#define FIREMAN_CARRY_SLOWDOWN 0
|
||||
/// How much someone is slowed by piggybacking a human
|
||||
#define PIGGYBACK_CARRY_SLOWDOWN 1
|
||||
/// slowdown when in softcrit. Note that crawling slowdown will also apply at the same time!
|
||||
#define SOFTCRIT_ADD_SLOWDOWN 2
|
||||
/// slowdown when crawling
|
||||
#define CRAWLING_ADD_SLOWDOWN 4
|
||||
@@ -1,12 +1,3 @@
|
||||
#define MOVESPEED_DATA_INDEX_PRIORITY 1
|
||||
#define MOVESPEED_DATA_INDEX_FLAGS 2
|
||||
#define MOVESPEED_DATA_INDEX_MULTIPLICATIVE_SLOWDOWN 3
|
||||
#define MOVESPEED_DATA_INDEX_MOVETYPE 4
|
||||
#define MOVESPEED_DATA_INDEX_BL_MOVETYPE 5
|
||||
#define MOVESPEED_DATA_INDEX_CONFLICT 6
|
||||
|
||||
#define MOVESPEED_DATA_INDEX_MAX 6
|
||||
|
||||
//flags
|
||||
#define IGNORE_NOSLOW (1 << 0)
|
||||
|
||||
@@ -15,70 +6,7 @@
|
||||
#define MOVE_CONFLICT_JETPACK "JETPACK"
|
||||
|
||||
//ids
|
||||
#define MOVESPEED_ID_SANITY "mood_sanity"
|
||||
|
||||
#define MOVESPEED_ID_MOB_WALK_RUN_CONFIG_SPEED "MOB_WALK_RUN"
|
||||
#define MOVESPEED_ID_MOB_GRAB_STATE "MOB_GRAB_STATE"
|
||||
#define MOVESPEED_ID_MOB_EQUIPMENT "MOB_EQUIPMENT"
|
||||
#define MOVESPEED_ID_MOB_GRAVITY "MOB_GRAVITY"
|
||||
#define MOVESPEED_ID_CONFIG_SPEEDMOD "MOB_CONFIG_MODIFIER"
|
||||
|
||||
#define MOVESPEED_ID_SLIME_REAGENTMOD "SLIME_REAGENT_MODIFIER"
|
||||
#define MOVESPEED_ID_SLIME_HEALTHMOD "SLIME_HEALTH_MODIFIER"
|
||||
#define MOVESPEED_ID_SLIME_TEMPMOD "SLIME_TEMPERATURE_MODIFIER"
|
||||
|
||||
#define MOVESPEED_ID_SLIME_STATUS "SLIME_STATUS"
|
||||
|
||||
#define MOVESPEED_ID_TARANTULA_WEB "TARANTULA_WEB"
|
||||
|
||||
#define MOVESPEED_ID_LIVING_TURF_SPEEDMOD "LIVING_TURF_SPEEDMOD"
|
||||
#define MOVESPEED_ID_LIVING_LIMBLESS "LIVING_LIMBLESS"
|
||||
|
||||
#define MOVESPEED_ID_CARBON_SOFTCRIT "CARBON_SOFTCRIT"
|
||||
#define MOVESPEED_ID_CARBON_OLDSPEED "CARBON_DEPRECATED_SPEED"
|
||||
|
||||
#define MOVESPEED_ID_DNA_VAULT "DNA_VAULT"
|
||||
|
||||
#define MOVESPEED_ID_YELLOW_ORB "YELLOW_ORB"
|
||||
|
||||
#define MOVESPEED_ID_TARFOOT "TARFOOT"
|
||||
|
||||
#define MOVESPEED_ID_SEPIA "SEPIA"
|
||||
|
||||
#define MOVESPEED_ID_MONKEY_REAGENT_SPEEDMOD "MONKEY_REAGENT_SPEEDMOD"
|
||||
#define MOVESPEED_ID_MONKEY_TEMPERATURE_SPEEDMOD "MONKEY_TEMPERATURE_SPEEDMOD"
|
||||
#define MOVESPEED_ID_MONKEY_HEALTH_SPEEDMOD "MONKEY_HEALTH_SPEEDMOD"
|
||||
|
||||
#define MOVESPEED_ID_CHANGELING_MUSCLES "CHANGELING_MUSCLES"
|
||||
|
||||
#define MOVESPEED_ID_SIMPLEMOB_VARSPEED "SIMPLEMOB_VARSPEED_MODIFIER"
|
||||
#define MOVESPEED_ID_ADMIN_VAREDIT "ADMIN_VAREDIT_MODIFIER"
|
||||
|
||||
#define MOVESPEED_ID_PAI_SPACEWALK_SPEEDMOD "PAI_SPACEWALK_MODIFIER"
|
||||
|
||||
#define MOVESPEED_ID_SANITY "MOOD_SANITY"
|
||||
|
||||
#define MOVESPEED_ID_SPECIES "SPECIES_SPEED_MOD"
|
||||
|
||||
#define MOVESPEED_ID_SMALL_STRIDE "SMALL_STRIDE"
|
||||
#define MOVESPEED_ID_PRONE_DRAGGING "PRONE_DRAG"
|
||||
#define MOVESPEED_ID_HUMAN_CARRYING "HUMAN_CARRY"
|
||||
#define MOVESPEED_ID_SHRINK_RAY "SHRUNKEN_SPEED_MODIFIER"
|
||||
|
||||
#define MOVESPEED_ID_SLAUGHTER "SLAUGHTER"
|
||||
|
||||
#define MOVESPEED_ID_CYBER_THRUSTER "CYBER_IMPLANT_THRUSTER"
|
||||
#define MOVESPEED_ID_JETPACK "JETPACK"
|
||||
|
||||
#define MOVESPEED_ID_MKULTRA "MKULTRA"
|
||||
|
||||
#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"
|
||||
#define MOVESPEED_ID_DAMAGE_SLOWDOWN "DAMAGE"
|
||||
#define MOVESPEED_ID_DAMAGE_SLOWDOWN_FLYING "FLYING"
|
||||
|
||||
#define MOVESPEED_ID_CIRRHOSIS "CIRRHOSIS"
|
||||
#define MOVESPEED_ID_MOB_GRAB_STATE "mob_grab_state"
|
||||
#define MOVESPEED_ID_MOB_WALK_RUN "mob_walk_run"
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
#define NANITE_CLOUD_DISABLE 2
|
||||
#define NANITE_CLOUD_ENABLE 3
|
||||
|
||||
///Nanite Protocol types
|
||||
#define NANITE_PROTOCOL_REPLICATION "nanite_replication"
|
||||
#define NANITE_PROTOCOL_STORAGE "nanite_storage"
|
||||
|
||||
///Nanite extra settings types: used to help uis know what type an extra setting is
|
||||
#define NESTYPE_TEXT "text"
|
||||
#define NESTYPE_NUMBER "number"
|
||||
|
||||
@@ -38,11 +38,12 @@
|
||||
#define BLOCK_GAS_SMOKE_EFFECT (1<<2) //blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY!
|
||||
#define ALLOWINTERNALS (1<<3) //mask allows internals
|
||||
#define NOSLIP (1<<4) //prevents from slipping on wet floors, in space etc
|
||||
#define THICKMATERIAL (1<<5) //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body.
|
||||
#define VOICEBOX_TOGGLABLE (1<<6) //The voicebox in this clothing can be toggled.
|
||||
#define VOICEBOX_DISABLED (1<<7) //The voicebox is currently turned off.
|
||||
#define IGNORE_HAT_TOSS (1<<8) //Hats with negative effects when worn (i.e the tinfoil hat).
|
||||
#define SCAN_REAGENTS (1<<9) // Allows helmets and glasses to scan reagents.
|
||||
#define NOSLIP_ICE (1<<5) //prevents from slipping on frozen floors
|
||||
#define THICKMATERIAL (1<<6) //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body.
|
||||
#define VOICEBOX_TOGGLABLE (1<<7) //The voicebox in this clothing can be toggled.
|
||||
#define VOICEBOX_DISABLED (1<<8) //The voicebox is currently turned off.
|
||||
#define IGNORE_HAT_TOSS (1<<9) //Hats with negative effects when worn (i.e the tinfoil hat).
|
||||
#define SCAN_REAGENTS (1<<10) // Allows helmets and glasses to scan reagents.
|
||||
|
||||
// Flags for the organ_flags var on /obj/item/organ
|
||||
|
||||
@@ -52,3 +53,4 @@
|
||||
#define ORGAN_EXTERNAL (1<<3) //Was this organ implanted/inserted/etc, if true will not be removed during species change.
|
||||
#define ORGAN_VITAL (1<<4) //Currently only the brain
|
||||
#define ORGAN_NO_SPOIL (1<<5) //Do not spoil under any circumstances
|
||||
#define ORGAN_NO_DISMEMBERMENT (1<<6) //Immune to disembowelment.
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#define FREQ_ENGINEERING 1357 // Engineering comms frequency, orange
|
||||
#define FREQ_SECURITY 1359 // Security comms frequency, red
|
||||
|
||||
#define FREQ_HOLOGRID_SOLUTION 1433
|
||||
#define FREQ_STATUS_DISPLAYS 1435
|
||||
#define FREQ_ATMOS_ALARMS 1437 // air alarms <-> alert computers
|
||||
#define FREQ_ATMOS_CONTROL 1439 // air alarms <-> vents and scrubbers
|
||||
|
||||
@@ -22,11 +22,23 @@
|
||||
// Is an open container for all intents and purposes.
|
||||
#define OPENCONTAINER (REFILLABLE | DRAINABLE | TRANSPARENT)
|
||||
|
||||
//reagents_value defines, for cargo stuff.
|
||||
//reagents_value defines, basically a multiplier used in reagent containers cargo selling.
|
||||
#define DEFAULT_REAGENTS_VALUE 1
|
||||
#define NO_REAGENTS_VALUE 0
|
||||
#define HARVEST_REAGENTS_VALUE 0.3
|
||||
|
||||
/// Standard reagents value defines.
|
||||
/// Take a grain of salt, only "rare" reagents should have a decent value here, for balance reasons.
|
||||
/// TL;DR Think of it also like general market request price more than rarity.
|
||||
#define REAGENT_VALUE_NONE 0 //all the stuff pretty much available in potentially unlimited quantities.
|
||||
#define REAGENT_VALUE_VERY_COMMON 0.1 //same as above, just not so unlimited.
|
||||
#define REAGENT_VALUE_COMMON 0.5
|
||||
#define REAGENT_VALUE_UNCOMMON 1
|
||||
#define REAGENT_VALUE_RARE 2.5
|
||||
#define REAGENT_VALUE_VERY_RARE 5
|
||||
#define REAGENT_VALUE_EXCEPTIONAL 10 //extremely rare or tedious to craft, possibly unsynthetizable, reagents.
|
||||
#define REAGENT_VALUE_AMAZING 30 //reserved ONLY for non-mass produceable, unsynthetizable reagents.
|
||||
#define REAGENT_VALUE_GLORIOUS 300 //reagents that shouldn't be possible to get or farm under normal conditions. e.g. Romerol, fungal TB, adminordrazine...
|
||||
|
||||
#define TOUCH 1 // splashing
|
||||
#define INGEST 2 // ingestion
|
||||
|
||||
@@ -60,7 +60,8 @@
|
||||
|
||||
#define DESIGN_ID_IGNORE "IGNORE_THIS_DESIGN"
|
||||
|
||||
#define RESEARCH_MATERIAL_RECLAMATION_ID "__materials"
|
||||
#define RESEARCH_MATERIAL_RECLAMATION_ID "__materials"
|
||||
#define RESEARCH_DEEP_SCAN_ID "__deepscan"
|
||||
|
||||
//When adding new types, update the list below!
|
||||
#define TECHWEB_POINT_TYPE_GENERIC "General Research"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
//Security levels
|
||||
#define SEC_LEVEL_GREEN 1
|
||||
#define SEC_LEVEL_BLUE 2
|
||||
#define SEC_LEVEL_AMBER 3
|
||||
#define SEC_LEVEL_RED 4
|
||||
#define SEC_LEVEL_DELTA 5
|
||||
|
||||
//Macro helpers.
|
||||
#define SECLEVEL2NUM(text) (GLOB.all_security_levels.Find(text))
|
||||
#define NUM2SECLEVEL(num) (ISINRANGE(num, 1, length(GLOB.all_security_levels)) ? GLOB.all_security_levels[num] : null)
|
||||
@@ -0,0 +1,28 @@
|
||||
/// true/false
|
||||
#define SKILL_PROGRESSION_BINARY 1
|
||||
/// numerical
|
||||
#define SKILL_PROGRESSION_NUMERICAL 2
|
||||
/// Enum
|
||||
#define SKILL_PROGRESSION_ENUM 3
|
||||
|
||||
/// Max value of skill for numerical skills
|
||||
#define SKILL_NUMERICAL_MAX 100
|
||||
/// Min value of skill for numerical skills
|
||||
#define SKILL_NUMERICAL_MIN 0
|
||||
|
||||
// Standard values for job starting skills
|
||||
|
||||
#define STARTING_SKILL_SURGERY_MEDICAL 35 //out of SKILL_NUMERICAL_MAX
|
||||
|
||||
// Standard values for job starting skill affinities
|
||||
|
||||
#define STARTING_SKILL_AFFINITY_SURGERY_MEDICAL 1.2
|
||||
|
||||
// Standard values for skill gain (this is multiplied by affinity)
|
||||
|
||||
#define SKILL_GAIN_SURGERY_PER_STEP 0.25
|
||||
|
||||
// Misc
|
||||
|
||||
/// 40% speedup at 100 skill
|
||||
#define SURGERY_SKILL_SPEEDUP_NUMERICAL_SCALE(number) clamp(number / 250, 1, 2)
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
#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
|
||||
|
||||
#define STATUS_EFFECT_REGENERATIVE_CORE /datum/status_effect/regenerative_core //removes damage slowdown while giving a slow regenerating effect
|
||||
|
||||
/////////////
|
||||
// DEBUFFS //
|
||||
/////////////
|
||||
@@ -78,7 +80,7 @@
|
||||
|
||||
#define STATUS_EFFECT_CRUSHERMARK /datum/status_effect/crusher_mark //if struck with a proto-kinetic crusher, takes a ton of damage
|
||||
|
||||
#define STATUS_EFFECT_SAWBLEED /datum/status_effect/saw_bleed //if the bleed builds up enough, takes a ton of damage
|
||||
#define STATUS_EFFECT_SAWBLEED /datum/status_effect/stacking/saw_bleed //if the bleed builds up enough, takes a ton of damage
|
||||
|
||||
#define STATUS_EFFECT_NECKSLICE /datum/status_effect/neck_slice //Creates the flavor messages for the neck-slice
|
||||
|
||||
|
||||
@@ -132,8 +132,15 @@
|
||||
|
||||
#define RUNLEVELS_DEFAULT (RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME)
|
||||
|
||||
|
||||
|
||||
// SSair run section
|
||||
#define SSAIR_PIPENETS 1
|
||||
#define SSAIR_ATMOSMACHINERY 2
|
||||
#define SSAIR_REACTQUEUE 3
|
||||
#define SSAIR_EXCITEDGROUPS 4
|
||||
#define SSAIR_HIGHPRESSURE 5
|
||||
#define SSAIR_HOTSPOTS 6
|
||||
#define SSAIR_SUPERCONDUCTIVITY 7
|
||||
#define SSAIR_REBUILD_PIPENETS 8
|
||||
|
||||
#define COMPILE_OVERLAYS(A)\
|
||||
if (TRUE) {\
|
||||
|
||||
+38
-37
@@ -78,6 +78,7 @@
|
||||
#define TRAIT_MONKEYLIKE "monkeylike" //sets IsAdvancedToolUser to FALSE
|
||||
#define TRAIT_PACIFISM "pacifism"
|
||||
#define TRAIT_IGNORESLOWDOWN "ignoreslow"
|
||||
#define TRAIT_IGNOREDAMAGESLOWDOWN "ignoredamageslowdown"
|
||||
#define TRAIT_DEATHCOMA "deathcoma" //Causes death-like unconsciousness
|
||||
#define TRAIT_FAKEDEATH "fakedeath" //Makes the owner appear as dead to most forms of medical examination
|
||||
#define TRAIT_DISFIGURED "disfigured"
|
||||
@@ -152,6 +153,42 @@
|
||||
#define TRAIT_PASSTABLE "passtable"
|
||||
#define TRAIT_GIANT "giant"
|
||||
#define TRAIT_DWARF "dwarf"
|
||||
#define TRAIT_ALCOHOL_TOLERANCE "alcohol_tolerance"
|
||||
#define TRAIT_AGEUSIA "ageusia"
|
||||
#define TRAIT_HEAVY_SLEEPER "heavy_sleeper"
|
||||
#define TRAIT_NIGHT_VISION "night_vision"
|
||||
#define TRAIT_LIGHT_STEP "light_step"
|
||||
#define TRAIT_SILENT_STEP "silent_step"
|
||||
#define TRAIT_SPEEDY_STEP "speedy_step"
|
||||
#define TRAIT_SPIRITUAL "spiritual"
|
||||
#define TRAIT_VORACIOUS "voracious"
|
||||
#define TRAIT_SELF_AWARE "self_aware"
|
||||
#define TRAIT_FREERUNNING "freerunning"
|
||||
#define TRAIT_SKITTISH "skittish"
|
||||
#define TRAIT_POOR_AIM "poor_aim"
|
||||
#define TRAIT_PROSOPAGNOSIA "prosopagnosia"
|
||||
#define TRAIT_DRUNK_HEALING "drunk_healing"
|
||||
#define TRAIT_TAGGER "tagger"
|
||||
#define TRAIT_PHOTOGRAPHER "photographer"
|
||||
#define TRAIT_MUSICIAN "musician"
|
||||
#define TRAIT_PERMABONER "permanent_arousal"
|
||||
#define TRAIT_NEVERBONER "never_aroused"
|
||||
#define TRAIT_MASO "masochism"
|
||||
#define TRAIT_HIGH_BLOOD "high_blood"
|
||||
#define TRAIT_PARA "paraplegic"
|
||||
#define TRAIT_EMPATH "empath"
|
||||
#define TRAIT_FRIENDLY "friendly"
|
||||
#define TRAIT_CULT_EYES "cult_eyes"
|
||||
#define TRAIT_AUTO_CATCH_ITEM "auto_catch_item"
|
||||
#define TRAIT_CLOWN_MENTALITY "clown_mentality" // The future is now, clownman.
|
||||
#define TRAIT_FREESPRINT "free_sprinting"
|
||||
#define TRAIT_XRAY_VISION "xray_vision"
|
||||
#define TRAIT_THERMAL_VISION "thermal_vision"
|
||||
#define TRAIT_NO_TELEPORT "no-teleport" //you just can't
|
||||
#define TRAIT_NO_INTERNALS "no-internals"
|
||||
#define TRAIT_NO_ALCOHOL "alcohol_intolerance"
|
||||
#define TRAIT_MUTATION_STASIS "mutation_stasis" //Prevents processed genetics mutations from processing.
|
||||
#define TRAIT_FAST_PUMP "fast_pump"
|
||||
|
||||
// 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)
|
||||
@@ -185,43 +222,6 @@
|
||||
// item traits
|
||||
#define TRAIT_NODROP "nodrop"
|
||||
|
||||
#define TRAIT_ALCOHOL_TOLERANCE "alcohol_tolerance"
|
||||
#define TRAIT_AGEUSIA "ageusia"
|
||||
#define TRAIT_HEAVY_SLEEPER "heavy_sleeper"
|
||||
#define TRAIT_NIGHT_VISION "night_vision"
|
||||
#define TRAIT_LIGHT_STEP "light_step"
|
||||
#define TRAIT_SILENT_STEP "silent_step"
|
||||
#define TRAIT_SPEEDY_STEP "speedy_step"
|
||||
#define TRAIT_SPIRITUAL "spiritual"
|
||||
#define TRAIT_VORACIOUS "voracious"
|
||||
#define TRAIT_SELF_AWARE "self_aware"
|
||||
#define TRAIT_FREERUNNING "freerunning"
|
||||
#define TRAIT_SKITTISH "skittish"
|
||||
#define TRAIT_POOR_AIM "poor_aim"
|
||||
#define TRAIT_PROSOPAGNOSIA "prosopagnosia"
|
||||
#define TRAIT_DRUNK_HEALING "drunk_healing"
|
||||
#define TRAIT_TAGGER "tagger"
|
||||
#define TRAIT_PHOTOGRAPHER "photographer"
|
||||
#define TRAIT_MUSICIAN "musician"
|
||||
#define TRAIT_PERMABONER "permanent_arousal"
|
||||
#define TRAIT_NEVERBONER "never_aroused"
|
||||
#define TRAIT_NYMPHO "nymphomania"
|
||||
#define TRAIT_MASO "masochism"
|
||||
#define TRAIT_HIGH_BLOOD "high_blood"
|
||||
#define TRAIT_PARA "paraplegic"
|
||||
#define TRAIT_EMPATH "empath"
|
||||
#define TRAIT_FRIENDLY "friendly"
|
||||
#define TRAIT_CULT_EYES "cult_eyes"
|
||||
#define TRAIT_AUTO_CATCH_ITEM "auto_catch_item"
|
||||
#define TRAIT_CLOWN_MENTALITY "clown_mentality" // The future is now, clownman.
|
||||
#define TRAIT_FREESPRINT "free_sprinting"
|
||||
#define TRAIT_XRAY_VISION "xray_vision"
|
||||
#define TRAIT_THERMAL_VISION "thermal_vision"
|
||||
#define TRAIT_NO_TELEPORT "no-teleport" //you just can't
|
||||
#define TRAIT_NO_INTERNALS "no-internals"
|
||||
#define TRAIT_NO_ALCOHOL "alcohol_intolerance"
|
||||
#define TRAIT_MUTATION_STASIS "mutation_stasis" //Prevents processed genetics mutations from processing.
|
||||
|
||||
// common trait sources
|
||||
#define TRAIT_GENERIC "generic"
|
||||
#define EYE_DAMAGE "eye_damage"
|
||||
@@ -246,6 +246,7 @@
|
||||
#define BLOODSUCKER_TRAIT "bloodsucker"
|
||||
#define SHOES_TRAIT "shoes" //inherited from your sweet kicks
|
||||
#define GLOVE_TRAIT "glove" //inherited by your cool gloves
|
||||
#define BOOK_TRAIT "granter (book)" // knowledge is power
|
||||
|
||||
// unique trait sources, still defines
|
||||
#define STATUE_MUTE "statue"
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
#define VV_HK_EXPOSE "expose"
|
||||
#define VV_HK_CALLPROC "proc_call"
|
||||
#define VV_HK_MARK "mark"
|
||||
#define VV_HK_ADDCOMPONENT "addcomponent"
|
||||
#define VV_HK_MODIFY_TRAITS "modtraits"
|
||||
|
||||
// /atom
|
||||
|
||||
+98
-40
@@ -11,6 +11,7 @@
|
||||
|
||||
#define LAZYINITLIST(L) if (!L) L = list()
|
||||
#define UNSETEMPTY(L) if (L && !length(L)) L = null
|
||||
#define LAZYCOPY(L) (L ? L.Copy() : list() )
|
||||
#define LAZYREMOVE(L, I) if(L) { L -= I; if(!length(L)) { L = null; } }
|
||||
#define LAZYADD(L, I) if(!L) { L = list(); } L += I;
|
||||
#define LAZYOR(L, I) if(!L) { L = list(); } L |= I;
|
||||
@@ -21,34 +22,47 @@
|
||||
#define LAZYCLEARLIST(L) if(L) L.Cut()
|
||||
#define SANITIZE_LIST(L) ( islist(L) ? L : list() )
|
||||
#define reverseList(L) reverseRange(L.Copy())
|
||||
#define LAZYADDASSOC(L, K, V) if(!L) { L = list(); } L[K] += list(V);
|
||||
#define LAZYREMOVEASSOC(L, K, V) if(L) { if(L[K]) { L[K] -= V; if(!length(L[K])) L -= K; } if(!length(L)) L = null; }
|
||||
|
||||
// binary search sorted insert
|
||||
// IN: Object to be inserted
|
||||
// LIST: List to insert object into
|
||||
// TYPECONT: The typepath of the contents of the list
|
||||
// COMPARE: The variable on the objects to compare
|
||||
#define BINARY_INSERT(IN, LIST, TYPECONT, COMPARE) \
|
||||
var/__BIN_CTTL = length(LIST);\
|
||||
if(!__BIN_CTTL) {\
|
||||
LIST += IN;\
|
||||
} else {\
|
||||
var/__BIN_LEFT = 1;\
|
||||
var/__BIN_RIGHT = __BIN_CTTL;\
|
||||
var/__BIN_MID = (__BIN_LEFT + __BIN_RIGHT) >> 1;\
|
||||
var/##TYPECONT/__BIN_ITEM;\
|
||||
while(__BIN_LEFT < __BIN_RIGHT) {\
|
||||
__BIN_ITEM = LIST[__BIN_MID];\
|
||||
if(__BIN_ITEM.##COMPARE <= IN.##COMPARE) {\
|
||||
__BIN_LEFT = __BIN_MID + 1;\
|
||||
} else {\
|
||||
__BIN_RIGHT = __BIN_MID;\
|
||||
/// Passed into BINARY_INSERT to compare keys
|
||||
#define COMPARE_KEY __BIN_LIST[__BIN_MID]
|
||||
/// Passed into BINARY_INSERT to compare values
|
||||
#define COMPARE_VALUE __BIN_LIST[__BIN_LIST[__BIN_MID]]
|
||||
|
||||
/****
|
||||
* Binary search sorted insert
|
||||
* INPUT: Object to be inserted
|
||||
* LIST: List to insert object into
|
||||
* TYPECONT: The typepath of the contents of the list
|
||||
* COMPARE: The object to compare against, usualy the same as INPUT
|
||||
* COMPARISON: The variable on the objects to compare
|
||||
*/
|
||||
#define BINARY_INSERT(INPUT, LIST, TYPECONT, COMPARE, COMPARISON, COMPTYPE) \
|
||||
do {\
|
||||
var/list/__BIN_LIST = LIST;\
|
||||
var/__BIN_CTTL = length(__BIN_LIST);\
|
||||
if(!__BIN_CTTL) {\
|
||||
__BIN_LIST += INPUT;\
|
||||
} else {\
|
||||
var/__BIN_LEFT = 1;\
|
||||
var/__BIN_RIGHT = __BIN_CTTL;\
|
||||
var/__BIN_MID = (__BIN_LEFT + __BIN_RIGHT) >> 1;\
|
||||
var/##TYPECONT/__BIN_ITEM;\
|
||||
while(__BIN_LEFT < __BIN_RIGHT) {\
|
||||
__BIN_ITEM = COMPTYPE;\
|
||||
if(__BIN_ITEM.##COMPARISON <= COMPARE.##COMPARISON) {\
|
||||
__BIN_LEFT = __BIN_MID + 1;\
|
||||
} else {\
|
||||
__BIN_RIGHT = __BIN_MID;\
|
||||
};\
|
||||
__BIN_MID = (__BIN_LEFT + __BIN_RIGHT) >> 1;\
|
||||
};\
|
||||
__BIN_MID = (__BIN_LEFT + __BIN_RIGHT) >> 1;\
|
||||
__BIN_ITEM = COMPTYPE;\
|
||||
__BIN_MID = __BIN_ITEM.##COMPARISON > COMPARE.##COMPARISON ? __BIN_MID : __BIN_MID + 1;\
|
||||
__BIN_LIST.Insert(__BIN_MID, INPUT);\
|
||||
};\
|
||||
__BIN_ITEM = LIST[__BIN_MID];\
|
||||
__BIN_MID = __BIN_ITEM.##COMPARE > IN.##COMPARE ? __BIN_MID : __BIN_MID + 1;\
|
||||
LIST.Insert(__BIN_MID, IN);\
|
||||
}
|
||||
} while(FALSE)
|
||||
|
||||
//Returns a list in plain english as a string
|
||||
/proc/english_list(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
|
||||
@@ -231,40 +245,77 @@
|
||||
|
||||
//Picks a random element from a list based on a weighting system:
|
||||
//1. Adds up the total of weights for each element
|
||||
//2. Gets a number between 1 and that total
|
||||
//2. Gets the total from 0% to 100% of previous total value.
|
||||
//3. For each element in the list, subtracts its weighting from that number
|
||||
//4. If that makes the number 0 or less, return that element.
|
||||
/proc/pickweight(list/L)
|
||||
/proc/pickweight(list/L, base_weight = 1)
|
||||
var/total = 0
|
||||
var/item
|
||||
for (item in L)
|
||||
if (!L[item])
|
||||
L[item] = 1
|
||||
L[item] = base_weight
|
||||
total += L[item]
|
||||
|
||||
total = rand(1, total)
|
||||
total = rand() * total
|
||||
for (item in L)
|
||||
total -=L [item]
|
||||
total -= L[item]
|
||||
if (total <= 0)
|
||||
return item
|
||||
|
||||
return null
|
||||
|
||||
/proc/pickweightAllowZero(list/L) //The original pickweight proc will sometimes pick entries with zero weight. I'm not sure if changing the original will break anything, so I left it be.
|
||||
//Picks a number of elements from a list based on weight.
|
||||
//This is highly optimised and good for things like grabbing 200 items from a list of 40,000
|
||||
//Much more efficient than many pickweight calls
|
||||
/proc/pickweight_mult(list/L, quantity, base_weight = 1)
|
||||
//First we total the list as normal
|
||||
var/total = 0
|
||||
var/item
|
||||
for (item in L)
|
||||
if (!L[item])
|
||||
L[item] = 0
|
||||
L[item] = base_weight
|
||||
total += L[item]
|
||||
|
||||
total = rand(0, total)
|
||||
for (item in L)
|
||||
total -=L [item]
|
||||
if (total <= 0 && L[item])
|
||||
return item
|
||||
//Next we will make a list of randomly generated numbers, called Requests
|
||||
//It is critical that this list be sorted in ascending order, so we will build it in that order
|
||||
//First one is free, so we start counting at 2
|
||||
var/list/requests = list(rand(1, total))
|
||||
for (var/i in 2 to quantity)
|
||||
//Each time we generate the next request
|
||||
var/newreq = rand()* total
|
||||
//We will loop through all existing requests
|
||||
for (var/j in 1 to requests.len)
|
||||
//We keep going through the list until we find an element which is bigger than the one we want to add
|
||||
if (requests[j] > newreq)
|
||||
//And then we insert the newqreq at that point, pushing everything else forward
|
||||
requests.Insert(j, newreq)
|
||||
break
|
||||
|
||||
return null
|
||||
|
||||
|
||||
//Now when we get here, we have a list of random numbers sorted in ascending order.
|
||||
//The length of that list is equal to Quantity passed into this function
|
||||
//Next we make a list to store results
|
||||
var/list/results = list()
|
||||
|
||||
//Zero the total, we'll reuse it
|
||||
total = 0
|
||||
|
||||
//Now we will iterate forward through the items list, adding each weight to the total
|
||||
for (item in L)
|
||||
total += L[item]
|
||||
|
||||
//After each item we do a while loop
|
||||
while (requests.len && total >= requests[1])
|
||||
//If the total is higher than the value of the first request
|
||||
results += item //We add this item to the results list
|
||||
requests.Cut(1,2) //And we cut off the top of the requests list
|
||||
|
||||
//This while loop will repeat until the next request is higher than the total.
|
||||
//The current item might be added to the results list many times, in this process
|
||||
|
||||
//By the time we get here:
|
||||
//Requests will be empty
|
||||
//Results will have a length of quality
|
||||
return results
|
||||
|
||||
//Pick a random element from the list and remove it from the list.
|
||||
/proc/pick_n_take(list/L)
|
||||
@@ -274,6 +325,13 @@
|
||||
. = L[picked]
|
||||
L.Cut(picked,picked+1) //Cut is far more efficient that Remove()
|
||||
|
||||
//Pick a random element from the list by weight and remove it from the list.
|
||||
//Result is returned as a list in the format list(key, value)
|
||||
/proc/pickweight_n_take(list/L, base_weight = 1)
|
||||
if (L.len)
|
||||
. = pickweight(L, base_weight)
|
||||
L.Remove(.)
|
||||
|
||||
//Returns the top(last) element from the list and removes it from the list (typical stack function)
|
||||
/proc/pop(list/L)
|
||||
if(L.len)
|
||||
|
||||
@@ -58,6 +58,11 @@ GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/engine/eng
|
||||
else if(isarea(areatype))
|
||||
var/area/areatemp = areatype
|
||||
areatype = areatemp.type
|
||||
else if(islist(areatype))
|
||||
var/list/turfs = list()
|
||||
for(var/A in areatype)
|
||||
turfs += get_area_turfs(A)
|
||||
return turfs
|
||||
else if(!ispath(areatype))
|
||||
return null
|
||||
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
init_subtypes(/datum/crafting_recipe, GLOB.crafting_recipes)
|
||||
|
||||
INVOKE_ASYNC(GLOBAL_PROC, /proc/init_ref_coin_values) //so the current procedure doesn't sleep because of UNTIL()
|
||||
INVOKE_ASYNC(GLOBAL_PROC, /proc/setupGenetics)
|
||||
|
||||
//creates every subtype of prototype (excluding prototype) and adds it to list L.
|
||||
//if no list/L is provided, one is created.
|
||||
@@ -113,3 +114,25 @@
|
||||
UNTIL(C.flags_1 & INITIALIZED_1) //we want to make sure the value is calculated and not null.
|
||||
GLOB.coin_values[path] = C.value
|
||||
qdel(C)
|
||||
|
||||
/proc/setupGenetics()
|
||||
var/list/mutations = subtypesof(/datum/mutation/human)
|
||||
shuffle_inplace(mutations)
|
||||
for(var/A in subtypesof(/datum/generecipe))
|
||||
var/datum/generecipe/GR = A
|
||||
GLOB.mutation_recipes[initial(GR.required)] = initial(GR.result)
|
||||
for(var/i in 1 to LAZYLEN(mutations))
|
||||
var/path = mutations[i] //byond gets pissy when we do it in one line
|
||||
var/datum/mutation/human/B = new path ()
|
||||
B.alias = "Mutation #[i]"
|
||||
GLOB.all_mutations[B.type] = B
|
||||
GLOB.full_sequences[B.type] = generate_gene_sequence(B.blocks)
|
||||
if(B.locked)
|
||||
continue
|
||||
if(B.quality == POSITIVE)
|
||||
GLOB.good_mutations |= B
|
||||
else if(B.quality == NEGATIVE)
|
||||
GLOB.bad_mutations |= B
|
||||
else if(B.quality == MINOR_NEGATIVE)
|
||||
GLOB.not_good_mutations |= B
|
||||
CHECK_TICK
|
||||
@@ -12,3 +12,5 @@
|
||||
#define is_reserved_level(z) SSmapping.level_trait(z, ZTRAIT_RESERVED)
|
||||
|
||||
#define is_away_level(z) SSmapping.level_trait(z, ZTRAIT_AWAY)
|
||||
|
||||
#define is_vr_level(z) SSmapping.level_trait(z, ZTRAIT_VR)
|
||||
|
||||
+15
-9
@@ -47,7 +47,7 @@
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear/socks, GLOB.socks_list)
|
||||
return pick(GLOB.socks_list)
|
||||
|
||||
/proc/random_features(intendedspecies)
|
||||
/proc/random_features(intendedspecies, intended_gender)
|
||||
if(!GLOB.tails_list_human.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/human, GLOB.tails_list_human)
|
||||
if(!GLOB.tails_list_lizard.len)
|
||||
@@ -149,7 +149,13 @@
|
||||
var/color2 = random_short_color()
|
||||
var/color3 = random_short_color()
|
||||
|
||||
//CIT CHANGE - changes this entire return to support cit's snowflake parts
|
||||
var/body_model = MALE
|
||||
switch(intended_gender)
|
||||
if(MALE, FEMALE)
|
||||
body_model = intended_gender
|
||||
if(PLURAL)
|
||||
body_model = pick(MALE,FEMALE)
|
||||
|
||||
return(list(
|
||||
"mcolor" = color1,
|
||||
"mcolor2" = color2,
|
||||
@@ -209,7 +215,7 @@
|
||||
"ipc_antenna" = "None",
|
||||
"flavor_text" = "",
|
||||
"meat_type" = "Mammalian",
|
||||
"body_model" = MALE,
|
||||
"body_model" = body_model,
|
||||
"body_size" = RESIZE_DEFAULT_SIZE
|
||||
))
|
||||
|
||||
@@ -311,7 +317,7 @@ GLOBAL_LIST_EMPTY(species_list)
|
||||
else
|
||||
return "unknown"
|
||||
|
||||
/proc/do_mob(mob/user , mob/target, time = 30, uninterruptible = 0, progress = 1, datum/callback/extra_checks = null, ignorehelditem = 0)
|
||||
/proc/do_mob(mob/user , mob/target, time = 30, uninterruptible = 0, progress = 1, datum/callback/extra_checks = null, ignorehelditem = FALSE, resume_time = 0 SECONDS)
|
||||
if(!user || !target)
|
||||
return 0
|
||||
var/user_loc = user.loc
|
||||
@@ -330,10 +336,10 @@ GLOBAL_LIST_EMPTY(species_list)
|
||||
var/endtime = world.time+time
|
||||
var/starttime = world.time
|
||||
. = 1
|
||||
while (world.time < endtime)
|
||||
while (world.time + resume_time < endtime)
|
||||
stoplag(1)
|
||||
if (progress)
|
||||
progbar.update(world.time - starttime)
|
||||
progbar.update(world.time - starttime + resume_time)
|
||||
if(QDELETED(user) || QDELETED(target))
|
||||
. = 0
|
||||
break
|
||||
@@ -365,7 +371,7 @@ GLOBAL_LIST_EMPTY(species_list)
|
||||
checked_health["health"] = health
|
||||
return ..()
|
||||
|
||||
/proc/do_after(mob/user, var/delay, needhand = 1, atom/target = null, progress = 1, datum/callback/extra_checks = null, required_mobility_flags = (MOBILITY_USE|MOBILITY_MOVE))
|
||||
/proc/do_after(mob/user, var/delay, needhand = 1, atom/target = null, progress = 1, datum/callback/extra_checks = null, required_mobility_flags = (MOBILITY_USE|MOBILITY_MOVE), resume_time = 0 SECONDS)
|
||||
if(!user)
|
||||
return 0
|
||||
var/atom/Tloc = null
|
||||
@@ -394,10 +400,10 @@ GLOBAL_LIST_EMPTY(species_list)
|
||||
var/starttime = world.time
|
||||
. = 1
|
||||
var/mob/living/L = isliving(user) && user //evals to last thing eval'd
|
||||
while (world.time < endtime)
|
||||
while (world.time + resume_time < endtime)
|
||||
stoplag(1)
|
||||
if (progress)
|
||||
progbar.update(world.time - starttime)
|
||||
progbar.update(world.time - starttime + resume_time)
|
||||
|
||||
if(drifting && !user.inertia_dir)
|
||||
drifting = 0
|
||||
|
||||
@@ -563,7 +563,7 @@
|
||||
if(objective.completable)
|
||||
var/completion = objective.check_completion()
|
||||
if(completion >= 1)
|
||||
objective_parts += "<B>Objective #[count]</B>: [objective.explanation_text] <span class='greentext'><B>Success!</span>"
|
||||
objective_parts += "<B>Objective #[count]</B>: [objective.explanation_text] <span class='greentext'><B>Success!</B></span>"
|
||||
else if(completion <= 0)
|
||||
objective_parts += "<B>Objective #[count]</B>: [objective.explanation_text] <span class='redtext'>Fail.</span>"
|
||||
else
|
||||
|
||||
@@ -434,6 +434,29 @@ Turf and target are separate in case you want to teleport some distance from a t
|
||||
|
||||
return locate(x,y,A.z)
|
||||
|
||||
/**
|
||||
* Get ranged target turf, but with direct targets as opposed to directions
|
||||
*
|
||||
* Starts at atom A and gets the exact angle between A and target
|
||||
* Moves from A with that angle, Range amount of times, until it stops, bound to map size
|
||||
* Arguments:
|
||||
* * A - Initial Firer / Position
|
||||
* * target - Target to aim towards
|
||||
* * range - Distance of returned target turf from A
|
||||
* * offset - Angle offset, 180 input would make the returned target turf be in the opposite direction
|
||||
*/
|
||||
/proc/get_ranged_target_turf_direct(atom/A, atom/target, range, offset)
|
||||
var/angle = arctan(target.x - A.x, target.y - A.y)
|
||||
if(offset)
|
||||
angle += offset
|
||||
var/turf/T = get_turf(A)
|
||||
for(var/i in 1 to range)
|
||||
var/turf/check = locate(A.x + cos(angle) * i, A.y + sin(angle) * i, A.z)
|
||||
if(!check)
|
||||
break
|
||||
T = check
|
||||
|
||||
return T
|
||||
|
||||
// returns turf relative to A offset in dx and dy tiles
|
||||
// bound to map limits
|
||||
|
||||
@@ -265,5 +265,25 @@ GLOBAL_LIST_INIT(bitfields, list(
|
||||
"STORAGE_LIMIT_MAX_W_CLASS" = STORAGE_LIMIT_MAX_W_CLASS,
|
||||
"STORAGE_LIMIT_COMBINED_W_CLASS" = STORAGE_LIMIT_COMBINED_W_CLASS,
|
||||
"STORAGE_LIMIT_VOLUME" = STORAGE_LIMIT_VOLUME
|
||||
),
|
||||
"mutantrace_variation" = list(
|
||||
"STYLE_DIGITIGRADE" = STYLE_DIGITIGRADE,
|
||||
"STYLE_MUZZLE" = STYLE_MUZZLE,
|
||||
"STYLE_SNEK_TAURIC" = STYLE_SNEK_TAURIC,
|
||||
"STYLE_PAW_TAURIC" = STYLE_PAW_TAURIC,
|
||||
"STYLE_HOOF_TAURIC" = STYLE_HOOF_TAURIC,
|
||||
"STYLE_NO_ANTHRO_ICON" = STYLE_NO_ANTHRO_ICON,
|
||||
"USE_SNEK_CLIP_MASK" = USE_SNEK_CLIP_MASK,
|
||||
"USE_QUADRUPED_CLIP_MASK" = USE_QUADRUPED_CLIP_MASK
|
||||
),
|
||||
"vis_flags" = list(
|
||||
"VIS_INHERIT_ICON" = VIS_INHERIT_ICON,
|
||||
"VIS_INHERIT_ICON_STATE" = VIS_INHERIT_ICON_STATE,
|
||||
"VIS_INHERIT_DIR" = VIS_INHERIT_DIR,
|
||||
"VIS_INHERIT_LAYER" = VIS_INHERIT_LAYER,
|
||||
"VIS_INHERIT_PLANE" = VIS_INHERIT_PLANE,
|
||||
"VIS_INHERIT_ID" = VIS_INHERIT_ID,
|
||||
"VIS_UNDERLAY" = VIS_UNDERLAY,
|
||||
"VIS_HIDE" = VIS_HIDE
|
||||
)
|
||||
))
|
||||
|
||||
@@ -137,8 +137,8 @@ GLOBAL_LIST_INIT(jumpsuitlist, list(PREF_SUIT, PREF_SKIRT))
|
||||
#define UPLINK_PEN "Pen" //like a real spy!
|
||||
GLOBAL_LIST_INIT(uplink_spawn_loc_list, list(UPLINK_PDA, UPLINK_RADIO, UPLINK_PEN))
|
||||
|
||||
//Female Uniforms
|
||||
GLOBAL_LIST_EMPTY(female_clothing_icons)
|
||||
//List of cached alpha masked icons.
|
||||
GLOBAL_LIST_EMPTY(alpha_masked_worn_icons)
|
||||
|
||||
//radical shit
|
||||
GLOBAL_LIST_INIT(hit_appends, list("-OOF", "-ACK", "-UGH", "-HRNK", "-HURGH", "-GLORF"))
|
||||
|
||||
@@ -50,3 +50,8 @@ GLOBAL_LIST_EMPTY_TYPED(areas_by_type, /area)
|
||||
GLOBAL_LIST_EMPTY(all_abstract_markers)
|
||||
|
||||
GLOBAL_LIST_EMPTY(stationroom_landmarks) //List of all spawns for stationrooms
|
||||
|
||||
///Away missions, VR, random z levels stuff.
|
||||
GLOBAL_LIST_EMPTY(random_zlevels_generated)
|
||||
GLOBAL_LIST_INIT(potential_away_levels, generateMapList(filename = "[global.config.directory]/awaymissionconfig.txt"))
|
||||
GLOBAL_LIST_INIT(potential_vr_levels, generateMapList(filename = "[global.config.directory]/vr_config.txt"))
|
||||
|
||||
@@ -43,15 +43,26 @@ GLOBAL_LIST_EMPTY(mob_config_movespeed_type_lookup)
|
||||
GLOBAL_LIST_EMPTY(latejoiners) //CIT CHANGE - All latejoining people, for traitor-target purposes.
|
||||
|
||||
/proc/update_config_movespeed_type_lookup(update_mobs = TRUE)
|
||||
var/list/mob_types = list()
|
||||
// NOTE: This is entirely based on the fact that byond typesof/subtypesof gets longer/deeper paths before shallower ones.
|
||||
// If that ever breaks this entire proc breaks.
|
||||
var/list/mob_types = typesof(/mob)
|
||||
var/list/entry_value = CONFIG_GET(keyed_list/multiplicative_movespeed)
|
||||
var/list/configured_types = list()
|
||||
for(var/path in entry_value)
|
||||
var/value = entry_value[path]
|
||||
if(!value)
|
||||
if(isnull(value))
|
||||
continue
|
||||
// associative list sets for elements that already exist preserve order
|
||||
mob_types[path] = value
|
||||
// now go back up through it to set everything, making absolute sure that base paths are overridden by child paths all the way down the path tree.
|
||||
for(var/i in length(mob_types) to 1 step -1)
|
||||
var/path = mob_types[i]
|
||||
if(isnull(mob_types[path]))
|
||||
continue
|
||||
// we're going from bottom to top so it should be safe to do this without further checks..
|
||||
for(var/subpath in typesof(path))
|
||||
mob_types[subpath] = value
|
||||
GLOB.mob_config_movespeed_type_lookup = mob_types
|
||||
configured_types[subpath] = mob_types[path]
|
||||
GLOB.mob_config_movespeed_type_lookup = configured_types
|
||||
if(update_mobs)
|
||||
update_mob_config_movespeeds()
|
||||
|
||||
|
||||
@@ -33,3 +33,5 @@ GLOBAL_VAR(bible_icon_state)
|
||||
GLOBAL_VAR(bible_item_state)
|
||||
GLOBAL_VAR(holy_weapon_type)
|
||||
GLOBAL_VAR(holy_armor_type)
|
||||
|
||||
GLOBAL_VAR_INIT(internal_tick_usage, 0.2 * world.tick_lag)
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
FUN ZONE OF ADMIN LISTINGS
|
||||
Try to keep this in sync with __DEFINES/traits.dm
|
||||
quirks have it's own panel so we don't need them here.
|
||||
*/
|
||||
|
||||
GLOBAL_LIST_INIT(traits_by_type, list(
|
||||
/mob = list(
|
||||
"TRAIT_BLIND" = TRAIT_BLIND,
|
||||
"TRAIT_MUTE" = TRAIT_MUTE,
|
||||
"TRAIT_EMOTEMUTE " = TRAIT_EMOTEMUTE,
|
||||
"TRAIT_DEAF" = TRAIT_DEAF,
|
||||
"TRAIT_NEARSIGHT" = TRAIT_NEARSIGHT,
|
||||
"TRAIT_FAT" = TRAIT_FAT,
|
||||
"TRAIT_HUSK" = TRAIT_HUSK,
|
||||
"TRAIT_NOCLONE" = TRAIT_NOCLONE,
|
||||
"TRAIT_CLUMSY" = TRAIT_CLUMSY,
|
||||
"TRAIT_CHUNKYFINGERS" = TRAIT_CHUNKYFINGERS,
|
||||
"TRAIT_DUMB" = TRAIT_DUMB,
|
||||
"TRAIT_MONKEYLIKE" = TRAIT_MONKEYLIKE,
|
||||
"TRAIT_PACIFISM" = TRAIT_PACIFISM,
|
||||
"TRAIT_IGNORESLOWDOWN" = TRAIT_IGNORESLOWDOWN,
|
||||
"TRAIT_DEATHCOMA" = TRAIT_DEATHCOMA,
|
||||
"TRAIT_FAKEDEATH" = TRAIT_FAKEDEATH,
|
||||
"TRAIT_DISFIGURED" = TRAIT_DISFIGURED,
|
||||
"TRAIT_XENO_HOST" = TRAIT_XENO_HOST,
|
||||
"TRAIT_STUNIMMUNE" = TRAIT_STUNIMMUNE,
|
||||
"TRAIT_TASED_RESISTANCE" = TRAIT_TASED_RESISTANCE,
|
||||
"TRAIT_SLEEPIMMUNE" = TRAIT_SLEEPIMMUNE,
|
||||
"TRAIT_PUSHIMMUNE" = TRAIT_PUSHIMMUNE,
|
||||
"TRAIT_SHOCKIMMUNE" = TRAIT_SHOCKIMMUNE,
|
||||
"TRAIT_STABLEHEART" = TRAIT_STABLEHEART,
|
||||
"TRAIT_STABLELIVER" = TRAIT_STABLELIVER,
|
||||
"TRAIT_RESISTHEAT" = TRAIT_RESISTHEAT,
|
||||
"TRAIT_RESISTHEATHANDS" = TRAIT_RESISTHEATHANDS,
|
||||
"TRAIT_RESISTCOLD" = TRAIT_RESISTCOLD,
|
||||
"TRAIT_RESISTHIGHPRESSURE" = TRAIT_RESISTHIGHPRESSURE,
|
||||
"TRAIT_RESISTLOWPRESSURE" = TRAIT_RESISTLOWPRESSURE,
|
||||
"TRAIT_RADIMMUNE" = TRAIT_RADIMMUNE,
|
||||
"TRAIT_VIRUSIMMUNE" = TRAIT_VIRUSIMMUNE,
|
||||
"TRAIT_PIERCEIMMUNE" = TRAIT_PIERCEIMMUNE,
|
||||
"TRAIT_NODISMEMBER" = TRAIT_NODISMEMBER,
|
||||
"TRAIT_NOFIRE" = TRAIT_NOFIRE,
|
||||
"TRAIT_NOGUNS" = TRAIT_NOGUNS,
|
||||
"TRAIT_NOHUNGER" = TRAIT_NOHUNGER,
|
||||
"TRAIT_EASYDISMEMBER" = TRAIT_EASYDISMEMBER,
|
||||
"TRAIT_LIMBATTACHMENT" = TRAIT_LIMBATTACHMENT,
|
||||
"TRAIT_NOLIMBDISABLE" = TRAIT_NOLIMBDISABLE,
|
||||
"TRAIT_EASYLIMBDISABLE" = TRAIT_EASYLIMBDISABLE,
|
||||
"TRAIT_TOXINLOVER" = TRAIT_TOXINLOVER,
|
||||
"TRAIT_NOBREATH" = TRAIT_NOBREATH,
|
||||
"TRAIT_ANTIMAGIC" = TRAIT_ANTIMAGIC,
|
||||
"TRAIT_HOLY" = TRAIT_HOLY,
|
||||
"TRAIT_DEPRESSION" = TRAIT_DEPRESSION,
|
||||
"TRAIT_JOLLY" = TRAIT_JOLLY,
|
||||
"TRAIT_NOCRITDAMAGE" = TRAIT_NOCRITDAMAGE,
|
||||
"TRAIT_NOSLIPWATER" = TRAIT_NOSLIPWATER,
|
||||
"TRAIT_NOSLIPALL" = TRAIT_NOSLIPALL,
|
||||
"TRAIT_NODEATH" = TRAIT_NODEATH,
|
||||
"TRAIT_NOHARDCRIT" = TRAIT_NOHARDCRIT,
|
||||
"TRAIT_NOSOFTCRIT" = TRAIT_NOSOFTCRIT,
|
||||
"TRAIT_MINDSHIELD" = TRAIT_MINDSHIELD,
|
||||
"TRAIT_HIJACKER" = TRAIT_HIJACKER,
|
||||
"TRAIT_DISSECTED" = TRAIT_DISSECTED,
|
||||
"TRAIT_SIXTHSENSE" = TRAIT_SIXTHSENSE,
|
||||
"TRAIT_FEARLESS" = TRAIT_FEARLESS,
|
||||
"TRAIT_PARALYSIS_L_ARM" = TRAIT_PARALYSIS_L_ARM,
|
||||
"TRAIT_PARALYSIS_R_ARM" = TRAIT_PARALYSIS_R_ARM,
|
||||
"TRAIT_PARALYSIS_L_LEG" = TRAIT_PARALYSIS_L_LEG,
|
||||
"TRAIT_PARALYSIS_R_LEG" = TRAIT_PARALYSIS_R_LEG,
|
||||
"TRAIT_DISK_VERIFIER" = TRAIT_DISK_VERIFIER,
|
||||
"TRAIT_XRAY_VISION" = TRAIT_XRAY_VISION,
|
||||
"TRAIT_THERMAL_VISION" = TRAIT_THERMAL_VISION,
|
||||
"TRAIT_ABDUCTOR_TRAINING" = TRAIT_ABDUCTOR_TRAINING,
|
||||
"TRAIT_ABDUCTOR_SCIENTIST_TRAINING" = TRAIT_ABDUCTOR_SCIENTIST_TRAINING,
|
||||
"TRAIT_SURGEON" = TRAIT_SURGEON,
|
||||
"TRAIT_STRONG_GRABBER" = TRAIT_STRONG_GRABBER,
|
||||
"TRAIT_MAGIC_CHOKE" = TRAIT_MAGIC_CHOKE,
|
||||
"TRAIT_SOOTHED_THROAT" = TRAIT_SOOTHED_THROAT,
|
||||
"TRAIT_LAW_ENFORCEMENT_METABOLISM" = TRAIT_LAW_ENFORCEMENT_METABOLISM,
|
||||
"TRAIT_UNINTELLIGIBLE_SPEECH" = TRAIT_UNINTELLIGIBLE_SPEECH,
|
||||
"TRAIT_UNSTABLE" = TRAIT_UNSTABLE,
|
||||
"TRAIT_COLDBLOODED" = TRAIT_COLDBLOODED,
|
||||
"TRAIT_NONATURALHEAL" = TRAIT_NONATURALHEAL,
|
||||
"TRAIT_NORUNNING" = TRAIT_NORUNNING,
|
||||
"TRAIT_NOMARROW" = TRAIT_NOMARROW,
|
||||
"TRAIT_NOPULSE" = TRAIT_NOPULSE,
|
||||
"TRAIT_EXEMPT_HEALTH_EVENTS" = TRAIT_EXEMPT_HEALTH_EVENTS,
|
||||
"TRAIT_NO_MIDROUND_ANTAG" = TRAIT_NO_MIDROUND_ANTAG,
|
||||
"TRAIT_PUGILIST" = TRAIT_PUGILIST,
|
||||
"TRAIT_KI_VAMPIRE" = TRAIT_KI_VAMPIRE,
|
||||
"TRAIT_PASSTABLE" = TRAIT_PASSTABLE,
|
||||
"TRAIT_GIANT" = TRAIT_GIANT,
|
||||
"TRAIT_DWARF" = TRAIT_DWARF,
|
||||
"TRAIT_COMBAT_MODE_LOCKED" = TRAIT_COMBAT_MODE_LOCKED,
|
||||
"TRAIT_SPRINT_LOCKED" = TRAIT_SPRINT_LOCKED,
|
||||
"TRAIT_AUTO_CATCH_ITEM" = TRAIT_AUTO_CATCH_ITEM,
|
||||
"TRAIT_FREESPRINT" = TRAIT_FREESPRINT,
|
||||
"TRAIT_NO_INTERNALS" = TRAIT_NO_INTERNALS,
|
||||
"TRAIT_NO_ALCOHOL" = TRAIT_NO_ALCOHOL,
|
||||
"TRAIT_MUTATION_STASIS" = TRAIT_MUTATION_STASIS,
|
||||
"TRAIT_HEAVY_SLEEPER" = TRAIT_HEAVY_SLEEPER,
|
||||
"TRAIT_LIGHT_STEP" = TRAIT_LIGHT_STEP,
|
||||
"TRAIT_SILENT_STEP" = TRAIT_SILENT_STEP,
|
||||
"TRAIT_VORACIOUS" = TRAIT_VORACIOUS,
|
||||
"TRAIT_SELF_AWARE" = TRAIT_SELF_AWARE,
|
||||
"TRAIT_FREERUNNING" = TRAIT_FREERUNNING,
|
||||
"TRAIT_SKITTISH" = TRAIT_SKITTISH,
|
||||
"TRAIT_POOR_AIM" = TRAIT_POOR_AIM,
|
||||
"TRAIT_PROSOPAGNOSIA" = TRAIT_PROSOPAGNOSIA,
|
||||
"TRAIT_DRUNK_HEALING" = TRAIT_DRUNK_HEALING,
|
||||
"TRAIT_TAGGER" = TRAIT_TAGGER,
|
||||
"TRAIT_PHOTOGRAPHER" = TRAIT_PHOTOGRAPHER,
|
||||
"TRAIT_MUSICIAN" = TRAIT_MUSICIAN,
|
||||
"TRAIT_MASO" = TRAIT_MASO,
|
||||
"TRAIT_HIGH_BLOOD" = TRAIT_HIGH_BLOOD,
|
||||
"TRAIT_EMPATH" = TRAIT_EMPATH,
|
||||
"TRAIT_FRIENDLY" = TRAIT_FRIENDLY
|
||||
),
|
||||
/obj/item/bodypart = list(
|
||||
"TRAIT_PARALYSIS" = TRAIT_PARALYSIS
|
||||
),
|
||||
/obj/item = list(
|
||||
"TRAIT_NODROP" = TRAIT_NODROP,
|
||||
"TRAIT_NO_TELEPORT" = TRAIT_NO_TELEPORT
|
||||
)
|
||||
))
|
||||
|
||||
|
||||
/// value -> trait name, generated on use from trait_by_type global
|
||||
GLOBAL_LIST(trait_name_map)
|
||||
|
||||
/proc/generate_trait_name_map()
|
||||
. = list()
|
||||
for(var/key in GLOB.traits_by_type)
|
||||
for(var/tname in GLOB.traits_by_type[key])
|
||||
var/val = GLOB.traits_by_type[key][tname]
|
||||
.[val] = tname
|
||||
@@ -162,7 +162,7 @@
|
||||
#define ui_ghost_orbit "SOUTH:6,CENTER-1:24"
|
||||
#define ui_ghost_reenter_corpse "SOUTH:6,CENTER:24"
|
||||
#define ui_ghost_teleport "SOUTH:6,CENTER+1:24"
|
||||
#define ui_ghost_pai "SOUTH: 6, CENTER+2:24"
|
||||
#define ui_ghost_spawners "SOUTH: 6, CENTER+2:24"
|
||||
|
||||
|
||||
//UI position overrides for 1:1 screen layout. (default is 7:5)
|
||||
|
||||
@@ -36,13 +36,13 @@
|
||||
var/mob/dead/observer/G = usr
|
||||
G.dead_tele()
|
||||
|
||||
/obj/screen/ghost/pai
|
||||
name = "pAI Candidate"
|
||||
icon_state = "pai"
|
||||
/obj/screen/ghost/spawners
|
||||
name = "Ghost role spawners"
|
||||
icon_state = "spawners"
|
||||
|
||||
/obj/screen/ghost/pai/Click()
|
||||
/obj/screen/ghost/spawners/Click()
|
||||
var/mob/dead/observer/G = usr
|
||||
G.register_pai()
|
||||
G.open_spawners_menu()
|
||||
|
||||
/datum/hud/ghost/New(mob/owner)
|
||||
..()
|
||||
@@ -68,8 +68,8 @@
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/ghost/pai()
|
||||
using.screen_loc = ui_ghost_pai
|
||||
using = new /obj/screen/ghost/spawners()
|
||||
using.screen_loc = ui_ghost_spawners
|
||||
using.hud = src
|
||||
static_inventory += using
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
///Things rendered on "openspace"; holes in multi-z
|
||||
/obj/screen/plane_master/openspace
|
||||
name = "open space plane master"
|
||||
plane = FLOOR_OPENSPACE_PLANE
|
||||
plane = OPENSPACE_BACKDROP_PLANE
|
||||
appearance_flags = PLANE_MASTER
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
alpha = 255
|
||||
@@ -106,8 +106,8 @@
|
||||
*
|
||||
* You really shouldn't be directly using this, use atom helpers instead
|
||||
*/
|
||||
/obj/screen/plane_master/emissive_unblockable
|
||||
name = "emissive mob plane master"
|
||||
/obj/screen/plane_master/emissive_blocker
|
||||
name = "emissive blocker plane master"
|
||||
plane = EMISSIVE_BLOCKER_PLANE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
render_target = EMISSIVE_BLOCKER_RENDER_TARGET
|
||||
|
||||
@@ -217,7 +217,8 @@
|
||||
config_entry_value = list( //DEFAULTS
|
||||
/mob/living/simple_animal = 1,
|
||||
/mob/living/silicon/pai = 1,
|
||||
/mob/living/carbon/alien/humanoid/hunter = -1,
|
||||
/mob/living/carbon/alien/humanoid/sentinel = 0.25,
|
||||
/mob/living/carbon/alien/humanoid/drone = 0.5,
|
||||
/mob/living/carbon/alien/humanoid/royal/praetorian = 1,
|
||||
/mob/living/carbon/alien/humanoid/royal/queen = 3
|
||||
)
|
||||
@@ -248,8 +249,18 @@
|
||||
|
||||
/datum/config_entry/number/movedelay/run_delay
|
||||
|
||||
/datum/config_entry/number/movedelay/run_delay/ValidateAndSet()
|
||||
. = ..()
|
||||
var/datum/movespeed_modifier/config_walk_run/M = get_cached_movespeed_modifier(/datum/movespeed_modifier/config_walk_run/run)
|
||||
M.sync()
|
||||
|
||||
/datum/config_entry/number/movedelay/walk_delay
|
||||
|
||||
/datum/config_entry/number/movedelay/walk_delay/ValidateAndSet()
|
||||
. = ..()
|
||||
var/datum/movespeed_modifier/config_walk_run/M = get_cached_movespeed_modifier(/datum/movespeed_modifier/config_walk_run/walk)
|
||||
M.sync()
|
||||
|
||||
/datum/config_entry/number/movedelay/sprint_speed_increase
|
||||
config_entry_value = 1
|
||||
|
||||
@@ -288,6 +299,8 @@
|
||||
|
||||
/datum/config_entry/flag/roundstart_away //Will random away mission be loaded.
|
||||
|
||||
/datum/config_entry/flag/roundstart_vr //Will virtual reality missions be loaded?
|
||||
|
||||
/datum/config_entry/number/gateway_delay //How long the gateway takes before it activates. Default is half an hour. Only matters if roundstart_away is enabled.
|
||||
config_entry_value = 18000
|
||||
min_val = 0
|
||||
@@ -335,6 +348,11 @@
|
||||
config_entry_value = 16
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/icemoon_budget
|
||||
config_entry_value = 90
|
||||
integer = FALSE
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/station_space_budget
|
||||
config_entry_value = 10
|
||||
min_val = 0
|
||||
|
||||
+24
-11
@@ -36,6 +36,9 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
|
||||
var/sleep_delta = 1
|
||||
|
||||
///Only run ticker subsystems for the next n ticks.
|
||||
var/skip_ticks = 0
|
||||
|
||||
var/make_runtime = 0
|
||||
|
||||
var/initializations_finished_with_no_players_logged_in //I wonder what this could be?
|
||||
@@ -335,7 +338,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
new/datum/controller/failsafe() // (re)Start the failsafe.
|
||||
|
||||
//now do the actual stuff
|
||||
if (!queue_head || !(iteration % 3))
|
||||
if (!skip_ticks)
|
||||
var/checking_runlevel = current_runlevel
|
||||
if(cached_runlevel != checking_runlevel)
|
||||
//resechedule subsystems
|
||||
@@ -381,6 +384,8 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
|
||||
iteration++
|
||||
last_run = world.time
|
||||
if (skip_ticks)
|
||||
skip_ticks--
|
||||
src.sleep_delta = MC_AVERAGE_FAST(src.sleep_delta, sleep_delta)
|
||||
current_ticklimit = TICK_LIMIT_RUNNING
|
||||
if (processing * sleep_delta <= world.tick_lag)
|
||||
@@ -444,10 +449,12 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
while (queue_node)
|
||||
if (ran && TICK_USAGE > TICK_LIMIT_RUNNING)
|
||||
break
|
||||
|
||||
queue_node_flags = queue_node.flags
|
||||
queue_node_priority = queue_node.queued_priority
|
||||
|
||||
if (!(queue_node_flags & SS_TICKER) && skip_ticks)
|
||||
queue_node = queue_node.queue_next
|
||||
continue
|
||||
//super special case, subsystems where we can't make them pause mid way through
|
||||
//if we can't run them this tick (without going over a tick)
|
||||
//we bump up their priority and attempt to run them next tick
|
||||
@@ -455,14 +462,15 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
// in those cases, so we just let them run)
|
||||
if (queue_node_flags & SS_NO_TICK_CHECK)
|
||||
if (queue_node.tick_usage > TICK_LIMIT_RUNNING - TICK_USAGE && ran_non_ticker)
|
||||
queue_node.queued_priority += queue_priority_count * 0.1
|
||||
queue_priority_count -= queue_node_priority
|
||||
queue_priority_count += queue_node.queued_priority
|
||||
current_tick_budget -= queue_node_priority
|
||||
queue_node = queue_node.queue_next
|
||||
if (!(queue_node_flags & SS_BACKGROUND))
|
||||
queue_node.queued_priority += queue_priority_count * 0.1
|
||||
queue_priority_count -= queue_node_priority
|
||||
queue_priority_count += queue_node.queued_priority
|
||||
current_tick_budget -= queue_node_priority
|
||||
queue_node = queue_node.queue_next
|
||||
continue
|
||||
|
||||
if ((queue_node_flags & SS_BACKGROUND) && !bg_calc)
|
||||
if (!bg_calc && (queue_node_flags & SS_BACKGROUND))
|
||||
current_tick_budget = queue_priority_count_bg
|
||||
bg_calc = TRUE
|
||||
|
||||
@@ -515,7 +523,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
queue_node.paused_ticks = 0
|
||||
queue_node.paused_tick_usage = 0
|
||||
|
||||
if (queue_node_flags & SS_BACKGROUND) //update our running total
|
||||
if (bg_calc) //update our running total
|
||||
queue_priority_count_bg -= queue_node_priority
|
||||
else
|
||||
queue_priority_count -= queue_node_priority
|
||||
@@ -583,14 +591,19 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
log_world("MC: SoftReset: Finished.")
|
||||
. = 1
|
||||
|
||||
/// Warns us that the end of tick byond map_update will be laggier then normal, so that we can just skip running subsystems this tick.
|
||||
/datum/controller/master/proc/laggy_byond_map_update_incoming()
|
||||
if (!skip_ticks)
|
||||
skip_ticks = 1
|
||||
|
||||
|
||||
/datum/controller/master/stat_entry()
|
||||
if(!statclick)
|
||||
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
|
||||
|
||||
stat("Byond:", "(FPS:[world.fps]) (TickCount:[world.time/world.tick_lag]) (TickDrift:[round(Master.tickdrift,1)]([round((Master.tickdrift/(world.time/world.tick_lag))*100,0.1)]%))")
|
||||
stat("Master Controller:", statclick.update("(TickRate:[Master.processing]) (Iteration:[Master.iteration])"))
|
||||
stat("Byond:", "(FPS:[world.fps]) (TickCount:[world.time/world.tick_lag]) (TickDrift:[round(Master.tickdrift,1)]([round((Master.tickdrift/(world.time/world.tick_lag))*100,0.1)]%)) (Internal Tick Usage: [round(MAPTICK_LAST_INTERNAL_TICK_USAGE,0.1)]%)")
|
||||
stat("Master Controller:", statclick.update("(TickRate:[Master.processing]) (Iteration:[Master.iteration]) (TickLimit: [round(Master.current_ticklimit, 0.1)])"))
|
||||
|
||||
|
||||
/datum/controller/master/StartLoadingMap()
|
||||
//disallow more than one map to load at once, multithreading it will just cause race conditions
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
#define SSAIR_PIPENETS 1
|
||||
#define SSAIR_ATMOSMACHINERY 2
|
||||
#define SSAIR_REACTQUEUE 3
|
||||
#define SSAIR_EXCITEDGROUPS 4
|
||||
#define SSAIR_HIGHPRESSURE 5
|
||||
#define SSAIR_HOTSPOTS 6
|
||||
#define SSAIR_SUPERCONDUCTIVITY 7
|
||||
|
||||
SUBSYSTEM_DEF(air)
|
||||
name = "Atmospherics"
|
||||
init_order = INIT_ORDER_AIR
|
||||
@@ -20,6 +12,7 @@ SUBSYSTEM_DEF(air)
|
||||
var/cost_hotspots = 0
|
||||
var/cost_superconductivity = 0
|
||||
var/cost_pipenets = 0
|
||||
var/cost_rebuilds = 0
|
||||
var/cost_atmos_machinery = 0
|
||||
|
||||
var/list/excited_groups = list()
|
||||
@@ -27,6 +20,7 @@ SUBSYSTEM_DEF(air)
|
||||
var/list/turf_react_queue = list()
|
||||
var/list/hotspots = list()
|
||||
var/list/networks = list()
|
||||
var/list/pipenets_needing_rebuilt = list()
|
||||
var/list/obj/machinery/atmos_machinery = list()
|
||||
var/list/pipe_init_dirs_cache = list()
|
||||
|
||||
@@ -39,7 +33,7 @@ SUBSYSTEM_DEF(air)
|
||||
|
||||
|
||||
var/list/currentrun = list()
|
||||
var/currentpart = SSAIR_PIPENETS
|
||||
var/currentpart = SSAIR_REBUILD_PIPENETS
|
||||
|
||||
var/map_loading = TRUE
|
||||
var/list/queued_for_activation
|
||||
@@ -52,6 +46,7 @@ SUBSYSTEM_DEF(air)
|
||||
msg += "HS:[round(cost_hotspots,1)]|"
|
||||
msg += "SC:[round(cost_superconductivity,1)]|"
|
||||
msg += "PN:[round(cost_pipenets,1)]|"
|
||||
msg += "RB:[round(cost_rebuilds,1)]|"
|
||||
msg += "AM:[round(cost_atmos_machinery,1)]"
|
||||
msg += "} "
|
||||
msg += "AT:[active_turfs.len]|"
|
||||
@@ -77,6 +72,18 @@ SUBSYSTEM_DEF(air)
|
||||
/datum/controller/subsystem/air/fire(resumed = 0)
|
||||
var/timer = TICK_USAGE_REAL
|
||||
|
||||
if(currentpart == SSAIR_REBUILD_PIPENETS)
|
||||
var/list/pipenet_rebuilds = pipenets_needing_rebuilt
|
||||
for(var/thing in pipenet_rebuilds)
|
||||
var/obj/machinery/atmospherics/AT = thing
|
||||
AT.build_network()
|
||||
cost_rebuilds = MC_AVERAGE(cost_rebuilds, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
pipenets_needing_rebuilt.Cut()
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = FALSE
|
||||
currentpart = SSAIR_PIPENETS
|
||||
|
||||
if(currentpart == SSAIR_PIPENETS || !resumed)
|
||||
process_pipenets(resumed)
|
||||
cost_pipenets = MC_AVERAGE(cost_pipenets, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
@@ -137,9 +144,7 @@ SUBSYSTEM_DEF(air)
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSAIR_PIPENETS
|
||||
|
||||
|
||||
currentpart = SSAIR_REBUILD_PIPENETS
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_pipenets(resumed = 0)
|
||||
if (!resumed)
|
||||
@@ -156,6 +161,9 @@ SUBSYSTEM_DEF(air)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/air/proc/add_to_rebuild_queue(atmos_machine)
|
||||
if(istype(atmos_machine, /obj/machinery/atmospherics))
|
||||
pipenets_needing_rebuilt += atmos_machine
|
||||
|
||||
/datum/controller/subsystem/air/proc/process_atmos_machinery(resumed = 0)
|
||||
var/seconds = wait * 0.1
|
||||
|
||||
@@ -16,7 +16,6 @@ SUBSYSTEM_DEF(atoms)
|
||||
|
||||
/datum/controller/subsystem/atoms/Initialize(timeofday)
|
||||
GLOB.fire_overlay.appearance_flags = RESET_COLOR
|
||||
setupGenetics() //to set the mutations' sequence.
|
||||
initialized = INITIALIZATION_INNEW_MAPLOAD
|
||||
InitializeAtoms()
|
||||
return ..()
|
||||
@@ -107,28 +106,6 @@ SUBSYSTEM_DEF(atoms)
|
||||
old_initialized = SSatoms.old_initialized
|
||||
BadInitializeCalls = SSatoms.BadInitializeCalls
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/setupGenetics()
|
||||
var/list/mutations = subtypesof(/datum/mutation/human)
|
||||
shuffle_inplace(mutations)
|
||||
for(var/A in subtypesof(/datum/generecipe))
|
||||
var/datum/generecipe/GR = A
|
||||
GLOB.mutation_recipes[initial(GR.required)] = initial(GR.result)
|
||||
for(var/i in 1 to LAZYLEN(mutations))
|
||||
var/path = mutations[i] //byond gets pissy when we do it in one line
|
||||
var/datum/mutation/human/B = new path ()
|
||||
B.alias = "Mutation #[i]"
|
||||
GLOB.all_mutations[B.type] = B
|
||||
GLOB.full_sequences[B.type] = generate_gene_sequence(B.blocks)
|
||||
if(B.locked)
|
||||
continue
|
||||
if(B.quality == POSITIVE)
|
||||
GLOB.good_mutations |= B
|
||||
else if(B.quality == NEGATIVE)
|
||||
GLOB.bad_mutations |= B
|
||||
else if(B.quality == MINOR_NEGATIVE)
|
||||
GLOB.not_good_mutations |= B
|
||||
CHECK_TICK
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/InitLog()
|
||||
. = ""
|
||||
for(var/path in BadInitializeCalls)
|
||||
|
||||
@@ -6,7 +6,6 @@ SUBSYSTEM_DEF(lighting)
|
||||
name = "Lighting"
|
||||
wait = 2
|
||||
init_order = INIT_ORDER_LIGHTING
|
||||
flags = SS_TICKER
|
||||
|
||||
/datum/controller/subsystem/lighting/stat_entry()
|
||||
..("L:[GLOB.lighting_update_lights.len]|C:[GLOB.lighting_update_corners.len]|O:[GLOB.lighting_update_objects.len]")
|
||||
@@ -85,4 +84,4 @@ SUBSYSTEM_DEF(lighting)
|
||||
|
||||
/datum/controller/subsystem/lighting/Recover()
|
||||
initialized = SSlighting.initialized
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define INIT_ANNOUNCE(X) to_chat(world, "<span class='boldannounce'>[X]</span>"); log_world(X)
|
||||
|
||||
SUBSYSTEM_DEF(mapping)
|
||||
name = "Mapping"
|
||||
init_order = INIT_ORDER_MAPPING
|
||||
@@ -14,6 +16,8 @@ SUBSYSTEM_DEF(mapping)
|
||||
var/list/ruins_templates = list()
|
||||
var/list/space_ruins_templates = list()
|
||||
var/list/lava_ruins_templates = list()
|
||||
var/list/ice_ruins_templates = list()
|
||||
var/list/ice_ruins_underground_templates = list()
|
||||
var/list/station_ruins_templates = list()
|
||||
var/datum/space_level/isolated_ruins_z //Created on demand during ruin loading.
|
||||
|
||||
@@ -40,6 +44,13 @@ SUBSYSTEM_DEF(mapping)
|
||||
|
||||
var/stat_map_name = "Loading..."
|
||||
|
||||
/// Lookup list for random generated IDs.
|
||||
var/list/random_generated_ids_by_original = list()
|
||||
/// next id for separating obfuscated ids.
|
||||
var/obfuscation_next_id = 1
|
||||
/// "secret" key
|
||||
var/obfuscation_secret
|
||||
|
||||
//dlete dis once #39770 is resolved
|
||||
/datum/controller/subsystem/mapping/proc/HACK_LoadMapConfig()
|
||||
if(!config)
|
||||
@@ -50,6 +61,10 @@ SUBSYSTEM_DEF(mapping)
|
||||
#endif
|
||||
stat_map_name = config.map_name
|
||||
|
||||
/datum/controller/subsystem/mapping/PreInit()
|
||||
if(!obfuscation_secret)
|
||||
obfuscation_secret = md5(GUID()) //HAH! Guess this!
|
||||
|
||||
/datum/controller/subsystem/mapping/Initialize(timeofday)
|
||||
HACK_LoadMapConfig()
|
||||
if(initialized)
|
||||
@@ -81,25 +96,40 @@ SUBSYSTEM_DEF(mapping)
|
||||
// Pick a random away mission.
|
||||
if(CONFIG_GET(flag/roundstart_away))
|
||||
createRandomZlevel()
|
||||
|
||||
// Pick a random VR level.
|
||||
if(CONFIG_GET(flag/roundstart_vr))
|
||||
createRandomZlevel(VIRT_REALITY_NAME, list(ZTRAIT_AWAY = TRUE, ZTRAIT_VR = TRUE), GLOB.potential_vr_levels)
|
||||
|
||||
// Generate mining ruins
|
||||
loading_ruins = TRUE
|
||||
var/list/lava_ruins = levels_by_trait(ZTRAIT_LAVA_RUINS)
|
||||
if (lava_ruins.len)
|
||||
seedRuins(lava_ruins, CONFIG_GET(number/lavaland_budget), /area/lavaland/surface/outdoors/unexplored, lava_ruins_templates)
|
||||
seedRuins(lava_ruins, CONFIG_GET(number/lavaland_budget), list(/area/lavaland/surface/outdoors/unexplored), lava_ruins_templates)
|
||||
for (var/lava_z in lava_ruins)
|
||||
spawn_rivers(lava_z)
|
||||
|
||||
var/list/ice_ruins = levels_by_trait(ZTRAIT_ICE_RUINS)
|
||||
if (ice_ruins.len)
|
||||
// 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)
|
||||
|
||||
var/list/ice_ruins_underground = levels_by_trait(ZTRAIT_ICE_RUINS_UNDERGROUND)
|
||||
if (ice_ruins_underground.len)
|
||||
seedRuins(ice_ruins_underground, CONFIG_GET(number/icemoon_budget), list(/area/icemoon/underground/unexplored), ice_ruins_underground_templates)
|
||||
for (var/ice_z in ice_ruins_underground)
|
||||
spawn_rivers(ice_z, 4, level_trait(ice_z, ZTRAIT_BASETURF), /area/icemoon/underground/unexplored/rivers)
|
||||
|
||||
// Generate deep space ruins
|
||||
var/list/space_ruins = levels_by_trait(ZTRAIT_SPACE_RUINS)
|
||||
if (space_ruins.len)
|
||||
seedRuins(space_ruins, CONFIG_GET(number/space_budget), /area/space, space_ruins_templates)
|
||||
seedRuins(space_ruins, CONFIG_GET(number/space_budget), list(/area/space), space_ruins_templates)
|
||||
|
||||
// Generate station space ruins
|
||||
var/list/station_ruins = levels_by_trait(ZTRAIT_STATION)
|
||||
if (station_ruins.len)
|
||||
seedRuins(station_ruins, CONFIG_GET(number/station_space_budget), /area/space/station_ruins, station_ruins_templates)
|
||||
seedRuins(station_ruins, (SSmapping.config.station_ruin_budget < 0) ? CONFIG_GET(number/station_space_budget) : SSmapping.config.station_ruin_budget, list(/area/space/station_ruins), station_ruins_templates)
|
||||
SSmapping.seedStation()
|
||||
loading_ruins = FALSE
|
||||
#endif
|
||||
@@ -167,6 +197,8 @@ SUBSYSTEM_DEF(mapping)
|
||||
ruins_templates = SSmapping.ruins_templates
|
||||
space_ruins_templates = SSmapping.space_ruins_templates
|
||||
lava_ruins_templates = SSmapping.lava_ruins_templates
|
||||
ice_ruins_templates = SSmapping.ice_ruins_templates
|
||||
ice_ruins_underground_templates = SSmapping.ice_ruins_underground_templates
|
||||
station_ruins_templates = SSmapping.station_ruins_templates
|
||||
shuttle_templates = SSmapping.shuttle_templates
|
||||
shelter_templates = SSmapping.shelter_templates
|
||||
@@ -181,8 +213,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
|
||||
z_list = SSmapping.z_list
|
||||
|
||||
#define INIT_ANNOUNCE(X) to_chat(world, "<span class='boldannounce'>[X]</span>"); log_world(X)
|
||||
/datum/controller/subsystem/mapping/proc/LoadGroup(list/errorList, name, path, files, list/traits, list/default_traits, silent = FALSE)
|
||||
/datum/controller/subsystem/mapping/proc/LoadGroup(list/errorList, name, path, files, list/traits, list/default_traits, silent = FALSE, orientation = SOUTH)
|
||||
. = list()
|
||||
var/start_time = REALTIMEOFDAY
|
||||
|
||||
@@ -222,7 +253,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
// load the maps
|
||||
for (var/P in parsed_maps)
|
||||
var/datum/parsed_map/pm = P
|
||||
if (!pm.load(1, 1, start_z + parsed_maps[P], no_changeturf = TRUE))
|
||||
if (!pm.load(1, 1, start_z + parsed_maps[P], no_changeturf = TRUE, orientation = orientation))
|
||||
errorList |= pm.original_path
|
||||
if(!silent)
|
||||
INIT_ANNOUNCE("Loaded [name] in [(REALTIMEOFDAY - start_time)/10]s!")
|
||||
@@ -238,7 +269,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
// load the station
|
||||
station_start = world.maxz + 1
|
||||
INIT_ANNOUNCE("Loading [config.map_name]...")
|
||||
LoadGroup(FailedZs, "Station", config.map_path, config.map_file, config.traits, ZTRAITS_STATION)
|
||||
LoadGroup(FailedZs, "Station", config.map_path, config.map_file, config.traits, ZTRAITS_STATION, FALSE, config.orientation)
|
||||
|
||||
if(SSdbcore.Connect())
|
||||
var/datum/DBQuery/query_round_map_name = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET map_name = '[config.map_name]' WHERE id = [GLOB.round_id]")
|
||||
@@ -254,7 +285,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
// load mining
|
||||
if(config.minetype == "lavaland")
|
||||
LoadGroup(FailedZs, "Lavaland", "map_files/Mining", "Lavaland.dmm", default_traits = ZTRAITS_LAVALAND)
|
||||
else if (!isnull(config.minetype))
|
||||
else if (!isnull(config.minetype) && config.minetype != "none")
|
||||
INIT_ANNOUNCE("WARNING: An unknown minetype '[config.minetype]' was set! This is being ignored! Update the maploader code!")
|
||||
#endif
|
||||
|
||||
@@ -265,7 +296,6 @@ SUBSYSTEM_DEF(mapping)
|
||||
msg += ", [FailedZs[I]]"
|
||||
msg += ". Yell at your server host!"
|
||||
INIT_ANNOUNCE(msg)
|
||||
#undef INIT_ANNOUNCE
|
||||
|
||||
GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
|
||||
@@ -359,6 +389,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
// Still supporting bans by filename
|
||||
var/list/banned = generateMapList("[global.config.directory]/lavaruinblacklist.txt")
|
||||
banned += generateMapList("[global.config.directory]/spaceruinblacklist.txt")
|
||||
banned += generateMapList("[global.config.directory]/iceruinblacklist.txt")
|
||||
banned += generateMapList("[global.config.directory]/stationruinblacklist.txt")
|
||||
|
||||
for(var/item in sortList(subtypesof(/datum/map_template/ruin), /proc/cmp_ruincost_priority))
|
||||
@@ -376,6 +407,10 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
|
||||
if(istype(R, /datum/map_template/ruin/lavaland))
|
||||
lava_ruins_templates[R.name] = R
|
||||
else if(istype(R, /datum/map_template/ruin/icemoon/underground))
|
||||
ice_ruins_underground_templates[R.name] = R
|
||||
else if(istype(R, /datum/map_template/ruin/icemoon))
|
||||
ice_ruins_templates[R.name] = R
|
||||
else if(istype(R, /datum/map_template/ruin/space))
|
||||
space_ruins_templates[R.name] = R
|
||||
else if(istype(R, /datum/map_template/ruin/station))
|
||||
@@ -410,52 +445,63 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
|
||||
//Manual loading of away missions.
|
||||
/client/proc/admin_away()
|
||||
set name = "Load Away Mission"
|
||||
set name = "Load Away Mission / Virtual Reality"
|
||||
set category = "Fun"
|
||||
|
||||
if(!holder ||!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
var/choice = alert(src, "What kind of level would you like to load?", "Load Away/VR", AWAY_MISSION_NAME, VIRT_REALITY_NAME, "Cancel")
|
||||
|
||||
if(!GLOB.the_gateway)
|
||||
if(alert("There's no home gateway on the station. You sure you want to continue ?", "Uh oh", "Yes", "No") != "Yes")
|
||||
var/list/possible_options
|
||||
var/list/ztraits
|
||||
switch(choice)
|
||||
if(VIRT_REALITY_NAME)
|
||||
possible_options = GLOB.potential_vr_levels
|
||||
ztraits = list(ZTRAIT_AWAY = TRUE, ZTRAIT_VR = TRUE)
|
||||
if(AWAY_MISSION_NAME)
|
||||
if(!GLOB.the_gateway)
|
||||
if(alert("There's no home gateway on the station. You sure you want to continue ?", "Uh oh", "Yes", "No") != "Yes")
|
||||
return
|
||||
possible_options = GLOB.potential_away_levels
|
||||
ztraits = list(ZTRAIT_AWAY = TRUE)
|
||||
else
|
||||
return
|
||||
|
||||
var/list/possible_options = GLOB.potentialRandomZlevels + "Custom"
|
||||
var/away_name
|
||||
var/datum/space_level/away_level
|
||||
possible_options += "Custom"
|
||||
var/lvl_name
|
||||
var/datum/space_level/level
|
||||
|
||||
var/answer = input("What kind ? ","Away") as null|anything in possible_options
|
||||
var/answer = input("What kind ? ","Away/VR") as null|anything in possible_options
|
||||
switch(answer)
|
||||
if(null)
|
||||
return
|
||||
if("Custom")
|
||||
var/mapfile = input("Pick file:", "File") as null|file
|
||||
if(!mapfile)
|
||||
return
|
||||
away_name = "[mapfile] custom"
|
||||
to_chat(usr,"<span class='notice'>Loading [away_name]...</span>")
|
||||
var/datum/map_template/template = new(mapfile, "Away Mission")
|
||||
away_level = template.load_new_z()
|
||||
lvl_name = "[mapfile] custom"
|
||||
to_chat(usr,"<span class='notice'>Loading [lvl_name]...</span>")
|
||||
var/datum/map_template/template = new(mapfile, choice, ztraits)
|
||||
level = template.load_new_z(ztraits)
|
||||
else
|
||||
if(answer in GLOB.potentialRandomZlevels)
|
||||
away_name = answer
|
||||
to_chat(usr,"<span class='notice'>Loading [away_name]...</span>")
|
||||
var/datum/map_template/template = new(away_name, "Away Mission")
|
||||
away_level = template.load_new_z()
|
||||
else
|
||||
return
|
||||
lvl_name = answer
|
||||
to_chat(usr,"<span class='notice'>Loading [lvl_name]...</span>")
|
||||
var/datum/map_template/template = new(lvl_name, choice)
|
||||
level = template.load_new_z(ztraits)
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] has loaded [away_name] away mission.")
|
||||
log_admin("Admin [key_name(usr)] has loaded [away_name] away mission.")
|
||||
if(!away_level)
|
||||
message_admins("Loading [away_name] failed!")
|
||||
message_admins("Admin [key_name_admin(usr)] has loaded [lvl_name] [choice].")
|
||||
log_admin("Admin [key_name(usr)] has loaded [lvl_name] [choice].")
|
||||
if(!level)
|
||||
message_admins("Loading [lvl_name] failed!")
|
||||
return
|
||||
|
||||
|
||||
if(GLOB.the_gateway)
|
||||
if(choice == AWAY_MISSION_NAME && GLOB.the_gateway)
|
||||
//Link any found away gate with station gate
|
||||
var/obj/machinery/gateway/centeraway/new_gate
|
||||
for(var/obj/machinery/gateway/centeraway/G in GLOB.machines)
|
||||
if(G.z == away_level.z_value) //I'll have to refactor gateway shitcode before multi-away support.
|
||||
if(G.z == level.z_value) //I'll have to refactor gateway shitcode before multi-away support.
|
||||
new_gate = G
|
||||
break
|
||||
//Link station gate with away gate and remove wait time.
|
||||
@@ -555,3 +601,15 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
LM.load()
|
||||
if(GLOB.stationroom_landmarks.len)
|
||||
seedStation() //I'm sure we can trust everyone not to insert a 1x1 rooms which loads a landmark which loads a landmark which loads a la...
|
||||
|
||||
/**
|
||||
* Generates an obfuscated but constant id for an original id for cases where you don't want players codediving for an id.
|
||||
* WARNING: MAKE SURE PLAYERS ARE NOT ABLE TO ACCESS THIS. To save performance, it's just secret + an incrementing number. Very guessable if you know what the secret is.
|
||||
*/
|
||||
/datum/controller/subsystem/mapping/proc/get_obfuscated_id(original, id_type = "GENERAL")
|
||||
if(!original)
|
||||
return //no.
|
||||
var/key = "[original]%[id_type]"
|
||||
if(random_generated_ids_by_original[key])
|
||||
return random_generated_ids_by_original[key]
|
||||
. = random_generated_ids_by_original[key] = "[obfuscation_secret]%[obfuscation_next_id++]"
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
PROCESSING_SUBSYSTEM_DEF(flightpacks)
|
||||
name = "Flightpack Movement"
|
||||
priority = FIRE_PRIORITY_FLIGHTPACKS
|
||||
wait = 2
|
||||
stat_tag = "FM"
|
||||
flags = SS_NO_INIT|SS_TICKER|SS_KEEP_TIMING
|
||||
|
||||
var/flightsuit_processing = FLIGHTSUIT_PROCESSING_FULL
|
||||
|
||||
/datum/controller/subsystem/processing/flightpacks/Initialize()
|
||||
sync_flightsuit_processing()
|
||||
|
||||
/datum/controller/subsystem/processing/flightpacks/vv_edit_var(var_name, var_value)
|
||||
..()
|
||||
switch(var_name)
|
||||
if("flightsuit_processing")
|
||||
sync_flightsuit_processing()
|
||||
|
||||
/datum/controller/subsystem/processing/flightpacks/proc/sync_flightsuit_processing()
|
||||
for(var/obj/item/flightpack/FP in processing)
|
||||
FP.sync_processing(src)
|
||||
if(flightsuit_processing == FLIGHTSUIT_PROCESSING_NONE) //Don't even bother firing.
|
||||
can_fire = FALSE
|
||||
else
|
||||
can_fire = TRUE
|
||||
@@ -3,7 +3,6 @@ PROCESSING_SUBSYSTEM_DEF(projectiles)
|
||||
wait = 1
|
||||
stat_tag = "PP"
|
||||
flags = SS_NO_INIT|SS_TICKER
|
||||
var/global_max_tick_moves = 10
|
||||
var/global_pixel_speed = 2
|
||||
var/global_iterations_per_move = 16
|
||||
|
||||
|
||||
@@ -217,13 +217,13 @@ SUBSYSTEM_DEF(shuttle)
|
||||
|
||||
call_reason = trim(html_encode(call_reason))
|
||||
|
||||
if(length(call_reason) < CALL_SHUTTLE_REASON_LENGTH && seclevel2num(get_security_level()) > SEC_LEVEL_GREEN)
|
||||
if(length(call_reason) < CALL_SHUTTLE_REASON_LENGTH && GLOB.security_level > SEC_LEVEL_GREEN)
|
||||
to_chat(user, "You must provide a reason.")
|
||||
return
|
||||
|
||||
var/area/signal_origin = get_area(user)
|
||||
var/emergency_reason = "\nNature of emergency:\n\n[call_reason]"
|
||||
var/security_num = seclevel2num(get_security_level())
|
||||
var/security_num = GLOB.security_level
|
||||
switch(security_num)
|
||||
if(SEC_LEVEL_RED,SEC_LEVEL_DELTA)
|
||||
emergency.request(null, signal_origin, html_decode(emergency_reason), 1) //There is a serious threat we gotta move no time to give them five minutes.
|
||||
@@ -285,7 +285,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
/datum/controller/subsystem/shuttle/proc/canRecall()
|
||||
if(!emergency || emergency.mode != SHUTTLE_CALL || emergencyNoRecall || SSticker.mode.name == "meteor")
|
||||
return
|
||||
var/security_num = seclevel2num(get_security_level())
|
||||
var/security_num = GLOB.security_level
|
||||
switch(security_num)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
if(emergency.timeLeft(1) < emergencyCallTime)
|
||||
@@ -642,7 +642,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
/datum/controller/subsystem/shuttle/proc/autoEnd() //CIT CHANGE - allows shift to end without being a proper shuttle call?
|
||||
if(EMERGENCY_IDLE_OR_RECALLED)
|
||||
SSshuttle.emergency.request(silent = TRUE)
|
||||
priority_announce("The shift has come to an end and the shuttle called. [seclevel2num(get_security_level()) == SEC_LEVEL_RED ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [emergency.timeLeft(600)] minutes.", null, "shuttlecalled", "Priority")
|
||||
priority_announce("The shift has come to an end and the shuttle called. [GLOB.security_level == SEC_LEVEL_RED ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [emergency.timeLeft(600)] minutes.", null, "shuttlecalled", "Priority")
|
||||
log_game("Round end vote passed. Shuttle has been auto-called.")
|
||||
message_admins("Round end vote passed. Shuttle has been auto-called.")
|
||||
emergencyNoRecall = TRUE
|
||||
|
||||
@@ -387,6 +387,9 @@ SUBSYSTEM_DEF(ticker)
|
||||
for(var/mob/dead/new_player/N in GLOB.player_list)
|
||||
var/mob/living/carbon/human/player = N.new_character
|
||||
if(istype(player) && player.mind && player.mind.assigned_role)
|
||||
var/datum/job/J = SSjob.GetJob(player.mind.assigned_role)
|
||||
if(J)
|
||||
J.standard_assign_skills(player.mind)
|
||||
if(player.mind.assigned_role == "Captain")
|
||||
captainless=0
|
||||
if(player.mind.assigned_role != player.mind.special_role)
|
||||
|
||||
@@ -94,7 +94,7 @@ SUBSYSTEM_DEF(timer)
|
||||
if(ctime_timer.flags & TIMER_LOOP)
|
||||
ctime_timer.spent = 0
|
||||
ctime_timer.timeToRun = REALTIMEOFDAY + ctime_timer.wait
|
||||
BINARY_INSERT(ctime_timer, clienttime_timers, datum/timedevent, timeToRun)
|
||||
BINARY_INSERT(ctime_timer, clienttime_timers, datum/timedevent, ctime_timer, timeToRun, COMPARE_KEY)
|
||||
else
|
||||
qdel(ctime_timer)
|
||||
|
||||
@@ -423,7 +423,7 @@ SUBSYSTEM_DEF(timer)
|
||||
L = SStimer.second_queue
|
||||
|
||||
if(L)
|
||||
BINARY_INSERT(src, L, datum/timedevent, timeToRun)
|
||||
BINARY_INSERT(src, L, datum/timedevent, src, timeToRun, COMPARE_KEY)
|
||||
return
|
||||
|
||||
//get the list of buckets
|
||||
|
||||
@@ -352,7 +352,6 @@ SUBSYSTEM_DEF(vote)
|
||||
if("dynamic")
|
||||
if(SSticker.current_state > GAME_STATE_PREGAME)//Don't change the mode if the round already started.
|
||||
return message_admins("A vote has tried to change the gamemode, but the game has already started. Aborting.")
|
||||
GLOB.master_mode = "dynamic"
|
||||
var/list/runnable_storytellers = config.get_runnable_storytellers()
|
||||
var/datum/dynamic_storyteller/picked
|
||||
for(var/T in runnable_storytellers)
|
||||
@@ -361,7 +360,7 @@ SUBSYSTEM_DEF(vote)
|
||||
picked = S
|
||||
runnable_storytellers[S] *= round(stored_gamemode_votes[initial(S.name)]*100000,1)
|
||||
if(!picked)
|
||||
picked = pickweightAllowZero(runnable_storytellers)
|
||||
picked = pickweight(runnable_storytellers, 0)
|
||||
GLOB.dynamic_storyteller_type = picked
|
||||
if("map")
|
||||
var/datum/map_config/VM = config.maplist[.]
|
||||
@@ -489,6 +488,7 @@ SUBSYSTEM_DEF(vote)
|
||||
modes_to_add -= "traitor" // makes it so that traitor is always available
|
||||
choices.Add(modes_to_add)
|
||||
if("dynamic")
|
||||
GLOB.master_mode = "dynamic"
|
||||
var/list/probabilities = CONFIG_GET(keyed_list/storyteller_weight)
|
||||
for(var/T in config.storyteller_cache)
|
||||
var/datum/dynamic_storyteller/S = T
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
if(!..())
|
||||
return 0
|
||||
var/mob/M = target
|
||||
M.ghostize(1)
|
||||
M.ghostize(can_reenter_corpse = TRUE, voluntary = TRUE)
|
||||
|
||||
/datum/action/proc/OnUpdatedIcon()
|
||||
UpdateButtonIcon()
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
var/datum/ai_laws/lawtype
|
||||
var/list/law_weights = CONFIG_GET(keyed_list/law_weight)
|
||||
while(!lawtype && law_weights.len)
|
||||
var/possible_id = pickweightAllowZero(law_weights)
|
||||
var/possible_id = pickweight(law_weights, 0)
|
||||
lawtype = lawid_to_type(possible_id)
|
||||
if(!lawtype)
|
||||
law_weights -= possible_id
|
||||
|
||||
@@ -150,6 +150,8 @@
|
||||
friend_talk(message)
|
||||
|
||||
/mob/camera/imaginary_friend/Hear(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode, atom/movable/source)
|
||||
if (client?.prefs.chat_on_map && (client.prefs.see_chat_non_mob || ismob(speaker)))
|
||||
create_chat_message(speaker, message_language, raw_message, spans, message_mode)
|
||||
to_chat(src, compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode, FALSE, source))
|
||||
|
||||
/mob/camera/imaginary_friend/proc/friend_talk(message)
|
||||
|
||||
@@ -0,0 +1,236 @@
|
||||
#define CHAT_MESSAGE_SPAWN_TIME 0.2 SECONDS
|
||||
#define CHAT_MESSAGE_LIFESPAN 5 SECONDS
|
||||
#define CHAT_MESSAGE_EOL_FADE 0.7 SECONDS
|
||||
#define CHAT_MESSAGE_EXP_DECAY 0.7 // Messages decay at pow(factor, idx in stack)
|
||||
#define CHAT_MESSAGE_HEIGHT_DECAY 0.9 // Increase message decay based on the height of the message
|
||||
#define CHAT_MESSAGE_APPROX_LHEIGHT 11 // Approximate height in pixels of an 'average' line, used for height decay
|
||||
#define CHAT_MESSAGE_WIDTH 96 // pixels
|
||||
#define CHAT_MESSAGE_MAX_LENGTH 110 // characters
|
||||
#define WXH_TO_HEIGHT(x) text2num(copytext((x), findtextEx((x), "x") + 1)) // thanks lummox
|
||||
|
||||
/**
|
||||
* # Chat Message Overlay
|
||||
*
|
||||
* Datum for generating a message overlay on the map
|
||||
*/
|
||||
/datum/chatmessage
|
||||
/// The visual element of the chat messsage
|
||||
var/image/message
|
||||
/// The location in which the message is appearing
|
||||
var/atom/message_loc
|
||||
/// The client who heard this message
|
||||
var/client/owned_by
|
||||
/// Contains the scheduled destruction time
|
||||
var/scheduled_destruction
|
||||
/// Contains the approximate amount of lines for height decay
|
||||
var/approx_lines
|
||||
|
||||
/**
|
||||
* Constructs a chat message overlay
|
||||
*
|
||||
* Arguments:
|
||||
* * text - The text content of the overlay
|
||||
* * target - The target atom to display the overlay at
|
||||
* * owner - The mob that owns this overlay, only this mob will be able to view it
|
||||
* * extra_classes - Extra classes to apply to the span that holds the text
|
||||
* * lifespan - The lifespan of the message in deciseconds
|
||||
*/
|
||||
/datum/chatmessage/New(text, atom/target, mob/owner, list/extra_classes = null, lifespan = CHAT_MESSAGE_LIFESPAN)
|
||||
. = ..()
|
||||
if (!istype(target))
|
||||
CRASH("Invalid target given for chatmessage")
|
||||
if(QDELETED(owner) || !istype(owner) || !owner.client)
|
||||
stack_trace("/datum/chatmessage created with [isnull(owner) ? "null" : "invalid"] mob owner")
|
||||
qdel(src)
|
||||
return
|
||||
INVOKE_ASYNC(src, .proc/generate_image, text, target, owner, extra_classes, lifespan)
|
||||
|
||||
/datum/chatmessage/Destroy()
|
||||
if (owned_by)
|
||||
if (owned_by.seen_messages)
|
||||
LAZYREMOVEASSOC(owned_by.seen_messages, message_loc, src)
|
||||
owned_by.images.Remove(message)
|
||||
owned_by = null
|
||||
message_loc = null
|
||||
message = null
|
||||
return ..()
|
||||
|
||||
/**
|
||||
* Generates a chat message image representation
|
||||
*
|
||||
* Arguments:
|
||||
* * text - The text content of the overlay
|
||||
* * target - The target atom to display the overlay at
|
||||
* * owner - The mob that owns this overlay, only this mob will be able to view it
|
||||
* * extra_classes - Extra classes to apply to the span that holds the text
|
||||
* * lifespan - The lifespan of the message in deciseconds
|
||||
*/
|
||||
/datum/chatmessage/proc/generate_image(text, atom/target, mob/owner, list/extra_classes, lifespan)
|
||||
// Register client who owns this message
|
||||
owned_by = owner.client
|
||||
RegisterSignal(owned_by, COMSIG_PARENT_QDELETING, .proc/qdel, src)
|
||||
|
||||
// Clip message
|
||||
var/maxlen = owned_by.prefs.max_chat_length
|
||||
if (length_char(text) > maxlen)
|
||||
text = copytext_char(text, 1, maxlen + 1) + "..." // BYOND index moment
|
||||
|
||||
// Calculate target color if not already present
|
||||
if (!target.chat_color || target.chat_color_name != target.name)
|
||||
target.chat_color = colorize_string(target.name)
|
||||
target.chat_color_darkened = colorize_string(target.name, 0.85, 0.85)
|
||||
target.chat_color_name = target.name
|
||||
|
||||
// Get rid of any URL schemes that might cause BYOND to automatically wrap something in an anchor tag
|
||||
var/static/regex/url_scheme = new(@"[A-Za-z][A-Za-z0-9+-\.]*:\/\/", "g")
|
||||
text = replacetext(text, url_scheme, "")
|
||||
|
||||
// Reject whitespace
|
||||
var/static/regex/whitespace = new(@"^\s*$")
|
||||
if (whitespace.Find(text))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
// Non mobs speakers can be small
|
||||
if (!ismob(target))
|
||||
extra_classes |= "small"
|
||||
|
||||
// Append radio icon if from a virtual speaker
|
||||
if (extra_classes.Find("virtual-speaker"))
|
||||
var/image/r_icon = image('icons/UI_Icons/chat/chat_icons.dmi', icon_state = "radio")
|
||||
text = "\icon[r_icon] " + text
|
||||
|
||||
// We dim italicized text to make it more distinguishable from regular text
|
||||
var/tgt_color = extra_classes.Find("italics") ? target.chat_color_darkened : target.chat_color
|
||||
|
||||
// Approximate text height
|
||||
// Note we have to replace HTML encoded metacharacters otherwise MeasureText will return a zero height
|
||||
// BYOND Bug #2563917
|
||||
// Construct text
|
||||
var/static/regex/html_metachars = new(@"&[A-Za-z]{1,7};", "g")
|
||||
var/complete_text = "<span class='center maptext [extra_classes != null ? extra_classes.Join(" ") : ""]' style='color: [tgt_color]'>[text]</span>"
|
||||
var/mheight = WXH_TO_HEIGHT(owned_by.MeasureText(replacetext(complete_text, html_metachars, "m"), null, CHAT_MESSAGE_WIDTH))
|
||||
approx_lines = max(1, mheight / CHAT_MESSAGE_APPROX_LHEIGHT)
|
||||
|
||||
// Translate any existing messages upwards, apply exponential decay factors to timers
|
||||
message_loc = target
|
||||
if (owned_by.seen_messages)
|
||||
var/idx = 1
|
||||
var/combined_height = approx_lines
|
||||
for(var/msg in owned_by.seen_messages[message_loc])
|
||||
var/datum/chatmessage/m = msg
|
||||
animate(m.message, pixel_y = m.message.pixel_y + mheight, time = CHAT_MESSAGE_SPAWN_TIME)
|
||||
combined_height += m.approx_lines
|
||||
var/sched_remaining = m.scheduled_destruction - world.time
|
||||
if (sched_remaining > CHAT_MESSAGE_SPAWN_TIME)
|
||||
var/remaining_time = (sched_remaining) * (CHAT_MESSAGE_EXP_DECAY ** idx++) * (CHAT_MESSAGE_HEIGHT_DECAY ** combined_height)
|
||||
m.scheduled_destruction = world.time + remaining_time
|
||||
addtimer(CALLBACK(m, .proc/end_of_life), remaining_time, TIMER_UNIQUE|TIMER_OVERRIDE)
|
||||
|
||||
// Build message image
|
||||
message = image(loc = message_loc, layer = CHAT_LAYER)
|
||||
message.plane = GAME_PLANE
|
||||
message.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA | KEEP_APART
|
||||
message.alpha = 0
|
||||
message.pixel_y = owner.bound_height * 0.95
|
||||
message.maptext_width = CHAT_MESSAGE_WIDTH
|
||||
message.maptext_height = mheight
|
||||
message.maptext_x = (CHAT_MESSAGE_WIDTH - owner.bound_width) * -0.5
|
||||
message.maptext = complete_text
|
||||
|
||||
// View the message
|
||||
LAZYADDASSOC(owned_by.seen_messages, message_loc, src)
|
||||
owned_by.images |= message
|
||||
animate(message, alpha = 255, time = CHAT_MESSAGE_SPAWN_TIME)
|
||||
|
||||
// Prepare for destruction
|
||||
scheduled_destruction = world.time + (lifespan - CHAT_MESSAGE_EOL_FADE)
|
||||
addtimer(CALLBACK(src, .proc/end_of_life), lifespan - CHAT_MESSAGE_EOL_FADE, TIMER_UNIQUE|TIMER_OVERRIDE)
|
||||
|
||||
/**
|
||||
* Applies final animations to overlay CHAT_MESSAGE_EOL_FADE deciseconds prior to message deletion
|
||||
*/
|
||||
/datum/chatmessage/proc/end_of_life(fadetime = CHAT_MESSAGE_EOL_FADE)
|
||||
animate(message, alpha = 0, time = fadetime, flags = ANIMATION_PARALLEL)
|
||||
QDEL_IN(src, fadetime)
|
||||
|
||||
/**
|
||||
* Creates a message overlay at a defined location for a given speaker
|
||||
*
|
||||
* Arguments:
|
||||
* * speaker - The atom who is saying this message
|
||||
* * message_language - The language that the message is said in
|
||||
* * raw_message - The text content of the message
|
||||
* * spans - Additional classes to be added to the message
|
||||
* * message_mode - Bitflags relating to the mode of the message
|
||||
*/
|
||||
/mob/proc/create_chat_message(atom/movable/speaker, datum/language/message_language, raw_message, list/spans, message_mode)
|
||||
// Ensure the list we are using, if present, is a copy so we don't modify the list provided to us
|
||||
spans = spans?.Copy()
|
||||
|
||||
// Check for virtual speakers (aka hearing a message through a radio)
|
||||
var/atom/movable/originalSpeaker = speaker
|
||||
if (istype(speaker, /atom/movable/virtualspeaker))
|
||||
var/atom/movable/virtualspeaker/v = speaker
|
||||
speaker = v.source
|
||||
spans |= "virtual-speaker"
|
||||
|
||||
// Ignore virtual speaker (most often radio messages) from ourself
|
||||
if (originalSpeaker != src && speaker == src)
|
||||
return
|
||||
|
||||
// Display visual above source
|
||||
new /datum/chatmessage(lang_treat(speaker, message_language, raw_message, spans, null, TRUE), speaker, src, spans)
|
||||
|
||||
|
||||
// Tweak these defines to change the available color ranges
|
||||
#define CM_COLOR_SAT_MIN 0.6
|
||||
#define CM_COLOR_SAT_MAX 0.7
|
||||
#define CM_COLOR_LUM_MIN 0.65
|
||||
#define CM_COLOR_LUM_MAX 0.75
|
||||
|
||||
/**
|
||||
* Gets a color for a name, will return the same color for a given string consistently within a round.atom
|
||||
*
|
||||
* Note that this proc aims to produce pastel-ish colors using the HSL colorspace. These seem to be favorable for displaying on the map.
|
||||
*
|
||||
* Arguments:
|
||||
* * name - The name to generate a color for
|
||||
* * sat_shift - A value between 0 and 1 that will be multiplied against the saturation
|
||||
* * lum_shift - A value between 0 and 1 that will be multiplied against the luminescence
|
||||
*/
|
||||
/datum/chatmessage/proc/colorize_string(name, sat_shift = 1, lum_shift = 1)
|
||||
// seed to help randomness
|
||||
var/static/rseed = rand(1,26)
|
||||
|
||||
// get hsl using the selected 6 characters of the md5 hash
|
||||
var/hash = copytext(md5(name + GLOB.round_id), rseed, rseed + 6)
|
||||
var/h = hex2num(copytext(hash, 1, 3)) * (360 / 255)
|
||||
var/s = (hex2num(copytext(hash, 3, 5)) >> 2) * ((CM_COLOR_SAT_MAX - CM_COLOR_SAT_MIN) / 63) + CM_COLOR_SAT_MIN
|
||||
var/l = (hex2num(copytext(hash, 5, 7)) >> 2) * ((CM_COLOR_LUM_MAX - CM_COLOR_LUM_MIN) / 63) + CM_COLOR_LUM_MIN
|
||||
|
||||
// adjust for shifts
|
||||
s *= clamp(sat_shift, 0, 1)
|
||||
l *= clamp(lum_shift, 0, 1)
|
||||
|
||||
// convert to rgb
|
||||
var/h_int = round(h/60) // mapping each section of H to 60 degree sections
|
||||
var/c = (1 - abs(2 * l - 1)) * s
|
||||
var/x = c * (1 - abs((h / 60) % 2 - 1))
|
||||
var/m = l - c * 0.5
|
||||
x = (x + m) * 255
|
||||
c = (c + m) * 255
|
||||
m *= 255
|
||||
switch(h_int)
|
||||
if(0)
|
||||
return "#[num2hex(c, 2)][num2hex(x, 2)][num2hex(m, 2)]"
|
||||
if(1)
|
||||
return "#[num2hex(x, 2)][num2hex(c, 2)][num2hex(m, 2)]"
|
||||
if(2)
|
||||
return "#[num2hex(m, 2)][num2hex(c, 2)][num2hex(x, 2)]"
|
||||
if(3)
|
||||
return "#[num2hex(m, 2)][num2hex(x, 2)][num2hex(c, 2)]"
|
||||
if(4)
|
||||
return "#[num2hex(x, 2)][num2hex(m, 2)][num2hex(c, 2)]"
|
||||
if(5)
|
||||
return "#[num2hex(c, 2)][num2hex(m, 2)][num2hex(x, 2)]"
|
||||
@@ -1,95 +0,0 @@
|
||||
/datum/component/archaeology
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE
|
||||
var/list/archdrops = list(/obj/item/bikehorn = list(ARCH_PROB = 100, ARCH_MAXDROP = 1)) // honk~
|
||||
var/prob2drop
|
||||
var/dug
|
||||
var/datum/callback/callback
|
||||
|
||||
/datum/component/archaeology/Initialize(list/_archdrops = list(), datum/callback/_callback)
|
||||
archdrops = _archdrops
|
||||
for(var/i in archdrops)
|
||||
if(isnull(archdrops[i][ARCH_MAXDROP]))
|
||||
archdrops[i][ARCH_MAXDROP] = 1
|
||||
stack_trace("ARCHAEOLOGY WARNING: [parent] contained a null max_drop value in [i].")
|
||||
if(isnull(archdrops[i][ARCH_PROB]))
|
||||
archdrops[i][ARCH_PROB] = 100
|
||||
stack_trace("ARCHAEOLOGY WARNING: [parent] contained a null probability value in [i].")
|
||||
callback = _callback
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY,.proc/Dig)
|
||||
RegisterSignal(parent, COMSIG_ATOM_EX_ACT, .proc/BombDig)
|
||||
RegisterSignal(parent, COMSIG_ATOM_SING_PULL, .proc/SingDig)
|
||||
|
||||
/datum/component/archaeology/InheritComponent(datum/component/archaeology/A, i_am_original)
|
||||
var/list/other_archdrops = A.archdrops
|
||||
var/list/_archdrops = archdrops
|
||||
for(var/I in other_archdrops)
|
||||
_archdrops[I] += other_archdrops[I]
|
||||
|
||||
/datum/component/archaeology/proc/Dig(datum/source, obj/item/I, mob/living/user)
|
||||
if(dug)
|
||||
to_chat(user, "<span class='notice'>Looks like someone has dug here already.</span>")
|
||||
return
|
||||
|
||||
if(!isturf(user.loc))
|
||||
return
|
||||
|
||||
if(I.tool_behaviour == TOOL_SHOVEL || I.tool_behaviour == TOOL_MINING)
|
||||
to_chat(user, "<span class='notice'>You start digging...</span>")
|
||||
|
||||
if(I.use_tool(parent, user, 40, volume=50))
|
||||
to_chat(user, "<span class='notice'>You dig a hole.</span>")
|
||||
gets_dug()
|
||||
dug = TRUE
|
||||
SSblackbox.record_feedback("tally", "pick_used_mining", 1, I.type)
|
||||
return COMPONENT_NO_AFTERATTACK
|
||||
|
||||
/datum/component/archaeology/proc/gets_dug()
|
||||
if(dug)
|
||||
return
|
||||
else
|
||||
var/turf/open/OT = get_turf(parent)
|
||||
for(var/thing in archdrops)
|
||||
var/maxtodrop = archdrops[thing][ARCH_MAXDROP]
|
||||
for(var/i in 1 to maxtodrop)
|
||||
if(prob(archdrops[thing][ARCH_PROB])) // can't win them all!
|
||||
new thing(OT)
|
||||
|
||||
if(isopenturf(OT))
|
||||
if(OT.postdig_icon_change)
|
||||
if(istype(OT, /turf/open/floor/plating/asteroid/) && !OT.postdig_icon)
|
||||
var/turf/open/floor/plating/asteroid/AOT = parent
|
||||
AOT.icon_plating = "[AOT.environment_type]_dug"
|
||||
AOT.icon_state = "[AOT.environment_type]_dug"
|
||||
else
|
||||
if(isplatingturf(OT))
|
||||
var/turf/open/floor/plating/POT = parent
|
||||
POT.icon_plating = "[POT.postdig_icon]"
|
||||
POT.icon_state = "[OT.postdig_icon]"
|
||||
|
||||
if(OT.slowdown) //Things like snow slow you down until you dig them.
|
||||
OT.slowdown = 0
|
||||
dug = TRUE
|
||||
if(callback)
|
||||
callback.Invoke()
|
||||
|
||||
/datum/component/archaeology/proc/SingDig(datum/source, S, current_size)
|
||||
switch(current_size)
|
||||
if(STAGE_THREE)
|
||||
if(prob(30))
|
||||
gets_dug()
|
||||
if(STAGE_FOUR)
|
||||
if(prob(50))
|
||||
gets_dug()
|
||||
else
|
||||
if(current_size >= STAGE_FIVE && prob(70))
|
||||
gets_dug()
|
||||
|
||||
/datum/component/archaeology/proc/BombDig(datum/source, severity, target)
|
||||
switch(severity)
|
||||
if(3)
|
||||
return
|
||||
if(2)
|
||||
if(prob(20))
|
||||
gets_dug()
|
||||
if(1)
|
||||
gets_dug()
|
||||
@@ -115,6 +115,33 @@
|
||||
//Tools & Storage//
|
||||
///////////////////
|
||||
|
||||
/datum/crafting_recipe/upgraded_gauze
|
||||
name = "Improved Gauze"
|
||||
result = /obj/item/stack/medical/gauze/adv
|
||||
time = 1
|
||||
reqs = list(/obj/item/stack/medical/gauze = 1,
|
||||
/datum/reagent/space_cleaner/sterilizine = 10)
|
||||
category = CAT_MISC
|
||||
subcategory = CAT_TOOL
|
||||
|
||||
/datum/crafting_recipe/bruise_pack
|
||||
name = "Bruise Pack"
|
||||
result = /obj/item/stack/medical/bruise_pack
|
||||
time = 1
|
||||
reqs = list(/obj/item/stack/medical/gauze = 1,
|
||||
/datum/reagent/medicine/styptic_powder = 10)
|
||||
category = CAT_MISC
|
||||
subcategory = CAT_TOOL
|
||||
|
||||
/datum/crafting_recipe/burn_pack
|
||||
name = "Brun Ointment"
|
||||
result = /obj/item/stack/medical/ointment
|
||||
time = 1
|
||||
reqs = list(/obj/item/stack/medical/gauze = 1,
|
||||
/datum/reagent/medicine/silver_sulfadiazine = 10)
|
||||
category = CAT_MISC
|
||||
subcategory = CAT_TOOL
|
||||
|
||||
/datum/crafting_recipe/ghettojetpack
|
||||
name = "Improvised Jetpack"
|
||||
result = /obj/item/tank/jetpack/improvised
|
||||
@@ -233,6 +260,15 @@
|
||||
subcategory = CAT_TOOL
|
||||
category = CAT_MISC
|
||||
|
||||
/datum/crafting_recipe/electrochromatic_kit
|
||||
name = "Electrochromatic Kit"
|
||||
result = /obj/item/electronics/electrochromatic_kit
|
||||
reqs = list(/obj/item/stack/sheet/metal = 1,
|
||||
/obj/item/stack/cable_coil = 1)
|
||||
time = 5
|
||||
subcategory = CAT_TOOL
|
||||
category = CAT_MISC
|
||||
|
||||
////////////
|
||||
//Vehicles//
|
||||
////////////
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/**
|
||||
* Identification components
|
||||
*/
|
||||
/datum/component/identification
|
||||
/// General flags for how we should work.
|
||||
var/identification_flags = NONE
|
||||
/// General flags for what we should do.
|
||||
var/identification_effect_flags = NONE
|
||||
/// General flags for how we can be identified.
|
||||
var/identification_method_flags = NONE
|
||||
/// If this is set, show this on examine to the examiner if they know how to use it.
|
||||
var/additional_examine_text = "<span class='notice'>You seem to know more about this item than others..</span>"
|
||||
/// Added to deconstructive analyzer say on success if set
|
||||
var/deconstructor_reveal_text = "item operation instructions"
|
||||
|
||||
/datum/component/identification/Initialize(id_flags, id_effect_flags, id_method_flags)
|
||||
if(!isobj(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
. = ..()
|
||||
if(. & COMPONENT_INCOMPATIBLE)
|
||||
return
|
||||
identification_flags = id_flags
|
||||
identification_effect_flags = id_effect_flags
|
||||
identification_method_flags = id_method_flags
|
||||
|
||||
/datum/component/identification/RegisterWithParent()
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/on_examine)
|
||||
if(identification_effect_flags & ID_COMPONENT_EFFECT_NO_ACTIONS)
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/on_equip)
|
||||
if(identification_method_flags & ID_COMPONENT_IDENTIFY_WITH_DECONSTRUCTOR)
|
||||
RegisterSignal(parent, COMSIG_ITEM_DECONSTRUCTOR_DEEPSCAN, .proc/on_deconstructor_deepscan)
|
||||
|
||||
/datum/component/identification/UnregisterFromParent()
|
||||
var/list/unregister = list(COMSIG_PARENT_EXAMINE)
|
||||
if(identification_effect_flags & ID_COMPONENT_EFFECT_NO_ACTIONS)
|
||||
unregister += COMSIG_ITEM_EQUIPPED
|
||||
if(identification_method_flags & ID_COMPONENT_IDENTIFY_WITH_DECONSTRUCTOR)
|
||||
unregister += COMSIG_ITEM_DECONSTRUCTOR_DEEPSCAN
|
||||
UnregisterSignal(parent, unregister)
|
||||
|
||||
/datum/component/identification/proc/on_examine(datum/source, mob/user, list/returnlist)
|
||||
if(check_knowledge(user) != ID_COMPONENT_KNOWLEDGE_FULL)
|
||||
return
|
||||
if(!additional_examine_text)
|
||||
return
|
||||
returnlist += additional_examine_text
|
||||
|
||||
/datum/component/identification/vv_edit_var(var_name, var_value)
|
||||
// since i care SOOO much about memory optimization, we only register signals we need to
|
||||
// so when someone vv's us, we should probably make sure we have the ones we need to with an update.
|
||||
if((var_value == NAMEOF(src, identification_flags)) || (var_value == NAMEOF(src, identification_effect_flags)) || (var_value == NAMEOF(src, identification_method_flags)))
|
||||
UnregisterFromParent()
|
||||
. = ..()
|
||||
if((var_value == NAMEOF(src, identification_flags)) || (var_value == NAMEOF(src, identification_effect_flags)) || (var_value == NAMEOF(src, identification_method_flags)))
|
||||
RegisterWithParent()
|
||||
|
||||
/datum/component/identification/proc/on_equip(datum/source, mob/user)
|
||||
if(check_knowledge(user) == ID_COMPONENT_KNOWLEDGE_FULL)
|
||||
return
|
||||
if(identification_method_flags & ID_COMPONENT_EFFECT_NO_ACTIONS)
|
||||
return COMPONENT_NO_GRANT_ACTIONS
|
||||
|
||||
/datum/component/identification/proc/check_knowledge(mob/user)
|
||||
return ID_COMPONENT_KNOWLEDGE_NONE
|
||||
|
||||
/datum/component/identification/proc/on_identify(mob/user)
|
||||
if(identification_flags & ID_COMPONENT_DEL_ON_IDENTIFY)
|
||||
qdel(src)
|
||||
|
||||
/datum/component/identification/proc/on_deconstructor_deepscan(datum/source, obj/machinery/rnd/destructive_analyzer/analyzer, mob/user, list/information = list())
|
||||
if((identification_method_flags & ID_COMPONENT_IDENTIFY_WITH_DECONSTRUCTOR) && !(identification_flags & ID_COMPONENT_DECONSTRUCTOR_DEEPSCANNED))
|
||||
identification_flags |= ID_COMPONENT_DECONSTRUCTOR_DEEPSCANNED
|
||||
on_identify(user)
|
||||
if(deconstructor_reveal_text)
|
||||
information += deconstructor_reveal_text
|
||||
return COMPONENT_DEEPSCAN_UNCOVERED_INFORMATION
|
||||
|
||||
/**
|
||||
* Identification component subtype - Syndicate
|
||||
*
|
||||
* Checks if the user is a traitor.
|
||||
*/
|
||||
/datum/component/identification/syndicate
|
||||
|
||||
/datum/component/identification/syndicate/check_knowledge(mob/user)
|
||||
. = ..()
|
||||
if(user?.mind?.has_antag_datum(/datum/antagonist/traitor))
|
||||
. = max(., ID_COMPONENT_KNOWLEDGE_FULL)
|
||||
@@ -1,13 +1,18 @@
|
||||
/datum/component/knockback
|
||||
/// distance the atom will be thrown
|
||||
var/throw_distance
|
||||
/// whether this can throw anchored targets (tables, etc)
|
||||
var/throw_anchored
|
||||
/// whether this is a gentle throw (default false means people thrown into walls are stunned / take damage)
|
||||
var/throw_gentle
|
||||
|
||||
/datum/component/knockback/Initialize(throw_distance=1)
|
||||
/datum/component/knockback/Initialize(throw_distance=1, throw_gentle=FALSE)
|
||||
if(!isitem(parent) && !ishostile(parent) && !isgun(parent) && !ismachinery(parent) && !isstructure(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.throw_distance = throw_distance
|
||||
src.throw_anchored = throw_anchored
|
||||
src.throw_gentle = throw_gentle
|
||||
|
||||
/datum/component/knockback/RegisterWithParent()
|
||||
. = ..()
|
||||
@@ -22,17 +27,29 @@
|
||||
. = ..()
|
||||
UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT))
|
||||
|
||||
/// triggered after an item attacks something
|
||||
/datum/component/knockback/proc/item_afterattack(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!proximity_flag)
|
||||
return
|
||||
do_knockback(target, user, get_dir(source, target))
|
||||
|
||||
/// triggered after a hostile simplemob attacks something
|
||||
/datum/component/knockback/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target)
|
||||
do_knockback(target, attacker, get_dir(attacker, target))
|
||||
|
||||
/// triggered after a projectile hits something
|
||||
/datum/component/knockback/proc/projectile_hit(atom/fired_from, atom/movable/firer, atom/target, Angle)
|
||||
do_knockback(target, null, angle2dir(Angle))
|
||||
|
||||
|
||||
/**
|
||||
* Throw a target in a direction
|
||||
*
|
||||
* Arguments:
|
||||
* * target - Target atom to throw
|
||||
* * thrower - Thing that caused this atom to be thrown
|
||||
* * throw_dir - Direction to throw the atom
|
||||
*/
|
||||
/datum/component/knockback/proc/do_knockback(atom/target, mob/thrower, throw_dir)
|
||||
if(!ismovable(target) || throw_dir == null)
|
||||
return
|
||||
@@ -43,4 +60,4 @@
|
||||
throw_dir = turn(throw_dir, 180)
|
||||
throw_distance *= -1
|
||||
var/atom/throw_target = get_edge_target_turf(throwee, throw_dir)
|
||||
throwee.safe_throw_at(throw_target, throw_distance, 1, thrower)
|
||||
throwee.safe_throw_at(throw_target, throw_distance, 1, thrower) //, gentle = throw_gentle)
|
||||
|
||||
@@ -39,4 +39,5 @@
|
||||
/obj/effect/abstract/mirage_holder
|
||||
name = "Mirage holder"
|
||||
anchored = TRUE
|
||||
plane = PLANE_SPACE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
@@ -175,27 +175,27 @@
|
||||
switch(sanity)
|
||||
if(-INFINITY to SANITY_CRAZY)
|
||||
setInsanityEffect(MAJOR_INSANITY_PEN)
|
||||
master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=1.5) //Did we change something ? movetypes is runtiming, movetypes=(~FLYING))
|
||||
master.add_movespeed_modifier(/datum/movespeed_modifier/sanity/insane)
|
||||
sanity_level = 6
|
||||
if(SANITY_CRAZY to SANITY_UNSTABLE)
|
||||
setInsanityEffect(MINOR_INSANITY_PEN)
|
||||
master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=1)//, movetypes=(~FLYING))
|
||||
master.add_movespeed_modifier(/datum/movespeed_modifier/sanity/crazy)
|
||||
sanity_level = 5
|
||||
if(SANITY_UNSTABLE to SANITY_DISTURBED)
|
||||
setInsanityEffect(0)
|
||||
master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=0.5)//, movetypes=(~FLYING))
|
||||
master.add_movespeed_modifier(/datum/movespeed_modifier/sanity/disturbed)
|
||||
sanity_level = 4
|
||||
if(SANITY_DISTURBED to SANITY_NEUTRAL)
|
||||
setInsanityEffect(0)
|
||||
master.remove_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE)
|
||||
master.remove_movespeed_modifier(MOVESPEED_ID_SANITY)
|
||||
sanity_level = 3
|
||||
if(SANITY_NEUTRAL+1 to SANITY_GREAT+1) //shitty hack but +1 to prevent it from responding to super small differences
|
||||
setInsanityEffect(0)
|
||||
master.remove_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE)
|
||||
master.remove_movespeed_modifier(MOVESPEED_ID_SANITY)
|
||||
sanity_level = 2
|
||||
if(SANITY_GREAT+1 to INFINITY)
|
||||
setInsanityEffect(0)
|
||||
master.remove_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE)
|
||||
master.remove_movespeed_modifier(MOVESPEED_ID_SANITY)
|
||||
sanity_level = 1
|
||||
//update_mood_icon()
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/list/datum/nanite_program/programs = list()
|
||||
var/max_programs = NANITE_PROGRAM_LIMIT
|
||||
|
||||
var/list/datum/nanite_program/protocol/protocols = list() ///Separate list of protocol programs, to avoid looping through the whole programs list when cheking for conflicts
|
||||
var/list/datum/nanite_program/protocol/protocols = list() ///Separate list of protocol programs, to avoid looping through the whole programs list when checking for conflicts
|
||||
var/start_time = 0 ///Timestamp to when the nanites were first inserted in the host
|
||||
var/stealth = FALSE //if TRUE, does not appear on HUDs and health scans
|
||||
var/diagnostics = TRUE //if TRUE, displays program list when scanned by nanite scanners
|
||||
|
||||
@@ -198,13 +198,14 @@
|
||||
|
||||
/datum/component/riding/human/Initialize()
|
||||
. = ..()
|
||||
directional_vehicle_layers = list(TEXT_NORTH = MOB_LOWER_LAYER, TEXT_SOUTH = MOB_UPPER_LAYER, TEXT_EAST = MOB_UPPER_LAYER, TEXT_WEST = MOB_UPPER_LAYER)
|
||||
RegisterSignal(parent, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, .proc/on_host_unarmed_melee)
|
||||
|
||||
/datum/component/riding/human/vehicle_mob_unbuckle(datum/source, mob/living/M, force = FALSE)
|
||||
. = ..()
|
||||
var/mob/living/carbon/human/H = parent
|
||||
if(!length(H.buckled_mobs))
|
||||
H.remove_movespeed_modifier(MOVESPEED_ID_HUMAN_CARRYING)
|
||||
H.remove_movespeed_modifier(/datum/movespeed_modifier/human_carry)
|
||||
if(!fireman_carrying)
|
||||
M.Daze(25)
|
||||
REMOVE_TRAIT(M, TRAIT_MOBILITY_NOUSE, src)
|
||||
@@ -213,7 +214,7 @@
|
||||
. = ..()
|
||||
var/mob/living/carbon/human/H = parent
|
||||
if(length(H.buckled_mobs))
|
||||
H.add_movespeed_modifier(MOVESPEED_ID_HUMAN_CARRYING, multiplicative_slowdown = fireman_carrying? FIREMAN_CARRY_SLOWDOWN : PIGGYBACK_CARRY_SLOWDOWN)
|
||||
H.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/human_carry, TRUE, fireman_carrying? FIREMAN_CARRY_SLOWDOWN : PIGGYBACK_CARRY_SLOWDOWN)
|
||||
if(fireman_carrying)
|
||||
ADD_TRAIT(M, TRAIT_MOBILITY_NOUSE, src)
|
||||
|
||||
@@ -261,6 +262,10 @@
|
||||
|
||||
/datum/component/riding/cyborg
|
||||
|
||||
/datum/component/riding/cyborg/Initialize()
|
||||
. = ..()
|
||||
directional_vehicle_layers = list(TEXT_NORTH = MOB_LOWER_LAYER, TEXT_SOUTH = MOB_UPPER_LAYER, TEXT_EAST = MOB_UPPER_LAYER, TEXT_WEST = MOB_UPPER_LAYER)
|
||||
|
||||
/datum/component/riding/cyborg/ride_check(mob/user)
|
||||
var/atom/movable/AM = parent
|
||||
if(user.incapacitated())
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
parent_atom.opacity = 0
|
||||
if(isliving(parent_atom))
|
||||
var/mob/living/L = parent_atom
|
||||
L.add_movespeed_modifier(MOVESPEED_ID_SHRINK_RAY, update=TRUE, priority=100, multiplicative_slowdown=4)
|
||||
L.add_movespeed_modifier(/datum/movespeed_modifier/shrink_ray)
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
C.unequip_everything()
|
||||
@@ -35,7 +35,7 @@
|
||||
parent_atom.opacity = oldopac
|
||||
if(isliving(parent_atom))
|
||||
var/mob/living/L = parent_atom
|
||||
L.remove_movespeed_modifier(MOVESPEED_ID_SHRINK_RAY)
|
||||
L.remove_movespeed_modifier(/datum/movespeed_modifier/shrink_ray)
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
H.physiology.damage_resistance += 100
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
VV_DROPDOWN_OPTION(VV_HK_MARK, "Mark Object")
|
||||
VV_DROPDOWN_OPTION(VV_HK_DELETE, "Delete")
|
||||
VV_DROPDOWN_OPTION(VV_HK_EXPOSE, "Show VV To Player")
|
||||
// VV_DROPDOWN_OPTION(VV_HK_MODIFY_TRAITS, "Modify Traits")
|
||||
VV_DROPDOWN_OPTION(VV_HK_ADDCOMPONENT, "Add Component/Element")
|
||||
VV_DROPDOWN_OPTION(VV_HK_MODIFY_TRAITS, "Modify Traits")
|
||||
|
||||
//This proc is only called if everything topic-wise is verified. The only verifications that should happen here is things like permission checks!
|
||||
//href_list is a reference, modifying it in these procs WILL change the rest of the proc in topic.dm of admin/view_variables!
|
||||
@@ -37,8 +38,8 @@
|
||||
/datum/proc/vv_do_topic(list/href_list)
|
||||
if(!usr || !usr.client || !usr.client.holder || !check_rights(NONE))
|
||||
return FALSE //This is VV, not to be called by anything else.
|
||||
// if(href_list[VV_HK_MODIFY_TRAITS])
|
||||
// usr.client.holder.modify_traits(src)
|
||||
if(href_list[VV_HK_MODIFY_TRAITS])
|
||||
usr.client.holder.modify_traits(src)
|
||||
return TRUE
|
||||
|
||||
/datum/proc/vv_get_header()
|
||||
|
||||
+3
-3
@@ -309,7 +309,7 @@
|
||||
unique_enzymes = generate_unique_enzymes()
|
||||
uni_identity = generate_uni_identity()
|
||||
generate_dna_blocks()
|
||||
features = random_features(species?.id)
|
||||
features = random_features(species?.id, holder?.gender)
|
||||
|
||||
|
||||
/datum/dna/stored //subtype used by brain mob's stored_dna
|
||||
@@ -662,6 +662,6 @@
|
||||
var/danger = CONFIG_GET(number/threshold_body_size_slowdown)
|
||||
if(features["body_size"] < danger)
|
||||
var/slowdown = 1 + round(danger/features["body_size"], 0.1) * CONFIG_GET(number/body_size_slowdown_multiplier)
|
||||
holder.add_movespeed_modifier(MOVESPEED_ID_SMALL_STRIDE, TRUE, 100, NONE, TRUE, slowdown, ALL, FLOATING|CRAWLING)
|
||||
holder.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/small_stride, TRUE, slowdown)
|
||||
else if(old_size < danger)
|
||||
holder.remove_movespeed_modifier(MOVESPEED_ID_SMALL_STRIDE)
|
||||
holder.remove_movespeed_modifier(/datum/movespeed_modifier/small_stride)
|
||||
|
||||
@@ -1,28 +1,20 @@
|
||||
/datum/element/dusts_on_leaving_area
|
||||
element_flags = ELEMENT_DETACH | ELEMENT_BESPOKE
|
||||
id_arg_index = 2
|
||||
var/list/attached_mobs = list()
|
||||
var/list/area_types = list()
|
||||
|
||||
/datum/element/dusts_on_leaving_area/Attach(datum/target,types)
|
||||
. = ..()
|
||||
if(!ismob(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
attached_mobs += target
|
||||
area_types = types
|
||||
START_PROCESSING(SSprocessing,src)
|
||||
RegisterSignal(target,COMSIG_ENTER_AREA,.proc/check_dust)
|
||||
|
||||
/datum/element/dusts_on_leaving_area/Detach(mob/M)
|
||||
. = ..()
|
||||
if(M in attached_mobs)
|
||||
attached_mobs -= M
|
||||
if(!attached_mobs.len)
|
||||
STOP_PROCESSING(SSprocessing,src)
|
||||
UnregisterSignal(M,COMSIG_ENTER_AREA)
|
||||
|
||||
/datum/element/dusts_on_leaving_area/process()
|
||||
for(var/m in attached_mobs)
|
||||
var/mob/M = m
|
||||
var/area/A = get_area(M)
|
||||
if(!(A.type in area_types))
|
||||
M.dust(force = TRUE)
|
||||
Detach(M)
|
||||
/datum/element/dusts_on_leaving_area/proc/check_dust(datum/source, area/A)
|
||||
var/mob/M = source
|
||||
if(istype(M) && !(A.type in area_types))
|
||||
M.dust(force = TRUE)
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
release()
|
||||
|
||||
/obj/item/clothing/head/mob_holder/mob_can_equip(mob/living/M, mob/living/equipper, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE)
|
||||
if(!ishuman(M)) //monkeys holding monkeys holding monkeys...
|
||||
if(M == held_mob || !ishuman(M)) //monkeys holding monkeys holding monkeys...
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -0,0 +1,215 @@
|
||||
/*
|
||||
* Scavenging element. Its scope shouldn't elude your imagination.
|
||||
* Basically loot piles that can be searched through for some items.
|
||||
* In my opinion, these are more engaging than normal maintenance loot spawners.
|
||||
* The loot doesn't have to be strictly made of items and objects, you could also use it to invoke some "events"
|
||||
* such as mice, rats, an halloween spook, persistent relics, traps, etcetera, go wild.
|
||||
*/
|
||||
/datum/element/scavenging
|
||||
element_flags = ELEMENT_BESPOKE|ELEMENT_DETACH
|
||||
id_arg_index = 3
|
||||
|
||||
var/list/loot_left_per_atom = list() //loot left per attached atom.
|
||||
var/list/loot_table //pickweight list of available loot.
|
||||
var/list/unique_loot //limited loot, once the associated value reaches zero, its key is removed from loot_table
|
||||
var/scavenge_time = 12 SECONDS //how much time it takes
|
||||
var/can_use_hands = TRUE //bare handed scavenge time multiplier. If set to zero, only tools are usable.
|
||||
var/list/tool_types //which tool types the player can use instead of scavenging by hand, associated value is their speed.
|
||||
var/del_atom_on_depletion = FALSE //Will the atom be deleted when there is no loot left?
|
||||
var/list/search_texts = list("starts searching through", "start searching through", "You hear rummaging...")
|
||||
var/loot_restriction = NO_LOOT_RESTRICTION
|
||||
var/maximum_loot_per_player = 1 //only relevant if there is a restriction.
|
||||
var/list/scavenger_restriction_list //used for restrictions.
|
||||
|
||||
var/mean_loot_weight = 0
|
||||
var/list/progress_per_atom = list() //seconds of ditched progress per atom, used to resume the work instead of starting over.
|
||||
var/static/list/players_busy_scavenging = list() //players already busy scavenging.
|
||||
|
||||
/datum/element/scavenging/Attach(atom/target, amount = 5, list/loot, list/unique, time = 12 SECONDS, hands = TRUE, list/tools, list/texts, \
|
||||
del_deplete = FALSE, restriction = NO_LOOT_RESTRICTION, max_per_player = 1)
|
||||
. = ..()
|
||||
if(. == ELEMENT_INCOMPATIBLE || !length(loot) || !amount || !istype(target) || isarea(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
loot_left_per_atom[target] = amount
|
||||
if(!loot_table)
|
||||
loot_table = loot
|
||||
for(var/A in loot_table) //tally the list weights
|
||||
mean_loot_weight += loot_table[A]
|
||||
mean_loot_weight /= length(loot_table)
|
||||
if(!unique_loot)
|
||||
unique_loot = unique || list()
|
||||
scavenge_time = time
|
||||
can_use_hands = hands
|
||||
tool_types = tools
|
||||
if(texts)
|
||||
search_texts = texts
|
||||
del_atom_on_depletion = del_deplete
|
||||
loot_restriction = restriction
|
||||
maximum_loot_per_player = max_per_player
|
||||
if(can_use_hands)
|
||||
RegisterSignal(target, list(COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_ATTACK_PAW), .proc/scavenge_barehanded)
|
||||
if(tool_types)
|
||||
RegisterSignal(target, COMSIG_PARENT_ATTACKBY, .proc/scavenge_tool)
|
||||
RegisterSignal(target, COMSIG_PARENT_EXAMINE, .proc/on_examine)
|
||||
|
||||
/datum/element/scavenging/Detach(atom/target)
|
||||
. = ..()
|
||||
loot_left_per_atom -= target
|
||||
progress_per_atom -= target
|
||||
if(maximum_loot_per_player == LOOT_RESTRICTION_MIND_PILE || maximum_loot_per_player == LOOT_RESTRICTION_CKEY_PILE)
|
||||
maximum_loot_per_player -= target
|
||||
UnregisterSignal(target, list(COMSIG_ATOM_ATTACK_HAND, COMSIG_PARENT_ATTACKBY, COMSIG_PARENT_EXAMINE))
|
||||
|
||||
/datum/element/scavenging/proc/on_examine(atom/source, mob/user, list/examine_list)
|
||||
var/methods = tool_types.Copy()
|
||||
if(can_use_hands)
|
||||
methods += list("bare handed")
|
||||
if(!length(methods))
|
||||
return
|
||||
var/text = english_list(methods, "", " or ")
|
||||
examine_list += "<span class='notice'>Looks like [source.p_they()] can be scavenged [length(tool_types) ? "with" : ""][length(methods == 1) ? "" : "either "][length(tool_types) ? "a " : ""][text]</span>"
|
||||
|
||||
/datum/element/scavenging/proc/scavenge_barehanded(atom/source, mob/user)
|
||||
scavenge(source, user, 1)
|
||||
return COMPONENT_NO_ATTACK_HAND
|
||||
|
||||
/datum/element/scavenging/proc/scavenge_tool(atom/source, obj/item/I, mob/user, params)
|
||||
if(user.a_intent == INTENT_HARM || !I.tool_behaviour) //Robust trash disposal techniques!
|
||||
return
|
||||
var/speed_multi = tool_types[I.tool_behaviour]
|
||||
if(!speed_multi)
|
||||
return
|
||||
scavenge(source, user, speed_multi)
|
||||
return COMPONENT_NO_AFTERATTACK
|
||||
|
||||
/// This proc has to be asynced (cough cough, do_after) in order to return the comsig values in time to stop the attack chain.
|
||||
/datum/element/scavenging/proc/scavenge(atom/source, mob/user, speed_multi = 1)
|
||||
set waitfor = FALSE
|
||||
|
||||
if(players_busy_scavenging[user])
|
||||
return
|
||||
players_busy_scavenging[user] = TRUE
|
||||
var/progress_done = progress_per_atom[source]
|
||||
var/len_messages = length(search_texts)
|
||||
var/msg_first_person
|
||||
if(len_messages >= 2)
|
||||
msg_first_person = "<span class='notice'>You [progress_done ? ", resume a ditched task and " : ""][search_texts[2]] [source].</span>"
|
||||
var/msg_blind
|
||||
if(len_messages >= 3)
|
||||
msg_blind = "<span class='italic'>[search_texts[3]]</span>"
|
||||
user.visible_message("<span class='notice'>[user] [search_texts[1]] [source].</span>", msg_first_person, msg_blind)
|
||||
if(do_after(user, scavenge_time * speed_multi, TRUE, source, TRUE, CALLBACK(src, .proc/set_progress, source, world.time), resume_time = progress_done * speed_multi))
|
||||
spawn_loot(source, user)
|
||||
players_busy_scavenging -= user
|
||||
|
||||
/datum/element/scavenging/proc/set_progress(atom/source, start_time)
|
||||
progress_per_atom[source] = world.time - start_time
|
||||
return TRUE
|
||||
|
||||
/datum/element/scavenging/proc/spawn_loot(atom/source, mob/user)
|
||||
progress_per_atom -= source
|
||||
|
||||
var/loot = pickweight(loot_table)
|
||||
var/special = TRUE
|
||||
var/free = FALSE
|
||||
if(!loot_left_per_atom[source])
|
||||
to_chat(user, "<span class='warning'>Looks likes there is nothing worth of interest left in [source], what a shame...</span>")
|
||||
return
|
||||
|
||||
var/num_times = 0
|
||||
switch(loot_restriction)
|
||||
if(LOOT_RESTRICTION_MIND)
|
||||
num_times = LAZYACCESS(scavenger_restriction_list, user.mind)
|
||||
if(LOOT_RESTRICTION_CKEY)
|
||||
num_times = LAZYACCESS(scavenger_restriction_list, user.ckey)
|
||||
if(LOOT_RESTRICTION_MIND_PILE)
|
||||
var/list/L = LAZYACCESS(scavenger_restriction_list, source)
|
||||
if(L)
|
||||
num_times = LAZYACCESS(L, user.mind)
|
||||
if(LOOT_RESTRICTION_CKEY_PILE)
|
||||
var/list/L = LAZYACCESS(scavenger_restriction_list, source)
|
||||
if(L)
|
||||
num_times = LAZYACCESS(L, user.ckey)
|
||||
if(num_times >= maximum_loot_per_player)
|
||||
to_chat(user, "<span class='warning'>You can't find anything else vaguely useful in [source]. Another set of eyes might, however.</span>")
|
||||
return
|
||||
|
||||
switch(loot) // TODO: datumize these out.
|
||||
if(SCAVENGING_FOUND_NOTHING)
|
||||
to_chat(user, "<span class='notice'>You found nothing, better luck next time.</span>")
|
||||
free = TRUE //doesn't consume the loot pile.
|
||||
if(SCAVENGING_SPAWN_MOUSE)
|
||||
var/nasty_rodent = pick("mouse", "rodent", "squeaky critter", "stupid pest", "annoying cable chewer", "nasty, ugly, evil, disease-ridden rodent")
|
||||
to_chat(user, "<span class='notice'>You found something in [source]... no wait, that's just another [nasty_rodent].</span>")
|
||||
new /mob/living/simple_animal/mouse(source.loc)
|
||||
if(SCAVENGING_SPAWN_MICE)
|
||||
user.visible_message("<span class='notice'>A small gang of mice emerges from [source].</span>", \
|
||||
"<span class='notice'>You found something in [source]... no wait, that's just another- <b>no wait, that's a lot of damn mice.</b></span>")
|
||||
for(var/i in 1 to rand(4, 6))
|
||||
new /mob/living/simple_animal/mouse(source.loc)
|
||||
if(SCAVENGING_SPAWN_TOM)
|
||||
if(GLOB.tom_existed) //There can only be one.
|
||||
to_chat(user, "<span class='notice'>You found nothing, better luck next time.</span>")
|
||||
free = TRUE
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You found something in [source]... no wait, that's Tom, the mouse! What is he doing here?</span>")
|
||||
new /mob/living/simple_animal/mouse/brown/Tom(source.loc)
|
||||
else
|
||||
special = FALSE
|
||||
|
||||
if(!special) //generic loot. Nothing too strange like more loot spawners anyway.
|
||||
var/atom/A = new loot(source.loc)
|
||||
if(isitem(A) && !user.get_active_held_item())
|
||||
user.put_in_hands(A)
|
||||
var/rarity_append = "."
|
||||
switch(loot_table[loot]/mean_loot_weight*100)
|
||||
if(0 to 1)
|
||||
rarity_append = "! <b>AMAZING!</b>"
|
||||
if(1 to 2)
|
||||
rarity_append = "! Woah!"
|
||||
if(2 to 5)
|
||||
rarity_append = ". Rare!"
|
||||
if(5 to 10)
|
||||
rarity_append = ". Great."
|
||||
if(10 to 25)
|
||||
rarity_append = ". Nice."
|
||||
if(20 to 50)
|
||||
rarity_append = ". Not bad."
|
||||
to_chat(user, "You found something in [source]... it's \a [A][rarity_append]")
|
||||
|
||||
if(unique_loot[loot])
|
||||
var/loot_left = --unique_loot[loot]
|
||||
if(!loot_left)
|
||||
loot_table -= loot
|
||||
unique_loot -= loot
|
||||
mean_loot_weight = 0
|
||||
for(var/A in loot_table) //re-tally the list weights
|
||||
mean_loot_weight += loot_table[A]
|
||||
mean_loot_weight /= length(loot_table)
|
||||
|
||||
if(free)
|
||||
return
|
||||
|
||||
--loot_left_per_atom[source]
|
||||
if(del_atom_on_depletion && !loot_left_per_atom[source])
|
||||
source.visible_message("<span class='warning'>[source] has been looted clean.</span>")
|
||||
qdel(source)
|
||||
return
|
||||
|
||||
if(!loot_restriction)
|
||||
return
|
||||
|
||||
LAZYINITLIST(scavenger_restriction_list)
|
||||
switch(loot_restriction)
|
||||
if(LOOT_RESTRICTION_MIND)
|
||||
scavenger_restriction_list[user.mind]++
|
||||
if(LOOT_RESTRICTION_CKEY)
|
||||
scavenger_restriction_list[user.ckey]++
|
||||
if(LOOT_RESTRICTION_MIND_PILE)
|
||||
LAZYINITLIST(scavenger_restriction_list[source])
|
||||
var/list/L = scavenger_restriction_list[source]
|
||||
L[user.mind]++
|
||||
if(LOOT_RESTRICTION_CKEY_PILE)
|
||||
LAZYINITLIST(scavenger_restriction_list[source])
|
||||
var/list/L = scavenger_restriction_list[source]
|
||||
L[user.ckey]++
|
||||
@@ -0,0 +1,31 @@
|
||||
/datum/element/snailcrawl
|
||||
element_flags = ELEMENT_DETACH
|
||||
|
||||
/datum/element/snailcrawl/Attach(datum/target)
|
||||
. = ..()
|
||||
if(!ismovable(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
var/P
|
||||
if(iscarbon(target))
|
||||
P = .proc/snail_crawl
|
||||
else
|
||||
P = .proc/lubricate
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, P)
|
||||
|
||||
/datum/element/snailcrawl/Detach(mob/living/carbon/target)
|
||||
. = ..()
|
||||
UnregisterSignal(target, COMSIG_MOVABLE_MOVED)
|
||||
if(istype(target))
|
||||
target.remove_movespeed_modifier(/datum/movespeed_modifier/snail_crawl)
|
||||
|
||||
/datum/element/snailcrawl/proc/snail_crawl(mob/living/carbon/snail)
|
||||
if(snail.resting && !snail.buckled && lubricate(snail))
|
||||
snail.add_movespeed_modifier(/datum/movespeed_modifier/snail_crawl)
|
||||
else
|
||||
snail.remove_movespeed_modifier(/datum/movespeed_modifier/snail_crawl)
|
||||
|
||||
/datum/element/snailcrawl/proc/lubricate(atom/movable/snail)
|
||||
var/turf/open/OT = get_turf(snail)
|
||||
if(istype(OT))
|
||||
OT.MakeSlippery(TURF_WET_LUBE, 20)
|
||||
return TRUE
|
||||
@@ -63,7 +63,11 @@
|
||||
var/force_escaped = FALSE // Set by Into The Sunset command of the shuttle manipulator
|
||||
var/list/learned_recipes //List of learned recipe TYPES.
|
||||
|
||||
/// Our skill holder.
|
||||
var/datum/skill_holder/skill_holder
|
||||
|
||||
/datum/mind/New(var/key)
|
||||
skill_holder = new
|
||||
src.key = key
|
||||
soulOwner = src
|
||||
martial_art = default_martial_art
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
// Hey! Listen! Update \config\iceruinblacklist.txt with your new ruins!
|
||||
|
||||
/datum/map_template/ruin/icemoon
|
||||
prefix = "_maps/RandomRuins/IceRuins/"
|
||||
allow_duplicates = FALSE
|
||||
cost = 5
|
||||
|
||||
// above ground only
|
||||
|
||||
/datum/map_template/ruin/icemoon/lust
|
||||
name = "Ruin of Lust"
|
||||
id = "lust"
|
||||
description = "Not exactly what you expected."
|
||||
suffix = "icemoon_surface_lust.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/asteroid
|
||||
name = "Asteroid Site"
|
||||
id = "asteroidsite"
|
||||
description = "Surprised to see us here?"
|
||||
suffix = "icemoon_surface_asteroid.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/hotsprings
|
||||
name = "Hot Springs"
|
||||
id = "hotsprings"
|
||||
description = "Just relax and take a dip, nothing will go wrong, I swear!"
|
||||
suffix = "icemoon_surface_hotsprings.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/engioutpost
|
||||
name = "Engineer Outpost"
|
||||
id = "engioutpost"
|
||||
description = "Blown up by an unfortunate accident."
|
||||
suffix = "icemoon_surface_engioutpost.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/fountain
|
||||
name = "Fountain Hall"
|
||||
id = "fountain"
|
||||
description = "The fountain has a warning on the side. DANGER: May have undeclared side effects that only become obvious when implemented."
|
||||
prefix = "_maps/RandomRuins/AnywhereRuins/"
|
||||
suffix = "fountain_hall.dmm"
|
||||
|
||||
// above and below ground together
|
||||
|
||||
/datum/map_template/ruin/icemoon/mining_site
|
||||
name = "Mining Site"
|
||||
id = "miningsite"
|
||||
description = "Ruins of a site where people once mined with primitive tools for ore."
|
||||
suffix = "icemoon_surface_mining_site.dmm"
|
||||
always_place = TRUE
|
||||
always_spawn_with = list(/datum/map_template/ruin/icemoon/underground/mining_site_below = PLACE_BELOW)
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/mining_site_below
|
||||
name = "Mining Site Underground"
|
||||
id = "miningsite-underground"
|
||||
description = "Who knew ladders could be so useful?"
|
||||
suffix = "icemoon_underground_mining_site.dmm"
|
||||
unpickable = TRUE
|
||||
|
||||
// below ground only
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground
|
||||
name = "underground ruin"
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/abandonedvillage
|
||||
name = "Abandoned Village"
|
||||
id = "abandonedvillage"
|
||||
description = "Who knows what lies within?"
|
||||
suffix = "icemoon_underground_abandoned_village.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/library
|
||||
name = "Buried Library"
|
||||
id = "buriedlibrary"
|
||||
description = "A once grand library, now lost to the confines of the Ice Moon."
|
||||
suffix = "icemoon_underground_library.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/wrath
|
||||
name = "Ruin of Wrath"
|
||||
id = "wrath"
|
||||
description = "You'll fight and fight and just keep fighting."
|
||||
suffix = "icemoon_underground_wrath.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/lavaland
|
||||
name = "Lavaland Site"
|
||||
id = "lavalandsite"
|
||||
description = "I guess we never really left you huh?"
|
||||
suffix = "icemoon_underground_lavaland.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/puzzle
|
||||
name = "Ancient Puzzle"
|
||||
id = "puzzle"
|
||||
description = "Mystery to be solved."
|
||||
suffix = "icemoon_underground_puzzle.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/bathhouse
|
||||
name = "Bath House"
|
||||
id = "bathhouse"
|
||||
description = "A taste of paradise, locked in the hell of the Ice Moon."
|
||||
suffix = "icemoon_underground_bathhouse.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/wendigo_cave
|
||||
name = "Wendigo Cave"
|
||||
id = "wendigocave"
|
||||
description = "Into the jaws of the beast."
|
||||
suffix = "icemoon_underground_wendigo_cave.dmm"
|
||||
|
||||
/datum/map_template/ruin/icemoon/underground/free_golem
|
||||
name = "Free Golem Ship"
|
||||
id = "golem-ship"
|
||||
description = "Lumbering humanoids, made out of precious metals, move inside this ship. They frequently leave to mine more minerals, which they somehow turn into more of them. \
|
||||
Seem very intent on research and individual liberty, and also geology-based naming?"
|
||||
prefix = "_maps/RandomRuins/AnywhereRuins/"
|
||||
suffix = "golem_ship.dmm"
|
||||
allow_duplicates = FALSE
|
||||
@@ -67,7 +67,8 @@
|
||||
description = "Lumbering humanoids, made out of precious metals, move inside this ship. They frequently leave to mine more minerals, which they somehow turn into more of them. \
|
||||
Seem very intent on research and individual liberty, and also geology based naming?"
|
||||
cost = 20
|
||||
suffix = "lavaland_surface_golem_ship.dmm"
|
||||
prefix = "_maps/RandomRuins/AnywhereRuins/"
|
||||
suffix = "golem_ship.dmm"
|
||||
allow_duplicates = FALSE
|
||||
|
||||
/datum/map_template/ruin/lavaland/animal_hospital
|
||||
@@ -175,7 +176,8 @@
|
||||
name = "Fountain Hall"
|
||||
id = "fountain"
|
||||
description = "The fountain has a warning on the side. DANGER: May have undeclared side effects that only become obvious when implemented."
|
||||
suffix = "lavaland_surface_fountain_hall.dmm"
|
||||
prefix = "_maps/RandomRuins/AnywhereRuins/"
|
||||
suffix = "fountain_hall.dmm"
|
||||
cost = 5
|
||||
allow_duplicates = FALSE
|
||||
|
||||
|
||||
@@ -23,14 +23,14 @@
|
||||
mappath = "[prefix][shuttle_id].dmm"
|
||||
. = ..()
|
||||
|
||||
/datum/map_template/shuttle/preload_size(path, cache)
|
||||
/datum/map_template/shuttle/preload_size(path = mappath, force_cache = FALSE)
|
||||
. = ..(path, TRUE) // Done this way because we still want to know if someone actualy wanted to cache the map
|
||||
if(!cached_map)
|
||||
return
|
||||
|
||||
discover_port_offset()
|
||||
|
||||
if(!cache)
|
||||
if(!cached_map)
|
||||
cached_map = null
|
||||
|
||||
/datum/map_template/shuttle/proc/discover_port_offset()
|
||||
@@ -53,12 +53,11 @@
|
||||
++xcrd
|
||||
--ycrd
|
||||
|
||||
/datum/map_template/shuttle/load(turf/T, centered, register=TRUE)
|
||||
/datum/map_template/shuttle/load(turf/T, centered = FALSE, orientation = SOUTH, annihilate = default_annihilate, force_cache = FALSE, rotate_placement_to_orientation = FALSE, register = TRUE)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/list/turfs = block( locate(.[MAP_MINX], .[MAP_MINY], .[MAP_MINZ]),
|
||||
locate(.[MAP_MAXX], .[MAP_MAXY], .[MAP_MAXZ]))
|
||||
var/list/turfs = get_last_loaded_turf_block()
|
||||
for(var/i in 1 to turfs.len)
|
||||
var/turf/place = turfs[i]
|
||||
if(istype(place, /turf/open/space)) // This assumes all shuttles are loaded in a single spot then moved to their real destination.
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
// yeah yeah verbs suck whatever I suck at this fix this someone please - kevinz000
|
||||
|
||||
/mob/verb/check_skills()
|
||||
set name = "Check Skills"
|
||||
set category = "IC"
|
||||
set desc = "Check your skills (if you have any..)"
|
||||
|
||||
if(!mind)
|
||||
to_chat(usr, "<span class='warning'>How do you check the skills of [(usr == src)? "yourself when you are" : "something"] without a mind?</span>")
|
||||
return
|
||||
if(!mind.skill_holder)
|
||||
to_chat(usr, "<span class='warning'>How do you check the skills of [(usr == src)? "yourself when you are" : "something"] without the capability for skills? (PROBABLY A BUG, PRESS F1.)</span>")
|
||||
return
|
||||
var/datum/browser/B = new(usr, "skilldisplay_[REF(src)]", "Skills of [src]")
|
||||
B.set_content(mind.skill_holder.html_readout())
|
||||
B.open()
|
||||
@@ -0,0 +1,95 @@
|
||||
GLOBAL_LIST_INIT(skill_datums, init_skill_datums())
|
||||
|
||||
/proc/init_skill_datums()
|
||||
. = list()
|
||||
for(var/path in subtypesof(/datum/skill))
|
||||
var/datum/skill/S = path
|
||||
if(initial(S.abstract_type) == path)
|
||||
continue
|
||||
S = new path
|
||||
.[S.type] = S
|
||||
|
||||
/proc/get_skill_datum(path)
|
||||
return GLOB.skill_datums[path]
|
||||
|
||||
/proc/sanitize_skill_value(path, value)
|
||||
var/datum/skill/S = get_skill_datum(path)
|
||||
// don't check, if we runtime let it happen.
|
||||
return S.sanitize_value(value)
|
||||
|
||||
/proc/is_skill_value_greater(path, existing, new_value)
|
||||
var/datum/skill/S = get_skill_datum(path)
|
||||
// don't check, if we runtime let it happen.
|
||||
return S.is_value_greater(existing, new_value)
|
||||
|
||||
/**
|
||||
* Skill datums
|
||||
*/
|
||||
/datum/skill
|
||||
/// Our name
|
||||
var/name
|
||||
/// Our description
|
||||
var/desc
|
||||
/// Our progression type
|
||||
var/progression_type
|
||||
/// Abstract type
|
||||
var/abstract_type = /datum/skill
|
||||
|
||||
/**
|
||||
* Ensures what someone's setting as a value for this skill is valid.
|
||||
*/
|
||||
/datum/skill/proc/sanitize_value(new_value)
|
||||
return new_value
|
||||
|
||||
/**
|
||||
* Checks if a value is greater
|
||||
*/
|
||||
/datum/skill/proc/is_value_greater(existing, new_value)
|
||||
if(!existing)
|
||||
return TRUE
|
||||
return new_value > existing
|
||||
|
||||
/**
|
||||
* Standard value "render"
|
||||
*/
|
||||
/datum/skill/proc/standard_render_value(value)
|
||||
return value
|
||||
|
||||
// Just saying, the choice to use different sub-parent-types is to force coders to resolve issues as I won't be implementing custom procs to grab skill levels in a certain context.
|
||||
// Aka: So people don't forget to change checks if they change a skill's progression type.
|
||||
|
||||
/datum/skill/binary
|
||||
abstract_type = /datum/skill/binary
|
||||
progression_type = SKILL_PROGRESSION_BINARY
|
||||
|
||||
/datum/skill/binary/sanitize_value(new_value)
|
||||
return new_value? TRUE : FALSE
|
||||
|
||||
/datum/skill/binary/standard_render_value(value)
|
||||
return value? "Yes" : "No"
|
||||
|
||||
/datum/skill/numerical
|
||||
abstract_type = /datum/skill/numerical
|
||||
progression_type = SKILL_PROGRESSION_NUMERICAL
|
||||
/// Max value of this skill
|
||||
var/max_value = 100
|
||||
/// Min value of this skill
|
||||
var/min_value = 0
|
||||
/// Display as a percent in standard_render_value?
|
||||
var/display_as_percent = FALSE
|
||||
|
||||
/datum/skill/numerical/sanitize_value(new_value)
|
||||
return clamp(new_value, min_value, max_value)
|
||||
|
||||
/datum/skill/numerical/standard_render_value(value)
|
||||
return display_as_percent? "[round(value/max_value/100, 0.01)]%" : "[value] / [max_value]"
|
||||
|
||||
/datum/skill/enum
|
||||
abstract_type = /datum/skill/enum
|
||||
progression_type = SKILL_PROGRESSION_ENUM
|
||||
/// Valid values for the skill
|
||||
var/list/valid_values = list()
|
||||
|
||||
/datum/skill/enum/sanitize_value(new_value)
|
||||
if(new_value in valid_values)
|
||||
return new_value
|
||||
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
* Skill holder datums
|
||||
*/
|
||||
/datum/skill_holder
|
||||
/// Our list of skills and values. Lazylist. Associative. Keys are datum typepaths to the skill.
|
||||
var/list/skills
|
||||
/// Same as [skills] but affinities, which are multiplied to increase amount when gaining skills.
|
||||
var/list/skill_affinities
|
||||
|
||||
/**
|
||||
* Grabs the value of a skill.
|
||||
*/
|
||||
/datum/skill_holder/proc/get_skill_value(skill)
|
||||
if(!ispath(skill))
|
||||
CRASH("Invalid get_skill_value call. Use typepaths.") //until a time when we somehow need text ids for dynamic skills, I'm enforcing this.
|
||||
if(!skills)
|
||||
return null
|
||||
return LAZYACCESS(skills, skill)
|
||||
|
||||
/**
|
||||
* Grabs our affinity for a skill. !!This is a multiplier!!
|
||||
*/
|
||||
/datum/skill_holder/proc/get_skill_affinity(skill)
|
||||
if(!ispath(skill))
|
||||
CRASH("Invalid get_skill_affinity call. Use typepaths.") //until a time when we somehow need text ids for dynamic skills, I'm enforcing this.
|
||||
if(!skills)
|
||||
return 1
|
||||
var/affinity = LAZYACCESS(skill_affinities, skill)
|
||||
if(isnull(affinity))
|
||||
return 1
|
||||
return affinity
|
||||
|
||||
/**
|
||||
* Sets the value of a skill.
|
||||
*/
|
||||
/datum/skill_holder/proc/set_skill_value(skill, value)
|
||||
if(!ispath(skill))
|
||||
CRASH("Invalid set_skill_value call. Use typepaths.") //until a time when we somehow need text ids for dynamic skills, I'm enforcing this.
|
||||
LAZYINITLIST(skills)
|
||||
value = sanitize_skill_value(skill, value)
|
||||
if(!isnull(value))
|
||||
LAZYSET(skills, skill, value)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/**
|
||||
* Boosts a skill to a value if not aobve
|
||||
*/
|
||||
/datum/skill_holder/proc/boost_skill_value_to(skill, value)
|
||||
var/current = get_skill_value(skill)
|
||||
if(!is_skill_value_greater(skill, current, value))
|
||||
return FALSE
|
||||
set_skill_value(skill, value)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Automatic skill increase, multiplied by skill affinity if existing.
|
||||
* Only works if skill is numerical.
|
||||
*/
|
||||
/datum/skill_holder/proc/auto_gain_experience(skill, value)
|
||||
if(!ispath(skill, /datum/skill/numerical))
|
||||
CRASH("You cannot auto increment a non numerical skill!")
|
||||
var/current = get_skill_value(skill)
|
||||
var/affinity = get_skill_affinity(skill)
|
||||
boost_skill_value_to(skill, current + (value * affinity))
|
||||
|
||||
/**
|
||||
* Generates a HTML readout of our skills.
|
||||
* Port to tgui-next when?
|
||||
*/
|
||||
/datum/skill_holder/proc/html_readout()
|
||||
var/list/out = list("<center><h1>Skills</h1></center><hr>")
|
||||
out += "<table style=\"width:100%\"><tr><th><b>Skill</b><th><b>Value</b></tr>"
|
||||
for(var/path in skills)
|
||||
var/datum/skill/S = GLOB.skill_datums[path]
|
||||
out += "<tr><td>[S.name]</td><td>[S.standard_render_value(skills[path])]</td></tr>"
|
||||
out += "</table>"
|
||||
return out.Join("")
|
||||
@@ -0,0 +1,3 @@
|
||||
/datum/skill/numerical/surgery
|
||||
name = "Surgery"
|
||||
desc = "How proficient you are at doing surgery."
|
||||
@@ -550,3 +550,30 @@
|
||||
else if(isanimal(L))
|
||||
var/mob/living/simple_animal/SM = L
|
||||
SM.adjustHealth(-3.5, forced = TRUE)
|
||||
|
||||
/obj/screen/alert/status_effect/regenerative_core
|
||||
name = "Reinforcing Tendrils"
|
||||
desc = "You can move faster than your broken body could normally handle!"
|
||||
icon_state = "regenerative_core"
|
||||
name = "Regenerative Core Tendrils"
|
||||
|
||||
/datum/status_effect/regenerative_core
|
||||
id = "Regenerative Core"
|
||||
duration = 1 MINUTES
|
||||
status_type = STATUS_EFFECT_REPLACE
|
||||
alert_type = /obj/screen/alert/status_effect/regenerative_core
|
||||
|
||||
/datum/status_effect/regenerative_core/on_apply()
|
||||
. = ..()
|
||||
ADD_TRAIT(owner, TRAIT_IGNOREDAMAGESLOWDOWN, "regenerative_core")
|
||||
owner.adjustBruteLoss(-25)
|
||||
if(!AmBloodsucker(owner)) //use your coffin you lazy bastard
|
||||
owner.adjustFireLoss(-25)
|
||||
owner.remove_CC()
|
||||
owner.bodytemperature = BODYTEMP_NORMAL
|
||||
return TRUE
|
||||
|
||||
/datum/status_effect/regenerative_core/on_remove()
|
||||
. = ..()
|
||||
REMOVE_TRAIT(owner, TRAIT_IGNOREDAMAGESLOWDOWN, "regenerative_core")
|
||||
owner.updatehealth()
|
||||
@@ -120,12 +120,12 @@
|
||||
/datum/status_effect/mesmerize/on_creation(mob/living/new_owner, set_duration)
|
||||
. = ..()
|
||||
ADD_TRAIT(owner, TRAIT_MUTE, "mesmerize")
|
||||
owner.add_movespeed_modifier("[STATUS_EFFECT_MESMERIZE]_[id]", TRUE, priority = 64, override = TRUE, multiplicative_slowdown = 5, blacklisted_movetypes = FALSE? NONE : CRAWLING)
|
||||
owner.add_movespeed_modifier(/datum/movespeed_modifier/status_effect/mesmerize)
|
||||
|
||||
/datum/status_effect/mesmerize/on_remove()
|
||||
. = ..()
|
||||
REMOVE_TRAIT(owner, TRAIT_MUTE, "mesmerize")
|
||||
owner.remove_movespeed_modifier("[STATUS_EFFECT_MESMERIZE]_[id]")
|
||||
owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/mesmerize)
|
||||
|
||||
/datum/status_effect/mesmerize/on_creation(mob/living/new_owner, set_duration)
|
||||
if(isnum(set_duration))
|
||||
@@ -141,9 +141,7 @@
|
||||
/datum/status_effect/electrode
|
||||
id = "tased"
|
||||
alert_type = null
|
||||
var/slowdown = 1.5
|
||||
var/slowdown_priority = 50 //to make sure the stronger effect overrides
|
||||
var/affect_crawl = FALSE
|
||||
var/movespeed_mod = /datum/movespeed_modifier/status_effect/tased
|
||||
var/nextmove_modifier = 1
|
||||
var/stamdmg_per_ds = 0 //a 20 duration would do 20 stamdmg, disablers do 24 or something
|
||||
var/last_tick = 0 //fastprocess processing speed is a goddamn sham, don't trust it.
|
||||
@@ -155,12 +153,12 @@
|
||||
last_tick = world.time
|
||||
if(iscarbon(owner))
|
||||
var/mob/living/carbon/C = owner
|
||||
C.add_movespeed_modifier("[MOVESPEED_ID_TASED_STATUS]_[id]", TRUE, priority = slowdown_priority, override = TRUE, multiplicative_slowdown = slowdown, blacklisted_movetypes = affect_crawl? NONE : CRAWLING)
|
||||
C.add_movespeed_modifier(movespeed_mod)
|
||||
|
||||
/datum/status_effect/electrode/on_remove()
|
||||
if(iscarbon(owner))
|
||||
var/mob/living/carbon/C = owner
|
||||
C.remove_movespeed_modifier("[MOVESPEED_ID_TASED_STATUS]_[id]")
|
||||
C.remove_movespeed_modifier(movespeed_mod)
|
||||
. = ..()
|
||||
|
||||
/datum/status_effect/electrode/tick()
|
||||
@@ -178,8 +176,7 @@
|
||||
|
||||
/datum/status_effect/electrode/no_combat_mode
|
||||
id = "tased_strong"
|
||||
slowdown = 8
|
||||
slowdown_priority = 100
|
||||
movespeed_mod = /datum/movespeed_modifier/status_effect/tased/no_combat_mode
|
||||
nextmove_modifier = 2
|
||||
blocks_combatmode = TRUE
|
||||
stamdmg_per_ds = 1
|
||||
@@ -394,78 +391,34 @@
|
||||
owner.underlays -= marked_underlay //if this is being called, we should have an owner at this point.
|
||||
..()
|
||||
|
||||
/datum/status_effect/saw_bleed
|
||||
/datum/status_effect/stacking/saw_bleed
|
||||
id = "saw_bleed"
|
||||
duration = -1 //removed under specific conditions
|
||||
tick_interval = 6
|
||||
alert_type = null
|
||||
var/mutable_appearance/bleed_overlay
|
||||
var/mutable_appearance/bleed_underlay
|
||||
var/bleed_amount = 3
|
||||
var/bleed_buildup = 3
|
||||
var/delay_before_decay = 5
|
||||
delay_before_decay = 5
|
||||
stack_threshold = 10
|
||||
max_stacks = 10
|
||||
overlay_file = 'icons/effects/bleed.dmi'
|
||||
underlay_file = 'icons/effects/bleed.dmi'
|
||||
overlay_state = "bleed"
|
||||
underlay_state = "bleed"
|
||||
var/bleed_damage = 200
|
||||
var/needs_to_bleed = FALSE
|
||||
|
||||
/datum/status_effect/saw_bleed/Destroy()
|
||||
if(owner)
|
||||
owner.cut_overlay(bleed_overlay)
|
||||
owner.underlays -= bleed_underlay
|
||||
QDEL_NULL(bleed_overlay)
|
||||
return ..()
|
||||
/datum/status_effect/stacking/saw_bleed/fadeout_effect()
|
||||
new /obj/effect/temp_visual/bleed(get_turf(owner))
|
||||
|
||||
/datum/status_effect/saw_bleed/on_apply()
|
||||
if(owner.stat == DEAD)
|
||||
return FALSE
|
||||
bleed_overlay = mutable_appearance('icons/effects/bleed.dmi', "bleed[bleed_amount]")
|
||||
bleed_underlay = mutable_appearance('icons/effects/bleed.dmi', "bleed[bleed_amount]")
|
||||
var/icon/I = icon(owner.icon, owner.icon_state, owner.dir)
|
||||
var/icon_height = I.Height()
|
||||
bleed_overlay.pixel_x = -owner.pixel_x
|
||||
bleed_overlay.pixel_y = FLOOR(icon_height * 0.25, 1)
|
||||
bleed_overlay.transform = matrix() * (icon_height/world.icon_size) //scale the bleed overlay's size based on the target's icon size
|
||||
bleed_underlay.pixel_x = -owner.pixel_x
|
||||
bleed_underlay.transform = matrix() * (icon_height/world.icon_size) * 3
|
||||
bleed_underlay.alpha = 40
|
||||
owner.add_overlay(bleed_overlay)
|
||||
owner.underlays += bleed_underlay
|
||||
return ..()
|
||||
/datum/status_effect/stacking/saw_bleed/threshold_cross_effect()
|
||||
owner.adjustBruteLoss(bleed_damage)
|
||||
var/turf/T = get_turf(owner)
|
||||
new /obj/effect/temp_visual/bleed/explode(T)
|
||||
for(var/d in GLOB.alldirs)
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(T, d)
|
||||
playsound(T, "desceration", 100, TRUE, -1)
|
||||
|
||||
/datum/status_effect/saw_bleed/tick()
|
||||
if(owner.stat == DEAD)
|
||||
qdel(src)
|
||||
else
|
||||
add_bleed(-1)
|
||||
|
||||
/datum/status_effect/saw_bleed/proc/add_bleed(amount)
|
||||
owner.cut_overlay(bleed_overlay)
|
||||
owner.underlays -= bleed_underlay
|
||||
bleed_amount += amount
|
||||
if(bleed_amount)
|
||||
if(bleed_amount >= 10)
|
||||
needs_to_bleed = TRUE
|
||||
qdel(src)
|
||||
else
|
||||
if(amount > 0)
|
||||
tick_interval += delay_before_decay
|
||||
bleed_overlay.icon_state = "bleed[bleed_amount]"
|
||||
bleed_underlay.icon_state = "bleed[bleed_amount]"
|
||||
owner.add_overlay(bleed_overlay)
|
||||
owner.underlays += bleed_underlay
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/datum/status_effect/saw_bleed/on_remove()
|
||||
. = ..()
|
||||
if(needs_to_bleed)
|
||||
var/turf/T = get_turf(owner)
|
||||
new /obj/effect/temp_visual/bleed/explode(T)
|
||||
for(var/d in GLOB.alldirs)
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(T, d)
|
||||
playsound(T, "desceration", 200, 1, -1)
|
||||
owner.adjustBruteLoss(bleed_damage)
|
||||
else
|
||||
new /obj/effect/temp_visual/bleed(get_turf(owner))
|
||||
/datum/status_effect/stacking/saw_bleed/bloodletting
|
||||
id = "bloodletting"
|
||||
stack_threshold = 7
|
||||
max_stacks = 7
|
||||
bleed_damage = 20
|
||||
|
||||
/datum/status_effect/neck_slice
|
||||
id = "neck_slice"
|
||||
@@ -650,11 +603,11 @@
|
||||
if(isnum(set_duration))
|
||||
duration = set_duration
|
||||
. = ..()
|
||||
owner.add_movespeed_modifier(MOVESPEED_ID_ELECTROSTAFF, multiplicative_slowdown = 1, movetypes = GROUND)
|
||||
owner.add_movespeed_modifier(/datum/movespeed_modifier/status_effect/electrostaff)
|
||||
|
||||
/datum/status_effect/electrostaff/on_remove()
|
||||
. = ..()
|
||||
owner.remove_movespeed_modifier(MOVESPEED_ID_ELECTROSTAFF)
|
||||
owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/electrostaff)
|
||||
|
||||
//GOLEM GANG
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
var/duration = -1 //How long the status effect lasts in DECISECONDS. Enter -1 for an effect that never ends unless removed through some means.
|
||||
var/tick_interval = 10 //How many deciseconds between ticks, approximately. Leave at 10 for every second.
|
||||
var/mob/living/owner //The mob affected by the status effect.
|
||||
var/status_type = STATUS_EFFECT_UNIQUE //How many of the effect can be on one mob, and what happens when you try to add another
|
||||
var/on_remove_on_mob_delete = FALSE //if we call on_remove() when the mob is deleted
|
||||
var/examine_text //If defined, this text will appear when the mob is examined - to use he, she etc. use "SUBJECTPRONOUN" and replace it in the examines themselves
|
||||
var/alert_type = /obj/screen/alert/status_effect //the alert thrown by the status effect, contains name and description
|
||||
@@ -16,6 +15,8 @@
|
||||
/// If this is TRUE, the user will have sprint forcefully disabled while this is active.
|
||||
var/blocks_sprint = FALSE
|
||||
var/obj/screen/alert/status_effect/linked_alert = null //the alert itself, if it exists
|
||||
/// How many of the effect can be on one mob, and what happens when you try to add another
|
||||
var/status_type = STATUS_EFFECT_UNIQUE
|
||||
|
||||
/datum/status_effect/New(list/arguments)
|
||||
on_creation(arglist(arguments))
|
||||
@@ -67,6 +68,9 @@
|
||||
|
||||
/datum/status_effect/proc/tick() //Called every tick.
|
||||
|
||||
/datum/status_effect/proc/before_remove() //! Called before being removed; returning FALSE will cancel removal
|
||||
return TRUE
|
||||
|
||||
/datum/status_effect/proc/on_remove() //Called whenever the buff expires or is removed; do note that at the point this is called, it is out of the owner's status_effects but owner is not yet null
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
REMOVE_TRAIT(owner, TRAIT_COMBAT_MODE_LOCKED, src)
|
||||
@@ -123,12 +127,13 @@
|
||||
S1 = new effect(arguments)
|
||||
. = S1
|
||||
|
||||
/mob/living/proc/remove_status_effect(effect) //removes all of a given status effect from this mob, returning TRUE if at least one was removed
|
||||
/mob/living/proc/remove_status_effect(effect, ...) //removes all of a given status effect from this mob, returning TRUE if at least one was removed
|
||||
. = FALSE
|
||||
var/list/arguments = args.Copy(2)
|
||||
if(status_effects)
|
||||
var/datum/status_effect/S1 = effect
|
||||
for(var/datum/status_effect/S in status_effects)
|
||||
if(initial(S1.id) == S.id)
|
||||
if(initial(S1.id) == S.id && S.before_remove(arguments))
|
||||
qdel(S)
|
||||
. = TRUE
|
||||
|
||||
@@ -147,3 +152,129 @@
|
||||
for(var/datum/status_effect/S in status_effects)
|
||||
if(initial(S1.id) == S.id)
|
||||
. += S
|
||||
|
||||
//////////////////////
|
||||
// STACKING EFFECTS //
|
||||
//////////////////////
|
||||
|
||||
/datum/status_effect/stacking
|
||||
id = "stacking_base"
|
||||
duration = -1 //removed under specific conditions
|
||||
alert_type = null
|
||||
var/stacks = 0 //how many stacks are accumulated, also is # of stacks that target will have when first applied
|
||||
var/delay_before_decay //deciseconds until ticks start occuring, which removes stacks (first stack will be removed at this time plus tick_interval)
|
||||
tick_interval = 10 //deciseconds between decays once decay starts
|
||||
var/stack_decay = 1 //how many stacks are lost per tick (decay trigger)
|
||||
var/stack_threshold //special effects trigger when stacks reach this amount
|
||||
var/max_stacks //stacks cannot exceed this amount
|
||||
var/consumed_on_threshold = TRUE //if status should be removed once threshold is crossed
|
||||
var/threshold_crossed = FALSE //set to true once the threshold is crossed, false once it falls back below
|
||||
var/overlay_file
|
||||
var/underlay_file
|
||||
var/overlay_state // states in .dmi must be given a name followed by a number which corresponds to a number of stacks. put the state name without the number in these state vars
|
||||
var/underlay_state // the number is concatonated onto the string based on the number of stacks to get the correct state name
|
||||
var/mutable_appearance/status_overlay
|
||||
var/mutable_appearance/status_underlay
|
||||
|
||||
/datum/status_effect/stacking/proc/threshold_cross_effect() //what happens when threshold is crossed
|
||||
|
||||
/datum/status_effect/stacking/proc/stacks_consumed_effect() //runs if status is deleted due to threshold being crossed
|
||||
|
||||
/datum/status_effect/stacking/proc/fadeout_effect() //runs if status is deleted due to being under one stack
|
||||
|
||||
/datum/status_effect/stacking/proc/stack_decay_effect() //runs every time tick() causes stacks to decay
|
||||
|
||||
/datum/status_effect/stacking/proc/on_threshold_cross()
|
||||
threshold_cross_effect()
|
||||
if(consumed_on_threshold)
|
||||
stacks_consumed_effect()
|
||||
qdel(src)
|
||||
|
||||
/datum/status_effect/stacking/proc/on_threshold_drop()
|
||||
|
||||
/datum/status_effect/stacking/proc/can_have_status()
|
||||
return owner.stat != DEAD
|
||||
|
||||
/datum/status_effect/stacking/proc/can_gain_stacks()
|
||||
return owner.stat != DEAD
|
||||
|
||||
/datum/status_effect/stacking/tick()
|
||||
if(!can_have_status())
|
||||
qdel(src)
|
||||
else
|
||||
add_stacks(-stack_decay)
|
||||
stack_decay_effect()
|
||||
|
||||
/datum/status_effect/stacking/proc/add_stacks(stacks_added)
|
||||
if(stacks_added > 0 && !can_gain_stacks())
|
||||
return FALSE
|
||||
owner.cut_overlay(status_overlay)
|
||||
owner.underlays -= status_underlay
|
||||
stacks += stacks_added
|
||||
if(stacks > 0)
|
||||
if(stacks >= stack_threshold && !threshold_crossed) //threshold_crossed check prevents threshold effect from occuring if changing from above threshold to still above threshold
|
||||
threshold_crossed = TRUE
|
||||
on_threshold_cross()
|
||||
if(consumed_on_threshold)
|
||||
return
|
||||
else if(stacks < stack_threshold && threshold_crossed)
|
||||
threshold_crossed = FALSE //resets threshold effect if we fall below threshold so threshold effect can trigger again
|
||||
on_threshold_drop()
|
||||
if(stacks_added > 0)
|
||||
tick_interval += delay_before_decay //refreshes time until decay
|
||||
stacks = min(stacks, max_stacks)
|
||||
status_overlay.icon_state = "[overlay_state][stacks]"
|
||||
status_underlay.icon_state = "[underlay_state][stacks]"
|
||||
owner.add_overlay(status_overlay)
|
||||
owner.underlays += status_underlay
|
||||
else
|
||||
fadeout_effect()
|
||||
qdel(src) //deletes status if stacks fall under one
|
||||
|
||||
/datum/status_effect/stacking/on_creation(mob/living/new_owner, stacks_to_apply)
|
||||
. = ..()
|
||||
if(.)
|
||||
add_stacks(stacks_to_apply)
|
||||
|
||||
/datum/status_effect/stacking/on_apply()
|
||||
if(!can_have_status())
|
||||
return FALSE
|
||||
status_overlay = mutable_appearance(overlay_file, "[overlay_state][stacks]")
|
||||
status_underlay = mutable_appearance(underlay_file, "[underlay_state][stacks]")
|
||||
var/icon/I = icon(owner.icon, owner.icon_state, owner.dir)
|
||||
var/icon_height = I.Height()
|
||||
status_overlay.pixel_x = -owner.pixel_x
|
||||
status_overlay.pixel_y = FLOOR(icon_height * 0.25, 1)
|
||||
status_overlay.transform = matrix() * (icon_height/world.icon_size) //scale the status's overlay size based on the target's icon size
|
||||
status_underlay.pixel_x = -owner.pixel_x
|
||||
status_underlay.transform = matrix() * (icon_height/world.icon_size) * 3
|
||||
status_underlay.alpha = 40
|
||||
owner.add_overlay(status_overlay)
|
||||
owner.underlays += status_underlay
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/stacking/Destroy()
|
||||
if(owner)
|
||||
owner.cut_overlay(status_overlay)
|
||||
owner.underlays -= status_underlay
|
||||
QDEL_NULL(status_overlay)
|
||||
return ..()
|
||||
|
||||
/// Status effect from multiple sources, when all sources are removed, so is the effect
|
||||
/datum/status_effect/grouped
|
||||
status_type = STATUS_EFFECT_MULTIPLE //! Adds itself to sources and destroys itself if one exists already, there are never multiple
|
||||
var/list/sources = list()
|
||||
|
||||
/datum/status_effect/grouped/on_creation(mob/living/new_owner, source)
|
||||
var/datum/status_effect/grouped/existing = new_owner.has_status_effect(type)
|
||||
if(existing)
|
||||
existing.sources |= source
|
||||
qdel(src)
|
||||
return FALSE
|
||||
else
|
||||
sources |= source
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/grouped/before_remove(source)
|
||||
sources -= source
|
||||
return !length(sources)
|
||||
|
||||
+108
-26
@@ -1,49 +1,96 @@
|
||||
//The effects of weather occur across an entire z-level. For instance, lavaland has periodic ash storms that scorch most unprotected creatures.
|
||||
/**
|
||||
* Causes weather to occur on a z level in certain area types
|
||||
*
|
||||
* The effects of weather occur across an entire z-level. For instance, lavaland has periodic ash storms that scorch most unprotected creatures.
|
||||
* Weather always occurs on different z levels at different times, regardless of weather type.
|
||||
* Can have custom durations, targets, and can automatically protect indoor areas.
|
||||
*
|
||||
*/
|
||||
|
||||
/datum/weather
|
||||
/// name of weather
|
||||
var/name = "space wind"
|
||||
/// description of weather
|
||||
var/desc = "Heavy gusts of wind blanket the area, periodically knocking down anyone caught in the open."
|
||||
|
||||
var/telegraph_message = "<span class='warning'>The wind begins to pick up.</span>" //The message displayed in chat to foreshadow the weather's beginning
|
||||
var/telegraph_duration = 300 //In deciseconds, how long from the beginning of the telegraph until the weather begins
|
||||
var/telegraph_sound //The sound file played to everyone on an affected z-level
|
||||
var/telegraph_overlay //The overlay applied to all tiles on the z-level
|
||||
/// The message displayed in chat to foreshadow the weather's beginning
|
||||
var/telegraph_message = "<span class='warning'>The wind begins to pick up.</span>"
|
||||
|
||||
var/weather_message = "<span class='userdanger'>The wind begins to blow ferociously!</span>" //Displayed in chat once the weather begins in earnest
|
||||
var/weather_duration = 1200 //In deciseconds, how long the weather lasts once it begins
|
||||
var/weather_duration_lower = 1200 //See above - this is the lowest possible duration
|
||||
var/weather_duration_upper = 1500 //See above - this is the highest possible duration
|
||||
/// In deciseconds, how long from the beginning of the telegraph until the weather begins
|
||||
var/telegraph_duration = 300
|
||||
/// The sound file played to everyone on an affected z-level
|
||||
var/telegraph_sound
|
||||
/// The overlay applied to all tiles on the z-level
|
||||
var/telegraph_overlay
|
||||
/// Displayed in chat once the weather begins in earnest
|
||||
var/weather_message = "<span class='userdanger'>The wind begins to blow ferociously!</span>"
|
||||
///In deciseconds, how long the weather lasts once it begins
|
||||
var/weather_duration = 1200
|
||||
///See above - this is the lowest possible duration
|
||||
var/weather_duration_lower = 1200
|
||||
///See above - this is the highest possible duration
|
||||
var/weather_duration_upper = 1500
|
||||
/// Looping sound while weather is occuring
|
||||
var/weather_sound
|
||||
/// Area overlay while the weather is occuring
|
||||
var/weather_overlay
|
||||
/// Color to apply to the area while weather is occuring
|
||||
var/weather_color = null
|
||||
|
||||
var/end_message = "<span class='danger'>The wind relents its assault.</span>" //Displayed once the weather is over
|
||||
var/end_duration = 300 //In deciseconds, how long the "wind-down" graphic will appear before vanishing entirely
|
||||
/// Displayed once the weather is over
|
||||
var/end_message = "<span class='danger'>The wind relents its assault.</span>"
|
||||
/// In deciseconds, how long the "wind-down" graphic will appear before vanishing entirely
|
||||
var/end_duration = 300
|
||||
/// Sound that plays while weather is ending
|
||||
var/end_sound
|
||||
/// Area overlay while weather is ending
|
||||
var/end_overlay
|
||||
|
||||
var/area_type = /area/space //Types of area to affect
|
||||
var/list/impacted_areas = list() //Areas to be affected by the weather, calculated when the weather begins
|
||||
var/list/protected_areas = list()//Areas that are protected and excluded from the affected areas.
|
||||
var/impacted_z_levels // The list of z-levels that this weather is actively affecting
|
||||
/// Types of area to affect
|
||||
var/area_type = /area/space
|
||||
/// TRUE value protects areas with outdoors marked as false, regardless of area type
|
||||
var/protect_indoors = FALSE
|
||||
/// Areas to be affected by the weather, calculated when the weather begins
|
||||
var/list/impacted_areas = list()
|
||||
|
||||
var/overlay_layer = AREA_LAYER //Since it's above everything else, this is the layer used by default. TURF_LAYER is below mobs and walls if you need to use that.
|
||||
var/aesthetic = FALSE //If the weather has no purpose other than looks
|
||||
var/immunity_type = "storm" //Used by mobs to prevent them from being affected by the weather
|
||||
/// Areas that are protected and excluded from the affected areas.
|
||||
var/list/protected_areas = list()
|
||||
/// The list of z-levels that this weather is actively affecting
|
||||
var/impacted_z_levels
|
||||
|
||||
var/stage = END_STAGE //The stage of the weather, from 1-4
|
||||
/// Since it's above everything else, this is the layer used by default. TURF_LAYER is below mobs and walls if you need to use that.
|
||||
var/overlay_layer = AREA_LAYER
|
||||
/// Plane for the overlay
|
||||
var/overlay_plane = BLACKNESS_PLANE
|
||||
/// If the weather has no purpose but aesthetics.
|
||||
var/aesthetic = FALSE
|
||||
/// Used by mobs to prevent them from being affected by the weather
|
||||
var/immunity_type = "storm"
|
||||
|
||||
// These are read by the weather subsystem and used to determine when and where to run the weather.
|
||||
var/probability = 0 // Weight amongst other eligible weather. If zero, will never happen randomly.
|
||||
var/target_trait = ZTRAIT_STATION // The z-level trait to affect when run randomly or when not overridden.
|
||||
/// The stage of the weather, from 1-4
|
||||
var/stage = END_STAGE
|
||||
|
||||
/// Weight amongst other eligible weather. if zero, will never happen randomly.
|
||||
var/probability = 0
|
||||
/// The z-level trait to affect when run randomly or when not overridden.
|
||||
var/target_trait = ZTRAIT_STATION
|
||||
|
||||
/// Whether a barometer can predict when the weather will happen
|
||||
var/barometer_predictable = FALSE
|
||||
var/next_hit_time = 0 //For barometers to know when the next storm will hit
|
||||
/// For barometers to know when the next storm will hit
|
||||
var/next_hit_time = 0
|
||||
|
||||
/datum/weather/New(z_levels)
|
||||
..()
|
||||
impacted_z_levels = z_levels
|
||||
|
||||
/**
|
||||
* Telegraphs the beginning of the weather on the impacted z levels
|
||||
*
|
||||
* Sends sounds and details to mobs in the area
|
||||
* Calculates duration and hit areas, and makes a callback for the actual weather to start
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/telegraph()
|
||||
if(stage == STARTUP_STAGE)
|
||||
return
|
||||
@@ -58,6 +105,8 @@
|
||||
affectareas -= get_areas(V)
|
||||
for(var/V in affectareas)
|
||||
var/area/A = V
|
||||
if(protect_indoors && !A.outdoors)
|
||||
continue
|
||||
if(A.z in impacted_z_levels)
|
||||
impacted_areas |= A
|
||||
weather_duration = rand(weather_duration_lower, weather_duration_upper)
|
||||
@@ -72,6 +121,13 @@
|
||||
SEND_SOUND(M, sound(telegraph_sound))
|
||||
addtimer(CALLBACK(src, .proc/start), telegraph_duration)
|
||||
|
||||
/**
|
||||
* Starts the actual weather and effects from it
|
||||
*
|
||||
* Updates area overlays and sends sounds and messages to mobs to notify them
|
||||
* Begins dealing effects from weather to mobs in the area
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/start()
|
||||
if(stage >= MAIN_STAGE)
|
||||
return
|
||||
@@ -86,6 +142,13 @@
|
||||
SEND_SOUND(M, sound(weather_sound))
|
||||
addtimer(CALLBACK(src, .proc/wind_down), weather_duration)
|
||||
|
||||
/**
|
||||
* Weather enters the winding down phase, stops effects
|
||||
*
|
||||
* Updates areas to be in the winding down phase
|
||||
* Sends sounds and messages to mobs to notify them
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/wind_down()
|
||||
if(stage >= WIND_DOWN_STAGE)
|
||||
return
|
||||
@@ -100,6 +163,13 @@
|
||||
SEND_SOUND(M, sound(end_sound))
|
||||
addtimer(CALLBACK(src, .proc/end), end_duration)
|
||||
|
||||
/**
|
||||
* Fully ends the weather
|
||||
*
|
||||
* Effects no longer occur and area overlays are removed
|
||||
* Removes weather from processing completely
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/end()
|
||||
if(stage == END_STAGE)
|
||||
return 1
|
||||
@@ -115,7 +185,11 @@
|
||||
if(can_weather_act(L))
|
||||
weather_act(L)
|
||||
|
||||
/datum/weather/proc/can_weather_act(mob/living/L) //Can this weather impact a mob?
|
||||
/**
|
||||
* Returns TRUE if the living mob can be affected by the weather
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/can_weather_act(mob/living/L)
|
||||
var/turf/mob_turf = get_turf(L)
|
||||
if(mob_turf && !(mob_turf.z in impacted_z_levels))
|
||||
return
|
||||
@@ -123,11 +197,19 @@
|
||||
return
|
||||
if(!(get_area(L) in impacted_areas))
|
||||
return
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/weather/proc/weather_act(mob/living/L) //What effect does this weather have on the hapless mob?
|
||||
/**
|
||||
* Affects the mob with whatever the weather does
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/weather_act(mob/living/L)
|
||||
return
|
||||
|
||||
/**
|
||||
* Updates the overlays on impacted areas
|
||||
*
|
||||
*/
|
||||
/datum/weather/proc/update_areas()
|
||||
for(var/V in impacted_areas)
|
||||
var/area/N = V
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
end_message = "<span class='boldannounce'>The downpour gradually slows to a light shower. It should be safe outside now.</span>"
|
||||
end_sound = 'sound/ambience/acidrain_end.ogg'
|
||||
|
||||
area_type = /area/lavaland/surface/outdoors
|
||||
target_trait = ZTRAIT_MINING
|
||||
area_type = /area
|
||||
protect_indoors = TRUE
|
||||
target_trait = ZTRAIT_ACIDRAIN
|
||||
|
||||
immunity_type = "acid" // temp
|
||||
|
||||
|
||||
@@ -16,8 +16,9 @@
|
||||
end_duration = 300
|
||||
end_overlay = "light_ash"
|
||||
|
||||
area_type = /area/lavaland/surface/outdoors
|
||||
target_trait = ZTRAIT_MINING
|
||||
area_type = /area
|
||||
protect_indoors = TRUE
|
||||
target_trait = ZTRAIT_ASHSTORM
|
||||
|
||||
immunity_type = "ash"
|
||||
|
||||
|
||||
@@ -15,8 +15,9 @@
|
||||
end_duration = 100
|
||||
end_message = "<span class='boldannounce'>The snowfall dies down, it should be safe to go outside again.</span>"
|
||||
|
||||
area_type = /area/awaymission/snowdin/outside
|
||||
target_trait = ZTRAIT_AWAY
|
||||
area_type = /area
|
||||
protect_indoors = TRUE
|
||||
target_trait = ZTRAIT_SNOWSTORM
|
||||
|
||||
immunity_type = "snow"
|
||||
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/datum/wires/autoylathe
|
||||
holder_type = /obj/machinery/autoylathe
|
||||
proper_name = "Autoylathe"
|
||||
|
||||
/datum/wires/autoylathe/New(atom/holder)
|
||||
wires = list(
|
||||
WIRE_HACK, WIRE_DISABLE,
|
||||
WIRE_SHOCK, WIRE_ZAP
|
||||
)
|
||||
add_duds(6)
|
||||
..()
|
||||
|
||||
/datum/wires/autoylathe/interactable(mob/user)
|
||||
var/obj/machinery/autoylathe/A = holder
|
||||
if(A.panel_open)
|
||||
return TRUE
|
||||
|
||||
/datum/wires/autoylathe/get_status()
|
||||
var/obj/machinery/autoylathe/A = holder
|
||||
var/list/status = list()
|
||||
status += "The red light is [A.disabled ? "on" : "off"]."
|
||||
status += "The blue light is [A.hacked ? "on" : "off"]."
|
||||
return status
|
||||
|
||||
/datum/wires/autoylathe/on_pulse(wire)
|
||||
var/obj/machinery/autoylathe/A = holder
|
||||
switch(wire)
|
||||
if(WIRE_HACK)
|
||||
A.adjust_hacked(!A.hacked)
|
||||
addtimer(CALLBACK(A, /obj/machinery/autoylathe.proc/reset, wire), 60)
|
||||
if(WIRE_SHOCK)
|
||||
A.shocked = !A.shocked
|
||||
addtimer(CALLBACK(A, /obj/machinery/autoylathe.proc/reset, wire), 60)
|
||||
if(WIRE_DISABLE)
|
||||
A.disabled = !A.disabled
|
||||
addtimer(CALLBACK(A, /obj/machinery/autoylathe.proc/reset, wire), 60)
|
||||
|
||||
/datum/wires/autoylathe/on_cut(wire, mend)
|
||||
var/obj/machinery/autoylathe/A = holder
|
||||
switch(wire)
|
||||
if(WIRE_HACK)
|
||||
A.adjust_hacked(!mend)
|
||||
if(WIRE_HACK)
|
||||
A.shocked = !mend
|
||||
if(WIRE_DISABLE)
|
||||
A.disabled = !mend
|
||||
if(WIRE_ZAP)
|
||||
A.shock(usr, 50)
|
||||
@@ -169,7 +169,7 @@
|
||||
.["real_mode"] = SSticker.mode.name
|
||||
// Key-authed callers may know the truth behind the "secret"
|
||||
|
||||
.["security_level"] = get_security_level()
|
||||
.["security_level"] = NUM2SECLEVEL(GLOB.security_level)
|
||||
.["round_duration"] = SSticker ? round((world.time-SSticker.round_start_time)/10) : 0
|
||||
// Amount of world's ticks in seconds, useful for calculating round duration
|
||||
|
||||
|
||||
+30
-10
@@ -11,13 +11,27 @@
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
|
||||
var/map_name // Set in New(); preserves the name set by the map maker, even if renamed by the Blueprints.
|
||||
/// Set in New(); preserves the name set by the map maker, even if renamed by the Blueprints.
|
||||
var/map_name
|
||||
|
||||
var/valid_territory = TRUE // If it's a valid territory for gangs to claim
|
||||
var/blob_allowed = TRUE // Does it count for blobs score? By default, all areas count.
|
||||
var/clockwork_warp_allowed = TRUE // Can servants warp into this area from Reebe?
|
||||
/// If it's valid territory for gangs/cults to summon
|
||||
var/valid_territory = TRUE
|
||||
/// if blobs can spawn there and if it counts towards their score.
|
||||
var/blob_allowed = TRUE
|
||||
/// whether servants can warp into this area from Reebe
|
||||
var/clockwork_warp_allowed = TRUE
|
||||
/// Message to display when the clockwork warp fails
|
||||
var/clockwork_warp_fail = "The structure there is too dense for warping to pierce. (This is normal in high-security areas.)"
|
||||
|
||||
/// If mining tunnel generation is allowed in this area
|
||||
var/tunnel_allowed = FALSE
|
||||
/// If flora are allowed to spawn in this area randomly through tunnel generation
|
||||
var/flora_allowed = FALSE
|
||||
/// if mobs can be spawned by natural random generation
|
||||
var/mob_spawn_allowed = FALSE
|
||||
/// If megafauna can be spawned by natural random generation
|
||||
var/megafauna_spawn_allowed = FALSE
|
||||
|
||||
var/fire = null
|
||||
var/atmos = TRUE
|
||||
var/atmosalm = FALSE
|
||||
@@ -25,11 +39,14 @@
|
||||
var/lightswitch = TRUE
|
||||
|
||||
var/requires_power = TRUE
|
||||
var/always_unpowered = FALSE // This gets overridden to 1 for space in area/Initialize().
|
||||
/// This gets overridden to 1 for space in area/Initialize().
|
||||
var/always_unpowered = FALSE
|
||||
|
||||
var/outdoors = FALSE //For space, the asteroid, lavaland, etc. Used with blueprints to determine if we are adding a new area (vs editing a station room)
|
||||
/// For space, the asteroid, lavaland, etc. Used with blueprints to determine if we are adding a new area (vs editing a station room)
|
||||
var/outdoors = FALSE
|
||||
|
||||
var/areasize = 0 //Size of the area in open turfs, only calculated for indoors areas.
|
||||
/// Size of the area in open turfs, only calculated for indoors areas.
|
||||
var/areasize = 0
|
||||
|
||||
var/power_equip = TRUE
|
||||
var/power_light = TRUE
|
||||
@@ -43,9 +60,12 @@
|
||||
var/static_environ
|
||||
|
||||
var/has_gravity = 0
|
||||
var/noteleport = FALSE //Are you forbidden from teleporting to the area? (centcom, mobs, wizard, hand teleporter)
|
||||
var/hidden = FALSE //Hides area from player Teleport function.
|
||||
var/safe = FALSE //Is the area teleport-safe: no space / radiation / aggresive mobs / other dangers
|
||||
/// Are you forbidden from teleporting to the area? (centcom, mobs, wizard, hand teleporter)
|
||||
var/noteleport = FALSE
|
||||
/// Hides area from player Teleport function.
|
||||
var/hidden = FALSE
|
||||
/// Is the area teleport-safe: no space / radiation / aggresive mobs / other dangers
|
||||
var/safe = FALSE
|
||||
/// If false, loading multiple maps with this area type will create multiple instances.
|
||||
var/unique = TRUE
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
/area/mine
|
||||
icon_state = "mining"
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
flora_allowed = TRUE
|
||||
|
||||
/area/mine/explored
|
||||
name = "Mine"
|
||||
@@ -17,6 +18,7 @@
|
||||
outdoors = TRUE
|
||||
flags_1 = NONE
|
||||
ambientsounds = MINING
|
||||
flora_allowed = FALSE
|
||||
|
||||
/area/mine/unexplored
|
||||
name = "Mine"
|
||||
@@ -31,6 +33,7 @@
|
||||
outdoors = TRUE
|
||||
flags_1 = NONE
|
||||
ambientsounds = MINING
|
||||
tunnel_allowed = TRUE
|
||||
|
||||
/area/mine/lobby
|
||||
name = "Mining Station"
|
||||
@@ -82,6 +85,7 @@
|
||||
icon_state = "mining"
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
flags_1 = NONE
|
||||
flora_allowed = TRUE
|
||||
|
||||
/area/lavaland/surface
|
||||
name = "Lavaland"
|
||||
@@ -114,9 +118,79 @@
|
||||
|
||||
/area/lavaland/surface/outdoors/unexplored //monsters and ruins spawn here
|
||||
icon_state = "unexplored"
|
||||
tunnel_allowed = TRUE
|
||||
mob_spawn_allowed = TRUE
|
||||
|
||||
/area/lavaland/surface/outdoors/unexplored/danger //megafauna will also spawn here
|
||||
icon_state = "danger"
|
||||
megafauna_spawn_allowed = TRUE
|
||||
|
||||
/area/lavaland/surface/outdoors/explored
|
||||
name = "Lavaland Labor Camp"
|
||||
flora_allowed = FALSE
|
||||
|
||||
|
||||
|
||||
/**********************Ice Moon Areas**************************/
|
||||
|
||||
/area/icemoon
|
||||
icon_state = "mining"
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
flags_1 = NONE
|
||||
flora_allowed = TRUE
|
||||
blob_allowed = FALSE
|
||||
|
||||
/area/icemoon/surface
|
||||
name = "Icemoon"
|
||||
icon_state = "explored"
|
||||
always_unpowered = TRUE
|
||||
poweralm = FALSE
|
||||
power_environ = FALSE
|
||||
power_equip = FALSE
|
||||
power_light = FALSE
|
||||
requires_power = TRUE
|
||||
ambientsounds = MINING
|
||||
|
||||
/area/icemoon/underground
|
||||
name = "Icemoon Caves"
|
||||
outdoors = TRUE
|
||||
always_unpowered = TRUE
|
||||
requires_power = TRUE
|
||||
poweralm = FALSE
|
||||
power_environ = FALSE
|
||||
power_equip = FALSE
|
||||
power_light = FALSE
|
||||
ambientsounds = MINING
|
||||
|
||||
/area/icemoon/underground/unexplored // mobs and megafauna and ruins spawn here
|
||||
name = "Icemoon Caves"
|
||||
icon_state = "unexplored"
|
||||
tunnel_allowed = TRUE
|
||||
mob_spawn_allowed = TRUE
|
||||
megafauna_spawn_allowed = TRUE
|
||||
|
||||
/area/icemoon/underground/unexplored/rivers // rivers spawn here
|
||||
icon_state = "danger"
|
||||
|
||||
/area/icemoon/underground/explored
|
||||
name = "Icemoon Underground"
|
||||
flora_allowed = FALSE
|
||||
|
||||
/area/icemoon/surface/outdoors
|
||||
name = "Icemoon Wastes"
|
||||
outdoors = TRUE
|
||||
|
||||
/area/icemoon/surface/outdoors/labor_camp
|
||||
name = "Icemoon Labor Camp"
|
||||
flora_allowed = FALSE
|
||||
|
||||
/area/icemoon/surface/outdoors/unexplored //monsters and ruins spawn here
|
||||
icon_state = "unexplored"
|
||||
tunnel_allowed = TRUE
|
||||
mob_spawn_allowed = TRUE
|
||||
|
||||
/area/icemoon/surface/outdoors/unexplored/rivers // rivers spawn here
|
||||
icon_state = "danger"
|
||||
|
||||
/area/icemoon/surface/outdoors/unexplored/rivers/no_monsters
|
||||
mob_spawn_allowed = FALSE
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// Icemoon Ruins
|
||||
|
||||
/area/ruin/unpowered/buried_library
|
||||
name = "Buried Library"
|
||||
icon_state = "dk_yellow"
|
||||
|
||||
/area/ruin/powered/bathhouse
|
||||
name = "Bath House"
|
||||
icon_state = "dk_yellow"
|
||||
+8
-1
@@ -50,6 +50,13 @@
|
||||
var/list/blood_DNA
|
||||
var/list/suit_fibers
|
||||
|
||||
/// Last name used to calculate a color for the chatmessage overlays
|
||||
var/chat_color_name
|
||||
/// Last color calculated for the the chatmessage overlays
|
||||
var/chat_color
|
||||
/// A luminescence-shifted value of the last color calculated for chatmessage overlays
|
||||
var/chat_color_darkened
|
||||
|
||||
/atom/New(loc, ...)
|
||||
//atom creation method that preloads variables at creation
|
||||
if(GLOB.use_preloader && (src.type == GLOB._preloader.target_path))//in case the instanciated atom is creating other atoms in New()
|
||||
@@ -965,7 +972,7 @@ Proc for attack log creation, because really why not
|
||||
for(var/x in materials)
|
||||
var/datum/material/custom_material = SSmaterials.GetMaterialRef(x)
|
||||
|
||||
if(!(material_flags & MATERIAL_NO_EFFECTS))
|
||||
if(material_flags & MATERIAL_EFFECTS)
|
||||
custom_material.on_applied(src, materials[custom_material] * multiplier * material_modifier, material_flags)
|
||||
custom_materials[custom_material] += materials[x] * multiplier
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
if(vs.plane == EMISSIVE_BLOCKER_PLANE)
|
||||
SSvis_overlays.remove_vis_overlay(src, list(vs))
|
||||
break
|
||||
SSvis_overlays.add_vis_overlay(src, icon, icon_state, EMISSIVE_BLOCKER_LAYER, EMISSIVE_BLOCKER_PLANE)
|
||||
SSvis_overlays.add_vis_overlay(src, icon, icon_state, EMISSIVE_BLOCKER_LAYER, EMISSIVE_BLOCKER_PLANE, dir)
|
||||
|
||||
/atom/movable/proc/can_zFall(turf/source, levels = 1, turf/target, direction)
|
||||
if(!direction)
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
if(!newloc.Enter(src, src.loc))
|
||||
return
|
||||
|
||||
if (SEND_SIGNAL(src, COMSIG_MOVABLE_PRE_MOVE, newloc) & COMPONENT_MOVABLE_BLOCK_PRE_MOVE)
|
||||
return
|
||||
|
||||
// Past this is the point of no return
|
||||
var/atom/oldloc = loc
|
||||
var/area/oldarea = get_area(oldloc)
|
||||
|
||||
@@ -40,8 +40,10 @@ GLOBAL_VAR_INIT(dynamic_stacking_limit, 90)
|
||||
GLOBAL_LIST_EMPTY(dynamic_forced_roundstart_ruleset)
|
||||
// Forced threat level, setting this to zero or higher forces the roundstart threat to the value.
|
||||
GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
|
||||
|
||||
// Storyteller picked by the voting.
|
||||
GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
// Storyteller forced by admins during voting--will be used instead of above.
|
||||
GLOBAL_VAR_INIT(dynamic_forced_storyteller, null)
|
||||
|
||||
/datum/game_mode/dynamic
|
||||
name = "dynamic mode"
|
||||
@@ -164,7 +166,7 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
|
||||
dat += "Current threat: <b>[threat]</b> <a href='?src=\ref[src];[HrefToken()];adjustthreat=1'>\[Adjust\]</A> <a href='?src=\ref[src];[HrefToken()];threatlog=1'>\[View Log\]</a><br/>"
|
||||
dat += "<br/>"
|
||||
dat += "Storyteller: <b>[storyteller.name]</b><br/>"
|
||||
dat += "Storyteller: <a href='?src=\ref[src];[HrefToken()];change_storyteller=1'><b>[storyteller.name]</b></a> <br/>"
|
||||
dat += "Parameters: centre = [GLOB.dynamic_curve_centre] ; width = [GLOB.dynamic_curve_width].<br/>"
|
||||
dat += "<i>On average, <b>[peaceful_percentage]</b>% of the rounds are more peaceful.</i><br/>"
|
||||
dat += "Forced extended: <a href='?src=\ref[src];[HrefToken()];forced_extended=1'><b>[GLOB.dynamic_forced_extended ? "On" : "Off"]</b></a><br/>"
|
||||
@@ -222,6 +224,15 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
show_threatlog(usr)
|
||||
else if (href_list["stacking_limit"])
|
||||
GLOB.dynamic_stacking_limit = input(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null) as num
|
||||
else if (href_list["change_storyteller"])
|
||||
var/list/choices = list()
|
||||
for(var/T in config.storyteller_cache)
|
||||
var/datum/dynamic_storyteller/S = T
|
||||
choices[initial(S.name)] = T
|
||||
var/selected_storyteller = choices[input("Select storyteller:", "Storyteller", storyteller.name) as null|anything in choices]
|
||||
storyteller = new selected_storyteller
|
||||
storyteller.on_start()
|
||||
message_admins("[key_name(usr)] changed the storyteller to [storyteller].", 1)
|
||||
|
||||
admin_panel() // Refreshes the window
|
||||
|
||||
@@ -243,7 +254,7 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
/datum/game_mode/dynamic/send_intercept()
|
||||
. = "<b><i>Central Command Status Summary</i></b><hr>"
|
||||
switch(round(threat_level))
|
||||
if(0 to 20)
|
||||
if(-INFINITY to 20)
|
||||
. += "<b>Peaceful Waypoint</b></center><BR>"
|
||||
. += "Your station orbits deep within controlled, core-sector systems and serves as a waypoint for routine traffic through Nanotrasen's trade empire. Due to the combination of high security, interstellar traffic, and low strategic value, it makes any direct threat of violence unlikely. Your primary enemies will be incompetence and bored crewmen: try to organize team-building events to keep staffers interested and productive. However, even deep in our territory there may be subversive elements, especially for such a high-value target as your station. Keep an eye out, but don't expect much trouble."
|
||||
set_security_level(SEC_LEVEL_GREEN)
|
||||
@@ -275,7 +286,7 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
. += "<b>Black Orbit</b></center><BR>"
|
||||
. += "As part of a mandatory security protocol, we are required to inform you that as a result of your orbital pattern directly behind an astrological body (oriented from our nearest observatory), your station will be under decreased monitoring and support. It is anticipated that your extreme location and decreased surveillance could pose security risks. Avoid unnecessary risks and attempt to keep your station in one piece."
|
||||
set_security_level(SEC_LEVEL_AMBER)
|
||||
if(96 to 100)
|
||||
if(96 to INFINITY)
|
||||
. += "<b>Impending Doom</b></center><BR>"
|
||||
. += "Your station is somehow in the middle of hostile territory, in clear view of any enemy of the corporation. Your likelihood to survive is low, and station destruction is expected and almost inevitable. Secure any sensitive material and neutralize any enemy you will come across. It is important that you at least try to maintain the station.<BR>"
|
||||
. += "Good luck."
|
||||
@@ -346,6 +357,8 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
SSblackbox.record_feedback("tally","dynamic_threat",peaceful_percentage,"Percent of same-vote rounds that are more peaceful")
|
||||
|
||||
/datum/game_mode/dynamic/can_start()
|
||||
if(GLOB.dynamic_forced_storyteller)
|
||||
GLOB.dynamic_storyteller_type = GLOB.dynamic_forced_storyteller
|
||||
storyteller = new GLOB.dynamic_storyteller_type // this is where all the initialization happens
|
||||
storyteller.on_start()
|
||||
SSblackbox.record_feedback("text","dynamic_storyteller",1,storyteller.name)
|
||||
@@ -441,6 +454,8 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
if(!drafted_rules.len)
|
||||
message_admins("Not enough threat level for roundstart antags!")
|
||||
log_game("DYNAMIC: Not enough threat level for roundstart antags!")
|
||||
midround_injection_cooldown = round((midround_injection_cooldown + world.time) / 2, 1)
|
||||
latejoin_injection_cooldown = round((latejoin_injection_cooldown + world.time) / 2, 1)
|
||||
var/indice_pop = min(10,round(roundstart_pop_ready/pop_per_requirement)+1)
|
||||
extra_rulesets_amount = 0
|
||||
if (GLOB.dynamic_classic_secret)
|
||||
@@ -721,7 +736,8 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
if (O.started_as_observer) // Observers
|
||||
current_players[CURRENT_OBSERVERS].Add(M)
|
||||
continue
|
||||
current_players[CURRENT_DEAD_PLAYERS].Add(M) // Players who actually died (and admins who ghosted, would be nice to avoid counting them somehow)
|
||||
if(!M.voluntary_ghosted)
|
||||
current_players[CURRENT_DEAD_PLAYERS].Add(M) // Players who actually died (and admins who ghosted, would be nice to avoid counting them somehow)
|
||||
threat = storyteller.calculate_threat() + added_threat
|
||||
if(threat_average_weight)
|
||||
var/cur_sample_weight = world.time - last_threat_sample_time
|
||||
@@ -823,3 +839,11 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
return RULE_OF_THREE(40, 20, x) + 50
|
||||
if (20 to INFINITY)
|
||||
return rand(90, 100)
|
||||
|
||||
/datum/game_mode/dynamic/ghost_info()
|
||||
. = list()
|
||||
. += "Current threat: [threat]"
|
||||
. += "Target threat: [threat_level]"
|
||||
. += "Storyteller: <b>[storyteller.name]</b><br/>"
|
||||
. += "Parameters: centre = [GLOB.dynamic_curve_centre] ; width = [GLOB.dynamic_curve_width].<br/>"
|
||||
. += "<i>On average, <b>[peaceful_percentage]</b>% of the rounds are more peaceful.</i><br/>"
|
||||
|
||||
@@ -642,6 +642,9 @@
|
||||
for(var/obj/effect/landmark/carpspawn/L in GLOB.landmarks_list)
|
||||
if(isturf(L.loc))
|
||||
spawn_locs += L.loc
|
||||
for(var/obj/effect/landmark/loneopspawn/L in GLOB.landmarks_list)
|
||||
if(isturf(L.loc))
|
||||
spawn_locs += L.loc
|
||||
if(!spawn_locs.len)
|
||||
return FALSE
|
||||
spawn_loc = pick(spawn_locs)
|
||||
|
||||
@@ -115,7 +115,7 @@ Property weights are:
|
||||
return 100
|
||||
var/threat_perc = mode.threat/mode.threat_level
|
||||
|
||||
return round(max(0,100*(1-(threat_perc*threat_perc*threat_perc))))
|
||||
return clamp(round(100*(1-(threat_perc*threat_perc))**2,1),0,100)
|
||||
|
||||
/datum/dynamic_storyteller/proc/roundstart_draft()
|
||||
var/list/drafted_rules = list()
|
||||
@@ -152,7 +152,7 @@ Property weights are:
|
||||
is 2.26 times as likely to be picked, all other things considered.
|
||||
Of course, we don't want it to GUARANTEE the closest, that's no fun, so it's just a weight.
|
||||
*/
|
||||
threat_weight = 1-abs(1-LOGISTIC_FUNCTION(2,0.05,cost_difference,0))
|
||||
threat_weight = abs(1-abs(1-LOGISTIC_FUNCTION(2,0.05,cost_difference,0)))
|
||||
if (rule.ready())
|
||||
var/property_weight = 0
|
||||
for(var/property in property_weights)
|
||||
@@ -209,8 +209,8 @@ Property weights are:
|
||||
weight = 1
|
||||
event_frequency_lower = 2 MINUTES
|
||||
event_frequency_upper = 10 MINUTES
|
||||
flags = WAROPS_ALWAYS_ALLOWED
|
||||
min_players = 40
|
||||
flags = WAROPS_ALWAYS_ALLOWED | FORCE_IF_WON
|
||||
min_players = 30
|
||||
var/refund_cooldown = 0
|
||||
|
||||
/datum/dynamic_storyteller/chaotic/do_process()
|
||||
@@ -232,7 +232,7 @@ Property weights are:
|
||||
curve_centre = 2
|
||||
curve_width = 1.5
|
||||
weight = 2
|
||||
min_players = 30
|
||||
min_players = 20
|
||||
flags = WAROPS_ALWAYS_ALLOWED | USE_PREV_ROUND_WEIGHTS
|
||||
property_weights = list("valid" = 3, "trust" = 5)
|
||||
|
||||
@@ -331,7 +331,7 @@ Property weights are:
|
||||
/datum/dynamic_storyteller/story/calculate_threat()
|
||||
var/current_time = (world.time / SSautotransfer.targettime)*180
|
||||
mode.threat_level = round(mode.initial_threat_level*(sin(current_time)+0.25),0.1)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/datum/dynamic_storyteller/classic
|
||||
name = "Classic"
|
||||
@@ -358,7 +358,7 @@ Property weights are:
|
||||
flags = NO_ASSASSIN | FORCE_IF_WON
|
||||
weight = 1
|
||||
dead_player_weight = 5
|
||||
property_weights = list("extended" = 2, "chaos" = -1, "valid" = -1, "story_potential" = 1, "conversion" = -10)
|
||||
property_weights = list("extended" = 2, "chaos" = -1, "valid" = -1, "conversion" = -10)
|
||||
|
||||
/datum/dynamic_storyteller/no_antag
|
||||
name = "Extended"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user