Merge pull request #19 from Citadel-Station-13/master

e
This commit is contained in:
kappa-sama
2019-11-28 00:19:19 -05:00
committed by GitHub
486 changed files with 3423 additions and 1975 deletions
+8
View File
@@ -121,7 +121,15 @@
#define COMPONENT_CANCEL_THROW 1 #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_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_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 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_DISPOSING "movable_disposing" //called when the movable is added to a disposal holder object for disposal movement: (obj/structure/disposalholder/holder, obj/machinery/disposal/source)
#define COMSIG_MOVABLE_TELEPORTED "movable_teleported" //from base of do_teleport(): (channel, turf/origin, turf/destination) #define COMSIG_MOVABLE_TELEPORTED "movable_teleported" //from base of do_teleport(): (channel, turf/origin, turf/destination)
+3 -3
View File
@@ -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_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_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_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_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 #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 #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. //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 //1: stuff in mob, 2: stuff in backpack, 3: stuff in box in backpack, etc
+5
View File
@@ -100,3 +100,8 @@
#define NUKE_OFF_UNLOCKED 1 #define NUKE_OFF_UNLOCKED 1
#define NUKE_ON_TIMING 2 #define NUKE_ON_TIMING 2
#define NUKE_ON_EXPLODING 3 #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)
+4
View File
@@ -7,6 +7,8 @@
#define STATUS_EFFECT_REPLACE 2 //if it allows only one, but new instances replace #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 // // 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_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_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. #define STATUS_EFFECT_PENIS_ENLARGEMENT /datum/status_effect/chem/penis_enlarger //More applied slowdown, just like the above.
+4 -1
View File
@@ -109,6 +109,7 @@
#define TRAIT_NOHARDCRIT "nohardcrit" #define TRAIT_NOHARDCRIT "nohardcrit"
#define TRAIT_NOSOFTCRIT "nosoftcrit" #define TRAIT_NOSOFTCRIT "nosoftcrit"
#define TRAIT_MINDSHIELD "mindshield" #define TRAIT_MINDSHIELD "mindshield"
#define TRAIT_SIXTHSENSE "sixthsense"
#define TRAIT_DISSECTED "dissected" #define TRAIT_DISSECTED "dissected"
#define TRAIT_FEARLESS "fearless" #define TRAIT_FEARLESS "fearless"
#define TRAIT_UNSTABLE "unstable" #define TRAIT_UNSTABLE "unstable"
@@ -117,6 +118,7 @@
#define TRAIT_PARALYSIS_L_LEG "para-l-leg" #define TRAIT_PARALYSIS_L_LEG "para-l-leg"
#define TRAIT_PARALYSIS_R_LEG "para-r-leg" #define TRAIT_PARALYSIS_R_LEG "para-r-leg"
#define TRAIT_UNINTELLIGIBLE_SPEECH "unintelligible-speech" #define TRAIT_UNINTELLIGIBLE_SPEECH "unintelligible-speech"
#define TRAIT_SOOTHED_THROAT "soothed-throat"
#define TRAIT_LAW_ENFORCEMENT_METABOLISM "law-enforcement-metabolism" #define TRAIT_LAW_ENFORCEMENT_METABOLISM "law-enforcement-metabolism"
#define TRAIT_STRONG_GRABBER "strong_grabber" #define TRAIT_STRONG_GRABBER "strong_grabber"
#define TRAIT_CALCIUM_HEALER "calcium_healer" #define TRAIT_CALCIUM_HEALER "calcium_healer"
@@ -179,6 +181,7 @@
#define CULT_TRAIT "cult" #define CULT_TRAIT "cult"
#define CURSED_ITEM_TRAIT "cursed-item" // The item is magically cursed #define CURSED_ITEM_TRAIT "cursed-item" // The item is magically cursed
#define ABSTRACT_ITEM_TRAIT "abstract-item" #define ABSTRACT_ITEM_TRAIT "abstract-item"
#define STATUS_EFFECT_TRAIT "status-effect"
#define ROUNDSTART_TRAIT "roundstart" //cannot be removed without admin intervention #define ROUNDSTART_TRAIT "roundstart" //cannot be removed without admin intervention
// unique trait sources, still defines // unique trait sources, still defines
@@ -213,4 +216,4 @@
#define NINJA_SUIT_TRAIT "ninja-suit" #define NINJA_SUIT_TRAIT "ninja-suit"
#define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant" #define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant"
#define ABDUCTOR_ANTAGONIST "abductor-antagonist" #define ABDUCTOR_ANTAGONIST "abductor-antagonist"
#define MADE_UNCLONEABLE "made-uncloneable" #define MADE_UNCLONEABLE "made-uncloneable"
+6 -4
View File
@@ -522,12 +522,14 @@ GLOBAL_LIST_EMPTY(species_list)
else else
prefs = new prefs = new
var/adminoverride = 0 var/override = FALSE
if(M.client && M.client.holder && (prefs.chat_toggles & CHAT_DEAD)) if(M.client && M.client.holder && (prefs.chat_toggles & CHAT_DEAD))
adminoverride = 1 override = TRUE
if(isnewplayer(M) && !adminoverride) if(HAS_TRAIT(M, TRAIT_SIXTHSENSE))
override = TRUE
if(isnewplayer(M) && !override)
continue continue
if(M.stat != DEAD && !adminoverride) if(M.stat != DEAD && !override)
continue continue
if(speaker_key && speaker_key in prefs.ignoring) if(speaker_key && speaker_key in prefs.ignoring)
continue continue
+27 -4
View File
@@ -46,10 +46,15 @@ GLOBAL_LIST_INIT(ai_core_display_screens, list(
":thinking:", ":thinking:",
"Alien", "Alien",
"Angel", "Angel",
"Angryface",
"AtlantisCZE",
"Banned", "Banned",
"Bliss", "Bliss",
"Blue", "Blue",
"Clown", "Boy",
"Boy-Malf",
"Girl",
"Girl-Malf",
"Database", "Database",
"Dorf", "Dorf",
"Firewall", "Firewall",
@@ -61,26 +66,44 @@ GLOBAL_LIST_INIT(ai_core_display_screens, list(
"Hades", "Hades",
"Heartline", "Heartline",
"Helios", "Helios",
"Hotdog",
"Hourglass",
"House", "House",
"Inverted", "Inverted",
"Jack",
"Matrix", "Matrix",
"Monochrome", "Monochrome",
"Mothman",
"Murica", "Murica",
"Nanotrasen", "Nanotrasen",
"Not Malf", "Not Malf",
"Patriot",
"Pirate",
"President", "President",
"Random",
"Rainbow", "Rainbow",
"Red", "Clown",
"Random",
"Ravensdale",
"Red October", "Red October",
"Red",
"Royal",
"Searif",
"Serithi",
"SilveryFerret",
"Smiley",
"Static", "Static",
"Syndicat Meow", "Syndicat Meow",
"TechDemon", "TechDemon",
"Terminal",
"Text", "Text",
"Too Deep", "Too Deep",
"Triumvirate", "Triumvirate",
"Triumvirate-M", "Triumvirate-M",
"Weird")) "Wasp",
"Weird",
"Xerxes",
"Yes-Man"
))
/proc/resolve_ai_icon(input) /proc/resolve_ai_icon(input)
if(!input || !(input in GLOB.ai_core_display_screens)) if(!input || !(input in GLOB.ai_core_display_screens))
+4
View File
@@ -13,6 +13,8 @@
#define POLL_IGNORE_GOLEM "golem" #define POLL_IGNORE_GOLEM "golem"
#define POLL_IGNORE_SWARMER "swarmer" #define POLL_IGNORE_SWARMER "swarmer"
#define POLL_IGNORE_DRONE "drone" #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_DEMON "demon"
#define POLL_IGNORE_WIZARD "wizard" #define POLL_IGNORE_WIZARD "wizard"
#define POLL_IGNORE_CLONE "clone" #define POLL_IGNORE_CLONE "clone"
@@ -31,6 +33,8 @@ GLOBAL_LIST_INIT(poll_ignore_desc, list(
POLL_IGNORE_GOLEM = "Golems", POLL_IGNORE_GOLEM = "Golems",
POLL_IGNORE_SWARMER = "Swarmer shells", POLL_IGNORE_SWARMER = "Swarmer shells",
POLL_IGNORE_DRONE = "Drone shells", POLL_IGNORE_DRONE = "Drone shells",
POLL_IGNORE_IMAGINARYFRIEND = "Imaginary Friend",
POLL_IGNORE_SPLITPERSONALITY = "Split Personality",
POLL_IGNORE_DEMON = "Demons", POLL_IGNORE_DEMON = "Demons",
POLL_IGNORE_WIZARD = "Wizards", POLL_IGNORE_WIZARD = "Wizards",
POLL_IGNORE_CLONE = "Defective/SDGF clones" POLL_IGNORE_CLONE = "Defective/SDGF clones"
+6
View File
@@ -213,6 +213,12 @@ or something covering your eyes."
desc = "Whoa man, you're tripping balls! Careful you don't get addicted... if you aren't already." desc = "Whoa man, you're tripping balls! Careful you don't get addicted... if you aren't already."
icon_state = "high" icon_state = "high"
/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 /obj/screen/alert/drunk //Not implemented
name = "Drunk" 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." desc = "All that alcohol you've been drinking is impairing your speech, motor skills, and mental cognition. Make sure to act like it."
+1 -1
View File
@@ -25,7 +25,7 @@
return ..() return ..()
/obj/screen/examine(mob/user) /obj/screen/examine(mob/user)
return return list()
/obj/screen/orbit() /obj/screen/orbit()
return return
+2 -3
View File
@@ -106,9 +106,8 @@
/obj/item/tk_grab/examine(user) /obj/item/tk_grab/examine(user)
if (focus) if (focus)
focus.examine(user) return focus.examine(user)
else return ..()
..()
/obj/item/tk_grab/attack_self(mob/user) /obj/item/tk_grab/attack_self(mob/user)
if(!focus) if(!focus)
+24
View File
@@ -12,6 +12,7 @@ SUBSYSTEM_DEF(persistence)
var/list/obj/structure/chisel_message/chisel_messages = list() var/list/obj/structure/chisel_message/chisel_messages = list()
var/list/saved_messages = list() var/list/saved_messages = list()
var/list/saved_modes = list(1,2,3) var/list/saved_modes = list(1,2,3)
var/list/saved_threat_levels = list(1,1,1)
var/list/saved_maps var/list/saved_maps
var/list/saved_trophies = list() var/list/saved_trophies = list()
var/list/spawned_objects = list() var/list/spawned_objects = list()
@@ -27,6 +28,7 @@ SUBSYSTEM_DEF(persistence)
LoadChiselMessages() LoadChiselMessages()
LoadTrophies() LoadTrophies()
LoadRecentModes() LoadRecentModes()
LoadRecentThreats()
LoadRecentMaps() LoadRecentMaps()
LoadPhotoPersistence() LoadPhotoPersistence()
if(CONFIG_GET(flag/use_antag_rep)) if(CONFIG_GET(flag/use_antag_rep))
@@ -166,6 +168,15 @@ SUBSYSTEM_DEF(persistence)
return return
saved_modes = json["data"] 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() /datum/controller/subsystem/persistence/proc/LoadRecentMaps()
var/json_file = file("data/RecentMaps.json") var/json_file = file("data/RecentMaps.json")
if(!fexists(json_file)) if(!fexists(json_file))
@@ -216,6 +227,7 @@ SUBSYSTEM_DEF(persistence)
CollectSecretSatchels() CollectSecretSatchels()
CollectTrophies() CollectTrophies()
CollectRoundtype() CollectRoundtype()
CollectThreatLevel()
RecordMaps() RecordMaps()
SavePhotoPersistence() //THIS IS PERSISTENCE, NOT THE LOGGING PORTION. SavePhotoPersistence() //THIS IS PERSISTENCE, NOT THE LOGGING PORTION.
if(CONFIG_GET(flag/use_antag_rep)) if(CONFIG_GET(flag/use_antag_rep))
@@ -372,6 +384,18 @@ SUBSYSTEM_DEF(persistence)
fdel(json_file) fdel(json_file)
WRITE_FILE(json_file, json_encode(file_data)) 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() /datum/controller/subsystem/persistence/proc/RecordMaps()
saved_maps = saved_maps?.len ? list("[SSmapping.config.map_name]") | saved_maps : list("[SSmapping.config.map_name]") saved_maps = saved_maps?.len ? list("[SSmapping.config.map_name]") | saved_maps : list("[SSmapping.config.map_name]")
var/json_file = file("data/RecentMaps.json") var/json_file = file("data/RecentMaps.json")
+9 -1
View File
@@ -153,6 +153,10 @@ SUBSYSTEM_DEF(vote)
if(SSticker.current_state > GAME_STATE_PREGAME)//Don't change the mode if the round already started. 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.") return message_admins("A vote has tried to change the gamemode, but the game has already started. Aborting.")
GLOB.master_mode = "dynamic" 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/mean = 0
var/voters = 0 var/voters = 0
for(var/client/c in GLOB.clients) for(var/client/c in GLOB.clients)
@@ -253,7 +257,11 @@ SUBSYSTEM_DEF(vote)
if("roundtype") //CIT CHANGE - adds the roundstart secret/extended vote if("roundtype") //CIT CHANGE - adds the roundstart secret/extended vote
choices.Add("secret", "extended") choices.Add("secret", "extended")
if("dynamic") 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") if("custom")
question = stripped_input(usr,"What is the vote for?") question = stripped_input(usr,"What is the vote for?")
if(!question) if(!question)
+20 -5
View File
@@ -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. //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, //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 /datum/brain_trauma
var/name = "Brain Trauma" var/name = "Brain Trauma"
var/desc = "A trauma caused by brain damage, which causes issues to the patient." 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/mob/living/carbon/owner //the poor bastard
var/obj/item/organ/brain/brain //the poor bastard's brain var/obj/item/organ/brain/brain //the poor bastard's brain
var/gain_text = "<span class='notice'>You feel traumatized.</span>" var/gain_text = "<span class='notice'>You feel traumatized.</span>"
@@ -12,15 +14,21 @@
var/can_gain = TRUE var/can_gain = TRUE
var/random_gain = TRUE //can this be gained through random traumas? var/random_gain = TRUE //can this be gained through random traumas?
var/resilience = TRAUMA_RESILIENCE_BASIC //how hard is this to cure? 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() /datum/brain_trauma/Destroy()
brain.traumas -= src if(brain && brain.traumas)
brain.traumas -= src
if(owner) if(owner)
on_lose() on_lose()
brain = null brain = null
owner = null owner = null
return ..() return ..()
/datum/brain_trauma/proc/on_clone()
if(clonable)
return new type
//Called on life ticks //Called on life ticks
/datum/brain_trauma/proc/on_life() /datum/brain_trauma/proc/on_life()
return return
@@ -33,17 +41,24 @@
/datum/brain_trauma/proc/on_gain() /datum/brain_trauma/proc/on_gain()
to_chat(owner, gain_text) to_chat(owner, gain_text)
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech) RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/handle_hearing)
//Called when removed from a mob //Called when removed from a mob
/datum/brain_trauma/proc/on_lose(silent) /datum/brain_trauma/proc/on_lose(silent)
if(!silent) if(!silent)
to_chat(owner, lose_text) to_chat(owner, lose_text)
UnregisterSignal(owner, COMSIG_MOB_SAY) UnregisterSignal(owner, COMSIG_MOB_SAY)
UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
//Called when hearing a spoken message //Called when hearing a spoken message
/datum/brain_trauma/proc/on_hear(message, speaker, message_language, raw_message, radio_freq) /datum/brain_trauma/proc/handle_hearing(datum/source, list/hearing_args)
return message UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
//Called when speaking //Called when speaking
/datum/brain_trauma/proc/handle_speech(datum/source, list/speech_args) /datum/brain_trauma/proc/handle_speech(datum/source, list/speech_args)
UnregisterSignal(owner, COMSIG_MOB_SAY) 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
+8 -9
View File
@@ -5,6 +5,7 @@
gain_text = "" gain_text = ""
lose_text = "" lose_text = ""
resilience = TRAUMA_RESILIENCE_SURGERY resilience = TRAUMA_RESILIENCE_SURGERY
var/hypnotic_phrase = "" var/hypnotic_phrase = ""
var/regex/target_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.",\ "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.",\ "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>") "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>") as long as you act like the words are your highest priority.</span>")
else var/obj/screen/alert/hypnosis/hypno_alert = owner.throw_alert("hypnosis", /obj/screen/alert/hypnosis)
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,\ hypno_alert.desc = "\"[hypnotic_phrase]\"... your mind seems to be fixated on this concept."
however this does not take precedence over your other objectives.</span>")
..() ..()
/datum/brain_trauma/hypnosis/on_lose() /datum/brain_trauma/hypnosis/on_lose()
message_admins("[ADMIN_LOOKUPFLW(owner)] is no longer hypnotized with the phrase '[hypnotic_phrase]'.") 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]'.") 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() /datum/brain_trauma/hypnosis/on_life()
@@ -67,6 +67,5 @@
if(2) if(2)
new /datum/hallucination/chat(owner, TRUE, FALSE, "<span class='hypnophrase'>[hypnotic_phrase]</span>") 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) /datum/brain_trauma/hypnosis/handle_hearing(datum/source, list/hearing_args)
message = target_phrase.Replace(message, "<span class='hypnophrase'>$1</span>") hearing_args[HEARING_MESSAGE] = target_phrase.Replace(hearing_args[HEARING_MESSAGE], "<span class='hypnophrase'>$1</span>")
return message
+60 -10
View File
@@ -8,6 +8,10 @@
var/friend_initialized = FALSE var/friend_initialized = FALSE
/datum/brain_trauma/special/imaginary_friend/on_gain() /datum/brain_trauma/special/imaginary_friend/on_gain()
var/mob/living/M = owner
if(M.stat == DEAD || !M.client)
qdel(src)
return
..() ..()
make_friend() make_friend()
get_ghost() get_ghost()
@@ -43,7 +47,7 @@
/datum/brain_trauma/special/imaginary_friend/proc/get_ghost() /datum/brain_trauma/special/imaginary_friend/proc/get_ghost()
set waitfor = FALSE 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)) if(LAZYLEN(candidates))
var/mob/dead/observer/C = pick(candidates) var/mob/dead/observer/C = pick(candidates)
C.transfer_ckey(friend, FALSE) C.transfer_ckey(friend, FALSE)
@@ -74,26 +78,34 @@
/mob/camera/imaginary_friend/Login() /mob/camera/imaginary_friend/Login()
..() ..()
to_chat(src, "<span class='notice'><b>You are the imaginary friend of [owner]!</b></span>") greet()
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>")
Show() 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) /mob/camera/imaginary_friend/Initialize(mapload, _trauma)
. = ..() . = ..()
var/gender = pick(MALE, FEMALE)
real_name = random_unique_name(gender)
name = real_name
trauma = _trauma trauma = _trauma
owner = trauma.owner owner = trauma.owner
copy_known_languages_from(owner, TRUE) copy_known_languages_from(owner, TRUE)
human_image = get_flat_human_icon(null, pick(SSjob.occupations))
setup_friend()
join = new join = new
join.Grant(src) join.Grant(src)
hide = new hide = new
hide.Grant(src) 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() /mob/camera/imaginary_friend/proc/Show()
if(!client) //nobody home if(!client) //nobody home
return return
@@ -132,7 +144,7 @@
if(client.prefs.muted & MUTE_IC) if(client.prefs.muted & MUTE_IC)
to_chat(src, "You cannot send IC messages (muted).") to_chat(src, "You cannot send IC messages (muted).")
return return
if (src.client.handle_spam_prevention(message,MUTE_IC)) if (!(ignore_spam || forced) && src.client.handle_spam_prevention(message,MUTE_IC))
return return
friend_talk(message) friend_talk(message)
@@ -218,4 +230,42 @@
var/mob/camera/imaginary_friend/I = owner var/mob/camera/imaginary_friend/I = owner
I.hidden = !I.hidden I.hidden = !I.hidden
I.Show() 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")
+109 -55
View File
@@ -64,21 +64,21 @@
name = "Speech Impediment" name = "Speech Impediment"
desc = "Patient is unable to form coherent sentences." desc = "Patient is unable to form coherent sentences."
scan_desc = "communication disorder" scan_desc = "communication disorder"
gain_text = "" //mutation will handle the text gain_text = "<span class='danger'>You can't seem to form any coherent thoughts!</span>"
lose_text = "" lose_text = "<span class='danger'>Your mind feels more clear.</span>"
/datum/brain_trauma/mild/speech_impediment/on_gain() /datum/brain_trauma/mild/speech_impediment/on_gain()
ADD_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, TRAUMA_TRAIT) ADD_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, TRAUMA_TRAIT)
. = ..() ..()
/datum/brain_trauma/mild/speech_impediment/on_lose() /datum/brain_trauma/mild/speech_impediment/on_lose()
REMOVE_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, TRAUMA_TRAIT) REMOVE_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, TRAUMA_TRAIT)
. = ..() ..()
/datum/brain_trauma/mild/concussion /datum/brain_trauma/mild/concussion
name = "Concussion" name = "Concussion"
desc = "Patient's brain is concussed." desc = "Patient's brain is concussed."
scan_desc = "a concussion" scan_desc = "concussion"
gain_text = "<span class='warning'>Your head hurts!</span>" gain_text = "<span class='warning'>Your head hurts!</span>"
lose_text = "<span class='notice'>The pressure inside your head starts fading.</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>" 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>" lose_text = "<span class='notice'>You feel in control of your muscles again.</span>"
/datum/brain_trauma/mild/muscle_spasms/on_life() /datum/brain_trauma/mild/muscle_spasms/on_gain()
if(prob(7)) owner.apply_status_effect(STATUS_EFFECT_SPASMS)
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_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]
+99 -20
View File
@@ -2,8 +2,8 @@
name = "Phobia" name = "Phobia"
desc = "Patient is unreasonably afraid of something." desc = "Patient is unreasonably afraid of something."
scan_desc = "phobia" scan_desc = "phobia"
gain_text = "" gain_text = "<span class='warning'>You start finding default values very unnerving...</span>"
lose_text = "" lose_text = "<span class='notice'>You no longer feel afraid of default values.</span>"
var/phobia_type var/phobia_type
var/next_check = 0 var/next_check = 0
var/next_scare = 0 var/next_scare = 0
@@ -14,8 +14,10 @@
var/list/trigger_turfs var/list/trigger_turfs
var/list/trigger_species var/list/trigger_species
/datum/brain_trauma/mild/phobia/New(specific_type) /datum/brain_trauma/mild/phobia/New(new_phobia_type)
phobia_type = specific_type if(new_phobia_type)
phobia_type = new_phobia_type
if(!phobia_type) if(!phobia_type)
phobia_type = pick(SStraumas.phobia_types) phobia_type = pick(SStraumas.phobia_types)
@@ -29,6 +31,11 @@
trigger_species = SStraumas.phobia_species[phobia_type] 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() /datum/brain_trauma/mild/phobia/on_life()
..() ..()
if(HAS_TRAIT(owner, TRAIT_FEARLESS)) if(HAS_TRAIT(owner, TRAIT_FEARLESS))
@@ -44,6 +51,12 @@
if(is_type_in_typecache(O, trigger_objs)) if(is_type_in_typecache(O, trigger_objs))
freak_out(O) freak_out(O)
return 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)) if(LAZYLEN(trigger_turfs))
for(var/turf/T in seen_atoms) for(var/turf/T in seen_atoms)
@@ -51,45 +64,41 @@
freak_out(T) freak_out(T)
return 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) for(var/mob/M in seen_atoms)
if(is_type_in_typecache(M, trigger_mobs)) if(is_type_in_typecache(M, trigger_mobs))
freak_out(M) freak_out(M)
return 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 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)) if(LAZYLEN(trigger_species) && H.dna && H.dna.species && is_type_in_typecache(H.dna.species, trigger_species))
freak_out(H) freak_out(H)
return
for(var/X in H.get_all_slots() | H.held_items) /datum/brain_trauma/mild/phobia/handle_hearing(datum/source, list/hearing_args)
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)
if(!owner.can_hear() || world.time < next_scare) //words can't trigger you if you can't hear them *taps head* 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)) if(HAS_TRAIT(owner, TRAIT_FEARLESS))
return message return
for(var/word in trigger_words) 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 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 break
return message
/datum/brain_trauma/mild/phobia/handle_speech(datum/source, list/speech_args) /datum/brain_trauma/mild/phobia/handle_speech(datum/source, list/speech_args)
if(HAS_TRAIT(owner, TRAIT_FEARLESS)) if(HAS_TRAIT(owner, TRAIT_FEARLESS))
return return
for(var/word in trigger_words) 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)) 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] = "" speech_args[SPEECH_MESSAGE] = ""
/datum/brain_trauma/mild/phobia/proc/freak_out(atom/reason, trigger_word) /datum/brain_trauma/mild/phobia/proc/freak_out(atom/reason, trigger_word)
@@ -125,6 +134,76 @@
owner.Jitter(10) owner.Jitter(10)
owner.stuttering += 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 /datum/brain_trauma/mild/phobia/security
phobia_type = "security" phobia_type = "security"
random_gain = FALSE 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
+3 -3
View File
@@ -119,7 +119,7 @@
owner.update_disabled_bodyparts() owner.update_disabled_bodyparts()
/datum/brain_trauma/severe/paralysis/paraplegic /datum/brain_trauma/severe/paralysis/paraplegic
//can_gain = FALSE maybe breaks. random_gain = FALSE
paralysis_type = "legs" paralysis_type = "legs"
resilience = TRAUMA_RESILIENCE_ABSOLUTE resilience = TRAUMA_RESILIENCE_ABSOLUTE
@@ -149,7 +149,7 @@
/datum/brain_trauma/severe/monophobia /datum/brain_trauma/severe/monophobia
name = "Monophobia" name = "Monophobia"
desc = "Patient feels sick and distressed when not around other people, leading to potentially lethal levels of stress." 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 = "" gain_text = ""
lose_text = "<span class='notice'>You feel like you could be safe on your own.</span>" lose_text = "<span class='notice'>You feel like you could be safe on your own.</span>"
var/stress = 0 var/stress = 0
@@ -168,7 +168,7 @@
if(stress > 10 && (prob(5))) if(stress > 10 && (prob(5)))
stress_reaction() stress_reaction()
else else
stress -= 4 stress = max(stress - 4, 0)
/datum/brain_trauma/severe/monophobia/proc/check_alone() /datum/brain_trauma/severe/monophobia/proc/check_alone()
if(HAS_TRAIT(owner, TRAIT_BLIND)) if(HAS_TRAIT(owner, TRAIT_BLIND))
+106 -3
View File
@@ -22,6 +22,14 @@
else else
speak("neutral", prob(25)) 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) /datum/brain_trauma/special/godwoken/proc/speak(type, include_owner = FALSE)
var/message var/message
switch(type) switch(type)
@@ -36,7 +44,7 @@
else else
message = pick_list_replacements(BRAIN_DAMAGE_FILE, "god_neutral") 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) voice_of_god(message, owner, list("colossus","yell"), 2.5, include_owner, FALSE)
/datum/brain_trauma/special/bluespace_prophet /datum/brain_trauma/special/bluespace_prophet
@@ -134,7 +142,101 @@
/datum/brain_trauma/special/psychotic_brawling/bath_salts /datum/brain_trauma/special/psychotic_brawling/bath_salts
name = "Chemical Violent Psychosis" 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 /datum/brain_trauma/special/beepsky
name = "Criminal" name = "Criminal"
@@ -142,6 +244,7 @@
scan_desc = "criminal mind" scan_desc = "criminal mind"
gain_text = "<span class='warning'>Justice is coming for you.</span>" gain_text = "<span class='warning'>Justice is coming for you.</span>"
lose_text = "<span class='notice'>You were absolved for your crimes.</span>" lose_text = "<span class='notice'>You were absolved for your crimes.</span>"
clonable = FALSE
random_gain = FALSE random_gain = FALSE
var/obj/effect/hallucination/simple/securitron/beepsky var/obj/effect/hallucination/simple/securitron/beepsky
@@ -201,4 +304,4 @@
/obj/effect/hallucination/simple/securitron/Destroy() /obj/effect/hallucination/simple/securitron/Destroy()
STOP_PROCESSING(SSfastprocess,src) STOP_PROCESSING(SSfastprocess,src)
return ..() return ..()
+10 -6
View File
@@ -13,6 +13,10 @@
var/mob/living/split_personality/owner_backseat var/mob/living/split_personality/owner_backseat
/datum/brain_trauma/severe/split_personality/on_gain() /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() make_backseats()
get_ghost() get_ghost()
@@ -23,7 +27,7 @@
/datum/brain_trauma/severe/split_personality/proc/get_ghost() /datum/brain_trauma/severe/split_personality/proc/get_ghost()
set waitfor = FALSE 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)) if(LAZYLEN(candidates))
var/mob/dead/observer/C = pick(candidates) var/mob/dead/observer/C = pick(candidates)
C.transfer_ckey(stranger_backseat, FALSE) C.transfer_ckey(stranger_backseat, FALSE)
@@ -191,13 +195,13 @@
/datum/brain_trauma/severe/split_personality/brainwashing/on_life() /datum/brain_trauma/severe/split_personality/brainwashing/on_life()
return //no random switching return //no random switching
/datum/brain_trauma/severe/split_personality/brainwashing/on_hear(message, speaker, message_language, raw_message, radio_freq) /datum/brain_trauma/severe/split_personality/brainwashing/handle_hearing(datum/source, list/hearing_args)
if(HAS_TRAIT(owner, TRAIT_DEAF) || owner == speaker) if(HAS_TRAIT(owner, TRAIT_DEAF) || owner == hearing_args[HEARING_SPEAKER])
return message return
var/message = hearing_args[HEARING_MESSAGE]
if(findtext(message, codeword)) 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) 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) /datum/brain_trauma/severe/split_personality/brainwashing/handle_speech(datum/source, list/speech_args)
if(findtext(speech_args[SPEECH_MESSAGE], codeword)) if(findtext(speech_args[SPEECH_MESSAGE], codeword))
+6 -6
View File
@@ -29,21 +29,21 @@
var/obj/item/typecast = upgrade_item var/obj/item/typecast = upgrade_item
upgrade_name = initial(typecast.name) 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 //upgrade_item could also be typecast here instead
if(ismecha(parent)) if(ismecha(parent))
if(amount) if(amount)
if(amount < maxamount) 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 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 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 else
if(amount) 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 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) /datum/component/armor_plate/proc/applyplate(datum/source, obj/item/I, mob/user, params)
if(!istype(I,upgrade_item)) if(!istype(I,upgrade_item))
+2 -2
View File
@@ -19,9 +19,9 @@
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY,.proc/action) RegisterSignal(parent, COMSIG_PARENT_ATTACKBY,.proc/action)
update_parent(index) 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) if(desc)
to_chat(user, desc) examine_list += desc
/datum/component/construction/proc/on_step() /datum/component/construction/proc/on_step()
if(index > steps.len) if(index > steps.len)
+2 -2
View File
@@ -71,5 +71,5 @@
if(strength >= cleanable) if(strength >= cleanable)
qdel(src) qdel(src)
/datum/component/decal/proc/examine(datum/source, mob/user) /datum/component/decal/proc/examine(datum/source, mob/user, list/examine_list)
to_chat(user, description) examine_list += description
+2 -2
View File
@@ -15,8 +15,8 @@
for(var/i in parent) for(var/i in parent)
RegisterSignal(i, COMSIG_MOVABLE_PRE_THROW, .proc/throw_react) RegisterSignal(i, COMSIG_MOVABLE_PRE_THROW, .proc/throw_react)
/datum/component/magnetic_catch/proc/examine(datum/source, mob/user) /datum/component/magnetic_catch/proc/examine(datum/source, mob/user, list/examine_list)
to_chat(user, "It has been installed with inertia dampening to prevent coffee spills.") 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) /datum/component/magnetic_catch/proc/crossed_react(datum/source, atom/movable/thing)
RegisterSignal(thing, COMSIG_MOVABLE_PRE_THROW, .proc/throw_react, TRUE) RegisterSignal(thing, COMSIG_MOVABLE_PRE_THROW, .proc/throw_react, TRUE)
+2 -2
View File
@@ -49,13 +49,13 @@
var/mat_path = possible_mats[id] var/mat_path = possible_mats[id]
materials[id] = new mat_path() 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) if(show_on_examine)
for(var/I in materials) for(var/I in materials)
var/datum/material/M = materials[I] var/datum/material/M = materials[I]
var/amt = amount(M.id) var/amt = amount(M.id)
if(amt) 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) /datum/component/material_container/proc/OnAttackBy(datum/source, obj/item/I, mob/living/user)
var/list/tc = allowed_typecache var/list/tc = allowed_typecache
-6
View File
@@ -53,7 +53,6 @@
RegisterSignal(parent, COMSIG_MOB_ALLOWED, .proc/check_access) RegisterSignal(parent, COMSIG_MOB_ALLOWED, .proc/check_access)
RegisterSignal(parent, COMSIG_LIVING_ELECTROCUTE_ACT, .proc/on_shock) RegisterSignal(parent, COMSIG_LIVING_ELECTROCUTE_ACT, .proc/on_shock)
RegisterSignal(parent, COMSIG_LIVING_MINOR_SHOCK, .proc/on_minor_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_SPECIES_GAIN, .proc/check_viable_biotype)
RegisterSignal(parent, COMSIG_NANITE_SIGNAL, .proc/receive_signal) RegisterSignal(parent, COMSIG_NANITE_SIGNAL, .proc/receive_signal)
@@ -191,11 +190,6 @@
var/datum/nanite_program/NP = X var/datum/nanite_program/NP = X
NP.on_death(gibbed) 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") /datum/component/nanites/proc/receive_signal(datum/source, code, source = "an unidentified source")
for(var/X in programs) for(var/X in programs)
var/datum/nanite_program/NP = X var/datum/nanite_program/NP = X
+3 -3
View File
@@ -18,7 +18,7 @@
hl3_release_date = _half_life hl3_release_date = _half_life
can_contaminate = _can_contaminate can_contaminate = _can_contaminate
if(istype(parent, /atom)) if(istype(parent, /atom))
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/rad_examine) RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/rad_examine)
if(istype(parent, /obj/item)) if(istype(parent, /obj/item))
RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/rad_attack) RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/rad_attack)
@@ -58,7 +58,7 @@
else else
strength = max(strength, arguments[1]) 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/atom/master = parent
var/list/out = list() var/list/out = list()
if(get_dist(master, user) <= 1) if(get_dist(master, user) <= 1)
@@ -72,7 +72,7 @@
out += "[out ? " and it " : "[master] "]hurts to look at." out += "[out ? " and it " : "[master] "]hurts to look at."
else else
out += "." out += "."
to_chat(user, out.Join()) examine_list += out.Join()
/datum/component/radioactive/proc/rad_attack(datum/source, atom/movable/target, mob/living/user) /datum/component/radioactive/proc/rad_attack(datum/source, atom/movable/target, mob/living/user)
radiation_pulse(parent, strength/20) radiation_pulse(parent, strength/20)
+2 -2
View File
@@ -98,9 +98,9 @@
remove_verbs() 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) 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) /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)) if(!can_be_rotated.Invoke(user, rotation) || !can_user_rotate.Invoke(user, rotation))
+2 -1
View File
@@ -8,6 +8,7 @@
if(!ismovableatom(parent)) if(!ismovableatom(parent))
return COMPONENT_INCOMPATIBLE return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, list(COMSIG_MOVABLE_Z_CHANGED), .proc/check_in_bounds) 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_PARENT_PREQDELETED), .proc/check_deletion)
RegisterSignal(parent, list(COMSIG_ITEM_IMBUE_SOUL), .proc/check_soul_imbue) RegisterSignal(parent, list(COMSIG_ITEM_IMBUE_SOUL), .proc/check_soul_imbue)
src.inform_admins = inform_admins src.inform_admins = inform_admins
@@ -32,6 +33,7 @@
var/atom/movable/AM = parent var/atom/movable/AM = parent
AM.forceMove(targetturf) 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" // move the disc, so ghosts remain orbiting it even if it's "destroyed"
return targetturf return targetturf
@@ -40,7 +42,6 @@
return return
else else
var/turf/currentturf = get_turf(src) 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() var/turf/targetturf = relocate()
log_game("[parent] has been moved out of bounds in [loc_name(currentturf)]. Moving it to [loc_name(targetturf)].") log_game("[parent] has been moved out of bounds in [loc_name(currentturf)]. Moving it to [loc_name(targetturf)].")
if(inform_admins) if(inform_admins)
+63 -34
View File
@@ -567,8 +567,7 @@ datum/status_effect/pacify
tick_interval = 10 tick_interval = 10
examine_text = "<span class='warning'>SUBJECTPRONOUN seems slow and unfocused.</span>" examine_text = "<span class='warning'>SUBJECTPRONOUN seems slow and unfocused.</span>"
var/stun = TRUE var/stun = TRUE
var/triggered = FALSE alert_type = /obj/screen/alert/status_effect/trance
alert_type = null
/obj/screen/alert/status_effect/trance /obj/screen/alert/status_effect/trance
name = "Trance" name = "Trance"
@@ -576,17 +575,6 @@ datum/status_effect/pacify
icon_state = "high" icon_state = "high"
/datum/status_effect/trance/tick() /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) if(stun)
owner.Stun(60, TRUE, TRUE) owner.Stun(60, TRUE, TRUE)
owner.dizziness = 20 owner.dizziness = 20
@@ -594,47 +582,88 @@ datum/status_effect/pacify
/datum/status_effect/trance/on_apply() /datum/status_effect/trance/on_apply()
if(!iscarbon(owner)) if(!iscarbon(owner))
return FALSE 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) RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/hypnotize)
ADD_TRAIT(owner, TRAIT_MUTE, "trance") ADD_TRAIT(owner, TRAIT_MUTE, "trance")
if(!owner.has_quirk(/datum/quirk/monochromatic)) owner.add_client_colour(/datum/client_colour/monochrome/trance)
owner.add_client_colour(/datum/client_colour/monochrome)
owner.visible_message("[stun ? "<span class='warning'>[owner] stands still as [owner.p_their()] eyes seem to focus on a distant point.</span>" : ""]", \ 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>") "<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 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 duration = _duration
stun = _stun stun = _stun
if(source_quirk == FALSE && HAS_TRAIT(owner, "hypnotherapy"))
REMOVE_TRAIT(owner, "hypnotherapy", ROUNDSTART_TRAIT)
return ..() return ..()
/datum/status_effect/trance/on_remove() /datum/status_effect/trance/on_remove()
UnregisterSignal(owner, COMSIG_MOVABLE_HEAR) UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
REMOVE_TRAIT(owner, TRAIT_MUTE, "trance") REMOVE_TRAIT(owner, TRAIT_MUTE, "trance")
owner.dizziness = 0 owner.dizziness = 0
if(!owner.has_quirk(/datum/quirk/monochromatic)) owner.remove_client_colour(/datum/client_colour/monochrome/trance)
owner.remove_client_colour(/datum/client_colour/monochrome)
to_chat(owner, "<span class='warning'>You snap out of your trance!</span>") 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) /datum/status_effect/trance/proc/hypnotize(datum/source, list/hearing_args)
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)
if(!owner.can_hear()) if(!owner.can_hear())
return return
if(speaker == owner) if(hearing_args[HEARING_SPEAKER] == owner)
return return
var/mob/living/carbon/C = owner var/mob/living/carbon/C = owner
C.cure_trauma_type(/datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY) //clear previous hypnosis 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, hearing_args[HEARING_RAW_MESSAGE]), 10)
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.proc/Stun, 60, TRUE, TRUE), 15) //Take some time to think about it addtimer(CALLBACK(C, /mob/living.proc/Stun, 60, TRUE, TRUE), 15) //Take some time to think about it
qdel(src) 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))
+14
View File
@@ -69,3 +69,17 @@
/datum/status_effect/in_love/tick() /datum/status_effect/in_love/tick()
if(date) if(date)
new /obj/effect/temp_visual/love_heart/invisible(get_turf(date.loc), owner) 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 owner = null
qdel(src) 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! //clickdelay/nextmove modifiers!
/datum/status_effect/proc/nextmove_modifier() /datum/status_effect/proc/nextmove_modifier()
return 1 return 1
@@ -92,6 +98,9 @@
if(S.id == initial(S1.id) && S.status_type) if(S.id == initial(S1.id) && S.status_type)
if(S.status_type == STATUS_EFFECT_REPLACE) if(S.status_type == STATUS_EFFECT_REPLACE)
S.be_replaced() S.be_replaced()
else if(S.status_type == STATUS_EFFECT_REFRESH)
S.refresh()
return
else else
return return
var/list/arguments = args.Copy() var/list/arguments = args.Copy()
+12 -12
View File
@@ -280,35 +280,35 @@
///Generate the full examine string of this atom (including icon for goonchat) ///Generate the full examine string of this atom (including icon for goonchat)
/atom/proc/get_examine_string(mob/user, thats = FALSE) /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) /atom/proc/examine(mob/user)
to_chat(user, "[get_examine_string(user, TRUE)].") . = list("[get_examine_string(user, TRUE)].")
if(desc) if(desc)
to_chat(user, desc) . += desc
if(reagents) if(reagents)
if(reagents.reagents_holder_flags & TRANSPARENT) if(reagents.reagents_holder_flags & TRANSPARENT)
to_chat(user, "It contains:") . += "It contains:"
if(reagents.reagent_list.len) if(length(reagents.reagent_list))
if(user.can_see_reagents()) //Show each individual reagent if(user.can_see_reagents()) //Show each individual reagent
for(var/datum/reagent/R in reagents.reagent_list) 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 else //Otherwise, just show the total volume
var/total_volume = 0 var/total_volume = 0
for(var/datum/reagent/R in reagents.reagent_list) for(var/datum/reagent/R in reagents.reagent_list)
total_volume += R.volume total_volume += R.volume
to_chat(user, "[total_volume] units of various reagents") . += "[total_volume] units of various reagents"
else else
to_chat(user, "Nothing.") . += "Nothing."
else if(reagents.reagents_holder_flags & AMOUNT_VISIBLE) else if(reagents.reagents_holder_flags & AMOUNT_VISIBLE)
if(reagents.total_volume) 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 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) /atom/proc/relaymove(mob/user)
if(buckle_message_cooldown <= world.time) if(buckle_message_cooldown <= world.time)
@@ -660,7 +660,7 @@
var/atom/L = loc var/atom/L = loc
if(!L) if(!L)
return null return null
return L.AllowDrop() ? L : get_turf(L) return L.AllowDrop() ? L : L.drop_location()
/atom/Entered(atom/movable/AM, atom/oldLoc) /atom/Entered(atom/movable/AM, atom/oldLoc)
SEND_SIGNAL(src, COMSIG_ATOM_ENTERED, AM, oldLoc) SEND_SIGNAL(src, COMSIG_ATOM_ENTERED, AM, oldLoc)
+4 -4
View File
@@ -349,7 +349,7 @@ Credit where due:
changelog_contents += "<li>[entry]</li>" changelog_contents += "<li>[entry]</li>"
info = replacetext(info, "CLOCKCULTCHANGELOG", changelog_contents) info = replacetext(info, "CLOCKCULTCHANGELOG", changelog_contents)
/obj/item/paper/servant_primer/examine(mob/user) /obj/item/paper/servant_primer/oui_getcontent(mob/target)
if(!is_servant_of_ratvar(user) && !isobserver(user)) if(!is_servant_of_ratvar(target) && !isobserver(target))
to_chat(user, "<span class='danger'>You can't understand any of the words on [src].</span>") return "<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)]<HR>[stamps]</BODY></HTML>"
..() return ..()
+4 -4
View File
@@ -409,7 +409,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
message_admins("Drafting players for forced ruleset [rule.name].") message_admins("Drafting players for forced ruleset [rule.name].")
log_game("DYNAMIC: Drafting players for forced ruleset [rule.name].") log_game("DYNAMIC: Drafting players for forced ruleset [rule.name].")
rule.mode = src 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.candidates = candidates.Copy()
rule.trim_candidates() rule.trim_candidates()
if (rule.ready(TRUE)) if (rule.ready(TRUE))
@@ -421,7 +421,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
return TRUE return TRUE
var/list/drafted_rules = list() var/list/drafted_rules = list()
for (var/datum/dynamic_ruleset/roundstart/rule in roundstart_rules) 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.candidates = candidates.Copy()
rule.trim_candidates() rule.trim_candidates()
if (rule.ready() && rule.candidates.len > 0) if (rule.ready() && rule.candidates.len > 0)
@@ -429,12 +429,12 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
if(!drafted_rules.len) if(!drafted_rules.len)
message_admins("Not enough threat level for roundstart antags!") message_admins("Not enough threat level for roundstart antags!")
log_game("DYNAMIC: 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 extra_rulesets_amount = 0
if (GLOB.dynamic_classic_secret) if (GLOB.dynamic_classic_secret)
extra_rulesets_amount = 0 extra_rulesets_amount = 0
else 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.") 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.") 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) if (threat_level > high_pop_second_rule_req)
@@ -41,6 +41,9 @@
if (!istype(M, required_type)) if (!istype(M, required_type))
trimmed_list.Remove(M) trimmed_list.Remove(M)
continue continue
if (M.GetComponent(/datum/component/virtual_reality))
trimmed_list.Remove(M)
continue
if (!M.client) // Are they connected? if (!M.client) // Are they connected?
trimmed_list.Remove(M) trimmed_list.Remove(M)
continue continue
+1 -1
View File
@@ -167,7 +167,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
/obj/effect/meteor/examine(mob/user) /obj/effect/meteor/examine(mob/user)
if(!(flags_1 & ADMIN_SPAWNED_1) && isliving(user)) if(!(flags_1 & ADMIN_SPAWNED_1) && isliving(user))
SSmedals.UnlockMedal(MEDAL_METEOR, user.client) SSmedals.UnlockMedal(MEDAL_METEOR, user.client)
..() return ..()
/obj/effect/meteor/attackby(obj/item/I, mob/user, params) /obj/effect/meteor/attackby(obj/item/I, mob/user, params)
if(I.tool_behaviour == TOOL_MINING) if(I.tool_behaviour == TOOL_MINING)
+117 -11
View File
@@ -12,6 +12,7 @@
density = FALSE density = FALSE
state_open = TRUE state_open = TRUE
circuit = /obj/item/circuitboard/machine/sleeper circuit = /obj/item/circuitboard/machine/sleeper
req_access = list(ACCESS_CMO) //Used for reagent deletion and addition of non medicines
var/efficiency = 1 var/efficiency = 1
var/min_health = -25 var/min_health = -25
var/list/available_chems var/list/available_chems
@@ -28,9 +29,28 @@
/obj/machinery/sleeper/Initialize() /obj/machinery/sleeper/Initialize()
. = ..() . = ..()
create_reagents(500, NO_REACT)
occupant_typecache = GLOB.typecache_living occupant_typecache = GLOB.typecache_living
update_icon() update_icon()
reset_chem_buttons() reset_chem_buttons()
RefreshParts()
add_inital_chems()
/obj/machinery/sleeper/Destroy()
var/obj/item/reagent_containers/sleeper_buffer/buffer = new /obj/item/reagent_containers/sleeper_buffer(loc)
buffer.volume = reagents.maximum_volume
buffer.reagents.maximum_volume = reagents.maximum_volume
reagents.trans_to(buffer.reagents, reagents.total_volume)
..()
/obj/machinery/sleeper/proc/add_inital_chems()
for(var/i in available_chems)
var/datum/reagent/R = reagents.has_reagent(i)
if(!R)
reagents.add_reagent(i, (20))
continue
if(R.volume < 20)
reagents.add_reagent(i, (20 - R.volume))
/obj/machinery/sleeper/RefreshParts() /obj/machinery/sleeper/RefreshParts()
var/E var/E
@@ -47,6 +67,11 @@
available_chems |= possible_chems[i] available_chems |= possible_chems[i]
reset_chem_buttons() reset_chem_buttons()
//Total container size 500 - 2000u
if(reagents)
reagents.maximum_volume = (500*E)
/obj/machinery/sleeper/update_icon() /obj/machinery/sleeper/update_icon()
icon_state = initial(icon_state) icon_state = initial(icon_state)
if(state_open) if(state_open)
@@ -81,7 +106,42 @@
if (. & EMP_PROTECT_SELF) if (. & EMP_PROTECT_SELF)
return return
if(is_operational() && occupant) if(is_operational() && occupant)
var/datum/reagent/R = pick(reagents.reagent_list)
inject_chem(R.id, occupant)
open_machine() open_machine()
//Is this too much?
if(severity == EMP_HEAVY)
var/chem = pick(available_chems)
available_chems -= chem
available_chems += get_random_reagent_id()
reset_chem_buttons()
/obj/machinery/sleeper/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/reagent_containers/sleeper_buffer))
var/obj/item/reagent_containers/sleeper_buffer/SB = I
if((SB.reagents.total_volume + reagents.total_volume) < reagents.maximum_volume)
SB.reagents.trans_to(reagents, SB.reagents.total_volume)
visible_message("[user] places the [SB] into the [src].")
qdel(SB)
return
else
SB.reagents.trans_to(reagents, SB.reagents.total_volume)
visible_message("[user] adds as much as they can to the [src] from the [SB].")
return
if(istype(I, /obj/item/reagent_containers))
var/obj/item/reagent_containers/RC = I
if(RC.reagents.total_volume == 0)
to_chat(user, "<span class='notice'>The [I] is empty!</span>")
for(var/datum/reagent/R in RC.reagents.reagent_list)
if((obj_flags & EMAGGED) || (allowed(usr)))
break
if(!istype(R, /datum/reagent/medicine))
visible_message("The [src] gives out a hearty boop and rejects the [I]. The Sleeper's screen flashes with a pompous \"Medicines only, please.\"")
return
RC.reagents.trans_to(reagents, 1000)
visible_message("[user] adds as much as they can to the [src] from the [I].")
return
/obj/machinery/sleeper/MouseDrop_T(mob/target, mob/user) /obj/machinery/sleeper/MouseDrop_T(mob/target, mob/user)
if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser()) if(user.stat || user.lying || !Adjacent(user) || !user.Adjacent(target) || !iscarbon(target) || !user.IsAdvancedToolUser())
@@ -130,8 +190,8 @@
open_machine() open_machine()
/obj/machinery/sleeper/examine(mob/user) /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, \ /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) datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state)
@@ -141,18 +201,24 @@
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui) if(!ui)
ui = new(user, src, ui_key, "sleeper", name, 375, 550, master_ui, state) ui = new(user, src, ui_key, "sleeper", name, 550, 700, master_ui, state)
ui.open() ui.open()
/obj/machinery/sleeper/ui_data() /obj/machinery/sleeper/ui_data()
var/list/data = list() var/list/data = list()
data["occupied"] = occupant ? 1 : 0 data["occupied"] = occupant ? 1 : 0
data["open"] = state_open data["open"] = state_open
data["efficiency"] = efficiency
data["current_vol"] = reagents.total_volume
data["tot_capacity"] = reagents.maximum_volume
data["chems"] = list() data["chems"] = list()
for(var/chem in available_chems) for(var/chem in available_chems)
var/datum/reagent/R = GLOB.chemical_reagents_list[chem] var/datum/reagent/R = reagents.has_reagent(chem)
data["chems"] += list(list("name" = R.name, "id" = R.id, "allowed" = chem_allowed(chem))) R = GLOB.chemical_reagents_list[chem]
data["synthchems"] += list(list("name" = R.name, "id" = R.id, "synth_allowed" = synth_allowed(chem)))
for(var/datum/reagent/R in reagents.reagent_list)
data["chems"] += list(list("name" = R.name, "id" = R.id, "vol" = R.volume, "purity" = R.purity, "allowed" = chem_allowed(R.id)))
data["occupant"] = list() data["occupant"] = list()
var/mob/living/mob_occupant = occupant var/mob/living/mob_occupant = occupant
@@ -184,8 +250,15 @@
if(mob_occupant.reagents && mob_occupant.reagents.reagent_list.len) if(mob_occupant.reagents && mob_occupant.reagents.reagent_list.len)
for(var/datum/reagent/R in mob_occupant.reagents.reagent_list) for(var/datum/reagent/R in mob_occupant.reagents.reagent_list)
data["occupant"]["reagents"] += list(list("name" = R.name, "volume" = R.volume)) data["occupant"]["reagents"] += list(list("name" = R.name, "volume" = R.volume))
data["occupant"]["failing_organs"] = list()
var/mob/living/carbon/C = mob_occupant
if(C)
for(var/obj/item/organ/Or in C.getFailingOrgans())
if(istype(Or, /obj/item/organ/brain))
continue
data["occupant"]["failing_organs"] += list(list("name" = Or.name))
if(mob_occupant.has_dna()) // Blood-stuff is mostly a copy-paste from the healthscanner. if(mob_occupant.has_dna()) // Blood-stuff is mostly a copy-paste from the healthscanner.
var/mob/living/carbon/C = mob_occupant
var/blood_id = C.get_blood_id() var/blood_id = C.get_blood_id()
if(blood_id) if(blood_id)
data["occupant"]["blood"] = list() // We can start populating this list. data["occupant"]["blood"] = list() // We can start populating this list.
@@ -196,7 +269,7 @@
blood_type = R.name blood_type = R.name
else else
blood_type = blood_id blood_type = blood_id
data["occupant"]["blood"]["maxBloodVolume"] = BLOOD_VOLUME_NORMAL data["occupant"]["blood"]["maxBloodVolume"] = (BLOOD_VOLUME_NORMAL*C.blood_ratio)
data["occupant"]["blood"]["currentBloodVolume"] = C.blood_volume data["occupant"]["blood"]["currentBloodVolume"] = C.blood_volume
data["occupant"]["blood"]["dangerBloodVolume"] = BLOOD_VOLUME_SAFE data["occupant"]["blood"]["dangerBloodVolume"] = BLOOD_VOLUME_SAFE
data["occupant"]["blood"]["bloodType"] = blood_type data["occupant"]["blood"]["bloodType"] = blood_type
@@ -216,24 +289,49 @@
. = TRUE . = TRUE
if("inject") if("inject")
var/chem = params["chem"] var/chem = params["chem"]
var/amount = text2num(params["volume"])
if(!is_operational() || !mob_occupant) if(!is_operational() || !mob_occupant)
return return
if(mob_occupant.health < min_health && chem != "epinephrine") if(mob_occupant.health < min_health && chem != "epinephrine")
return return
if(inject_chem(chem, usr)) if(inject_chem(chem, usr, amount))
. = TRUE . = TRUE
if(scrambled_chems && prob(5)) if(scrambled_chems && prob(5))
to_chat(usr, "<span class='warning'>Chemical system re-route detected, results may not be as expected!</span>") to_chat(usr, "<span class='warning'>Chemical system re-route detected, results may not be as expected!</span>")
if("synth")
var/chem = params["chem"]
if(!is_operational())
return
reagents.add_reagent(chem_buttons[chem], 10) //other_purity = 0.75 for when the mechanics are in
if("purge")
var/chem = params["chem"]
if(allowed(usr))
if(!is_operational())
return
reagents.remove_reagent(chem, 10)
return
if(chem in available_chems)
if(!is_operational())
return
/*var/datum/reagent/R = reagents.has_reagent(chem) //For when purity effects are in
if(R.purity < 0.8)*/
reagents.remove_reagent(chem, 10)
else
visible_message("<span class='warning'>Access Denied.</span>")
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
/obj/machinery/sleeper/emag_act(mob/user) /obj/machinery/sleeper/emag_act(mob/user)
. = ..() . = ..()
obj_flags |= EMAGGED
scramble_chem_buttons() scramble_chem_buttons()
to_chat(user, "<span class='warning'>You scramble the sleeper's user interface!</span>") to_chat(user, "<span class='warning'>You scramble the sleeper's user interface!</span>")
return TRUE return TRUE
/obj/machinery/sleeper/proc/inject_chem(chem, mob/user) //trans to
if((chem in available_chems) && chem_allowed(chem)) /obj/machinery/sleeper/proc/inject_chem(chem, mob/user, volume = 10)
occupant.reagents.add_reagent(chem_buttons[chem], 10) //emag effect kicks in here so that the "intended" chem is used for all checks, for extra FUUU if(chem_allowed(chem))
reagents.trans_id_to(occupant, chem, volume)//emag effect kicks in here so that the "intended" chem is used for all checks, for extra FUUU
if(user) if(user)
log_combat(user, occupant, "injected [chem] into", addition = "via [src]") log_combat(user, occupant, "injected [chem] into", addition = "via [src]")
return TRUE return TRUE
@@ -246,6 +344,14 @@
var/occ_health = mob_occupant.health > min_health || chem == "epinephrine" var/occ_health = mob_occupant.health > min_health || chem == "epinephrine"
return amount && occ_health return amount && occ_health
/obj/machinery/sleeper/proc/synth_allowed(chem)
var/datum/reagent/R = reagents.has_reagent(chem)
if(!R)
return TRUE
if(R.volume < 50)
return TRUE
return FALSE
/obj/machinery/sleeper/proc/reset_chem_buttons() /obj/machinery/sleeper/proc/reset_chem_buttons()
scrambled_chems = FALSE scrambled_chems = FALSE
LAZYINITLIST(chem_buttons) LAZYINITLIST(chem_buttons)
+6 -6
View File
@@ -454,20 +454,20 @@ Class Procs:
/obj/machinery/examine(mob/user) /obj/machinery/examine(mob/user)
. = ..() . = ..()
if(stat & BROKEN) 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 & INDESTRUCTIBLE))
if(resistance_flags & ON_FIRE) 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 var/healthpercent = (obj_integrity/max_integrity) * 100
switch(healthpercent) switch(healthpercent)
if(50 to 99) if(50 to 99)
to_chat(user, "It looks slightly damaged.") . += "It looks slightly damaged."
if(25 to 50) if(25 to 50)
to_chat(user, "It appears heavily damaged.") . += "It appears heavily damaged."
if(0 to 25) 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) 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 //called on machinery construction (i.e from frame to machinery) but not on initialization
/obj/machinery/proc/on_construction() /obj/machinery/proc/on_construction()
+2 -2
View File
@@ -14,8 +14,8 @@
req_access = list(ACCESS_AI_UPLOAD) req_access = list(ACCESS_AI_UPLOAD)
/obj/machinery/ai_slipper/examine(mob/user) /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() /obj/machinery/ai_slipper/power_change()
if(stat & BROKEN) if(stat & BROKEN)
+2 -2
View File
@@ -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') 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) /obj/machinery/aug_manipulator/examine(mob/user)
..() . = ..()
if(storedpart) 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() /obj/machinery/aug_manipulator/Initialize()
initial_icon_state = initial(icon_state) initial_icon_state = initial(icon_state)
+3 -3
View File
@@ -24,10 +24,10 @@
add_overlay("ccharger-o[newlevel]") add_overlay("ccharger-o[newlevel]")
/obj/machinery/cell_charger/examine(mob/user) /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) 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) /obj/machinery/cell_charger/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stock_parts/cell) && !panel_open) if(istype(W, /obj/item/stock_parts/cell) && !panel_open)
+5 -5
View File
@@ -93,20 +93,20 @@
to_chat(user, "<span class='notice'>You flip the write-protect tab to [read_only ? "protected" : "unprotected"].</span>") 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) /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 //Clonepod
/obj/machinery/clonepod/examine(mob/user) /obj/machinery/clonepod/examine(mob/user)
..() . = ..()
var/mob/living/mob_occupant = occupant var/mob/living/mob_occupant = occupant
if(mess) 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(is_operational() && mob_occupant)
if(mob_occupant.stat != DEAD) 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() /obj/machinery/clonepod/return_air()
// We want to simulate the clone not being in contact with // We want to simulate the clone not being in contact with
@@ -762,13 +762,13 @@
var/active = 0 //if the ship is on var/active = 0 //if the ship is on
/obj/item/orion_ship/examine(mob/user) /obj/item/orion_ship/examine(mob/user)
..() . = ..()
if(!(in_range(user, src))) if(!(in_range(user, src)))
return return
if(!active) 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 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 /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) if(active)
+19 -30
View File
@@ -17,13 +17,7 @@
network += lowertext(i) network += lowertext(i)
/obj/machinery/computer/security/check_eye(mob/user) /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)) if(!can_interact(user) || !(user in watchers) || !watchers[user])
user.unset_machine()
return
if(!(user in watchers))
user.unset_machine()
return
if(!watchers[user])
user.unset_machine() user.unset_machine()
return return
var/obj/machinery/camera/C = watchers[user] 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. M.unset_machine() //to properly reset the view of the users if the console is deleted.
return ..() 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(.) if (ismob(user) && !isliving(user)) // ghosts don't need cameras
return
if(stat)
return return
if (!network) if (!network)
throw EXCEPTION("No camera network") CRASH("No camera network")
user.unset_machine() user.unset_machine()
return return FALSE
if (!(islist(network))) if (!(islist(network)))
throw EXCEPTION("Camera network is not a list") CRASH("Camera network is not a list")
user.unset_machine() user.unset_machine()
return return FALSE
if(..())
user.unset_machine()
return
var/list/camera_list = get_available_cameras() var/list/camera_list = get_available_cameras()
if(!(user in watchers)) if(!(user in watchers))
for(var/Num in camera_list) for(var/Num in camera_list)
var/obj/machinery/camera/CAM = camera_list[Num] var/obj/machinery/camera/CAM = camera_list[Num]
if(istype(CAM)) if(istype(CAM) && CAM.can_use())
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.
watchers[user] = CAM //let's give the user the first usable camera, and then let him change to the camera he wants. break
break
if(!(user in watchers)) if(!(user in watchers))
user.unset_machine() // no usable camera on the network, we disconnect the user from the computer. 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) playsound(src, 'sound/machines/terminal_prompt.ogg', 25, 0)
use_camera_console(user) use_camera_console(user)
/obj/machinery/computer/security/proc/use_camera_console(mob/user) /obj/machinery/computer/security/proc/use_camera_console(mob/user)
var/list/camera_list = get_available_cameras() var/list/camera_list = get_available_cameras()
var/t = input(user, "Which camera should you change to?") as null|anything in camera_list 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 return
if(!t) if(!t || t == "Cancel")
user.unset_machine() user.unset_machine()
playsound(src, 'sound/machines/terminal_off.ogg', 25, 0) playsound(src, 'sound/machines/terminal_off.ogg', 25, 0)
return return
var/obj/machinery/camera/C = camera_list[t] var/obj/machinery/camera/C = camera_list[t]
if(t == "Cancel") if(!C || !C.can_use() || !can_interact(user))
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))
user.unset_machine() user.unset_machine()
return FALSE return FALSE
+1 -1
View File
@@ -63,7 +63,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
/obj/machinery/computer/card/examine(mob/user) /obj/machinery/computer/card/examine(mob/user)
. = ..() . = ..()
if(inserted_scan_id || inserted_modify_id) if(inserted_scan_id || inserted_modify_id)
to_chat(user, "<span class='notice'>Alt-click to eject the ID card.</span>") . += "<span class='notice'>Alt-click to eject the ID card.</span>"
/obj/machinery/computer/card/attackby(obj/I, mob/user, params) /obj/machinery/computer/card/attackby(obj/I, mob/user, params)
if(isidcard(I)) if(isidcard(I))
+5 -5
View File
@@ -8,9 +8,9 @@
var/state = 1 var/state = 1
/obj/structure/frame/examine(user) /obj/structure/frame/examine(user)
..() . = ..()
if(circuit) if(circuit)
to_chat(user, "It has \a [circuit] installed.") . += "It has \a [circuit] installed."
/obj/structure/frame/deconstruct(disassembled = TRUE) /obj/structure/frame/deconstruct(disassembled = TRUE)
@@ -29,7 +29,7 @@
var/list/req_component_names = null // user-friendly names of components var/list/req_component_names = null // user-friendly names of components
/obj/structure/frame/machine/examine(user) /obj/structure/frame/machine/examine(user)
..() . = ..()
if(state == 3 && req_components && req_component_names) if(state == 3 && req_components && req_component_names)
var/hasContent = 0 var/hasContent = 0
var/requires = "It requires" var/requires = "It requires"
@@ -44,9 +44,9 @@
hasContent = 1 hasContent = 1
if(hasContent) if(hasContent)
to_chat(user, requires + ".") . += requires + "."
else 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() /obj/structure/frame/machine/proc/update_namelist()
if(!req_components) if(!req_components)
+4 -4
View File
@@ -24,13 +24,13 @@
. = ..() . = ..()
/obj/machinery/defibrillator_mount/examine(mob/user) /obj/machinery/defibrillator_mount/examine(mob/user)
..() . = ..()
if(defib) 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) 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 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() /obj/machinery/defibrillator_mount/process()
if(defib && defib.cell && defib.cell.charge < defib.cell.maxcharge && is_operational()) if(defib && defib.cell && defib.cell.charge < defib.cell.maxcharge && is_operational())
+2 -2
View File
@@ -149,8 +149,8 @@
var/mode = SINGLE var/mode = SINGLE
/obj/item/grenade/barrier/examine(mob/user) /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) /obj/item/grenade/barrier/AltClick(mob/living/carbon/user)
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE)) if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
+2 -2
View File
@@ -27,9 +27,9 @@
RefreshParts() RefreshParts()
/obj/machinery/dish_drive/examine(mob/user) /obj/machinery/dish_drive/examine(mob/user)
..() . = ..()
if(user.Adjacent(src)) 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) /obj/machinery/dish_drive/attack_hand(mob/living/user)
if(!contents.len) if(!contents.len)
+20 -20
View File
@@ -640,47 +640,47 @@
update_icon(AIRLOCK_CLOSED) update_icon(AIRLOCK_CLOSED)
/obj/machinery/door/airlock/examine(mob/user) /obj/machinery/door/airlock/examine(mob/user)
..() . = ..()
if(obj_flags & EMAGGED) 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)) 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) 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(note)
if(!in_range(user, src)) 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 else
to_chat(user, "There's a [note.name] pinned to the front...") . += "There's a [note.name] pinned to the front..."
note.examine(user) . += note.examine(user)
if(panel_open) if(panel_open)
switch(security_level) switch(security_level)
if(AIRLOCK_SECURITY_NONE) if(AIRLOCK_SECURITY_NONE)
to_chat(user, "Its wires are exposed!") . += "Its wires are exposed!"
if(AIRLOCK_SECURITY_METAL) 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) 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) 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) 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) 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) 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) else if(security_level)
if(security_level == AIRLOCK_SECURITY_METAL) if(security_level == AIRLOCK_SECURITY_METAL)
to_chat(user, "It looks a bit stronger.") . += "It looks a bit stronger."
else else
to_chat(user, "It looks very robust.") . += "It looks very robust."
if(issilicon(user) && (!stat & BROKEN)) if(issilicon(user) && (!stat & BROKEN))
to_chat(user, "<span class='notice'>Shift-click [src] to [ density ? "open" : "close"] it.</span>") . += "<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>") . += "<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>") . += "<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'>Ctrl-Shift-click [src] to [ emergency ? "disable" : "enable"] emergency access.</span>"
/obj/machinery/door/airlock/attack_ai(mob/user) /obj/machinery/door/airlock/attack_ai(mob/user)
if(!src.canAIControl(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 var/unres_sides = 0 //unrestricted sides, or sides of the airlock that will open regardless of access
/obj/item/electronics/airlock/examine(mob/user) /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, \ /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) datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
+3 -5
View File
@@ -593,14 +593,12 @@
return ..() return ..()
/obj/machinery/door/airlock/clockwork/examine(mob/user) /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) switch(construction_state)
if(GEAR_SECURE) 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) 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>" . += "<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)
/obj/machinery/door/airlock/clockwork/emp_act(severity) /obj/machinery/door/airlock/clockwork/emp_act(severity)
if(prob(80/severity)) if(prob(80/severity))
+4 -4
View File
@@ -37,14 +37,14 @@
var/unres_sides = 0 //Unrestricted sides. A bitflag for which direction (if any) can open the door with no access 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) /obj/machinery/door/examine(mob/user)
..() . = ..()
if(red_alert_access) if(red_alert_access)
if(GLOB.security_level >= SEC_LEVEL_RED) 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 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) 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) /obj/machinery/door/check_access_list(list/access_list)
if(red_alert_access && GLOB.security_level >= SEC_LEVEL_RED) if(red_alert_access && GLOB.security_level >= SEC_LEVEL_RED)
+10 -10
View File
@@ -34,13 +34,13 @@
/obj/machinery/door/firedoor/examine(mob/user) /obj/machinery/door/firedoor/examine(mob/user)
..() ..()
if(!density) 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) 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) 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 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() /obj/machinery/door/firedoor/proc/CalculateAffectingAreas()
remove_from_areas() remove_from_areas()
@@ -270,18 +270,18 @@
var/reinforced = 0 var/reinforced = 0
/obj/structure/firelock_frame/examine(mob/user) /obj/structure/firelock_frame/examine(mob/user)
..() . = ..()
switch(constructionStep) switch(constructionStep)
if(CONSTRUCTION_PANEL_OPEN) 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) 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) 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) 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) 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() /obj/structure/firelock_frame/update_icon()
..() ..()
+5 -5
View File
@@ -22,8 +22,8 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
return ..() return ..()
/obj/machinery/doppler_array/examine(mob/user) /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() /obj/machinery/doppler_array/process()
return PROCESS_KILL return PROCESS_KILL
@@ -114,13 +114,13 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
return return
var/point_gain = 0 var/point_gain = 0
/*****The Point Calculator*****/ /*****The Point Calculator*****/
if(orig_light < 10) if(orig_light < 10)
say("Explosion not large enough for research calculations.") say("Explosion not large enough for research calculations.")
return return
else if(orig_light < 4500) else if(orig_light < 4500)
point_gain = (83300 * orig_light) / (orig_light + 3000) point_gain = (83300 * orig_light) / (orig_light + 3000)
else else
point_gain = TECHWEB_BOMB_POINTCAP point_gain = TECHWEB_BOMB_POINTCAP
+2 -2
View File
@@ -129,9 +129,9 @@
break_message = "slowly falls dark, lights stuttering." break_message = "slowly falls dark, lights stuttering."
/obj/machinery/droneDispenser/examine(mob/user) /obj/machinery/droneDispenser/examine(mob/user)
..() . = ..()
if((mode == DRONE_RECHARGING) && !stat && recharging_text) 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() /obj/machinery/droneDispenser/power_change()
..() ..()
+2 -2
View File
@@ -196,8 +196,8 @@
var/id = null var/id = null
/obj/item/wallframe/flasher/examine(mob/user) /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) /obj/item/wallframe/flasher/after_attach(var/obj/O)
..() ..()
+3 -3
View File
@@ -183,10 +183,10 @@
container_resist(user) container_resist(user)
/obj/machinery/harvester/examine(mob/user) /obj/machinery/harvester/examine(mob/user)
..() . = ..()
if(stat & BROKEN) if(stat & BROKEN)
return return
if(state_open) 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) 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>"
-1
View File
@@ -221,7 +221,6 @@
. += "\t<span class='notice'>No chemicals are attached.</span>\n" . += "\t<span class='notice'>No chemicals are attached.</span>\n"
. += "\t<span class='notice'>[attached ? attached : "No one"] is attached.</span>" . += "\t<span class='notice'>[attached ? attached : "No one"] is attached.</span>"
to_chat(user,.)
#undef IV_TAKING #undef IV_TAKING
#undef IV_INJECTING #undef IV_INJECTING
+2 -2
View File
@@ -33,8 +33,8 @@
icon_state = "light0" icon_state = "light0"
/obj/machinery/light_switch/examine(mob/user) /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) /obj/machinery/light_switch/interact(mob/user)
. = ..() . = ..()
@@ -838,10 +838,10 @@
T.cp = src T.cp = src
/obj/machinery/turretid/examine(mob/user) /obj/machinery/turretid/examine(mob/user)
..() . = ..()
if(issilicon(user) && (!stat & BROKEN)) if(issilicon(user) && (!stat & BROKEN))
to_chat(user, "<span class='notice'>Ctrl-click [src] to [ enabled ? "disable" : "enable"] turrets.</span>") . += "<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'>Alt-click [src] to set turrets to [ lethal ? "stun" : "kill"].</span>"
/obj/machinery/turretid/attackby(obj/item/I, mob/user, params) /obj/machinery/turretid/attackby(obj/item/I, mob/user, params)
if(stat & BROKEN) if(stat & BROKEN)
+4 -4
View File
@@ -30,12 +30,12 @@
return ..() return ..()
/obj/machinery/quantumpad/examine(mob/user) /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) 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 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() /obj/machinery/quantumpad/RefreshParts()
var/E = 0 var/E = 0
+4 -4
View File
@@ -40,10 +40,10 @@
butchering.bonus_modifier = amount_produced/5 butchering.bonus_modifier = amount_produced/5
/obj/machinery/recycler/examine(mob/user) /obj/machinery/recycler/examine(mob/user)
..() . = ..()
to_chat(user, "The power light is [(stat & NOPOWER) ? "off" : "on"].") . += "The power light is [(stat & NOPOWER) ? "off" : "on"]."
to_chat(user, "The safety-mode light is [safety_mode ? "on" : "off"].") . += "The safety-mode light is [safety_mode ? "on" : "off"]."
to_chat(user, "The safety-sensors status light is [obj_flags & EMAGGED ? "off" : "on"].") . += "The safety-sensors status light is [obj_flags & EMAGGED ? "off" : "on"]."
/obj/machinery/recycler/power_change() /obj/machinery/recycler/power_change()
..() ..()
+4 -4
View File
@@ -46,12 +46,12 @@
return ..() return ..()
/obj/machinery/space_heater/examine(mob/user) /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) 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 else
to_chat(user, "There is no power cell installed.") . += "There is no power cell installed."
/obj/machinery/space_heater/update_icon() /obj/machinery/space_heater/update_icon()
if(on) if(on)
+11 -12
View File
@@ -114,12 +114,11 @@
/obj/machinery/status_display/examine(mob/user) /obj/machinery/status_display/examine(mob/user)
. = ..() . = ..()
if (message1 || message2) if (message1 || message2)
var/list/msg = list("The display says:") . += "The display says:"
if (message1) if (message1)
msg += "<br>\t<tt>[html_encode(message1)]</tt>" . += "\t<tt>[html_encode(message1)]</tt>"
if (message2) if (message2)
msg += "<br>\t<tt>[html_encode(message2)]</tt>" . += "\t<tt>[html_encode(message2)]</tt>"
to_chat(user, msg.Join())
// Helper procs for child display types. // Helper procs for child display types.
/obj/machinery/status_display/proc/display_shuttle_status(obj/docking_port/mobile/shuttle) /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>" modestr = "<br>\t<tt>[modestr]: [shuttle.getTimerStr()]</tt>"
else else
modestr = "<br>\t<tt>[modestr]</tt>" 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 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. /// Evac display which shows shuttle timer or message set by Command.
@@ -195,9 +194,9 @@
/obj/machinery/status_display/evac/examine(mob/user) /obj/machinery/status_display/evac/examine(mob/user)
. = ..() . = ..()
if(mode == SD_EMERGENCY) if(mode == SD_EMERGENCY)
examine_shuttle(user, SSshuttle.emergency) . += examine_shuttle(user, SSshuttle.emergency)
else if(!message1 && !message2) 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) /obj/machinery/status_display/evac/receive_signal(datum/signal/signal)
switch(signal.data["command"]) switch(signal.data["command"])
@@ -257,9 +256,9 @@
else else
shuttleMsg = "[shuttle.getModeStr()]: [shuttle.getTimerStr()]" shuttleMsg = "[shuttle.getModeStr()]: [shuttle.getTimerStr()]"
if (shuttleMsg) if (shuttleMsg)
to_chat(user, "The display says:<br>\t<tt>[shuttleMsg]</tt>") . += "The display says:<br>\t<tt>[shuttleMsg]</tt>"
else else
to_chat(user, "The display is blank.") . += "The display is blank."
/// General-purpose shuttle status display. /// General-purpose shuttle status display.
@@ -278,9 +277,9 @@
/obj/machinery/status_display/shuttle/examine(mob/user) /obj/machinery/status_display/shuttle/examine(mob/user)
. = ..() . = ..()
if(shuttle_id) if(shuttle_id)
examine_shuttle(user, SSshuttle.getShuttle(shuttle_id)) . += examine_shuttle(user, SSshuttle.getShuttle(shuttle_id))
else else
to_chat(user, "The display is blank.") . += "The display is blank."
/obj/machinery/status_display/shuttle/vv_edit_var(var_name, var_value) /obj/machinery/status_display/shuttle/vv_edit_var(var_name, var_value)
. = ..() . = ..()
+2 -2
View File
@@ -99,8 +99,8 @@
return ..() return ..()
/obj/machinery/syndicatebomb/examine(mob/user) /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() /obj/machinery/syndicatebomb/update_icon()
icon_state = "[initial(icon_state)][active ? "-active" : "-inactive"][open_panel ? "-wires" : ""]" icon_state = "[initial(icon_state)][active ? "-active" : "-inactive"][open_panel ? "-wires" : ""]"
+1 -1
View File
@@ -28,7 +28,7 @@
/obj/machinery/transformer/examine(mob/user) /obj/machinery/transformer/examine(mob/user)
. = ..() . = ..()
if(cooldown && (issilicon(user) || isobserver(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() /obj/machinery/transformer/Destroy()
QDEL_NULL(countdown) QDEL_NULL(countdown)
+2 -2
View File
@@ -12,8 +12,8 @@
var/max_wash_capacity = 5 var/max_wash_capacity = 5
/obj/machinery/washing_machine/examine(mob/user) /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) /obj/machinery/washing_machine/AltClick(mob/user)
if(!user.canUseTopic(src)) if(!user.canUseTopic(src))
+8 -8
View File
@@ -270,23 +270,23 @@
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/obj/mecha/examine(mob/user) /obj/mecha/examine(mob/user)
..() . = ..()
var/integrity = obj_integrity*100/max_integrity var/integrity = obj_integrity*100/max_integrity
switch(integrity) switch(integrity)
if(85 to 100) if(85 to 100)
to_chat(user, "It's fully intact.") . += "It's fully intact."
if(65 to 85) if(65 to 85)
to_chat(user, "It's slightly damaged.") . += "It's slightly damaged."
if(45 to 65) if(45 to 65)
to_chat(user, "It's badly damaged.") . += "It's badly damaged."
if(25 to 45) if(25 to 45)
to_chat(user, "It's heavily damaged.") . += "It's heavily damaged."
else else
to_chat(user, "It's falling apart.") . += "It's falling apart."
if(equipment && equipment.len) 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) 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. //processing internal damage, temperature, air regulation, alert updates, lights power use.
/obj/mecha/process() /obj/mecha/process()
+2 -2
View File
@@ -30,9 +30,9 @@
AI.remote_control = null AI.remote_control = null
/obj/structure/mecha_wreckage/examine(mob/user) /obj/structure/mecha_wreckage/examine(mob/user)
..() . = ..()
if(AI) 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) /obj/structure/mecha_wreckage/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weldingtool)) if(istype(I, /obj/item/weldingtool))
+1 -1
View File
@@ -20,7 +20,7 @@
/obj/effect/countdown/examine(mob/user) /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) /obj/effect/countdown/proc/attach(atom/A)
attached_to = A attached_to = A
@@ -130,12 +130,10 @@
/obj/effect/decal/cleanable/blood/footprints/examine(mob/user) /obj/effect/decal/cleanable/blood/footprints/examine(mob/user)
. = ..() . = ..()
if(shoe_types.len) if(shoe_types.len)
. += "You recognise the footprints as belonging to:\n" . += "You recognise the footprints as belonging to:"
for(var/shoe in shoe_types) for(var/shoe in shoe_types)
var/obj/item/clothing/shoes/S = shoe var/obj/item/clothing/shoes/S = shoe
. += "some <B>[initial(S.name)]</B> [icon2html(initial(S.icon), user)]\n" . += "some <B>[initial(S.name)]</B> [icon2html(initial(S.icon), user)]"
to_chat(user, .)
/obj/effect/decal/cleanable/blood/footprints/replace_decal(obj/effect/decal/cleanable/C) /obj/effect/decal/cleanable/blood/footprints/replace_decal(obj/effect/decal/cleanable/C)
if(blood_state != C.blood_state) //We only replace footprints of the same type as us if(blood_state != C.blood_state) //We only replace footprints of the same type as us
+1 -1
View File
@@ -36,7 +36,7 @@
/obj/structure/glowshroom/examine(mob/user) /obj/structure/glowshroom/examine(mob/user)
. = ..() . = ..()
to_chat(user, "This is a [generation]\th generation [name]!") . += "This is a [generation]\th generation [name]!"
/obj/structure/glowshroom/Destroy() /obj/structure/glowshroom/Destroy()
if(myseed) if(myseed)
@@ -315,6 +315,11 @@
randomdir = 0 randomdir = 0
duration = 6 duration = 6
/obj/effect/temp_visual/desynchronizer
name = "desynchronizer field"
icon_state = "chronofield"
duration = 3
/obj/effect/temp_visual/impact_effect /obj/effect/temp_visual/impact_effect
icon_state = "impact_bullet" icon_state = "impact_bullet"
duration = 5 duration = 5
+18 -8
View File
@@ -183,14 +183,24 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
src.loc = T src.loc = T
/obj/item/examine(mob/user) //This might be spammy. Remove? /obj/item/examine(mob/user) //This might be spammy. Remove?
..() . = ..()
var/pronoun
if(src.gender == PLURAL) . += "[gender == PLURAL ? "They are" : "It is"] a [weightclass2text(w_class)] item."
pronoun = "They are"
if(resistance_flags & INDESTRUCTIBLE)
. += "[src] seems extremely robust! It'll probably withstand anything that could happen to it!"
else else
pronoun = "It is" if(resistance_flags & LAVA_PROOF)
var/size = weightclass2text(src.w_class) . += "[src] is made of an extremely heat-resistant material, it'd probably be able to withstand lava!"
to_chat(user, "[pronoun] a [size] item." ) if(resistance_flags & (ACID_PROOF | UNACIDABLE))
. += "[src] looks pretty robust! It'd probably be able to withstand acid!"
if(resistance_flags & FREEZE_PROOF)
. += "[src] is made of cold-resistant materials."
if(resistance_flags & FIRE_PROOF)
. += "[src] is made of fire-retardant materials."
if(!user.research_scanner) if(!user.research_scanner)
return return
@@ -227,7 +237,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
else else
research_msg += "None" research_msg += "None"
research_msg += "." research_msg += "."
to_chat(user, research_msg.Join()) . += research_msg.Join()
/obj/item/interact(mob/user) /obj/item/interact(mob/user)
add_fingerprint(user) add_fingerprint(user)
+1 -1
View File
@@ -25,7 +25,7 @@ AI MODULES
materials = list(MAT_GOLD=50) materials = list(MAT_GOLD=50)
/obj/item/aiModule/examine(var/mob/user as mob) /obj/item/aiModule/examine(var/mob/user as mob)
..() . = ..()
if(Adjacent(user)) if(Adjacent(user))
show_laws(user) show_laws(user)
+2 -2
View File
@@ -46,8 +46,8 @@ RLD
spark_system.attach(src) spark_system.attach(src)
/obj/item/construction/examine(mob/user) /obj/item/construction/examine(mob/user)
..() . = ..()
to_chat(user, "\A [src]. It currently holds [matter]/[max_matter] matter-units." ) . += "\A [src]. It currently holds [matter]/[max_matter] matter-units."
/obj/item/construction/Destroy() /obj/item/construction/Destroy()
QDEL_NULL(spark_system) QDEL_NULL(spark_system)
+2 -2
View File
@@ -79,9 +79,9 @@
..() ..()
/obj/item/twohanded/rcl/examine(mob/user) /obj/item/twohanded/rcl/examine(mob/user)
..() . = ..()
if(loaded) if(loaded)
to_chat(user, "<span class='info'>It contains [loaded.amount]/[max_amount] cables.</span>") . += "<span class='info'>It contains [loaded.amount]/[max_amount] cables.</span>"
/obj/item/twohanded/rcl/Destroy() /obj/item/twohanded/rcl/Destroy()
QDEL_NULL(loaded) QDEL_NULL(loaded)
+4 -4
View File
@@ -20,8 +20,8 @@ RSF
w_class = WEIGHT_CLASS_NORMAL w_class = WEIGHT_CLASS_NORMAL
/obj/item/rsf/examine(mob/user) /obj/item/rsf/examine(mob/user)
..() . = ..()
to_chat(user, "<span class='notice'>It currently holds [matter]/30 fabrication-units.</span>") . += "<span class='notice'>It currently holds [matter]/30 fabrication-units.</span>"
/obj/item/rsf/cyborg /obj/item/rsf/cyborg
matter = 30 matter = 30
@@ -127,8 +127,8 @@ RSF
w_class = WEIGHT_CLASS_NORMAL w_class = WEIGHT_CLASS_NORMAL
/obj/item/cookiesynth/examine(mob/user) /obj/item/cookiesynth/examine(mob/user)
..() . = ..()
to_chat(user, "<span class='notice'>It currently holds [matter]/10 cookie-units.</span>") . += "<span class='notice'>It currently holds [matter]/10 cookie-units.</span>"
/obj/item/cookiesynth/attackby() /obj/item/cookiesynth/attackby()
return return
+3 -3
View File
@@ -91,9 +91,9 @@
/obj/item/airlock_painter/examine(mob/user) /obj/item/airlock_painter/examine(mob/user)
..() . = ..()
if(!ink) if(!ink)
to_chat(user, "<span class='notice'>It doesn't have a toner cartridge installed.</span>") . += "<span class='notice'>It doesn't have a toner cartridge installed.</span>"
return return
var/ink_level = "high" var/ink_level = "high"
if(ink.charges < 1) if(ink.charges < 1)
@@ -102,7 +102,7 @@
ink_level = "low" ink_level = "low"
else if((ink.charges/ink.max_charges) > 1) //Over 100% (admin var edit) else if((ink.charges/ink.max_charges) > 1) //Over 100% (admin var edit)
ink_level = "dangerously high" ink_level = "dangerously high"
to_chat(user, "<span class='notice'>Its ink levels look [ink_level].</span>") . += "<span class='notice'>Its ink levels look [ink_level].</span>"
/obj/item/airlock_painter/attackby(obj/item/W, mob/user, params) /obj/item/airlock_painter/attackby(obj/item/W, mob/user, params)
+2 -2
View File
@@ -46,10 +46,10 @@
/obj/item/bodybag/bluespace/examine(mob/user) /obj/item/bodybag/bluespace/examine(mob/user)
..() . = ..()
if(contents.len) if(contents.len)
var/s = contents.len == 1 ? "" : "s" var/s = contents.len == 1 ? "" : "s"
to_chat(user, "<span class='notice'>You can make out the shape[s] of [contents.len] object[s] through the fabric.</span>") . += "<span class='notice'>You can make out the shape[s] of [contents.len] object[s] through the fabric.</span>"
/obj/item/bodybag/bluespace/Destroy() /obj/item/bodybag/bluespace/Destroy()
for(var/atom/movable/A in contents) for(var/atom/movable/A in contents)
+11 -11
View File
@@ -113,7 +113,7 @@
/obj/item/card/emag/examine(mob/user) /obj/item/card/emag/examine(mob/user)
. = ..() . = ..()
to_chat(user, "<span class='notice'>It has <b>[uses ? uses : "no"]</b> charges left.</span>") . += "<span class='notice'>It has <b>[uses ? uses : "no"]</b> charges left.</span>"
/obj/item/card/emag/attackby(obj/item/W, mob/user, params) /obj/item/card/emag/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/emagrecharge)) if(istype(W, /obj/item/emagrecharge))
@@ -139,9 +139,9 @@
/obj/item/emagrecharge/examine(mob/user) /obj/item/emagrecharge/examine(mob/user)
. = ..() . = ..()
if(uses) if(uses)
to_chat(user, "<span class='notice'>It can add up to [uses] charges to compatible devices</span>") . += "<span class='notice'>It can add up to [uses] charges to compatible devices</span>"
else else
to_chat(user, "<span class='warning'>It has a small, red, blinking light coming from inside of it. It's spent.</span>") . += "<span class='warning'>It has a small, red, blinking light coming from inside of it. It's spent.</span>"
/obj/item/card/emagfake /obj/item/card/emagfake
desc = "It's a card with a magnetic strip attached to some circuitry. Closer inspection shows that this card is a poorly made replica, with a \"DonkCo\" logo stamped on the back." desc = "It's a card with a magnetic strip attached to some circuitry. Closer inspection shows that this card is a poorly made replica, with a \"DonkCo\" logo stamped on the back."
@@ -193,9 +193,9 @@
return return
/obj/item/card/id/examine(mob/user) /obj/item/card/id/examine(mob/user)
..() . = ..()
if(mining_points) if(mining_points)
to_chat(user, "There's [mining_points] mining equipment redemption point\s loaded onto this card.") . += "There's [mining_points] mining equipment redemption point\s loaded onto this card."
/obj/item/card/id/GetAccess() /obj/item/card/id/GetAccess()
return access return access
@@ -405,13 +405,13 @@ update_label("John Doe", "Clowny")
/obj/item/card/id/prisoner/examine(mob/user) /obj/item/card/id/prisoner/examine(mob/user)
. = ..() . = ..()
if(sentence && world.time < sentence) if(sentence && world.time < sentence)
to_chat(user, "<span class='notice'>You're currently serving a sentence for [crime]. <b>[DisplayTimeText(sentence - world.time)]</b> left.</span>") . += "<span class='notice'>You're currently serving a sentence for [crime]. <b>[DisplayTimeText(sentence - world.time)]</b> left.</span>"
else if(goal) else if(goal)
to_chat(user, "<span class='notice'>You have accumulated [points] out of the [goal] points you need for freedom.</span>") . += "<span class='notice'>You have accumulated [points] out of the [goal] points you need for freedom.</span>"
else if(!sentence) else if(!sentence)
to_chat(user, "<span class='warning'>You are currently serving a permanent sentence for [crime].</span>") . += "<span class='warning'>You are currently serving a permanent sentence for [crime].</span>"
else else
to_chat(user, "<span class='notice'>Your sentence is up! You're free!</span>") . += "<span class='notice'>Your sentence is up! You're free!</span>"
/obj/item/card/id/prisoner/one /obj/item/card/id/prisoner/one
name = "Prisoner #13-001" name = "Prisoner #13-001"
@@ -533,8 +533,8 @@ update_label("John Doe", "Clowny")
update_icon() update_icon()
/obj/item/card/id/knight/examine(mob/user) /obj/item/card/id/knight/examine(mob/user)
..() . = ..()
to_chat(user, "<span class='notice'>Alt-click to recolor it.</span>") . += "<span class='notice'>Alt-click to recolor it.</span>"
/obj/item/card/id/knight/blue /obj/item/card/id/knight/blue
id_color = "#0000FF" id_color = "#0000FF"
@@ -56,7 +56,7 @@ micro-manipulator, console screen, beaker, Microlaser, matter bin, power cells.
M.RefreshParts() M.RefreshParts()
/obj/item/circuitboard/machine/examine(mob/user) /obj/item/circuitboard/machine/examine(mob/user)
..() . = ..()
if(LAZYLEN(req_components)) if(LAZYLEN(req_components))
var/list/nice_list = list() var/list/nice_list = list()
for(var/B in req_components) for(var/B in req_components)
@@ -64,4 +64,4 @@ micro-manipulator, console screen, beaker, Microlaser, matter bin, power cells.
if(!ispath(A)) if(!ispath(A))
continue continue
nice_list += list("[req_components[A]] [initial(A.name)]") nice_list += list("[req_components[A]] [initial(A.name)]")
to_chat(user,"<span class='notice'>Required components: [english_list(nice_list)].</span>") . += "<span class='notice'>Required components: [english_list(nice_list)].</span>"
@@ -69,8 +69,8 @@
return ..() return ..()
/obj/item/circuitboard/computer/card/minor/examine(user) /obj/item/circuitboard/computer/card/minor/examine(user)
..() . = ..()
to_chat(user, "Currently set to \"[dept_list[target_dept]]\".") . += "Currently set to \"[dept_list[target_dept]]\"."
//obj/item/circuitboard/computer/shield //obj/item/circuitboard/computer/shield
// name = "Shield Control (Computer Board)" // name = "Shield Control (Computer Board)"
@@ -429,8 +429,8 @@
return ..() return ..()
/obj/item/circuitboard/machine/smartfridge/examine(mob/user) /obj/item/circuitboard/machine/smartfridge/examine(mob/user)
..() . = ..()
to_chat(user, "<span class='info'>[src] is set to [fridges_name_paths[build_path]]. You can use a screwdriver to reconfigure it.</span>") . += "<span class='info'>[src] is set to [fridges_name_paths[build_path]]. You can use a screwdriver to reconfigure it.</span>"
/obj/item/circuitboard/machine/biogenerator /obj/item/circuitboard/machine/biogenerator
name = "Biogenerator (Machine Board)" name = "Biogenerator (Machine Board)"
@@ -775,7 +775,7 @@
/obj/item/circuitboard/machine/public_nanite_chamber/examine(mob/user) /obj/item/circuitboard/machine/public_nanite_chamber/examine(mob/user)
. = ..() . = ..()
to_chat(user, "Cloud ID is currently set to [cloud_id].") . += "Cloud ID is currently set to [cloud_id]."
/obj/item/circuitboard/machine/nanite_program_hub /obj/item/circuitboard/machine/nanite_program_hub
name = "Nanite Program Hub (Machine Board)" name = "Nanite Program Hub (Machine Board)"
@@ -936,9 +936,9 @@
needs_anchored = FALSE needs_anchored = FALSE
/obj/item/circuitboard/machine/dish_drive/examine(mob/user) /obj/item/circuitboard/machine/dish_drive/examine(mob/user)
..() . = ..()
to_chat(user, "<span class='notice'>Its suction function is [suction ? "enabled" : "disabled"]. Use it in-hand to switch.</span>") . += "<span class='notice'>Its suction function is [suction ? "enabled" : "disabled"]. Use it in-hand to switch.</span>"
to_chat(user, "<span class='notice'>Its disposal auto-transmit function is [transmit ? "enabled" : "disabled"]. Alt-click it to switch.</span>") . += "<span class='notice'>Its disposal auto-transmit function is [transmit ? "enabled" : "disabled"]. Alt-click it to switch.</span>"
/obj/item/circuitboard/machine/dish_drive/attack_self(mob/living/user) /obj/item/circuitboard/machine/dish_drive/attack_self(mob/living/user)
suction = !suction suction = !suction
@@ -991,4 +991,4 @@
/obj/item/stack/sheet/glass = 2, /obj/item/stack/sheet/glass = 2,
/obj/item/stock_parts/capacitor = 1, /obj/item/stock_parts/capacitor = 1,
/obj/item/stack/cable_coil = 5, /obj/item/stack/cable_coil = 5,
/obj/item/reagent_containers/glass/beaker = 6) //So it can hold lots of chems /obj/item/reagent_containers/glass/beaker = 6) //So it can hold lots of chems
+5 -5
View File
@@ -112,11 +112,11 @@
throw_range = 7 throw_range = 7
attack_verb = list("HONKED") attack_verb = list("HONKED")
var/moodlet = "honk" //used to define which kind of moodlet is added to the honked target var/moodlet = "honk" //used to define which kind of moodlet is added to the honked target
var/honksound = 'sound/items/bikehorn.ogg' var/list/honksounds = list('sound/items/bikehorn.ogg' = 1)
/obj/item/bikehorn/Initialize() /obj/item/bikehorn/ComponentInitialize()
. = ..() . = ..()
AddComponent(/datum/component/squeak, list(honksound=1), 50) AddComponent(/datum/component/squeak, honksounds, 50)
/obj/item/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user) /obj/item/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user)
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, moodlet, /datum/mood_event/honk) SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, moodlet, /datum/mood_event/honk)
@@ -124,7 +124,7 @@
/obj/item/bikehorn/suicide_act(mob/user) /obj/item/bikehorn/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] solemnly points the horn at [user.p_their()] temple! It looks like [user.p_theyre()] trying to commit suicide!</span>") user.visible_message("<span class='suicide'>[user] solemnly points the horn at [user.p_their()] temple! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(src, 'sound/items/bikehorn.ogg', 50, 1) playsound(src, pickweight(honksounds), 50, 1)
return (BRUTELOSS) return (BRUTELOSS)
//air horn //air horn
@@ -132,7 +132,7 @@
name = "air horn" name = "air horn"
desc = "Damn son, where'd you find this?" desc = "Damn son, where'd you find this?"
icon_state = "air_horn" icon_state = "air_horn"
honksound = 'sound/items/airhorn2.ogg' honksounds = list('sound/items/airhorn2.ogg' = 1)
//golden bikehorn //golden bikehorn
/obj/item/bikehorn/golden /obj/item/bikehorn/golden
+4 -4
View File
@@ -665,10 +665,10 @@
/obj/item/toy/crayon/spraycan/examine(mob/user) /obj/item/toy/crayon/spraycan/examine(mob/user)
. = ..() . = ..()
if(charges_left) if(charges_left)
to_chat(user, "It has [charges_left] use\s left.") . += "It has [charges_left] use\s left."
else else
to_chat(user, "It is empty.") . += "It is empty."
to_chat(user, "<span class='notice'>Alt-click [src] to [ is_capped ? "take the cap off" : "put the cap on"].</span>") . += "<span class='notice'>Alt-click [src] to [ is_capped ? "take the cap off" : "put the cap on"].</span>"
/obj/item/toy/crayon/spraycan/afterattack(atom/target, mob/user, proximity, params) /obj/item/toy/crayon/spraycan/afterattack(atom/target, mob/user, proximity, params)
if(!proximity) if(!proximity)
@@ -829,7 +829,7 @@
/obj/item/toy/crayon/spraycan/gang/examine(mob/user) /obj/item/toy/crayon/spraycan/gang/examine(mob/user)
. = ..() . = ..()
if(user.mind && user.mind.has_antag_datum(/datum/antagonist/gang) || isobserver(user)) if(user.mind && user.mind.has_antag_datum(/datum/antagonist/gang) || isobserver(user))
to_chat(user, "This spraycan has been specially modified with a stage 2 nozzle kit, making it faster.") . += "This spraycan has been specially modified with a stage 2 nozzle kit, making it faster."
/obj/item/toy/crayon/spraycan/infinite /obj/item/toy/crayon/spraycan/infinite
name = "infinite spraycan" name = "infinite spraycan"
+3 -4
View File
@@ -103,12 +103,11 @@ GLOBAL_LIST_EMPTY(PDAs)
/obj/item/pda/examine(mob/user) /obj/item/pda/examine(mob/user)
. = ..() . = ..()
var/dat = id ? "<span class='notice'>Alt-click to remove the id.</span>" : "" . += id ? "<span class='notice'>Alt-click to remove the id.</span>" : ""
if(inserted_item && (!isturf(loc))) if(inserted_item && (!isturf(loc)))
dat += "\n<span class='notice'>Ctrl-click to remove [inserted_item].</span>" . += "<span class='notice'>Ctrl-click to remove [inserted_item].</span>"
if(LAZYLEN(GLOB.pda_reskins)) if(LAZYLEN(GLOB.pda_reskins))
dat += "\n<span class='notice'>Ctrl-shift-click it to reskin it.</span>" . += "<span class='notice'>Ctrl-shift-click it to reskin it.</span>"
to_chat(user, dat)
/obj/item/pda/Initialize() /obj/item/pda/Initialize()
. = ..() . = ..()
@@ -12,9 +12,9 @@
var/mode = 0 var/mode = 0
/obj/item/compressionkit/examine(mob/user) /obj/item/compressionkit/examine(mob/user)
..() . = ..()
to_chat(user, "<span class='notice'>It has [charges] charges left. Recharge with bluespace crystals.</span>") . += "<span class='notice'>It has [charges] charges left. Recharge with bluespace crystals.</span>"
to_chat(user, "<span class='notice'>Use in-hand to swap toggle compress/expand mode (expand mode not yet implemented).</span>") . += "<span class='notice'>Use in-hand to swap toggle compress/expand mode (expand mode not yet implemented).</span>"
/obj/item/compressionkit/attack_self(mob/user) /obj/item/compressionkit/attack_self(mob/user)
if(mode == 0) if(mode == 0)
@@ -0,0 +1,87 @@
/obj/item/desynchronizer
name = "desynchronizer"
desc = "An experimental device that can temporarily desynchronize the user from spacetime, effectively making them disappear while it's active."
icon = 'icons/obj/device.dmi'
icon_state = "desynchronizer"
item_state = "electronic"
w_class = WEIGHT_CLASS_SMALL
item_flags = NOBLUDGEON
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
materials = list(MAT_METAL = 250, MAT_GLASS = 500)
var/max_duration = 3000
var/duration = 300
var/last_use = 0
var/next_use = 0
var/obj/effect/abstract/sync_holder/sync_holder
/obj/item/desynchronizer/attack_self(mob/living/user)
if(world.time < next_use)
to_chat(user, "<span class='warning'>[src] is still recharging.</span>")
return
if(!sync_holder)
desync(user)
else
resync()
/obj/item/desynchronizer/examine(mob/user)
. = ..()
if(world.time < next_use)
. += "<span class='warning'>Time left to recharge: [DisplayTimeText(next_use - world.time)]</span>"
. += "<span class='notice'>Alt-click to customize the duration. Current duration: [DisplayTimeText(duration)].</span>"
. += "<span class='notice'>Can be used again to interrupt the effect early. The recharge time is the same as the time spent in desync.</span>"
/obj/item/desynchronizer/AltClick(mob/living/user)
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
var/new_duration = input(user, "Set the duration (5-300):", "Desynchronizer", duration / 10) as null|num
if(new_duration)
new_duration = new_duration SECONDS
new_duration = CLAMP(new_duration, 50, max_duration)
duration = new_duration
to_chat(user, "<span class='notice'>You set the duration to [DisplayTimeText(duration)].</span>")
/obj/item/desynchronizer/proc/desync(mob/living/user)
if(sync_holder)
return
sync_holder = new(drop_location())
new /obj/effect/temp_visual/desynchronizer(drop_location())
to_chat(user, "<span class='notice'>You activate [src], desynchronizing yourself from the present. You can still see your surroundings, but you feel eerily dissociated from reality.</span>")
user.forceMove(sync_holder)
SEND_SIGNAL(user, COMSIG_MOVABLE_SECLUDED_LOCATION)
for(var/thing in user)
var/atom/movable/AM = thing
SEND_SIGNAL(AM, COMSIG_MOVABLE_SECLUDED_LOCATION)
last_use = world.time
icon_state = "desynchronizer-on"
addtimer(CALLBACK(src, .proc/resync), duration)
/obj/item/desynchronizer/proc/resync()
new /obj/effect/temp_visual/desynchronizer(sync_holder.drop_location())
QDEL_NULL(sync_holder)
icon_state = initial(icon_state)
next_use = world.time + (world.time - last_use) // Could be 2*world.time-last_use but that would just be confusing
/obj/item/desynchronizer/Destroy()
resync()
return ..()
/obj/effect/abstract/sync_holder
name = "desyncronized pocket"
desc = "A pocket in spacetime, keeping the user a fraction of a second in the future."
icon = null
icon_state = null
alpha = 0
invisibility = INVISIBILITY_ABSTRACT
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
anchored = TRUE
resistance_flags = INDESTRUCTIBLE
/obj/effect/abstract/sync_holder/Destroy()
for(var/I in contents)
var/atom/movable/AM = I
AM.forceMove(drop_location())
return ..()
/obj/effect/abstract/sync_holder/AllowDrop()
return TRUE //no dropping spaghetti out of your spacetime pocket
@@ -35,8 +35,8 @@
return ..() return ..()
/obj/item/doorCharge/examine(mob/user) /obj/item/doorCharge/examine(mob/user)
..() . = ..()
if(user.mind && user.mind.has_antag_datum(/datum/antagonist/traitor)) //No nuke ops because the device is excluded from nuclear if(user.mind && user.mind.has_antag_datum(/datum/antagonist/traitor)) //No nuke ops because the device is excluded from nuclear
to_chat(user, "A small explosive device that can be used to sabotage airlocks to cause an explosion upon opening. To apply, remove the airlock's maintenance panel and place it within.") . += "A small explosive device that can be used to sabotage airlocks to cause an explosion upon opening. To apply, remove the airlock's maintenance panel and place it within."
else else
to_chat(user, "A small, suspicious object that feels lukewarm when held.") . += "A small, suspicious object that feels lukewarm when held."
@@ -16,11 +16,11 @@
maptext = "[circuits]" maptext = "[circuits]"
/obj/item/electroadaptive_pseudocircuit/examine(mob/user) /obj/item/electroadaptive_pseudocircuit/examine(mob/user)
..() . = ..()
if(iscyborg(user)) if(iscyborg(user))
to_chat(user, "<span class='notice'>It has material for <b>[circuits]</b> circuit[circuits == 1 ? "" : "s"]. Use the pseudocircuit on existing circuits to gain material.</span>") . += "<span class='notice'>It has material for <b>[circuits]</b> circuit[circuits == 1 ? "" : "s"]. Use the pseudocircuit on existing circuits to gain material.</span>"
to_chat(user, "<span class='notice'>Serves as a substitute for <b>fire/air alarm</b>, <b>firelock</b>, and <b>APC</b> electronics.</span>") . += "<span class='notice'>Serves as a substitute for <b>fire/air alarm</b>, <b>firelock</b>, and <b>APC</b> electronics.</span>"
to_chat(user, "<span class='notice'>It can also be used on an APC with no power cell to <b>fabricate a low-capacity cell</b> at a high power cost.</span>") . += "<span class='notice'>It can also be used on an APC with no power cell to <b>fabricate a low-capacity cell</b> at a high power cost.</span>"
/obj/item/electroadaptive_pseudocircuit/proc/adapt_circuit(mob/living/silicon/robot/R, circuit_cost = 0) /obj/item/electroadaptive_pseudocircuit/proc/adapt_circuit(mob/living/silicon/robot/R, circuit_cost = 0)
if(QDELETED(R) || !istype(R)) if(QDELETED(R) || !istype(R))
@@ -52,9 +52,9 @@
qdel(F) qdel(F)
/obj/item/forcefield_projector/examine(mob/user) /obj/item/forcefield_projector/examine(mob/user)
..() . = ..()
var/percent_charge = round((shield_integrity/max_shield_integrity)*100) var/percent_charge = round((shield_integrity/max_shield_integrity)*100)
to_chat(user, "<span class='notice'>It is currently sustaining [LAZYLEN(current_fields)]/[max_fields] fields, and it's [percent_charge]% charged.</span>") . += "<span class='notice'>It is currently sustaining [LAZYLEN(current_fields)]/[max_fields] fields, and it's [percent_charge]% charged.</span>"
/obj/item/forcefield_projector/Initialize(mapload) /obj/item/forcefield_projector/Initialize(mapload)
. = ..() . = ..()
@@ -63,28 +63,28 @@
current_tick_amount = 0 current_tick_amount = 0
/obj/item/geiger_counter/examine(mob/user) /obj/item/geiger_counter/examine(mob/user)
..() . = ..()
if(!scanning) if(!scanning)
return 1 return
to_chat(user, "<span class='info'>Alt-click it to clear stored radiation levels.</span>") . += "<span class='info'>Alt-click it to clear stored radiation levels.</span>"
if(obj_flags & EMAGGED) if(obj_flags & EMAGGED)
to_chat(user, "<span class='warning'>The display seems to be incomprehensible.</span>") . += "<span class='warning'>The display seems to be incomprehensible.</span>"
return 1 return
switch(radiation_count) switch(radiation_count)
if(-INFINITY to RAD_LEVEL_NORMAL) if(-INFINITY to RAD_LEVEL_NORMAL)
to_chat(user, "<span class='notice'>Ambient radiation level count reports that all is well.</span>") . += "<span class='notice'>Ambient radiation level count reports that all is well.</span>"
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE) if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
to_chat(user, "<span class='disarm'>Ambient radiation levels slightly above average.</span>") . += "<span class='disarm'>Ambient radiation levels slightly above average.</span>"
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH) if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
to_chat(user, "<span class='warning'>Ambient radiation levels above average.</span>") . += "<span class='warning'>Ambient radiation levels above average.</span>"
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH) if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
to_chat(user, "<span class='danger'>Ambient radiation levels highly above average.</span>") . += "<span class='danger'>Ambient radiation levels highly above average.</span>"
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL) if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
to_chat(user, "<span class='suicide'>Ambient radiation levels nearing critical level.</span>") . += "<span class='suicide'>Ambient radiation levels nearing critical level.</span>"
if(RAD_LEVEL_CRITICAL + 1 to INFINITY) if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
to_chat(user, "<span class='boldannounce'>Ambient radiation levels above critical level!</span>") . += "<span class='boldannounce'>Ambient radiation levels above critical level!</span>"
to_chat(user, "<span class='notice'>The last radiation amount detected was [last_tick_amount]</span>") . += "<span class='notice'>The last radiation amount detected was [last_tick_amount]</span>"
/obj/item/geiger_counter/update_icon() /obj/item/geiger_counter/update_icon()
if(!scanning) if(!scanning)
+3 -3
View File
@@ -14,10 +14,10 @@ GLOBAL_LIST_EMPTY(GPS_list)
var/global_mode = TRUE //If disabled, only GPS signals of the same Z level are shown var/global_mode = TRUE //If disabled, only GPS signals of the same Z level are shown
/obj/item/gps/examine(mob/user) /obj/item/gps/examine(mob/user)
..() . = ..()
var/turf/curr = get_turf(src) var/turf/curr = get_turf(src)
to_chat(user, "The screen says: [get_area_name(curr, TRUE)] ([curr.x], [curr.y], [curr.z])") . += "The screen says: [get_area_name(curr, TRUE)] ([curr.x], [curr.y], [curr.z])"
to_chat(user, "<span class='notice'>Alt-click to switch it [tracking ? "off":"on"].</span>") . += "<span class='notice'>Alt-click to switch it [tracking ? "off":"on"].</span>"
/obj/item/gps/Initialize() /obj/item/gps/Initialize()
. = ..() . = ..()
@@ -73,8 +73,8 @@
..() ..()
/obj/item/lightreplacer/examine(mob/user) /obj/item/lightreplacer/examine(mob/user)
..() . = ..()
to_chat(user, status_string()) . += status_string()
/obj/item/lightreplacer/attackby(obj/item/W, mob/user, params) /obj/item/lightreplacer/attackby(obj/item/W, mob/user, params)
+3 -3
View File
@@ -51,11 +51,11 @@
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE) AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
/obj/item/multitool/examine(mob/user) /obj/item/multitool/examine(mob/user)
..() . = ..()
if(selected_io) if(selected_io)
to_chat(user, "<span class='notice'>Activate [src] to detach the data wire.</span>") . += "<span class='notice'>Activate [src] to detach the data wire.</span>"
if(buffer) if(buffer)
to_chat(user, "<span class='notice'>Its buffer contains [buffer].</span>") . += "<span class='notice'>Its buffer contains [buffer].</span>"
/obj/item/multitool/suicide_act(mob/living/carbon/user) /obj/item/multitool/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] puts the [src] to [user.p_their()] chest. It looks like [user.p_theyre()] trying to pulse [user.p_their()] heart off!</span>") user.visible_message("<span class='suicide'>[user] puts the [src] to [user.p_their()] chest. It looks like [user.p_theyre()] trying to pulse [user.p_their()] heart off!</span>")
@@ -26,5 +26,5 @@
paint_color = input("Which colour do you want to use?","Pipe painter") in GLOB.pipe_paint_colors paint_color = input("Which colour do you want to use?","Pipe painter") in GLOB.pipe_paint_colors
/obj/item/pipe_painter/examine(mob/user) /obj/item/pipe_painter/examine(mob/user)
..() . = ..()
to_chat(user, "<span class='notice'>It is set to [paint_color].</span>") . += "<span class='notice'>It is set to [paint_color].</span>"

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