Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into abductor-update
This commit is contained in:
@@ -41,6 +41,12 @@
|
||||
//Create a list global that is initialized as an empty list
|
||||
#define GLOBAL_LIST_EMPTY(X) GLOBAL_LIST_INIT(X, list())
|
||||
|
||||
// Create a typed list global with an initializer expression
|
||||
#define GLOBAL_LIST_INIT_TYPED(X, Typepath, InitValue) GLOBAL_RAW(/list##Typepath/X); GLOBAL_MANAGED(X, InitValue)
|
||||
|
||||
// Create a typed list global that is initialized as an empty list
|
||||
#define GLOBAL_LIST_EMPTY_TYPED(X, Typepath) GLOBAL_LIST_INIT_TYPED(X, Typepath, list())
|
||||
|
||||
//Create a typed global with an initializer expression
|
||||
#define GLOBAL_DATUM_INIT(X, Typepath, InitValue) GLOBAL_RAW(Typepath/##X); GLOBAL_MANAGED(X, InitValue)
|
||||
|
||||
|
||||
@@ -147,6 +147,20 @@
|
||||
#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 ) )
|
||||
|
||||
//OPEN TURF ATMOS
|
||||
#define OPENTURF_DEFAULT_ATMOS "o2=22;n2=82;TEMP=293.15" //the default air mix that open turfs spawn
|
||||
#define TCOMMS_ATMOS "n2=100;TEMP=80" //-193,15°C telecommunications. also used for xenobiology slime killrooms
|
||||
#define AIRLESS_ATMOS "TEMP=2.7" //space
|
||||
#define FROZEN_ATMOS "o2=22;n2=82;TEMP=180" //-93.15°C snow and ice turfs
|
||||
#define BURNMIX_ATMOS "o2=2500;plasma=5000;TEMP=370" //used in the holodeck burn test program
|
||||
|
||||
//ATMOSPHERICS DEPARTMENT GAS TANK TURFS
|
||||
#define ATMOS_TANK_N2O "n2o=6000;TEMP=293.15"
|
||||
#define ATMOS_TANK_CO2 "co2=50000;TEMP=293.15"
|
||||
#define ATMOS_TANK_PLASMA "plasma=70000;TEMP=293.15"
|
||||
#define ATMOS_TANK_O2 "o2=100000;TEMP=293.15"
|
||||
#define ATMOS_TANK_N2 "n2=100000;TEMP=293.15"
|
||||
#define ATMOS_TANK_AIRMIX "o2=2644;n2=10580;TEMP=293.15"
|
||||
//LAVALAND
|
||||
#define LAVALAND_EQUIPMENT_EFFECT_PRESSURE 50 //what pressure you have to be under to increase the effect of equipment meant for lavaland
|
||||
#define LAVALAND_DEFAULT_ATMOS "o2=14;n2=23;TEMP=300"
|
||||
|
||||
@@ -121,7 +121,15 @@
|
||||
#define COMPONENT_CANCEL_THROW 1
|
||||
#define COMSIG_MOVABLE_POST_THROW "movable_post_throw" //from base of atom/movable/throw_at(): (datum/thrownthing, spin)
|
||||
#define COMSIG_MOVABLE_Z_CHANGED "movable_ztransit" //from base of atom/movable/onTransitZ(): (old_z, new_z)
|
||||
#define COMSIG_MOVABLE_SECLUDED_LOCATION "movable_secluded" //called when the movable is placed in an unaccessible area, used for stationloving: ()
|
||||
#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)
|
||||
#define HEARING_MESSAGE 1
|
||||
#define HEARING_SPEAKER 2
|
||||
// #define HEARING_LANGUAGE 3
|
||||
#define HEARING_RAW_MESSAGE 4
|
||||
/* #define HEARING_RADIO_FREQ 5
|
||||
#define HEARING_SPANS 6
|
||||
#define HEARING_MESSAGE_MODE 7 */
|
||||
#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)
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#define DONATOR_GROUP_TIER_1_CONFIG_PATH /datum/config_entry/keyed_list/donator_group/tier_1_donators
|
||||
#define DONATOR_GROUP_TIER_2_CONFIG_PATH /datum/config_entry/keyed_list/donator_group/tier_2_donators
|
||||
#define DONATOR_GROUP_TIER_3_CONFIG_PATH /datum/config_entry/keyed_list/donator_group/tier_3_donators
|
||||
#define DONATOR_GROUP_TIER_1_CONFIG_PATH /datum/config_entry/multi_keyed_flag/donator_group/tier_1_donators
|
||||
#define DONATOR_GROUP_TIER_2_CONFIG_PATH /datum/config_entry/multi_keyed_flag/donator_group/tier_2_donators
|
||||
#define DONATOR_GROUP_TIER_3_CONFIG_PATH /datum/config_entry/multi_keyed_flag/donator_group/tier_3_donators
|
||||
|
||||
#define DONATOR_GROUP_TIER_1_CONFIG_SUBPATH keyed_list/donator_group/tier_1_donators
|
||||
#define DONATOR_GROUP_TIER_2_CONFIG_SUBPATH keyed_list/donator_group/tier_2_donators
|
||||
#define DONATOR_GROUP_TIER_3_CONFIG_SUBPATH keyed_list/donator_group/tier_3_donators
|
||||
#define DONATOR_GROUP_TIER_1_CONFIG_SUBPATH multi_keyed_flag/donator_group/tier_1_donators
|
||||
#define DONATOR_GROUP_TIER_2_CONFIG_SUBPATH multi_keyed_flag/donator_group/tier_2_donators
|
||||
#define DONATOR_GROUP_TIER_3_CONFIG_SUBPATH multi_keyed_flag/donator_group/tier_3_donators
|
||||
|
||||
#define TIER_1_DONATORS CONFIG_GET(DONATOR_GROUP_TIER_1_CONFIG_SUBPATH)
|
||||
#define TIER_2_DONATORS CONFIG_GET(DONATOR_GROUP_TIER_2_CONFIG_SUBPATH)
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
#define WEIGHT_CLASS_TINY 1 //Usually items smaller then a human hand, ex: Playing Cards, Lighter, Scalpel, Coins/Money
|
||||
#define WEIGHT_CLASS_SMALL 2 //Pockets can hold small and tiny items, ex: Flashlight, Multitool, Grenades, GPS Device
|
||||
#define WEIGHT_CLASS_NORMAL 3 //Standard backpacks can carry tiny, small & normal items, ex: Fire extinguisher, Stunbaton, Gas Mask, Metal Sheets
|
||||
#define WEIGHT_CLASS_BULKY 4 //Items that can be weilded or equipped but not stored in an inventory, ex: Defibrillator, Backpack, Space Suits
|
||||
#define WEIGHT_CLASS_HUGE 5 //Usually represents objects that require two hands to operate, ex: Shotgun, Two Handed Melee Weapons
|
||||
#define WEIGHT_CLASS_GIGANTIC 6 //Essentially means it cannot be picked up or placed in an inventory, ex: Mech Parts, Safe
|
||||
#define WEIGHT_CLASS_BULKY 4 //Items that can be weilded or equipped but not stored in a normal bag, ex: Defibrillator, Backpack, Space Suits
|
||||
#define WEIGHT_CLASS_HUGE 5 //Usually represents objects that require two hands to operate, ex: Shotgun, Two Handed Melee Weapons - Can not fit in Boh
|
||||
#define WEIGHT_CLASS_GIGANTIC 6 //Essentially means it cannot be picked up or placed in an inventory, ex: Mech Parts, Safe - Can not fit in Boh
|
||||
|
||||
//Inventory depth: limits how many nested storage items you can access directly.
|
||||
//1: stuff in mob, 2: stuff in backpack, 3: stuff in box in backpack, etc
|
||||
|
||||
@@ -100,3 +100,8 @@
|
||||
#define NUKE_OFF_UNLOCKED 1
|
||||
#define NUKE_ON_TIMING 2
|
||||
#define NUKE_ON_EXPLODING 3
|
||||
|
||||
|
||||
//these flags are used to tell the DNA modifier if a plant gene cannot be extracted or modified.
|
||||
#define PLANT_GENE_REMOVABLE (1<<0)
|
||||
#define PLANT_GENE_EXTRACTABLE (1<<1)
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#define STATUS_EFFECT_REPLACE 2 //if it allows only one, but new instances replace
|
||||
|
||||
#define STATUS_EFFECT_REFRESH 3 // if it only allows one, and new instances just instead refresh the timer
|
||||
|
||||
///////////
|
||||
// BUFFS //
|
||||
///////////
|
||||
@@ -74,6 +76,8 @@
|
||||
|
||||
#define STATUS_EFFECT_ICHORIAL_STAIN /datum/status_effect/ichorial_stain //Prevents a servant from being revived by vitality matrices for one minute.
|
||||
|
||||
#define STATUS_EFFECT_SPASMS /datum/status_effect/spasms //causes random muscle spasms
|
||||
|
||||
#define STATUS_EFFECT_BREASTS_ENLARGEMENT /datum/status_effect/chem/breast_enlarger //Applied slowdown due to the ominous bulk.
|
||||
|
||||
#define STATUS_EFFECT_PENIS_ENLARGEMENT /datum/status_effect/chem/penis_enlarger //More applied slowdown, just like the above.
|
||||
|
||||
@@ -109,6 +109,7 @@
|
||||
#define TRAIT_NOHARDCRIT "nohardcrit"
|
||||
#define TRAIT_NOSOFTCRIT "nosoftcrit"
|
||||
#define TRAIT_MINDSHIELD "mindshield"
|
||||
#define TRAIT_SIXTHSENSE "sixthsense"
|
||||
#define TRAIT_DISSECTED "dissected"
|
||||
#define TRAIT_FEARLESS "fearless"
|
||||
#define TRAIT_UNSTABLE "unstable"
|
||||
@@ -117,6 +118,7 @@
|
||||
#define TRAIT_PARALYSIS_L_LEG "para-l-leg"
|
||||
#define TRAIT_PARALYSIS_R_LEG "para-r-leg"
|
||||
#define TRAIT_UNINTELLIGIBLE_SPEECH "unintelligible-speech"
|
||||
#define TRAIT_SOOTHED_THROAT "soothed-throat"
|
||||
#define TRAIT_LAW_ENFORCEMENT_METABOLISM "law-enforcement-metabolism"
|
||||
#define TRAIT_STRONG_GRABBER "strong_grabber"
|
||||
#define TRAIT_CALCIUM_HEALER "calcium_healer"
|
||||
@@ -179,6 +181,7 @@
|
||||
#define CULT_TRAIT "cult"
|
||||
#define CURSED_ITEM_TRAIT "cursed-item" // The item is magically cursed
|
||||
#define ABSTRACT_ITEM_TRAIT "abstract-item"
|
||||
#define STATUS_EFFECT_TRAIT "status-effect"
|
||||
#define ROUNDSTART_TRAIT "roundstart" //cannot be removed without admin intervention
|
||||
|
||||
// unique trait sources, still defines
|
||||
@@ -213,4 +216,4 @@
|
||||
#define NINJA_SUIT_TRAIT "ninja-suit"
|
||||
#define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant"
|
||||
#define ABDUCTOR_ANTAGONIST "abductor-antagonist"
|
||||
#define MADE_UNCLONEABLE "made-uncloneable"
|
||||
#define MADE_UNCLONEABLE "made-uncloneable"
|
||||
@@ -84,3 +84,9 @@ GLOBAL_VAR_INIT(cmp_field, "name")
|
||||
|
||||
/proc/cmp_job_display_asc(datum/job/A, datum/job/B)
|
||||
return A.display_order - B.display_order
|
||||
|
||||
/proc/cmp_numbered_displays_name_asc(datum/numbered_display/A, datum/numbered_display/B)
|
||||
return sorttext(A.sample_object.name, B.sample_object.name)
|
||||
|
||||
/proc/cmp_numbered_displays_name_dsc(datum/numbered_display/A, datum/numbered_display/B)
|
||||
return sorttext(B.sample_object.name, A.sample_object.name)
|
||||
@@ -522,12 +522,14 @@ GLOBAL_LIST_EMPTY(species_list)
|
||||
else
|
||||
prefs = new
|
||||
|
||||
var/adminoverride = 0
|
||||
var/override = FALSE
|
||||
if(M.client && M.client.holder && (prefs.chat_toggles & CHAT_DEAD))
|
||||
adminoverride = 1
|
||||
if(isnewplayer(M) && !adminoverride)
|
||||
override = TRUE
|
||||
if(HAS_TRAIT(M, TRAIT_SIXTHSENSE))
|
||||
override = TRUE
|
||||
if(isnewplayer(M) && !override)
|
||||
continue
|
||||
if(M.stat != DEAD && !adminoverride)
|
||||
if(M.stat != DEAD && !override)
|
||||
continue
|
||||
if(speaker_key && speaker_key in prefs.ignoring)
|
||||
continue
|
||||
|
||||
@@ -7,15 +7,15 @@ GLOBAL_LIST_EMPTY(facial_hair_styles_list) //stores /datum/sprite_accessory/faci
|
||||
GLOBAL_LIST_EMPTY(facial_hair_styles_male_list) //stores only hair names
|
||||
GLOBAL_LIST_EMPTY(facial_hair_styles_female_list) //stores only hair names
|
||||
//Underwear
|
||||
GLOBAL_LIST_EMPTY(underwear_list) //stores /datum/sprite_accessory/underwear/bottom indexed by name
|
||||
GLOBAL_LIST_EMPTY_TYPED(underwear_list, /datum/sprite_accessory/underwear/bottom) //stores bottoms indexed by name
|
||||
GLOBAL_LIST_EMPTY(underwear_m) //stores only underwear name
|
||||
GLOBAL_LIST_EMPTY(underwear_f) //stores only underwear name
|
||||
//Undershirts
|
||||
GLOBAL_LIST_EMPTY(undershirt_list) //stores /datum/sprite_accessory/underwear/top indexed by name
|
||||
GLOBAL_LIST_EMPTY_TYPED(undershirt_list, /datum/sprite_accessory/underwear/top) //stores tops indexed by name
|
||||
GLOBAL_LIST_EMPTY(undershirt_m) //stores only undershirt name
|
||||
GLOBAL_LIST_EMPTY(undershirt_f) //stores only undershirt name
|
||||
//Socks
|
||||
GLOBAL_LIST_EMPTY(socks_list) //stores /datum/sprite_accessory/underwear/socks indexed by name
|
||||
GLOBAL_LIST_EMPTY_TYPED(socks_list, /datum/sprite_accessory/underwear/socks) //stores socks indexed by name
|
||||
//Lizard Bits (all datum lists indexed by name)
|
||||
GLOBAL_LIST_EMPTY(body_markings_list)
|
||||
GLOBAL_LIST_EMPTY(tails_list_lizard)
|
||||
|
||||
@@ -45,6 +45,6 @@ GLOBAL_LIST_EMPTY(vr_spawnpoints)
|
||||
//used by jump-to-area etc. Updated by area/updateName()
|
||||
GLOBAL_LIST_EMPTY(sortedAreas)
|
||||
/// An association from typepath to area instance. Only includes areas with `unique` set.
|
||||
GLOBAL_LIST_EMPTY(areas_by_type)
|
||||
GLOBAL_LIST_EMPTY_TYPED(areas_by_type, /area)
|
||||
|
||||
GLOBAL_LIST_EMPTY(all_abstract_markers)
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
#define POLL_IGNORE_GOLEM "golem"
|
||||
#define POLL_IGNORE_SWARMER "swarmer"
|
||||
#define POLL_IGNORE_DRONE "drone"
|
||||
#define POLL_IGNORE_IMAGINARYFRIEND "imaginary_friend"
|
||||
#define POLL_IGNORE_SPLITPERSONALITY "split_personality"
|
||||
#define POLL_IGNORE_DEMON "demon"
|
||||
#define POLL_IGNORE_WIZARD "wizard"
|
||||
#define POLL_IGNORE_CLONE "clone"
|
||||
|
||||
GLOBAL_LIST_INIT(poll_ignore_desc, list(
|
||||
@@ -29,6 +33,10 @@ GLOBAL_LIST_INIT(poll_ignore_desc, list(
|
||||
POLL_IGNORE_GOLEM = "Golems",
|
||||
POLL_IGNORE_SWARMER = "Swarmer shells",
|
||||
POLL_IGNORE_DRONE = "Drone shells",
|
||||
POLL_IGNORE_IMAGINARYFRIEND = "Imaginary Friend",
|
||||
POLL_IGNORE_SPLITPERSONALITY = "Split Personality",
|
||||
POLL_IGNORE_DEMON = "Demons",
|
||||
POLL_IGNORE_WIZARD = "Wizards",
|
||||
POLL_IGNORE_CLONE = "Defective/SDGF clones"
|
||||
))
|
||||
GLOBAL_LIST_INIT(poll_ignore, init_poll_ignore())
|
||||
|
||||
@@ -223,6 +223,12 @@ or something covering your eyes."
|
||||
var/mob/living/L = usr
|
||||
to_chat(L, "<span class='mind_control'>[command]</span>")
|
||||
|
||||
/obj/screen/alert/hypnosis
|
||||
name = "Hypnosis"
|
||||
desc = "Something's hypnotizing you, but you're not really sure about what."
|
||||
icon_state = "hypnosis"
|
||||
var/phrase
|
||||
|
||||
/obj/screen/alert/drunk //Not implemented
|
||||
name = "Drunk"
|
||||
desc = "All that alcohol you've been drinking is impairing your speech, motor skills, and mental cognition. Make sure to act like it."
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/screen/examine(mob/user)
|
||||
return
|
||||
return list()
|
||||
|
||||
/obj/screen/orbit()
|
||||
return
|
||||
|
||||
@@ -106,9 +106,8 @@
|
||||
|
||||
/obj/item/tk_grab/examine(user)
|
||||
if (focus)
|
||||
focus.examine(user)
|
||||
else
|
||||
..()
|
||||
return focus.examine(user)
|
||||
return ..()
|
||||
|
||||
/obj/item/tk_grab/attack_self(mob/user)
|
||||
if(!focus)
|
||||
|
||||
@@ -211,3 +211,27 @@
|
||||
|
||||
/datum/config_entry/keyed_list/vv_edit_var(var_name, var_value)
|
||||
return var_name != "splitter" && ..()
|
||||
|
||||
//snowflake for donator things being on one line smh
|
||||
/datum/config_entry/multi_keyed_flag
|
||||
vv_VAS = FALSE
|
||||
abstract_type = /datum/config_entry/multi_keyed_flag
|
||||
config_entry_value = list()
|
||||
var/delimiter = "|"
|
||||
|
||||
/datum/config_entry/multi_keyed_flag/vv_edit_var(var_name, var_value)
|
||||
if(var_name == NAMEOF(src, delimiter))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/config_entry/multi_keyed_flag/ValidateAndSet(str_val)
|
||||
if(!VASProcCallGuard(str_val))
|
||||
return FALSE
|
||||
str_val = trim(str_val)
|
||||
var/list/keys = splittext(str_val, delimiter)
|
||||
for(var/i in keys)
|
||||
config_entry_value[process_key(i)] = TRUE
|
||||
return length(keys)? TRUE : FALSE
|
||||
|
||||
/datum/config_entry/multi_keyed_flag/proc/process_key(key)
|
||||
return trim(key)
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
/datum/config_entry/keyed_list/donator_group
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_FLAG
|
||||
abstract_type = /datum/config_entry/keyed_list/donator_group
|
||||
/datum/config_entry/multi_keyed_flag/donator_group
|
||||
abstract_type = /datum/config_entry/multi_keyed_flag/donator_group
|
||||
|
||||
//If we're in the middle of a config load, only do the regeneration afterwards to prevent this from wasting a massive amount of CPU for list regenerations.
|
||||
/datum/config_entry/keyed_list/donator_group/ValidateAndSet(str_val, during_load)
|
||||
/datum/config_entry/multi_keyed_flag/donator_group/ValidateAndSet(str_val, during_load)
|
||||
. = ..()
|
||||
if(. && during_load)
|
||||
if(. && !during_load)
|
||||
regenerate_donator_grouping_list()
|
||||
|
||||
/datum/config_entry/keyed_list/donator_group/OnPostload()
|
||||
/datum/config_entry/multi_keyed_flag/donator_group/process_key(key)
|
||||
return ckey(key)
|
||||
|
||||
/datum/config_entry/multi_keyed_flag/donator_group/OnPostload()
|
||||
. = ..()
|
||||
regenerate_donator_grouping_list()
|
||||
|
||||
//This is kinda weird in that the config entries are defined here but all the handling/calculations are in __HELPERS/donator_groupings.dm
|
||||
|
||||
/datum/config_entry/keyed_list/donator_group/tier_1_donators
|
||||
/datum/config_entry/multi_keyed_flag/donator_group/tier_1_donators
|
||||
|
||||
/datum/config_entry/keyed_list/donator_group/tier_2_donators
|
||||
/datum/config_entry/multi_keyed_flag/donator_group/tier_2_donators
|
||||
|
||||
/datum/config_entry/keyed_list/donator_group/tier_3_donators
|
||||
/datum/config_entry/multi_keyed_flag/donator_group/tier_3_donators
|
||||
|
||||
@@ -81,42 +81,6 @@
|
||||
/datum/config_entry/number/dynamic_assassinate_cost
|
||||
config_entry_value = 2
|
||||
|
||||
/datum/config_entry/number/dynamic_summon_guns_requirement
|
||||
config_entry_value = 10
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/dynamic_summon_guns_cost
|
||||
config_entry_value = 5
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/dynamic_summon_magic_requirement
|
||||
config_entry_value = 10
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/dynamic_summon_magic_cost
|
||||
config_entry_value = 5
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/dynamic_summon_events_requirement
|
||||
config_entry_value = 20
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/dynamic_summon_events_cost
|
||||
config_entry_value = 10
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/dynamic_staff_of_change_requirement
|
||||
config_entry_value = 20
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/dynamic_staff_of_change_cost
|
||||
config_entry_value = 10
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/dynamic_apprentice_cost
|
||||
config_entry_value = 10
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/dynamic_warops_requirement
|
||||
config_entry_value = 60
|
||||
min_val = 0
|
||||
|
||||
@@ -29,6 +29,7 @@ SUBSYSTEM_DEF(chat)
|
||||
target = GLOB.clients
|
||||
|
||||
//Some macros remain in the string even after parsing and fuck up the eventual output
|
||||
var/original_message = message
|
||||
message = replacetext(message, "\improper", "")
|
||||
message = replacetext(message, "\proper", "")
|
||||
if(handle_whitespace)
|
||||
@@ -45,6 +46,12 @@ SUBSYSTEM_DEF(chat)
|
||||
for(var/I in target)
|
||||
var/client/C = CLIENT_FROM_VAR(I) //Grab us a client if possible
|
||||
|
||||
if(!C)
|
||||
return
|
||||
|
||||
//Send it to the old style output window.
|
||||
SEND_TEXT(C, original_message)
|
||||
|
||||
if(!C?.chatOutput || C.chatOutput.broken) //A player who hasn't updated his skin file.
|
||||
continue
|
||||
|
||||
@@ -57,6 +64,12 @@ SUBSYSTEM_DEF(chat)
|
||||
else
|
||||
var/client/C = CLIENT_FROM_VAR(target) //Grab us a client if possible
|
||||
|
||||
if(!C)
|
||||
return
|
||||
|
||||
//Send it to the old style output window.
|
||||
SEND_TEXT(C, original_message)
|
||||
|
||||
if(!C?.chatOutput || C.chatOutput.broken) //A player who hasn't updated his skin file.
|
||||
return
|
||||
|
||||
|
||||
@@ -444,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(reservation_ready["[z]"] && !clearing_reserved_turfs)
|
||||
UNTIL((!z || reservation_ready["[z]"]) && !clearing_reserved_turfs)
|
||||
var/datum/turf_reservation/reserve = new type
|
||||
if(turf_type_override)
|
||||
reserve.turf_type = turf_type_override
|
||||
|
||||
@@ -12,6 +12,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
var/list/obj/structure/chisel_message/chisel_messages = list()
|
||||
var/list/saved_messages = list()
|
||||
var/list/saved_modes = list(1,2,3)
|
||||
var/list/saved_threat_levels = list(1,1,1)
|
||||
var/list/saved_maps
|
||||
var/list/saved_trophies = list()
|
||||
var/list/spawned_objects = list()
|
||||
@@ -27,6 +28,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
LoadChiselMessages()
|
||||
LoadTrophies()
|
||||
LoadRecentModes()
|
||||
LoadRecentThreats()
|
||||
LoadRecentMaps()
|
||||
LoadPhotoPersistence()
|
||||
if(CONFIG_GET(flag/use_antag_rep))
|
||||
@@ -166,6 +168,15 @@ SUBSYSTEM_DEF(persistence)
|
||||
return
|
||||
saved_modes = json["data"]
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/LoadRecentThreats()
|
||||
var/json_file = file("data/RecentThreatLevels.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = json_decode(file2text(json_file))
|
||||
if(!json)
|
||||
return
|
||||
saved_threat_levels = json["data"]
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/LoadRecentMaps()
|
||||
var/json_file = file("data/RecentMaps.json")
|
||||
if(!fexists(json_file))
|
||||
@@ -216,6 +227,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
CollectSecretSatchels()
|
||||
CollectTrophies()
|
||||
CollectRoundtype()
|
||||
CollectThreatLevel()
|
||||
RecordMaps()
|
||||
SavePhotoPersistence() //THIS IS PERSISTENCE, NOT THE LOGGING PORTION.
|
||||
if(CONFIG_GET(flag/use_antag_rep))
|
||||
@@ -372,6 +384,18 @@ SUBSYSTEM_DEF(persistence)
|
||||
fdel(json_file)
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/CollectThreatLevel()
|
||||
if(istype(SSticker.mode, /datum/game_mode/dynamic))
|
||||
var/datum/game_mode/dynamic/mode = SSticker.mode
|
||||
saved_threat_levels[3] = saved_threat_levels[2]
|
||||
saved_threat_levels[2] = saved_threat_levels [1]
|
||||
saved_threat_levels[1] = mode.threat_level
|
||||
var/json_file = file("data/RecentThreatLevels.json")
|
||||
var/list/file_data = list()
|
||||
file_data["data"] = saved_threat_levels
|
||||
fdel(json_file)
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/RecordMaps()
|
||||
saved_maps = saved_maps?.len ? list("[SSmapping.config.map_name]") | saved_maps : list("[SSmapping.config.map_name]")
|
||||
var/json_file = file("data/RecentMaps.json")
|
||||
|
||||
@@ -29,8 +29,8 @@ SUBSYSTEM_DEF(vis_overlays)
|
||||
return
|
||||
|
||||
//the "thing" var can be anything with vis_contents which includes images
|
||||
/datum/controller/subsystem/vis_overlays/proc/add_vis_overlay(atom/movable/thing, icon, iconstate, layer, plane, dir, alpha=255)
|
||||
. = "[icon]|[iconstate]|[layer]|[plane]|[dir]|[alpha]"
|
||||
/datum/controller/subsystem/vis_overlays/proc/add_vis_overlay(atom/movable/thing, icon, iconstate, layer, plane, dir, alpha = 255, add_appearance_flags = NONE)
|
||||
. = "[icon]|[iconstate]|[layer]|[plane]|[dir]|[alpha]|[add_appearance_flags]"
|
||||
var/obj/effect/overlay/vis/overlay = vis_overlay_cache[.]
|
||||
if(!overlay)
|
||||
overlay = new
|
||||
@@ -40,6 +40,7 @@ SUBSYSTEM_DEF(vis_overlays)
|
||||
overlay.plane = plane
|
||||
overlay.dir = dir
|
||||
overlay.alpha = alpha
|
||||
overlay.appearance_flags |= add_appearance_flags
|
||||
vis_overlay_cache[.] = overlay
|
||||
else
|
||||
overlay.unused = 0
|
||||
@@ -64,10 +65,12 @@ SUBSYSTEM_DEF(vis_overlays)
|
||||
UnregisterSignal(thing, COMSIG_ATOM_DIR_CHANGE)
|
||||
|
||||
/datum/controller/subsystem/vis_overlays/proc/rotate_vis_overlay(atom/thing, old_dir, new_dir)
|
||||
if(old_dir == new_dir)
|
||||
return
|
||||
var/rotation = dir2angle(old_dir) - dir2angle(new_dir)
|
||||
var/list/overlays_to_remove = list()
|
||||
for(var/i in thing.managed_vis_overlays)
|
||||
var/obj/effect/overlay/vis/overlay = i
|
||||
add_vis_overlay(thing, overlay.icon, overlay.icon_state, overlay.layer, overlay.plane, turn(overlay.dir, rotation))
|
||||
add_vis_overlay(thing, overlay.icon, overlay.icon_state, overlay.layer, overlay.plane, turn(overlay.dir, rotation), overlay.alpha, overlay.appearance_flags)
|
||||
overlays_to_remove += overlay
|
||||
remove_vis_overlay(thing, overlays_to_remove)
|
||||
|
||||
@@ -153,6 +153,10 @@ SUBSYSTEM_DEF(vote)
|
||||
if(SSticker.current_state > GAME_STATE_PREGAME)//Don't change the mode if the round already started.
|
||||
return message_admins("A vote has tried to change the gamemode, but the game has already started. Aborting.")
|
||||
GLOB.master_mode = "dynamic"
|
||||
if("extended" in choices)
|
||||
if(. == "extended")
|
||||
GLOB.dynamic_forced_extended = TRUE // we still do the rest of the stuff
|
||||
choices[PEACE] += choices["extended"]
|
||||
var/mean = 0
|
||||
var/voters = 0
|
||||
for(var/client/c in GLOB.clients)
|
||||
@@ -253,7 +257,11 @@ SUBSYSTEM_DEF(vote)
|
||||
if("roundtype") //CIT CHANGE - adds the roundstart secret/extended vote
|
||||
choices.Add("secret", "extended")
|
||||
if("dynamic")
|
||||
choices.Add(PEACE,CHAOS)
|
||||
var/saved_threats = SSpersistence.saved_threat_levels
|
||||
if((saved_threats[1]+saved_threats[2]+saved_threats[3])>150)
|
||||
choices.Add("extended",PEACE,CHAOS)
|
||||
else
|
||||
choices.Add(PEACE,CHAOS)
|
||||
if("custom")
|
||||
question = stripped_input(usr,"What is the vote for?")
|
||||
if(!question)
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
//Brain Traumas are the new actual brain damage. Brain damage itself acts as a way to acquire traumas: every time brain damage is dealt, there's a chance of receiving a trauma.
|
||||
//This chance gets higher the higher the mob's brainloss is. Removing traumas is a separate thing from removing brain damage: you can get restored to full brain operativity,
|
||||
//but keep the quirks, until repaired by mannitol (for mild/special ones) or brain surgery (for severe ones).
|
||||
// but keep the quirks, until repaired by neurine, surgery, lobotomy or magic; depending on the resilience
|
||||
// of the trauma.
|
||||
|
||||
/datum/brain_trauma
|
||||
var/name = "Brain Trauma"
|
||||
var/desc = "A trauma caused by brain damage, which causes issues to the patient."
|
||||
var/scan_desc = "a generic brain trauma" //description when detected by a health scanner
|
||||
var/scan_desc = "generic brain trauma" //description when detected by a health scanner
|
||||
var/mob/living/carbon/owner //the poor bastard
|
||||
var/obj/item/organ/brain/brain //the poor bastard's brain
|
||||
var/gain_text = "<span class='notice'>You feel traumatized.</span>"
|
||||
@@ -12,15 +14,21 @@
|
||||
var/can_gain = TRUE
|
||||
var/random_gain = TRUE //can this be gained through random traumas?
|
||||
var/resilience = TRAUMA_RESILIENCE_BASIC //how hard is this to cure?
|
||||
var/clonable = TRUE // will this transfer if the brain is cloned?
|
||||
|
||||
/datum/brain_trauma/Destroy()
|
||||
brain.traumas -= src
|
||||
if(brain && brain.traumas)
|
||||
brain.traumas -= src
|
||||
if(owner)
|
||||
on_lose()
|
||||
brain = null
|
||||
owner = null
|
||||
return ..()
|
||||
|
||||
/datum/brain_trauma/proc/on_clone()
|
||||
if(clonable)
|
||||
return new type
|
||||
|
||||
//Called on life ticks
|
||||
/datum/brain_trauma/proc/on_life()
|
||||
return
|
||||
@@ -33,17 +41,24 @@
|
||||
/datum/brain_trauma/proc/on_gain()
|
||||
to_chat(owner, gain_text)
|
||||
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/handle_hearing)
|
||||
|
||||
//Called when removed from a mob
|
||||
/datum/brain_trauma/proc/on_lose(silent)
|
||||
if(!silent)
|
||||
to_chat(owner, lose_text)
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
|
||||
|
||||
//Called when hearing a spoken message
|
||||
/datum/brain_trauma/proc/on_hear(message, speaker, message_language, raw_message, radio_freq)
|
||||
return message
|
||||
/datum/brain_trauma/proc/handle_hearing(datum/source, list/hearing_args)
|
||||
UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
|
||||
|
||||
//Called when speaking
|
||||
/datum/brain_trauma/proc/handle_speech(datum/source, list/speech_args)
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
|
||||
//Called when hugging. expand into generally interacting, where future coders could switch the intent?
|
||||
/datum/brain_trauma/proc/on_hug(mob/living/hugger, mob/living/hugged)
|
||||
return
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
gain_text = ""
|
||||
lose_text = ""
|
||||
resilience = TRAUMA_RESILIENCE_SURGERY
|
||||
|
||||
var/hypnotic_phrase = ""
|
||||
var/regex/target_phrase
|
||||
|
||||
@@ -44,18 +45,17 @@
|
||||
"You feel a part of your mind repeating this over and over. You need to follow these words.",\
|
||||
"Something about this sounds... right, for some reason. You feel like you should follow these words.",\
|
||||
"These words keep echoing in your mind. You find yourself completely fascinated by them.")]</span>")
|
||||
if(!HAS_TRAIT(owner, "hypnotherapy"))
|
||||
to_chat(owner, "<span class='boldwarning'>You've been hypnotized by this sentence. You must follow these words. If it isn't a clear order, you can freely interpret how to do so,\
|
||||
to_chat(owner, "<span class='boldwarning'>You've been hypnotized by this sentence. You must follow these words. If it isn't a clear order, you can freely interpret how to do so,\
|
||||
as long as you act like the words are your highest priority.</span>")
|
||||
else
|
||||
to_chat(owner, "<span class='boldwarning'>You've been hypnotized by this sentence. You feel an incredible desire to follow these words, but are able to resist it somewhat. If it isn't a clear order, you can freely interpret how to do so,\
|
||||
however this does not take precedence over your other objectives.</span>")
|
||||
var/obj/screen/alert/hypnosis/hypno_alert = owner.throw_alert("hypnosis", /obj/screen/alert/hypnosis)
|
||||
hypno_alert.desc = "\"[hypnotic_phrase]\"... your mind seems to be fixated on this concept."
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/hypnosis/on_lose()
|
||||
message_admins("[ADMIN_LOOKUPFLW(owner)] is no longer hypnotized with the phrase '[hypnotic_phrase]'.")
|
||||
log_game("[key_name(owner)] is no longer hypnotized with the phrase '[hypnotic_phrase]'.")
|
||||
to_chat(owner, "<span class='userdanger'>You suddenly snap out of your fixation. The phrase '[hypnotic_phrase]' no longer feels important to you.</span>")
|
||||
to_chat(owner, "<span class='userdanger'>You suddenly snap out of your hypnosis. The phrase '[hypnotic_phrase]' no longer feels important to you.</span>")
|
||||
owner.clear_alert("hypnosis")
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/hypnosis/on_life()
|
||||
@@ -67,6 +67,5 @@
|
||||
if(2)
|
||||
new /datum/hallucination/chat(owner, TRUE, FALSE, "<span class='hypnophrase'>[hypnotic_phrase]</span>")
|
||||
|
||||
/datum/brain_trauma/hypnosis/on_hear(message, speaker, message_language, raw_message, radio_freq)
|
||||
message = target_phrase.Replace(message, "<span class='hypnophrase'>$1</span>")
|
||||
return message
|
||||
/datum/brain_trauma/hypnosis/handle_hearing(datum/source, list/hearing_args)
|
||||
hearing_args[HEARING_MESSAGE] = target_phrase.Replace(hearing_args[HEARING_MESSAGE], "<span class='hypnophrase'>$1</span>")
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
var/friend_initialized = FALSE
|
||||
|
||||
/datum/brain_trauma/special/imaginary_friend/on_gain()
|
||||
var/mob/living/M = owner
|
||||
if(M.stat == DEAD || !M.client)
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
make_friend()
|
||||
get_ghost()
|
||||
@@ -43,7 +47,7 @@
|
||||
|
||||
/datum/brain_trauma/special/imaginary_friend/proc/get_ghost()
|
||||
set waitfor = FALSE
|
||||
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [owner]'s imaginary friend?", ROLE_PAI, null, null, 75, friend)
|
||||
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [owner]'s imaginary friend?", ROLE_PAI, null, null, 75, friend, POLL_IGNORE_IMAGINARYFRIEND)
|
||||
if(LAZYLEN(candidates))
|
||||
var/mob/dead/observer/C = pick(candidates)
|
||||
C.transfer_ckey(friend, FALSE)
|
||||
@@ -74,26 +78,34 @@
|
||||
|
||||
/mob/camera/imaginary_friend/Login()
|
||||
..()
|
||||
to_chat(src, "<span class='notice'><b>You are the imaginary friend of [owner]!</b></span>")
|
||||
to_chat(src, "<span class='notice'>You are absolutely loyal to your friend, no matter what.</span>")
|
||||
to_chat(src, "<span class='notice'>You cannot directly influence the world around you, but you can see what [owner] cannot.</span>")
|
||||
greet()
|
||||
Show()
|
||||
|
||||
/mob/camera/imaginary_friend/proc/greet()
|
||||
to_chat(src, "<span class='notice'><b>You are the imaginary friend of [owner]!</b></span>")
|
||||
to_chat(src, "<span class='notice'>You are absolutely loyal to your friend, no matter what.</span>")
|
||||
to_chat(src, "<span class='notice'>You cannot directly influence the world around you, but you can see what [owner] cannot.</span>")
|
||||
|
||||
/mob/camera/imaginary_friend/Initialize(mapload, _trauma)
|
||||
. = ..()
|
||||
var/gender = pick(MALE, FEMALE)
|
||||
real_name = random_unique_name(gender)
|
||||
name = real_name
|
||||
|
||||
trauma = _trauma
|
||||
owner = trauma.owner
|
||||
copy_known_languages_from(owner, TRUE)
|
||||
human_image = get_flat_human_icon(null, pick(SSjob.occupations))
|
||||
|
||||
setup_friend()
|
||||
|
||||
join = new
|
||||
join.Grant(src)
|
||||
hide = new
|
||||
hide.Grant(src)
|
||||
|
||||
/mob/camera/imaginary_friend/proc/setup_friend()
|
||||
var/gender = pick(MALE, FEMALE)
|
||||
real_name = random_unique_name(gender)
|
||||
name = real_name
|
||||
human_image = get_flat_human_icon(null, pick(SSjob.occupations))
|
||||
|
||||
/mob/camera/imaginary_friend/proc/Show()
|
||||
if(!client) //nobody home
|
||||
return
|
||||
@@ -132,7 +144,7 @@
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
to_chat(src, "You cannot send IC messages (muted).")
|
||||
return
|
||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
if (!(ignore_spam || forced) && src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
return
|
||||
|
||||
friend_talk(message)
|
||||
@@ -218,4 +230,42 @@
|
||||
var/mob/camera/imaginary_friend/I = owner
|
||||
I.hidden = !I.hidden
|
||||
I.Show()
|
||||
update_status()
|
||||
update_status()
|
||||
|
||||
//down here is the trapped mind
|
||||
//like imaginary friend but a lot less imagination and more like mind prison//
|
||||
|
||||
/datum/brain_trauma/special/imaginary_friend/trapped_owner
|
||||
name = "Trapped Victim"
|
||||
desc = "Patient appears to be targeted by an invisible entity."
|
||||
gain_text = ""
|
||||
lose_text = ""
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/special/imaginary_friend/trapped_owner/make_friend()
|
||||
friend = new /mob/camera/imaginary_friend/trapped(get_turf(owner), src)
|
||||
|
||||
/datum/brain_trauma/special/imaginary_friend/trapped_owner/reroll_friend() //no rerolling- it's just the last owner's hell
|
||||
if(friend.client) //reconnected
|
||||
return
|
||||
friend_initialized = FALSE
|
||||
QDEL_NULL(friend)
|
||||
qdel(src)
|
||||
|
||||
/datum/brain_trauma/special/imaginary_friend/trapped_owner/get_ghost() //no randoms
|
||||
return
|
||||
|
||||
/mob/camera/imaginary_friend/trapped
|
||||
name = "figment of imagination?"
|
||||
real_name = "figment of imagination?"
|
||||
desc = "The previous host of this body."
|
||||
|
||||
/mob/camera/imaginary_friend/trapped/greet()
|
||||
to_chat(src, "<span class='notice'><b>You have managed to hold on as a figment of the new host's imagination!</b></span>")
|
||||
to_chat(src, "<span class='notice'>All hope is lost for you, but at least you may interact with your host. You do not have to be loyal to them.</span>")
|
||||
to_chat(src, "<span class='notice'>You cannot directly influence the world around you, but you can see what the host cannot.</span>")
|
||||
|
||||
/mob/camera/imaginary_friend/trapped/setup_friend()
|
||||
real_name = "[owner.real_name]?"
|
||||
name = real_name
|
||||
human_image = icon('icons/mob/lavaland/lavaland_monsters.dmi', icon_state = "curseblob")
|
||||
|
||||
@@ -64,21 +64,21 @@
|
||||
name = "Speech Impediment"
|
||||
desc = "Patient is unable to form coherent sentences."
|
||||
scan_desc = "communication disorder"
|
||||
gain_text = "" //mutation will handle the text
|
||||
lose_text = ""
|
||||
gain_text = "<span class='danger'>You can't seem to form any coherent thoughts!</span>"
|
||||
lose_text = "<span class='danger'>Your mind feels more clear.</span>"
|
||||
|
||||
/datum/brain_trauma/mild/speech_impediment/on_gain()
|
||||
ADD_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, TRAUMA_TRAIT)
|
||||
. = ..()
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/mild/speech_impediment/on_lose()
|
||||
REMOVE_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, TRAUMA_TRAIT)
|
||||
. = ..()
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/mild/concussion
|
||||
name = "Concussion"
|
||||
desc = "Patient's brain is concussed."
|
||||
scan_desc = "a concussion"
|
||||
scan_desc = "concussion"
|
||||
gain_text = "<span class='warning'>Your head hurts!</span>"
|
||||
lose_text = "<span class='notice'>The pressure inside your head starts fading.</span>"
|
||||
|
||||
@@ -157,54 +157,108 @@
|
||||
gain_text = "<span class='warning'>Your muscles feel oddly faint.</span>"
|
||||
lose_text = "<span class='notice'>You feel in control of your muscles again.</span>"
|
||||
|
||||
/datum/brain_trauma/mild/muscle_spasms/on_life()
|
||||
if(prob(7))
|
||||
switch(rand(1,5))
|
||||
if(1)
|
||||
if(owner.canmove && !isspaceturf(owner.loc))
|
||||
to_chat(owner, "<span class='warning'>Your leg spasms!</span>")
|
||||
step(owner, pick(GLOB.cardinals))
|
||||
if(2)
|
||||
if(owner.incapacitated())
|
||||
return
|
||||
var/obj/item/I = owner.get_active_held_item()
|
||||
if(I)
|
||||
to_chat(owner, "<span class='warning'>Your fingers spasm!</span>")
|
||||
owner.log_message("used [I] due to a Muscle Spasm", LOG_ATTACK)
|
||||
I.attack_self(owner)
|
||||
if(3)
|
||||
var/prev_intent = owner.a_intent
|
||||
owner.a_intent = INTENT_HARM
|
||||
|
||||
var/range = 1
|
||||
if(istype(owner.get_active_held_item(), /obj/item/gun)) //get targets to shoot at
|
||||
range = 7
|
||||
|
||||
var/list/mob/living/targets = list()
|
||||
for(var/mob/M in oview(owner, range))
|
||||
if(isliving(M))
|
||||
targets += M
|
||||
if(LAZYLEN(targets))
|
||||
to_chat(owner, "<span class='warning'>Your arm spasms!</span>")
|
||||
owner.log_message(" attacked someone due to a Muscle Spasm") //the following attack will log itself
|
||||
owner.ClickOn(pick(targets))
|
||||
owner.a_intent = prev_intent
|
||||
if(4)
|
||||
var/prev_intent = owner.a_intent
|
||||
owner.a_intent = INTENT_HARM
|
||||
to_chat(owner, "<span class='warning'>Your arm spasms!</span>")
|
||||
owner.log_message("attacked [owner.p_them()]self to a Muscle Spasm", LOG_ATTACK)
|
||||
owner.ClickOn(owner)
|
||||
owner.a_intent = prev_intent
|
||||
if(5)
|
||||
if(owner.incapacitated())
|
||||
return
|
||||
var/obj/item/I = owner.get_active_held_item()
|
||||
var/list/turf/targets = list()
|
||||
for(var/turf/T in oview(owner, 3))
|
||||
targets += T
|
||||
if(LAZYLEN(targets) && I)
|
||||
to_chat(owner, "<span class='warning'>Your arm spasms!</span>")
|
||||
owner.log_message("threw [I] due to a Muscle Spasm", LOG_ATTACK)
|
||||
owner.throw_item(pick(targets))
|
||||
/datum/brain_trauma/mild/muscle_spasms/on_gain()
|
||||
owner.apply_status_effect(STATUS_EFFECT_SPASMS)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/mild/muscle_spasms/on_lose()
|
||||
owner.remove_status_effect(STATUS_EFFECT_SPASMS)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/mild/nervous_cough
|
||||
name = "Nervous Cough"
|
||||
desc = "Patient feels a constant need to cough."
|
||||
scan_desc = "nervous cough"
|
||||
gain_text = "<span class='warning'>Your throat itches incessantly...</span>"
|
||||
lose_text = "<span class='notice'>Your throat stops itching.</span>"
|
||||
|
||||
/datum/brain_trauma/mild/nervous_cough/on_life()
|
||||
if(prob(12) && !HAS_TRAIT(owner, TRAIT_SOOTHED_THROAT))
|
||||
if(prob(5))
|
||||
to_chat(owner, "<span notice='warning'>[pick("You have a coughing fit!", "You can't stop coughing!")]</span>")
|
||||
owner.Stun(20)
|
||||
owner.emote("cough")
|
||||
addtimer(CALLBACK(owner, /mob/.proc/emote, "cough"), 6)
|
||||
addtimer(CALLBACK(owner, /mob/.proc/emote, "cough"), 12)
|
||||
owner.emote("cough")
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/mild/expressive_aphasia
|
||||
name = "Expressive Aphasia"
|
||||
desc = "Patient is affected by partial loss of speech leading to a reduced vocabulary."
|
||||
scan_desc = "inability to form complex sentences"
|
||||
gain_text = "<span class='warning'>You lose your grasp on complex words.</span>"
|
||||
lose_text = "<span class='notice'>You feel your vocabulary returning to normal again.</span>"
|
||||
|
||||
var/static/list/common_words = world.file2list("strings/1000_most_common.txt")
|
||||
|
||||
/datum/brain_trauma/mild/expressive_aphasia/handle_speech(datum/source, list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message)
|
||||
var/list/message_split = splittext(message, " ")
|
||||
var/list/new_message = list()
|
||||
|
||||
for(var/word in message_split)
|
||||
var/suffix = copytext(word,-1)
|
||||
|
||||
// Check if we have a suffix and break it out of the word
|
||||
if(suffix in list("." , "," , ";" , "!" , ":" , "?"))
|
||||
word = copytext(word,1,-1)
|
||||
else
|
||||
suffix = ""
|
||||
|
||||
word = html_decode(word)
|
||||
|
||||
if(lowertext(word) in common_words)
|
||||
new_message += word + suffix
|
||||
else
|
||||
if(prob(30) && message_split.len > 2)
|
||||
new_message += pick("uh","erm")
|
||||
break
|
||||
else
|
||||
var/list/charlist = string2charlist(word) // Stupid shit code
|
||||
shuffle_inplace(charlist)
|
||||
charlist.len = round(charlist.len * 0.5,1)
|
||||
new_message += html_encode(jointext(charlist,"")) + suffix
|
||||
|
||||
message = jointext(new_message, " ")
|
||||
|
||||
speech_args[SPEECH_MESSAGE] = trim(message)
|
||||
|
||||
/datum/brain_trauma/mild/mind_echo
|
||||
name = "Mind Echo"
|
||||
desc = "Patient's language neurons do not terminate properly, causing previous speech patterns to occasionally resurface spontaneously."
|
||||
scan_desc = "looping neural pattern"
|
||||
gain_text = "<span class='warning'>You feel a faint echo of your thoughts...</span>"
|
||||
lose_text = "<span class='notice'>The faint echo fades away.</span>"
|
||||
var/list/hear_dejavu = list()
|
||||
var/list/speak_dejavu = list()
|
||||
|
||||
/datum/brain_trauma/mild/mind_echo/handle_hearing(datum/source, list/hearing_args)
|
||||
if(owner == hearing_args[HEARING_SPEAKER])
|
||||
return
|
||||
if(hear_dejavu.len >= 5)
|
||||
if(prob(25))
|
||||
var/deja_vu = pick_n_take(hear_dejavu)
|
||||
var/static/regex/quoted_spoken_message = regex("\".+\"", "gi")
|
||||
hearing_args[HEARING_MESSAGE] = quoted_spoken_message.Replace(hearing_args[HEARING_MESSAGE], "\"[deja_vu]\"") //Quotes included to avoid cases where someone says part of their name
|
||||
return
|
||||
if(hear_dejavu.len >= 15)
|
||||
if(prob(50))
|
||||
popleft(hear_dejavu) //Remove the oldest
|
||||
hear_dejavu += hearing_args[HEARING_RAW_MESSAGE]
|
||||
else
|
||||
hear_dejavu += hearing_args[HEARING_RAW_MESSAGE]
|
||||
|
||||
/datum/brain_trauma/mild/mind_echo/handle_speech(datum/source, list/speech_args)
|
||||
if(speak_dejavu.len >= 5)
|
||||
if(prob(25))
|
||||
var/deja_vu = pick_n_take(speak_dejavu)
|
||||
speech_args[SPEECH_MESSAGE] = deja_vu
|
||||
return
|
||||
if(speak_dejavu.len >= 15)
|
||||
if(prob(50))
|
||||
popleft(speak_dejavu) //Remove the oldest
|
||||
speak_dejavu += speech_args[SPEECH_MESSAGE]
|
||||
else
|
||||
speak_dejavu += speech_args[SPEECH_MESSAGE]
|
||||
@@ -2,8 +2,8 @@
|
||||
name = "Phobia"
|
||||
desc = "Patient is unreasonably afraid of something."
|
||||
scan_desc = "phobia"
|
||||
gain_text = ""
|
||||
lose_text = ""
|
||||
gain_text = "<span class='warning'>You start finding default values very unnerving...</span>"
|
||||
lose_text = "<span class='notice'>You no longer feel afraid of default values.</span>"
|
||||
var/phobia_type
|
||||
var/next_check = 0
|
||||
var/next_scare = 0
|
||||
@@ -14,8 +14,10 @@
|
||||
var/list/trigger_turfs
|
||||
var/list/trigger_species
|
||||
|
||||
/datum/brain_trauma/mild/phobia/New(specific_type)
|
||||
phobia_type = specific_type
|
||||
/datum/brain_trauma/mild/phobia/New(new_phobia_type)
|
||||
if(new_phobia_type)
|
||||
phobia_type = new_phobia_type
|
||||
|
||||
if(!phobia_type)
|
||||
phobia_type = pick(SStraumas.phobia_types)
|
||||
|
||||
@@ -29,6 +31,11 @@
|
||||
trigger_species = SStraumas.phobia_species[phobia_type]
|
||||
..()
|
||||
|
||||
|
||||
/datum/brain_trauma/mild/phobia/on_clone()
|
||||
if(clonable)
|
||||
return new type(phobia_type)
|
||||
|
||||
/datum/brain_trauma/mild/phobia/on_life()
|
||||
..()
|
||||
if(HAS_TRAIT(owner, TRAIT_FEARLESS))
|
||||
@@ -44,6 +51,12 @@
|
||||
if(is_type_in_typecache(O, trigger_objs))
|
||||
freak_out(O)
|
||||
return
|
||||
for(var/mob/living/carbon/human/HU in seen_atoms) //check equipment for trigger items
|
||||
for(var/X in HU.get_all_slots() | HU.held_items)
|
||||
var/obj/I = X
|
||||
if(!QDELETED(I) && is_type_in_typecache(I, trigger_objs))
|
||||
freak_out(I)
|
||||
return
|
||||
|
||||
if(LAZYLEN(trigger_turfs))
|
||||
for(var/turf/T in seen_atoms)
|
||||
@@ -51,45 +64,41 @@
|
||||
freak_out(T)
|
||||
return
|
||||
|
||||
if(LAZYLEN(trigger_mobs) || LAZYLEN(trigger_objs))
|
||||
seen_atoms -= owner //make sure they aren't afraid of themselves.
|
||||
if(LAZYLEN(trigger_mobs) || LAZYLEN(trigger_species))
|
||||
for(var/mob/M in seen_atoms)
|
||||
if(is_type_in_typecache(M, trigger_mobs))
|
||||
freak_out(M)
|
||||
return
|
||||
|
||||
else if(ishuman(M)) //check their equipment for trigger items
|
||||
else if(ishuman(M)) //check their species
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(LAZYLEN(trigger_species) && H.dna && H.dna.species && is_type_in_typecache(H.dna.species, trigger_species))
|
||||
freak_out(H)
|
||||
return
|
||||
|
||||
for(var/X in H.get_all_slots() | H.held_items)
|
||||
var/obj/I = X
|
||||
if(!QDELETED(I) && is_type_in_typecache(I, trigger_objs))
|
||||
freak_out(I)
|
||||
return
|
||||
|
||||
/datum/brain_trauma/mild/phobia/on_hear(message, speaker, message_language, raw_message, radio_freq)
|
||||
/datum/brain_trauma/mild/phobia/handle_hearing(datum/source, list/hearing_args)
|
||||
if(!owner.can_hear() || world.time < next_scare) //words can't trigger you if you can't hear them *taps head*
|
||||
return message
|
||||
return
|
||||
if(HAS_TRAIT(owner, TRAIT_FEARLESS))
|
||||
return message
|
||||
return
|
||||
for(var/word in trigger_words)
|
||||
var/reg = regex("(\\b|\\A)[REGEX_QUOTE(word)]'?s*(\\b|\\Z)", "i")
|
||||
var/regex/reg = regex("(\\b|\\A)[REGEX_QUOTE(word)]'?s*(\\b|\\Z)", "i")
|
||||
|
||||
if(findtext(raw_message, reg))
|
||||
if(findtext(hearing_args[HEARING_RAW_MESSAGE], reg))
|
||||
addtimer(CALLBACK(src, .proc/freak_out, null, word), 10) //to react AFTER the chat message
|
||||
hearing_args[HEARING_MESSAGE] = reg.Replace(hearing_args[HEARING_MESSAGE], "<span class='phobia'>$1</span>")
|
||||
break
|
||||
return message
|
||||
|
||||
/datum/brain_trauma/mild/phobia/handle_speech(datum/source, list/speech_args)
|
||||
if(HAS_TRAIT(owner, TRAIT_FEARLESS))
|
||||
return
|
||||
for(var/word in trigger_words)
|
||||
var/reg = regex("(\\b|\\A)[REGEX_QUOTE(word)]'?s*(\\b|\\Z)", "i")
|
||||
var/regex/reg = regex("(\\b|\\A)[REGEX_QUOTE(word)]'?s*(\\b|\\Z)", "i")
|
||||
|
||||
if(findtext(speech_args[SPEECH_MESSAGE], reg))
|
||||
to_chat(owner, "<span class='warning'>You can't bring yourself to say the word \"[word]\"!</span>")
|
||||
to_chat(owner, "<span class='warning'>You can't bring yourself to say the word \"<span class='phobia'>[word]</span>\"!</span>")
|
||||
speech_args[SPEECH_MESSAGE] = ""
|
||||
|
||||
/datum/brain_trauma/mild/phobia/proc/freak_out(atom/reason, trigger_word)
|
||||
@@ -125,6 +134,76 @@
|
||||
owner.Jitter(10)
|
||||
owner.stuttering += 10
|
||||
|
||||
// Defined phobia types for badminry, not included in the RNG trauma pool to avoid diluting.
|
||||
|
||||
/datum/brain_trauma/mild/phobia/spiders
|
||||
phobia_type = "spiders"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/mild/phobia/space
|
||||
phobia_type = "space"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/mild/phobia/security
|
||||
phobia_type = "security"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/mild/phobia/clowns
|
||||
phobia_type = "clowns"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/mild/phobia/greytide
|
||||
phobia_type = "greytide"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/mild/phobia/lizards
|
||||
phobia_type = "lizards"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/mild/phobia/skeletons
|
||||
phobia_type = "skeletons"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/mild/phobia/snakes
|
||||
phobia_type = "snakes"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/mild/phobia/robots
|
||||
phobia_type = "robots"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/mild/phobia/doctors
|
||||
phobia_type = "doctors"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/mild/phobia/authority
|
||||
phobia_type = "authority"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/mild/phobia/supernatural
|
||||
phobia_type = "the supernatural"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/mild/phobia/aliens
|
||||
phobia_type = "aliens"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/mild/phobia/strangers
|
||||
phobia_type = "strangers"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/mild/phobia/birds
|
||||
phobia_type = "birds"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/mild/phobia/falling
|
||||
phobia_type = "falling"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/mild/phobia/anime
|
||||
phobia_type = "anime"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/mild/phobia/conspiracies
|
||||
phobia_type = "conspiracies"
|
||||
random_gain = FALSE
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
owner.update_disabled_bodyparts()
|
||||
|
||||
/datum/brain_trauma/severe/paralysis/paraplegic
|
||||
//can_gain = FALSE maybe breaks.
|
||||
random_gain = FALSE
|
||||
paralysis_type = "legs"
|
||||
resilience = TRAUMA_RESILIENCE_ABSOLUTE
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
/datum/brain_trauma/severe/monophobia
|
||||
name = "Monophobia"
|
||||
desc = "Patient feels sick and distressed when not around other people, leading to potentially lethal levels of stress."
|
||||
scan_desc = "severe monophobia"
|
||||
scan_desc = "monophobia"
|
||||
gain_text = ""
|
||||
lose_text = "<span class='notice'>You feel like you could be safe on your own.</span>"
|
||||
var/stress = 0
|
||||
@@ -168,7 +168,7 @@
|
||||
if(stress > 10 && (prob(5)))
|
||||
stress_reaction()
|
||||
else
|
||||
stress -= 4
|
||||
stress = max(stress - 4, 0)
|
||||
|
||||
/datum/brain_trauma/severe/monophobia/proc/check_alone()
|
||||
if(HAS_TRAIT(owner, TRAIT_BLIND))
|
||||
|
||||
@@ -22,6 +22,14 @@
|
||||
else
|
||||
speak("neutral", prob(25))
|
||||
|
||||
/datum/brain_trauma/special/godwoken/on_gain()
|
||||
ADD_TRAIT(owner, TRAIT_HOLY, TRAUMA_TRAIT)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/special/godwoken/on_lose()
|
||||
REMOVE_TRAIT(owner, TRAIT_HOLY, TRAUMA_TRAIT)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/special/godwoken/proc/speak(type, include_owner = FALSE)
|
||||
var/message
|
||||
switch(type)
|
||||
@@ -36,7 +44,7 @@
|
||||
else
|
||||
message = pick_list_replacements(BRAIN_DAMAGE_FILE, "god_neutral")
|
||||
|
||||
playsound(get_turf(owner), 'sound/magic/clockwork/invoke_general.ogg', 200, 1, 5)
|
||||
playsound(get_turf(owner), 'sound/magic/clockwork/invoke_general.ogg', 200, TRUE, 5)
|
||||
voice_of_god(message, owner, list("colossus","yell"), 2.5, include_owner, FALSE)
|
||||
|
||||
/datum/brain_trauma/special/bluespace_prophet
|
||||
@@ -134,7 +142,101 @@
|
||||
|
||||
/datum/brain_trauma/special/psychotic_brawling/bath_salts
|
||||
name = "Chemical Violent Psychosis"
|
||||
random_gain = FALSE
|
||||
clonable = FALSE
|
||||
|
||||
/datum/brain_trauma/special/tenacity
|
||||
name = "Tenacity"
|
||||
desc = "Patient is psychologically unaffected by pain and injuries, and can remain standing far longer than a normal person."
|
||||
scan_desc = "traumatic neuropathy"
|
||||
gain_text = "<span class='warning'>You suddenly stop feeling pain.</span>"
|
||||
lose_text = "<span class='warning'>You realize you can feel pain again.</span>"
|
||||
|
||||
/datum/brain_trauma/special/tenacity/on_gain()
|
||||
ADD_TRAIT(owner, TRAIT_NOSOFTCRIT, TRAUMA_TRAIT)
|
||||
ADD_TRAIT(owner, TRAIT_NOHARDCRIT, TRAUMA_TRAIT)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/special/tenacity/on_lose()
|
||||
REMOVE_TRAIT(owner, TRAIT_NOSOFTCRIT, TRAUMA_TRAIT)
|
||||
REMOVE_TRAIT(owner, TRAIT_NOHARDCRIT, TRAUMA_TRAIT)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/special/death_whispers
|
||||
name = "Functional Cerebral Necrosis"
|
||||
desc = "Patient's brain is stuck in a functional near-death state, causing occasional moments of lucid hallucinations, which are often interpreted as the voices of the dead."
|
||||
scan_desc = "chronic functional necrosis"
|
||||
gain_text = "<span class='warning'>You feel dead inside.</span>"
|
||||
lose_text = "<span class='notice'>You feel alive again.</span>"
|
||||
var/active = FALSE
|
||||
|
||||
/datum/brain_trauma/special/death_whispers/on_life()
|
||||
..()
|
||||
if(!active && prob(2))
|
||||
whispering()
|
||||
|
||||
/datum/brain_trauma/special/death_whispers/on_lose()
|
||||
if(active)
|
||||
cease_whispering()
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/special/death_whispers/proc/whispering()
|
||||
ADD_TRAIT(owner, TRAIT_SIXTHSENSE, TRAUMA_TRAIT)
|
||||
active = TRUE
|
||||
addtimer(CALLBACK(src, .proc/cease_whispering), rand(50, 300))
|
||||
|
||||
/datum/brain_trauma/special/death_whispers/proc/cease_whispering()
|
||||
REMOVE_TRAIT(owner, TRAIT_SIXTHSENSE, TRAUMA_TRAIT)
|
||||
active = FALSE
|
||||
|
||||
/datum/brain_trauma/special/existential_crisis
|
||||
name = "Existential Crisis"
|
||||
desc = "Patient's hold on reality becomes faint, causing occasional bouts of non-existence."
|
||||
scan_desc = "existential crisis"
|
||||
gain_text = "<span class='notice'>You feel less real.</span>"
|
||||
lose_text = "<span class='warning'>You feel more substantial again.</span>"
|
||||
var/obj/effect/abstract/sync_holder/veil/veil
|
||||
var/next_crisis = 0
|
||||
|
||||
/datum/brain_trauma/special/existential_crisis/on_life()
|
||||
..()
|
||||
if(!veil && world.time > next_crisis && prob(3))
|
||||
if(isturf(owner.loc))
|
||||
fade_out()
|
||||
|
||||
/datum/brain_trauma/special/existential_crisis/on_lose()
|
||||
if(veil)
|
||||
fade_in()
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/special/existential_crisis/proc/fade_out()
|
||||
if(veil)
|
||||
return
|
||||
var/duration = rand(50, 450)
|
||||
veil = new(owner.drop_location())
|
||||
to_chat(owner, "<span class='warning'>[pick("You stop thinking for a moment. Therefore you are not.",\
|
||||
"To be or not to be...",\
|
||||
"Why exist?",\
|
||||
"You stop keeping it real.",\
|
||||
"Your grip on existence slips.",\
|
||||
"Do you even exist?",\
|
||||
"You simply fade away.")]</span>")
|
||||
owner.forceMove(veil)
|
||||
SEND_SIGNAL(owner, COMSIG_MOVABLE_SECLUDED_LOCATION)
|
||||
for(var/thing in owner)
|
||||
var/atom/movable/AM = thing
|
||||
SEND_SIGNAL(AM, COMSIG_MOVABLE_SECLUDED_LOCATION)
|
||||
next_crisis = world.time + 600
|
||||
addtimer(CALLBACK(src, .proc/fade_in), duration)
|
||||
|
||||
/datum/brain_trauma/special/existential_crisis/proc/fade_in()
|
||||
QDEL_NULL(veil)
|
||||
to_chat(owner, "<span class='notice'>You fade back into reality.</span>")
|
||||
next_crisis = world.time + 600
|
||||
|
||||
//base sync holder is in desynchronizer.dm
|
||||
/obj/effect/abstract/sync_holder/veil
|
||||
name = "non-existence"
|
||||
desc = "Existence is just a state of mind."
|
||||
|
||||
/datum/brain_trauma/special/beepsky
|
||||
name = "Criminal"
|
||||
@@ -142,6 +244,7 @@
|
||||
scan_desc = "criminal mind"
|
||||
gain_text = "<span class='warning'>Justice is coming for you.</span>"
|
||||
lose_text = "<span class='notice'>You were absolved for your crimes.</span>"
|
||||
clonable = FALSE
|
||||
random_gain = FALSE
|
||||
var/obj/effect/hallucination/simple/securitron/beepsky
|
||||
|
||||
@@ -201,4 +304,4 @@
|
||||
|
||||
/obj/effect/hallucination/simple/securitron/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess,src)
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
var/mob/living/split_personality/owner_backseat
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/on_gain()
|
||||
var/mob/living/M = owner
|
||||
if(M.stat == DEAD) //No use assigning people to a corpse
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
make_backseats()
|
||||
get_ghost()
|
||||
@@ -23,7 +27,7 @@
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/proc/get_ghost()
|
||||
set waitfor = FALSE
|
||||
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [owner]'s split personality?", ROLE_PAI, null, null, 75, stranger_backseat)
|
||||
var/list/mob/dead/observer/candidates = pollCandidatesForMob("Do you want to play as [owner]'s split personality?", ROLE_PAI, null, null, 75, stranger_backseat, POLL_IGNORE_SPLITPERSONALITY)
|
||||
if(LAZYLEN(candidates))
|
||||
var/mob/dead/observer/C = pick(candidates)
|
||||
C.transfer_ckey(stranger_backseat, FALSE)
|
||||
@@ -191,13 +195,13 @@
|
||||
/datum/brain_trauma/severe/split_personality/brainwashing/on_life()
|
||||
return //no random switching
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/brainwashing/on_hear(message, speaker, message_language, raw_message, radio_freq)
|
||||
if(HAS_TRAIT(owner, TRAIT_DEAF) || owner == speaker)
|
||||
return message
|
||||
/datum/brain_trauma/severe/split_personality/brainwashing/handle_hearing(datum/source, list/hearing_args)
|
||||
if(HAS_TRAIT(owner, TRAIT_DEAF) || owner == hearing_args[HEARING_SPEAKER])
|
||||
return
|
||||
var/message = hearing_args[HEARING_MESSAGE]
|
||||
if(findtext(message, codeword))
|
||||
message = replacetext(message, codeword, "<span class='warning'>[codeword]</span>")
|
||||
hearing_args[HEARING_MESSAGE] = replacetext(message, codeword, "<span class='warning'>[codeword]</span>")
|
||||
addtimer(CALLBACK(src, /datum/brain_trauma/severe/split_personality.proc/switch_personalities), 10)
|
||||
return message
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/brainwashing/handle_speech(datum/source, list/speech_args)
|
||||
if(findtext(speech_args[SPEECH_MESSAGE], codeword))
|
||||
|
||||
@@ -29,21 +29,21 @@
|
||||
var/obj/item/typecast = upgrade_item
|
||||
upgrade_name = initial(typecast.name)
|
||||
|
||||
/datum/component/armor_plate/proc/examine(datum/source, mob/user)
|
||||
/datum/component/armor_plate/proc/examine(datum/source, mob/user, list/examine_list)
|
||||
//upgrade_item could also be typecast here instead
|
||||
if(ismecha(parent))
|
||||
if(amount)
|
||||
if(amount < maxamount)
|
||||
to_chat(user, "<span class='notice'>Its armor is enhanced with [amount] [upgrade_name].</span>")
|
||||
examine_list += "<span class='notice'>Its armor is enhanced with [amount] [upgrade_name].</span>"
|
||||
else
|
||||
to_chat(user, "<span class='notice'>It's wearing a fearsome carapace entirely composed of [upgrade_name] - its pilot must be an experienced monster hunter.</span>")
|
||||
examine_list += "<span class='notice'>It's wearing a fearsome carapace entirely composed of [upgrade_name] - its pilot must be an experienced monster hunter.</span>"
|
||||
else
|
||||
to_chat(user, "<span class='notice'>It has attachment points for strapping monster hide on for added protection.</span>")
|
||||
examine_list += "<span class='notice'>It has attachment points for strapping monster hide on for added protection.</span>"
|
||||
else
|
||||
if(amount)
|
||||
to_chat(user, "<span class='notice'>It has been strengthened with [amount]/[maxamount] [upgrade_name].</span>")
|
||||
examine_list += "<span class='notice'>It has been strengthened with [amount]/[maxamount] [upgrade_name].</span>"
|
||||
else
|
||||
to_chat(user, "<span class='notice'>It can be strengthened with up to [maxamount] [upgrade_name].</span>")
|
||||
examine_list += "<span class='notice'>It can be strengthened with up to [maxamount] [upgrade_name].</span>"
|
||||
|
||||
/datum/component/armor_plate/proc/applyplate(datum/source, obj/item/I, mob/user, params)
|
||||
if(!istype(I,upgrade_item))
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY,.proc/action)
|
||||
update_parent(index)
|
||||
|
||||
/datum/component/construction/proc/examine(datum/source, mob/user)
|
||||
/datum/component/construction/proc/examine(datum/source, mob/user, list/examine_list)
|
||||
if(desc)
|
||||
to_chat(user, desc)
|
||||
examine_list += desc
|
||||
|
||||
/datum/component/construction/proc/on_step()
|
||||
if(index > steps.len)
|
||||
|
||||
@@ -71,5 +71,5 @@
|
||||
if(strength >= cleanable)
|
||||
qdel(src)
|
||||
|
||||
/datum/component/decal/proc/examine(datum/source, mob/user)
|
||||
to_chat(user, description)
|
||||
/datum/component/decal/proc/examine(datum/source, mob/user, list/examine_list)
|
||||
examine_list += description
|
||||
@@ -15,8 +15,8 @@
|
||||
for(var/i in parent)
|
||||
RegisterSignal(i, COMSIG_MOVABLE_PRE_THROW, .proc/throw_react)
|
||||
|
||||
/datum/component/magnetic_catch/proc/examine(datum/source, mob/user)
|
||||
to_chat(user, "It has been installed with inertia dampening to prevent coffee spills.")
|
||||
/datum/component/magnetic_catch/proc/examine(datum/source, mob/user, list/examine_list)
|
||||
examine_list += "It has been installed with inertia dampening to prevent coffee spills."
|
||||
|
||||
/datum/component/magnetic_catch/proc/crossed_react(datum/source, atom/movable/thing)
|
||||
RegisterSignal(thing, COMSIG_MOVABLE_PRE_THROW, .proc/throw_react, TRUE)
|
||||
|
||||
@@ -49,13 +49,13 @@
|
||||
var/mat_path = possible_mats[id]
|
||||
materials[id] = new mat_path()
|
||||
|
||||
/datum/component/material_container/proc/OnExamine(datum/source, mob/user)
|
||||
/datum/component/material_container/proc/OnExamine(datum/source, mob/user, list/examine_list)
|
||||
if(show_on_examine)
|
||||
for(var/I in materials)
|
||||
var/datum/material/M = materials[I]
|
||||
var/amt = amount(M.id)
|
||||
if(amt)
|
||||
to_chat(user, "<span class='notice'>It has [amt] units of [lowertext(M.name)] stored.</span>")
|
||||
examine_list += "<span class='notice'>It has [amt] units of [lowertext(M.name)] stored.</span>"
|
||||
|
||||
/datum/component/material_container/proc/OnAttackBy(datum/source, obj/item/I, mob/living/user)
|
||||
var/list/tc = allowed_typecache
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
RegisterSignal(parent, COMSIG_MOB_ALLOWED, .proc/check_access)
|
||||
RegisterSignal(parent, COMSIG_LIVING_ELECTROCUTE_ACT, .proc/on_shock)
|
||||
RegisterSignal(parent, COMSIG_LIVING_MINOR_SHOCK, .proc/on_minor_shock)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_HEAR, .proc/on_hear)
|
||||
RegisterSignal(parent, COMSIG_SPECIES_GAIN, .proc/check_viable_biotype)
|
||||
RegisterSignal(parent, COMSIG_NANITE_SIGNAL, .proc/receive_signal)
|
||||
|
||||
@@ -191,11 +190,6 @@
|
||||
var/datum/nanite_program/NP = X
|
||||
NP.on_death(gibbed)
|
||||
|
||||
/datum/component/nanites/proc/on_hear(datum/source, message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
for(var/X in programs)
|
||||
var/datum/nanite_program/NP = X
|
||||
NP.on_hear(message, speaker, message_language, raw_message, radio_freq, spans, message_mode)
|
||||
|
||||
/datum/component/nanites/proc/receive_signal(datum/source, code, source = "an unidentified source")
|
||||
for(var/X in programs)
|
||||
var/datum/nanite_program/NP = X
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
hl3_release_date = _half_life
|
||||
can_contaminate = _can_contaminate
|
||||
|
||||
if(istype(parent, /atom))
|
||||
if(istype(parent, /atom))
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/rad_examine)
|
||||
if(istype(parent, /obj/item))
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/rad_attack)
|
||||
@@ -58,7 +58,7 @@
|
||||
else
|
||||
strength = max(strength, arguments[1])
|
||||
|
||||
/datum/component/radioactive/proc/rad_examine(datum/source, mob/user, atom/thing)
|
||||
/datum/component/radioactive/proc/rad_examine(datum/source, mob/user, list/examine_list)
|
||||
var/atom/master = parent
|
||||
var/list/out = list()
|
||||
if(get_dist(master, user) <= 1)
|
||||
@@ -72,7 +72,7 @@
|
||||
out += "[out ? " and it " : "[master] "]hurts to look at."
|
||||
else
|
||||
out += "."
|
||||
to_chat(user, out.Join())
|
||||
examine_list += out.Join()
|
||||
|
||||
/datum/component/radioactive/proc/rad_attack(datum/source, atom/movable/target, mob/living/user)
|
||||
radiation_pulse(parent, strength/20)
|
||||
|
||||
@@ -98,9 +98,9 @@
|
||||
remove_verbs()
|
||||
. = ..()
|
||||
|
||||
/datum/component/simple_rotation/proc/ExamineMessage(datum/source, mob/user)
|
||||
/datum/component/simple_rotation/proc/ExamineMessage(datum/source, mob/user, list/examine_list)
|
||||
if(rotation_flags & ROTATION_ALTCLICK)
|
||||
to_chat(user, "<span class='notice'>Alt-click to rotate it clockwise.</span>")
|
||||
examine_list += "<span class='notice'>Alt-click to rotate it clockwise.</span>"
|
||||
|
||||
/datum/component/simple_rotation/proc/HandRot(datum/source, mob/user, rotation = default_rotation_direction)
|
||||
if(!can_be_rotated.Invoke(user, rotation) || !can_user_rotate.Invoke(user, rotation))
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
if(!ismovableatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_Z_CHANGED), .proc/check_in_bounds)
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_SECLUDED_LOCATION), .proc/relocate)
|
||||
RegisterSignal(parent, list(COMSIG_PARENT_PREQDELETED), .proc/check_deletion)
|
||||
RegisterSignal(parent, list(COMSIG_ITEM_IMBUE_SOUL), .proc/check_soul_imbue)
|
||||
src.inform_admins = inform_admins
|
||||
@@ -32,6 +33,7 @@
|
||||
|
||||
var/atom/movable/AM = parent
|
||||
AM.forceMove(targetturf)
|
||||
to_chat(get(parent, /mob), "<span class='danger'>You can't help but feel that you just lost something back there...</span>")
|
||||
// move the disc, so ghosts remain orbiting it even if it's "destroyed"
|
||||
return targetturf
|
||||
|
||||
@@ -40,7 +42,6 @@
|
||||
return
|
||||
else
|
||||
var/turf/currentturf = get_turf(src)
|
||||
to_chat(get(parent, /mob), "<span class='danger'>You can't help but feel that you just lost something back there...</span>")
|
||||
var/turf/targetturf = relocate()
|
||||
log_game("[parent] has been moved out of bounds in [loc_name(currentturf)]. Moving it to [loc_name(targetturf)].")
|
||||
if(inform_admins)
|
||||
|
||||
@@ -309,6 +309,7 @@
|
||||
else
|
||||
var/datum/numbered_display/ND = .[I.type]
|
||||
ND.number++
|
||||
. = sortTim(., /proc/cmp_numbered_displays_name_asc, associative = TRUE)
|
||||
|
||||
//This proc determines the size of the inventory to be displayed. Please touch it only if you know what you're doing.
|
||||
/datum/component/storage/proc/orient2hud(mob/user, maxcolumns)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
var/restraining = 0 //used in cqc's disarm_act to check if the disarmed is being restrained and so whether they should be put in a chokehold or not
|
||||
var/help_verb
|
||||
var/no_guns = FALSE
|
||||
var/pacifism_check = TRUE //are the martial arts combos/attacks unable to be used by pacifist.
|
||||
var/allow_temp_override = TRUE //if this martial art can be overridden by temporary martial arts
|
||||
|
||||
/datum/martial_art/proc/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/datum/martial_art/boxing
|
||||
name = "Boxing"
|
||||
id = MARTIALART_BOXING
|
||||
pacifism_check = FALSE //Let's pretend pacifists can boxe the heck out of other people, it only deals stamina damage right now.
|
||||
|
||||
/datum/martial_art/boxing/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
to_chat(A, "<span class='warning'>Can't disarm while boxing!</span>")
|
||||
@@ -16,14 +17,15 @@
|
||||
|
||||
var/atk_verb = pick("left hook","right hook","straight punch")
|
||||
|
||||
var/damage = rand(5, 8) + A.dna.species.punchdamagelow
|
||||
if(!damage)
|
||||
var/damage = rand(10, 13)
|
||||
var/extra_damage = rand(A.dna.species.punchdamagelow, A.dna.species.punchdamagehigh)
|
||||
if(extra_damage == A.dna.species.punchdamagelow)
|
||||
playsound(D.loc, A.dna.species.miss_sound, 25, 1, -1)
|
||||
D.visible_message("<span class='warning'>[A] has attempted to [atk_verb] [D]!</span>", \
|
||||
"<span class='userdanger'>[A] has attempted to [atk_verb] [D]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
log_combat(A, D, "attempted to hit", atk_verb)
|
||||
return 0
|
||||
|
||||
return TRUE
|
||||
damage += extra_damage
|
||||
|
||||
var/obj/item/bodypart/affecting = D.get_bodypart(ran_zone(A.zone_selected))
|
||||
var/armor_block = D.run_armor_check(affecting, "melee")
|
||||
|
||||
@@ -124,6 +124,8 @@
|
||||
add_to_streak("G",D)
|
||||
if(check_streak(A,D))
|
||||
return TRUE
|
||||
if(A == D) // no self grab.
|
||||
return FALSE
|
||||
if(A.grab_state >= GRAB_AGGRESSIVE)
|
||||
D.grabbedby(A, 1)
|
||||
else
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
owner.visible_message("<span class='danger'>[owner] assumes a neutral stance.</span>", "<b><i>Your next attack is cleared.</i></b>")
|
||||
H.mind.martial_art.streak = ""
|
||||
else
|
||||
if(HAS_TRAIT(H, TRAIT_PACIFISM))
|
||||
to_chat(H, "<span class='warning'>You don't want to harm other people!</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] assumes the Neck Chop stance!</span>", "<b><i>Your next attack will be a Neck Chop.</i></b>")
|
||||
H.mind.martial_art.streak = "neck_chop"
|
||||
|
||||
@@ -36,6 +39,9 @@
|
||||
owner.visible_message("<span class='danger'>[owner] assumes a neutral stance.</span>", "<b><i>Your next attack is cleared.</i></b>")
|
||||
H.mind.martial_art.streak = ""
|
||||
else
|
||||
if(HAS_TRAIT(H, TRAIT_PACIFISM))
|
||||
to_chat(H, "<span class='warning'>You don't want to harm other people!</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] assumes the Leg Sweep stance!</span>", "<b><i>Your next attack will be a Leg Sweep.</i></b>")
|
||||
H.mind.martial_art.streak = "leg_sweep"
|
||||
|
||||
@@ -53,6 +59,9 @@
|
||||
owner.visible_message("<span class='danger'>[owner] assumes a neutral stance.</span>", "<b><i>Your next attack is cleared.</i></b>")
|
||||
H.mind.martial_art.streak = ""
|
||||
else
|
||||
if(HAS_TRAIT(H, TRAIT_PACIFISM))
|
||||
to_chat(H, "<span class='warning'>You don't want to harm other people!</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] assumes the Lung Punch stance!</span>", "<b><i>Your next attack will be a Lung Punch.</i></b>")
|
||||
H.mind.martial_art.streak = "quick_choke"//internal name for lung punch
|
||||
|
||||
@@ -145,8 +154,6 @@
|
||||
return 1
|
||||
|
||||
/datum/martial_art/krav_maga/disarm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
var/obj/item/I = null
|
||||
if(prob(60))
|
||||
I = D.get_active_held_item()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/datum/martial_art/psychotic_brawling
|
||||
name = "Psychotic Brawling"
|
||||
id = MARTIALART_PSYCHOBRAWL
|
||||
pacifism_check = FALSE //Quite uncontrollable and unpredictable, people will still end up harming others with it.
|
||||
|
||||
/datum/martial_art/psychotic_brawling/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
return psycho_attack(A,D)
|
||||
|
||||
@@ -105,6 +105,8 @@
|
||||
add_to_streak("G",D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
if(A == D) //no self grab stun
|
||||
return FALSE
|
||||
if(A.grab_state >= GRAB_AGGRESSIVE)
|
||||
D.grabbedby(A, 1)
|
||||
else
|
||||
|
||||
@@ -49,6 +49,9 @@
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't WRESTLE while you're OUT FOR THE COUNT.</span>")
|
||||
return
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
to_chat(owner, "<span class='warning'>You are too HIPPIE to WRESTLE other living beings!</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] prepares to BODY SLAM!</span>", "<b><i>Your next attack will be a BODY SLAM.</i></b>")
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.mind.martial_art.streak = "slam"
|
||||
@@ -61,6 +64,9 @@
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't WRESTLE while you're OUT FOR THE COUNT.</span>")
|
||||
return
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
to_chat(owner, "<span class='warning'>You are too HIPPIE to WRESTLE other living beings!</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] prepares to THROW!</span>", "<b><i>Your next attack will be a THROW.</i></b>")
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.mind.martial_art.streak = "throw"
|
||||
@@ -73,6 +79,9 @@
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't WRESTLE while you're OUT FOR THE COUNT.</span>")
|
||||
return
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
to_chat(owner, "<span class='warning'>You are too HIPPIE to WRESTLE other living beings!</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] prepares to KICK!</span>", "<b><i>Your next attack will be a KICK.</i></b>")
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.mind.martial_art.streak = "kick"
|
||||
@@ -85,6 +94,9 @@
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't WRESTLE while you're OUT FOR THE COUNT.</span>")
|
||||
return
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
to_chat(owner, "<span class='warning'>You are too HIPPIE to WRESTLE other living beings!</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] prepares to STRIKE!</span>", "<b><i>Your next attack will be a STRIKE.</i></b>")
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.mind.martial_art.streak = "strike"
|
||||
@@ -97,6 +109,9 @@
|
||||
if(owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You can't WRESTLE while you're OUT FOR THE COUNT.</span>")
|
||||
return
|
||||
if(HAS_TRAIT(owner, TRAIT_PACIFISM))
|
||||
to_chat(owner, "<span class='warning'>You are too HIPPIE to WRESTLE other living beings!</span>")
|
||||
return
|
||||
owner.visible_message("<span class='danger'>[owner] prepares to LEG DROP!</span>", "<b><i>Your next attack will be a LEG DROP.</i></b>")
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.mind.martial_art.streak = "drop"
|
||||
@@ -433,8 +448,8 @@
|
||||
/datum/martial_art/wrestling/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(check_streak(A,D))
|
||||
return 1
|
||||
if(A.pulling == D)
|
||||
return 1
|
||||
if(A.pulling == D || A == D) // don't stun grab yoursel
|
||||
return FALSE
|
||||
A.start_pulling(D)
|
||||
D.visible_message("<span class='danger'>[A] gets [D] in a cinch!</span>", \
|
||||
"<span class='userdanger'>[A] gets [D] in a cinch!</span>")
|
||||
|
||||
@@ -28,16 +28,16 @@
|
||||
var/can_be_admin_equipped = TRUE // Set to FALSE if your outfit requires runtime parameters
|
||||
var/list/chameleon_extras //extra types for chameleon outfit changes, mostly guns
|
||||
|
||||
/datum/outfit/proc/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||
/datum/outfit/proc/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source)
|
||||
//to be overridden for customization depending on client prefs,species etc
|
||||
return
|
||||
|
||||
/datum/outfit/proc/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||
/datum/outfit/proc/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source)
|
||||
//to be overridden for toggling internals, id binding, access etc
|
||||
return
|
||||
|
||||
/datum/outfit/proc/equip(mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||
pre_equip(H, visualsOnly)
|
||||
/datum/outfit/proc/equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source)
|
||||
pre_equip(H, visualsOnly, preference_source)
|
||||
|
||||
//Start with uniform,suit,backpack for additional slots
|
||||
if(uniform)
|
||||
@@ -103,7 +103,7 @@
|
||||
var/obj/item/clothing/suit/space/hardsuit/HS = H.wear_suit
|
||||
HS.ToggleHelmet()
|
||||
|
||||
post_equip(H, visualsOnly)
|
||||
post_equip(H, visualsOnly, preference_source)
|
||||
|
||||
if(!visualsOnly)
|
||||
apply_fingerprints(H)
|
||||
|
||||
@@ -567,8 +567,7 @@ datum/status_effect/pacify
|
||||
tick_interval = 10
|
||||
examine_text = "<span class='warning'>SUBJECTPRONOUN seems slow and unfocused.</span>"
|
||||
var/stun = TRUE
|
||||
var/triggered = FALSE
|
||||
alert_type = null
|
||||
alert_type = /obj/screen/alert/status_effect/trance
|
||||
|
||||
/obj/screen/alert/status_effect/trance
|
||||
name = "Trance"
|
||||
@@ -576,17 +575,6 @@ datum/status_effect/pacify
|
||||
icon_state = "high"
|
||||
|
||||
/datum/status_effect/trance/tick()
|
||||
if(HAS_TRAIT(owner, "hypnotherapy"))
|
||||
if(triggered == TRUE)
|
||||
UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
|
||||
RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/hypnotize)
|
||||
ADD_TRAIT(owner, TRAIT_MUTE, "trance")
|
||||
if(!owner.has_quirk(/datum/quirk/monochromatic))
|
||||
owner.add_client_colour(/datum/client_colour/monochrome)
|
||||
to_chat(owner, "<span class='warning'>[pick("You feel your thoughts slow down...", "You suddenly feel extremely dizzy...", "You feel like you're in the middle of a dream...","You feel incredibly relaxed...")]</span>")
|
||||
triggered = FALSE
|
||||
else
|
||||
return
|
||||
if(stun)
|
||||
owner.Stun(60, TRUE, TRUE)
|
||||
owner.dizziness = 20
|
||||
@@ -594,47 +582,88 @@ datum/status_effect/pacify
|
||||
/datum/status_effect/trance/on_apply()
|
||||
if(!iscarbon(owner))
|
||||
return FALSE
|
||||
if(HAS_TRAIT(owner, "hypnotherapy"))
|
||||
RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/listen)
|
||||
return TRUE
|
||||
alert_type = /obj/screen/alert/status_effect/trance
|
||||
RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/hypnotize)
|
||||
ADD_TRAIT(owner, TRAIT_MUTE, "trance")
|
||||
if(!owner.has_quirk(/datum/quirk/monochromatic))
|
||||
owner.add_client_colour(/datum/client_colour/monochrome)
|
||||
owner.add_client_colour(/datum/client_colour/monochrome/trance)
|
||||
owner.visible_message("[stun ? "<span class='warning'>[owner] stands still as [owner.p_their()] eyes seem to focus on a distant point.</span>" : ""]", \
|
||||
"<span class='warning'>[pick("You feel your thoughts slow down...", "You suddenly feel extremely dizzy...", "You feel like you're in the middle of a dream...","You feel incredibly relaxed...")]</span>")
|
||||
return TRUE
|
||||
|
||||
/datum/status_effect/trance/on_creation(mob/living/new_owner, _duration, _stun = TRUE, source_quirk = FALSE)//hypnoquirk makes no visible message, prevents self antag messages, and places phrase below objectives.
|
||||
/datum/status_effect/trance/on_creation(mob/living/new_owner, _duration, _stun = TRUE)
|
||||
duration = _duration
|
||||
stun = _stun
|
||||
if(source_quirk == FALSE && HAS_TRAIT(owner, "hypnotherapy"))
|
||||
REMOVE_TRAIT(owner, "hypnotherapy", ROUNDSTART_TRAIT)
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/trance/on_remove()
|
||||
UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
|
||||
REMOVE_TRAIT(owner, TRAIT_MUTE, "trance")
|
||||
owner.dizziness = 0
|
||||
if(!owner.has_quirk(/datum/quirk/monochromatic))
|
||||
owner.remove_client_colour(/datum/client_colour/monochrome)
|
||||
owner.remove_client_colour(/datum/client_colour/monochrome/trance)
|
||||
to_chat(owner, "<span class='warning'>You snap out of your trance!</span>")
|
||||
|
||||
/datum/status_effect/trance/proc/listen(datum/source, message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
to_chat(owner, "<span class='notice'><i>[speaker] accidentally sets off your implanted trigger, sending you into a hypnotic daze!</i></span>")
|
||||
triggered = TRUE
|
||||
|
||||
/datum/status_effect/trance/proc/hypnotize(datum/source, message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
/datum/status_effect/trance/proc/hypnotize(datum/source, list/hearing_args)
|
||||
if(!owner.can_hear())
|
||||
return
|
||||
if(speaker == owner)
|
||||
if(hearing_args[HEARING_SPEAKER] == owner)
|
||||
return
|
||||
var/mob/living/carbon/C = owner
|
||||
C.cure_trauma_type(/datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY) //clear previous hypnosis
|
||||
if(HAS_TRAIT(C, "hypnotherapy"))
|
||||
addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, raw_message, TRUE), 10)
|
||||
else
|
||||
addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, raw_message), 10)
|
||||
addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, hearing_args[HEARING_RAW_MESSAGE]), 10)
|
||||
addtimer(CALLBACK(C, /mob/living.proc/Stun, 60, TRUE, TRUE), 15) //Take some time to think about it
|
||||
qdel(src)
|
||||
|
||||
/datum/status_effect/spasms
|
||||
id = "spasms"
|
||||
status_type = STATUS_EFFECT_MULTIPLE
|
||||
alert_type = null
|
||||
|
||||
/datum/status_effect/spasms/tick()
|
||||
if(prob(15))
|
||||
switch(rand(1,5))
|
||||
if(1)
|
||||
if((!owner.lying && !owner.buckled) && isturf(owner.loc))
|
||||
to_chat(owner, "<span class='warning'>Your leg spasms!</span>")
|
||||
step(owner, pick(GLOB.cardinals))
|
||||
if(2)
|
||||
if(owner.incapacitated())
|
||||
return
|
||||
var/obj/item/I = owner.get_active_held_item()
|
||||
if(I)
|
||||
to_chat(owner, "<span class='warning'>Your fingers spasm!</span>")
|
||||
owner.log_message("used [I] due to a Muscle Spasm", LOG_ATTACK)
|
||||
I.attack_self(owner)
|
||||
if(3)
|
||||
var/prev_intent = owner.a_intent
|
||||
owner.a_intent = INTENT_HARM
|
||||
|
||||
var/range = 1
|
||||
if(istype(owner.get_active_held_item(), /obj/item/gun)) //get targets to shoot at
|
||||
range = 7
|
||||
|
||||
var/list/mob/living/targets = list()
|
||||
for(var/mob/M in oview(owner, range))
|
||||
if(isliving(M))
|
||||
targets += M
|
||||
if(LAZYLEN(targets))
|
||||
to_chat(owner, "<span class='warning'>Your arm spasms!</span>")
|
||||
owner.log_message(" attacked someone due to a Muscle Spasm", LOG_ATTACK) //the following attack will log itself
|
||||
owner.ClickOn(pick(targets))
|
||||
owner.a_intent = prev_intent
|
||||
if(4)
|
||||
var/prev_intent = owner.a_intent
|
||||
owner.a_intent = INTENT_HARM
|
||||
to_chat(owner, "<span class='warning'>Your arm spasms!</span>")
|
||||
owner.log_message("attacked [owner.p_them()]self to a Muscle Spasm", LOG_ATTACK)
|
||||
owner.ClickOn(owner)
|
||||
owner.a_intent = prev_intent
|
||||
if(5)
|
||||
if(owner.incapacitated())
|
||||
return
|
||||
var/obj/item/I = owner.get_active_held_item()
|
||||
var/list/turf/targets = list()
|
||||
for(var/turf/T in oview(owner, 3))
|
||||
targets += T
|
||||
if(LAZYLEN(targets) && I)
|
||||
to_chat(owner, "<span class='warning'>Your arm spasms!</span>")
|
||||
owner.log_message("threw [I] due to a Muscle Spasm", LOG_ATTACK)
|
||||
owner.throw_item(pick(targets))
|
||||
@@ -69,3 +69,17 @@
|
||||
/datum/status_effect/in_love/tick()
|
||||
if(date)
|
||||
new /obj/effect/temp_visual/love_heart/invisible(get_turf(date.loc), owner)
|
||||
|
||||
/datum/status_effect/throat_soothed
|
||||
id = "throat_soothed"
|
||||
duration = 60 SECONDS
|
||||
status_type = STATUS_EFFECT_REFRESH
|
||||
alert_type = null
|
||||
|
||||
/datum/status_effect/throat_soothed/on_apply()
|
||||
. = ..()
|
||||
ADD_TRAIT(owner, TRAIT_SOOTHED_THROAT, "[STATUS_EFFECT_TRAIT]_[id]")
|
||||
|
||||
/datum/status_effect/throat_soothed/on_remove()
|
||||
. = ..()
|
||||
REMOVE_TRAIT(owner, TRAIT_SOOTHED_THROAT, "[STATUS_EFFECT_TRAIT]_[id]")
|
||||
@@ -64,6 +64,12 @@
|
||||
owner = null
|
||||
qdel(src)
|
||||
|
||||
/datum/status_effect/proc/refresh()
|
||||
var/original_duration = initial(duration)
|
||||
if(original_duration == -1)
|
||||
return
|
||||
duration = world.time + original_duration
|
||||
|
||||
//clickdelay/nextmove modifiers!
|
||||
/datum/status_effect/proc/nextmove_modifier()
|
||||
return 1
|
||||
@@ -92,6 +98,9 @@
|
||||
if(S.id == initial(S1.id) && S.status_type)
|
||||
if(S.status_type == STATUS_EFFECT_REPLACE)
|
||||
S.be_replaced()
|
||||
else if(S.status_type == STATUS_EFFECT_REFRESH)
|
||||
S.refresh()
|
||||
return
|
||||
else
|
||||
return
|
||||
var/list/arguments = args.Copy()
|
||||
|
||||
+12
-12
@@ -280,35 +280,35 @@
|
||||
|
||||
///Generate the full examine string of this atom (including icon for goonchat)
|
||||
/atom/proc/get_examine_string(mob/user, thats = FALSE)
|
||||
. = "[icon2html(src, user)] [thats? "That's ":""][get_examine_name(user)]"
|
||||
return "[icon2html(src, user)] [thats? "That's ":""][get_examine_name(user)]"
|
||||
|
||||
/atom/proc/examine(mob/user)
|
||||
to_chat(user, "[get_examine_string(user, TRUE)].")
|
||||
. = list("[get_examine_string(user, TRUE)].")
|
||||
|
||||
if(desc)
|
||||
to_chat(user, desc)
|
||||
. += desc
|
||||
|
||||
if(reagents)
|
||||
if(reagents.reagents_holder_flags & TRANSPARENT)
|
||||
to_chat(user, "It contains:")
|
||||
if(reagents.reagent_list.len)
|
||||
. += "It contains:"
|
||||
if(length(reagents.reagent_list))
|
||||
if(user.can_see_reagents()) //Show each individual reagent
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
to_chat(user, "[R.volume] units of [R.name]")
|
||||
. += "[R.volume] units of [R.name]"
|
||||
else //Otherwise, just show the total volume
|
||||
var/total_volume = 0
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
total_volume += R.volume
|
||||
to_chat(user, "[total_volume] units of various reagents")
|
||||
. += "[total_volume] units of various reagents"
|
||||
else
|
||||
to_chat(user, "Nothing.")
|
||||
. += "Nothing."
|
||||
else if(reagents.reagents_holder_flags & AMOUNT_VISIBLE)
|
||||
if(reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>It has [reagents.total_volume] unit\s left.</span>")
|
||||
. += "<span class='notice'>It has [reagents.total_volume] unit\s left.</span>"
|
||||
else
|
||||
to_chat(user, "<span class='danger'>It's empty.</span>")
|
||||
. += "<span class='danger'>It's empty.</span>"
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user)
|
||||
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)
|
||||
|
||||
/atom/proc/relaymove(mob/user)
|
||||
if(buckle_message_cooldown <= world.time)
|
||||
@@ -660,7 +660,7 @@
|
||||
var/atom/L = loc
|
||||
if(!L)
|
||||
return null
|
||||
return L.AllowDrop() ? L : get_turf(L)
|
||||
return L.AllowDrop() ? L : L.drop_location()
|
||||
|
||||
/atom/Entered(atom/movable/AM, atom/oldLoc)
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_ENTERED, AM, oldLoc)
|
||||
|
||||
@@ -339,10 +339,6 @@ Credit where due:
|
||||
CLOCKCULTCHANGELOG\
|
||||
</ul>\
|
||||
<hr>\
|
||||
<li><b>Zelus oil:</b> A new reagent. It can be used to heal the faithful to Ratvar, or kill heretics and moreso stun blood cultists,\
|
||||
or splashed onto metal sheets to make brass. This chemical can be found in minimal quantities by grinding brass sheets.\
|
||||
<li><b>Brass Flasks:</b>Intended to store Zelus Oil in, but can also be used as fragile single use throwing weapons in a pinch! \
|
||||
These are crafted with a single sheet of brass and fit in the Clockwork Cuirass' suit storage.\
|
||||
<b>Good luck!</b>"
|
||||
|
||||
/obj/item/paper/servant_primer/Initialize()
|
||||
@@ -353,7 +349,7 @@ Credit where due:
|
||||
changelog_contents += "<li>[entry]</li>"
|
||||
info = replacetext(info, "CLOCKCULTCHANGELOG", changelog_contents)
|
||||
|
||||
/obj/item/paper/servant_primer/examine(mob/user)
|
||||
if(!is_servant_of_ratvar(user) && !isobserver(user))
|
||||
to_chat(user, "<span class='danger'>You can't understand any of the words on [src].</span>")
|
||||
..()
|
||||
/obj/item/paper/servant_primer/oui_getcontent(mob/target)
|
||||
if(!is_servant_of_ratvar(target) && !isobserver(target))
|
||||
return "<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)]<HR>[stamps]</BODY></HTML>"
|
||||
return ..()
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
/datum/outfit/syndicate/clownop/no_crystals
|
||||
tc = 0
|
||||
|
||||
/datum/outfit/syndicate/clownop/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||
/datum/outfit/syndicate/clownop/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source)
|
||||
..()
|
||||
if(visualsOnly)
|
||||
return
|
||||
|
||||
@@ -409,7 +409,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
|
||||
message_admins("Drafting players for forced ruleset [rule.name].")
|
||||
log_game("DYNAMIC: Drafting players for forced ruleset [rule.name].")
|
||||
rule.mode = src
|
||||
rule.acceptable(GLOB.player_list.len, threat_level) // Assigns some vars in the modes, running it here for consistency
|
||||
rule.acceptable(roundstart_pop_ready, threat_level) // Assigns some vars in the modes, running it here for consistency
|
||||
rule.candidates = candidates.Copy()
|
||||
rule.trim_candidates()
|
||||
if (rule.ready(TRUE))
|
||||
@@ -421,7 +421,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
|
||||
return TRUE
|
||||
var/list/drafted_rules = list()
|
||||
for (var/datum/dynamic_ruleset/roundstart/rule in roundstart_rules)
|
||||
if (rule.acceptable(GLOB.player_list.len, threat_level) && threat >= rule.cost) // If we got the population and threat required
|
||||
if (rule.acceptable(roundstart_pop_ready, threat_level) && threat >= rule.cost) // If we got the population and threat required
|
||||
rule.candidates = candidates.Copy()
|
||||
rule.trim_candidates()
|
||||
if (rule.ready() && rule.candidates.len > 0)
|
||||
@@ -429,12 +429,12 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
|
||||
if(!drafted_rules.len)
|
||||
message_admins("Not enough threat level for roundstart antags!")
|
||||
log_game("DYNAMIC: Not enough threat level for roundstart antags!")
|
||||
var/indice_pop = min(10,round(GLOB.player_list.len/pop_per_requirement)+1)
|
||||
var/indice_pop = min(10,round(roundstart_pop_ready/pop_per_requirement)+1)
|
||||
extra_rulesets_amount = 0
|
||||
if (GLOB.dynamic_classic_secret)
|
||||
extra_rulesets_amount = 0
|
||||
else
|
||||
if (GLOB.player_list.len > GLOB.dynamic_high_pop_limit)
|
||||
if (roundstart_pop_ready > GLOB.dynamic_high_pop_limit)
|
||||
message_admins("High Population Override is in effect! Threat Level will have more impact on which roles will appear, and player population less.")
|
||||
log_game("DYNAMIC: High Population Override is in effect! Threat Level will have more impact on which roles will appear, and player population less.")
|
||||
if (threat_level > high_pop_second_rule_req)
|
||||
|
||||
@@ -143,7 +143,6 @@
|
||||
repeatable_weight_decrease = 2
|
||||
requirements = list(60,50,40,30,30,30,30,30,30,30)
|
||||
high_population_requirement = 30
|
||||
repeatable = TRUE
|
||||
|
||||
/datum/dynamic_ruleset/event/meteor_wave/ready()
|
||||
if(mode.threat_level > 40 && mode.threat >= 25 && prob(20))
|
||||
@@ -270,7 +269,7 @@
|
||||
repeatable = TRUE
|
||||
|
||||
/datum/dynamic_ruleset/event/processor_overload
|
||||
name = "Processer Overload"
|
||||
name = "Processor Overload"
|
||||
config_tag = "processor_overload"
|
||||
typepath = /datum/round_event/processor_overload
|
||||
cost = 4
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
if (!istype(M, required_type))
|
||||
trimmed_list.Remove(M)
|
||||
continue
|
||||
if (M.GetComponent(/datum/component/virtual_reality))
|
||||
trimmed_list.Remove(M)
|
||||
continue
|
||||
if (!M.client) // Are they connected?
|
||||
trimmed_list.Remove(M)
|
||||
continue
|
||||
@@ -107,11 +110,11 @@
|
||||
|
||||
candidates = pollGhostCandidates("The mode is looking for volunteers to become a [name]", antag_flag, SSticker.mode, antag_flag, poll_time = 300)
|
||||
|
||||
if(!candidates || candidates.len <= 0)
|
||||
message_admins("The ruleset [name] received no applications.")
|
||||
log_game("DYNAMIC: The ruleset [name] received no applications.")
|
||||
if(!candidates || candidates.len <= required_candidates)
|
||||
message_admins("The ruleset [name] did not receive enough applications.")
|
||||
log_game("DYNAMIC: The ruleset [name] did not receive enough applications.")
|
||||
mode.refund_threat(cost)
|
||||
mode.log_threat("Rule [name] refunded [cost] (no applications)",verbose=TRUE)
|
||||
mode.log_threat("Rule [name] refunded [cost] (not receive enough applications)",verbose=TRUE)
|
||||
mode.executed_rules -= src
|
||||
return
|
||||
|
||||
@@ -150,7 +153,7 @@
|
||||
|
||||
finish_setup(new_character, i)
|
||||
assigned += applicant
|
||||
notify_ghosts("[new_character] has been picked for the ruleset [name]!", source = new_character, action = NOTIFY_ORBIT, header="Something Interesting!")
|
||||
notify_ghosts("[new_character] has been picked for the ruleset [name]!", source = new_character, action = NOTIFY_ORBIT)
|
||||
|
||||
/datum/dynamic_ruleset/midround/from_ghosts/proc/generate_ruleset_body(mob/applicant)
|
||||
var/mob/living/carbon/human/new_character = makeBody(applicant)
|
||||
@@ -283,6 +286,7 @@
|
||||
/datum/dynamic_ruleset/midround/from_ghosts/wizard
|
||||
name = "Wizard"
|
||||
config_tag = "midround_wizard"
|
||||
persistent = TRUE
|
||||
antag_datum = /datum/antagonist/wizard
|
||||
antag_flag = ROLE_WIZARD
|
||||
enemy_roles = list("Security Officer","Detective","Head of Security", "Captain")
|
||||
@@ -293,6 +297,7 @@
|
||||
requirements = list(90,90,70,50,50,50,50,40,30,30)
|
||||
high_population_requirement = 30
|
||||
repeatable = TRUE
|
||||
var/datum/mind/wizard
|
||||
|
||||
/datum/dynamic_ruleset/midround/from_ghosts/wizard/ready(forced = FALSE)
|
||||
if (required_candidates > (dead_players.len + list_observers.len))
|
||||
@@ -307,6 +312,20 @@
|
||||
..()
|
||||
new_character.forceMove(pick(GLOB.wizardstart))
|
||||
|
||||
/datum/dynamic_ruleset/midround/from_ghosts/wizard/rule_process() // i can literally copy this from are_special_antags_dead it's great
|
||||
if(isliving(wizard.current) && wizard.current.stat!=DEAD)
|
||||
return FALSE
|
||||
|
||||
for(var/obj/item/phylactery/P in GLOB.poi_list) //TODO : IsProperlyDead()
|
||||
if(P.mind && P.mind.has_antag_datum(/datum/antagonist/wizard))
|
||||
return FALSE
|
||||
|
||||
if(SSevents.wizardmode) //If summon events was active, turn it off
|
||||
SSevents.toggleWizardmode()
|
||||
SSevents.resetFrequency()
|
||||
|
||||
return RULESET_STOP_PROCESSING
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// //
|
||||
// NUCLEAR OPERATIVES (MIDROUND) //
|
||||
|
||||
@@ -149,6 +149,7 @@
|
||||
/datum/dynamic_ruleset/roundstart/wizard
|
||||
name = "Wizard"
|
||||
config_tag = "wizard"
|
||||
persistent = TRUE
|
||||
antag_flag = ROLE_WIZARD
|
||||
antag_datum = /datum/antagonist/wizard
|
||||
minimum_required_age = 14
|
||||
@@ -183,8 +184,25 @@
|
||||
for(var/datum/mind/M in assigned)
|
||||
M.current.forceMove(pick(GLOB.wizardstart))
|
||||
M.add_antag_datum(new antag_datum())
|
||||
roundstart_wizards += M
|
||||
return TRUE
|
||||
|
||||
/datum/dynamic_ruleset/roundstart/wizard/rule_process() // i can literally copy this from are_special_antags_dead it's great
|
||||
for(var/datum/mind/wizard in roundstart_wizards)
|
||||
if(isliving(wizard.current) && wizard.current.stat!=DEAD)
|
||||
return FALSE
|
||||
|
||||
for(var/obj/item/phylactery/P in GLOB.poi_list) //TODO : IsProperlyDead()
|
||||
if(P.mind && P.mind.has_antag_datum(/datum/antagonist/wizard))
|
||||
return FALSE
|
||||
|
||||
if(SSevents.wizardmode) //If summon events was active, turn it off
|
||||
SSevents.toggleWizardmode()
|
||||
SSevents.resetFrequency()
|
||||
|
||||
return RULESET_STOP_PROCESSING
|
||||
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// //
|
||||
// BLOOD CULT //
|
||||
@@ -263,7 +281,7 @@
|
||||
requirements = list(100,90,80,70,60,50,50,50,50,50)
|
||||
high_population_requirement = 50
|
||||
flags = HIGHLANDER_RULESET
|
||||
antag_cap = list(2,2,2,3,3,3,4,4,5,5)
|
||||
antag_cap = list(1,1,2,3,4,5,5,5,5,5)
|
||||
var/datum/team/nuclear/nuke_team
|
||||
|
||||
/datum/dynamic_ruleset/roundstart/nuclear/ready(forced = FALSE)
|
||||
|
||||
@@ -167,7 +167,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
|
||||
/obj/effect/meteor/examine(mob/user)
|
||||
if(!(flags_1 & ADMIN_SPAWNED_1) && isliving(user))
|
||||
SSmedals.UnlockMedal(MEDAL_METEOR, user.client)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/effect/meteor/attackby(obj/item/I, mob/user, params)
|
||||
if(I.tool_behaviour == TOOL_MINING)
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
/datum/outfit/syndicate/no_crystals
|
||||
tc = 0
|
||||
|
||||
/datum/outfit/syndicate/post_equip(mob/living/carbon/human/H)
|
||||
/datum/outfit/syndicate/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE, client/preference_source)
|
||||
var/obj/item/radio/R = H.ears
|
||||
R.set_frequency(FREQ_SYNDICATE)
|
||||
R.freqlock = TRUE
|
||||
|
||||
@@ -130,8 +130,8 @@
|
||||
open_machine()
|
||||
|
||||
/obj/machinery/sleeper/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click [src] to [state_open ? "close" : "open"] it.</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click [src] to [state_open ? "close" : "open"] it.</span>"
|
||||
|
||||
/obj/machinery/sleeper/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state)
|
||||
|
||||
@@ -454,20 +454,20 @@ Class Procs:
|
||||
/obj/machinery/examine(mob/user)
|
||||
. = ..()
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, "<span class='notice'>It looks broken and non-functional.</span>")
|
||||
. += "<span class='notice'>It looks broken and non-functional.</span>"
|
||||
if(!(resistance_flags & INDESTRUCTIBLE))
|
||||
if(resistance_flags & ON_FIRE)
|
||||
to_chat(user, "<span class='warning'>It's on fire!</span>")
|
||||
. += "<span class='warning'>It's on fire!</span>"
|
||||
var/healthpercent = (obj_integrity/max_integrity) * 100
|
||||
switch(healthpercent)
|
||||
if(50 to 99)
|
||||
to_chat(user, "It looks slightly damaged.")
|
||||
. += "It looks slightly damaged."
|
||||
if(25 to 50)
|
||||
to_chat(user, "It appears heavily damaged.")
|
||||
. += "It appears heavily damaged."
|
||||
if(0 to 25)
|
||||
to_chat(user, "<span class='warning'>It's falling apart!</span>")
|
||||
. += "<span class='warning'>It's falling apart!</span>"
|
||||
if(user.research_scanner && component_parts)
|
||||
to_chat(user, display_parts(user, TRUE))
|
||||
. += display_parts(user, TRUE)
|
||||
|
||||
//called on machinery construction (i.e from frame to machinery) but not on initialization
|
||||
/obj/machinery/proc/on_construction()
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
req_access = list(ACCESS_AI_UPLOAD)
|
||||
|
||||
/obj/machinery/ai_slipper/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>It has <b>[uses]</b> uses of foam remaining.</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>It has <b>[uses]</b> uses of foam remaining.</span>"
|
||||
|
||||
/obj/machinery/ai_slipper/power_change()
|
||||
if(stat & BROKEN)
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
var/static/list/style_list_icons = list("standard" = 'icons/mob/augmentation/augments.dmi', "engineer" = 'icons/mob/augmentation/augments_engineer.dmi', "security" = 'icons/mob/augmentation/augments_security.dmi', "mining" = 'icons/mob/augmentation/augments_mining.dmi')
|
||||
|
||||
/obj/machinery/aug_manipulator/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(storedpart)
|
||||
to_chat(user, "<span class='notice'>Alt-click to eject the limb.</span>")
|
||||
. += "<span class='notice'>Alt-click to eject the limb.</span>"
|
||||
|
||||
/obj/machinery/aug_manipulator/Initialize()
|
||||
initial_icon_state = initial(icon_state)
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
add_overlay("ccharger-o[newlevel]")
|
||||
|
||||
/obj/machinery/cell_charger/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "There's [charging ? "a" : "no"] cell in the charger.")
|
||||
. = ..()
|
||||
. += "There's [charging ? "a" : "no"] cell in the charger."
|
||||
if(charging)
|
||||
to_chat(user, "Current charge: [round(charging.percent(), 1)]%.")
|
||||
. += "Current charge: [round(charging.percent(), 1)]%."
|
||||
|
||||
/obj/machinery/cell_charger/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/stock_parts/cell) && !panel_open)
|
||||
|
||||
@@ -93,20 +93,20 @@
|
||||
to_chat(user, "<span class='notice'>You flip the write-protect tab to [read_only ? "protected" : "unprotected"].</span>")
|
||||
|
||||
/obj/item/disk/data/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "The write-protect tab is set to [read_only ? "protected" : "unprotected"].")
|
||||
. = ..()
|
||||
. += "The write-protect tab is set to [read_only ? "protected" : "unprotected"]."
|
||||
|
||||
|
||||
//Clonepod
|
||||
|
||||
/obj/machinery/clonepod/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
var/mob/living/mob_occupant = occupant
|
||||
if(mess)
|
||||
to_chat(user, "It's filled with blood and viscera. You swear you can see it moving...")
|
||||
. += "It's filled with blood and viscera. You swear you can see it moving..."
|
||||
if(is_operational() && mob_occupant)
|
||||
if(mob_occupant.stat != DEAD)
|
||||
to_chat(user, "Current clone cycle is [round(get_completion())]% complete.")
|
||||
. += "Current clone cycle is [round(get_completion())]% complete."
|
||||
|
||||
/obj/machinery/clonepod/return_air()
|
||||
// We want to simulate the clone not being in contact with
|
||||
|
||||
@@ -762,13 +762,13 @@
|
||||
var/active = 0 //if the ship is on
|
||||
|
||||
/obj/item/orion_ship/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(!(in_range(user, src)))
|
||||
return
|
||||
if(!active)
|
||||
to_chat(user, "<span class='notice'>There's a little switch on the bottom. It's flipped down.</span>")
|
||||
. += "<span class='notice'>There's a little switch on the bottom. It's flipped down.</span>"
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There's a little switch on the bottom. It's flipped up.</span>")
|
||||
. += "<span class='notice'>There's a little switch on the bottom. It's flipped up.</span>"
|
||||
|
||||
/obj/item/orion_ship/attack_self(mob/user) //Minibomb-level explosion. Should probably be more because of how hard it is to survive the machine! Also, just over a 5-second fuse
|
||||
if(active)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You start deconstructing the frame...</span>")
|
||||
if(P.use_tool(src, user, 20, volume=50))
|
||||
if(P.use_tool(src, user, 20, volume=50) && state == 0)
|
||||
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
|
||||
var/obj/item/stack/sheet/metal/M = new (drop_location(), 5)
|
||||
M.add_fingerprint(user)
|
||||
@@ -28,7 +28,7 @@
|
||||
if(1)
|
||||
if(istype(P, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You start to unfasten the frame...</span>")
|
||||
if(P.use_tool(src, user, 20, volume=50))
|
||||
if(P.use_tool(src, user, 20, volume=50) && state == 1)
|
||||
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
|
||||
setAnchored(FALSE)
|
||||
state = 0
|
||||
@@ -72,9 +72,7 @@
|
||||
if(!P.tool_start_check(user, amount=5))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding cables to the frame...</span>")
|
||||
if(P.use_tool(src, user, 20, volume=50, amount=5))
|
||||
if(state != 2)
|
||||
return
|
||||
if(P.use_tool(src, user, 20, 5, 50, CALLBACK(src, .proc/check_state, 2)))
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
@@ -94,9 +92,7 @@
|
||||
return
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start to put in the glass panel...</span>")
|
||||
if(P.use_tool(src, user, 20, amount=2))
|
||||
if(state != 3)
|
||||
return
|
||||
if(P.use_tool(src, user, 20, 2, 0, CALLBACK(src, .proc/check_state, 3)))
|
||||
to_chat(user, "<span class='notice'>You put in the glass panel.</span>")
|
||||
state = 4
|
||||
src.icon_state = "4"
|
||||
@@ -121,6 +117,11 @@
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
|
||||
//callback proc used on stacks use_tool to stop unnecessary amounts being wasted from spam clicking.
|
||||
/obj/structure/frame/computer/proc/check_state(target_state)
|
||||
if(state == target_state)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/frame/computer/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
|
||||
@@ -17,13 +17,7 @@
|
||||
network += lowertext(i)
|
||||
|
||||
/obj/machinery/computer/security/check_eye(mob/user)
|
||||
if(CHECK_BITFIELD(stat, NOPOWER|BROKEN) || is_blind(user) || !in_view_range(user, src) || !user.canUseTopic(src, !issilicon(user), FALSE))
|
||||
user.unset_machine()
|
||||
return
|
||||
if(!(user in watchers))
|
||||
user.unset_machine()
|
||||
return
|
||||
if(!watchers[user])
|
||||
if(!can_interact(user) || !(user in watchers) || !watchers[user])
|
||||
user.unset_machine()
|
||||
return
|
||||
var/obj/machinery/camera/C = watchers[user]
|
||||
@@ -41,55 +35,50 @@
|
||||
M.unset_machine() //to properly reset the view of the users if the console is deleted.
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/security/attack_hand(mob/user)
|
||||
/obj/machinery/computer/security/can_interact(mob/user)
|
||||
if((!issilicon(user) && !Adjacent(user)) || is_blind(user) || !in_view_range(user, src))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/security/interact(mob/user, special_state)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(stat)
|
||||
if (ismob(user) && !isliving(user)) // ghosts don't need cameras
|
||||
return
|
||||
if (!network)
|
||||
throw EXCEPTION("No camera network")
|
||||
CRASH("No camera network")
|
||||
user.unset_machine()
|
||||
return
|
||||
return FALSE
|
||||
if (!(islist(network)))
|
||||
throw EXCEPTION("Camera network is not a list")
|
||||
CRASH("Camera network is not a list")
|
||||
user.unset_machine()
|
||||
return
|
||||
if(..())
|
||||
user.unset_machine()
|
||||
return
|
||||
return FALSE
|
||||
|
||||
var/list/camera_list = get_available_cameras()
|
||||
if(!(user in watchers))
|
||||
for(var/Num in camera_list)
|
||||
var/obj/machinery/camera/CAM = camera_list[Num]
|
||||
if(istype(CAM))
|
||||
if(CAM.can_use())
|
||||
watchers[user] = CAM //let's give the user the first usable camera, and then let him change to the camera he wants.
|
||||
break
|
||||
if(istype(CAM) && CAM.can_use())
|
||||
watchers[user] = CAM //let's give the user the first usable camera, and then let him change to the camera he wants.
|
||||
break
|
||||
if(!(user in watchers))
|
||||
user.unset_machine() // no usable camera on the network, we disconnect the user from the computer.
|
||||
return
|
||||
return FALSE
|
||||
playsound(src, 'sound/machines/terminal_prompt.ogg', 25, 0)
|
||||
use_camera_console(user)
|
||||
|
||||
/obj/machinery/computer/security/proc/use_camera_console(mob/user)
|
||||
var/list/camera_list = get_available_cameras()
|
||||
var/t = input(user, "Which camera should you change to?") as null|anything in camera_list
|
||||
if(user.machine != src) //while we were choosing we got disconnected from our computer or are using another machine.
|
||||
if(!src || user.machine != src) //while we were choosing we got disconnected from our computer or are using another machine.
|
||||
return
|
||||
if(!t)
|
||||
if(!t || t == "Cancel")
|
||||
user.unset_machine()
|
||||
playsound(src, 'sound/machines/terminal_off.ogg', 25, 0)
|
||||
return
|
||||
|
||||
var/obj/machinery/camera/C = camera_list[t]
|
||||
|
||||
if(t == "Cancel")
|
||||
user.unset_machine()
|
||||
playsound(src, 'sound/machines/terminal_off.ogg', 25, 0)
|
||||
return
|
||||
if(!C || !C.can_use() || CHECK_BITFIELD(stat, NOPOWER|BROKEN) || is_blind(user) || !in_view_range(user, src) || !user.canUseTopic(src, !issilicon(user), FALSE))
|
||||
if(!C || !C.can_use() || !can_interact(user))
|
||||
user.unset_machine()
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -56,33 +56,34 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
/obj/machinery/computer/card/centcom/get_jobs()
|
||||
return get_all_centcom_jobs()
|
||||
|
||||
/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/Initialize()
|
||||
. = ..()
|
||||
change_position_cooldown = CONFIG_GET(number/id_console_jobslot_delay)
|
||||
|
||||
/obj/machinery/computer/card/examine(mob/user)
|
||||
. = ..()
|
||||
if(inserted_scan_id || inserted_modify_id)
|
||||
. += "<span class='notice'>Alt-click to eject the ID card.</span>"
|
||||
|
||||
/obj/machinery/computer/card/attackby(obj/I, mob/user, params)
|
||||
if(isidcard(I))
|
||||
if(check_access(I) && !inserted_scan_id)
|
||||
if(id_insert(user, I, inserted_scan_id))
|
||||
inserted_scan_id = I
|
||||
updateUsrDialog()
|
||||
else if(!inserted_modify_id)
|
||||
if(id_insert(user, I, inserted_modify_id))
|
||||
inserted_modify_id = I
|
||||
updateUsrDialog()
|
||||
else if(id_insert(user, I, inserted_modify_id))
|
||||
inserted_modify_id = I
|
||||
updateUsrDialog()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/card/Destroy()
|
||||
if(inserted_scan_id)
|
||||
QDEL_NULL(inserted_scan_id)
|
||||
qdel(inserted_scan_id)
|
||||
inserted_scan_id = null
|
||||
if(inserted_modify_id)
|
||||
QDEL_NULL(inserted_modify_id)
|
||||
qdel(inserted_modify_id)
|
||||
inserted_modify_id = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/card/handle_atom_del(atom/A)
|
||||
@@ -106,7 +107,6 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
/obj/machinery/computer/card/proc/job_blacklisted(jobtitle)
|
||||
return (jobtitle in blacklisted)
|
||||
|
||||
|
||||
//Logic check for Topic() if you can open the job
|
||||
/obj/machinery/computer/card/proc/can_open_job(datum/job/job)
|
||||
if(job)
|
||||
@@ -131,6 +131,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
return JOB_MAX_POSITIONS
|
||||
return JOB_DENIED
|
||||
|
||||
|
||||
/obj/machinery/computer/card/proc/id_insert(mob/user, obj/item/inserting_item, obj/item/target)
|
||||
var/obj/item/card/id/card_to_insert = inserting_item
|
||||
var/holder_item = FALSE
|
||||
@@ -202,8 +203,8 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
if(job.title in blacklisted)
|
||||
continue
|
||||
dat += {"<td>[job.title]</td>
|
||||
<td>[job.current_positions]/[job.total_positions]</td>
|
||||
<td>"}
|
||||
<td>[job.current_positions]/[job.total_positions]</td>
|
||||
<td>"}
|
||||
switch(can_open_job(job))
|
||||
if(JOB_ALLOWED)
|
||||
if(authenticated == 2)
|
||||
@@ -224,7 +225,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
dat += "<a href='?src=[REF(src)];choice=make_job_unavailable;job=[job.title]'>Close Position</a>"
|
||||
else
|
||||
dat += "Close Position"
|
||||
if(-JOB_COOLDOWN)
|
||||
if(JOB_COOLDOWN)
|
||||
var/time_to_wait = round(change_position_cooldown - ((world.time / 10) - GLOB.time_last_changed_position), 1)
|
||||
var/mins = round(time_to_wait / 60)
|
||||
var/seconds = time_to_wait - (60*mins)
|
||||
@@ -251,6 +252,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
dat += "</table>"
|
||||
else
|
||||
var/list/header = list()
|
||||
|
||||
var/scan_name = inserted_scan_id ? html_encode(inserted_scan_id.name) : "--------"
|
||||
var/target_name = inserted_modify_id ? html_encode(inserted_modify_id.name) : "--------"
|
||||
var/target_owner = (inserted_modify_id && inserted_modify_id.registered_name) ? html_encode(inserted_modify_id.registered_name) : "--------"
|
||||
@@ -261,7 +263,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
Target: <a href='?src=[REF(src)];choice=inserted_modify_id'>[target_name]</a><br>
|
||||
Confirm Identity: <a href='?src=[REF(src)];choice=inserted_scan_id'>[scan_name]</a><br>"}
|
||||
else
|
||||
header += {"<div align='center'><br>"
|
||||
header += {"<div align='center'><br>
|
||||
Target: <a href='?src=[REF(src)];choice=inserted_modify_id'>Remove [target_name]</a> ||
|
||||
Confirm Identity: <a href='?src=[REF(src)];choice=inserted_scan_id'>Remove [scan_name]</a><br>
|
||||
<a href='?src=[REF(src)];choice=mode;mode_target=1'>Access Crew Manifest</a><br>
|
||||
@@ -297,7 +299,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
allJobsSlot.innerHTML = "<a href='#' onclick='showAll()'>show</a>";
|
||||
}
|
||||
</script>"}
|
||||
carddesc += {"<form name='cardcomp' action='?src=[REF(src)]' method='get'>"
|
||||
carddesc += {"<form name='cardcomp' action='?src=[REF(src)]' method='get'>
|
||||
<input type='hidden' name='src' value='[REF(src)]'>
|
||||
<input type='hidden' name='choice' value='reg'>
|
||||
<b>registered name:</b> <input type='text' id='namefield' name='reg' value='[target_owner]' style='width:250px; background-color:white;' onchange='markRed()'>
|
||||
@@ -312,7 +314,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
jobs += "<b>Assignment:</b> [target_rank] (<a href='?src=[REF(src)];choice=demote'>Demote</a>)</span>"
|
||||
|
||||
var/list/accesses = list()
|
||||
if(istype(src, /obj/machinery/computer/card/centcom)) //REE
|
||||
if(istype(src, /obj/machinery/computer/card/centcom)) // REE
|
||||
accesses += "<h5>Central Command:</h5>"
|
||||
for(var/A in get_all_centcom_access())
|
||||
if(A in inserted_modify_id.access)
|
||||
@@ -340,13 +342,13 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
accesses += "<br>"
|
||||
accesses += "</td>"
|
||||
accesses += "</tr></table>"
|
||||
body = "[carddesc.Join()]<br>[jobs]<br><br>[accesses.Join()]<hr>" //CHECK THIS
|
||||
body = "[carddesc.Join()]<br>[jobs.Join()]<br><br>[accesses.Join()]<hr>" //CHECK THIS
|
||||
|
||||
else if (!authenticated)
|
||||
body = {"<a href='?src=[REF(src)];choice=auth'>Log In</a> <br><hr>
|
||||
body = {"<a href='?src=[REF(src)];choice=auth'>Log In</a><br><hr>
|
||||
<a href='?src=[REF(src)];choice=mode;mode_target=1'>Access Crew Manifest</a><br><hr>"}
|
||||
if(!target_dept)
|
||||
body += "<br><hr><a href='?src=[REF(src)];choice=mode;mode_target=2'>Job Management</a><hr>"
|
||||
body += "<a href='?src=[REF(src)];choice=mode;mode_target=2'>Job Management</a><hr>"
|
||||
|
||||
dat = list("<tt>", header.Join(), body, "<br></tt>")
|
||||
var/datum/browser/popup = new(user, "id_com", src.name, 900, 620)
|
||||
@@ -366,7 +368,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
usr.set_machine(src)
|
||||
switch(href_list["choice"])
|
||||
if ("inserted_modify_id")
|
||||
if (inserted_modify_id && !usr.get_active_held_item())
|
||||
if(inserted_modify_id && !usr.get_active_held_item())
|
||||
if(id_eject(usr, inserted_modify_id))
|
||||
inserted_modify_id = null
|
||||
updateUsrDialog()
|
||||
@@ -378,7 +380,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
inserted_modify_id = id_to_insert
|
||||
updateUsrDialog()
|
||||
if ("inserted_scan_id")
|
||||
if (inserted_scan_id && !usr.get_active_held_item())
|
||||
if(inserted_scan_id && !usr.get_active_held_item())
|
||||
if(id_eject(usr, inserted_scan_id))
|
||||
inserted_scan_id = null
|
||||
updateUsrDialog()
|
||||
@@ -386,7 +388,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
if(usr.get_id_in_hand())
|
||||
var/obj/item/held_item = usr.get_active_held_item()
|
||||
var/obj/item/card/id/id_to_insert = held_item.GetID()
|
||||
if(id_insert(usr, held_item, inserted_modify_id))
|
||||
if(id_insert(usr, held_item, inserted_scan_id))
|
||||
inserted_scan_id = id_to_insert
|
||||
updateUsrDialog()
|
||||
if ("auth")
|
||||
@@ -462,7 +464,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
updateUsrDialog()
|
||||
break
|
||||
if(!jobdatum)
|
||||
to_chat(usr, "<span class='error'>No log exists for this job.</span>")
|
||||
to_chat(usr, "<span class='alert'>No log exists for this job.</span>")
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
@@ -475,7 +477,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
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>")
|
||||
to_chat(usr, "<span class='alert'>You are not authorized to demote this position.</span>")
|
||||
if ("reg")
|
||||
if (authenticated)
|
||||
var/t2 = inserted_modify_id
|
||||
@@ -485,7 +487,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 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>")
|
||||
to_chat(usr, "<span class='alert'>Invalid name entered.</span>")
|
||||
updateUsrDialog()
|
||||
return
|
||||
if ("mode")
|
||||
@@ -498,7 +500,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
|
||||
if("make_job_available")
|
||||
// MAKE ANOTHER JOB POSITION AVAILABLE FOR LATE JOINERS
|
||||
if(authenticated && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
|
||||
if(authenticated && !target_dept)
|
||||
var/edit_job_target = href_list["job"]
|
||||
var/datum/job/j = SSjob.GetJob(edit_job_target)
|
||||
if(!j)
|
||||
@@ -515,7 +517,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
|
||||
if("make_job_unavailable")
|
||||
// MAKE JOB POSITION UNAVAILABLE FOR LATE JOINERS
|
||||
if(authenticated && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
|
||||
if(authenticated && !target_dept)
|
||||
var/edit_job_target = href_list["job"]
|
||||
var/datum/job/j = SSjob.GetJob(edit_job_target)
|
||||
if(!j)
|
||||
@@ -533,7 +535,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
|
||||
if ("prioritize_job")
|
||||
// TOGGLE WHETHER JOB APPEARS AS PRIORITIZED IN THE LOBBY
|
||||
if(authenticated && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
|
||||
if(authenticated && !target_dept)
|
||||
var/priority_target = href_list["job"]
|
||||
var/datum/job/j = SSjob.GetJob(priority_target)
|
||||
if(!j)
|
||||
@@ -549,7 +551,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
return
|
||||
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>")
|
||||
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, FALSE)
|
||||
|
||||
if ("print")
|
||||
@@ -625,4 +627,4 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
|
||||
#undef JOB_ALLOWED
|
||||
#undef JOB_COOLDOWN
|
||||
#undef JOB_MAX_POSITIONS
|
||||
#undef JOB_DENIED
|
||||
#undef JOB_DENIED
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
var/state = 1
|
||||
|
||||
/obj/structure/frame/examine(user)
|
||||
..()
|
||||
. = ..()
|
||||
if(circuit)
|
||||
to_chat(user, "It has \a [circuit] installed.")
|
||||
. += "It has \a [circuit] installed."
|
||||
|
||||
|
||||
/obj/structure/frame/deconstruct(disassembled = TRUE)
|
||||
@@ -29,7 +29,7 @@
|
||||
var/list/req_component_names = null // user-friendly names of components
|
||||
|
||||
/obj/structure/frame/machine/examine(user)
|
||||
..()
|
||||
. = ..()
|
||||
if(state == 3 && req_components && req_component_names)
|
||||
var/hasContent = 0
|
||||
var/requires = "It requires"
|
||||
@@ -44,9 +44,9 @@
|
||||
hasContent = 1
|
||||
|
||||
if(hasContent)
|
||||
to_chat(user, requires + ".")
|
||||
. += requires + "."
|
||||
else
|
||||
to_chat(user, "It does not require any more components.")
|
||||
. += "It does not require any more components."
|
||||
|
||||
/obj/structure/frame/machine/proc/update_namelist()
|
||||
if(!req_components)
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/defibrillator_mount/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(defib)
|
||||
to_chat(user, "<span class='notice'>There is a defib unit hooked up. Alt-click to remove it.<span>")
|
||||
. += "<span class='notice'>There is a defib unit hooked up. Alt-click to remove it.<span>"
|
||||
if(GLOB.security_level >= SEC_LEVEL_RED)
|
||||
to_chat(user, "<span class='notice'>Due to a security situation, its locking clamps can be toggled by swiping any ID.</span>")
|
||||
. += "<span class='notice'>Due to a security situation, its locking clamps can be toggled by swiping any ID.</span>"
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Its locking clamps can be [clamps_locked ? "dis" : ""]engaged by swiping an ID with access.</span>")
|
||||
. += "<span class='notice'>Its locking clamps can be [clamps_locked ? "dis" : ""]engaged by swiping an ID with access.</span>"
|
||||
|
||||
/obj/machinery/defibrillator_mount/process()
|
||||
if(defib && defib.cell && defib.cell.charge < defib.cell.maxcharge && is_operational())
|
||||
|
||||
@@ -149,8 +149,8 @@
|
||||
var/mode = SINGLE
|
||||
|
||||
/obj/item/grenade/barrier/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click to toggle modes.</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click to toggle modes.</span>"
|
||||
|
||||
/obj/item/grenade/barrier/AltClick(mob/living/carbon/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/dish_drive/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(user.Adjacent(src))
|
||||
to_chat(user, "<span class='notice'>Alt-click it to beam its contents to any nearby disposal bins.</span>")
|
||||
. += "<span class='notice'>Alt-click it to beam its contents to any nearby disposal bins.</span>"
|
||||
|
||||
/obj/machinery/dish_drive/attack_hand(mob/living/user)
|
||||
if(!contents.len)
|
||||
|
||||
@@ -640,47 +640,47 @@
|
||||
update_icon(AIRLOCK_CLOSED)
|
||||
|
||||
/obj/machinery/door/airlock/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(obj_flags & EMAGGED)
|
||||
to_chat(user, "<span class='warning'>Its access panel is smoking slightly.</span>")
|
||||
. += "<span class='warning'>Its access panel is smoking slightly.</span>"
|
||||
if(charge && !panel_open && in_range(user, src))
|
||||
to_chat(user, "<span class='warning'>The maintenance panel seems haphazardly fastened.</span>")
|
||||
. += "<span class='warning'>The maintenance panel seems haphazardly fastened.</span>"
|
||||
if(charge && panel_open)
|
||||
to_chat(user, "<span class='warning'>Something is wired up to the airlock's electronics!</span>")
|
||||
. += "<span class='warning'>Something is wired up to the airlock's electronics!</span>"
|
||||
if(note)
|
||||
if(!in_range(user, src))
|
||||
to_chat(user, "There's a [note.name] pinned to the front. You can't read it from here.")
|
||||
. += "There's a [note.name] pinned to the front. You can't read it from here."
|
||||
else
|
||||
to_chat(user, "There's a [note.name] pinned to the front...")
|
||||
note.examine(user)
|
||||
. += "There's a [note.name] pinned to the front..."
|
||||
. += note.examine(user)
|
||||
|
||||
if(panel_open)
|
||||
switch(security_level)
|
||||
if(AIRLOCK_SECURITY_NONE)
|
||||
to_chat(user, "Its wires are exposed!")
|
||||
. += "Its wires are exposed!"
|
||||
if(AIRLOCK_SECURITY_METAL)
|
||||
to_chat(user, "Its wires are hidden behind a welded metal cover.")
|
||||
. += "Its wires are hidden behind a welded metal cover."
|
||||
if(AIRLOCK_SECURITY_PLASTEEL_I_S)
|
||||
to_chat(user, "There is some shredded plasteel inside.")
|
||||
. += "There is some shredded plasteel inside."
|
||||
if(AIRLOCK_SECURITY_PLASTEEL_I)
|
||||
to_chat(user, "Its wires are behind an inner layer of plasteel.")
|
||||
. += "Its wires are behind an inner layer of plasteel."
|
||||
if(AIRLOCK_SECURITY_PLASTEEL_O_S)
|
||||
to_chat(user, "There is some shredded plasteel inside.")
|
||||
. += "There is some shredded plasteel inside."
|
||||
if(AIRLOCK_SECURITY_PLASTEEL_O)
|
||||
to_chat(user, "There is a welded plasteel cover hiding its wires.")
|
||||
. += "There is a welded plasteel cover hiding its wires."
|
||||
if(AIRLOCK_SECURITY_PLASTEEL)
|
||||
to_chat(user, "There is a protective grille over its panel.")
|
||||
. += "There is a protective grille over its panel."
|
||||
else if(security_level)
|
||||
if(security_level == AIRLOCK_SECURITY_METAL)
|
||||
to_chat(user, "It looks a bit stronger.")
|
||||
. += "It looks a bit stronger."
|
||||
else
|
||||
to_chat(user, "It looks very robust.")
|
||||
. += "It looks very robust."
|
||||
|
||||
if(issilicon(user) && (!stat & BROKEN))
|
||||
to_chat(user, "<span class='notice'>Shift-click [src] to [ density ? "open" : "close"] it.</span>")
|
||||
to_chat(user, "<span class='notice'>Ctrl-click [src] to [ locked ? "raise" : "drop"] its bolts.</span>")
|
||||
to_chat(user, "<span class='notice'>Alt-click [src] to [ secondsElectrified ? "un-electrify" : "permanently electrify"] it.</span>")
|
||||
to_chat(user, "<span class='notice'>Ctrl-Shift-click [src] to [ emergency ? "disable" : "enable"] emergency access.</span>")
|
||||
. += "<span class='notice'>Shift-click [src] to [ density ? "open" : "close"] it.</span>"
|
||||
. += "<span class='notice'>Ctrl-click [src] to [ locked ? "raise" : "drop"] its bolts.</span>"
|
||||
. += "<span class='notice'>Alt-click [src] to [ secondsElectrified ? "un-electrify" : "permanently electrify"] it.</span>"
|
||||
. += "<span class='notice'>Ctrl-Shift-click [src] to [ emergency ? "disable" : "enable"] emergency access.</span>"
|
||||
|
||||
/obj/machinery/door/airlock/attack_ai(mob/user)
|
||||
if(!src.canAIControl(user))
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
var/unres_sides = 0 //unrestricted sides, or sides of the airlock that will open regardless of access
|
||||
|
||||
/obj/item/electronics/airlock/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Has a neat <i>selection menu</i> for modifying airlock access levels.</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>Has a neat <i>selection menu</i> for modifying airlock access levels.</span>"
|
||||
|
||||
/obj/item/electronics/airlock/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
|
||||
|
||||
@@ -593,14 +593,12 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/door/airlock/clockwork/examine(mob/user)
|
||||
..()
|
||||
var/gear_text = "The cogwheel is flickering and twisting wildly. Report this to a coder."
|
||||
. = ..()
|
||||
switch(construction_state)
|
||||
if(GEAR_SECURE)
|
||||
gear_text = "<span class='brass'>The cogwheel is solidly <b>wrenched</b> to the brass around it.</span>"
|
||||
. += "<span class='brass'>The cogwheel is solidly <b>wrenched</b> to the brass around it.</span>"
|
||||
if(GEAR_LOOSE)
|
||||
gear_text = "<span class='alloy'>The cogwheel has been <i>loosened</i>, but remains <b>connected loosely</b> to the door!</span>"
|
||||
to_chat(user, gear_text)
|
||||
. += "<span class='alloy'>The cogwheel has been <i>loosened</i>, but remains <b>connected loosely</b> to the door!</span>"
|
||||
|
||||
/obj/machinery/door/airlock/clockwork/emp_act(severity)
|
||||
if(prob(80/severity))
|
||||
|
||||
@@ -37,14 +37,14 @@
|
||||
var/unres_sides = 0 //Unrestricted sides. A bitflag for which direction (if any) can open the door with no access
|
||||
|
||||
/obj/machinery/door/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(red_alert_access)
|
||||
if(GLOB.security_level >= SEC_LEVEL_RED)
|
||||
to_chat(user, "<span class='notice'>Due to a security threat, its access requirements have been lifted!</span>")
|
||||
. += "<span class='notice'>Due to a security threat, its access requirements have been lifted!</span>"
|
||||
else
|
||||
to_chat(user, "<span class='notice'>In the event of a red alert, its access requirements will automatically lift.</span>")
|
||||
. += "<span class='notice'>In the event of a red alert, its access requirements will automatically lift.</span>"
|
||||
if(!poddoor)
|
||||
to_chat(user, "<span class='notice'>Its maintenance panel is <b>screwed</b> in place.</span>")
|
||||
. += "<span class='notice'>Its maintenance panel is <b>screwed</b> in place.</span>"
|
||||
|
||||
/obj/machinery/door/check_access_list(list/access_list)
|
||||
if(red_alert_access && GLOB.security_level >= SEC_LEVEL_RED)
|
||||
|
||||
@@ -34,13 +34,13 @@
|
||||
/obj/machinery/door/firedoor/examine(mob/user)
|
||||
..()
|
||||
if(!density)
|
||||
to_chat(user, "<span class='notice'>It is open, but could be <b>pried</b> closed.</span>")
|
||||
. += "<span class='notice'>It is open, but could be <b>pried</b> closed.</span>"
|
||||
else if(!welded)
|
||||
to_chat(user, "<span class='notice'>It is closed, but could be <i>pried</i> open. Deconstruction would require it to be <b>welded</b> shut.</span>")
|
||||
. += "<span class='notice'>It is closed, but could be <i>pried</i> open. Deconstruction would require it to be <b>welded</b> shut.</span>"
|
||||
else if(boltslocked)
|
||||
to_chat(user, "<span class='notice'>It is <i>welded</i> shut. The floor bolts have been locked by <b>screws</b>.</span>")
|
||||
. += "<span class='notice'>It is <i>welded</i> shut. The floor bolts have been locked by <b>screws</b>.</span>"
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The bolt locks have been <i>unscrewed</i>, but the bolts themselves are still <b>wrenched</b> to the floor.</span>")
|
||||
. += "<span class='notice'>The bolt locks have been <i>unscrewed</i>, but the bolts themselves are still <b>wrenched</b> to the floor.</span>"
|
||||
|
||||
/obj/machinery/door/firedoor/proc/CalculateAffectingAreas()
|
||||
remove_from_areas()
|
||||
@@ -270,18 +270,18 @@
|
||||
var/reinforced = 0
|
||||
|
||||
/obj/structure/firelock_frame/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
switch(constructionStep)
|
||||
if(CONSTRUCTION_PANEL_OPEN)
|
||||
to_chat(user, "<span class='notice'>It is <i>unbolted</i> from the floor. A small <b>loosely connected</b> metal plate is covering the wires.</span>")
|
||||
. += "<span class='notice'>It is <i>unbolted</i> from the floor. A small <b>loosely connected</b> metal plate is covering the wires.</span>"
|
||||
if(!reinforced)
|
||||
to_chat(user, "<span class='notice'>It could be reinforced with plasteel.</span>")
|
||||
. += "<span class='notice'>It could be reinforced with plasteel.</span>"
|
||||
if(CONSTRUCTION_WIRES_EXPOSED)
|
||||
to_chat(user, "<span class='notice'>The maintenance plate has been <i>pried away</i>, and <b>wires</b> are trailing.</span>")
|
||||
. += "<span class='notice'>The maintenance plate has been <i>pried away</i>, and <b>wires</b> are trailing.</span>"
|
||||
if(CONSTRUCTION_GUTTED)
|
||||
to_chat(user, "<span class='notice'>The maintenance panel is missing <i>wires</i> and the circuit board is <b>loosely connected</b>.</span>")
|
||||
. += "<span class='notice'>The maintenance panel is missing <i>wires</i> and the circuit board is <b>loosely connected</b>.</span>"
|
||||
if(CONSTRUCTION_NOCIRCUIT)
|
||||
to_chat(user, "<span class='notice'>There are no <i>firelock electronics</i> in the frame. The frame could be <b>cut</b> apart.</span>")
|
||||
. += "<span class='notice'>There are no <i>firelock electronics</i> in the frame. The frame could be <b>cut</b> apart.</span>"
|
||||
|
||||
/obj/structure/firelock_frame/update_icon()
|
||||
..()
|
||||
|
||||
@@ -22,8 +22,8 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/doppler_array/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Its dish is facing to the [dir2text(dir)].</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>Its dish is facing to the [dir2text(dir)].</span>"
|
||||
|
||||
/obj/machinery/doppler_array/process()
|
||||
return PROCESS_KILL
|
||||
@@ -114,13 +114,13 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
|
||||
return
|
||||
|
||||
var/point_gain = 0
|
||||
|
||||
|
||||
/*****The Point Calculator*****/
|
||||
|
||||
|
||||
if(orig_light < 10)
|
||||
say("Explosion not large enough for research calculations.")
|
||||
return
|
||||
else if(orig_light < 4500)
|
||||
else if(orig_light < 4500)
|
||||
point_gain = (83300 * orig_light) / (orig_light + 3000)
|
||||
else
|
||||
point_gain = TECHWEB_BOMB_POINTCAP
|
||||
|
||||
@@ -129,9 +129,9 @@
|
||||
break_message = "slowly falls dark, lights stuttering."
|
||||
|
||||
/obj/machinery/droneDispenser/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if((mode == DRONE_RECHARGING) && !stat && recharging_text)
|
||||
to_chat(user, "<span class='warning'>[recharging_text]</span>")
|
||||
. += "<span class='warning'>[recharging_text]</span>"
|
||||
|
||||
/obj/machinery/droneDispenser/power_change()
|
||||
..()
|
||||
|
||||
@@ -196,8 +196,8 @@
|
||||
var/id = null
|
||||
|
||||
/obj/item/wallframe/flasher/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Its channel ID is '[id]'.</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>Its channel ID is '[id]'.</span>"
|
||||
|
||||
/obj/item/wallframe/flasher/after_attach(var/obj/O)
|
||||
..()
|
||||
|
||||
@@ -183,10 +183,10 @@
|
||||
container_resist(user)
|
||||
|
||||
/obj/machinery/harvester/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
if(state_open)
|
||||
to_chat(user, "<span class='notice'>[src] must be closed before harvesting.</span>")
|
||||
. += "<span class='notice'>[src] must be closed before harvesting.</span>"
|
||||
else if(!harvesting)
|
||||
to_chat(user, "<span class='notice'>Alt-click [src] to start harvesting.</span>")
|
||||
. += "<span class='notice'>Alt-click [src] to start harvesting.</span>"
|
||||
@@ -221,7 +221,6 @@
|
||||
. += "\t<span class='notice'>No chemicals are attached.</span>\n"
|
||||
|
||||
. += "\t<span class='notice'>[attached ? attached : "No one"] is attached.</span>"
|
||||
to_chat(user,.)
|
||||
|
||||
#undef IV_TAKING
|
||||
#undef IV_INJECTING
|
||||
@@ -33,8 +33,8 @@
|
||||
icon_state = "light0"
|
||||
|
||||
/obj/machinery/light_switch/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "It is [on? "on" : "off"].")
|
||||
. = ..()
|
||||
. += "It is [on? "on" : "off"]."
|
||||
|
||||
/obj/machinery/light_switch/interact(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -838,10 +838,10 @@
|
||||
T.cp = src
|
||||
|
||||
/obj/machinery/turretid/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(issilicon(user) && (!stat & BROKEN))
|
||||
to_chat(user, "<span class='notice'>Ctrl-click [src] to [ enabled ? "disable" : "enable"] turrets.</span>")
|
||||
to_chat(user, "<span class='notice'>Alt-click [src] to set turrets to [ lethal ? "stun" : "kill"].</span>")
|
||||
. += "<span class='notice'>Ctrl-click [src] to [ enabled ? "disable" : "enable"] turrets.</span>"
|
||||
. += "<span class='notice'>Alt-click [src] to set turrets to [ lethal ? "stun" : "kill"].</span>"
|
||||
|
||||
/obj/machinery/turretid/attackby(obj/item/I, mob/user, params)
|
||||
if(stat & BROKEN)
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/quantumpad/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>It is [ linked_pad ? "currently" : "not"] linked to another pad.</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>It is [ linked_pad ? "currently" : "not"] linked to another pad.</span>"
|
||||
if(!panel_open)
|
||||
to_chat(user, "<span class='notice'>The panel is <i>screwed</i> in, obstructing the linking device.</span>")
|
||||
. += "<span class='notice'>The panel is <i>screwed</i> in, obstructing the linking device.</span>"
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The <i>linking</i> device is now able to be <i>scanned<i> with a multitool.</span>")
|
||||
. += "<span class='notice'>The <i>linking</i> device is now able to be <i>scanned<i> with a multitool.</span>"
|
||||
|
||||
/obj/machinery/quantumpad/RefreshParts()
|
||||
var/E = 0
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
butchering.bonus_modifier = amount_produced/5
|
||||
|
||||
/obj/machinery/recycler/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "The power light is [(stat & NOPOWER) ? "off" : "on"].")
|
||||
to_chat(user, "The safety-mode light is [safety_mode ? "on" : "off"].")
|
||||
to_chat(user, "The safety-sensors status light is [obj_flags & EMAGGED ? "off" : "on"].")
|
||||
. = ..()
|
||||
. += "The power light is [(stat & NOPOWER) ? "off" : "on"]."
|
||||
. += "The safety-mode light is [safety_mode ? "on" : "off"]."
|
||||
. += "The safety-sensors status light is [obj_flags & EMAGGED ? "off" : "on"]."
|
||||
|
||||
/obj/machinery/recycler/power_change()
|
||||
..()
|
||||
|
||||
@@ -46,12 +46,12 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/space_heater/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "\The [src] is [on ? "on" : "off"], and the hatch is [panel_open ? "open" : "closed"].")
|
||||
. = ..()
|
||||
. += "\The [src] is [on ? "on" : "off"], and the hatch is [panel_open ? "open" : "closed"]."
|
||||
if(cell)
|
||||
to_chat(user, "The charge meter reads [cell ? round(cell.percent(), 1) : 0]%.")
|
||||
. += "The charge meter reads [cell ? round(cell.percent(), 1) : 0]%."
|
||||
else
|
||||
to_chat(user, "There is no power cell installed.")
|
||||
. += "There is no power cell installed."
|
||||
|
||||
/obj/machinery/space_heater/update_icon()
|
||||
if(on)
|
||||
|
||||
@@ -114,12 +114,11 @@
|
||||
/obj/machinery/status_display/examine(mob/user)
|
||||
. = ..()
|
||||
if (message1 || message2)
|
||||
var/list/msg = list("The display says:")
|
||||
. += "The display says:"
|
||||
if (message1)
|
||||
msg += "<br>\t<tt>[html_encode(message1)]</tt>"
|
||||
. += "\t<tt>[html_encode(message1)]</tt>"
|
||||
if (message2)
|
||||
msg += "<br>\t<tt>[html_encode(message2)]</tt>"
|
||||
to_chat(user, msg.Join())
|
||||
. += "\t<tt>[html_encode(message2)]</tt>"
|
||||
|
||||
// Helper procs for child display types.
|
||||
/obj/machinery/status_display/proc/display_shuttle_status(obj/docking_port/mobile/shuttle)
|
||||
@@ -146,9 +145,9 @@
|
||||
modestr = "<br>\t<tt>[modestr]: [shuttle.getTimerStr()]</tt>"
|
||||
else
|
||||
modestr = "<br>\t<tt>[modestr]</tt>"
|
||||
to_chat(user, "The display says:<br>\t<tt>[shuttle.name]</tt>[modestr]")
|
||||
return "The display says:<br>\t<tt>[shuttle.name]</tt>[modestr]"
|
||||
else
|
||||
to_chat(user, "The display says:<br>\t<tt>Shuttle missing!</tt>")
|
||||
return "The display says:<br>\t<tt>Shuttle missing!</tt>"
|
||||
|
||||
|
||||
/// Evac display which shows shuttle timer or message set by Command.
|
||||
@@ -195,9 +194,9 @@
|
||||
/obj/machinery/status_display/evac/examine(mob/user)
|
||||
. = ..()
|
||||
if(mode == SD_EMERGENCY)
|
||||
examine_shuttle(user, SSshuttle.emergency)
|
||||
. += examine_shuttle(user, SSshuttle.emergency)
|
||||
else if(!message1 && !message2)
|
||||
to_chat(user, "The display is blank.")
|
||||
. += "The display is blank."
|
||||
|
||||
/obj/machinery/status_display/evac/receive_signal(datum/signal/signal)
|
||||
switch(signal.data["command"])
|
||||
@@ -257,9 +256,9 @@
|
||||
else
|
||||
shuttleMsg = "[shuttle.getModeStr()]: [shuttle.getTimerStr()]"
|
||||
if (shuttleMsg)
|
||||
to_chat(user, "The display says:<br>\t<tt>[shuttleMsg]</tt>")
|
||||
. += "The display says:<br>\t<tt>[shuttleMsg]</tt>"
|
||||
else
|
||||
to_chat(user, "The display is blank.")
|
||||
. += "The display is blank."
|
||||
|
||||
|
||||
/// General-purpose shuttle status display.
|
||||
@@ -278,9 +277,9 @@
|
||||
/obj/machinery/status_display/shuttle/examine(mob/user)
|
||||
. = ..()
|
||||
if(shuttle_id)
|
||||
examine_shuttle(user, SSshuttle.getShuttle(shuttle_id))
|
||||
. += examine_shuttle(user, SSshuttle.getShuttle(shuttle_id))
|
||||
else
|
||||
to_chat(user, "The display is blank.")
|
||||
. += "The display is blank."
|
||||
|
||||
/obj/machinery/status_display/shuttle/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
|
||||
@@ -99,8 +99,8 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/syndicatebomb/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "A digital display on it reads \"[seconds_remaining()]\".")
|
||||
. = ..()
|
||||
. += "A digital display on it reads \"[seconds_remaining()]\"."
|
||||
|
||||
/obj/machinery/syndicatebomb/update_icon()
|
||||
icon_state = "[initial(icon_state)][active ? "-active" : "-inactive"][open_panel ? "-wires" : ""]"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
/obj/machinery/transformer/examine(mob/user)
|
||||
. = ..()
|
||||
if(cooldown && (issilicon(user) || isobserver(user)))
|
||||
to_chat(user, "It will be ready in [DisplayTimeText(cooldown_timer - world.time)].")
|
||||
. += "It will be ready in [DisplayTimeText(cooldown_timer - world.time)]."
|
||||
|
||||
/obj/machinery/transformer/Destroy()
|
||||
QDEL_NULL(countdown)
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
var/max_wash_capacity = 5
|
||||
|
||||
/obj/machinery/washing_machine/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click it to start a wash cycle.</span>")
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click it to start a wash cycle.</span>"
|
||||
|
||||
/obj/machinery/washing_machine/AltClick(mob/user)
|
||||
if(!user.canUseTopic(src))
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/turf/open/floor/mech_bay_recharge_floor/airless
|
||||
icon_state = "recharge_floor_asteroid"
|
||||
initial_gas_mix = "TEMP=2.7"
|
||||
initial_gas_mix = AIRLESS_ATMOS
|
||||
|
||||
/obj/machinery/mech_bay_recharge_port
|
||||
name = "mech bay power port"
|
||||
|
||||
@@ -270,23 +270,23 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/mecha/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
var/integrity = obj_integrity*100/max_integrity
|
||||
switch(integrity)
|
||||
if(85 to 100)
|
||||
to_chat(user, "It's fully intact.")
|
||||
. += "It's fully intact."
|
||||
if(65 to 85)
|
||||
to_chat(user, "It's slightly damaged.")
|
||||
. += "It's slightly damaged."
|
||||
if(45 to 65)
|
||||
to_chat(user, "It's badly damaged.")
|
||||
. += "It's badly damaged."
|
||||
if(25 to 45)
|
||||
to_chat(user, "It's heavily damaged.")
|
||||
. += "It's heavily damaged."
|
||||
else
|
||||
to_chat(user, "It's falling apart.")
|
||||
. += "It's falling apart."
|
||||
if(equipment && equipment.len)
|
||||
to_chat(user, "It's equipped with:")
|
||||
. += "It's equipped with:"
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/ME in equipment)
|
||||
to_chat(user, "[icon2html(ME, user)] \A [ME].")
|
||||
. += "[icon2html(ME, user)] \A [ME]."
|
||||
|
||||
//processing internal damage, temperature, air regulation, alert updates, lights power use.
|
||||
/obj/mecha/process()
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
AI.remote_control = null
|
||||
|
||||
/obj/structure/mecha_wreckage/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(AI)
|
||||
to_chat(user, "<span class='notice'>The AI recovery beacon is active.</span>")
|
||||
. += "<span class='notice'>The AI recovery beacon is active.</span>"
|
||||
|
||||
/obj/structure/mecha_wreckage/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weldingtool))
|
||||
|
||||
@@ -17,8 +17,15 @@
|
||||
hud.add_hud_to(H)
|
||||
|
||||
/obj/mecha/medical/odysseus/go_out()
|
||||
if(ishuman(occupant))
|
||||
var/mob/living/carbon/human/H = occupant
|
||||
if(isliving(occupant))
|
||||
var/mob/living/carbon/human/L = occupant
|
||||
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
hud.remove_hud_from(H)
|
||||
hud.remove_hud_from(L)
|
||||
..()
|
||||
|
||||
/obj/mecha/medical/odysseus/mmi_moved_inside(obj/item/mmi/mmi_as_oc, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/datum/atom_hud/hud = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
var/mob/living/brain/B = mmi_as_oc.brainmob
|
||||
hud.add_hud_to(B)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
/obj/effect/countdown/examine(mob/user)
|
||||
. = ..()
|
||||
to_chat(user, "This countdown is displaying: [displayed_text].")
|
||||
. += "This countdown is displaying: [displayed_text]."
|
||||
|
||||
/obj/effect/countdown/proc/attach(atom/A)
|
||||
attached_to = A
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user