Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit329
This commit is contained in:
+10
-10
@@ -2,12 +2,12 @@
|
||||
|
||||
#define MC_SPLIT_TICK_INIT(phase_count) var/original_tick_limit = Master.current_ticklimit; var/split_tick_phases = ##phase_count
|
||||
#define MC_SPLIT_TICK \
|
||||
if(split_tick_phases > 1){\
|
||||
Master.current_ticklimit = ((original_tick_limit - TICK_USAGE) / split_tick_phases) + TICK_USAGE;\
|
||||
--split_tick_phases;\
|
||||
} else {\
|
||||
Master.current_ticklimit = original_tick_limit;\
|
||||
}
|
||||
if(split_tick_phases > 1){\
|
||||
Master.current_ticklimit = ((original_tick_limit - TICK_USAGE) / split_tick_phases) + TICK_USAGE;\
|
||||
--split_tick_phases;\
|
||||
} else {\
|
||||
Master.current_ticklimit = original_tick_limit;\
|
||||
}
|
||||
|
||||
// Used to smooth out costs to try and avoid oscillation.
|
||||
#define MC_AVERAGE_FAST(average, current) (0.7 * (average) + 0.3 * (current))
|
||||
@@ -65,14 +65,14 @@
|
||||
|
||||
#define SUBSYSTEM_DEF(X) GLOBAL_REAL(SS##X, /datum/controller/subsystem/##X);\
|
||||
/datum/controller/subsystem/##X/New(){\
|
||||
NEW_SS_GLOBAL(SS##X);\
|
||||
PreInit();\
|
||||
NEW_SS_GLOBAL(SS##X);\
|
||||
PreInit();\
|
||||
}\
|
||||
/datum/controller/subsystem/##X
|
||||
|
||||
#define PROCESSING_SUBSYSTEM_DEF(X) GLOBAL_REAL(SS##X, /datum/controller/subsystem/processing/##X);\
|
||||
/datum/controller/subsystem/processing/##X/New(){\
|
||||
NEW_SS_GLOBAL(SS##X);\
|
||||
PreInit();\
|
||||
NEW_SS_GLOBAL(SS##X);\
|
||||
PreInit();\
|
||||
}\
|
||||
/datum/controller/subsystem/processing/##X
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
//Creates a global initializer with a given InitValue expression, do not use
|
||||
#define GLOBAL_MANAGED(X, InitValue)\
|
||||
/datum/controller/global_vars/proc/InitGlobal##X(){\
|
||||
##X = ##InitValue;\
|
||||
gvars_datum_init_order += #X;\
|
||||
##X = ##InitValue;\
|
||||
gvars_datum_init_order += #X;\
|
||||
}
|
||||
//Creates an empty global initializer, do not use
|
||||
#define GLOBAL_UNMANAGED(X) /datum/controller/global_vars/proc/InitGlobal##X() { return; }
|
||||
@@ -13,8 +13,8 @@
|
||||
#ifndef TESTING
|
||||
#define GLOBAL_PROTECT(X)\
|
||||
/datum/controller/global_vars/InitGlobal##X(){\
|
||||
..();\
|
||||
gvars_datum_protected_varlist[#X] = TRUE;\
|
||||
..();\
|
||||
gvars_datum_protected_varlist[#X] = TRUE;\
|
||||
}
|
||||
#else
|
||||
#define GLOBAL_PROTECT(X)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#define GENERAL_PROTECT_DATUM(Path)\
|
||||
##Path/can_vv_get(var_name){\
|
||||
return FALSE;\
|
||||
return FALSE;\
|
||||
}\
|
||||
##Path/vv_edit_var(var_name, var_value){\
|
||||
return FALSE;\
|
||||
return FALSE;\
|
||||
}\
|
||||
##Path/CanProcCall(procname){\
|
||||
return FALSE;\
|
||||
return FALSE;\
|
||||
}
|
||||
@@ -143,7 +143,9 @@
|
||||
#define ATMOS_PASS_NO 0
|
||||
#define ATMOS_PASS_PROC -1 //ask CanAtmosPass()
|
||||
#define ATMOS_PASS_DENSITY -2 //just check density
|
||||
|
||||
#define CANATMOSPASS(A, O) ( A.CanAtmosPass == ATMOS_PASS_PROC ? A.CanAtmosPass(O) : ( A.CanAtmosPass == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPass ) )
|
||||
#define CANVERTICALATMOSPASS(A, O) ( A.CanAtmosPassVertical == ATMOS_PASS_PROC ? A.CanAtmosPass(O, TRUE) : ( A.CanAtmosPassVertical == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPassVertical ) )
|
||||
|
||||
//LAVALAND
|
||||
#define LAVALAND_EQUIPMENT_EFFECT_PRESSURE 50 //what pressure you have to be under to increase the effect of equipment meant for lavaland
|
||||
@@ -249,6 +251,13 @@
|
||||
out_var += cached_gases[total_moles_id];\
|
||||
}
|
||||
|
||||
#ifdef TESTING
|
||||
GLOBAL_LIST_INIT(atmos_adjacent_savings, list(0,0))
|
||||
#define CALCULATE_ADJACENT_TURFS(T) if (SSadjacent_air.queue[T]) { GLOB.atmos_adjacent_savings[1] += 1 } else { GLOB.atmos_adjacent_savings[2] += 1; SSadjacent_air.queue[T] = 1 }
|
||||
#else
|
||||
#define CALCULATE_ADJACENT_TURFS(T) SSadjacent_air.queue[T] = 1
|
||||
#endif
|
||||
|
||||
//Unomos - So for whatever reason, garbage collection actually drastically decreases the cost of atmos later in the round. Turning this into a define yields massively improved performance.
|
||||
#define GAS_GARBAGE_COLLECT(GASGASGAS)\
|
||||
var/list/CACHE_GAS = GASGASGAS;\
|
||||
|
||||
+13
-13
@@ -17,17 +17,17 @@
|
||||
#define POD_DESC 3
|
||||
|
||||
#define POD_STYLES list(\
|
||||
list("supplypod", "supply pod", "A Nanotrasen supply drop pod."),\
|
||||
list("bluespacepod", "bluespace supply pod" , "A Nanotrasen Bluespace supply pod. Teleports back to CentCom after delivery."),\
|
||||
list("centcompod", "\improper Centcom supply pod", "A Nanotrasen supply pod, this one has been marked with Central Command's designations. Teleports back to Centcom after delivery."),\
|
||||
list("syndiepod", "blood-red supply pod", "A dark, intimidating supply pod, covered in the blood-red markings of the Syndicate. It's probably best to stand back from this."),\
|
||||
list("squadpod", "\improper MK. II supply pod", "A Nanotrasen supply pod. This one has been marked the markings of some sort of elite strike team."),\
|
||||
list("cultpod", "bloody supply pod", "A Nanotrasen supply pod covered in scratch-marks, blood, and strange runes."),\
|
||||
list("missilepod", "cruise missile", "A big ass missile that didn't seem to fully detonate. It was likely launched from some far-off deep space missile silo. There appears to be an auxillery payload hatch on the side, though manually opening it is likely impossible."),\
|
||||
list("smissilepod", "\improper Syndicate cruise missile", "A big ass, blood-red missile that didn't seem to fully detonate. It was likely launched from some deep space Syndicate missile silo. There appears to be an auxillery payload hatch on the side, though manually opening it is likely impossible."),\
|
||||
list("boxpod", "\improper Aussec supply crate", "An incredibly sturdy supply crate, designed to withstand orbital re-entry. Has 'Aussec Armory - 2532' engraved on the side."),\
|
||||
list("honkpod", "\improper HONK pod", "A brightly-colored supply pod. It likely originated from the Clown Federation."),\
|
||||
list("fruitpod", "\improper Orange", "An angry orange."),\
|
||||
list("", "\improper S.T.E.A.L.T.H. pod MKVII", "A supply pod that, under normal circumstances, is completely invisible to conventional methods of detection. How are you even seeing this?"),\
|
||||
list("gondolapod", "gondola", "The silent walker. This one seems to be part of a delivery agency.")\
|
||||
list("supplypod", "supply pod", "A Nanotrasen supply drop pod."),\
|
||||
list("bluespacepod", "bluespace supply pod" , "A Nanotrasen Bluespace supply pod. Teleports back to CentCom after delivery."),\
|
||||
list("centcompod", "\improper Centcom supply pod", "A Nanotrasen supply pod, this one has been marked with Central Command's designations. Teleports back to Centcom after delivery."),\
|
||||
list("syndiepod", "blood-red supply pod", "A dark, intimidating supply pod, covered in the blood-red markings of the Syndicate. It's probably best to stand back from this."),\
|
||||
list("squadpod", "\improper MK. II supply pod", "A Nanotrasen supply pod. This one has been marked the markings of some sort of elite strike team."),\
|
||||
list("cultpod", "bloody supply pod", "A Nanotrasen supply pod covered in scratch-marks, blood, and strange runes."),\
|
||||
list("missilepod", "cruise missile", "A big ass missile that didn't seem to fully detonate. It was likely launched from some far-off deep space missile silo. There appears to be an auxillery payload hatch on the side, though manually opening it is likely impossible."),\
|
||||
list("smissilepod", "\improper Syndicate cruise missile", "A big ass, blood-red missile that didn't seem to fully detonate. It was likely launched from some deep space Syndicate missile silo. There appears to be an auxillery payload hatch on the side, though manually opening it is likely impossible."),\
|
||||
list("boxpod", "\improper Aussec supply crate", "An incredibly sturdy supply crate, designed to withstand orbital re-entry. Has 'Aussec Armory - 2532' engraved on the side."),\
|
||||
list("honkpod", "\improper HONK pod", "A brightly-colored supply pod. It likely originated from the Clown Federation."),\
|
||||
list("fruitpod", "\improper Orange", "An angry orange."),\
|
||||
list("", "\improper S.T.E.A.L.T.H. pod MKVII", "A supply pod that, under normal circumstances, is completely invisible to conventional methods of detection. How are you even seeing this?"),\
|
||||
list("gondolapod", "gondola", "The silent walker. This one seems to be part of a delivery agency.")\
|
||||
)
|
||||
@@ -70,13 +70,18 @@
|
||||
#define COMSIG_ATOM_CANREACH "atom_can_reach" //from internal loop in atom/movable/proc/CanReach(): (list/next)
|
||||
#define COMPONENT_BLOCK_REACH 1
|
||||
#define COMSIG_ATOM_SCREWDRIVER_ACT "atom_screwdriver_act" //from base of atom/screwdriver_act(): (mob/living/user, obj/item/I)
|
||||
#define COMSIG_ATOM_INTERCEPT_TELEPORT "intercept_teleport" //called when teleporting into a protected turf: (channel, turf/origin)
|
||||
#define COMSIG_ATOM_INTERCEPT_TELEPORT "intercept_teleport" //called when teleporting into a protected turf: (channel, turf/origin, turf/destination)
|
||||
#define COMPONENT_BLOCK_TELEPORT 1
|
||||
#define COMSIG_ATOM_HEARER_IN_VIEW "atom_hearer_in_view" //called when an atom with HEAR_1 is added to the hearers on /proc/get_hearers_in_view(): (list/processing_list, list/hearers)
|
||||
/////////////////
|
||||
#define COMSIG_ATOM_ATTACK_GHOST "atom_attack_ghost" //from base of atom/attack_ghost(): (mob/dead/observer/ghost)
|
||||
#define COMSIG_ATOM_ATTACK_HAND "atom_attack_hand" //from base of atom/attack_hand(): (mob/user)
|
||||
#define COMSIG_ATOM_ATTACK_PAW "atom_attack_paw" //from base of atom/attack_paw(): (mob/user)
|
||||
#define COMPONENT_NO_ATTACK_HAND 1 //works on all 3.
|
||||
//This signal return value bitflags can be found in __DEFINES/misc.dm
|
||||
#define COMSIG_ATOM_INTERCEPT_Z_FALL "movable_intercept_z_impact" //called for each movable in a turf contents on /turf/zImpact(): (atom/movable/A, levels)
|
||||
|
||||
|
||||
/////////////////
|
||||
|
||||
#define COMSIG_ENTER_AREA "enter_area" //from base of area/Entered(): (/area)
|
||||
@@ -98,6 +103,7 @@
|
||||
// /turf signals
|
||||
#define COMSIG_TURF_CHANGE "turf_change" //from base of turf/ChangeTurf(): (path, list/new_baseturfs, flags, list/transferring_comps)
|
||||
#define COMSIG_TURF_HAS_GRAVITY "turf_has_gravity" //from base of atom/has_gravity(): (atom/asker, list/forced_gravities)
|
||||
#define COMSIG_TURF_MULTIZ_NEW "turf_multiz_new" //from base of turf/New(): (turf/source, direction)
|
||||
|
||||
// /atom/movable signals
|
||||
#define COMSIG_MOVABLE_MOVED "movable_moved" //from base of atom/movable/Moved(): (/atom, dir)
|
||||
@@ -117,13 +123,16 @@
|
||||
#define COMSIG_MOVABLE_Z_CHANGED "movable_ztransit" //from base of atom/movable/onTransitZ(): (old_z, new_z)
|
||||
#define COMSIG_MOVABLE_HEAR "movable_hear" //from base of atom/movable/Hear(): (message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode, atom/movable/source)
|
||||
#define COMSIG_MOVABLE_DISPOSING "movable_disposing" //called when the movable is added to a disposal holder object for disposal movement: (obj/structure/disposalholder/holder, obj/machinery/disposal/source)
|
||||
#define COMSIG_MOVABLE_TELEPORTED "movable_teleported" //from base of do_teleport(): (channel, turf/origin, turf/destination)
|
||||
|
||||
// /mind signals
|
||||
#define COMSIG_MIND_TRANSFER "mind_transfer" //from base of mind/transfer_to(): (new_character, old_character)
|
||||
|
||||
// /mob signals
|
||||
#define COMSIG_MOB_EXAMINATE "mob_examinate" //from base of /mob/verb/examinate(): (atom/A)
|
||||
#define COMPONENT_ALLOW_EXAMINE 1
|
||||
#define COMSIG_MOB_DEATH "mob_death" //from base of mob/death(): (gibbed)
|
||||
#define COMSIG_MOB_GHOSTIZE "mob_ghostize" //from base of mob/Ghostize() (can_reenter_corpse)
|
||||
#define COMSIG_MOB_GHOSTIZE "mob_ghostize" //from base of mob/Ghostize(): (can_reenter_corpse)
|
||||
#define COMPONENT_BLOCK_GHOSTING 1
|
||||
#define COMSIG_MOB_ALLOWED "mob_allowed" //from base of obj/allowed(mob/M): (/obj) returns bool, if TRUE the mob has id access to the obj
|
||||
#define COMSIG_MOB_RECEIVE_MAGIC "mob_receive_magic" //from base of mob/anti_magic_check(): (mob/user, magic, holy, tinfoil, chargecost, self, protection_sources)
|
||||
@@ -148,11 +157,14 @@
|
||||
#define SPEECH_FORCED 7 */
|
||||
|
||||
// /mob/living signals
|
||||
#define COMSIG_LIVING_FULLY_HEAL "living_fully_healed" //from base of /mob/living/fully_heal(): (admin_revive)
|
||||
#define COMSIG_LIVING_REGENERATE_LIMBS "living_regenerate_limbs" //from base of /mob/living/regenerate_limbs(): (noheal, excluded_limbs)
|
||||
#define COMSIG_LIVING_RESIST "living_resist" //from base of mob/living/resist() (/mob/living)
|
||||
#define COMSIG_LIVING_IGNITED "living_ignite" //from base of mob/living/IgniteMob() (/mob/living)
|
||||
#define COMSIG_LIVING_EXTINGUISHED "living_extinguished" //from base of mob/living/ExtinguishMob() (/mob/living)
|
||||
#define COMSIG_LIVING_ELECTROCUTE_ACT "living_electrocute_act" //from base of mob/living/electrocute_act(): (shock_damage)
|
||||
#define COMSIG_LIVING_MINOR_SHOCK "living_minor_shock" //sent by stuff like stunbatons and tasers: ()
|
||||
#define COMSIG_LIVING_GUN_PROCESS_FIRE "living_gun_process_fire" //from base of /obj/item/gun/proc/process_fire(): (atom/target, params, zone_override)
|
||||
|
||||
// /mob/living/carbon signals
|
||||
#define COMSIG_CARBON_SOUNDBANG "carbon_soundbang" //from base of mob/living/carbon/soundbang_act(): (list(intensity))
|
||||
|
||||
@@ -9,6 +9,16 @@
|
||||
//Turfs
|
||||
//#define isturf(A) (istype(A, /turf)) This is actually a byond built-in. Added here for completeness sake.
|
||||
|
||||
GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(
|
||||
/turf/open/space,
|
||||
/turf/open/chasm,
|
||||
/turf/open/lava,
|
||||
/turf/open/water,
|
||||
/turf/open/openspace
|
||||
)))
|
||||
|
||||
#define isgroundlessturf(A) (is_type_in_typecache(A, GLOB.turfs_without_ground))
|
||||
|
||||
#define isopenturf(A) (istype(A, /turf/open))
|
||||
|
||||
#define isindestructiblefloor(A) (istype(A, /turf/open/indestructible))
|
||||
@@ -56,6 +66,7 @@
|
||||
#define ishumanbasic(A) (is_species(A, /datum/species/human))
|
||||
#define iscatperson(A) (ishumanbasic(A) && istype(A.dna.species, /datum/species/human/felinid) )
|
||||
#define isdwarf(A) (is_species(A, /datum/species/dwarf))
|
||||
#define isdullahan(A) (is_species(A, /datum/species/dullahan))
|
||||
|
||||
// Citadel specific species
|
||||
#define isipcperson(A) (is_species(A, /datum/species/ipc))
|
||||
|
||||
+21
-17
@@ -9,6 +9,7 @@
|
||||
#define FLOOR_PLANE -2
|
||||
#define GAME_PLANE -1
|
||||
#define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals
|
||||
|
||||
#define SPACE_LAYER 1.8
|
||||
//#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define
|
||||
#define MID_TURF_LAYER 2.02
|
||||
@@ -83,25 +84,28 @@
|
||||
#define ABOVE_LIGHTING_PLANE 16
|
||||
#define ABOVE_LIGHTING_LAYER 16
|
||||
|
||||
#define BYOND_LIGHTING_PLANE 17
|
||||
#define BYOND_LIGHTING_LAYER 17
|
||||
#define FLOOR_OPENSPACE_PLANE 17
|
||||
#define OPENSPACE_LAYER 17
|
||||
|
||||
#define CAMERA_STATIC_PLANE 18
|
||||
#define CAMERA_STATIC_LAYER 18
|
||||
#define BYOND_LIGHTING_PLANE 18
|
||||
#define BYOND_LIGHTING_LAYER 18
|
||||
|
||||
#define CAMERA_STATIC_PLANE 19
|
||||
#define CAMERA_STATIC_LAYER 19
|
||||
//HUD layer defines
|
||||
|
||||
#define FULLSCREEN_PLANE 19
|
||||
#define FLASH_LAYER 19
|
||||
#define FULLSCREEN_LAYER 19.1
|
||||
#define UI_DAMAGE_LAYER 19.2
|
||||
#define BLIND_LAYER 19.3
|
||||
#define CRIT_LAYER 19.4
|
||||
#define CURSE_LAYER 19.5
|
||||
#define FULLSCREEN_PLANE 20
|
||||
#define FLASH_LAYER 20
|
||||
#define FULLSCREEN_LAYER 20.1
|
||||
#define UI_DAMAGE_LAYER 20.2
|
||||
#define BLIND_LAYER 20.3
|
||||
#define CRIT_LAYER 20.4
|
||||
#define CURSE_LAYER 20.5
|
||||
|
||||
#define HUD_PLANE 20
|
||||
#define HUD_LAYER 20
|
||||
#define ABOVE_HUD_PLANE 21
|
||||
#define ABOVE_HUD_LAYER 21
|
||||
#define HUD_PLANE 21
|
||||
#define HUD_LAYER 21
|
||||
#define ABOVE_HUD_PLANE 22
|
||||
#define ABOVE_HUD_LAYER 22
|
||||
|
||||
#define SPLASHSCREEN_LAYER 22
|
||||
#define SPLASHSCREEN_PLANE 22
|
||||
#define SPLASHSCREEN_LAYER 23
|
||||
#define SPLASHSCREEN_PLANE 23
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
#define LIMBGROWER (1<<6) //Uses synthetic flesh
|
||||
#define SMELTER (1<<7) //uses various minerals
|
||||
#define AUTOYLATHE (1<<8) // CITADEL ADD
|
||||
#define NANITE_COMPILER (1<<9) //Prints nanite disks
|
||||
#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.
|
||||
|
||||
//Modular computer/NTNet defines
|
||||
|
||||
+14
-13
@@ -37,6 +37,7 @@ require only minor tweaks.
|
||||
#define ZTRAIT_AWAY "Away Mission"
|
||||
#define ZTRAIT_SPACE_RUINS "Space Ruins"
|
||||
#define ZTRAIT_LAVA_RUINS "Lava Ruins"
|
||||
#define ZTRAIT_ISOLATED_RUINS "Isolated Ruins" //Placing ruins on z levels with this trait will use turf reservation instead of usual placement.
|
||||
// prevents certain turfs from being stripped by a singularity
|
||||
#define ZTRAIT_PLANET "Planet"
|
||||
|
||||
@@ -52,12 +53,12 @@ require only minor tweaks.
|
||||
|
||||
// enum - how space transitions should affect this level
|
||||
#define ZTRAIT_LINKAGE "Linkage"
|
||||
// UNAFFECTED if absent - no space transitions
|
||||
#define UNAFFECTED null
|
||||
// SELFLOOPING - space transitions always self-loop
|
||||
#define SELFLOOPING "Self"
|
||||
// CROSSLINKED - mixed in with the cross-linked space pool
|
||||
#define CROSSLINKED "Cross"
|
||||
// UNAFFECTED if absent - no space transitions
|
||||
#define UNAFFECTED null
|
||||
// SELFLOOPING - space transitions always self-loop
|
||||
#define SELFLOOPING "Self"
|
||||
// CROSSLINKED - mixed in with the cross-linked space pool
|
||||
#define CROSSLINKED "Cross"
|
||||
|
||||
// default trait definitions, used by SSmapping
|
||||
#define ZTRAITS_CENTCOM list(ZTRAIT_CENTCOM = TRUE)
|
||||
@@ -72,7 +73,7 @@ require only minor tweaks.
|
||||
|
||||
// must correspond to _basemap.dm for things to work correctly
|
||||
#define DEFAULT_MAP_TRAITS list(\
|
||||
DECLARE_LEVEL("CentCom", ZTRAITS_CENTCOM),\
|
||||
DECLARE_LEVEL("CentCom", ZTRAITS_CENTCOM),\
|
||||
)
|
||||
|
||||
// Camera lock flags
|
||||
@@ -89,10 +90,10 @@ require only minor tweaks.
|
||||
#define PLACEMENT_TRIES 100 //How many times we try to fit the ruin somewhere until giving up (really should just swap to some packing algo)
|
||||
|
||||
#define PLACE_DEFAULT "random"
|
||||
#define PLACE_SAME_Z "same"
|
||||
#define PLACE_SPACE_RUIN "space"
|
||||
#define PLACE_LAVA_RUIN "lavaland"
|
||||
|
||||
|
||||
#define PLACE_SAME_Z "same" //On same z level as original ruin
|
||||
#define PLACE_SPACE_RUIN "space" //On space ruin z level(s)
|
||||
#define PLACE_LAVA_RUIN "lavaland" //On lavaland ruin z levels(s)
|
||||
#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"
|
||||
+21
-6
@@ -203,11 +203,12 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache)
|
||||
#define LOCKED_SENSORS 2
|
||||
|
||||
//Wet floor type flags. Stronger ones should be higher in number.
|
||||
#define TURF_DRY 0
|
||||
#define TURF_WET_WATER 1
|
||||
#define TURF_WET_PERMAFROST 2
|
||||
#define TURF_WET_ICE 4
|
||||
#define TURF_WET_LUBE 8
|
||||
#define TURF_DRY (0)
|
||||
#define TURF_WET_WATER (1<<0)
|
||||
#define TURF_WET_PERMAFROST (1<<1)
|
||||
#define TURF_WET_ICE (1<<2)
|
||||
#define TURF_WET_LUBE (1<<3)
|
||||
#define TURF_WET_SUPERLUBE (1<<4)
|
||||
|
||||
#define IS_WET_OPEN_TURF(O) O.GetComponent(/datum/component/wet_floor)
|
||||
|
||||
@@ -281,9 +282,11 @@ GLOBAL_LIST_INIT(pda_styles, list(MONO, VT, ORBITRON, SHARE))
|
||||
#define PDA_SKIN_ALT "Holographic"
|
||||
#define PDA_SKIN_RUGGED "Rugged"
|
||||
#define PDA_SKIN_MODERN "Modern"
|
||||
#define PDA_SKIN_MINIMAL "Minimal"
|
||||
|
||||
GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_SKIN_ALT = 'icons/obj/pda_alt.dmi',
|
||||
PDA_SKIN_RUGGED = 'icons/obj/pda_rugged.dmi', PDA_SKIN_MODERN = 'icons/obj/pda_modern.dmi'))
|
||||
PDA_SKIN_RUGGED = 'icons/obj/pda_rugged.dmi', PDA_SKIN_MODERN = 'icons/obj/pda_modern.dmi',
|
||||
PDA_SKIN_MINIMAL = 'icons/obj/pda_minimal.dmi'))
|
||||
|
||||
/////////////////////////////////////
|
||||
// atom.appearence_flags shortcuts //
|
||||
@@ -506,10 +509,22 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S
|
||||
#define AREASELECT_CORNERA "corner A"
|
||||
#define AREASELECT_CORNERB "corner B"
|
||||
|
||||
#define VARSET_FROM_LIST(L, V) if(L && L[#V]) V = L[#V]
|
||||
#define VARSET_FROM_LIST_IF(L, V, C...) if(L && L[#V] && (C)) V = L[#V]
|
||||
#define VARSET_TO_LIST(L, V) if(L) L[#V] = V
|
||||
#define VARSET_TO_LIST_IF(L, V, C...) if(L && (C)) L[#V] = V
|
||||
|
||||
#define PREF_SAVELOAD_COOLDOWN 5
|
||||
|
||||
#define VOMIT_TOXIC 1
|
||||
#define VOMIT_PURPLE 2
|
||||
|
||||
// possible bitflag return values of intercept_zImpact(atom/movable/AM, levels = 1) calls
|
||||
#define FALL_INTERCEPTED (1<<0) //Stops the movable from falling further and crashing on the ground
|
||||
#define FALL_NO_MESSAGE (1<<1) //Used to suppress the "[A] falls through [old_turf]" messages where it'd make little sense at all, like going downstairs.
|
||||
#define FALL_STOP_INTERCEPTING (1<<2) //Used in situations where halting the whole "intercept" loop would be better, like supermatter dusting (and thus deleting) the atom.
|
||||
|
||||
//Misc text define. Does 4 spaces. Used as a makeshift tabulator.
|
||||
#define FOURSPACES " "
|
||||
|
||||
#define CRYOMOBS 'icons/obj/cryo_mobs.dmi'
|
||||
|
||||
@@ -201,6 +201,8 @@
|
||||
#define SLIDE (1<<1)
|
||||
#define GALOSHES_DONT_HELP (1<<2)
|
||||
#define SLIDE_ICE (1<<3)
|
||||
#define SLIP_WHEN_CRAWLING (1<<4) //clown planet ruin
|
||||
#define SLIP_WHEN_JOGGING (1<<5) //slips prevented by walking are also dodged if the mob is not sprinting or fatigued... unless this flag is on.
|
||||
|
||||
#define MAX_CHICKENS 50
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#define USES_TGUI (1<<7) //put on things that use tgui on ui_interact instead of custom/old UI.
|
||||
#define FROZEN (1<<8)
|
||||
#define SHOVABLE_ONTO (1<<9) //called on turf.shove_act() to consider whether an object should have a niche effect (defined in their own shove_act()) when someone is pushed onto it, or do a sanity CanPass() check.
|
||||
#define BLOCK_Z_FALL (1<<10)
|
||||
|
||||
// If you add new ones, be sure to add them to /obj/Initialize as well for complete mapping support
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/// Represents a proc or verb path.
|
||||
///
|
||||
/// Despite having no DM-defined static type, proc paths have some variables,
|
||||
/// listed below. These are not modifiable, but for a given procpath P,
|
||||
/// `new P(null, "Name", "Desc")` can be used to create a new procpath with the
|
||||
/// same code but new `name` and `desc` values. The other variables cannot be
|
||||
/// changed in this way.
|
||||
///
|
||||
/// This type exists only to act as an annotation, providing reasonable static
|
||||
/// typing for procpaths. Previously, types like `/atom/verb` were used, with
|
||||
/// the `name` and `desc` vars of `/atom` thus being accessible. Proc and verb
|
||||
/// paths will fail `istype` and `ispath` checks against `/procpath`.
|
||||
/procpath
|
||||
// Although these variables are effectively const, if they are marked const
|
||||
// below, their accesses are optimized away.
|
||||
|
||||
/// A text string of the verb's name.
|
||||
var/name as text
|
||||
/// The verb's help text or description.
|
||||
var/desc as text
|
||||
/// The category or tab the verb will appear in.
|
||||
var/category as text
|
||||
/// Only clients/mobs with `see_invisibility` higher can use the verb.
|
||||
var/invisibility as num
|
||||
@@ -0,0 +1,13 @@
|
||||
// Interfaces for the SpacemanDMM linter, define'd to nothing when the linter
|
||||
// is not in use.
|
||||
|
||||
// The SPACEMAN_DMM define is set by the linter and other tooling when it runs.
|
||||
#ifdef SPACEMAN_DMM
|
||||
#define RETURN_TYPE(X) set SpacemanDMM_return_type = X
|
||||
#define SHOULD_CALL_PARENT(X) set SpacemanDMM_should_call_parent = X
|
||||
#define UNLINT(X) SpacemanDMM_unlint(X)
|
||||
#else
|
||||
#define RETURN_TYPE(X)
|
||||
#define SHOULD_CALL_PARENT(X)
|
||||
#define UNLINT(X) X
|
||||
#endif
|
||||
@@ -26,10 +26,6 @@
|
||||
|
||||
#define TIMER_ID_NULL -1
|
||||
|
||||
//For servers that can't do with any additional lag, set this to none in flightpacks.dm in subsystem/processing.
|
||||
#define FLIGHTSUIT_PROCESSING_NONE 0
|
||||
#define FLIGHTSUIT_PROCESSING_FULL 1
|
||||
|
||||
#define INITIALIZATION_INSSATOMS 0 //New should not call Initialize
|
||||
#define INITIALIZATION_INNEW_MAPLOAD 2 //New should call Initialize(TRUE)
|
||||
#define INITIALIZATION_INNEW_REGULAR 1 //New should call Initialize(FALSE)
|
||||
@@ -40,11 +36,11 @@
|
||||
|
||||
//type and all subtypes should always call Initialize in New()
|
||||
#define INITIALIZE_IMMEDIATE(X) ##X/New(loc, ...){\
|
||||
..();\
|
||||
if(!(flags_1 & INITIALIZED_1)) {\
|
||||
args[1] = TRUE;\
|
||||
SSatoms.InitAtom(src, args);\
|
||||
}\
|
||||
..();\
|
||||
if(!(flags_1 & INITIALIZED_1)) {\
|
||||
args[1] = TRUE;\
|
||||
SSatoms.InitAtom(src, args);\
|
||||
}\
|
||||
}
|
||||
|
||||
// Subsystem init_order, from highest priority to lowest priority
|
||||
@@ -112,10 +108,10 @@
|
||||
#define FIRE_PRIORITY_DEFAULT 50
|
||||
#define FIRE_PRIORITY_PARALLAX 65
|
||||
#define FIRE_PRIORITY_NPC 80
|
||||
#define FIRE_PRIORITY_FLIGHTPACKS 80
|
||||
#define FIRE_PRIORITY_MOBS 100
|
||||
#define FIRE_PRIORITY_TGUI 110
|
||||
#define FIRE_PRIORITY_TICKER 200
|
||||
#define FIRE_PRIORITY_ATMOS_ADJACENCY 300
|
||||
#define FIRE_PRIORITY_CHAT 400
|
||||
#define FIRE_PRIORITY_OVERLAYS 500
|
||||
#define FIRE_PRIORITY_INPUT 1000 // This must always always be the max highest priority. Player input must never be lost.
|
||||
|
||||
@@ -192,7 +192,6 @@
|
||||
#define STASIS_MUTE "stasis"
|
||||
#define GENETICS_SPELL "genetics_spell"
|
||||
#define EYES_COVERED "eyes_covered"
|
||||
#define CULT_TRAIT "cult"
|
||||
#define CLOWN_NUKE_TRAIT "clown-nuke"
|
||||
#define STICKY_MOUSTACHE_TRAIT "sticky-moustache"
|
||||
#define CHAINSAW_FRENZY_TRAIT "chainsaw-frenzy"
|
||||
@@ -213,4 +212,4 @@
|
||||
#define LOCKED_HELMET_TRAIT "locked-helmet"
|
||||
#define NINJA_SUIT_TRAIT "ninja-suit"
|
||||
#define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant"
|
||||
#define ABDUCTOR_ANTAGONIST "abductor-antagonist"
|
||||
#define ABDUCTOR_ANTAGONIST "abductor-antagonist"
|
||||
|
||||
@@ -3,3 +3,4 @@
|
||||
#define CHANGETURF_FORCEOP 4
|
||||
#define CHANGETURF_SKIP 8 // A flag for PlaceOnTop to just instance the new turf instead of calling ChangeTurf. Used for uninitialized turfs NOTHING ELSE
|
||||
#define CHANGETURF_INHERIT_AIR 16 // Inherit air from previous turf. Implies CHANGETURF_IGNORE_AIR
|
||||
#define CHANGETURF_RECALC_ADJACENT 32 //Immediately recalc adjacent atmos turfs instead of queuing.
|
||||
@@ -2,7 +2,7 @@
|
||||
#define TYPEID_NULL "0"
|
||||
#define TYPEID_NORMAL_LIST "f"
|
||||
//helper macros
|
||||
#define GET_TYPEID(ref) ( ( (lentext(ref) <= 10) ? "TYPEID_NULL" : copytext(ref, 4, lentext(ref)-6) ) )
|
||||
#define GET_TYPEID(ref) ( ( (length(ref) <= 10) ? "TYPEID_NULL" : copytext(ref, 4, length(ref)-6) ) )
|
||||
#define IS_NORMAL_LIST(L) (GET_TYPEID("\ref[L]") == TYPEID_NORMAL_LIST)
|
||||
|
||||
|
||||
|
||||
@@ -124,6 +124,7 @@
|
||||
|
||||
//returns a new list with only atoms that are in typecache L
|
||||
/proc/typecache_filter_list(list/atoms, list/typecache)
|
||||
RETURN_TYPE(/list)
|
||||
. = list()
|
||||
for(var/thing in atoms)
|
||||
var/atom/A = thing
|
||||
@@ -131,6 +132,7 @@
|
||||
. += A
|
||||
|
||||
/proc/typecache_filter_list_reverse(list/atoms, list/typecache)
|
||||
RETURN_TYPE(/list)
|
||||
. = list()
|
||||
for(var/thing in atoms)
|
||||
var/atom/A = thing
|
||||
@@ -257,6 +259,7 @@
|
||||
|
||||
//Pick a random element from the list and remove it from the list.
|
||||
/proc/pick_n_take(list/L)
|
||||
RETURN_TYPE(L[_].type)
|
||||
if(L.len)
|
||||
var/picked = rand(1,L.len)
|
||||
. = L[picked]
|
||||
@@ -570,4 +573,10 @@
|
||||
if(key in L1)
|
||||
L1[key] += other_value
|
||||
else
|
||||
L1[key] = other_value
|
||||
L1[key] = other_value
|
||||
|
||||
/proc/assoc_list_strip_value(list/input)
|
||||
var/list/ret = list()
|
||||
for(var/key in input)
|
||||
ret += key
|
||||
return ret
|
||||
@@ -7,7 +7,7 @@
|
||||
#define WRITE_LOG(log, text) rustg_log_write(log, text)
|
||||
|
||||
//print a warning message to world.log
|
||||
#define WARNING(MSG) warning("[MSG] in [__FILE__] at line [__LINE__] src: [src] usr: [usr].")
|
||||
#define WARNING(MSG) warning("[MSG] in [__FILE__] at line [__LINE__] src: [UNLINT(src)] usr: [usr].")
|
||||
/proc/warning(msg)
|
||||
msg = "## WARNING: [msg]"
|
||||
log_world(msg)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//supposedly the fastest way to do this according to https://gist.github.com/Giacom/be635398926bb463b42a
|
||||
#define RANGE_TURFS(RADIUS, CENTER) \
|
||||
block( \
|
||||
locate(max(CENTER.x-(RADIUS),1), max(CENTER.y-(RADIUS),1), CENTER.z), \
|
||||
locate(min(CENTER.x+(RADIUS),world.maxx), min(CENTER.y+(RADIUS),world.maxy), CENTER.z) \
|
||||
)
|
||||
block( \
|
||||
locate(max(CENTER.x-(RADIUS),1), max(CENTER.y-(RADIUS),1), CENTER.z), \
|
||||
locate(min(CENTER.x+(RADIUS),world.maxx), min(CENTER.y+(RADIUS),world.maxy), CENTER.z) \
|
||||
)
|
||||
|
||||
#define Z_TURFS(ZLEVEL) block(locate(1,1,ZLEVEL), locate(world.maxx, world.maxy, ZLEVEL))
|
||||
#define CULT_POLL_WAIT 2400
|
||||
@@ -264,6 +264,7 @@
|
||||
var/atom/A = processing_list[1]
|
||||
if(A.flags_1 & HEAR_1)
|
||||
. += A
|
||||
SEND_SIGNAL(A, COMSIG_ATOM_HEARER_IN_VIEW, processing_list, .)
|
||||
processing_list.Cut(1, 2)
|
||||
processing_list += A.contents
|
||||
|
||||
@@ -446,7 +447,7 @@
|
||||
var/list/candidates = list()
|
||||
|
||||
for(var/mob/dead/observer/G in GLOB.player_list)
|
||||
if(G.can_reenter_round)
|
||||
if(G.reenter_round_timeout < world.realtime)
|
||||
candidates += G
|
||||
|
||||
return pollCandidates(Question, jobbanType, gametypeCheck, be_special_flag, poll_time, ignore_category, flashwindow, candidates)
|
||||
|
||||
@@ -534,10 +534,12 @@
|
||||
return parts.Join()
|
||||
|
||||
|
||||
/proc/printobjectives(datum/mind/ply)
|
||||
/proc/printobjectives(list/objectives)
|
||||
if(!objectives || !objectives.len)
|
||||
return
|
||||
var/list/objective_parts = list()
|
||||
var/count = 1
|
||||
for(var/datum/objective/objective in ply.objectives)
|
||||
for(var/datum/objective/objective in objectives)
|
||||
if(objective.check_completion())
|
||||
objective_parts += "<b>Objective #[count]</b>: [objective.explanation_text] <span class='greentext'>Success!</span>"
|
||||
else
|
||||
|
||||
+11
-11
@@ -304,9 +304,9 @@
|
||||
//is in the other string at the same spot (assuming it is not a replace char).
|
||||
//This is used for fingerprints
|
||||
var/newtext = text
|
||||
if(lentext(text) != lentext(compare))
|
||||
if(length(text) != length(compare))
|
||||
return 0
|
||||
for(var/i = 1, i < lentext(text), i++)
|
||||
for(var/i = 1, i < length(text), i++)
|
||||
var/a = copytext(text,i,i+1)
|
||||
var/b = copytext(compare,i,i+1)
|
||||
//if it isn't both the same letter, or if they are both the replacement character
|
||||
@@ -326,7 +326,7 @@
|
||||
if(!text || !character)
|
||||
return 0
|
||||
var/count = 0
|
||||
for(var/i = 1, i <= lentext(text), i++)
|
||||
for(var/i = 1, i <= length(text), i++)
|
||||
var/a = copytext(text,i,i+1)
|
||||
if(a == character)
|
||||
count++
|
||||
@@ -607,8 +607,8 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
|
||||
continue
|
||||
var/buffer = ""
|
||||
var/early_culling = TRUE
|
||||
for(var/pos = 1, pos <= lentext(string), pos++)
|
||||
var/let = copytext(string, pos, (pos + 1) % lentext(string))
|
||||
for(var/pos = 1, pos <= length(string), pos++)
|
||||
var/let = copytext(string, pos, (pos + 1) % length(string))
|
||||
if(early_culling && !findtext(let,GLOB.is_alphanumeric))
|
||||
continue
|
||||
early_culling = FALSE
|
||||
@@ -616,9 +616,9 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
|
||||
if(!findtext(buffer,GLOB.is_alphanumeric))
|
||||
continue
|
||||
var/punctbuffer = ""
|
||||
var/cutoff = lentext(buffer)
|
||||
for(var/pos = lentext(buffer), pos >= 0, pos--)
|
||||
var/let = copytext(buffer, pos, (pos + 1) % lentext(buffer))
|
||||
var/cutoff = length(buffer)
|
||||
for(var/pos = length(buffer), pos >= 0, pos--)
|
||||
var/let = copytext(buffer, pos, (pos + 1) % length(buffer))
|
||||
if(findtext(let,GLOB.is_alphanumeric))
|
||||
break
|
||||
if(findtext(let,GLOB.is_punctuation))
|
||||
@@ -628,8 +628,8 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
|
||||
var/exclaim = FALSE
|
||||
var/question = FALSE
|
||||
var/periods = 0
|
||||
for(var/pos = lentext(punctbuffer), pos >= 0, pos--)
|
||||
var/punct = copytext(punctbuffer, pos, (pos + 1) % lentext(punctbuffer))
|
||||
for(var/pos = length(punctbuffer), pos >= 0, pos--)
|
||||
var/punct = copytext(punctbuffer, pos, (pos + 1) % length(punctbuffer))
|
||||
if(!exclaim && findtext(punct,"!"))
|
||||
exclaim = TRUE
|
||||
if(!question && findtext(punct,"?"))
|
||||
@@ -651,7 +651,7 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
|
||||
buffer = copytext(buffer, 1, cutoff) + punctbuffer
|
||||
if(!findtext(buffer,GLOB.is_alphanumeric))
|
||||
continue
|
||||
if(!buffer || lentext(buffer) > 280 || lentext(buffer) <= cullshort || buffer in accepted)
|
||||
if(!buffer || length(buffer) > 280 || length(buffer) <= cullshort || buffer in accepted)
|
||||
continue
|
||||
|
||||
accepted += buffer
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
return t
|
||||
|
||||
proc/TextPreview(var/string,var/len=40)
|
||||
if(lentext(string) <= len)
|
||||
if(!lentext(string))
|
||||
if(length(string) <= len)
|
||||
if(!length(string))
|
||||
return "\[...\]"
|
||||
else
|
||||
return string
|
||||
|
||||
@@ -759,7 +759,7 @@ GLOBAL_LIST_INIT(can_embed_types, typecacheof(list(
|
||||
/obj/item/pipe)))
|
||||
|
||||
/proc/can_embed(obj/item/W)
|
||||
if(W.is_sharp())
|
||||
if(W.get_sharpness())
|
||||
return 1
|
||||
if(is_pointed(W))
|
||||
return 1
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/dest_y
|
||||
|
||||
/datum/projectile_data/New(var/src_x, var/src_y, var/time, var/distance, \
|
||||
var/power_x, var/power_y, var/dest_x, var/dest_y)
|
||||
var/power_x, var/power_y, var/dest_x, var/dest_y)
|
||||
src.src_x = src_x
|
||||
src.src_y = src_y
|
||||
src.time = time
|
||||
|
||||
@@ -193,7 +193,7 @@ GLOBAL_LIST_INIT(bitfields, list(
|
||||
"clear_conversion" = list(
|
||||
"REACTION_CLEAR_IMPURE" = REACTION_CLEAR_IMPURE,
|
||||
"REACTION_CLEAR_INVERSE" = REACTION_CLEAR_INVERSE
|
||||
),
|
||||
),
|
||||
"organ_flags" = list(
|
||||
"ORGAN_SYNTHETIC" = ORGAN_SYNTHETIC,
|
||||
"ORGAN_FROZEN" = ORGAN_FROZEN,
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
GLOBAL_LIST_INIT(cardinals, list(NORTH, SOUTH, EAST, WEST))
|
||||
GLOBAL_LIST_INIT(alldirs, list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
|
||||
GLOBAL_LIST_INIT(cardinals_multiz, list(NORTH, SOUTH, EAST, WEST, UP, DOWN))
|
||||
GLOBAL_LIST_INIT(diagonals, list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
|
||||
GLOBAL_LIST_INIT(corners_multiz, list(UP|NORTHEAST, UP|NORTHWEST, UP|SOUTHEAST, UP|SOUTHWEST, DOWN|NORTHEAST, DOWN|NORTHWEST, DOWN|SOUTHEAST, DOWN|SOUTHWEST))
|
||||
GLOBAL_LIST_INIT(diagonals_multiz, list(
|
||||
NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST,
|
||||
UP|NORTH, UP|SOUTH, UP|EAST, UP|WEST, UP|NORTHEAST, UP|NORTHWEST, UP|SOUTHEAST, UP|SOUTHWEST,
|
||||
DOWN|NORTH, DOWN|SOUTH, DOWN|EAST, DOWN|WEST, DOWN|NORTHEAST, DOWN|NORTHWEST, DOWN|SOUTHEAST, DOWN|SOUTHWEST))
|
||||
GLOBAL_LIST_INIT(alldirs_multiz, list(
|
||||
NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST,
|
||||
UP, UP|NORTH, UP|SOUTH, UP|EAST, UP|WEST, UP|NORTHEAST, UP|NORTHWEST, UP|SOUTHEAST, UP|SOUTHWEST,
|
||||
DOWN, DOWN|NORTH, DOWN|SOUTH, DOWN|EAST, DOWN|WEST, DOWN|NORTHEAST, DOWN|NORTHWEST, DOWN|SOUTHEAST, DOWN|SOUTHWEST))
|
||||
GLOBAL_LIST_INIT(alldirs, list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
|
||||
|
||||
GLOBAL_LIST_EMPTY(landmarks_list) //list of all landmarks created
|
||||
GLOBAL_LIST_EMPTY(start_landmarks_list) //list of all spawn points created
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
GLOBAL_LIST_EMPTY(clients) //all clients
|
||||
GLOBAL_LIST_EMPTY(admins) //all clients whom are admins
|
||||
GLOBAL_PROTECT(admins)
|
||||
GLOBAL_LIST_EMPTY(mentors) //all clients whom are mentors
|
||||
GLOBAL_PROTECT(mentors)
|
||||
GLOBAL_LIST_EMPTY(deadmins) //all ckeys who have used the de-admin verb.
|
||||
|
||||
GLOBAL_LIST_EMPTY(directory) //all ckeys with associated client
|
||||
|
||||
+33
-33
@@ -1,37 +1,37 @@
|
||||
#define js_dropdowns {"
|
||||
function dropdowns() {
|
||||
var divs = document.getElementsByTagName('div');
|
||||
var headers = new Array();
|
||||
var links = new Array();
|
||||
for(var i=0;i<divs.length;i++){
|
||||
if(divs\[i\].className=='header') {
|
||||
divs\[i\].className='header closed';
|
||||
divs\[i\].innerHTML = divs\[i\].innerHTML+' +';
|
||||
headers.push(divs\[i\]);
|
||||
}
|
||||
if(divs\[i\].className=='links') {
|
||||
divs\[i\].className='links hidden';
|
||||
links.push(divs\[i\]);
|
||||
}
|
||||
}
|
||||
for(var i=0;i<headers.length;i++){
|
||||
if(typeof(links\[i\])!== 'undefined' && links\[i\]!=null) {
|
||||
headers\[i\].onclick = (function(elem) {
|
||||
return function() {
|
||||
if(elem.className.search('visible')>=0) {
|
||||
elem.className = elem.className.replace('visible','hidden');
|
||||
this.className = this.className.replace('open','closed');
|
||||
this.innerHTML = this.innerHTML.replace('-','+');
|
||||
}
|
||||
else {
|
||||
elem.className = elem.className.replace('hidden','visible');
|
||||
this.className = this.className.replace('closed','open');
|
||||
this.innerHTML = this.innerHTML.replace('+','-');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
})(links\[i\]);
|
||||
}
|
||||
}
|
||||
var divs = document.getElementsByTagName('div');
|
||||
var headers = new Array();
|
||||
var links = new Array();
|
||||
for(var i=0;i<divs.length;i++){
|
||||
if(divs\[i\].className=='header') {
|
||||
divs\[i\].className='header closed';
|
||||
divs\[i\].innerHTML = divs\[i\].innerHTML+' +';
|
||||
headers.push(divs\[i\]);
|
||||
}
|
||||
if(divs\[i\].className=='links') {
|
||||
divs\[i\].className='links hidden';
|
||||
links.push(divs\[i\]);
|
||||
}
|
||||
}
|
||||
for(var i=0;i<headers.length;i++){
|
||||
if(typeof(links\[i\])!== 'undefined' && links\[i\]!=null) {
|
||||
headers\[i\].onclick = (function(elem) {
|
||||
return function() {
|
||||
if(elem.className.search('visible')>=0) {
|
||||
elem.className = elem.className.replace('visible','hidden');
|
||||
this.className = this.className.replace('open','closed');
|
||||
this.innerHTML = this.innerHTML.replace('-','+');
|
||||
}
|
||||
else {
|
||||
elem.className = elem.className.replace('hidden','visible');
|
||||
this.className = this.className.replace('closed','open');
|
||||
this.innerHTML = this.innerHTML.replace('+','-');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
})(links\[i\]);
|
||||
}
|
||||
}
|
||||
}
|
||||
"}
|
||||
@@ -68,9 +68,10 @@
|
||||
/atom/movable/Adjacent(var/atom/neighbor)
|
||||
if(neighbor == loc)
|
||||
return TRUE
|
||||
if(!isturf(loc))
|
||||
var/turf/T = loc
|
||||
if(!istype(T))
|
||||
return FALSE
|
||||
if(loc.Adjacent(neighbor,target = neighbor, mover = src))
|
||||
if(T.Adjacent(neighbor, neighbor, src))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -321,8 +321,7 @@
|
||||
return
|
||||
/atom/proc/ShiftClick(mob/user)
|
||||
SEND_SIGNAL(src, COMSIG_CLICK_SHIFT, user)
|
||||
if(user.client && user.client.eye == user || user.client.eye == user.loc)
|
||||
user.examinate(src)
|
||||
user.examinate(src)
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
@@ -16,6 +16,28 @@
|
||||
//Trust me, you need one. Period. If you don't think you do, you're doing something extremely wrong.
|
||||
/obj/screen/plane_master/proc/backdrop(mob/mymob)
|
||||
|
||||
/obj/screen/plane_master/openspace
|
||||
name = "open space plane master"
|
||||
plane = FLOOR_OPENSPACE_PLANE
|
||||
appearance_flags = PLANE_MASTER
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
alpha = 255
|
||||
|
||||
/obj/screen/plane_master/openspace/backdrop(mob/mymob)
|
||||
filters = list()
|
||||
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -10)
|
||||
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -15)
|
||||
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -20)
|
||||
|
||||
/obj/screen/plane_master/proc/outline(_size, _color)
|
||||
filters += filter(type = "outline", size = _size, color = _color)
|
||||
|
||||
/obj/screen/plane_master/proc/shadow(_size, _offset = 0, _x = 0, _y = 0, _color = "#04080FAA")
|
||||
filters += filter(type = "drop_shadow", x = _x, y = _y, color = _color, size = _size, offset = _offset)
|
||||
|
||||
/obj/screen/plane_master/proc/clear_filters()
|
||||
filters = list()
|
||||
|
||||
/obj/screen/plane_master/floor
|
||||
name = "floor plane master"
|
||||
plane = FLOOR_PLANE
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
if(do_mob(user, src, butchering.speed) && Adjacent(I))
|
||||
butchering.Butcher(user, src)
|
||||
return 1
|
||||
else if(I.is_sharp() && !butchering) //give sharp objects butchering functionality, for consistency
|
||||
else if(I.get_sharpness() && !butchering) //give sharp objects butchering functionality, for consistency
|
||||
I.AddComponent(/datum/component/butchering, 80 * I.toolspeed)
|
||||
attackby(I, user, params) //call the attackby again to refresh and do the butchering check again
|
||||
return
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if(_directory)
|
||||
directory = _directory
|
||||
if(entries)
|
||||
CRASH("[THIS_PROC_TYPE_WEIRD] called more than once!")
|
||||
CRASH("/datum/controller/configuration/Load() called more than once!")
|
||||
InitEntries()
|
||||
LoadModes()
|
||||
if(fexists("[directory]/config.txt") && LoadEntries("config.txt") <= 1)
|
||||
|
||||
@@ -139,6 +139,14 @@
|
||||
min_val = 0
|
||||
max_val = 1
|
||||
|
||||
/datum/config_entry/number/suicide_reenter_round_timer
|
||||
config_entry_value = 30
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/roundstart_suicide_time_limit
|
||||
config_entry_value = 30
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/shuttle_refuel_delay
|
||||
config_entry_value = 12000
|
||||
min_val = 0
|
||||
|
||||
@@ -141,6 +141,11 @@
|
||||
/datum/config_entry/flag/load_legacy_ranks_only //Loads admin ranks only from legacy admin_ranks.txt, while enabled ranks are mirrored to the database
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/flag/mentors_mobname_only
|
||||
|
||||
/datum/config_entry/flag/mentor_legacy_system //Defines whether the server uses the legacy mentor system with mentors.txt or the SQL system
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/string/hostedby
|
||||
|
||||
/datum/config_entry/flag/norespawn
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
SUBSYSTEM_DEF(adjacent_air)
|
||||
name = "Atmos Adjacency"
|
||||
flags = SS_BACKGROUND
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
wait = 10
|
||||
priority = FIRE_PRIORITY_ATMOS_ADJACENCY
|
||||
var/list/queue = list()
|
||||
|
||||
/datum/controller/subsystem/adjacent_air/stat_entry()
|
||||
#ifdef TESTING
|
||||
..("P:[length(queue)], S:[GLOB.atmos_adjacent_savings[1]], T:[GLOB.atmos_adjacent_savings[2]]")
|
||||
#else
|
||||
..("P:[length(queue)]")
|
||||
#endif
|
||||
|
||||
/datum/controller/subsystem/adjacent_air/Initialize()
|
||||
while(length(queue))
|
||||
fire(mc_check = FALSE)
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/adjacent_air/fire(resumed = FALSE, mc_check = TRUE)
|
||||
|
||||
var/list/queue = src.queue
|
||||
|
||||
while (length(queue))
|
||||
var/turf/currT = queue[1]
|
||||
queue.Cut(1,2)
|
||||
|
||||
currT.ImmediateCalculateAdjacentTurfs()
|
||||
|
||||
if(mc_check)
|
||||
if(MC_TICK_CHECK)
|
||||
break
|
||||
else
|
||||
CHECK_TICK
|
||||
@@ -1,6 +1,6 @@
|
||||
SUBSYSTEM_DEF(chat)
|
||||
name = "Chat"
|
||||
flags = SS_TICKER|SS_NO_INIT
|
||||
flags = SS_TICKER
|
||||
wait = 1
|
||||
priority = FIRE_PRIORITY_CHAT
|
||||
init_order = INIT_ORDER_CHAT
|
||||
|
||||
@@ -658,6 +658,46 @@ SUBSYSTEM_DEF(job)
|
||||
message_admins(msg)
|
||||
CRASH(msg)
|
||||
|
||||
/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, equipbackpackstuff)
|
||||
var/mob/the_mob = N
|
||||
if(!the_mob)
|
||||
the_mob = M // cause this doesn't get assigned if player is a latejoiner
|
||||
if(the_mob.client && the_mob.client.prefs && (the_mob.client.prefs.chosen_gear && the_mob.client.prefs.chosen_gear.len))
|
||||
if(!ishuman(M))//no silicons allowed
|
||||
return
|
||||
for(var/i in the_mob.client.prefs.chosen_gear)
|
||||
var/datum/gear/G = i
|
||||
G = GLOB.loadout_items[slot_to_string(initial(G.category))][initial(G.name)]
|
||||
if(!G)
|
||||
continue
|
||||
var/permitted = TRUE
|
||||
if(G.restricted_roles && G.restricted_roles.len && !(M.mind.assigned_role in G.restricted_roles))
|
||||
permitted = FALSE
|
||||
if(G.donoritem && !G.donator_ckey_check(the_mob.client.ckey))
|
||||
permitted = FALSE
|
||||
if(!equipbackpackstuff && G.category == SLOT_IN_BACKPACK)//snowflake check since plopping stuff in the backpack doesnt work for pre-job equip loadout stuffs
|
||||
permitted = FALSE
|
||||
if(equipbackpackstuff && G.category != SLOT_IN_BACKPACK)//ditto
|
||||
permitted = FALSE
|
||||
if(!permitted)
|
||||
continue
|
||||
var/obj/item/I = new G.path
|
||||
if(!M.equip_to_slot_if_possible(I, G.category, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // If the job's dresscode compliant, try to put it in its slot, first
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
var/obj/item/storage/backpack/B = C.back
|
||||
if(!B || !SEND_SIGNAL(B, COMSIG_TRY_STORAGE_INSERT, I, null, TRUE, TRUE)) // Otherwise, try to put it in the backpack, for carbons.
|
||||
I.forceMove(get_turf(C))
|
||||
else if(!M.equip_to_slot_if_possible(I, SLOT_IN_BACKPACK, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // Otherwise, try to put it in the backpack
|
||||
I.forceMove(get_turf(M)) // If everything fails, just put it on the floor under the mob.
|
||||
|
||||
/datum/controller/subsystem/job/proc/FreeRole(rank)
|
||||
if(!rank)
|
||||
return
|
||||
var/datum/job/job = GetJob(rank)
|
||||
if(!job)
|
||||
return FALSE
|
||||
job.current_positions = max(0, job.current_positions - 1)
|
||||
|
||||
///////////////////////////////////
|
||||
//Keeps track of all living heads//
|
||||
|
||||
@@ -14,6 +14,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
var/list/ruins_templates = list()
|
||||
var/list/space_ruins_templates = list()
|
||||
var/list/lava_ruins_templates = list()
|
||||
var/datum/space_level/isolated_ruins_z //Created on demand during ruin loading.
|
||||
|
||||
var/list/shuttle_templates = list()
|
||||
var/list/shelter_templates = list()
|
||||
@@ -25,6 +26,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
var/list/datum/turf_reservations //list of turf reservations
|
||||
var/list/used_turfs = list() //list of turf = datum/turf_reservation
|
||||
|
||||
var/list/reservation_ready = list()
|
||||
var/clearing_reserved_turfs = FALSE
|
||||
|
||||
// Z-manager stuff
|
||||
@@ -95,7 +97,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
// Set up Z-level transitions.
|
||||
setup_map_transitions()
|
||||
generate_station_area_list()
|
||||
initialize_reserved_level()
|
||||
initialize_reserved_level(transit.z_value)
|
||||
return ..()
|
||||
|
||||
/* Nuke threats, for making the blue tiles on the station go RED
|
||||
@@ -442,7 +444,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
GLOB.the_gateway.wait = world.time
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/RequestBlockReservation(width, height, z, type = /datum/turf_reservation, turf_type_override, border_type_override)
|
||||
UNTIL(initialized && !clearing_reserved_turfs)
|
||||
UNTIL(reservation_ready["[z]"] && !clearing_reserved_turfs)
|
||||
var/datum/turf_reservation/reserve = new type
|
||||
if(turf_type_override)
|
||||
reserve.turf_type = turf_type_override
|
||||
@@ -454,8 +456,9 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
return reserve
|
||||
//If we didn't return at this point, theres a good chance we ran out of room on the exisiting reserved z levels, so lets try a new one
|
||||
num_of_res_levels += 1
|
||||
var/newReserved = add_new_zlevel("Transit/Reserved [num_of_res_levels]", list(ZTRAIT_RESERVED = TRUE))
|
||||
if(reserve.Reserve(width, height, newReserved))
|
||||
var/datum/space_level/newReserved = add_new_zlevel("Transit/Reserved [num_of_res_levels]", list(ZTRAIT_RESERVED = TRUE))
|
||||
initialize_reserved_level(newReserved.z_value)
|
||||
if(reserve.Reserve(width, height, newReserved.z_value))
|
||||
return reserve
|
||||
else
|
||||
if(!level_trait(z, ZTRAIT_RESERVED))
|
||||
@@ -467,19 +470,22 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
QDEL_NULL(reserve)
|
||||
|
||||
//This is not for wiping reserved levels, use wipe_reservations() for that.
|
||||
/datum/controller/subsystem/mapping/proc/initialize_reserved_level()
|
||||
/datum/controller/subsystem/mapping/proc/initialize_reserved_level(z)
|
||||
UNTIL(!clearing_reserved_turfs) //regardless, lets add a check just in case.
|
||||
clearing_reserved_turfs = TRUE //This operation will likely clear any existing reservations, so lets make sure nothing tries to make one while we're doing it.
|
||||
for(var/i in levels_by_trait(ZTRAIT_RESERVED))
|
||||
var/turf/A = get_turf(locate(SHUTTLE_TRANSIT_BORDER,SHUTTLE_TRANSIT_BORDER,i))
|
||||
var/turf/B = get_turf(locate(world.maxx - SHUTTLE_TRANSIT_BORDER,world.maxy - SHUTTLE_TRANSIT_BORDER,i))
|
||||
var/block = block(A, B)
|
||||
for(var/t in block)
|
||||
// No need to empty() these, because it's world init and they're
|
||||
// already /turf/open/space/basic.
|
||||
var/turf/T = t
|
||||
T.flags_1 |= UNUSED_RESERVATION_TURF_1
|
||||
unused_turfs["[i]"] = block
|
||||
if(!level_trait(z,ZTRAIT_RESERVED))
|
||||
clearing_reserved_turfs = FALSE
|
||||
CRASH("Invalid z level prepared for reservations.")
|
||||
var/turf/A = get_turf(locate(SHUTTLE_TRANSIT_BORDER,SHUTTLE_TRANSIT_BORDER,z))
|
||||
var/turf/B = get_turf(locate(world.maxx - SHUTTLE_TRANSIT_BORDER,world.maxy - SHUTTLE_TRANSIT_BORDER,z))
|
||||
var/block = block(A, B)
|
||||
for(var/t in block)
|
||||
// No need to empty() these, because it's world init and they're
|
||||
// already /turf/open/space/basic.
|
||||
var/turf/T = t
|
||||
T.flags_1 |= UNUSED_RESERVATION_TURF_1
|
||||
unused_turfs["[z]"] = block
|
||||
reservation_ready["[z]"] = TRUE
|
||||
clearing_reserved_turfs = FALSE
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/reserve_turfs(list/turfs)
|
||||
@@ -513,3 +519,9 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
for(var/B in areas)
|
||||
var/area/A = B
|
||||
A.reg_in_areas_in_z()
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/get_isolated_ruin_z()
|
||||
if(!isolated_ruins_z)
|
||||
isolated_ruins_z = add_new_zlevel("Isolated Ruins/Reserved", list(ZTRAIT_RESERVED = TRUE, ZTRAIT_ISOLATED_RUINS = TRUE))
|
||||
initialize_reserved_level(isolated_ruins_z.z_value)
|
||||
return isolated_ruins_z.z_value
|
||||
@@ -69,6 +69,10 @@ SUBSYSTEM_DEF(pai)
|
||||
candidate.comments = copytext(sanitize(candidate.comments),1,MAX_MESSAGE_LEN)
|
||||
|
||||
if("submit")
|
||||
if(isobserver(usr))
|
||||
var/mob/dead/observer/O = usr
|
||||
if(!O.can_reenter_round())
|
||||
return FALSE
|
||||
if(candidate)
|
||||
candidate.ready = 1
|
||||
for(var/obj/item/paicard/p in pai_card_list)
|
||||
@@ -148,6 +152,8 @@ SUBSYSTEM_DEF(pai)
|
||||
continue
|
||||
if(!(ROLE_PAI in G.client.prefs.be_special))
|
||||
continue
|
||||
if(!G.can_reenter_round()) // this should use notify_ghosts() instead one day.
|
||||
return FALSE
|
||||
to_chat(G, "<span class='ghostalert'>[user] is requesting a pAI personality! Use the pAI button to submit yourself as one.</span>")
|
||||
addtimer(CALLBACK(src, .proc/spam_again), spam_delay)
|
||||
var/list/available = list()
|
||||
|
||||
@@ -4,24 +4,32 @@ SUBSYSTEM_DEF(research)
|
||||
priority = FIRE_PRIORITY_RESEARCH
|
||||
wait = 10
|
||||
init_order = INIT_ORDER_RESEARCH
|
||||
//TECHWEB STATIC
|
||||
var/list/techweb_nodes = list() //associative id = node datum
|
||||
var/list/techweb_designs = list() //associative id = node datum
|
||||
var/list/datum/techweb/techwebs = list()
|
||||
var/datum/techweb/science/science_tech
|
||||
var/datum/techweb/admin/admin_tech
|
||||
var/datum/techweb_node/error_node/error_node //These two are what you get if a node/design is deleted and somehow still stored in a console.
|
||||
var/datum/design/error_design/error_design
|
||||
|
||||
//ERROR LOGGING
|
||||
var/list/invalid_design_ids = list() //associative id = number of times
|
||||
var/list/invalid_node_ids = list() //associative id = number of times
|
||||
var/list/invalid_node_boost = list() //associative id = error message
|
||||
|
||||
var/list/obj/machinery/rnd/server/servers = list()
|
||||
var/datum/techweb/science/science_tech
|
||||
var/datum/techweb/admin/admin_tech
|
||||
var/list/techweb_nodes = list() //associative id = node datum
|
||||
var/list/techweb_categories = list() //category name = list(node.id = node)
|
||||
var/list/techweb_designs = list() //associative id = node datum
|
||||
var/list/techweb_nodes_starting = list() //associative id = node datum
|
||||
|
||||
var/list/techweb_nodes_starting = list() //associative id = TRUE
|
||||
var/list/techweb_categories = list() //category name = list(node.id = TRUE)
|
||||
var/list/techweb_boost_items = list() //associative double-layer path = list(id = list(point_type = point_discount))
|
||||
var/list/techweb_nodes_hidden = list() //Nodes that should be hidden by default.
|
||||
var/list/techweb_nodes_hidden = list() //Node ids that should be hidden by default.
|
||||
var/list/techweb_point_items = list( //path = list(point type = value)
|
||||
/obj/item/assembly/signaler/anomaly = list(TECHWEB_POINT_TYPE_GENERIC = 2500),
|
||||
/obj/item/assembly/signaler/anomaly = list(TECHWEB_POINT_TYPE_GENERIC = 5000), // Cit three more anomalys anomalys
|
||||
/obj/item/assembly/signaler/anomaly = list(TECHWEB_POINT_TYPE_GENERIC = 7500),
|
||||
/obj/item/assembly/signaler/anomaly = list(TECHWEB_POINT_TYPE_GENERIC = 10000),
|
||||
// - Slime Extracts! -
|
||||
// - Slime Extracts! -
|
||||
/obj/item/slime_extract/grey = list(TECHWEB_POINT_TYPE_GENERIC = 500), // Adds in slime core deconing
|
||||
/obj/item/slime_extract/metal = list(TECHWEB_POINT_TYPE_GENERIC = 750),
|
||||
/obj/item/slime_extract/purple = list(TECHWEB_POINT_TYPE_GENERIC = 750),
|
||||
@@ -294,6 +302,8 @@ SUBSYSTEM_DEF(research)
|
||||
science_tech = new /datum/techweb/science
|
||||
admin_tech = new /datum/techweb/admin
|
||||
autosort_categories()
|
||||
error_design = new
|
||||
error_node = new
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/research/fire()
|
||||
@@ -330,6 +340,191 @@ SUBSYSTEM_DEF(research)
|
||||
for(var/i in techweb_nodes)
|
||||
var/datum/techweb_node/I = techweb_nodes[i]
|
||||
if(techweb_categories[I.category])
|
||||
techweb_categories[I.category][I.id] = I
|
||||
techweb_categories[I.category][I.id] = TRUE
|
||||
else
|
||||
techweb_categories[I.category] = list(I.id = I)
|
||||
techweb_categories[I.category] = list(I.id = TRUE)
|
||||
|
||||
/datum/controller/subsystem/research/proc/techweb_node_by_id(id)
|
||||
return techweb_nodes[id] || error_node
|
||||
|
||||
/datum/controller/subsystem/research/proc/techweb_design_by_id(id)
|
||||
return techweb_designs[id] || error_design
|
||||
|
||||
/datum/controller/subsystem/research/proc/on_design_deletion(datum/design/D)
|
||||
for(var/i in techweb_nodes)
|
||||
var/datum/techweb_node/TN = techwebs[i]
|
||||
TN.on_design_deletion(TN)
|
||||
for(var/i in techwebs)
|
||||
var/datum/techweb/T = i
|
||||
T.recalculate_nodes(TRUE)
|
||||
|
||||
/datum/controller/subsystem/research/proc/on_node_deletion(datum/techweb_node/TN)
|
||||
for(var/i in techweb_nodes)
|
||||
var/datum/techweb_node/TN2 = techwebs[i]
|
||||
TN2.on_node_deletion(TN)
|
||||
for(var/i in techwebs)
|
||||
var/datum/techweb/T = i
|
||||
T.recalculate_nodes(TRUE)
|
||||
|
||||
/datum/controller/subsystem/research/proc/initialize_all_techweb_nodes(clearall = FALSE)
|
||||
if(islist(techweb_nodes) && clearall)
|
||||
QDEL_LIST(techweb_nodes)
|
||||
if(islist(techweb_nodes_starting && clearall))
|
||||
techweb_nodes_starting.Cut()
|
||||
var/list/returned = list()
|
||||
for(var/path in subtypesof(/datum/techweb_node))
|
||||
var/datum/techweb_node/TN = path
|
||||
if(isnull(initial(TN.id)))
|
||||
continue
|
||||
TN = new path
|
||||
if(returned[initial(TN.id)])
|
||||
stack_trace("WARNING: Techweb node ID clash with ID [initial(TN.id)] detected! Path: [path]")
|
||||
errored_datums[TN] = initial(TN.id)
|
||||
continue
|
||||
returned[initial(TN.id)] = TN
|
||||
if(TN.starting_node)
|
||||
techweb_nodes_starting[TN.id] = TRUE
|
||||
for(var/id in techweb_nodes)
|
||||
var/datum/techweb_node/TN = techweb_nodes[id]
|
||||
TN.Initialize()
|
||||
techweb_nodes = returned
|
||||
if (!verify_techweb_nodes()) //Verify all nodes have ids and such.
|
||||
stack_trace("Invalid techweb nodes detected")
|
||||
calculate_techweb_nodes()
|
||||
calculate_techweb_boost_list()
|
||||
if (!verify_techweb_nodes()) //Verify nodes and designs have been crosslinked properly.
|
||||
CRASH("Invalid techweb nodes detected")
|
||||
|
||||
/datum/controller/subsystem/research/proc/initialize_all_techweb_designs(clearall = FALSE)
|
||||
if(islist(techweb_designs) && clearall)
|
||||
QDEL_LIST(techweb_designs)
|
||||
var/list/returned = list()
|
||||
for(var/path in subtypesof(/datum/design))
|
||||
var/datum/design/DN = path
|
||||
if(isnull(initial(DN.id)))
|
||||
stack_trace("WARNING: Design with null ID detected. Build path: [initial(DN.build_path)]")
|
||||
continue
|
||||
else if(initial(DN.id) == DESIGN_ID_IGNORE)
|
||||
continue
|
||||
DN = new path
|
||||
if(returned[initial(DN.id)])
|
||||
stack_trace("WARNING: Design ID clash with ID [initial(DN.id)] detected! Path: [path]")
|
||||
errored_datums[DN] = initial(DN.id)
|
||||
continue
|
||||
returned[initial(DN.id)] = DN
|
||||
techweb_designs = returned
|
||||
verify_techweb_designs()
|
||||
|
||||
/datum/controller/subsystem/research/proc/verify_techweb_nodes()
|
||||
. = TRUE
|
||||
for(var/n in techweb_nodes)
|
||||
var/datum/techweb_node/N = techweb_nodes[n]
|
||||
if(!istype(N))
|
||||
WARNING("Invalid research node with ID [n] detected and removed.")
|
||||
techweb_nodes -= n
|
||||
research_node_id_error(n)
|
||||
. = FALSE
|
||||
for(var/p in N.prereq_ids)
|
||||
var/datum/techweb_node/P = techweb_nodes[p]
|
||||
if(!istype(P))
|
||||
WARNING("Invalid research prerequisite node with ID [p] detected in node [N.display_name]\[[N.id]\] removed.")
|
||||
N.prereq_ids -= p
|
||||
research_node_id_error(p)
|
||||
. = FALSE
|
||||
for(var/d in N.design_ids)
|
||||
var/datum/design/D = techweb_designs[d]
|
||||
if(!istype(D))
|
||||
WARNING("Invalid research design with ID [d] detected in node [N.display_name]\[[N.id]\] removed.")
|
||||
N.design_ids -= d
|
||||
design_id_error(d)
|
||||
. = FALSE
|
||||
for(var/u in N.unlock_ids)
|
||||
var/datum/techweb_node/U = techweb_nodes[u]
|
||||
if(!istype(U))
|
||||
WARNING("Invalid research unlock node with ID [u] detected in node [N.display_name]\[[N.id]\] removed.")
|
||||
N.unlock_ids -= u
|
||||
research_node_id_error(u)
|
||||
. = FALSE
|
||||
for(var/p in N.boost_item_paths)
|
||||
if(!ispath(p))
|
||||
N.boost_item_paths -= p
|
||||
WARNING("[p] is not a valid path.")
|
||||
node_boost_error(N.id, "[p] is not a valid path.")
|
||||
. = FALSE
|
||||
var/list/points = N.boost_item_paths[p]
|
||||
if(islist(points))
|
||||
for(var/i in points)
|
||||
if(!isnum(points[i]))
|
||||
WARNING("[points[i]] is not a valid number.")
|
||||
node_boost_error(N.id, "[points[i]] is not a valid number.")
|
||||
. = FALSE
|
||||
else if(!point_types[i])
|
||||
WARNING("[i] is not a valid point type.")
|
||||
node_boost_error(N.id, "[i] is not a valid point type.")
|
||||
. = FALSE
|
||||
else if(!isnull(points))
|
||||
N.boost_item_paths -= p
|
||||
node_boost_error(N.id, "No valid list.")
|
||||
WARNING("No valid list.")
|
||||
. = FALSE
|
||||
CHECK_TICK
|
||||
|
||||
/datum/controller/subsystem/research/proc/verify_techweb_designs()
|
||||
for(var/d in techweb_designs)
|
||||
var/datum/design/D = techweb_designs[d]
|
||||
if(!istype(D))
|
||||
stack_trace("WARNING: Invalid research design with ID [d] detected and removed.")
|
||||
techweb_designs -= d
|
||||
CHECK_TICK
|
||||
|
||||
/datum/controller/subsystem/research/proc/research_node_id_error(id)
|
||||
if(invalid_node_ids[id])
|
||||
invalid_node_ids[id]++
|
||||
else
|
||||
invalid_node_ids[id] = 1
|
||||
|
||||
/datum/controller/subsystem/research/proc/design_id_error(id)
|
||||
if(invalid_design_ids[id])
|
||||
invalid_design_ids[id]++
|
||||
else
|
||||
invalid_design_ids[id] = 1
|
||||
|
||||
/datum/controller/subsystem/research/proc/calculate_techweb_nodes()
|
||||
for(var/design_id in techweb_designs)
|
||||
var/datum/design/D = techweb_designs[design_id]
|
||||
D.unlocked_by.Cut()
|
||||
for(var/node_id in techweb_nodes)
|
||||
var/datum/techweb_node/node = techweb_nodes[node_id]
|
||||
node.unlock_ids = list()
|
||||
for(var/i in node.design_ids)
|
||||
var/datum/design/D = techweb_designs[i]
|
||||
node.design_ids[i] = TRUE
|
||||
D.unlocked_by += node.id
|
||||
if(node.hidden)
|
||||
techweb_nodes_hidden[node.id] = TRUE
|
||||
CHECK_TICK
|
||||
generate_techweb_unlock_linking()
|
||||
|
||||
/datum/controller/subsystem/research/proc/generate_techweb_unlock_linking()
|
||||
for(var/node_id in techweb_nodes) //Clear all unlock links to avoid duplication.
|
||||
var/datum/techweb_node/node = techweb_nodes[node_id]
|
||||
node.unlock_ids = list()
|
||||
for(var/node_id in techweb_nodes)
|
||||
var/datum/techweb_node/node = techweb_nodes[node_id]
|
||||
for(var/prereq_id in node.prereq_ids)
|
||||
var/datum/techweb_node/prereq_node = techweb_node_by_id(prereq_id)
|
||||
prereq_node.unlock_ids[node.id] = node
|
||||
|
||||
/datum/controller/subsystem/research/proc/calculate_techweb_boost_list(clearall = FALSE)
|
||||
if(clearall)
|
||||
techweb_boost_items = list()
|
||||
for(var/node_id in techweb_nodes)
|
||||
var/datum/techweb_node/node = techweb_nodes[node_id]
|
||||
for(var/path in node.boost_item_paths)
|
||||
if(!ispath(path))
|
||||
continue
|
||||
if(length(techweb_boost_items[path]))
|
||||
techweb_boost_items[path][node.id] = node.boost_item_paths[path]
|
||||
else
|
||||
techweb_boost_items[path] = list(node.id = node.boost_item_paths[path])
|
||||
CHECK_TICK
|
||||
|
||||
@@ -37,6 +37,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
var/points = 5000 //number of trade-points we have
|
||||
var/centcom_message = "" //Remarks from CentCom on how well you checked the last order.
|
||||
var/list/discoveredPlants = list() //Typepaths for unusual plants we've already sent CentCom, associated with their potencies
|
||||
var/passive_supply_points_per_minute = 750
|
||||
|
||||
var/list/supply_packs = list()
|
||||
var/list/shoppinglist = list()
|
||||
@@ -111,6 +112,12 @@ SUBSYSTEM_DEF(shuttle)
|
||||
qdel(T, force=TRUE)
|
||||
CheckAutoEvac()
|
||||
|
||||
//Cargo stuff start
|
||||
var/fire_time_diff = max(0, world.time - last_fire) //Don't want this to be below 0, seriously.
|
||||
var/point_gain = (fire_time_diff / 600) * passive_supply_points_per_minute
|
||||
points += point_gain
|
||||
//Cargo stuff end
|
||||
|
||||
if(!SSmapping.clearing_reserved_turfs)
|
||||
while(transit_requesters.len)
|
||||
var/requester = popleft(transit_requesters)
|
||||
@@ -631,3 +638,11 @@ SUBSYSTEM_DEF(shuttle)
|
||||
C.update_hidden_docking_ports(remove_images, add_images)
|
||||
|
||||
QDEL_LIST(remove_images)
|
||||
|
||||
/datum/controller/subsystem/shuttle/proc/autoEnd() //CIT CHANGE - allows shift to end after 2 hours have passed.
|
||||
if((world.realtime - SSshuttle.realtimeofstart) > auto_call && EMERGENCY_IDLE_OR_RECALLED) //2 hours
|
||||
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")
|
||||
log_game("Round time limit reached. Shuttle has been auto-called.")
|
||||
message_admins("Round time limit reached. Shuttle called.")
|
||||
emergencyNoRecall = TRUE
|
||||
|
||||
@@ -147,6 +147,11 @@ SUBSYSTEM_DEF(throwing)
|
||||
if (callback)
|
||||
callback.Invoke()
|
||||
|
||||
if(!thrownthing.zfalling) // I don't think you can zfall while thrown but hey, just in case.
|
||||
var/turf/T = get_turf(thrownthing)
|
||||
if(T && thrownthing.has_gravity(T))
|
||||
T.zFall(thrownthing)
|
||||
|
||||
qdel(src)
|
||||
|
||||
/datum/thrownthing/proc/hit_atom(atom/A)
|
||||
|
||||
@@ -40,7 +40,7 @@ SUBSYSTEM_DEF(traumas)
|
||||
"cats" = strings(PHOBIA_FILE, "cats"),
|
||||
"syndicate"= strings(PHOBIA_FILE, "syndicate"),
|
||||
"eye" = strings(PHOBIA_FILE, "eye")
|
||||
)
|
||||
)
|
||||
|
||||
phobia_mobs = list("spiders" = typecacheof(list(/mob/living/simple_animal/hostile/poison/giant_spider)),
|
||||
"security" = typecacheof(list(/mob/living/simple_animal/bot/secbot, /mob/living/simple_animal/bot/ed209)),
|
||||
@@ -166,7 +166,7 @@ SUBSYSTEM_DEF(traumas)
|
||||
|
||||
"syndicate" = typecacheof(list(/obj/item/stack/tile/mineral/plastitanium, /obj/machinery/computer/shuttle/syndicate, /obj/machinery/computer/shuttle/syndicate/recall, /obj/machinery/computer/shuttle/syndicate/drop_pod, /obj/machinery/computer/camera_advanced/shuttle_docker/syndicate, /obj/machinery/recharge_station,
|
||||
/obj/machinery/porta_turret/syndicate, /obj/structure/closet/syndicate, /obj/machinery/suit_storage_unit/syndicate, /obj/item/clothing/under/syndicate, /obj/item/folder/syndicate, /obj/item/documents/syndicate, /obj/item/clothing/glasses/phantomthief/syndicate, /obj/item/antag_spawner/nuke_ops, /obj/item/storage/box/syndicate,
|
||||
/obj/structure/fluff/empty_sleeper/syndicate, /obj/item/implant/radio/syndicate, /obj/item/clothing/head/helmet/space/syndicate, /obj/machinery/nuclearbomb/syndicate, /obj/item/grenade/syndieminibomb, /obj/item/storage/backpack/duffelbag/syndie, /obj/item/gun/ballistic/automatic/pistol, /obj/item/gun/ballistic/revolver/syndie,
|
||||
/obj/structure/fluff/empty_sleeper/syndicate, /obj/item/implant/radio/syndicate, /obj/item/clothing/head/helmet/space/syndicate, /obj/machinery/nuclearbomb/syndicate, /obj/item/grenade/syndieminibomb, /obj/item/storage/backpack/duffelbag/syndie, /obj/item/gun/ballistic/automatic/pistol, /obj/item/gun/ballistic/revolver,
|
||||
/obj/item/gun/ballistic/automatic/shotgun/bulldog, /obj/item/gun/ballistic/automatic/c20r, /obj/item/gun/ballistic/automatic/m90, /obj/item/gun/ballistic/automatic/l6_saw, /obj/item/storage/belt/grenade/full, /obj/item/gun/ballistic/automatic/sniper_rifle/syndicate, /obj/item/gun/energy/kinetic_accelerator/crossbow,
|
||||
/obj/item/melee/transforming/energy/sword/saber, /obj/item/twohanded/dualsaber, /obj/item/melee/powerfist, /obj/item/storage/box/syndie_kit, /obj/item/grenade/spawnergrenade/manhacks, /obj/item/grenade/chem_grenade/bioterrorfoam, /obj/item/reagent_containers/spray/chemsprayer/bioterror, /obj/item/ammo_box/magazine/m10mm,
|
||||
/obj/item/ammo_box/magazine/pistolm9mm, /obj/item/ammo_box/a357, /obj/item/ammo_box/magazine/m12g, /obj/item/ammo_box/magazine/mm195x129, /obj/item/antag_spawner/nuke_ops, /obj/mecha/combat/gygax/dark, /obj/mecha/combat/marauder/mauler, /obj/item/soap/syndie, /obj/item/gun/syringe/syndicate, /obj/item/cartridge/virus/syndicate,
|
||||
|
||||
@@ -74,10 +74,10 @@ SUBSYSTEM_DEF(weather)
|
||||
next_hit_by_zlevel["[z]"] = null
|
||||
|
||||
/datum/controller/subsystem/weather/proc/get_weather(z, area/active_area)
|
||||
var/datum/weather/A
|
||||
for(var/V in processing)
|
||||
var/datum/weather/W = V
|
||||
if((z in W.impacted_z_levels) && W.area_type == active_area.type)
|
||||
A = W
|
||||
break
|
||||
return A
|
||||
var/datum/weather/A
|
||||
for(var/V in processing)
|
||||
var/datum/weather/W = V
|
||||
if((z in W.impacted_z_levels) && W.area_type == active_area.type)
|
||||
A = W
|
||||
break
|
||||
return A
|
||||
|
||||
@@ -245,6 +245,14 @@
|
||||
/datum/action/item_action/toggle_helmet_light
|
||||
name = "Toggle Helmet Light"
|
||||
|
||||
/datum/action/item_action/toggle_welding_screen
|
||||
name = "Toggle Welding Screen"
|
||||
|
||||
/datum/action/item_action/toggle_welding_screen/Trigger()
|
||||
var/obj/item/clothing/head/hardhat/weldhat/H = target
|
||||
if(istype(H))
|
||||
H.toggle_welding_screen(owner)
|
||||
|
||||
/datum/action/item_action/toggle_headphones
|
||||
name = "Toggle Headphones"
|
||||
desc = "UNTZ UNTZ UNTZ"
|
||||
|
||||
+45
-45
@@ -1,70 +1,70 @@
|
||||
#define ARMORID "armor-[melee]-[bullet]-[laser]-[energy]-[bomb]-[bio]-[rad]-[fire]-[acid]-[magic]"
|
||||
|
||||
/proc/getArmor(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0)
|
||||
. = locate(ARMORID)
|
||||
if (!.)
|
||||
. = new /datum/armor(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic)
|
||||
. = locate(ARMORID)
|
||||
if (!.)
|
||||
. = new /datum/armor(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic)
|
||||
|
||||
/datum/armor
|
||||
datum_flags = DF_USE_TAG
|
||||
var/melee
|
||||
var/bullet
|
||||
var/laser
|
||||
var/energy
|
||||
var/bomb
|
||||
var/bio
|
||||
var/rad
|
||||
var/fire
|
||||
var/acid
|
||||
var/magic
|
||||
datum_flags = DF_USE_TAG
|
||||
var/melee
|
||||
var/bullet
|
||||
var/laser
|
||||
var/energy
|
||||
var/bomb
|
||||
var/bio
|
||||
var/rad
|
||||
var/fire
|
||||
var/acid
|
||||
var/magic
|
||||
|
||||
/datum/armor/New(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0)
|
||||
src.melee = melee
|
||||
src.bullet = bullet
|
||||
src.laser = laser
|
||||
src.energy = energy
|
||||
src.bomb = bomb
|
||||
src.bio = bio
|
||||
src.rad = rad
|
||||
src.fire = fire
|
||||
src.acid = acid
|
||||
src.magic = magic
|
||||
tag = ARMORID
|
||||
src.melee = melee
|
||||
src.bullet = bullet
|
||||
src.laser = laser
|
||||
src.energy = energy
|
||||
src.bomb = bomb
|
||||
src.bio = bio
|
||||
src.rad = rad
|
||||
src.fire = fire
|
||||
src.acid = acid
|
||||
src.magic = magic
|
||||
tag = ARMORID
|
||||
|
||||
/datum/armor/proc/modifyRating(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0, magic = 0)
|
||||
return getArmor(src.melee+melee, src.bullet+bullet, src.laser+laser, src.energy+energy, src.bomb+bomb, src.bio+bio, src.rad+rad, src.fire+fire, src.acid+acid, src.magic+magic)
|
||||
return getArmor(src.melee+melee, src.bullet+bullet, src.laser+laser, src.energy+energy, src.bomb+bomb, src.bio+bio, src.rad+rad, src.fire+fire, src.acid+acid, src.magic+magic)
|
||||
|
||||
/datum/armor/proc/modifyAllRatings(modifier = 0)
|
||||
return getArmor(melee+modifier, bullet+modifier, laser+modifier, energy+modifier, bomb+modifier, bio+modifier, rad+modifier, fire+modifier, acid+modifier, magic+modifier)
|
||||
return getArmor(melee+modifier, bullet+modifier, laser+modifier, energy+modifier, bomb+modifier, bio+modifier, rad+modifier, fire+modifier, acid+modifier, magic+modifier)
|
||||
|
||||
/datum/armor/proc/setRating(melee, bullet, laser, energy, bomb, bio, rad, fire, acid, magic)
|
||||
return getArmor((isnull(melee) ? src.melee : melee),\
|
||||
(isnull(bullet) ? src.bullet : bullet),\
|
||||
(isnull(laser) ? src.laser : laser),\
|
||||
(isnull(energy) ? src.energy : energy),\
|
||||
(isnull(bomb) ? src.bomb : bomb),\
|
||||
(isnull(bio) ? src.bio : bio),\
|
||||
(isnull(rad) ? src.rad : rad),\
|
||||
(isnull(fire) ? src.fire : fire),\
|
||||
(isnull(acid) ? src.acid : acid),\
|
||||
(isnull(magic) ? src.magic : magic))
|
||||
return getArmor((isnull(melee) ? src.melee : melee),\
|
||||
(isnull(bullet) ? src.bullet : bullet),\
|
||||
(isnull(laser) ? src.laser : laser),\
|
||||
(isnull(energy) ? src.energy : energy),\
|
||||
(isnull(bomb) ? src.bomb : bomb),\
|
||||
(isnull(bio) ? src.bio : bio),\
|
||||
(isnull(rad) ? src.rad : rad),\
|
||||
(isnull(fire) ? src.fire : fire),\
|
||||
(isnull(acid) ? src.acid : acid),\
|
||||
(isnull(magic) ? src.magic : magic))
|
||||
|
||||
/datum/armor/proc/getRating(rating)
|
||||
return vars[rating]
|
||||
return vars[rating]
|
||||
|
||||
/datum/armor/proc/getList()
|
||||
return list("melee" = melee, "bullet" = bullet, "laser" = laser, "energy" = energy, "bomb" = bomb, "bio" = bio, "rad" = rad, "fire" = fire, "acid" = acid, "magic" = magic)
|
||||
return list("melee" = melee, "bullet" = bullet, "laser" = laser, "energy" = energy, "bomb" = bomb, "bio" = bio, "rad" = rad, "fire" = fire, "acid" = acid, "magic" = magic)
|
||||
|
||||
/datum/armor/proc/attachArmor(datum/armor/AA)
|
||||
return getArmor(melee+AA.melee, bullet+AA.bullet, laser+AA.laser, energy+AA.energy, bomb+AA.bomb, bio+AA.bio, rad+AA.rad, fire+AA.fire, acid+AA.acid, magic+AA.magic)
|
||||
return getArmor(melee+AA.melee, bullet+AA.bullet, laser+AA.laser, energy+AA.energy, bomb+AA.bomb, bio+AA.bio, rad+AA.rad, fire+AA.fire, acid+AA.acid, magic+AA.magic)
|
||||
|
||||
/datum/armor/proc/detachArmor(datum/armor/AA)
|
||||
return getArmor(melee-AA.melee, bullet-AA.bullet, laser-AA.laser, energy-AA.energy, bomb-AA.bomb, bio-AA.bio, rad-AA.rad, fire-AA.fire, acid-AA.acid, magic-AA.magic)
|
||||
return getArmor(melee-AA.melee, bullet-AA.bullet, laser-AA.laser, energy-AA.energy, bomb-AA.bomb, bio-AA.bio, rad-AA.rad, fire-AA.fire, acid-AA.acid, magic-AA.magic)
|
||||
|
||||
/datum/armor/vv_edit_var(var_name, var_value)
|
||||
if (var_name == NAMEOF(src, tag))
|
||||
return FALSE
|
||||
. = ..()
|
||||
tag = ARMORID // update tag in case armor values were edited
|
||||
if (var_name == NAMEOF(src, tag))
|
||||
return FALSE
|
||||
. = ..()
|
||||
tag = ARMORID // update tag in case armor values were edited
|
||||
|
||||
#undef ARMORID
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
.=..()
|
||||
opentime = 0
|
||||
|
||||
/datum/browser/modal/open()
|
||||
/datum/browser/modal/open(use_onclose = 1)
|
||||
set waitfor = 0
|
||||
opentime = world.time
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
var/knockdown_chance = (target_buckled? mounted_knockdown_chance_per_tile : unmounted_knockdown_chance_per_tile) * current
|
||||
var/knockdown_time = (target_buckled? mounted_knockdown_time : unmounted_knockdown_time)
|
||||
var/damage = (target_buckled? mounted_damage_boost_per_tile : unmounted_damage_boost_per_tile) * current
|
||||
var/sharp = I.is_sharp()
|
||||
var/sharp = I.get_sharpness()
|
||||
var/msg
|
||||
if(damage)
|
||||
msg += "[user] [sharp? "impales" : "slams into"] [target] [sharp? "on" : "with"] their [parent]"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
var/mood_level = 5 //To track what stage of moodies they're on
|
||||
var/sanity_level = 5 //To track what stage of sanity they're on
|
||||
var/mood_modifier = 1 //Modifier to allow certain mobs to be less affected by moodlets
|
||||
var/datum/mood_event/list/mood_events = list()
|
||||
var/list/datum/mood_event/mood_events = list()
|
||||
var/insanity_effect = 0 //is the owner being punished for low mood? If so, how much?
|
||||
var/obj/screen/mood/screen_obj
|
||||
|
||||
@@ -125,6 +125,9 @@
|
||||
screen_obj.icon_state = "mood[mood_level]"
|
||||
|
||||
/datum/component/mood/process() //Called on SSmood process
|
||||
if(QDELETED(parent)) // workaround to an obnoxious sneaky periodical runtime.
|
||||
qdel(src)
|
||||
return
|
||||
var/mob/living/owner = parent
|
||||
|
||||
switch(mood_level)
|
||||
@@ -249,7 +252,7 @@
|
||||
RegisterSignal(screen_obj, COMSIG_CLICK, .proc/hud_click)
|
||||
|
||||
/datum/component/mood/proc/unmodify_hud(datum/source)
|
||||
if(!screen_obj)
|
||||
if(!screen_obj || !parent)
|
||||
return
|
||||
var/mob/living/owner = parent
|
||||
var/datum/hud/hud = owner.hud_used
|
||||
|
||||
@@ -310,10 +310,10 @@
|
||||
if(!user.put_in_hands(inhand, TRUE))
|
||||
qdel(inhand) // it isn't going to be added to offhands anyway
|
||||
break
|
||||
LAZYADD(equipped, src)
|
||||
LAZYADD(equipped, inhand)
|
||||
var/amount_equipped = LAZYLEN(equipped)
|
||||
if(amount_equipped)
|
||||
LAZYADD(offhands[L], amount_equipped)
|
||||
LAZYADD(offhands[L], equipped)
|
||||
if(amount_equipped >= amount_required)
|
||||
return TRUE
|
||||
unequip_buckle_inhands(L)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/component/storage/concrete/secret_satchel/can_be_inserted(I,msg,user)
|
||||
/datum/component/storage/concrete/secret_satchel/can_be_inserted(obj/item/I, stop_messages = FALSE, mob/M)
|
||||
if(SSpersistence.spawned_objects[I])
|
||||
to_chat(user, "<span class='warning'>[I] is unstable after its journey through space and time, it wouldn't survive another trip.</span>")
|
||||
to_chat(M, "<span class='warning'>[I] is unstable after its journey through space and time, it wouldn't survive another trip.</span>")
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/turf/closed/indestructible,
|
||||
/turf/open/indestructible)
|
||||
)
|
||||
|
||||
|
||||
var/static/list/resistlist = typecacheof(
|
||||
/turf/closed/wall/r_wall
|
||||
)
|
||||
@@ -77,5 +77,5 @@
|
||||
thermite_melt()
|
||||
|
||||
/datum/component/thermite/proc/attackby_react(datum/source, obj/item/thing, mob/user, params)
|
||||
if(thing.is_hot())
|
||||
if(thing.get_temperature())
|
||||
thermite_melt(user)
|
||||
@@ -1,15 +1,15 @@
|
||||
/datum/component/waddling
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
|
||||
/datum/component/waddling/Initialize()
|
||||
if(!isliving(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED), .proc/Waddle)
|
||||
if(!isliving(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED), .proc/Waddle)
|
||||
|
||||
/datum/component/waddling/proc/Waddle()
|
||||
var/mob/living/L = parent
|
||||
if(L.incapacitated() || L.lying)
|
||||
return
|
||||
animate(L, pixel_z = 4, time = 0)
|
||||
animate(pixel_z = 0, transform = turn(matrix(), pick(-12, 0, 12)), time=2)
|
||||
animate(pixel_z = 0, transform = matrix(), time = 0)
|
||||
var/mob/living/L = parent
|
||||
if(L.incapacitated() || L.lying)
|
||||
return
|
||||
animate(L, pixel_z = 4, time = 0)
|
||||
animate(pixel_z = 0, transform = turn(matrix(), pick(-12, 0, 12)), time=2)
|
||||
animate(pixel_z = 0, transform = matrix(), time = 0)
|
||||
|
||||
@@ -88,6 +88,9 @@
|
||||
if(TURF_WET_PERMAFROST)
|
||||
intensity = 120
|
||||
lube_flags = SLIDE_ICE | GALOSHES_DONT_HELP
|
||||
if(TURF_WET_SUPERLUBE)
|
||||
intensity = 120
|
||||
lube_flags = SLIDE | GALOSHES_DONT_HELP | SLIP_WHEN_CRAWLING
|
||||
else
|
||||
qdel(parent.GetComponent(/datum/component/slippery))
|
||||
return
|
||||
@@ -159,7 +162,7 @@
|
||||
//NB it's possible we get deleted after this, due to inherit
|
||||
|
||||
/datum/component/wet_floor/proc/add_wet(type, duration_minimum = 0, duration_add = 0, duration_maximum = MAXIMUM_WET_TIME, _permanent = FALSE)
|
||||
var/static/list/allowed_types = list(TURF_WET_WATER, TURF_WET_LUBE, TURF_WET_ICE, TURF_WET_PERMAFROST)
|
||||
var/static/list/allowed_types = list(TURF_WET_WATER, TURF_WET_LUBE, TURF_WET_ICE, TURF_WET_PERMAFROST, TURF_WET_SUPERLUBE)
|
||||
if(duration_minimum <= 0 || !type)
|
||||
return FALSE
|
||||
if(type in allowed_types)
|
||||
|
||||
@@ -34,11 +34,10 @@
|
||||
var/turf/T = get_turf(target)
|
||||
if(target in view(user.client.view, user))
|
||||
var/obj/spot1 = new phaseout(get_turf(user), user.dir)
|
||||
user.forceMove(T)
|
||||
playsound(T, dash_sound, 25, 1)
|
||||
var/obj/spot2 = new phasein(get_turf(user), user.dir)
|
||||
spot1.Beam(spot2,beam_effect,time=20)
|
||||
current_charges--
|
||||
if(do_teleport(user, T, null, TRUE, null, null, dash_sound, dash_sound, TRUE, TELEPORT_CHANNEL_FREE, TRUE))
|
||||
var/obj/spot2 = new phasein(get_turf(user), user.dir)
|
||||
spot1.Beam(spot2,beam_effect,time=20)
|
||||
current_charges--
|
||||
holder.update_action_buttons_icon()
|
||||
addtimer(CALLBACK(src, .proc/charge), charge_rate)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
var/list/datum_components //for /datum/components
|
||||
var/list/status_traits
|
||||
var/list/comp_lookup //it used to be for looking up components which had registered a signal but now anything can register
|
||||
var/list/signal_procs
|
||||
var/list/list/datum/callback/signal_procs
|
||||
var/signal_enabled = FALSE
|
||||
var/datum_flags = NONE
|
||||
var/datum/weakref/weak_reference
|
||||
|
||||
@@ -875,14 +875,14 @@
|
||||
return
|
||||
// text2num conveniently returns a null on invalid values
|
||||
O.armor = O.armor.setRating(melee = text2num(result["values"]["melee"]),\
|
||||
bullet = text2num(result["values"]["bullet"]),\
|
||||
laser = text2num(result["values"]["laser"]),\
|
||||
energy = text2num(result["values"]["energy"]),\
|
||||
bomb = text2num(result["values"]["bomb"]),\
|
||||
bio = text2num(result["values"]["bio"]),\
|
||||
rad = text2num(result["values"]["rad"]),\
|
||||
fire = text2num(result["values"]["fire"]),\
|
||||
acid = text2num(result["values"]["acid"]))
|
||||
bullet = text2num(result["values"]["bullet"]),\
|
||||
laser = text2num(result["values"]["laser"]),\
|
||||
energy = text2num(result["values"]["energy"]),\
|
||||
bomb = text2num(result["values"]["bomb"]),\
|
||||
bio = text2num(result["values"]["bio"]),\
|
||||
rad = text2num(result["values"]["rad"]),\
|
||||
fire = text2num(result["values"]["fire"]),\
|
||||
acid = text2num(result["values"]["acid"]))
|
||||
log_admin("[key_name(usr)] modified the armor on [O] ([O.type]) to melee: [O.armor.melee], bullet: [O.armor.bullet], laser: [O.armor.laser], energy: [O.armor.energy], bomb: [O.armor.bomb], bio: [O.armor.bio], rad: [O.armor.rad], fire: [O.armor.fire], acid: [O.armor.acid]")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] modified the armor on [O] ([O.type]) to melee: [O.armor.melee], bullet: [O.armor.bullet], laser: [O.armor.laser], energy: [O.armor.energy], bomb: [O.armor.bomb], bio: [O.armor.bio], rad: [O.armor.rad], fire: [O.armor.fire], acid: [O.armor.acid]</span>")
|
||||
else
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
#define EMBEDID "embed-[embed_chance]-[embedded_fall_chance]-[embedded_pain_chance]-[embedded_pain_multiplier]-[embedded_fall_pain_multiplier]-[embedded_impact_pain_multiplier]-[embedded_unsafe_removal_pain_multiplier]-[embedded_unsafe_removal_time]"
|
||||
|
||||
/proc/getEmbeddingBehavior(embed_chance = EMBED_CHANCE,
|
||||
embedded_fall_chance = EMBEDDED_ITEM_FALLOUT,
|
||||
embedded_pain_chance = EMBEDDED_PAIN_CHANCE,
|
||||
embedded_pain_multiplier = EMBEDDED_PAIN_MULTIPLIER,
|
||||
embedded_fall_pain_multiplier = EMBEDDED_FALL_PAIN_MULTIPLIER,
|
||||
embedded_impact_pain_multiplier = EMBEDDED_IMPACT_PAIN_MULTIPLIER,
|
||||
embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER,
|
||||
embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME)
|
||||
. = locate(EMBEDID)
|
||||
if (!.)
|
||||
. = new /datum/embedding_behavior(embed_chance, embedded_fall_chance, embedded_pain_chance, embedded_pain_multiplier, embedded_fall_pain_multiplier, embedded_impact_pain_multiplier, embedded_unsafe_removal_pain_multiplier, embedded_unsafe_removal_time)
|
||||
embedded_fall_chance = EMBEDDED_ITEM_FALLOUT,
|
||||
embedded_pain_chance = EMBEDDED_PAIN_CHANCE,
|
||||
embedded_pain_multiplier = EMBEDDED_PAIN_MULTIPLIER,
|
||||
embedded_fall_pain_multiplier = EMBEDDED_FALL_PAIN_MULTIPLIER,
|
||||
embedded_impact_pain_multiplier = EMBEDDED_IMPACT_PAIN_MULTIPLIER,
|
||||
embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER,
|
||||
embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME)
|
||||
. = locate(EMBEDID)
|
||||
if (!.)
|
||||
. = new /datum/embedding_behavior(embed_chance, embedded_fall_chance, embedded_pain_chance, embedded_pain_multiplier, embedded_fall_pain_multiplier, embedded_impact_pain_multiplier, embedded_unsafe_removal_pain_multiplier, embedded_unsafe_removal_time)
|
||||
|
||||
/datum/embedding_behavior
|
||||
var/embed_chance
|
||||
var/embedded_fall_chance
|
||||
var/embedded_pain_chance
|
||||
var/embedded_pain_multiplier //The coefficient of multiplication for the damage this item does while embedded (this*w_class)
|
||||
var/embedded_fall_pain_multiplier //The coefficient of multiplication for the damage this item does when falling out of a limb (this*w_class)
|
||||
var/embedded_impact_pain_multiplier //The coefficient of multiplication for the damage this item does when first embedded (this*w_class)
|
||||
var/embedded_unsafe_removal_pain_multiplier //The coefficient of multiplication for the damage removing this without surgery causes (this*w_class)
|
||||
var/embedded_unsafe_removal_time //A time in ticks, multiplied by the w_class.
|
||||
var/embed_chance
|
||||
var/embedded_fall_chance
|
||||
var/embedded_pain_chance
|
||||
var/embedded_pain_multiplier //The coefficient of multiplication for the damage this item does while embedded (this*w_class)
|
||||
var/embedded_fall_pain_multiplier //The coefficient of multiplication for the damage this item does when falling out of a limb (this*w_class)
|
||||
var/embedded_impact_pain_multiplier //The coefficient of multiplication for the damage this item does when first embedded (this*w_class)
|
||||
var/embedded_unsafe_removal_pain_multiplier //The coefficient of multiplication for the damage removing this without surgery causes (this*w_class)
|
||||
var/embedded_unsafe_removal_time //A time in ticks, multiplied by the w_class.
|
||||
|
||||
/datum/embedding_behavior/New(embed_chance = EMBED_CHANCE,
|
||||
embedded_fall_chance = EMBEDDED_ITEM_FALLOUT,
|
||||
embedded_pain_chance = EMBEDDED_PAIN_CHANCE,
|
||||
embedded_pain_multiplier = EMBEDDED_PAIN_MULTIPLIER,
|
||||
embedded_fall_pain_multiplier = EMBEDDED_FALL_PAIN_MULTIPLIER,
|
||||
embedded_impact_pain_multiplier = EMBEDDED_IMPACT_PAIN_MULTIPLIER,
|
||||
embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER,
|
||||
embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME)
|
||||
src.embed_chance = embed_chance
|
||||
src.embedded_fall_chance = embedded_fall_chance
|
||||
src.embedded_pain_chance = embedded_pain_chance
|
||||
src.embedded_pain_multiplier = embedded_pain_multiplier
|
||||
src.embedded_fall_pain_multiplier = embedded_fall_pain_multiplier
|
||||
src.embedded_impact_pain_multiplier = embedded_impact_pain_multiplier
|
||||
src.embedded_unsafe_removal_pain_multiplier = embedded_unsafe_removal_pain_multiplier
|
||||
src.embedded_unsafe_removal_time = embedded_unsafe_removal_time
|
||||
tag = EMBEDID
|
||||
embedded_fall_chance = EMBEDDED_ITEM_FALLOUT,
|
||||
embedded_pain_chance = EMBEDDED_PAIN_CHANCE,
|
||||
embedded_pain_multiplier = EMBEDDED_PAIN_MULTIPLIER,
|
||||
embedded_fall_pain_multiplier = EMBEDDED_FALL_PAIN_MULTIPLIER,
|
||||
embedded_impact_pain_multiplier = EMBEDDED_IMPACT_PAIN_MULTIPLIER,
|
||||
embedded_unsafe_removal_pain_multiplier = EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER,
|
||||
embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME)
|
||||
src.embed_chance = embed_chance
|
||||
src.embedded_fall_chance = embedded_fall_chance
|
||||
src.embedded_pain_chance = embedded_pain_chance
|
||||
src.embedded_pain_multiplier = embedded_pain_multiplier
|
||||
src.embedded_fall_pain_multiplier = embedded_fall_pain_multiplier
|
||||
src.embedded_impact_pain_multiplier = embedded_impact_pain_multiplier
|
||||
src.embedded_unsafe_removal_pain_multiplier = embedded_unsafe_removal_pain_multiplier
|
||||
src.embedded_unsafe_removal_time = embedded_unsafe_removal_time
|
||||
tag = EMBEDID
|
||||
|
||||
/datum/embedding_behavior/proc/setRating(embed_chance, embedded_fall_chance, embedded_pain_chance, embedded_pain_multiplier, embedded_fall_pain_multiplier, embedded_impact_pain_multiplier, embedded_unsafe_removal_pain_multiplier, embedded_unsafe_removal_time)
|
||||
return getEmbeddingBehavior((isnull(embed_chance) ? src.embed_chance : embed_chance),\
|
||||
(isnull(embedded_fall_chance) ? src.embedded_fall_chance : embedded_fall_chance),\
|
||||
(isnull(embedded_pain_chance) ? src.embedded_pain_chance : embedded_pain_chance),\
|
||||
(isnull(embedded_pain_multiplier) ? src.embedded_pain_multiplier : embedded_pain_multiplier),\
|
||||
(isnull(embedded_fall_pain_multiplier) ? src.embedded_fall_pain_multiplier : embedded_fall_pain_multiplier),\
|
||||
(isnull(embedded_impact_pain_multiplier) ? src.embedded_impact_pain_multiplier : embedded_impact_pain_multiplier),\
|
||||
(isnull(embedded_unsafe_removal_pain_multiplier) ? src.embedded_unsafe_removal_pain_multiplier : embedded_unsafe_removal_pain_multiplier),\
|
||||
(isnull(embedded_unsafe_removal_time) ? src.embedded_unsafe_removal_time : embedded_unsafe_removal_time))
|
||||
return getEmbeddingBehavior((isnull(embed_chance) ? src.embed_chance : embed_chance),\
|
||||
(isnull(embedded_fall_chance) ? src.embedded_fall_chance : embedded_fall_chance),\
|
||||
(isnull(embedded_pain_chance) ? src.embedded_pain_chance : embedded_pain_chance),\
|
||||
(isnull(embedded_pain_multiplier) ? src.embedded_pain_multiplier : embedded_pain_multiplier),\
|
||||
(isnull(embedded_fall_pain_multiplier) ? src.embedded_fall_pain_multiplier : embedded_fall_pain_multiplier),\
|
||||
(isnull(embedded_impact_pain_multiplier) ? src.embedded_impact_pain_multiplier : embedded_impact_pain_multiplier),\
|
||||
(isnull(embedded_unsafe_removal_pain_multiplier) ? src.embedded_unsafe_removal_pain_multiplier : embedded_unsafe_removal_pain_multiplier),\
|
||||
(isnull(embedded_unsafe_removal_time) ? src.embedded_unsafe_removal_time : embedded_unsafe_removal_time))
|
||||
|
||||
#undef EMBEDID
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
tele_play_specials(teleatom, destturf, effectout, asoundout)
|
||||
if(ismegafauna(teleatom))
|
||||
message_admins("[teleatom] [ADMIN_FLW(teleatom)] has teleported from [ADMIN_VERBOSEJMP(curturf)] to [ADMIN_VERBOSEJMP(destturf)].")
|
||||
SEND_SIGNAL(teleatom, COMSIG_MOVABLE_TELEPORTED, channel, curturf, destturf)
|
||||
|
||||
if(ismob(teleatom))
|
||||
var/mob/M = teleatom
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
if (T && isturf(T))
|
||||
if (!D.stat)
|
||||
D.emote("scream")
|
||||
D.throw_at(T, 10, 4, A, TRUE, TRUE, callback = CALLBACK(D, /mob/living/carbon/human/.Knockdown, 20))
|
||||
D.throw_at(T, 10, 4, A, TRUE, TRUE, callback = CALLBACK(D, /mob/living/carbon/human.proc/Knockdown, 20))
|
||||
log_combat(A, D, "has thrown with wrestling")
|
||||
return 0
|
||||
|
||||
|
||||
+93
-158
@@ -41,8 +41,6 @@
|
||||
var/special_role
|
||||
var/list/restricted_roles = list()
|
||||
|
||||
var/list/datum/objective/objectives = list()
|
||||
|
||||
var/list/spell_list = list() // Wizard mode & "Give Spell" badmin button.
|
||||
|
||||
var/linglink
|
||||
@@ -360,13 +358,15 @@
|
||||
output += memory
|
||||
|
||||
|
||||
var/list/all_objectives = list()
|
||||
for(var/datum/antagonist/A in antag_datums)
|
||||
output += A.antag_memory
|
||||
all_objectives |= A.objectives
|
||||
|
||||
if(objectives.len)
|
||||
if(all_objectives.len)
|
||||
output += "<B>Objectives:</B>"
|
||||
var/obj_count = 1
|
||||
for(var/datum/objective/objective in objectives)
|
||||
for(var/datum/objective/objective in all_objectives)
|
||||
output += "<br><B>Objective #[obj_count++]</B>: [objective.explanation_text]"
|
||||
var/list/datum/mind/other_owners = objective.get_owners() - src
|
||||
if(other_owners.len)
|
||||
@@ -377,7 +377,7 @@
|
||||
|
||||
if(window)
|
||||
recipient << browse(output,"window=memory")
|
||||
else if(objectives.len || memory)
|
||||
else if(all_objectives.len || memory)
|
||||
to_chat(recipient, "<i>[output]</i>")
|
||||
|
||||
/datum/mind/Topic(href, href_list)
|
||||
@@ -408,34 +408,24 @@
|
||||
memory = new_memo
|
||||
|
||||
else if (href_list["obj_edit"] || href_list["obj_add"])
|
||||
var/datum/objective/objective
|
||||
var/objective_pos
|
||||
var/objective_pos //Edited objectives need to keep same order in antag objective list
|
||||
var/def_value
|
||||
|
||||
var/datum/antagonist/target_antag
|
||||
var/datum/objective/old_objective //The old objective we're replacing/editing
|
||||
var/datum/objective/new_objective //New objective we're be adding
|
||||
|
||||
if (href_list["obj_edit"])
|
||||
objective = locate(href_list["obj_edit"])
|
||||
if (!objective)
|
||||
if(href_list["obj_edit"])
|
||||
for(var/datum/antagonist/A in antag_datums)
|
||||
old_objective = locate(href_list["obj_edit"]) in A.objectives
|
||||
if(old_objective)
|
||||
target_antag = A
|
||||
objective_pos = A.objectives.Find(old_objective)
|
||||
break
|
||||
if(!old_objective)
|
||||
to_chat(usr,"Invalid objective.")
|
||||
return
|
||||
|
||||
for(var/datum/antagonist/A in antag_datums)
|
||||
if(objective in A.objectives)
|
||||
target_antag = A
|
||||
objective_pos = A.objectives.Find(objective)
|
||||
break
|
||||
|
||||
if(!target_antag) //Shouldn't happen anymore
|
||||
stack_trace("objective without antagonist found")
|
||||
objective_pos = objectives.Find(objective)
|
||||
|
||||
//Text strings are easy to manipulate. Revised for simplicity.
|
||||
var/temp_obj_type = "[objective.type]"//Convert path into a text string.
|
||||
def_value = copytext(temp_obj_type, 19)//Convert last part of path into an objective keyword.
|
||||
if(!def_value)//If it's a custom objective, it will be an empty string.
|
||||
def_value = "custom"
|
||||
else
|
||||
//We're adding this objective
|
||||
if(href_list["target_antag"])
|
||||
var/datum/antagonist/X = locate(href_list["target_antag"]) in antag_datums
|
||||
if(X)
|
||||
@@ -447,7 +437,7 @@
|
||||
if(1)
|
||||
target_antag = antag_datums[1]
|
||||
else
|
||||
var/datum/antagonist/target = input("Which antagonist gets the objective:", "Antagonist", def_value) as null|anything in antag_datums + "(new custom antag)"
|
||||
var/datum/antagonist/target = input("Which antagonist gets the objective:", "Antagonist", "(new custom antag)") as null|anything in antag_datums + "(new custom antag)"
|
||||
if (QDELETED(target))
|
||||
return
|
||||
else if(target == "(new custom antag)")
|
||||
@@ -455,149 +445,88 @@
|
||||
else
|
||||
target_antag = target
|
||||
|
||||
var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "maroon", "debrain", "protect", "destroy", "prevent", "hijack", "escape", "survive", "martyr", "steal", "download", "nuclear", "capture", "absorb", "custom")
|
||||
if (!new_obj_type)
|
||||
var/static/list/choices
|
||||
if(!choices)
|
||||
choices = list()
|
||||
|
||||
var/list/allowed_types = list(
|
||||
/datum/objective/assassinate,
|
||||
/datum/objective/maroon,
|
||||
/datum/objective/debrain,
|
||||
/datum/objective/protect,
|
||||
/datum/objective/destroy,
|
||||
/datum/objective/hijack,
|
||||
/datum/objective/escape,
|
||||
/datum/objective/survive,
|
||||
/datum/objective/martyr,
|
||||
/datum/objective/steal,
|
||||
/datum/objective/download,
|
||||
/datum/objective/nuclear,
|
||||
/datum/objective/capture,
|
||||
/datum/objective/absorb,
|
||||
/datum/objective/custom
|
||||
)
|
||||
|
||||
for(var/T in allowed_types)
|
||||
var/datum/objective/X = T
|
||||
choices[initial(X.name)] = T
|
||||
|
||||
if(old_objective)
|
||||
if(old_objective.name in choices)
|
||||
def_value = old_objective.name
|
||||
|
||||
var/selected_type = input("Select objective type:", "Objective type", def_value) as null|anything in choices
|
||||
selected_type = choices[selected_type]
|
||||
if (!selected_type)
|
||||
return
|
||||
|
||||
var/datum/objective/new_objective = null
|
||||
if(!old_objective)
|
||||
//Add new one
|
||||
new_objective = new selected_type
|
||||
new_objective.owner = src
|
||||
new_objective.admin_edit(usr)
|
||||
target_antag.objectives += new_objective
|
||||
|
||||
switch (new_obj_type)
|
||||
if ("assassinate","protect","debrain","maroon")
|
||||
var/list/possible_targets = list("Free objective")
|
||||
for(var/datum/mind/possible_target in SSticker.minds)
|
||||
if ((possible_target != src) && ishuman(possible_target.current))
|
||||
possible_targets += possible_target.current
|
||||
|
||||
var/mob/def_target = null
|
||||
var/list/objective_list = typecacheof(list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain, /datum/objective/maroon))
|
||||
if (is_type_in_typecache(objective, objective_list) && objective.target)
|
||||
def_target = objective.target.current
|
||||
|
||||
var/mob/new_target = input("Select target:", "Objective target", def_target) as null|anything in possible_targets
|
||||
if (!new_target)
|
||||
return
|
||||
|
||||
var/objective_path = text2path("/datum/objective/[new_obj_type]")
|
||||
if (new_target == "Free objective")
|
||||
new_objective = new objective_path
|
||||
new_objective.owner = src
|
||||
new_objective.target = null
|
||||
new_objective.explanation_text = "Free objective"
|
||||
else
|
||||
new_objective = new objective_path
|
||||
new_objective.owner = src
|
||||
new_objective.target = new_target.mind
|
||||
//Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
|
||||
new_objective.update_explanation_text()
|
||||
|
||||
if ("destroy")
|
||||
var/list/possible_targets = active_ais(1)
|
||||
if(possible_targets.len)
|
||||
var/mob/new_target = input("Select target:", "Objective target") as null|anything in possible_targets
|
||||
new_objective = new /datum/objective/destroy
|
||||
new_objective.target = new_target.mind
|
||||
new_objective.owner = src
|
||||
new_objective.update_explanation_text()
|
||||
else
|
||||
to_chat(usr, "No active AIs with minds")
|
||||
|
||||
if ("prevent")
|
||||
new_objective = new /datum/objective/block
|
||||
new_objective.owner = src
|
||||
|
||||
if ("hijack")
|
||||
new_objective = new /datum/objective/hijack
|
||||
new_objective.owner = src
|
||||
|
||||
if ("escape")
|
||||
new_objective = new /datum/objective/escape
|
||||
new_objective.owner = src
|
||||
|
||||
if ("survive")
|
||||
new_objective = new /datum/objective/survive
|
||||
new_objective.owner = src
|
||||
|
||||
if("martyr")
|
||||
new_objective = new /datum/objective/martyr
|
||||
new_objective.owner = src
|
||||
|
||||
if ("nuclear")
|
||||
new_objective = new /datum/objective/nuclear
|
||||
new_objective.owner = src
|
||||
|
||||
if ("steal")
|
||||
if (!istype(objective, /datum/objective/steal))
|
||||
new_objective = new /datum/objective/steal
|
||||
new_objective.owner = src
|
||||
else
|
||||
new_objective = objective
|
||||
var/datum/objective/steal/steal = new_objective
|
||||
if (!steal.select_target())
|
||||
return
|
||||
|
||||
if("download","capture","absorb")
|
||||
var/def_num
|
||||
if(objective&&objective.type==text2path("/datum/objective/[new_obj_type]"))
|
||||
def_num = objective.target_amount
|
||||
|
||||
var/target_number = input("Input target number:", "Objective", def_num) as num | null
|
||||
if (isnull(target_number))//Ordinarily, you wouldn't need isnull. In this case, the value may already exist.
|
||||
return
|
||||
|
||||
switch(new_obj_type)
|
||||
if("download")
|
||||
new_objective = new /datum/objective/download
|
||||
new_objective.explanation_text = "Download [target_number] research node\s."
|
||||
if("capture")
|
||||
new_objective = new /datum/objective/capture
|
||||
new_objective.explanation_text = "Capture [target_number] lifeforms with an energy net. Live, rare specimens are worth more."
|
||||
if("absorb")
|
||||
new_objective = new /datum/objective/absorb
|
||||
new_objective.explanation_text = "Absorb [target_number] compatible genomes."
|
||||
new_objective.owner = src
|
||||
new_objective.target_amount = target_number
|
||||
|
||||
if ("custom")
|
||||
var/expl = stripped_input(usr, "Custom objective:", "Objective", objective ? objective.explanation_text : "")
|
||||
if (!expl)
|
||||
return
|
||||
new_objective = new /datum/objective
|
||||
new_objective.owner = src
|
||||
new_objective.explanation_text = expl
|
||||
|
||||
if (!new_objective)
|
||||
return
|
||||
|
||||
if (objective)
|
||||
if(target_antag)
|
||||
target_antag.objectives -= objective
|
||||
objectives -= objective
|
||||
target_antag.objectives.Insert(objective_pos, new_objective)
|
||||
message_admins("[key_name_admin(usr)] edited [current]'s objective to [new_objective.explanation_text]")
|
||||
log_admin("[key_name(usr)] edited [current]'s objective to [new_objective.explanation_text]")
|
||||
else
|
||||
if(target_antag)
|
||||
target_antag.objectives += new_objective
|
||||
objectives += new_objective
|
||||
message_admins("[key_name_admin(usr)] added a new objective for [current]: [new_objective.explanation_text]")
|
||||
log_admin("[key_name(usr)] added a new objective for [current]: [new_objective.explanation_text]")
|
||||
else
|
||||
if(old_objective.type == selected_type)
|
||||
//Edit the old
|
||||
old_objective.admin_edit(usr)
|
||||
new_objective = old_objective
|
||||
else
|
||||
//Replace the old
|
||||
new_objective = new selected_type
|
||||
new_objective.owner = src
|
||||
new_objective.admin_edit(usr)
|
||||
target_antag.objectives -= old_objective
|
||||
target_antag.objectives.Insert(objective_pos, new_objective)
|
||||
message_admins("[key_name_admin(usr)] edited [current]'s objective to [new_objective.explanation_text]")
|
||||
log_admin("[key_name(usr)] edited [current]'s objective to [new_objective.explanation_text]")
|
||||
|
||||
else if (href_list["obj_delete"])
|
||||
var/datum/objective/objective = locate(href_list["obj_delete"])
|
||||
if(!istype(objective))
|
||||
return
|
||||
var/datum/objective/objective
|
||||
|
||||
for(var/datum/antagonist/A in antag_datums)
|
||||
if(objective in A.objectives)
|
||||
A.objectives -= objective
|
||||
objective = locate(href_list["obj_delete"]) in A.objectives
|
||||
if(istype(objective))
|
||||
break
|
||||
objectives -= objective
|
||||
if(!objective)
|
||||
to_chat(usr,"Invalid objective.")
|
||||
return
|
||||
//qdel(objective) Needs cleaning objective destroys
|
||||
message_admins("[key_name_admin(usr)] removed an objective for [current]: [objective.explanation_text]")
|
||||
log_admin("[key_name(usr)] removed an objective for [current]: [objective.explanation_text]")
|
||||
|
||||
else if(href_list["obj_completed"])
|
||||
var/datum/objective/objective = locate(href_list["obj_completed"])
|
||||
if(!istype(objective))
|
||||
var/datum/objective/objective
|
||||
for(var/datum/antagonist/A in antag_datums)
|
||||
objective = locate(href_list["obj_completed"]) in A.objectives
|
||||
if(istype(objective))
|
||||
objective = objective
|
||||
break
|
||||
if(!objective)
|
||||
to_chat(usr,"Invalid objective.")
|
||||
return
|
||||
objective.completed = !objective.completed
|
||||
log_admin("[key_name(usr)] toggled the win state for [current]'s objective: [objective.explanation_text]")
|
||||
@@ -652,10 +581,16 @@
|
||||
usr = current
|
||||
traitor_panel()
|
||||
|
||||
/datum/mind/proc/get_all_objectives()
|
||||
var/list/all_objectives = list()
|
||||
for(var/datum/antagonist/A in antag_datums)
|
||||
all_objectives |= A.objectives
|
||||
return all_objectives
|
||||
|
||||
/datum/mind/proc/announce_objectives()
|
||||
var/obj_count = 1
|
||||
to_chat(current, "<span class='notice'>Your current objectives:</span>")
|
||||
for(var/objective in objectives)
|
||||
for(var/objective in get_all_objectives())
|
||||
var/datum/objective/O = objective
|
||||
to_chat(current, "<B>Objective #[obj_count]</B>: [O.explanation_text]")
|
||||
obj_count++
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
mood_change = -1
|
||||
|
||||
/datum/mood_event/broken_vow //Used for when mimes break their vow of silence
|
||||
description = "<span class='boldwarning'>I have brought shame upon my name, and betrayed my fellow mimes by breaking our sacred vow...</span>\n"
|
||||
mood_change = -8
|
||||
description = "<span class='boldwarning'>I have brought shame upon my name, and betrayed my fellow mimes by breaking our sacred vow...</span>\n"
|
||||
mood_change = -8
|
||||
|
||||
/datum/mood_event/on_fire
|
||||
description = "<span class='boldwarning'>I'M ON FIRE!!!</span>\n"
|
||||
@@ -55,14 +55,14 @@
|
||||
timeout = 2 MINUTES
|
||||
|
||||
/datum/mood_event/shameful_suicide //suicide_acts that return SHAME, like sord
|
||||
description = "<span class='boldwarning'>I can't even end it all!</span>\n"
|
||||
mood_change = -10
|
||||
timeout = 1 MINUTES
|
||||
description = "<span class='boldwarning'>I can't even end it all!</span>\n"
|
||||
mood_change = -10
|
||||
timeout = 1 MINUTES
|
||||
|
||||
/datum/mood_event/dismembered
|
||||
description = "<span class='boldwarning'>AHH! I WAS USING THAT LIMB!</span>\n"
|
||||
mood_change = -8
|
||||
timeout = 2400
|
||||
description = "<span class='boldwarning'>AHH! I WAS USING THAT LIMB!</span>\n"
|
||||
mood_change = -8
|
||||
timeout = 2400
|
||||
|
||||
/datum/mood_event/noshoes
|
||||
description = "<span class='warning'>I am a disgrace to comedy everywhere!</span>\n"
|
||||
@@ -92,20 +92,20 @@
|
||||
mood_change = 2
|
||||
|
||||
/datum/mood_event/brain_damage
|
||||
mood_change = -3
|
||||
mood_change = -3
|
||||
|
||||
/datum/mood_event/brain_damage/add_effects()
|
||||
var/damage_message = pick_list_replacements(BRAIN_DAMAGE_FILE, "brain_damage")
|
||||
description = "<span class='warning'>Hurr durr... [damage_message]</span>\n"
|
||||
var/damage_message = pick_list_replacements(BRAIN_DAMAGE_FILE, "brain_damage")
|
||||
description = "<span class='warning'>Hurr durr... [damage_message]</span>\n"
|
||||
|
||||
/datum/mood_event/hulk //Entire duration of having the hulk mutation
|
||||
description = "<span class='warning'>HULK SMASH!</span>\n"
|
||||
mood_change = -4
|
||||
description = "<span class='warning'>HULK SMASH!</span>\n"
|
||||
mood_change = -4
|
||||
|
||||
/datum/mood_event/epilepsy //Only when the mutation causes a seizure
|
||||
description = "<span class='warning'>I should have paid attention to the epilepsy warning.</span>\n"
|
||||
mood_change = -3
|
||||
timeout = 3000
|
||||
description = "<span class='warning'>I should have paid attention to the epilepsy warning.</span>\n"
|
||||
mood_change = -3
|
||||
timeout = 3000
|
||||
|
||||
/datum/mood_event/nyctophobia
|
||||
description = "<span class='warning'>It sure is dark around here...</span>\n"
|
||||
|
||||
@@ -80,12 +80,12 @@
|
||||
description = "<span class='nicegreen'>Heh...hehehe...hehe...</span>\n"
|
||||
mood_change = 4
|
||||
|
||||
/datum/mood_event/chemical_laughter
|
||||
/datum/mood_event/chemical_laughter
|
||||
description = "<span class='nicegreen'>Laughter really is the best medicine! Or is it?</span>\n"
|
||||
mood_change = 4
|
||||
timeout = 3 MINUTES
|
||||
|
||||
/datum/mood_event/chemical_superlaughter
|
||||
/datum/mood_event/chemical_superlaughter
|
||||
description = "<span class='nicegreen'>*WHEEZE*</span>\n"
|
||||
mood_change = 12
|
||||
timeout = 3 MINUTES
|
||||
|
||||
@@ -30,7 +30,7 @@ GLOBAL_LIST_EMPTY(mutations_list)
|
||||
. = on_losing(owner)
|
||||
|
||||
/datum/mutation/human/proc/set_se(se_string, on = 1)
|
||||
if(!se_string || lentext(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE)
|
||||
if(!se_string || length(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE)
|
||||
return
|
||||
var/before = copytext(se_string, 1, ((dna_block - 1) * DNA_BLOCK_SIZE) + 1)
|
||||
var/injection = num2hex(on ? rand(lowest_value, (256 * 16) - 1) : rand(0, lowest_value - 1), DNA_BLOCK_SIZE)
|
||||
@@ -42,7 +42,7 @@ GLOBAL_LIST_EMPTY(mutations_list)
|
||||
owner.dna.struc_enzymes = set_se(owner.dna.struc_enzymes, on)
|
||||
|
||||
/datum/mutation/human/proc/check_block_string(se_string)
|
||||
if(!se_string || lentext(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE)
|
||||
if(!se_string || length(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE)
|
||||
return 0
|
||||
if(hex2num(getblock(se_string, dna_block)) >= lowest_value)
|
||||
return 1
|
||||
|
||||
@@ -66,6 +66,8 @@
|
||||
place = cmaster_turf
|
||||
for(var/i in 1 to distance)
|
||||
place = get_step(place, dir)
|
||||
if(!place)
|
||||
break
|
||||
atoms += get_rad_contents(place)
|
||||
|
||||
return atoms
|
||||
@@ -108,7 +110,7 @@
|
||||
if(!can_contaminate || blacklisted[thing.type])
|
||||
continue
|
||||
if(prob(contamination_chance)) // Only stronk rads get to have little baby rads
|
||||
if(SEND_SIGNAL(thing, COMSIG_ATOM_RAD_CONTAMINATING, strength) & COMPONENT_BLOCK_CONTAMINATION)
|
||||
if(CHECK_BITFIELD(thing.rad_flags, RAD_NO_CONTAMINATE) || SEND_SIGNAL(thing, COMSIG_ATOM_RAD_CONTAMINATING, strength) & COMPONENT_BLOCK_CONTAMINATION)
|
||||
continue
|
||||
var/rad_strength = (strength-RAD_MINIMUM_CONTAMINATION) * RAD_CONTAMINATION_STR_COEFFICIENT
|
||||
thing.AddComponent(/datum/component/radioactive, rad_strength, source)
|
||||
|
||||
@@ -163,6 +163,13 @@
|
||||
suffix = "lavaland_surface_xeno_nest.dmm"
|
||||
cost = 20 */
|
||||
|
||||
/datum/map_template/ruin/lavaland/alien_nest
|
||||
name = "Alien Nest"
|
||||
id = "alien-nest"
|
||||
description = "Not even Necropolis is safe from alien infestation. The competition for hosts has locked the legion and aliens in an endless conflict that can only be resolved by a PKA."
|
||||
suffix = "lavaland_surface_alien_nest.dmm"
|
||||
cost = 20
|
||||
|
||||
/datum/map_template/ruin/lavaland/fountain
|
||||
name = "Fountain Hall"
|
||||
id = "fountain"
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
tick_interval = 4
|
||||
alert_type = /obj/screen/alert/status_effect/his_grace
|
||||
var/bloodlust = 0
|
||||
|
||||
|
||||
/obj/screen/alert/status_effect/his_grace
|
||||
name = "His Grace"
|
||||
desc = "His Grace hungers, and you must feed Him."
|
||||
@@ -356,7 +356,7 @@
|
||||
var/new_staminaloss = owner.getStaminaLoss()
|
||||
if(new_staminaloss < last_staminaloss)
|
||||
var/heal_amount = -5 // CIT CHANGE - makes blood drunk status effect not exhaust you
|
||||
owner.adjustStaminaLoss(heal_amount, updating_health = FALSE)
|
||||
owner.adjustStaminaLoss(heal_amount, FALSE)
|
||||
new_staminaloss = owner.getStaminaLoss()
|
||||
needs_health_update = TRUE
|
||||
last_staminaloss = new_staminaloss
|
||||
|
||||
@@ -103,14 +103,13 @@
|
||||
lose_text = "<span class='notice'>You don't feel that burning sensation anymore.</span>"
|
||||
|
||||
/datum/quirk/libido/add()
|
||||
var/mob/living/M = quirk_holder
|
||||
M.min_arousal = 16
|
||||
M.arousal_rate = 3
|
||||
quirk_holder.min_arousal = 16
|
||||
quirk_holder.arousal_rate = 3
|
||||
|
||||
/datum/quirk/libido/remove()
|
||||
var/mob/living/M = quirk_holder
|
||||
M.min_arousal = initial(M.min_arousal)
|
||||
M.arousal_rate = initial(M.arousal_rate)
|
||||
if(quirk_holder)
|
||||
quirk_holder.min_arousal = initial(quirk_holder.min_arousal)
|
||||
quirk_holder.arousal_rate = initial(quirk_holder.arousal_rate)
|
||||
|
||||
/datum/quirk/maso
|
||||
name = "Masochism"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
//do things for each entry in Generate_list
|
||||
//return value sets Generate_list[verbpath]
|
||||
/datum/verbs/proc/HandleVerb(list/entry, atom/verb/verbpath, ...)
|
||||
/datum/verbs/proc/HandleVerb(list/entry, procpath/verbpath, ...)
|
||||
return entry
|
||||
|
||||
/datum/verbs/New()
|
||||
@@ -82,7 +82,7 @@
|
||||
. += childlist
|
||||
|
||||
for (var/thing in verblist)
|
||||
var/atom/verb/verbpath = thing
|
||||
var/procpath/verbpath = thing
|
||||
if (!verbpath)
|
||||
stack_trace("Bad VERB in [type] verblist: [english_list(verblist)]")
|
||||
var/list/entry = list()
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
return TRUE
|
||||
if(ishuman(L)) //Are you immune?
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/thermal_protection = H.get_thermal_protection()
|
||||
var/thermal_protection = H.easy_thermal_protection()
|
||||
if(thermal_protection >= FIRE_IMMUNITY_MAX_TEMP_PROTECT)
|
||||
return TRUE
|
||||
if(isliving(L))// if we're a non immune mob inside an immune mob we have to reconsider if that mob is immune to protect ourselves
|
||||
|
||||
@@ -1,10 +1,35 @@
|
||||
/datum/wires/airlock
|
||||
holder_type = /obj/machinery/door/airlock
|
||||
proper_name = "Airlock"
|
||||
proper_name = "Generic Airlock"
|
||||
var/wiretype
|
||||
|
||||
/datum/wires/airlock/secure
|
||||
randomize = TRUE
|
||||
|
||||
/datum/wires/airlock/command
|
||||
proper_name = "Command Airlock"
|
||||
wiretype = "commandairlock"
|
||||
|
||||
/datum/wires/airlock/security
|
||||
proper_name = "Security Airlock"
|
||||
wiretype = "securityairlock"
|
||||
|
||||
/datum/wires/airlock/engineering
|
||||
proper_name = "Engineering Airlock"
|
||||
wiretype = "engineeringairlock"
|
||||
|
||||
/datum/wires/airlock/science
|
||||
proper_name = "Science Airlock"
|
||||
wiretype = "scienceairlock"
|
||||
|
||||
/datum/wires/airlock/medical
|
||||
proper_name = "Medical Airlock"
|
||||
wiretype = "medicalairlock"
|
||||
|
||||
/datum/wires/airlock/cargo
|
||||
proper_name = "Cargo Airlock"
|
||||
wiretype = "cargoairlock"
|
||||
|
||||
/datum/wires/airlock/New(atom/holder)
|
||||
wires = list(
|
||||
WIRE_POWER1, WIRE_POWER2,
|
||||
@@ -14,7 +39,16 @@
|
||||
WIRE_ZAP1, WIRE_ZAP2
|
||||
)
|
||||
add_duds(2)
|
||||
..()
|
||||
. = ..()
|
||||
if(randomize || !wiretype)
|
||||
return
|
||||
if(!GLOB.wire_color_directory[wiretype])
|
||||
colors = list()
|
||||
randomize()
|
||||
GLOB.wire_color_directory[wiretype] = colors
|
||||
GLOB.wire_name_directory[wiretype] = proper_name
|
||||
else
|
||||
colors = GLOB.wire_color_directory[wiretype]
|
||||
|
||||
/datum/wires/airlock/interactable(mob/user)
|
||||
var/obj/machinery/door/airlock/A = holder
|
||||
|
||||
@@ -250,7 +250,12 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
/area/maintenance/disposal/incinerator
|
||||
name = "Incinerator"
|
||||
icon_state = "disposal"
|
||||
/area/maintenance/bar
|
||||
name = "Maintenance Bar"
|
||||
icon_state = "maintbar"
|
||||
|
||||
/area/maintenance/bar/cafe
|
||||
name = "Abandoned Cafe"
|
||||
|
||||
//Hallway
|
||||
|
||||
@@ -499,6 +504,16 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
name = "Abandoned Theatre"
|
||||
icon_state = "Theatre"
|
||||
|
||||
/area/crew_quarters/theatre/clown
|
||||
name = "Clown's Office"
|
||||
|
||||
/area/crew_quarters/theatre/mime
|
||||
name = "Mime's Office"
|
||||
|
||||
/area/crew_quarters/cryopod
|
||||
name = "Cryogenics"
|
||||
icon_state = "cryosleep"
|
||||
|
||||
/area/library
|
||||
name = "Library"
|
||||
icon_state = "library"
|
||||
|
||||
@@ -53,8 +53,6 @@
|
||||
|
||||
var/parallax_movedir = 0
|
||||
|
||||
var/global/global_uid = 0
|
||||
var/uid
|
||||
var/list/ambientsounds = GENERIC
|
||||
flags_1 = CAN_BE_DIRTY_1
|
||||
|
||||
@@ -96,7 +94,6 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
/area/Initialize()
|
||||
icon_state = ""
|
||||
layer = AREA_LAYER
|
||||
uid = ++global_uid
|
||||
map_name = name // Save the initial (the name set in the map) name of the area.
|
||||
canSmoothWithAreas = typecacheof(canSmoothWithAreas)
|
||||
|
||||
|
||||
+10
-3
@@ -186,6 +186,10 @@
|
||||
else
|
||||
M.forceMove(src)
|
||||
|
||||
//common name
|
||||
/atom/proc/update_multiz(prune_on_fail = FALSE)
|
||||
return FALSE
|
||||
|
||||
/atom/proc/assume_air(datum/gas_mixture/giver)
|
||||
qdel(giver)
|
||||
return null
|
||||
@@ -266,7 +270,7 @@
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_GET_EXAMINE_NAME, user, override) & COMPONENT_EXNAME_CHANGED)
|
||||
should_override = TRUE
|
||||
|
||||
|
||||
|
||||
if(blood_DNA && !istype(src, /obj/effect/decal))
|
||||
override[EXAMINE_POSITION_BEFORE] = " blood-stained "
|
||||
should_override = TRUE
|
||||
@@ -563,7 +567,7 @@
|
||||
|
||||
|
||||
//Hook for running code when a dir change occurs
|
||||
/atom/proc/setDir(newdir)
|
||||
/atom/proc/setDir(newdir, ismousemovement=FALSE)
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_DIR_CHANGE, dir, newdir)
|
||||
dir = newdir
|
||||
|
||||
@@ -832,4 +836,7 @@ Proc for attack log creation, because really why not
|
||||
if(filter_data && filter_data[name])
|
||||
filter_data -= name
|
||||
update_filters()
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
/atom/proc/intercept_zImpact(atom/movable/AM, levels = 1)
|
||||
. |= SEND_SIGNAL(src, COMSIG_ATOM_INTERCEPT_Z_FALL, AM, levels)
|
||||
@@ -34,6 +34,51 @@
|
||||
var/datum/component/orbiter/orbiting
|
||||
var/can_be_z_moved = TRUE
|
||||
|
||||
var/zfalling = FALSE
|
||||
|
||||
/atom/movable/proc/can_zFall(turf/source, levels = 1, turf/target, direction)
|
||||
if(!direction)
|
||||
direction = DOWN
|
||||
if(!source)
|
||||
source = get_turf(src)
|
||||
if(!source)
|
||||
return FALSE
|
||||
if(!target)
|
||||
target = get_step_multiz(source, direction)
|
||||
if(!target)
|
||||
return FALSE
|
||||
return !(movement_type & FLYING) && has_gravity(source) && !throwing
|
||||
|
||||
/atom/movable/proc/onZImpact(turf/T, levels)
|
||||
var/atom/highest = T
|
||||
for(var/i in T.contents)
|
||||
var/atom/A = i
|
||||
if(!A.density)
|
||||
continue
|
||||
if(isobj(A) || ismob(A))
|
||||
if(A.layer > highest.layer)
|
||||
highest = A
|
||||
INVOKE_ASYNC(src, .proc/SpinAnimation, 5, 2)
|
||||
throw_impact(highest)
|
||||
return TRUE
|
||||
|
||||
//For physical constraints to travelling up/down.
|
||||
/atom/movable/proc/can_zTravel(turf/destination, direction)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
return FALSE
|
||||
if(!direction)
|
||||
if(!destination)
|
||||
return FALSE
|
||||
direction = get_dir(T, destination)
|
||||
if(direction != UP && direction != DOWN)
|
||||
return FALSE
|
||||
if(!destination)
|
||||
destination = get_step_multiz(src, direction)
|
||||
if(!destination)
|
||||
return FALSE
|
||||
return T.zPassOut(src, direction, destination) && destination.zPassIn(src, direction, T)
|
||||
|
||||
/atom/movable/vv_edit_var(var_name, var_value)
|
||||
var/static/list/banned_edits = list("step_x", "step_y", "step_size")
|
||||
var/static/list/careful_edits = list("bound_x", "bound_y", "bound_width", "bound_height")
|
||||
|
||||
@@ -167,6 +167,7 @@ Credit where due:
|
||||
number_players -= 30
|
||||
starter_servants += round(number_players / 10)
|
||||
starter_servants = min(starter_servants, 8) //max 8 servants (that sould only happen with a ton of players)
|
||||
GLOB.clockwork_vitality += 50 * starter_servants //some starter Vitality to help recover from initial fuck ups
|
||||
while(starter_servants)
|
||||
var/datum/mind/servant = antag_pick(antag_candidates)
|
||||
servants_to_serve += servant
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
|
||||
slipper.signal_enabled = active
|
||||
|
||||
/obj/item/shield/energy/bananium/throw_at(atom/target, range, speed, mob/thrower, spin=1)
|
||||
/obj/item/shield/energy/bananium/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
|
||||
if(active)
|
||||
if(iscarbon(thrower))
|
||||
var/mob/living/carbon/C = thrower
|
||||
|
||||
@@ -34,11 +34,12 @@
|
||||
//If you override this method, have it return the number of objectives added.
|
||||
if(devil_target_list.len && devil_target_list[devil]) // Is a double agent
|
||||
var/datum/mind/target_mind = devil_target_list[devil]
|
||||
var/datum/antagonist/devil/D = target_mind.has_antag_datum(/datum/antagonist/devil)
|
||||
var/datum/objective/devil/outsell/outsellobjective = new
|
||||
outsellobjective.owner = devil
|
||||
outsellobjective.target = target_mind
|
||||
outsellobjective.update_explanation_text()
|
||||
devil.objectives += outsellobjective
|
||||
D.objectives += outsellobjective
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
|
||||
/datum/game_mode/proc/add_devil_objectives(datum/mind/devil_mind, quantity)
|
||||
var/list/validtypes = list(/datum/objective/devil/soulquantity, /datum/objective/devil/soulquality, /datum/objective/devil/sintouch, /datum/objective/devil/buy_target)
|
||||
var/datum/antagonist/devil/D = devil_mind.has_antag_datum(/datum/antagonist/devil)
|
||||
for(var/i = 1 to quantity)
|
||||
var/type = pick(validtypes)
|
||||
var/datum/objective/devil/objective = new type(null)
|
||||
objective.owner = devil_mind
|
||||
devil_mind.objectives += objective
|
||||
D.objectives += objective
|
||||
if(!istype(objective, /datum/objective/devil/buy_target))
|
||||
validtypes -= type //prevent duplicate objectives, EXCEPT for buy_target.
|
||||
else
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
// So for example you can get the list of all current dead players with var/list/dead_players = candidates[CURRENT_DEAD_PLAYERS]
|
||||
// Make sure to properly typecheck the mobs in those lists, as the dead_players list could contain ghosts, or dead players still in their bodies.
|
||||
// We're still gonna trim the obvious (mobs without clients, jobbanned players, etc)
|
||||
living_players = trim_list(mode.current_players[CURRENT_LIVING_PLAYERS])
|
||||
living_antags = trim_list(mode.current_players[CURRENT_LIVING_ANTAGS])
|
||||
dead_players = trim_list(mode.current_players[CURRENT_DEAD_PLAYERS])
|
||||
list_observers = trim_list(mode.current_players[CURRENT_OBSERVERS])
|
||||
living_players = trim_list(mode.current_players[CURRENT_LIVING_PLAYERS])
|
||||
living_antags = trim_list(mode.current_players[CURRENT_LIVING_ANTAGS])
|
||||
dead_players = trim_list(mode.current_players[CURRENT_DEAD_PLAYERS])
|
||||
list_observers = trim_list(mode.current_players[CURRENT_OBSERVERS])
|
||||
|
||||
/datum/dynamic_ruleset/midround/proc/trim_list(list/L = list())
|
||||
var/list/trimmed_list = L.Copy()
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
/datum/dynamic_ruleset/roundstart/changeling/execute()
|
||||
var/team_mode = FALSE
|
||||
if(prob(team_mode_probability))
|
||||
if(prob(team_mode_probability))
|
||||
team_mode = TRUE
|
||||
var/list/team_objectives = subtypesof(/datum/objective/changeling_team_objective)
|
||||
var/list/possible_team_objectives = list()
|
||||
@@ -174,14 +174,14 @@
|
||||
/datum/dynamic_ruleset/roundstart/wizard/pre_execute()
|
||||
if(GLOB.wizardstart.len == 0)
|
||||
return FALSE
|
||||
|
||||
|
||||
var/mob/M = pick(candidates)
|
||||
if (M)
|
||||
candidates -= M
|
||||
assigned += M.mind
|
||||
M.mind.assigned_role = ROLE_WIZARD
|
||||
M.mind.special_role = ROLE_WIZARD
|
||||
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/dynamic_ruleset/roundstart/wizard/execute()
|
||||
@@ -189,7 +189,7 @@
|
||||
M.current.forceMove(pick(GLOB.wizardstart))
|
||||
M.add_antag_datum(new antag_datum())
|
||||
return TRUE
|
||||
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// //
|
||||
// BLOOD CULT //
|
||||
@@ -238,7 +238,7 @@
|
||||
var/datum/antagonist/cult/new_cultist = new antag_datum()
|
||||
new_cultist.cult_team = main_cult
|
||||
new_cultist.give_equipment = TRUE
|
||||
M.add_antag_datum(new_cultist)
|
||||
M.add_antag_datum(new_cultist)
|
||||
main_cult.setup_objectives()
|
||||
return TRUE
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
SSshuttle.registerHostileEnvironment(src)
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
/datum/dynamic_ruleset/roundstart/delayed/revs/rule_process()
|
||||
if(check_rev_victory())
|
||||
finished = 1
|
||||
@@ -492,6 +492,7 @@
|
||||
number_players -= 30
|
||||
starter_servants += round(number_players / 10)
|
||||
starter_servants = min(starter_servants, 8)
|
||||
GLOB.clockwork_vitality += 50 * starter_servants //some starter Vitality to help recover from initial fuck ups
|
||||
for (var/i in 1 to starter_servants)
|
||||
var/mob/servant = pick(candidates)
|
||||
candidates -= servant
|
||||
@@ -605,7 +606,7 @@
|
||||
high_population_requirement = 101
|
||||
var/devil_limit = 4 // Hard limit on devils if scaling is turned off
|
||||
|
||||
/datum/dynamic_ruleset/roundstart/devil/pre_execute()
|
||||
/datum/dynamic_ruleset/roundstart/devil/pre_execute()
|
||||
var/tsc = CONFIG_GET(number/traitor_scaling_coeff)
|
||||
var/num_devils = 1
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
var/recommended_enemies = 0
|
||||
var/antag_flag = null //preferences flag such as BE_WIZARD that need to be turned on for players to be antag
|
||||
var/mob/living/living_antag_player = null
|
||||
var/list/datum/game_mode/replacementmode = null
|
||||
var/datum/game_mode/replacementmode = null
|
||||
var/round_converted = 0 //0: round not converted, 1: round going to convert, 2: round converted
|
||||
var/reroll_friendly //During mode conversion only these are in the running
|
||||
var/continuous_sanity_checked //Catches some cases where config options could be used to suggest that modes without antagonists should end when all antagonists die
|
||||
|
||||
@@ -4,7 +4,8 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
|
||||
/datum/objective
|
||||
var/datum/mind/owner //The primary owner of the objective. !!SOMEWHAT DEPRECATED!! Prefer using 'team' for new code.
|
||||
var/datum/team/team //An alternative to 'owner': a team. Use this when writing new code.
|
||||
var/datum/team/team //An alternative to 'owner': a team. Use this when writing new code.
|
||||
var/name = "generic objective" //Name for admin prompts
|
||||
var/explanation_text = "Nothing" //What that person is supposed to do.
|
||||
var/team_explanation_text //For when there are multiple owners.
|
||||
var/datum/mind/target = null //If they are focused on a particular person.
|
||||
@@ -22,6 +23,32 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
if(owner)
|
||||
. += owner
|
||||
|
||||
/datum/objective/proc/admin_edit(mob/admin)
|
||||
return
|
||||
|
||||
//Shared by few objective types
|
||||
/datum/objective/proc/admin_simple_target_pick(mob/admin)
|
||||
var/list/possible_targets = list("Free objective")
|
||||
var/def_value
|
||||
for(var/datum/mind/possible_target in SSticker.minds)
|
||||
if ((possible_target != src) && ishuman(possible_target.current))
|
||||
possible_targets += possible_target.current
|
||||
|
||||
|
||||
if(target && target.current)
|
||||
def_value = target.current
|
||||
|
||||
var/mob/new_target = input(admin,"Select target:", "Objective target", def_value) as null|anything in possible_targets
|
||||
if (!new_target)
|
||||
return
|
||||
|
||||
if (new_target == "Free objective")
|
||||
target = null
|
||||
else
|
||||
target = new_target.mind
|
||||
|
||||
update_explanation_text()
|
||||
|
||||
/datum/objective/proc/considered_escaped(datum/mind/M)
|
||||
if(!considered_alive(M))
|
||||
return FALSE
|
||||
@@ -42,7 +69,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
/datum/objective/proc/is_unique_objective(possible_target)
|
||||
var/list/datum/mind/owners = get_owners()
|
||||
for(var/datum/mind/M in owners)
|
||||
for(var/datum/objective/O in M.objectives)
|
||||
for(var/datum/objective/O in M.get_all_objectives()) //This scope is debatable, probably should be passed in by caller.
|
||||
if(istype(O, type) && O.get_target() == possible_target)
|
||||
return FALSE
|
||||
return TRUE
|
||||
@@ -122,6 +149,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
H.equip_in_one_of_slots(O, slots)
|
||||
|
||||
/datum/objective/assassinate
|
||||
name = "assasinate"
|
||||
var/target_role_type=0
|
||||
martyr_compatible = 1
|
||||
|
||||
@@ -141,6 +169,9 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
|
||||
/datum/objective/assassinate/admin_edit(mob/admin)
|
||||
admin_simple_target_pick(admin)
|
||||
|
||||
/datum/objective/assassinate/internal
|
||||
var/stolen = 0 //Have we already eliminated this target?
|
||||
|
||||
@@ -150,6 +181,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
explanation_text = "Assassinate [target.name], who was obliterated"
|
||||
|
||||
/datum/objective/mutiny
|
||||
name = "mutiny"
|
||||
var/target_role_type=0
|
||||
martyr_compatible = 1
|
||||
|
||||
@@ -173,6 +205,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
explanation_text = "Free Objective"
|
||||
|
||||
/datum/objective/maroon
|
||||
name = "maroon"
|
||||
var/target_role_type=0
|
||||
martyr_compatible = 1
|
||||
|
||||
@@ -191,7 +224,11 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
|
||||
/datum/objective/maroon/admin_edit(mob/admin)
|
||||
admin_simple_target_pick(admin)
|
||||
|
||||
/datum/objective/debrain
|
||||
name = "debrain"
|
||||
var/target_role_type=0
|
||||
|
||||
/datum/objective/debrain/find_target_by_role(role, role_type=0, invert=0)
|
||||
@@ -222,7 +259,11 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
|
||||
/datum/objective/debrain/admin_edit(mob/admin)
|
||||
admin_simple_target_pick(admin)
|
||||
|
||||
/datum/objective/protect//The opposite of killing a dude.
|
||||
name = "protect"
|
||||
martyr_compatible = 1
|
||||
var/target_role_type = 0
|
||||
var/human_check = TRUE
|
||||
@@ -243,10 +284,15 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
|
||||
/datum/objective/protect/admin_edit(mob/admin)
|
||||
admin_simple_target_pick(admin)
|
||||
|
||||
/datum/objective/protect/nonhuman
|
||||
name = "protect nonhuman"
|
||||
human_check = FALSE
|
||||
|
||||
/datum/objective/hijack
|
||||
name = "hijack"
|
||||
explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody."
|
||||
team_explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody. Leave no team member behind."
|
||||
martyr_compatible = 0 //Technically you won't get both anyway.
|
||||
@@ -261,6 +307,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
return SSshuttle.emergency.is_hijacked()
|
||||
|
||||
/datum/objective/block
|
||||
name = "no organics on shuttle"
|
||||
explanation_text = "Do not allow any organic lifeforms to escape on the shuttle alive."
|
||||
martyr_compatible = 1
|
||||
|
||||
@@ -274,6 +321,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
return TRUE
|
||||
|
||||
/datum/objective/purge
|
||||
name = "no mutants on shuttle"
|
||||
explanation_text = "Ensure no mutant humanoid species are present aboard the escape shuttle."
|
||||
martyr_compatible = 1
|
||||
|
||||
@@ -288,6 +336,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
return TRUE
|
||||
|
||||
/datum/objective/robot_army
|
||||
name = "robot army"
|
||||
explanation_text = "Have at least eight active cyborgs synced to you."
|
||||
martyr_compatible = 0
|
||||
|
||||
@@ -304,6 +353,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
return counter >= 8
|
||||
|
||||
/datum/objective/escape
|
||||
name = "escape"
|
||||
explanation_text = "Escape on the shuttle or an escape pod alive and without being in custody."
|
||||
team_explanation_text = "Have all members of your team escape on a shuttle or pod alive, without being in custody."
|
||||
|
||||
@@ -316,6 +366,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
return TRUE
|
||||
|
||||
/datum/objective/escape/escape_with_identity
|
||||
name = "escape with identity"
|
||||
var/target_real_name // Has to be stored because the target's real_name can change over the course of the round
|
||||
var/target_missing_id
|
||||
|
||||
@@ -351,7 +402,11 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/objective/escape/escape_with_identity/admin_edit(mob/admin)
|
||||
admin_simple_target_pick(admin)
|
||||
|
||||
/datum/objective/survive
|
||||
name = "survive"
|
||||
explanation_text = "Stay alive until the end."
|
||||
|
||||
/datum/objective/survive/check_completion()
|
||||
@@ -362,6 +417,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
return TRUE
|
||||
|
||||
/datum/objective/survive/exist //Like survive, but works for silicons and zombies and such.
|
||||
name = "survive nonhuman"
|
||||
|
||||
/datum/objective/survive/exist/check_completion()
|
||||
var/list/datum/mind/owners = get_owners()
|
||||
@@ -371,6 +427,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
return TRUE
|
||||
|
||||
/datum/objective/martyr
|
||||
name = "martyr"
|
||||
explanation_text = "Die a glorious death."
|
||||
|
||||
/datum/objective/martyr/check_completion()
|
||||
@@ -383,6 +440,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
return TRUE
|
||||
|
||||
/datum/objective/nuclear
|
||||
name = "nuclear"
|
||||
explanation_text = "Destroy the station with a nuclear device."
|
||||
martyr_compatible = 1
|
||||
|
||||
@@ -393,6 +451,7 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
|
||||
GLOBAL_LIST_EMPTY(possible_items)
|
||||
/datum/objective/steal
|
||||
name = "steal"
|
||||
var/datum/objective_item/targetinfo = null //Save the chosen item datum so we can access it later.
|
||||
var/obj/item/steal_target = null //Needed for custom objectives (they're just items, not datums).
|
||||
martyr_compatible = 0
|
||||
@@ -430,18 +489,19 @@ GLOBAL_LIST_EMPTY(possible_items)
|
||||
explanation_text = "Free objective"
|
||||
return
|
||||
|
||||
/datum/objective/steal/proc/select_target() //For admins setting objectives manually.
|
||||
/datum/objective/steal/admin_edit(mob/admin)
|
||||
var/list/possible_items_all = GLOB.possible_items+"custom"
|
||||
var/new_target = input("Select target:", "Objective target", steal_target) as null|anything in possible_items_all
|
||||
var/new_target = input(admin,"Select target:", "Objective target", steal_target) as null|anything in possible_items_all
|
||||
if (!new_target)
|
||||
return
|
||||
|
||||
if (new_target == "custom") //Can set custom items.
|
||||
var/obj/item/custom_target = input("Select type:","Type") as null|anything in typesof(/obj/item)
|
||||
if (!custom_target)
|
||||
var/custom_path = input(admin,"Search for target item type:","Type") as null|text
|
||||
if (!custom_path)
|
||||
return
|
||||
var/obj/item/custom_target = pick_closest_path(custom_path, make_types_fancy(subtypesof(/obj/item)))
|
||||
var/custom_name = initial(custom_target.name)
|
||||
custom_name = stripped_input("Enter target name:", "Objective target", custom_name)
|
||||
custom_name = stripped_input(admin,"Enter target name:", "Objective target", custom_name)
|
||||
if (!custom_name)
|
||||
return
|
||||
steal_target = custom_target
|
||||
@@ -449,7 +509,6 @@ GLOBAL_LIST_EMPTY(possible_items)
|
||||
|
||||
else
|
||||
set_target(new_target)
|
||||
return steal_target
|
||||
|
||||
/datum/objective/steal/check_completion()
|
||||
var/list/datum/mind/owners = get_owners()
|
||||
@@ -476,6 +535,7 @@ GLOBAL_LIST_EMPTY(possible_items)
|
||||
|
||||
GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
/datum/objective/steal/special //ninjas are so special they get their own subtype good for them
|
||||
name = "steal special"
|
||||
|
||||
/datum/objective/steal/special/New()
|
||||
..()
|
||||
@@ -487,8 +547,12 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
return set_target(pick(GLOB.possible_items_special))
|
||||
|
||||
/datum/objective/steal/exchange
|
||||
name = "exchange"
|
||||
martyr_compatible = 0
|
||||
|
||||
/datum/objective/steal/exchange/admin_edit(mob/admin)
|
||||
return
|
||||
|
||||
/datum/objective/steal/exchange/proc/set_faction(faction,otheragent)
|
||||
target = otheragent
|
||||
if(faction == "red")
|
||||
@@ -508,6 +572,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
|
||||
|
||||
/datum/objective/steal/exchange/backstab
|
||||
name = "prevent exchange"
|
||||
|
||||
/datum/objective/steal/exchange/backstab/set_faction(faction)
|
||||
if(faction == "red")
|
||||
@@ -519,12 +584,17 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
|
||||
|
||||
/datum/objective/download
|
||||
name = "download"
|
||||
|
||||
/datum/objective/download/proc/gen_amount_goal()
|
||||
target_amount = rand(20,40)
|
||||
explanation_text = "Download [target_amount] research node\s."
|
||||
update_explanation_text()
|
||||
return target_amount
|
||||
|
||||
/datum/objective/download/update_explanation_text()
|
||||
..()
|
||||
explanation_text = "Download [target_amount] research node\s."
|
||||
|
||||
/datum/objective/download/check_completion()
|
||||
var/datum/techweb/checking = new
|
||||
var/list/datum/mind/owners = get_owners()
|
||||
@@ -541,13 +611,24 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
TD.stored_research.copy_research_to(checking)
|
||||
return checking.researched_nodes.len >= target_amount
|
||||
|
||||
/datum/objective/download/admin_edit(mob/admin)
|
||||
var/count = input(admin,"How many nodes ?","Nodes",target_amount) as num|null
|
||||
if(count)
|
||||
target_amount = count
|
||||
update_explanation_text()
|
||||
|
||||
/datum/objective/capture
|
||||
name = "capture"
|
||||
var/captured_amount = 0
|
||||
|
||||
/datum/objective/capture/proc/gen_amount_goal()
|
||||
target_amount = rand(5,10)
|
||||
explanation_text = "Capture [target_amount] lifeform\s with an energy net. Live, rare specimens are worth more."
|
||||
return target_amount
|
||||
target_amount = rand(5,10)
|
||||
explanation_text = "Capture [target_amount] lifeform\s with an energy net. Live, rare specimens are worth more."
|
||||
return target_amount
|
||||
|
||||
/datum/objective/capture/update_explanation_text()
|
||||
. = ..()
|
||||
explanation_text = "Capture [target_amount] lifeform\s with an energy net. Live, rare specimens are worth more."
|
||||
|
||||
/datum/objective/capture/check_completion()//Basically runs through all the mobs in the area to determine how much they are worth.
|
||||
/*var/area/centcom/holding/A = GLOB.areas_by_type[/area/centcom/holding]
|
||||
@@ -576,10 +657,16 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
captured_amount+=2*/ //Removed in favour of adding points on capture, in energy_net_nets.dm
|
||||
return captured_amount >= target_amount
|
||||
|
||||
/datum/objective/capture/admin_edit(mob/admin)
|
||||
var/count = input(admin,"How many mobs to capture ?","capture",target_amount) as num|null
|
||||
if(count)
|
||||
target_amount = count
|
||||
update_explanation_text()
|
||||
|
||||
//Changeling Objectives
|
||||
|
||||
/datum/objective/absorb
|
||||
name = "absorb"
|
||||
|
||||
/datum/objective/absorb/proc/gen_amount_goal(lowbound = 4, highbound = 6)
|
||||
target_amount = rand (lowbound,highbound)
|
||||
@@ -595,9 +682,19 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
n_p ++
|
||||
target_amount = min(target_amount, n_p)
|
||||
|
||||
explanation_text = "Extract [target_amount] compatible genome\s."
|
||||
update_explanation_text()
|
||||
return target_amount
|
||||
|
||||
/datum/objective/absorb/update_explanation_text()
|
||||
. = ..()
|
||||
explanation_text = "Extract [target_amount] compatible genome\s."
|
||||
|
||||
/datum/objective/absorb/admin_edit(mob/admin)
|
||||
var/count = input(admin,"How many people to absorb?","absorb",target_amount) as num|null
|
||||
if(count)
|
||||
target_amount = count
|
||||
update_explanation_text()
|
||||
|
||||
/datum/objective/absorb/check_completion()
|
||||
var/list/datum/mind/owners = get_owners()
|
||||
var/absorbedcount = 0
|
||||
@@ -611,6 +708,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
return absorbedcount >= target_amount
|
||||
|
||||
/datum/objective/absorb_most
|
||||
name = "absorb most"
|
||||
explanation_text = "Extract more compatible genomes than any other Changeling."
|
||||
|
||||
/datum/objective/absorb_most/check_completion()
|
||||
@@ -631,6 +729,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
return TRUE
|
||||
|
||||
/datum/objective/absorb_changeling
|
||||
name = "absorb changeling"
|
||||
explanation_text = "Absorb another Changeling."
|
||||
|
||||
/datum/objective/absorb_changeling/check_completion()
|
||||
@@ -653,6 +752,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
//End Changeling Objectives
|
||||
|
||||
/datum/objective/destroy
|
||||
name = "destroy AI"
|
||||
martyr_compatible = 1
|
||||
|
||||
/datum/objective/destroy/find_target()
|
||||
@@ -674,10 +774,20 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
else
|
||||
explanation_text = "Free Objective"
|
||||
|
||||
/datum/objective/destroy/admin_edit(mob/admin)
|
||||
var/list/possible_targets = active_ais(1)
|
||||
if(possible_targets.len)
|
||||
var/mob/new_target = input(admin,"Select target:", "Objective target") as null|anything in possible_targets
|
||||
target = new_target.mind
|
||||
else
|
||||
to_chat(admin, "No active AIs with minds")
|
||||
update_explanation_text()
|
||||
|
||||
/datum/objective/destroy/internal
|
||||
var/stolen = FALSE //Have we already eliminated this target?
|
||||
|
||||
/datum/objective/steal_five_of_type
|
||||
name = "steal five of"
|
||||
explanation_text = "Steal at least five items!"
|
||||
var/list/wanted_items = list(/obj/item)
|
||||
|
||||
@@ -686,10 +796,12 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
wanted_items = typecacheof(wanted_items)
|
||||
|
||||
/datum/objective/steal_five_of_type/summon_guns
|
||||
name = "steal guns"
|
||||
explanation_text = "Steal at least five guns!"
|
||||
wanted_items = list(/obj/item/gun)
|
||||
|
||||
/datum/objective/steal_five_of_type/summon_magic
|
||||
name = "steal magic"
|
||||
explanation_text = "Steal at least five magical artefacts!"
|
||||
wanted_items = list(/obj/item/spellbook, /obj/item/gun/magic, /obj/item/clothing/suit/space/hardsuit/wizard, /obj/item/scrying, /obj/item/antag_spawner/contract, /obj/item/necromantic_stone)
|
||||
|
||||
@@ -705,6 +817,14 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
stolen_count++
|
||||
return stolen_count >= 5
|
||||
|
||||
//Created by admin tools
|
||||
/datum/objective/custom
|
||||
name = "custom"
|
||||
|
||||
/datum/objective/custom/admin_edit(mob/admin)
|
||||
var/expl = stripped_input(admin, "Custom objective:", "Objective", explanation_text)
|
||||
if(expl)
|
||||
explanation_text = expl
|
||||
|
||||
////////////////////////////////
|
||||
// Changeling team objectives //
|
||||
|
||||
@@ -25,14 +25,14 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
||||
var/canisterinfo = null
|
||||
var/hsbinfo = null
|
||||
//items that shouldn't spawn on the floor because they would bug or act weird
|
||||
var/global/list/spawn_forbidden = list(
|
||||
var/static/list/spawn_forbidden = list(
|
||||
/obj/item/tk_grab, /obj/item/implant, // not implanter, the actual thing that is inside you
|
||||
/obj/item/assembly, /obj/item/onetankbomb, /obj/item/pda/ai,
|
||||
/obj/item/smallDelivery, /obj/item/projectile,
|
||||
/obj/item/borg/sight, /obj/item/borg/stun, /obj/item/robot_module)
|
||||
|
||||
/datum/hSB/proc/update()
|
||||
var/global/list/hrefs = list(
|
||||
var/static/list/hrefs = list(
|
||||
"Space Gear",
|
||||
"Suit Up (Space Travel Gear)" = "hsbsuit",
|
||||
"Spawn Gas Mask" = "hsbspawn&path=[/obj/item/clothing/mask/gas]",
|
||||
|
||||
@@ -113,11 +113,6 @@ Class Procs:
|
||||
var/atom/movable/occupant = null
|
||||
var/speed_process = FALSE // Process as fast as possible?
|
||||
var/obj/item/circuitboard/circuit // Circuit to be created and inserted when the machinery is created
|
||||
var/obj/item/card/id/inserted_scan_id
|
||||
var/obj/item/card/id/inserted_modify_id
|
||||
var/list/region_access = null // For the identification console (card.dm)
|
||||
var/list/head_subordinates = null // For the identification console (card.dm)
|
||||
var/authenticated = 0 // For the identification console (card.dm)
|
||||
|
||||
var/interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_SET_MACHINE
|
||||
|
||||
@@ -459,22 +454,20 @@ Class Procs:
|
||||
/obj/machinery/examine(mob/user)
|
||||
. = ..()
|
||||
if(stat & BROKEN)
|
||||
. += "<span class='notice'>It looks broken and non-functional.</span>"
|
||||
to_chat(user, "<span class='notice'>It looks broken and non-functional.</span>")
|
||||
if(!(resistance_flags & INDESTRUCTIBLE))
|
||||
if(resistance_flags & ON_FIRE)
|
||||
. += "<span class='warning'>It's on fire!</span>"
|
||||
to_chat(user, "<span class='warning'>It's on fire!</span>")
|
||||
var/healthpercent = (obj_integrity/max_integrity) * 100
|
||||
switch(healthpercent)
|
||||
if(50 to 99)
|
||||
. += "It looks slightly damaged."
|
||||
to_chat(user, "It looks slightly damaged.")
|
||||
if(25 to 50)
|
||||
. += "It appears heavily damaged."
|
||||
to_chat(user, "It appears heavily damaged.")
|
||||
if(0 to 25)
|
||||
. += "<span class='warning'>It's falling apart!</span>"
|
||||
to_chat(user, "<span class='warning'>It's falling apart!</span>")
|
||||
if(user.research_scanner && component_parts)
|
||||
. += display_parts(user, TRUE)
|
||||
if(inserted_scan_id || inserted_modify_id)
|
||||
. += "<span class='notice'>Alt-click to eject the ID card.</span>"
|
||||
to_chat(user, display_parts(user, TRUE))
|
||||
|
||||
//called on machinery construction (i.e from frame to machinery) but not on initialization
|
||||
/obj/machinery/proc/on_construction()
|
||||
@@ -509,73 +502,3 @@ Class Procs:
|
||||
. = . % 9
|
||||
AM.pixel_x = -8 + ((.%3)*8)
|
||||
AM.pixel_y = -8 + (round( . / 3)*8)
|
||||
|
||||
/obj/machinery/proc/id_insert_scan(mob/user, obj/item/card/id/I)
|
||||
I = user.get_active_held_item()
|
||||
if(istype(I))
|
||||
if(inserted_scan_id)
|
||||
to_chat(user, "<span class='warning'>There's already an ID card in the console!</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
inserted_scan_id = I
|
||||
user.visible_message("<span class='notice'>[user] inserts an ID card into the console.</span>", \
|
||||
"<span class='notice'>You insert the ID card into the console.</span>")
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/proc/id_eject_scan(mob/user)
|
||||
if(!inserted_scan_id)
|
||||
to_chat(user, "<span class='warning'>There's no ID card in the console!</span>")
|
||||
return
|
||||
if(inserted_scan_id)
|
||||
inserted_scan_id.forceMove(drop_location())
|
||||
if(!issilicon(user) && Adjacent(user))
|
||||
user.put_in_hands(inserted_scan_id)
|
||||
inserted_scan_id = null
|
||||
user.visible_message("<span class='notice'>[user] gets an ID card from the console.</span>", \
|
||||
"<span class='notice'>You get the ID card from the console.</span>")
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/proc/id_eject_modify(mob/user)
|
||||
if(inserted_modify_id)
|
||||
GLOB.data_core.manifest_modify(inserted_modify_id.registered_name, inserted_modify_id.assignment)
|
||||
inserted_modify_id.update_label()
|
||||
inserted_modify_id.forceMove(drop_location())
|
||||
if(!issilicon(user) && Adjacent(user))
|
||||
user.put_in_hands(inserted_modify_id)
|
||||
user.visible_message("<span class='notice'>[user] gets an ID card from the console.</span>", \
|
||||
"<span class='notice'>You get the ID card from the console.</span>")
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
|
||||
inserted_modify_id = null
|
||||
region_access = null
|
||||
head_subordinates = null
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/proc/id_insert_modify(mob/user)
|
||||
var/obj/item/card/id/I = user.get_active_held_item()
|
||||
if(istype(I))
|
||||
if(inserted_modify_id)
|
||||
to_chat(user, "<span class='warning'>There's already an ID card in the console!</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
inserted_modify_id = I
|
||||
user.visible_message("<span class='notice'>[user] inserts an ID card into the console.</span>", \
|
||||
"<span class='notice'>You insert the ID card into the console.</span>")
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, !issilicon(user)) || !is_operational())
|
||||
return
|
||||
if(inserted_modify_id)
|
||||
id_eject_modify(user)
|
||||
authenticated = FALSE
|
||||
return
|
||||
if(inserted_scan_id)
|
||||
id_eject_scan(user)
|
||||
authenticated = FALSE
|
||||
return
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
to_chat(user, "<span class='notice'>Alt-click to eject the limb.</span>")
|
||||
|
||||
/obj/machinery/aug_manipulator/Initialize()
|
||||
initial_icon_state = initial(icon_state)
|
||||
return ..()
|
||||
initial_icon_state = initial(icon_state)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/aug_manipulator/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
matching_designs.Cut()
|
||||
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = stored_research.researched_designs[v]
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(findtext(D.name,href_list["to_search"]))
|
||||
matching_designs.Add(D)
|
||||
updateUsrDialog()
|
||||
@@ -252,7 +252,7 @@
|
||||
dat += materials_printout()
|
||||
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = stored_research.researched_designs[v]
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(!(selected_category in D.category))
|
||||
continue
|
||||
|
||||
@@ -366,7 +366,7 @@
|
||||
/obj/machinery/autolathe/proc/adjust_hacked(state)
|
||||
hacked = state
|
||||
for(var/id in SSresearch.techweb_designs)
|
||||
var/datum/design/D = SSresearch.techweb_designs[id]
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(id)
|
||||
if((D.build_type & AUTOLATHE) && ("hacked" in D.category))
|
||||
if(hacked)
|
||||
stored_research.add_design(D)
|
||||
|
||||
@@ -354,7 +354,8 @@
|
||||
O.organ_flags &= ~ORGAN_FROZEN
|
||||
unattached_flesh.Cut()
|
||||
mess = FALSE
|
||||
new /obj/effect/gibspawner/generic(get_turf(src))
|
||||
if(mob_occupant)
|
||||
mob_occupant.spawn_gibs()
|
||||
audible_message("<span class='italics'>You hear a splat.</span>")
|
||||
update_icon()
|
||||
return
|
||||
@@ -474,8 +475,6 @@
|
||||
|
||||
flesh_number = unattached_flesh.len
|
||||
|
||||
#define CRYOMOBS 'icons/obj/cryo_mobs.dmi'
|
||||
|
||||
/obj/machinery/clonepod/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
/obj/machinery/computer/operating/proc/sync_surgeries()
|
||||
for(var/i in linked_techweb.researched_designs)
|
||||
var/datum/design/surgery/D = linked_techweb.researched_designs[i]
|
||||
var/datum/design/surgery/D = SSresearch.techweb_design_by_id(i)
|
||||
if(!istype(D))
|
||||
continue
|
||||
advanced_surgeries |= D.surgery
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
var/icon_keyboard = "generic_key"
|
||||
var/icon_screen = "generic"
|
||||
var/clockwork = FALSE
|
||||
var/authenticated = FALSE
|
||||
|
||||
/obj/machinery/computer/Initialize(mapload, obj/item/circuitboard/C)
|
||||
. = ..()
|
||||
|
||||
@@ -11,8 +11,6 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
icon_keyboard = "id_key"
|
||||
req_one_access = list(ACCESS_HEADS, ACCESS_CHANGE_IDS)
|
||||
circuit = /obj/item/circuitboard/computer/card
|
||||
var/obj/item/card/id/scan = null
|
||||
var/obj/item/card/id/modify = null
|
||||
var/mode = 0
|
||||
var/printing = null
|
||||
var/target_dept = 0 //Which department this computer has access to. 0=all departments
|
||||
@@ -38,68 +36,68 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
|
||||
//This is used to keep track of opened positions for jobs to allow instant closing
|
||||
//Assoc array: "JobName" = (int)<Opened Positions>
|
||||
var/list/opened_positions = list();
|
||||
var/list/opened_positions = list()
|
||||
var/obj/item/card/id/inserted_scan_id
|
||||
var/obj/item/card/id/inserted_modify_id
|
||||
var/list/region_access = null
|
||||
var/list/head_subordinates = null
|
||||
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/machinery/computer/card/examine(mob/user)
|
||||
..()
|
||||
if(scan || modify)
|
||||
if(inserted_scan_id || inserted_modify_id)
|
||||
to_chat(user, "<span class='notice'>Alt-click to eject the ID card.</span>")
|
||||
|
||||
/obj/machinery/computer/card/Initialize()
|
||||
. = ..()
|
||||
change_position_cooldown = CONFIG_GET(number/id_console_jobslot_delay)
|
||||
|
||||
/obj/machinery/computer/card/attackby(obj/O, mob/user, params)//TODO:SANITY
|
||||
if(istype(O, /obj/item/card/id))
|
||||
var/obj/item/card/id/idcard = O
|
||||
if(check_access(idcard))
|
||||
if(!scan)
|
||||
if (!user.transferItemToLoc(idcard,src))
|
||||
return
|
||||
scan = idcard
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
|
||||
else if(!modify)
|
||||
if (!user.transferItemToLoc(idcard,src))
|
||||
return
|
||||
modify = idcard
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
|
||||
/obj/machinery/computer/card/examine(mob/user)
|
||||
. = ..()
|
||||
if(inserted_scan_id || inserted_modify_id)
|
||||
to_chat(user, "<span class='notice'>Alt-click to eject the ID card.</span>")
|
||||
|
||||
/obj/machinery/computer/card/attackby(obj/I, mob/user, params)
|
||||
if(istype(I, /obj/item/card/id))
|
||||
if(!inserted_scan_id)
|
||||
if(id_insert(user, I, inserted_scan_id))
|
||||
inserted_scan_id = I
|
||||
return
|
||||
if(!inserted_modify_id)
|
||||
if(id_insert(user, I, inserted_modify_id))
|
||||
inserted_modify_id = I
|
||||
return
|
||||
else
|
||||
if(!modify)
|
||||
if (!user.transferItemToLoc(idcard,src))
|
||||
return
|
||||
modify = idcard
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
|
||||
updateUsrDialog()
|
||||
to_chat(user, "<span class='warning'>There's already an ID card in the console!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/card/Destroy()
|
||||
if(scan)
|
||||
qdel(scan)
|
||||
scan = null
|
||||
if(modify)
|
||||
qdel(modify)
|
||||
modify = null
|
||||
if(inserted_scan_id)
|
||||
qdel(inserted_scan_id)
|
||||
inserted_scan_id = null
|
||||
if(inserted_modify_id)
|
||||
qdel(inserted_modify_id)
|
||||
inserted_modify_id = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/card/handle_atom_del(atom/A)
|
||||
..()
|
||||
if(A == scan)
|
||||
scan = null
|
||||
if(A == inserted_scan_id)
|
||||
inserted_scan_id = null
|
||||
updateUsrDialog()
|
||||
if(A == modify)
|
||||
modify = null
|
||||
if(A == inserted_modify_id)
|
||||
inserted_modify_id = null
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/card/on_deconstruction()
|
||||
if(scan)
|
||||
scan.forceMove(drop_location())
|
||||
scan = null
|
||||
if(modify)
|
||||
modify.forceMove(drop_location())
|
||||
modify = null
|
||||
if(inserted_scan_id)
|
||||
inserted_scan_id.forceMove(drop_location())
|
||||
inserted_scan_id = null
|
||||
if(inserted_modify_id)
|
||||
inserted_modify_id.forceMove(drop_location())
|
||||
inserted_modify_id = null
|
||||
|
||||
//Check if you can't open a new position for a certain job
|
||||
/obj/machinery/computer/card/proc/job_blacklisted(jobtitle)
|
||||
@@ -130,9 +128,50 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
return -1
|
||||
return 0
|
||||
|
||||
/obj/machinery/computer/card/proc/id_insert(mob/user, obj/item/card/id/I, target)
|
||||
if(istype(I))
|
||||
if(target)
|
||||
to_chat(user, "<span class='warning'>There's already an ID card in the console!</span>")
|
||||
return FALSE
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return FALSE
|
||||
user.visible_message("<span class='notice'>[user] inserts an ID card into the console.</span>", \
|
||||
"<span class='notice'>You insert the ID card into the console.</span>")
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
|
||||
updateUsrDialog()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/card/proc/id_eject(mob/user, obj/target)
|
||||
if(!target)
|
||||
to_chat(user, "<span class='warning'>There's no ID card in the console!</span>")
|
||||
return FALSE
|
||||
else
|
||||
target.forceMove(drop_location())
|
||||
if(!issilicon(user) && Adjacent(user))
|
||||
user.put_in_hands(target)
|
||||
user.visible_message("<span class='notice'>[user] gets an ID card from the console.</span>", \
|
||||
"<span class='notice'>You get the ID card from the console.</span>")
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
|
||||
updateUsrDialog()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/card/AltClick(mob/user)
|
||||
..()
|
||||
if(!user.canUseTopic(src, !issilicon(user)) || !is_operational())
|
||||
return
|
||||
if(inserted_modify_id)
|
||||
if(id_eject(user, inserted_modify_id))
|
||||
inserted_modify_id = null
|
||||
authenticated = FALSE
|
||||
return
|
||||
if(inserted_scan_id)
|
||||
if(id_eject(user, inserted_scan_id))
|
||||
inserted_scan_id = null
|
||||
authenticated = FALSE
|
||||
return
|
||||
|
||||
/obj/machinery/computer/card/ui_interact(mob/user)
|
||||
. = ..()
|
||||
|
||||
var/dat
|
||||
if(!SSticker)
|
||||
return
|
||||
@@ -147,15 +186,15 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
dat = "<a href='?src=[REF(src)];choice=return'>Return</a>"
|
||||
dat += " || Confirm Identity: "
|
||||
var/S
|
||||
if(scan)
|
||||
S = html_encode(scan.name)
|
||||
if(inserted_scan_id)
|
||||
S = html_encode(inserted_scan_id.name)
|
||||
else
|
||||
S = "--------"
|
||||
dat += "<a href='?src=[REF(src)];choice=scan'>[S]</a>"
|
||||
dat += "<a href='?src=[REF(src)];choice=inserted_scan_id'>[S]</a>"
|
||||
dat += "<table>"
|
||||
dat += "<tr><td style='width:25%'><b>Job</b></td><td style='width:25%'><b>Slots</b></td><td style='width:25%'><b>Open job</b></td><td style='width:25%'><b>Close job</b><td style='width:25%'><b>Prioritize</b></td></td></tr>"
|
||||
var/ID
|
||||
if(scan && (ACCESS_CHANGE_IDS in scan.access) && !target_dept)
|
||||
if(inserted_scan_id && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
|
||||
ID = 1
|
||||
else
|
||||
ID = 0
|
||||
@@ -221,33 +260,33 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
var/target_name
|
||||
var/target_owner
|
||||
var/target_rank
|
||||
if(modify)
|
||||
target_name = html_encode(modify.name)
|
||||
if(inserted_modify_id)
|
||||
target_name = html_encode(inserted_modify_id.name)
|
||||
else
|
||||
target_name = "--------"
|
||||
if(modify && modify.registered_name)
|
||||
target_owner = html_encode(modify.registered_name)
|
||||
if(inserted_modify_id && inserted_modify_id.registered_name)
|
||||
target_owner = html_encode(inserted_modify_id.registered_name)
|
||||
else
|
||||
target_owner = "--------"
|
||||
if(modify && modify.assignment)
|
||||
target_rank = html_encode(modify.assignment)
|
||||
if(inserted_modify_id && inserted_modify_id.assignment)
|
||||
target_rank = html_encode(inserted_modify_id.assignment)
|
||||
else
|
||||
target_rank = "Unassigned"
|
||||
|
||||
var/scan_name
|
||||
if(scan)
|
||||
scan_name = html_encode(scan.name)
|
||||
if(inserted_scan_id)
|
||||
scan_name = html_encode(inserted_scan_id.name)
|
||||
else
|
||||
scan_name = "--------"
|
||||
|
||||
if(!authenticated)
|
||||
header += "<br><i>Please insert the cards into the slots</i><br>"
|
||||
header += "Target: <a href='?src=[REF(src)];choice=modify'>[target_name]</a><br>"
|
||||
header += "Confirm Identity: <a href='?src=[REF(src)];choice=scan'>[scan_name]</a><br>"
|
||||
header += "Target: <a href='?src=[REF(src)];choice=inserted_modify_id'>[target_name]</a><br>"
|
||||
header += "Confirm Identity: <a href='?src=[REF(src)];choice=inserted_scan_id'>[scan_name]</a><br>"
|
||||
else
|
||||
header += "<div align='center'><br>"
|
||||
header += "<a href='?src=[REF(src)];choice=modify'>Remove [target_name]</a> || "
|
||||
header += "<a href='?src=[REF(src)];choice=scan'>Remove [scan_name]</a> <br> "
|
||||
header += "<a href='?src=[REF(src)];choice=inserted_modify_id'>Remove [target_name]</a> || "
|
||||
header += "<a href='?src=[REF(src)];choice=inserted_scan_id'>Remove [scan_name]</a> <br> "
|
||||
header += "<a href='?src=[REF(src)];choice=mode;mode_target=1'>Access Crew Manifest</a> <br> "
|
||||
header += "<a href='?src=[REF(src)];choice=logout'>Log Out</a></div>"
|
||||
|
||||
@@ -262,7 +301,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
|
||||
var/body
|
||||
|
||||
if (authenticated && modify)
|
||||
if (authenticated && inserted_modify_id)
|
||||
|
||||
var/carddesc = text("")
|
||||
var/jobs = text("")
|
||||
@@ -303,7 +342,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
if(istype(src, /obj/machinery/computer/card/centcom))
|
||||
accesses += "<h5>Central Command:</h5>"
|
||||
for(var/A in get_all_centcom_access())
|
||||
if(A in modify.access)
|
||||
if(A in inserted_modify_id.access)
|
||||
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=0'><font color=\"red\">[replacetext(get_centcom_access_desc(A), " ", " ")]</font></a> "
|
||||
else
|
||||
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=1'>[replacetext(get_centcom_access_desc(A), " ", " ")]</a> "
|
||||
@@ -321,7 +360,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
continue
|
||||
accesses += "<td style='width:14%' valign='top'>"
|
||||
for(var/A in get_region_accesses(i))
|
||||
if(A in modify.access)
|
||||
if(A in inserted_modify_id.access)
|
||||
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=0'><font color=\"red\">[replacetext(get_access_desc(A), " ", " ")]</font></a> "
|
||||
else
|
||||
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=1'>[replacetext(get_access_desc(A), " ", " ")]</a> "
|
||||
@@ -353,52 +392,66 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
|
||||
usr.set_machine(src)
|
||||
switch(href_list["choice"])
|
||||
if ("modify")
|
||||
eject_id_modify(usr)
|
||||
if ("scan")
|
||||
eject_id_scan(usr)
|
||||
if ("inserted_modify_id")
|
||||
if (inserted_modify_id)
|
||||
if(id_eject(usr, inserted_modify_id))
|
||||
inserted_modify_id = null
|
||||
else
|
||||
var/mob/M = usr
|
||||
var/obj/item/card/id/I = M.get_idcard(TRUE)
|
||||
if(id_insert(usr, I, inserted_modify_id))
|
||||
inserted_modify_id = I
|
||||
if ("inserted_scan_id")
|
||||
if (inserted_scan_id)
|
||||
if(id_eject(usr, inserted_scan_id))
|
||||
inserted_scan_id = null
|
||||
else
|
||||
var/mob/M = usr
|
||||
var/obj/item/card/id/I = M.get_idcard(TRUE)
|
||||
if(id_insert(usr, I, inserted_scan_id))
|
||||
inserted_scan_id = I
|
||||
if ("auth")
|
||||
if ((!( authenticated ) && (scan || issilicon(usr)) && (modify || mode)))
|
||||
if (check_access(scan))
|
||||
if ((!( authenticated ) && (inserted_scan_id || issilicon(usr)) && (inserted_modify_id || mode)))
|
||||
if (check_access(inserted_scan_id))
|
||||
region_access = list()
|
||||
head_subordinates = list()
|
||||
if(ACCESS_CHANGE_IDS in scan.access)
|
||||
if(ACCESS_CHANGE_IDS in inserted_scan_id.access)
|
||||
if(target_dept)
|
||||
head_subordinates = get_all_jobs()
|
||||
region_access |= target_dept
|
||||
authenticated = 1
|
||||
else
|
||||
authenticated = 2
|
||||
playsound(src, 'sound/machines/terminal_on.ogg', 50, 0)
|
||||
playsound(src, 'sound/machines/terminal_on.ogg', 50, FALSE)
|
||||
|
||||
else
|
||||
if((ACCESS_HOP in scan.access) && ((target_dept==1) || !target_dept))
|
||||
if((ACCESS_HOP in inserted_scan_id.access) && ((target_dept==1) || !target_dept))
|
||||
region_access |= 1
|
||||
get_subordinates("Head of Personnel")
|
||||
if((ACCESS_HOS in scan.access) && ((target_dept==2) || !target_dept))
|
||||
if((ACCESS_HOS in inserted_scan_id.access) && ((target_dept==2) || !target_dept))
|
||||
region_access |= 2
|
||||
get_subordinates("Head of Security")
|
||||
if((ACCESS_CMO in scan.access) && ((target_dept==3) || !target_dept))
|
||||
if((ACCESS_CMO in inserted_scan_id.access) && ((target_dept==3) || !target_dept))
|
||||
region_access |= 3
|
||||
get_subordinates("Chief Medical Officer")
|
||||
if((ACCESS_RD in scan.access) && ((target_dept==4) || !target_dept))
|
||||
if((ACCESS_RD in inserted_scan_id.access) && ((target_dept==4) || !target_dept))
|
||||
region_access |= 4
|
||||
get_subordinates("Research Director")
|
||||
if((ACCESS_CE in scan.access) && ((target_dept==5) || !target_dept))
|
||||
if((ACCESS_CE in inserted_scan_id.access) && ((target_dept==5) || !target_dept))
|
||||
region_access |= 5
|
||||
get_subordinates("Chief Engineer")
|
||||
if((ACCESS_QM in scan.access) && ((target_dept==6) || !target_dept))
|
||||
if((ACCESS_QM in inserted_scan_id.access) && ((target_dept==6) || !target_dept))
|
||||
region_access |= 6
|
||||
get_subordinates("Quartermaster")
|
||||
if(region_access)
|
||||
authenticated = 1
|
||||
else if ((!( authenticated ) && issilicon(usr)) && (!modify))
|
||||
else if ((!( authenticated ) && issilicon(usr)) && (!inserted_modify_id))
|
||||
to_chat(usr, "<span class='warning'>You can't modify an ID without an ID inserted to modify! Once one is in the modify slot on the computer, you can log in.</span>")
|
||||
if ("logout")
|
||||
region_access = null
|
||||
head_subordinates = null
|
||||
authenticated = 0
|
||||
playsound(src, 'sound/machines/terminal_off.ogg', 50, 0)
|
||||
playsound(src, 'sound/machines/terminal_off.ogg', 50, FALSE)
|
||||
|
||||
if("access")
|
||||
if(href_list["allowed"])
|
||||
@@ -406,20 +459,20 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
var/access_type = text2num(href_list["access_target"])
|
||||
var/access_allowed = text2num(href_list["allowed"])
|
||||
if(access_type in (istype(src, /obj/machinery/computer/card/centcom)?get_all_centcom_access() : get_all_accesses()))
|
||||
modify.access -= access_type
|
||||
inserted_modify_id.access -= access_type
|
||||
if(access_allowed == 1)
|
||||
modify.access += access_type
|
||||
playsound(src, "terminal_type", 50, 0)
|
||||
inserted_modify_id.access += access_type
|
||||
playsound(src, "terminal_type", 50, FALSE)
|
||||
if ("assign")
|
||||
if (authenticated == 2)
|
||||
var/t1 = href_list["assign_target"]
|
||||
if(t1 == "Custom")
|
||||
var/newJob = reject_bad_text(input("Enter a custom job assignment.", "Assignment", modify ? modify.assignment : "Unassigned"), MAX_NAME_LEN)
|
||||
var/newJob = reject_bad_text(input("Enter a custom job assignment.", "Assignment", inserted_modify_id ? inserted_modify_id.assignment : "Unassigned"), MAX_NAME_LEN)
|
||||
if(newJob)
|
||||
t1 = newJob
|
||||
|
||||
else if(t1 == "Unassigned")
|
||||
modify.access -= get_all_accesses()
|
||||
inserted_modify_id.access -= get_all_accesses()
|
||||
|
||||
else
|
||||
var/datum/job/jobdatum
|
||||
@@ -434,24 +487,24 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
modify.access = ( istype(src, /obj/machinery/computer/card/centcom) ? get_centcom_access(t1) : jobdatum.get_access() )
|
||||
if (modify)
|
||||
modify.assignment = t1
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
inserted_modify_id.access = ( istype(src, /obj/machinery/computer/card/centcom) ? get_centcom_access(t1) : jobdatum.get_access() )
|
||||
if (inserted_modify_id)
|
||||
inserted_modify_id.assignment = t1
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
||||
if ("demote")
|
||||
if(modify.assignment in head_subordinates || modify.assignment == "Assistant")
|
||||
modify.assignment = "Unassigned"
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
if(inserted_modify_id.assignment in head_subordinates || inserted_modify_id.assignment == "Assistant")
|
||||
inserted_modify_id.assignment = "Unassigned"
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
||||
else
|
||||
to_chat(usr, "<span class='error'>You are not authorized to demote this position.</span>")
|
||||
if ("reg")
|
||||
if (authenticated)
|
||||
var/t2 = modify
|
||||
if ((authenticated && modify == t2 && (in_range(src, usr) || issilicon(usr)) && isturf(loc)))
|
||||
var/t2 = inserted_modify_id
|
||||
if ((authenticated && inserted_modify_id == t2 && (in_range(src, usr) || issilicon(usr)) && isturf(loc)))
|
||||
var/newName = reject_bad_name(href_list["reg"])
|
||||
if(newName)
|
||||
modify.registered_name = newName
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
inserted_modify_id.registered_name = newName
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
||||
else
|
||||
to_chat(usr, "<span class='error'>Invalid name entered.</span>")
|
||||
updateUsrDialog()
|
||||
@@ -462,11 +515,11 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
if("return")
|
||||
//DISPLAY MAIN MENU
|
||||
mode = 3;
|
||||
playsound(src, "terminal_type", 25, 0)
|
||||
playsound(src, "terminal_type", 25, FALSE)
|
||||
|
||||
if("make_job_available")
|
||||
// MAKE ANOTHER JOB POSITION AVAILABLE FOR LATE JOINERS
|
||||
if(scan && (ACCESS_CHANGE_IDS in scan.access) && !target_dept)
|
||||
if(inserted_scan_id && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
|
||||
var/edit_job_target = href_list["job"]
|
||||
var/datum/job/j = SSjob.GetJob(edit_job_target)
|
||||
if(!j)
|
||||
@@ -479,11 +532,11 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
GLOB.time_last_changed_position = world.time / 10
|
||||
j.total_positions++
|
||||
opened_positions[edit_job_target]++
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
||||
|
||||
if("make_job_unavailable")
|
||||
// MAKE JOB POSITION UNAVAILABLE FOR LATE JOINERS
|
||||
if(scan && (ACCESS_CHANGE_IDS in scan.access) && !target_dept)
|
||||
if(inserted_scan_id && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
|
||||
var/edit_job_target = href_list["job"]
|
||||
var/datum/job/j = SSjob.GetJob(edit_job_target)
|
||||
if(!j)
|
||||
@@ -497,11 +550,11 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
GLOB.time_last_changed_position = world.time / 10
|
||||
j.total_positions--
|
||||
opened_positions[edit_job_target]--
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE)
|
||||
|
||||
if ("prioritize_job")
|
||||
// TOGGLE WHETHER JOB APPEARS AS PRIORITIZED IN THE LOBBY
|
||||
if(scan && (ACCESS_CHANGE_IDS in scan.access) && !target_dept)
|
||||
if(inserted_scan_id && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
|
||||
var/priority_target = href_list["job"]
|
||||
var/datum/job/j = SSjob.GetJob(priority_target)
|
||||
if(!j)
|
||||
@@ -518,7 +571,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
else
|
||||
SSjob.prioritized_jobs += j
|
||||
to_chat(usr, "<span class='notice'>[j.title] has been successfully [priority ? "prioritized" : "unprioritized"]. Potential employees will notice your request.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
||||
|
||||
if ("print")
|
||||
if (!( printing ))
|
||||
@@ -531,59 +584,9 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
P.info = t1
|
||||
P.name = "paper- 'Crew Manifest'"
|
||||
printing = null
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
|
||||
if (modify)
|
||||
modify.update_label()
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/card/AltClick(mob/user)
|
||||
if(!user.canUseTopic(src, !issilicon(user)) || !is_operational())
|
||||
return
|
||||
if(scan)
|
||||
eject_id_scan(user)
|
||||
if(modify)
|
||||
eject_id_modify(user)
|
||||
|
||||
/obj/machinery/computer/card/proc/eject_id_scan(mob/user)
|
||||
if(scan)
|
||||
scan.forceMove(drop_location())
|
||||
if(!issilicon(user) && Adjacent(user))
|
||||
user.put_in_hands(scan)
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
|
||||
scan = null
|
||||
else //switching the ID with the one you're holding
|
||||
if(issilicon(user) || !Adjacent(user))
|
||||
return
|
||||
var/obj/item/I = user.get_active_held_item()
|
||||
if(istype(I, /obj/item/card/id))
|
||||
if(!user.transferItemToLoc(I,src))
|
||||
return
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
|
||||
scan = I
|
||||
authenticated = FALSE
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/card/proc/eject_id_modify(mob/user)
|
||||
if(modify)
|
||||
GLOB.data_core.manifest_modify(modify.registered_name, modify.assignment)
|
||||
modify.update_label()
|
||||
modify.forceMove(drop_location())
|
||||
if(!issilicon(user) && Adjacent(user))
|
||||
user.put_in_hands(modify)
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
|
||||
modify = null
|
||||
region_access = null
|
||||
head_subordinates = null
|
||||
else //switching the ID with the one you're holding
|
||||
if(issilicon(user) || !Adjacent(user))
|
||||
return
|
||||
var/obj/item/I = user.get_active_held_item()
|
||||
if(istype(I, /obj/item/card/id))
|
||||
if (!user.transferItemToLoc(I,src))
|
||||
return
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
|
||||
modify = I
|
||||
authenticated = FALSE
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
|
||||
if (inserted_modify_id)
|
||||
inserted_modify_id.update_label()
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/card/proc/get_subordinates(rank)
|
||||
|
||||
@@ -468,7 +468,7 @@
|
||||
var/len = length(viable_occupant.dna.uni_identity)
|
||||
num = WRAP(num, 1, len+1)
|
||||
num = randomize_radiation_accuracy(num, radduration + (connected.precision_coeff ** 2), len) //Each manipulator level above 1 makes randomization as accurate as selected time + manipulator lvl^2
|
||||
//Value is this high for the same reason as with laser - not worth the hassle of upgrading if the bonus is low
|
||||
//Value is this high for the same reason as with laser - not worth the hassle of upgrading if the bonus is low
|
||||
var/block = round((num-1)/DNA_BLOCK_SIZE)+1
|
||||
var/subblock = num - block*DNA_BLOCK_SIZE
|
||||
last_change = "UI #[block]-[subblock]; "
|
||||
|
||||
@@ -1,163 +0,0 @@
|
||||
//computer that handle the points and teleports the prisoner
|
||||
/obj/machinery/computer/gulag_teleporter_computer
|
||||
name = "labor camp teleporter console"
|
||||
desc = "Used to send criminals to the Labor Camp."
|
||||
icon_screen = "explosive"
|
||||
icon_keyboard = "security_key"
|
||||
req_access = list(ACCESS_ARMORY)
|
||||
circuit = /obj/item/circuitboard/computer/gulag_teleporter_console
|
||||
var/default_goal = 200
|
||||
var/obj/item/card/id/prisoner/id = null
|
||||
var/obj/machinery/gulag_teleporter/teleporter = null
|
||||
var/obj/structure/gulag_beacon/beacon = null
|
||||
var/mob/living/carbon/human/prisoner = null
|
||||
var/datum/data/record/temporary_record = null
|
||||
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/machinery/computer/gulag_teleporter_computer/Initialize()
|
||||
. = ..()
|
||||
scan_machinery()
|
||||
|
||||
/obj/machinery/computer/gulag_teleporter_computer/Destroy()
|
||||
if(id)
|
||||
id.forceMove(get_turf(src))
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/gulag_teleporter_computer/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/card/id/prisoner))
|
||||
if(!id)
|
||||
if (!user.transferItemToLoc(W,src))
|
||||
return
|
||||
id = W
|
||||
to_chat(user, "<span class='notice'>You insert [W].</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There's an ID inserted already.</span>")
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/gulag_teleporter_computer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "gulag_console", name, 455, 440, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/gulag_teleporter_computer/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
var/list/prisoner_list = list()
|
||||
var/can_teleport = FALSE
|
||||
|
||||
if(teleporter && (teleporter.occupant && ishuman(teleporter.occupant)))
|
||||
prisoner = teleporter.occupant
|
||||
prisoner_list["name"] = prisoner.real_name
|
||||
if(id)
|
||||
can_teleport = TRUE
|
||||
if(!isnull(GLOB.data_core.general))
|
||||
for(var/r in GLOB.data_core.security)
|
||||
var/datum/data/record/R = r
|
||||
if(R.fields["name"] == prisoner_list["name"])
|
||||
temporary_record = R
|
||||
prisoner_list["crimstat"] = temporary_record.fields["criminal"]
|
||||
|
||||
data["prisoner"] = prisoner_list
|
||||
|
||||
if(teleporter)
|
||||
data["teleporter"] = teleporter
|
||||
data["teleporter_location"] = "([teleporter.x], [teleporter.y], [teleporter.z])"
|
||||
data["teleporter_lock"] = teleporter.locked
|
||||
data["teleporter_state_open"] = teleporter.state_open
|
||||
if(beacon)
|
||||
data["beacon"] = beacon
|
||||
data["beacon_location"] = "([beacon.x], [beacon.y], [beacon.z])"
|
||||
if(id)
|
||||
data["id"] = id
|
||||
data["id_name"] = id.registered_name
|
||||
data["goal"] = id.goal
|
||||
data["can_teleport"] = can_teleport
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/gulag_teleporter_computer/ui_act(action, list/params)
|
||||
if(..())
|
||||
return
|
||||
if(!allowed(usr))
|
||||
to_chat(usr, "<span class='warning'>Access denied.</span>")
|
||||
return
|
||||
switch(action)
|
||||
if("scan_teleporter")
|
||||
teleporter = findteleporter()
|
||||
if("scan_beacon")
|
||||
beacon = findbeacon()
|
||||
if("handle_id")
|
||||
if(id)
|
||||
usr.put_in_hands(id)
|
||||
id = null
|
||||
else
|
||||
var/obj/item/I = usr.is_holding_item_of_type(/obj/item/card/id/prisoner)
|
||||
if(I)
|
||||
if(!usr.transferItemToLoc(I, src))
|
||||
return
|
||||
id = I
|
||||
if("set_goal")
|
||||
var/new_goal = input("Set the amount of points:", "Points", id.goal) as num|null
|
||||
if(!isnum(new_goal))
|
||||
return
|
||||
if(!new_goal)
|
||||
new_goal = default_goal
|
||||
if (new_goal > 1000)
|
||||
to_chat(usr, "The entered amount of points is too large. Points have instead been set to the maximum allowed amount.")
|
||||
id.goal = CLAMP(new_goal, 0, 1000) //maximum 1000 points
|
||||
if("toggle_open")
|
||||
if(teleporter.locked)
|
||||
to_chat(usr, "The teleporter is locked")
|
||||
return
|
||||
teleporter.toggle_open()
|
||||
if("teleporter_lock")
|
||||
if(teleporter.state_open)
|
||||
to_chat(usr, "Close the teleporter before locking!")
|
||||
return
|
||||
teleporter.locked = !teleporter.locked
|
||||
if("teleport")
|
||||
if(!teleporter || !beacon)
|
||||
return
|
||||
addtimer(CALLBACK(src, .proc/teleport, usr), 5)
|
||||
|
||||
/obj/machinery/computer/gulag_teleporter_computer/proc/scan_machinery()
|
||||
teleporter = findteleporter()
|
||||
beacon = findbeacon()
|
||||
|
||||
/obj/machinery/computer/gulag_teleporter_computer/proc/findteleporter()
|
||||
var/obj/machinery/gulag_teleporter/teleporterf = null
|
||||
|
||||
for(var/direction in GLOB.cardinals)
|
||||
teleporterf = locate(/obj/machinery/gulag_teleporter, get_step(src, direction))
|
||||
if(teleporterf && teleporterf.is_operational())
|
||||
return teleporterf
|
||||
|
||||
/obj/machinery/computer/gulag_teleporter_computer/proc/findbeacon()
|
||||
return locate(/obj/structure/gulag_beacon)
|
||||
|
||||
/obj/machinery/computer/gulag_teleporter_computer/proc/teleport(mob/user)
|
||||
if(!id) //incase the ID was removed after the transfer timer was set.
|
||||
say("Warning: Unable to transfer prisoner without a valid Prisoner ID inserted!")
|
||||
return
|
||||
var/id_goal_not_set
|
||||
if(!id.goal)
|
||||
id_goal_not_set = TRUE
|
||||
id.goal = default_goal
|
||||
say("[id]'s ID card goal defaulting to [id.goal] points.")
|
||||
log_game("[key_name(user)] teleported [key_name(prisoner)] to the Labor Camp [COORD(beacon)] for [id_goal_not_set ? "default goal of ":""][id.goal] points.")
|
||||
teleporter.handle_prisoner(id, temporary_record)
|
||||
playsound(src, 'sound/weapons/emitter.ogg', 50, 1)
|
||||
prisoner.forceMove(get_turf(beacon))
|
||||
prisoner.Knockdown(40) // small travel dizziness
|
||||
to_chat(prisoner, "<span class='warning'>The teleportation makes you a little dizzy.</span>")
|
||||
new /obj/effect/particle_effect/sparks(get_turf(prisoner))
|
||||
playsound(src, "sparks", 50, 1)
|
||||
if(teleporter.locked)
|
||||
teleporter.locked = FALSE
|
||||
teleporter.toggle_open()
|
||||
id = null
|
||||
temporary_record = null
|
||||
@@ -22,12 +22,6 @@
|
||||
/obj/machinery/computer/med_data/syndie
|
||||
icon_keyboard = "syndie_key"
|
||||
|
||||
/obj/machinery/computer/med_data/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/card/id))
|
||||
id_insert_scan(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/med_data/ui_interact(mob/user)
|
||||
. = ..()
|
||||
if(isliving(user))
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
//Someone needs to break down the dat += into chunks instead of long ass lines.
|
||||
/obj/machinery/computer/secure_data/ui_interact(mob/user)
|
||||
. = ..()
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
||||
if(isliving(user))
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
||||
if(src.z > 6)
|
||||
to_chat(user, "<span class='boldannounce'>Unable to establish a connection</span>: \black You're too far away from the station!")
|
||||
return
|
||||
|
||||
@@ -148,7 +148,6 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
|
||||
virgin = 0
|
||||
|
||||
/obj/machinery/computer/telecrystals/boss/proc/getDangerous()//This scales the TC assigned with the round population.
|
||||
..()
|
||||
var/list/nukeops = get_antag_minds(/datum/antagonist/nukeop)
|
||||
var/danger = GLOB.joined_player_list.len - nukeops.len
|
||||
danger = CEILING(danger, 10)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user