diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm
index 4511f8bd5a7..865490aef28 100644
--- a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm
@@ -381,6 +381,8 @@
if(!welded)
if(open)
for(var/obj/item/W in src)
+ if(istype(W, /obj/item/pipe))
+ continue
W.forceMove(get_turf(src))
diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm
index da61e4829c2..1df551e53e7 100644
--- a/code/__DEFINES/admin.dm
+++ b/code/__DEFINES/admin.dm
@@ -45,19 +45,19 @@
#define R_HOST 65535
-#define ADMIN_QUE(user) "(?)"
-#define ADMIN_FLW(user) "(FLW)"
-#define ADMIN_PP(user) "(PP)"
-#define ADMIN_VV(atom) "(VV)"
-#define ADMIN_SM(user) "(SM)"
-#define ADMIN_TP(user) "(TP)"
-#define ADMIN_BSA(user) "(BSA)"
-#define ADMIN_CENTCOM_REPLY(user) "(RPLY)"
-#define ADMIN_SYNDICATE_REPLY(user) "(RPLY)"
-#define ADMIN_SC(user) "(SC)"
-#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]"
-#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]"
-#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)]"
+#define ADMIN_QUE(user,display) "[display]"
+#define ADMIN_FLW(user,display) "[display]"
+#define ADMIN_PP(user,display) "[display]"
+#define ADMIN_VV(atom,display) "[display]"
+#define ADMIN_SM(user,display) "[display]"
+#define ADMIN_TP(user,display) "[display]"
+#define ADMIN_BSA(user,display) "[display]"
+#define ADMIN_CENTCOM_REPLY(user,display) "[display]"
+#define ADMIN_SYNDICATE_REPLY(user,display) "[display]"
+#define ADMIN_SC(user,display) "[display]"
+#define ADMIN_LOOKUP(user) "[key_name_admin(user)]([ADMIN_QUE(user,"?")])"
+#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")])"
+#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] ([ADMIN_QUE(user,"?")]) ([ADMIN_PP(user,"PP")]) ([ADMIN_VV(user,"VV")]) ([ADMIN_SM(user,"SM")]) ([ADMIN_FLW(user,"FLW")]) ([ADMIN_TP(user,"TP")])"
#define ADMIN_JMP(src) "(JMP)"
#define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]"
#define AREACOORD(src) "[src ? "[get_area_name(src, TRUE)] [COORD(src)]" : "nonexistent location" ]"
diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm
index 6f14b75b2ec..967749a55a7 100644
--- a/code/__DEFINES/components.dm
+++ b/code/__DEFINES/components.dm
@@ -17,7 +17,8 @@
// /datum signals
#define COMSIG_COMPONENT_ADDED "component_added" //when a component is added to a datum: (/datum/component)
#define COMSIG_COMPONENT_REMOVING "component_removing" //before a component is removed from a datum because of RemoveComponent: (/datum/component)
-#define COMSIG_PARENT_QDELETED "parent_qdeleted" //before a datum's Destroy() is called: ()
+#define COMSIG_PARENT_PREQDELETED "parent_preqdeleted" //before a datum's Destroy() is called: (force), returning a nonzero value will cancel the qdel operation
+#define COMSIG_PARENT_QDELETED "parent_qdeleted" //after a datum's Destroy() is called: (force, qdel_hint), at this point none of the other components chose to interrupt qdel and Destroy has been called
// /atom signals
#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (/obj/item, /mob/living, params)
diff --git a/code/__DEFINES/qdel.dm b/code/__DEFINES/qdel.dm
index 8d504edaf41..6adb876da8d 100644
--- a/code/__DEFINES/qdel.dm
+++ b/code/__DEFINES/qdel.dm
@@ -11,14 +11,12 @@
#define QDEL_HINT_IFFAIL_FINDREFERENCE 6 //Above but only if gc fails.
//defines for the gc_destroyed var
-#define GC_QUEUE_PREQUEUE 1
-#define GC_QUEUE_CHECK 2
-#define GC_QUEUE_HARDDELETE 3
-#define GC_QUEUE_COUNT 3 //increase this when adding more steps.
+#define GC_QUEUE_CHECK 1
+#define GC_QUEUE_HARDDELETE 2
+#define GC_QUEUE_COUNT 2 //increase this when adding more steps.
#define GC_QUEUED_FOR_QUEUING -1
-#define GC_QUEUED_FOR_HARD_DEL -2
-#define GC_CURRENTLY_BEING_QDELETED -3
+#define GC_CURRENTLY_BEING_QDELETED -2
#define QDELING(X) (X.gc_destroyed)
#define QDELETED(X) (!X || QDELING(X))
diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm
index b85677ff777..5ade3b0baef 100644
--- a/code/__DEFINES/subsystems.dm
+++ b/code/__DEFINES/subsystems.dm
@@ -18,8 +18,6 @@
//In most cases you want a subsystem instead
#define TIMER_LOOP 32
-#define TIMER_NO_INVOKE_WARNING 600 //number of byond ticks that are allowed to pass before the timer subsystem thinks it hung on something
-
#define TIMER_ID_NULL -1
//For servers that can't do with any additional lag, set this to none in flightpacks.dm in subsystem/processing.
diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm
index 27ec6e7202f..2db8621195d 100644
--- a/code/__HELPERS/icon_smoothing.dm
+++ b/code/__HELPERS/icon_smoothing.dm
@@ -108,11 +108,19 @@
return adjacencies
+//do not use, use queue_smooth(atom)
/proc/smooth_icon(atom/A)
+ if(!A || !A.smooth || !A.z)
+ return
if(QDELETED(A))
return
- if(A && (A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE))
+ if((A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE))
var/adjacencies = calculate_adjacencies(A)
+
+ if(A.smooth & SMOOTH_DIAGONAL)
+ A.diagonal_smooth(adjacencies)
+ else
+ cardinal_smooth(A, adjacencies)
if(A.smooth & SMOOTH_DIAGONAL)
A.diagonal_smooth(adjacencies)
else
@@ -149,12 +157,12 @@
/turf/simulated/wall/diagonal_smooth(adjacencies)
adjacencies = reverse_ndir(..())
if(adjacencies)
- underlays.Cut()
+ var/list/U = list()
if(fixed_underlay)
if(fixed_underlay["space"])
- underlays += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER)
+ U += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER)
else
- underlays += image(fixed_underlay["icon"], fixed_underlay["icon_state"], layer=TURF_LAYER)
+ U += image(fixed_underlay["icon"], fixed_underlay["icon_state"], layer=TURF_LAYER)
else
var/turf/T = get_step(src, turn(adjacencies, 180))
if(T && (T.density || T.smooth))
@@ -163,13 +171,14 @@
T = get_step(src, turn(adjacencies, 225))
if(istype(T, /turf/space) && !istype(T, /turf/space/transit))
- underlays += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER)
+ U += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER)
else if(T && !T.density && !T.smooth)
- underlays += T
+ U += T
else if(baseturf && !initial(baseturf.density) && !initial(baseturf.smooth))
- underlays += image(initial(baseturf.icon), initial(baseturf.icon_state), layer=TURF_LAYER)
+ U += image(initial(baseturf.icon), initial(baseturf.icon_state), layer=TURF_LAYER)
else
- underlays += DEFAULT_UNDERLAY_IMAGE
+ U += DEFAULT_UNDERLAY_IMAGE
+ underlays = U
/proc/cardinal_smooth(atom/A, adjacencies)
//NW CORNER
@@ -224,43 +233,36 @@
else if(adjacencies & N_EAST)
se = "4-e"
+ var/list/New = list()
+
if(A.top_left_corner != nw)
A.overlays -= A.top_left_corner
A.top_left_corner = nw
- A.overlays += nw
+ New += nw
if(A.top_right_corner != ne)
A.overlays -= A.top_right_corner
A.top_right_corner = ne
- A.overlays += ne
+ New += ne
if(A.bottom_right_corner != sw)
A.overlays -= A.bottom_right_corner
A.bottom_right_corner = sw
- A.overlays += sw
+ New += sw
if(A.bottom_left_corner != se)
A.overlays -= A.bottom_left_corner
A.bottom_left_corner = se
- A.overlays += se
+ New += se
-/proc/find_type_in_direction(atom/source, direction, range=1)
- var/x_offset = 0
- var/y_offset = 0
+ if(New.len)
+ A.overlays.Add(New)
- if(direction & NORTH)
- y_offset = range
- else if(direction & SOUTH)
- y_offset -= range
-
- if(direction & EAST)
- x_offset = range
- else if(direction & WEST)
- x_offset -= range
-
- var/turf/target_turf = locate(source.x + x_offset, source.y + y_offset, source.z)
+/proc/find_type_in_direction(atom/source, direction)
+ var/turf/target_turf = get_step(source, direction)
if(!target_turf)
return NULLTURF_BORDER
+
if(source.canSmoothWith)
var/atom/A
if(source.smooth & SMOOTH_MORE)
@@ -287,22 +289,22 @@
//Icon smoothing helpers
-/proc/smooth_icon_neighbors(atom/A)
- for(var/V in orange(1,A))
- var/atom/T = V
- if(T.smooth)
- smooth_icon(T)
-
-/proc/smooth_zlevel(var/zlevel)
+/proc/smooth_zlevel(var/zlevel, now = FALSE)
var/list/away_turfs = block(locate(1, 1, zlevel), locate(world.maxx, world.maxy, zlevel))
for(var/V in away_turfs)
var/turf/T = V
if(T.smooth)
- smooth_icon(T)
+ if(now)
+ smooth_icon(T)
+ else
+ queue_smooth(T)
for(var/R in T)
var/atom/A = R
if(A.smooth)
- smooth_icon(A)
+ if(now)
+ smooth_icon(A)
+ else
+ queue_smooth(A)
/atom/proc/clear_smooth_overlays()
overlays -= top_left_corner
@@ -316,14 +318,16 @@
/atom/proc/replace_smooth_overlays(nw, ne, sw, se)
clear_smooth_overlays()
+ var/list/O = list()
top_left_corner = nw
- overlays += nw
+ O += nw
top_right_corner = ne
- overlays += ne
+ O += ne
bottom_left_corner = sw
- overlays += sw
+ O += sw
bottom_right_corner = se
- overlays += se
+ O += se
+ overlays.Add(O)
/proc/reverse_ndir(ndir)
switch(ndir)
@@ -362,6 +366,21 @@
else
return 0
+//SSicon_smooth
+/proc/queue_smooth_neighbors(atom/A)
+ for(var/V in orange(1,A))
+ var/atom/T = V
+ if(T.smooth)
+ queue_smooth(T)
+
+//SSicon_smooth
+/proc/queue_smooth(atom/A)
+ if(SSicon_smooth)
+ SSicon_smooth.smooth_queue[A] = A
+ SSicon_smooth.can_fire = 1
+ else
+ smooth_icon(A)
+
//Example smooth wall
/turf/simulated/wall/smooth
name = "smooth wall"
diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm
index c30b2a3ef0d..1ca1fe01036 100644
--- a/code/__HELPERS/mobs.dm
+++ b/code/__HELPERS/mobs.dm
@@ -444,7 +444,7 @@ This is always put in the attack log.
to_chat(user, "Name = [M.name]; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = [M.key];")
to_chat(user, "Location = [location_description];")
to_chat(user, "[special_role_description]")
- to_chat(user, "(PM) (PP) (VV) (SM) (FLW) (CA)")
+ to_chat(user, "(PM) ([ADMIN_PP(M,"PP")]) ([ADMIN_VV(M,"VV")]) ([ADMIN_SM(M,"SM")]) ([ADMIN_FLW(M,"FLW")]) (CA)")
// Gets the first mob contained in an atom, and warns the user if there's not exactly one
/proc/get_mob_in_atom_with_warning(atom/A, mob/user = usr)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 4dd3c56d12f..6ce486bdc05 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -1150,6 +1150,11 @@ var/global/list/common_tools = list(
return 1
return 0
+/proc/ispowertool(O)//used to check if a tool can force powered doors
+ if(istype(O, /obj/item/crowbar/power) || istype(O, /obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw))
+ return TRUE
+ return FALSE
+
/proc/iswire(O)
if(istype(O, /obj/item/stack/cable_coil))
return 1
diff --git a/code/_compile_options.dm b/code/_compile_options.dm
index c6b63b77271..436970567a0 100644
--- a/code/_compile_options.dm
+++ b/code/_compile_options.dm
@@ -18,7 +18,7 @@
#define MAX_PAPER_MESSAGE_LEN 3072
#define MAX_PAPER_FIELDS 50
#define MAX_BOOK_MESSAGE_LEN 9216
-#define MAX_NAME_LEN 26
+#define MAX_NAME_LEN 50 //diona names can get loooooooong
// Version check, terminates compilation if someone is using a version of BYOND that's too old
#if DM_VERSION < 510
diff --git a/code/_globalvars/lists/reagents.dm b/code/_globalvars/lists/reagents.dm
index 30809943a8a..daa2d634b9f 100644
--- a/code/_globalvars/lists/reagents.dm
+++ b/code/_globalvars/lists/reagents.dm
@@ -1,9 +1,9 @@
// Base chemicals
-var/list/base_chemicals = list("water","oxygen","nitrogen","hydrogen","potassium","mercury","carbon",
+GLOBAL_LIST_INIT(base_chemicals, list("water","oxygen","nitrogen","hydrogen","potassium","mercury","carbon",
"chlorine","fluorine","phosphorus","lithium","sulfur","sacid","radium",
- "iron","aluminum","silicon","sugar","ethanol")
+ "iron","aluminum","silicon","sugar","ethanol"))
// Standard chemicals
-var/list/standard_chemicals = list("slimejelly","blood","water","lube","charcoal","toxin","cyanide",
+GLOBAL_LIST_INIT(standard_chemicals, list("slimejelly","blood","water","lube","charcoal","toxin","cyanide",
"morphine","epinephrine","space_drugs","serotrotium","oxygen","copper",
"nitrogen","hydrogen","potassium","mercury","sulfur","carbon","chlorine",
"fluorine","sodium","phosphorus","lithium","sugar","sacid","facid",
@@ -15,21 +15,21 @@ var/list/standard_chemicals = list("slimejelly","blood","water","lube","charcoal
"cryoxadone","spaceacillin","carpotoxin","lsd","fluorosurfactant",
"fluorosurfactant","ethanol","ammonia","diethylamine","antihol","pancuronium",
"lipolicide","condensedcapsaicin","frostoil","amanitin","psilocybin",
- "enzyme","nothing","salglu_solution","antifreeze","neurotoxin")
+ "enzyme","nothing","salglu_solution","antifreeze","neurotoxin"))
// Rare chemicals
-var/list/rare_chemicals = list("minttoxin","syndicate_nanites", "xenomicrobes")
+GLOBAL_LIST_INIT(rare_chemicals, list("minttoxin","syndicate_nanites", "xenomicrobes"))
// Standard medicines
-var/list/standard_medicines = list("charcoal","toxin","cyanide","morphine","epinephrine","space_drugs",
+GLOBAL_LIST_INIT(standard_medicines, list("charcoal","toxin","cyanide","morphine","epinephrine","space_drugs",
"serotrotium","mutadone","mutagen","teporone","lexorin","silver_sulfadiazine",
"salbutamol","perfluorodecalin","omnizine","synaptizine","haloperidol",
"potass_iodide","pen_acid","mannitol","oculine","styptic_powder",
"methamphetamine","spaceacillin","carpotoxin","lsd","ethanol","ammonia",
"diethylamine","antihol","pancuronium","lipolicide","condensedcapsaicin",
- "frostoil","amanitin","psilocybin","nothing","salglu_solution","neurotoxin")
+ "frostoil","amanitin","psilocybin","nothing","salglu_solution","neurotoxin"))
// Rare medicines
-var/list/rare_medicines = list("syndicate_nanites","minttoxin","blood", "xenomicrobes")
+GLOBAL_LIST_INIT(rare_medicines, list("syndicate_nanites","minttoxin","blood", "xenomicrobes"))
// Drinks
-var/list/drinks = list("beer2","hot_coco","orangejuice","tomatojuice","limejuice","carrotjuice",
+GLOBAL_LIST_INIT(drinks, list("beer2","hot_coco","orangejuice","tomatojuice","limejuice","carrotjuice",
"berryjuice","poisonberryjuice","watermelonjuice","lemonjuice","banana",
"nothing","potato","milk","soymilk","cream","coffee","tea","icecoffee",
"icetea","cola","nuka_cola","spacemountainwind","thirteenloko","dr_gibb",
@@ -44,10 +44,13 @@ var/list/drinks = list("beer2","hot_coco","orangejuice","tomatojuice","limejuice
"vodkatonic","ginfizz","bahama_mama","singulo","sbiten","devilskiss","red_mead",
"mead","iced_beer","grog","aloe","andalusia","alliescocktail","soy_latte",
"cafe_latte","acidspit","amasec","neurotoxin","hippiesdelight","bananahonk",
- "silencer","changelingsting","irishcarbomb","syndicatebomb","erikasurprise","driestmartini", "flamingmoe")
+ "silencer","changelingsting","irishcarbomb","syndicatebomb","erikasurprise","driestmartini", "flamingmoe"))
+
+//Liver Toxins list
+GLOBAL_LIST_INIT(liver_toxins, list("toxin", "plasma", "sacid", "facid", "cyanide","amanitin", "carpotoxin"))
//Random chem blacklist
-var/global/list/blocked_chems = list("polonium", "initropidril", "concentrated_initro",
+GLOBAL_LIST_INIT(blocked_chems, list("polonium", "initropidril", "concentrated_initro",
"sodium_thiopental", "ketamine", "coniine",
"adminordrazine", "nanites", "hellwater",
"mutationtoxin", "amutationtoxin", "venom",
@@ -55,9 +58,9 @@ var/global/list/blocked_chems = list("polonium", "initropidril", "concentrated_i
"syndicate_nanites", "ripping_tendrils", "boiling_oil",
"envenomed_filaments", "lexorin_jelly", "kinetic",
"cryogenic_liquid", "dark_matter", "b_sorium",
- "reagent", "life","dragonsbreath", "nanocalcium")
+ "reagent", "life","dragonsbreath", "nanocalcium"))
-var/global/list/safe_chem_list = list("antihol", "charcoal", "epinephrine", "insulin", "teporone","silver_sulfadiazine", "salbutamol",
+GLOBAL_LIST_INIT(safe_chem_list, list("antihol", "charcoal", "epinephrine", "insulin", "teporone","silver_sulfadiazine", "salbutamol",
"omnizine", "stimulants", "synaptizine", "potass_iodide", "oculine", "mannitol", "styptic_powder",
"spaceacillin", "salglu_solution", "sal_acid", "cryoxadone", "blood", "synthflesh", "hydrocodone",
- "mitocholide", "rezadone")
\ No newline at end of file
+ "mitocholide", "rezadone"))
\ No newline at end of file
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index 006f350873b..8ce2177751c 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -236,6 +236,8 @@
Makes the mob face the direction of the clicked thing
*/
/mob/proc/MiddleShiftClickOn(atom/A)
+ if(incapacitated())
+ return
var/face_dir = get_cardinal_dir(src, A)
if(forced_look == face_dir)
forced_look = null
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 7c38ee1072a..623d1bb5dd6 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -175,66 +175,111 @@
icon_state = "zone_sel"
screen_loc = ui_zonesel
var/selecting = "chest"
+ var/static/list/hover_overlays_cache = list()
+ var/hovering
/obj/screen/zone_sel/Click(location, control,params)
+ if(isobserver(usr))
+ return
+
var/list/PL = params2list(params)
var/icon_x = text2num(PL["icon-x"])
var/icon_y = text2num(PL["icon-y"])
- var/old_selecting = selecting //We're only going to update_icon() if there's been a change
+ var/choice = get_zone_at(icon_x, icon_y)
+ if(!choice)
+ return 1
+ return set_selected_zone(choice, usr)
+
+/obj/screen/zone_sel/MouseEntered(location, control, params)
+ MouseMove(location, control, params)
+
+/obj/screen/zone_sel/MouseMove(location, control, params)
+ if(isobserver(usr))
+ return
+
+ var/list/PL = params2list(params)
+ var/icon_x = text2num(PL["icon-x"])
+ var/icon_y = text2num(PL["icon-y"])
+ var/choice = get_zone_at(icon_x, icon_y)
+
+ if(hovering == choice)
+ return
+ cut_overlay(hover_overlays_cache[hovering])
+ hovering = choice
+
+ var/obj/effect/overlay/zone_sel/overlay_object = hover_overlays_cache[choice]
+ if(!overlay_object)
+ overlay_object = new
+ overlay_object.icon_state = "[choice]"
+ hover_overlays_cache[choice] = overlay_object
+ add_overlay(overlay_object)
+
+
+/obj/effect/overlay/zone_sel
+ icon = 'icons/mob/zone_sel.dmi'
+ mouse_opacity = MOUSE_OPACITY_TRANSPARENT
+ alpha = 128
+ anchored = TRUE
+ layer = ABOVE_HUD_LAYER
+ plane = ABOVE_HUD_PLANE
+
+/obj/screen/zone_sel/MouseExited(location, control, params)
+ if(!isobserver(usr) && hovering)
+ cut_overlay(hover_overlays_cache[hovering])
+ hovering = null
+
+/obj/screen/zone_sel/proc/get_zone_at(icon_x, icon_y)
switch(icon_y)
if(1 to 3) //Feet
switch(icon_x)
if(10 to 15)
- selecting = "r_foot"
+ return "r_foot"
if(17 to 22)
- selecting = "l_foot"
- else
- return 1
+ return "l_foot"
if(4 to 9) //Legs
switch(icon_x)
if(10 to 15)
- selecting = "r_leg"
+ return "r_leg"
if(17 to 22)
- selecting = "l_leg"
- else
- return 1
+ return "l_leg"
if(10 to 13) //Hands and groin
switch(icon_x)
if(8 to 11)
- selecting = "r_hand"
+ return "r_hand"
if(12 to 20)
- selecting = "groin"
+ return "groin"
if(21 to 24)
- selecting = "l_hand"
- else
- return 1
+ return "l_hand"
if(14 to 22) //Chest and arms to shoulders
switch(icon_x)
if(8 to 11)
- selecting = "r_arm"
+ return "r_arm"
if(12 to 20)
- selecting = "chest"
+ return "chest"
if(21 to 24)
- selecting = "l_arm"
- else
- return 1
+ return "l_arm"
if(23 to 30) //Head, but we need to check for eye or mouth
if(icon_x in 12 to 20)
- selecting = "head"
switch(icon_y)
if(23 to 24)
if(icon_x in 15 to 17)
- selecting = "mouth"
+ return "mouth"
if(26) //Eyeline, eyes are on 15 and 17
if(icon_x in 14 to 18)
- selecting = "eyes"
+ return "eyes"
if(25 to 27)
if(icon_x in 15 to 17)
- selecting = "eyes"
+ return "eyes"
+ return "head"
- if(old_selecting != selecting)
- update_icon()
+/obj/screen/zone_sel/proc/set_selected_zone(choice, mob/user)
+ if(isobserver(user))
+ return
+
+ if(choice != selecting)
+ selecting = choice
+ update_icon(usr)
return 1
/obj/screen/zone_sel/update_icon()
diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm
index 97dd02838d0..c1cb90919f5 100644
--- a/code/controllers/subsystem/garbage.dm
+++ b/code/controllers/subsystem/garbage.dm
@@ -59,7 +59,6 @@ SUBSYSTEM_DEF(garbage)
msg += " | Fail:[fail_counts.Join(",")]"
..(msg)
-
/datum/controller/subsystem/garbage/Shutdown()
//Adds the del() log to the qdel log file
var/list/dellog = list()
@@ -86,41 +85,21 @@ SUBSYSTEM_DEF(garbage)
/datum/controller/subsystem/garbage/fire()
//the fact that this resets its processing each fire (rather then resume where it left off) is intentional.
- var/queue = GC_QUEUE_PREQUEUE
+ var/queue = GC_QUEUE_CHECK
while(state == SS_RUNNING)
switch(queue)
- if(GC_QUEUE_PREQUEUE)
- HandlePreQueue()
- queue = GC_QUEUE_PREQUEUE + 1
if(GC_QUEUE_CHECK)
HandleQueue(GC_QUEUE_CHECK)
queue = GC_QUEUE_CHECK + 1
if(GC_QUEUE_HARDDELETE)
HandleQueue(GC_QUEUE_HARDDELETE)
+ if(state == SS_PAUSED) //make us wait again before the next run.
+ state = SS_RUNNING
break
- if(state == SS_PAUSED) //make us wait again before the next run.
- state = SS_RUNNING
-//If you see this proc high on the profile, what you are really seeing is the garbage collection/soft delete overhead in byond.
-//Don't attempt to optimize, not worth the effort.
-/datum/controller/subsystem/garbage/proc/HandlePreQueue()
- var/list/tobequeued = queues[GC_QUEUE_PREQUEUE]
- var/static/count = 0
- if(count)
- var/c = count
- count = 0 //so if we runtime on the Cut, we don't try again.
- tobequeued.Cut(1, c + 1)
- for(var/ref in tobequeued)
- count++
- Queue(ref, GC_QUEUE_PREQUEUE + 1)
- if(MC_TICK_CHECK)
- break
- if(count)
- tobequeued.Cut(1, count + 1)
- count = 0
/datum/controller/subsystem/garbage/proc/HandleQueue(level = GC_QUEUE_CHECK)
if(level == GC_QUEUE_CHECK)
@@ -142,7 +121,7 @@ SUBSYSTEM_DEF(garbage)
if(!refID)
count++
if(MC_TICK_CHECK)
- break
+ return
continue
var/GCd_at_time = queue[refID]
@@ -161,7 +140,7 @@ SUBSYSTEM_DEF(garbage)
reference_find_on_fail -= refID //It's deleted we don't care anymore.
#endif
if(MC_TICK_CHECK)
- break
+ return
continue
// Something's still referring to the qdel'd object.
@@ -184,27 +163,20 @@ SUBSYSTEM_DEF(garbage)
if(GC_QUEUE_HARDDELETE)
HardDelete(D)
if(MC_TICK_CHECK)
- break
+ return
continue
Queue(D, level + 1)
if(MC_TICK_CHECK)
- break
+ return
if(count)
queue.Cut(1, count + 1)
count = 0
-/datum/controller/subsystem/garbage/proc/PreQueue(datum/D)
- if(D.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)
- queues[GC_QUEUE_PREQUEUE] += D
- D.gc_destroyed = GC_QUEUED_FOR_QUEUING
-
/datum/controller/subsystem/garbage/proc/Queue(datum/D, level = GC_QUEUE_CHECK)
if(isnull(D))
return
- if(D.gc_destroyed == GC_QUEUED_FOR_HARD_DEL)
- level = GC_QUEUE_HARDDELETE
if(level > GC_QUEUE_COUNT)
HardDelete(D)
return
@@ -250,11 +222,6 @@ SUBSYSTEM_DEF(garbage)
message_admins("Error: [type]([refID]) took longer than 1 second to delete (took [time / 10] seconds to delete).")
postpone(time)
-/datum/controller/subsystem/garbage/proc/HardQueue(datum/D)
- if(D.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)
- queues[GC_QUEUE_PREQUEUE] += D
- D.gc_destroyed = GC_QUEUED_FOR_HARD_DEL
-
/datum/controller/subsystem/garbage/Recover()
if(istype(SSgarbage.queues))
for(var/i in 1 to SSgarbage.queues.len)
@@ -294,11 +261,13 @@ SUBSYSTEM_DEF(garbage)
if(isnull(D.gc_destroyed))
- D.SendSignal(COMSIG_PARENT_QDELETED)
+ if(D.SendSignal(COMSIG_PARENT_PREQDELETED, force)) // Give the components a chance to prevent their parent from being deleted
+ return
D.gc_destroyed = GC_CURRENTLY_BEING_QDELETED
var/start_time = world.time
var/start_tick = world.tick_usage
var/hint = D.Destroy(arglist(args.Copy(2))) // Let our friend know they're about to get fucked up.
+ D.SendSignal(COMSIG_PARENT_QDELETED, force, hint) // Let the (remaining) components know about the result of Destroy
if(world.time != start_time)
I.slept_destroy++
else
@@ -307,7 +276,7 @@ SUBSYSTEM_DEF(garbage)
return
switch(hint)
if(QDEL_HINT_QUEUE) //qdel should queue the object for deletion.
- SSgarbage.PreQueue(D)
+ SSgarbage.Queue(D)
if(QDEL_HINT_IWILLGC)
D.gc_destroyed = world.time
return
@@ -327,18 +296,18 @@ SUBSYSTEM_DEF(garbage)
#endif
I.no_respect_force++
- SSgarbage.PreQueue(D)
- if(QDEL_HINT_HARDDEL) //qdel should assume this object won't gc, and queue a hard delete using a hard reference to save time from the locate()
- SSgarbage.HardQueue(D)
+ SSgarbage.Queue(D)
+ if(QDEL_HINT_HARDDEL) //qdel should assume this object won't gc, and queue a hard delete
+ SSgarbage.Queue(D, GC_QUEUE_HARDDELETE)
if(QDEL_HINT_HARDDEL_NOW) //qdel should assume this object won't gc, and hard del it post haste.
SSgarbage.HardDelete(D)
if(QDEL_HINT_FINDREFERENCE)//qdel will, if TESTING is enabled, display all references to this object, then queue the object for deletion.
- SSgarbage.PreQueue(D)
+ SSgarbage.Queue(D)
#ifdef TESTING
D.find_references()
#endif
if(QDEL_HINT_IFFAIL_FINDREFERENCE)
- SSgarbage.PreQueue(D)
+ SSgarbage.Queue(D)
#ifdef TESTING
SSgarbage.reference_find_on_fail["\ref[D]"] = TRUE
#endif
@@ -348,7 +317,7 @@ SUBSYSTEM_DEF(garbage)
testing("WARNING: [D.type] is not returning a qdel hint. It is being placed in the queue. Further instances of this type will also be queued.")
#endif
I.no_hint++
- SSgarbage.PreQueue(D)
+ SSgarbage.Queue(D)
else if(D.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)
CRASH("[D.type] destroy proc was called multiple times, likely due to a qdel loop in the Destroy logic")
@@ -463,4 +432,4 @@ SUBSYSTEM_DEF(garbage)
CHECK_TICK
#endif
-#endif
+#endif
\ No newline at end of file
diff --git a/code/controllers/subsystem/icon_smooth.dm b/code/controllers/subsystem/icon_smooth.dm
new file mode 100644
index 00000000000..65260e5af55
--- /dev/null
+++ b/code/controllers/subsystem/icon_smooth.dm
@@ -0,0 +1,32 @@
+SUBSYSTEM_DEF(icon_smooth)
+ name = "Icon Smoothing"
+ init_order = INIT_ORDER_ICON_SMOOTHING
+ wait = 1
+ priority = FIRE_PRIOTITY_SMOOTHING
+ flags = SS_TICKER
+
+ var/list/smooth_queue = list()
+
+/datum/controller/subsystem/icon_smooth/fire()
+ while(smooth_queue.len)
+ var/atom/A = smooth_queue[smooth_queue.len]
+ smooth_queue.len--
+ smooth_icon(A)
+ if(MC_TICK_CHECK)
+ return
+ if(!smooth_queue.len)
+ can_fire = 0
+
+/datum/controller/subsystem/icon_smooth/Initialize()
+ smooth_zlevel(1,TRUE)
+ smooth_zlevel(2,TRUE)
+ var/queue = smooth_queue
+ smooth_queue = list()
+ for(var/V in queue)
+ var/atom/A = V
+ if(!A || A.z <= 2)
+ continue
+ smooth_icon(A)
+ CHECK_TICK
+
+ ..()
diff --git a/code/controllers/subsystem/timer.dm b/code/controllers/subsystem/timer.dm
index e2539ebdf06..4bbc44c218a 100644
--- a/code/controllers/subsystem/timer.dm
+++ b/code/controllers/subsystem/timer.dm
@@ -10,7 +10,7 @@ SUBSYSTEM_DEF(timer)
flags = SS_TICKER|SS_NO_INIT
- var/list/second_queue = list() //awe, yes, you've had first queue, but what about second queue? Contains: /datum/timedevent
+ var/list/second_queue = list() //awe, yes, you've had first queue, but what about second queue?
var/list/hashes = list()
var/head_offset = 0 //world.time of the first entry in the the bucket.
@@ -38,15 +38,15 @@ SUBSYSTEM_DEF(timer)
/datum/controller/subsystem/timer/fire(resumed = FALSE)
var/lit = last_invoke_tick
- var/last_check = world.time - TIMER_NO_INVOKE_WARNING
+ var/last_check = world.time - TICKS2DS(BUCKET_LEN*1.5)
var/list/bucket_list = src.bucket_list
if(!bucket_count)
last_invoke_tick = world.time
- if(lit && lit < last_check && last_invoke_warning < last_check)
+ if(lit && lit < last_check && head_offset < last_check && last_invoke_warning < last_check)
last_invoke_warning = world.time
- var/msg = "No regular timers processed in the last [TIMER_NO_INVOKE_WARNING] ticks[bucket_auto_reset ? ", resetting buckets" : ""]!"
+ var/msg = "No regular timers processed in the last [BUCKET_LEN*1.5] ticks[bucket_auto_reset ? ", resetting buckets" : ""]!"
message_admins(msg)
WARNING(msg)
if(bucket_auto_reset)
diff --git a/code/datums/spell.dm b/code/datums/spell.dm
index 1a78f8be2ca..653cc0020bc 100644
--- a/code/datums/spell.dm
+++ b/code/datums/spell.dm
@@ -261,9 +261,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
if(istype(target,/mob/living) && message)
to_chat(target, text("[message]"))
if(sparks_spread)
- var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread()
- sparks.set_up(sparks_amt, 0, location) //no idea what the 0 is
- sparks.start()
+ do_sparks(sparks_amt, 0, location)
if(smoke_spread)
if(smoke_spread == 1)
var/datum/effect_system/smoke_spread/smoke = new
@@ -328,10 +326,10 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
/obj/effect/proc_holder/spell/targeted/choose_targets(mob/user = usr)
var/list/targets = list()
-
+
switch(max_targets)
if(0) //unlimited
-
+
if(!humans_only)
for(var/mob/living/target in view_or_range(range, user, selection_type))
targets += target
@@ -344,7 +342,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
targets += user
else
var/possible_targets = list()
-
+
if(!humans_only)
for(var/mob/living/M in view_or_range(range, user, selection_type))
if(!include_user && user == M)
diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm
index ef439049611..766203f5330 100644
--- a/code/datums/uplink_item.dm
+++ b/code/datums/uplink_item.dm
@@ -220,7 +220,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
cost = 5
job = list("Chief Medical Officer", "Medical Doctor", "Geneticist", "Psychiatrist", "Chemist", "Paramedic", "Coroner", "Virologist")
-/datum/uplink_item/dangerous/cat_grenade
+/datum/uplink_item/jobspecific/cat_grenade
name = "Feral Cat Delivery Grenade"
desc = "The feral cat delivery grenade contains 8 dehydrated feral cats in a similar manner to dehydrated monkeys, which, upon detonation, will be rehydrated by a small reservoir of water contained within the grenade. These cats will then attack anything in sight."
item = /obj/item/grenade/spawnergrenade/feral_cats
@@ -960,6 +960,15 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
cost = 1
surplus = 20
+/datum/uplink_item/stealthy_tools/clownkit
+ name = "Honk Brand Infiltration Kit"
+ desc = "All the tools you need to play the best prank Nanotrasen has ever seen. Includes a voice changer clown mask, magnetic clown shoes, and standard clown outfit, tools, and backpack."
+ reference = "HBIK"
+ item = /obj/item/storage/backpack/clown/syndie
+ cost = 6
+ gamemodes = list(/datum/game_mode/nuclear)
+ surplus = 0
+
// DEVICE AND TOOLS
/datum/uplink_item/device_tools
diff --git a/code/defines/procs/admin.dm b/code/defines/procs/admin.dm
index d661e320dd8..b7036f9fbdc 100644
--- a/code/defines/procs/admin.dm
+++ b/code/defines/procs/admin.dm
@@ -46,7 +46,7 @@
. += "Administrator"
else
if(include_link && C)
- . += ""
+ . += ""
. += key
if(include_link)
@@ -68,8 +68,10 @@
return .
/proc/key_name_admin(whom)
- var/message = "[key_name(whom, 1)](?)[isAntag(whom) ? "(A)" : ""][isLivingSSD(whom) ? "(SSD!)" : ""] ([admin_jump_link(whom)])"
- return message
+ if(whom)
+ var/datum/whom_datum = whom //As long as it's not null, will be close enough/has the proc UID() that is all that's needed
+ var/message = "[key_name(whom, 1)]([ADMIN_QUE(whom_datum,"?")])[isAntag(whom) ? "(A)" : ""][isLivingSSD(whom) ? "(SSD!)" : ""] ([admin_jump_link(whom)])"
+ return message
/proc/key_name_mentor(whom)
// Same as key_name_admin, but does not include (?) or (A) for antags.
diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm
index fa6a1a93405..9993388afec 100644
--- a/code/game/gamemodes/changeling/powers/revive.dm
+++ b/code/game/gamemodes/changeling/powers/revive.dm
@@ -52,7 +52,8 @@
IO.rejuvenate()
IO.trace_chemicals.Cut()
H.remove_all_embedded_objects()
- user.updatehealth()
+ user.status_flags &= ~(FAKEDEATH)
+ user.updatehealth("revive sting")
user.update_blind_effects()
user.update_blurry_effects()
@@ -60,7 +61,6 @@
user.regenerate_icons()
- user.status_flags &= ~(FAKEDEATH)
user.update_revive() //Handle waking up the changeling after the regenerative stasis has completed.
user.mind.changeling.purchasedpowers -= src
user.med_hud_set_status()
diff --git a/code/game/gamemodes/cult/cult_comms.dm b/code/game/gamemodes/cult/cult_comms.dm
index 2a1d9166370..8bd5fc3cc4f 100644
--- a/code/game/gamemodes/cult/cult_comms.dm
+++ b/code/game/gamemodes/cult/cult_comms.dm
@@ -34,6 +34,6 @@
if(iscultist(M))
to_chat(M, my_message)
else if(M in GLOB.dead_mob_list)
- to_chat(M, " (F) [my_message] ")
+ to_chat(M, " (F) [my_message] ")
- log_say("(CULT) [message]", user)
\ No newline at end of file
+ log_say("(CULT) [message]", user)
diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
index 28f6fd4544a..05a29a5f3f4 100644
--- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
+++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm
@@ -561,9 +561,7 @@ Congratulations! You are now trained for invasive xenobiology research!"}
/obj/item/restraints/handcuffs/energy/used/dropped(mob/user)
user.visible_message("[user]'s [src] break in a discharge of energy!", \
"[user]'s [src] break in a discharge of energy!")
- var/datum/effect_system/spark_spread/S = new
- S.set_up(4,0,user.loc)
- S.start()
+ do_sparks(4, 0, user.loc)
. = ..()
/obj/item/abductor_baton/examine(mob/user)
diff --git a/code/game/gamemodes/miniantags/abduction/machinery/pad.dm b/code/game/gamemodes/miniantags/abduction/machinery/pad.dm
index ce30708a76f..f7ff2864608 100644
--- a/code/game/gamemodes/miniantags/abduction/machinery/pad.dm
+++ b/code/game/gamemodes/miniantags/abduction/machinery/pad.dm
@@ -46,7 +46,5 @@
duration = 80
/obj/effect/temp_visual/teleport_abductor/New()
- var/datum/effect_system/spark_spread/S = new
- S.set_up(10,0,loc)
- S.start()
+ do_sparks(10, 0, loc)
..()
\ No newline at end of file
diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm
index 5543a54caa6..6cdfdc736d9 100644
--- a/code/game/gamemodes/miniantags/borer/borer.dm
+++ b/code/game/gamemodes/miniantags/borer/borer.dm
@@ -91,6 +91,7 @@
)
var/talk_inside_host = FALSE // So that borers don't accidentally give themselves away on a botched message
var/used_dominate
+ var/attempting_to_dominate = FALSE // To prevent people from spam opening the Dominate Victim input
var/chemicals = 10 // Chemicals used for reproduction and chemical injection.
var/max_chems = 250
var/mob/living/carbon/human/host // Human host for the brain worm.
@@ -325,6 +326,9 @@
to_chat(src, "You cannot infest someone who is already infested!")
return
+ if(incapacitated())
+ return
+
to_chat(src, "You slither up [M] and begin probing at [M.p_their()] ear canal...")
if(!do_after(src, 50, target = M))
@@ -471,7 +475,7 @@
set category = "Borer"
set name = "Dominate Victim"
set desc = "Freeze the limbs of a potential host with supernatural fear."
-
+
if(world.time - used_dominate < 150)
to_chat(src, "You cannot use that ability again so soon.")
return
@@ -483,23 +487,43 @@
if(stat)
to_chat(src, "You cannot do that in your current state.")
return
-
+
+ if(attempting_to_dominate)
+ to_chat(src, "You're already targeting someone!")
+ return
+
var/list/choices = list()
for(var/mob/living/carbon/C in view(3,src))
if(C.stat != DEAD)
choices += C
-
+
if(world.time - used_dominate < 300)
to_chat(src, "You cannot use that ability again so soon.")
return
-
+
+ attempting_to_dominate = TRUE
+
var/mob/living/carbon/M = input(src,"Who do you wish to dominate?") in null|choices
- if(!M || !src)
+ if(!M)
+ attempting_to_dominate = FALSE
+ return
+
+ if(!src) //different statement to avoid a runtime since if the source is deleted then attempting_to_dominate would also be deleted
return
if(M.has_brain_worms())
to_chat(src, "You cannot dominate someone who is already infested!")
+ attempting_to_dominate = FALSE
+ return
+
+ if(incapacitated())
+ attempting_to_dominate = FALSE
+ return
+
+ if(get_dist(src, M) > 7) //to avoid people remotely doing from across the map etc, 7 is the default view range
+ to_chat(src, "You're too far away!")
+ attempting_to_dominate = FALSE
return
to_chat(src, "You focus your psychic lance on [M] and freeze [M.p_their()] limbs with a wave of terrible dread.")
@@ -507,6 +531,7 @@
M.Weaken(3)
used_dominate = world.time
+ attempting_to_dominate = FALSE
/mob/living/simple_animal/borer/verb/release_host()
set category = "Borer"
diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm
index fed089ee979..bd08ff210d5 100644
--- a/code/game/gamemodes/miniantags/guardian/guardian.dm
+++ b/code/game/gamemodes/miniantags/guardian/guardian.dm
@@ -251,6 +251,12 @@
var/ling_failure = "The deck refuses to respond to a souless creature such as you."
var/list/possible_guardians = list("Chaos", "Standard", "Ranged", "Support", "Explosive", "Assassin", "Lightning", "Charger", "Protector")
var/random = TRUE
+ var/color_list = list("Pink" = "#FFC0CB",
+ "Red" = "#FF0000",
+ "Orange" = "#FFA500",
+ "Green" = "#008000",
+ "Blue" = "#0000FF")
+ var/name_list = list("Aries", "Leo", "Sagittarius", "Taurus", "Virgo", "Capricorn", "Gemini", "Libra", "Aquarius", "Cancer", "Scorpio", "Pisces")
/obj/item/guardiancreator/attack_self(mob/living/user)
for(var/mob/living/simple_animal/hostile/guardian/G in GLOB.living_mob_list)
@@ -275,15 +281,19 @@
to_chat(user, "[failure_message]")
used = FALSE
+/obj/item/guardiancreator/examine(mob/user, distance)
+ . = ..()
+ if(used)
+ to_chat(user, "[used_message]")
-/obj/item/guardiancreator/proc/spawn_guardian(var/mob/living/user, var/key)
- var/gaurdiantype = "Standard"
+/obj/item/guardiancreator/proc/spawn_guardian(mob/living/user, key)
+ var/guardian_type = "Standard"
if(random)
- gaurdiantype = pick(possible_guardians)
+ guardian_type = pick(possible_guardians)
else
- gaurdiantype = input(user, "Pick the type of [mob_name]", "[mob_name] Creation") as null|anything in possible_guardians
+ guardian_type = input(user, "Pick the type of [mob_name]", "[mob_name] Creation") as null|anything in possible_guardians
var/pickedtype = /mob/living/simple_animal/hostile/guardian/punch
- switch(gaurdiantype)
+ switch(guardian_type)
if("Chaos")
pickedtype = /mob/living/simple_animal/hostile/guardian/fire
@@ -325,84 +335,19 @@
user.verbs += /mob/living/proc/guardian_recall
user.verbs += /mob/living/proc/guardian_reset
- var/color
-
- //names and their RGB
- var/magic_list = list("Pink" = "#FFC0CB", \
- "Red" = "#FF0000", \
- "Orange" = "#FFA500", \
- "Green" = "#008000", \
- "Blue" = "#0000FF")
-
- var/tech_list = list("Rose" = "#F62C6B", \
- "Peony" = "#E54750", \
- "Lily" = "#F6562C", \
- "Daisy" = "#ECCD39", \
- "Zinnia" = "#89F62C", \
- "Ivy" = "#5DF62C", \
- "Iris" = "#2CF6B8", \
- "Petunia" = "#51A9D4", \
- "Violet" = "#8A347C", \
- "Lilac" = "#C7A0F6", \
- "Orchid" = "#F62CF5")
-
- var/bio_list = list("Rose" = "#F62C6B", \
- "Peony" = "#E54750", \
- "Lily" = "#F6562C", \
- "Daisy" = "#ECCD39", \
- "Zinnia" = "#89F62C", \
- "Ivy" = "#5DF62C", \
- "Iris" = "#2CF6B8", \
- "Petunia" = "#51A9D4", \
- "Violet" = "#8A347C", \
- "Lilac" = "#C7A0F6", \
- "Orchid" = "#F62CF5")
-
- var/picked_name
-// var/picked_color = pick("#FFFFFF","#000000","#808080","#A52A2A","#FF0000","#8B0000","#DC143C","#FFA500","#FFFF00","#008000","#00FF00","#006400","#00FFFF","#0000FF","#000080","#008080","#800080","#4B0082")
-
- switch(theme)
- if("magic")
- color = pick(magic_list)
- G.name_color = magic_list[color]
- picked_name = pick("Aries", "Leo", "Sagittarius", "Taurus", "Virgo", "Capricorn", "Gemini", "Libra", "Aquarius", "Cancer", "Scorpio", "Pisces")
-
- G.name = "[picked_name] [color]"
- G.real_name = "[picked_name] [color]"
- G.icon_living = "[theme][color]"
- G.icon_state = "[theme][color]"
- G.icon_dead = "[theme][color]"
-
- to_chat(user, "[G.magic_fluff_string].")
- if("tech")
- color = pick(tech_list) //technically not colors, just flowers that can be specific colors
- G.name_color = tech_list[color]
- picked_name = pick("Gallium", "Indium", "Thallium", "Bismuth", "Aluminium", "Mercury", "Iron", "Silver", "Zinc", "Titanium", "Chromium", "Nickel", "Platinum", "Tellurium", "Palladium", "Rhodium", "Cobalt", "Osmium", "Tungsten", "Iridium")
-
- G.name = "[picked_name] [color]"
- G.real_name = "[picked_name] [color]"
- G.icon_living = "[theme][color]"
- G.icon_state = "[theme][color]"
- G.icon_dead = "[theme][color]"
-
- to_chat(user, "[G.tech_fluff_string].")
- G.speak_emote = list("states")
- if("bio")
- color = pick(bio_list) //technically not colors, just using the same flowers as tech currerntly
- G.name_color = tech_list[color]
- picked_name = pick("brood", "hive", "nest")
- to_chat(user, "[G.bio_fluff_string].")
-
- G.name = "[color] [picked_name]"
- G.real_name = "[color] [picked_name]"
- G.icon_living = "[theme][color]"
- G.icon_state = "[theme][color]"
- G.icon_dead = "[theme][color]"
-
- to_chat(user, "[G.bio_fluff_string].")
- G.attacktext = "swarms"
- G.speak_emote = list("chitters")
+ var/color = pick(color_list)
+ G.name_color = color_list[color]
+ var/picked_name = pick(name_list)
+ create_theme(G, user, picked_name, color)
+/obj/item/guardiancreator/proc/create_theme(mob/living/simple_animal/hostile/guardian/G, mob/living/user, picked_name, color)
+ G.name = "[picked_name] [color]"
+ G.real_name = "[picked_name] [color]"
+ G.icon_living = "[theme][color]"
+ G.icon_state = "[theme][color]"
+ G.icon_dead = "[theme][color]"
+ to_chat(user, "[G.magic_fluff_string].")
+
/obj/item/guardiancreator/choose
random = FALSE
@@ -417,6 +362,27 @@
used_message = "The injector has already been used."
failure_message = "...ERROR. BOOT SEQUENCE ABORTED. AI FAILED TO INTIALIZE. PLEASE CONTACT SUPPORT OR TRY AGAIN LATER."
ling_failure = "The holoparasites recoil in horror. They want nothing to do with a creature like you."
+ color_list = list("Rose" = "#F62C6B",
+ "Peony" = "#E54750",
+ "Lily" = "#F6562C",
+ "Daisy" = "#ECCD39",
+ "Zinnia" = "#89F62C",
+ "Ivy" = "#5DF62C",
+ "Iris" = "#2CF6B8",
+ "Petunia" = "#51A9D4",
+ "Violet" = "#8A347C",
+ "Lilac" = "#C7A0F6",
+ "Orchid" = "#F62CF5")
+ name_list = list("Gallium", "Indium", "Thallium", "Bismuth", "Aluminium", "Mercury", "Iron", "Silver", "Zinc", "Titanium", "Chromium", "Nickel", "Platinum", "Tellurium", "Palladium", "Rhodium", "Cobalt", "Osmium", "Tungsten", "Iridium")
+
+/obj/item/guardiancreator/tech/create_theme(mob/living/simple_animal/hostile/guardian/G, mob/living/user, picked_name, color)
+ G.name = "[picked_name] [color]"
+ G.real_name = "[picked_name] [color]"
+ G.icon_living = "[theme][color]"
+ G.icon_state = "[theme][color]"
+ G.icon_dead = "[theme][color]"
+ to_chat(user, "[G.tech_fluff_string].")
+ G.speak_emote = list("states")
/obj/item/guardiancreator/tech/check_uplink_validity()
return !used
@@ -434,6 +400,28 @@
use_message = "The eggs begin to twitch..."
used_message = "The cluster already hatched."
failure_message = "...but soon settles again. Guess they weren't ready to hatch after all."
+ color_list = list("Rose" = "#F62C6B",
+ "Peony" = "#E54750",
+ "Lily" = "#F6562C",
+ "Daisy" = "#ECCD39",
+ "Zinnia" = "#89F62C",
+ "Ivy" = "#5DF62C",
+ "Iris" = "#2CF6B8",
+ "Petunia" = "#51A9D4",
+ "Violet" = "#8A347C",
+ "Lilac" = "#C7A0F6",
+ "Orchid" = "#F62CF5")
+ name_list = list("brood", "hive", "nest")
+
+/obj/item/guardiancreator/biological/create_theme(mob/living/simple_animal/hostile/guardian/G, mob/living/user, picked_name, color)
+ G.name = "[color] [picked_name]"
+ G.real_name = "[color] [picked_name]"
+ G.icon_living = "[theme][color]"
+ G.icon_state = "[theme][color]"
+ G.icon_dead = "[theme][color]"
+ to_chat(user, "[G.bio_fluff_string].")
+ G.attacktext = "swarms"
+ G.speak_emote = list("chitters")
/obj/item/guardiancreator/biological/choose
random = FALSE
diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm
index d75a1bd6d52..afae458a58d 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant.dm
@@ -102,7 +102,7 @@
if(istype(M, /mob/living/simple_animal/revenant))
to_chat(M, rendered)
if(isobserver(M))
- to_chat(M, "(F) [rendered]")
+ to_chat(M, "(F) [rendered]")
return
/mob/living/simple_animal/revenant/Stat()
diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
index 5a7825c0cfe..c201b1bc45d 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm
@@ -209,9 +209,7 @@
if(!L.on)
return
L.visible_message("\The [L] suddenly flares brightly and begins to spark!")
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread/
- s.set_up(4, 0, L)
- s.start()
+ do_sparks(4, 0, L)
new/obj/effect/temp_visual/revenant(L.loc)
sleep(20)
if(!L.on) //wait, wait, don't shock me
@@ -222,9 +220,7 @@
return
M.Beam(L,icon_state="purple_lightning",icon='icons/effects/effects.dmi',time=5)
M.electrocute_act(shock_damage, "[L.name]", safety=1)
- var/datum/effect_system/spark_spread/z = new /datum/effect_system/spark_spread/
- z.set_up(4, 0, M)
- z.start()
+ do_sparks(4, 0, M)
playsound(M, 'sound/machines/defib_zap.ogg', 50, 1, -1)
//Defile: Corrupts nearby stuff, unblesses floor tiles.
diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm
index 257126e8586..11baf813890 100644
--- a/code/game/gamemodes/revolution/revolution.dm
+++ b/code/game/gamemodes/revolution/revolution.dm
@@ -267,7 +267,7 @@
if(beingborged)
to_chat(rev_mind.current, "The frame's firmware detects and deletes your neural reprogramming! You remember nothing[remove_head ? "." : " but the name of the one who flashed you."]")
- message_admins("[key_name_admin(rev_mind.current)] ? (FLW) has been borged while being a [remove_head ? "leader" : " member"] of the revolution.")
+ message_admins("[key_name_admin(rev_mind.current)] [ADMIN_QUE(rev_mind.current,"?")] ([ADMIN_FLW(rev_mind.current,"FLW")]) has been borged while being a [remove_head ? "leader" : " member"] of the revolution.")
else
rev_mind.current.Paralyse(5)
diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm
index 63e37911224..d2c3cc2c72e 100644
--- a/code/game/gamemodes/shadowling/shadowling_abilities.dm
+++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm
@@ -540,9 +540,7 @@
to_chat(S, "ERROR $!(@ ERROR )#^! SENSORY OVERLOAD \[$(!@#")
S << 'sound/misc/interference.ogg'
playsound(S, 'sound/machines/warning-buzzer.ogg', 50, 1)
- var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread
- sp.set_up(5, 1, S)
- sp.start()
+ do_sparks(5, 1, S)
S.Weaken(6)
for(var/obj/structure/window/W in T.contents)
W.take_damage(rand(80, 100))
diff --git a/code/game/gamemodes/wizard/godhand.dm b/code/game/gamemodes/wizard/godhand.dm
index 260f809334c..c6992f99b98 100644
--- a/code/game/gamemodes/wizard/godhand.dm
+++ b/code/game/gamemodes/wizard/godhand.dm
@@ -48,9 +48,7 @@
if(!proximity || target == user || !ismob(target) || !iscarbon(user) || user.lying || user.handcuffed) //exploding after touching yourself would be bad
return
var/mob/M = target
- var/datum/effect_system/spark_spread/sparks = new
- sparks.set_up(4, 0, M.loc) //no idea what the 0 is
- sparks.start()
+ do_sparks(4, 0, M.loc) //no idea what the 0 is
M.gib()
..()
@@ -84,9 +82,7 @@
/obj/item/melee/touch_attack/fake_disintegrate/afterattack(atom/target, mob/living/carbon/user, proximity)
if(!proximity || target == user || !ismob(target) || !iscarbon(user) || user.lying || user.handcuffed) //not exploding after touching yourself would be bad
return
- var/datum/effect_system/spark_spread/sparks = new
- sparks.set_up(4, 0, target.loc) //no idea what the 0 is
- sparks.start()
+ do_sparks(4, 0, target.loc)
playsound(target.loc, 'sound/goonstation/effects/gib.ogg', 50, 1)
..()
diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm
index 418539b5bed..494da86d680 100644
--- a/code/game/jobs/job/job.dm
+++ b/code/game/jobs/job/job.dm
@@ -215,7 +215,7 @@
if(isturf(placed_in))
to_chat(H, "Placing [G.display_name] on [placed_in]!")
else
- to_chat(H, "Placing [G.display_name] in [placed_in.name]")
+ to_chat(H, "Placing [G.display_name] in [placed_in.name].")
continue
if(H.equip_to_appropriate_slot(G))
to_chat(H, "Placing [G.display_name] in your inventory!")
diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm
index 5d5e6bd9511..604ac3f02f3 100644
--- a/code/game/machinery/computer/HolodeckControl.dm
+++ b/code/game/machinery/computer/HolodeckControl.dm
@@ -217,9 +217,7 @@
for(var/turf/T in linkedholodeck)
if(prob(30))
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(2, 1, T)
- s.start()
+ do_sparks(2, 1, T)
T.ex_act(3)
T.hotspot_expose(1000,500,1)
@@ -257,9 +255,7 @@
if(L.name=="Atmospheric Test Start")
spawn(20)
var/turf/T = get_turf(L)
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(2, 1, T)
- s.start()
+ do_sparks(2, 1, T)
if(T)
T.temperature = 5000
T.hotspot_expose(50000,50000,1)*/
@@ -306,9 +302,7 @@
/* if(L.name=="Atmospheric Test Start")
spawn(20)
var/turf/T = get_turf(L)
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(2, 1, T)
- s.start()
+ do_sparks(2, 1, T)
if(T)
T.temperature = 5000
T.hotspot_expose(50000,50000,1)*/
diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm
index 4f2d3801526..9d7310c1c66 100644
--- a/code/game/machinery/computer/communications.dm
+++ b/code/game/machinery/computer/communications.dm
@@ -502,11 +502,11 @@
if(SSshuttle.cancelEvac(user))
log_game("[key_name(user)] has recalled the shuttle.")
- message_admins("[key_name_admin(user)] has recalled the shuttle - [ADMIN_FLW(user)].", 1)
+ message_admins("[key_name_admin(user)] has recalled the shuttle - ([ADMIN_FLW(user,"FLW")]).", 1)
else
to_chat(user, "Central Command has refused the recall request!")
log_game("[key_name(user)] has tried and failed to recall the shuttle.")
- message_admins("[key_name_admin(user)] has tried and failed to recall the shuttle - [ADMIN_FLW(user)].", 1)
+ message_admins("[key_name_admin(user)] has tried and failed to recall the shuttle - ([ADMIN_FLW(user,"FLW")]).", 1)
/proc/post_status(command, data1, data2, mob/user = null)
diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm
index bcbe7a07e5d..87d35c2d7b4 100644
--- a/code/game/machinery/computer/message.dm
+++ b/code/game/machinery/computer/message.dm
@@ -14,8 +14,6 @@
circuit = /obj/item/circuitboard/message_monitor
//Server linked to.
var/obj/machinery/message_server/linkedServer = null
- //Sparks effect - For emag
- var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread
//Messages - Saves me time if I want to change something.
var/noserver = "ALERT: No server detected."
var/incorrectkey = "ALERT: Incorrect decryption key!"
@@ -56,8 +54,7 @@
icon_screen = hack_icon // An error screen I made in the computers.dmi
emag = 1
screen = 2
- spark_system.set_up(5, 0, src)
- src.spark_system.start()
+ do_sparks(5, 0, src)
var/obj/item/paper/monitorkey/MK = new/obj/item/paper/monitorkey
MK.loc = src.loc
playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1)
diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm
index 62bb8f75873..4c75e5dca8a 100644
--- a/code/game/machinery/cryo.dm
+++ b/code/game/machinery/cryo.dm
@@ -1,5 +1,6 @@
/obj/machinery/atmospherics/unary/cryo_cell
name = "cryo cell"
+ desc = "Lowers the body temperature so certain medications may take effect."
icon = 'icons/obj/cryogenics.dmi'
icon_state = "pod0"
density = 1
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index af63a92e2ff..b6a02aacfd0 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -149,9 +149,7 @@
playsound(src, 'sound/machines/buzz-sigh.ogg', 30, 1)
return
visible_message("The console sparks, and some items fall out!")
- var/datum/effect_system/spark_spread/sparks = new
- sparks.set_up(5, 1, src)
- sparks.start()
+ do_sparks(5, 1, src)
for(var/obj/item/I in objective_items)
dispense_item(I)
diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm
index 8c47855731f..a3ad1bae19f 100644
--- a/code/game/machinery/deployable.dm
+++ b/code/game/machinery/deployable.dm
@@ -188,9 +188,7 @@ for reference:
to_chat(user, "Barrier lock toggled off.")
return
else
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(2, 1, src)
- s.start()
+ do_sparks(2, 1, src)
visible_message("BZZzZZzZZzZT")
return
return
@@ -223,16 +221,12 @@ for reference:
emagged = 1
req_access = null
to_chat(user, "You break the ID authentication lock on the [src].")
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(2, 1, src)
- s.start()
+ do_sparks(2, 1, src)
visible_message("BZZzZZzZZzZT")
else if(src.emagged == 1)
src.emagged = 2
to_chat(user, "You short out the anchoring mechanism on the [src].")
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(2, 1, src)
- s.start()
+ do_sparks(2, 1, src)
visible_message("BZZzZZzZZzZT")
ex_act(severity)
@@ -275,9 +269,7 @@ for reference:
/* var/obj/item/stack/rods/ =*/
new /obj/item/stack/rods(Tsec)
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(3, 1, src)
- s.start()
+ do_sparks(3, 1, src)
explosion(src.loc,-1,-1,0)
if(src)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 0fd3d27d3d4..8d9b17ef7c2 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -627,9 +627,7 @@ About the new airlock wires panel:
if(isElectrified() && density && istype(mover, /obj/item))
var/obj/item/I = mover
if(I.flags & CONDUCT)
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(5, 1, src)
- s.start()
+ do_sparks(5, 1, src)
return ..()
/obj/machinery/door/airlock/attack_hand(mob/user)
@@ -1024,7 +1022,7 @@ About the new airlock wires panel:
else if(locked)
to_chat(user, "The airlock's bolts prevent it from being forced!")
else if(!welded && !operating)
- if(!beingcrowbarred) //being fireaxe'd
+ if(istype(I, /obj/item/twohanded/fireaxe)) //let's make this more specific
var/obj/item/twohanded/fireaxe/F = I
if(F.wielded)
spawn(0)
@@ -1041,7 +1039,7 @@ About the new airlock wires panel:
else
close(1)
- if(istype(I, /obj/item/crowbar/power))
+ if(ispowertool(I)) //jaws of life and rescue claw
if(isElectrified())
shock(user, 100)//it's like sticking a forck in a power socket
return
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 706b1a82ce0..6f838319040 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -76,8 +76,7 @@
if(autoclose_timer)
deltimer(autoclose_timer)
autoclose_timer = 0
- if(spark_system)
- QDEL_NULL(spark_system)
+ QDEL_NULL(spark_system)
return ..()
/obj/machinery/door/Bumped(atom/AM)
diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm
index 013be887cce..e9836eb0ca6 100644
--- a/code/game/machinery/floodlight.dm
+++ b/code/game/machinery/floodlight.dm
@@ -15,7 +15,7 @@
/obj/machinery/floodlight/Initialize()
. = ..()
- src.cell = new(src)
+ cell = new(src)
mapVarInit()
/obj/machinery/floodlight/Destroy()
@@ -26,13 +26,18 @@
icon_state = "flood[open ? "o" : ""][open && cell ? "b" : ""]0[on]"
/obj/machinery/floodlight/process()
+ if(!cell && on)
+ on = FALSE
+ visible_message("[src] shuts down due to lack of power!")
+ update_icon()
+ set_light(0)
if(on)
cell.charge -= use
if(cell.charge <= 0)
on = FALSE
updateicon()
set_light(0)
- src.visible_message("[src] shuts down due to lack of power!")
+ visible_message("[src] shuts down due to lack of power!")
/obj/machinery/floodlight/attack_ai()
return
@@ -48,8 +53,12 @@
cell.add_fingerprint(user)
cell.update_icon()
- src.cell = null
+ cell = null
to_chat(user, "You remove the power cell.")
+ if(on)
+ on = FALSE
+ visible_message("[src] shuts down due to lack of power!")
+ set_light(0)
updateicon()
return
@@ -80,14 +89,14 @@
/obj/machinery/floodlight/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/wrench))
if(!anchored && !isinspace())
- playsound(src.loc, W.usesound, 50, 1)
+ playsound(loc, W.usesound, 50, 1)
user.visible_message( \
"[user] tightens \the [src]'s casters.", \
" You have tightened \the [src]'s casters.", \
"You hear ratchet.")
anchored = TRUE
else if(anchored)
- playsound(src.loc, W.usesound, 50, 1)
+ playsound(loc, W.usesound, 50, 1)
user.visible_message( \
"[user] loosens \the [src]'s casters.", \
" You have loosened \the [src]'s casters.", \
diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm
index 87ec7974711..3c36edb1685 100755
--- a/code/game/machinery/igniter.dm
+++ b/code/game/machinery/igniter.dm
@@ -101,9 +101,7 @@
flick("[base_state]-spark", src)
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(2, 1, src)
- s.start()
+ do_sparks(2, 1, src)
src.last_spark = world.time
use_power(1000)
var/turf/location = src.loc
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index 1d33a1ae795..d0abd774e6f 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -391,6 +391,9 @@ Class Procs:
return ..()
+/obj/machinery/proc/is_operational()
+ return !(stat & (NOPOWER|BROKEN|MAINT))
+
/obj/machinery/CheckParts(list/parts_list)
..()
RefreshParts()
@@ -587,9 +590,7 @@ Class Procs:
return 0
if((TK in user.mutations) && !Adjacent(user))
return 0
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(5, 1, src)
- s.start()
+ do_sparks(5, 1, src)
if(electrocute_mob(user, get_area(src), src, 0.7))
if(user.stunned)
return 1
diff --git a/code/game/machinery/quantum_pad.dm b/code/game/machinery/quantum_pad.dm
index b58e9d12c84..e5a43c523f5 100644
--- a/code/game/machinery/quantum_pad.dm
+++ b/code/game/machinery/quantum_pad.dm
@@ -94,9 +94,7 @@
doteleport(user)
/obj/machinery/quantumpad/proc/sparks()
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(5, 1, get_turf(src))
- s.start()
+ do_sparks(5, 1, get_turf(src))
/obj/machinery/quantumpad/attack_ghost(mob/dead/observer/ghost)
if(linked_pad)
diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm
index f0e23d6c7d4..1532eeaccbd 100644
--- a/code/game/machinery/rechargestation.dm
+++ b/code/game/machinery/rechargestation.dm
@@ -220,6 +220,14 @@
var/i = 1
for(1, i <= coeff, i++)
LR.Charge(occupant)
+ //Fire extinguisher
+ if(istype(O, /obj/item/extinguisher))
+ var/obj/item/extinguisher/ext = O
+ ext.reagents.check_and_add("water", ext.max_water, 5 * coeff)
+ //Welding tools
+ if(istype(O, /obj/item/weldingtool))
+ var/obj/item/weldingtool/weld = O
+ weld.reagents.check_and_add("fuel", weld.max_fuel, 2 * coeff)
if(R)
if(R.module)
R.module.respawn_consumable(R)
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index 370cef73559..2d395da0dd0 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -1,128 +1,353 @@
-//////////////////////////////////////
// SUIT STORAGE UNIT /////////////////
-//////////////////////////////////////
-
-
/obj/machinery/suit_storage_unit
- name = "Suit Storage Unit"
+ name = "suit storage unit"
desc = "An industrial U-Stor-It Storage unit designed to accomodate all kinds of space suits. Its on-board equipment also allows the user to decontaminate the contents through a UV-ray purging cycle. There's a warning label dangling from the control pad, reading \"STRICTLY NO BIOLOGICALS IN THE CONFINES OF THE UNIT\"."
- icon = 'icons/obj/suitstorage.dmi'
- icon_state = "suitstorage000000100" //order is: [has helmet][has suit][has human][is open][is locked][is UV cycling][is powered][is dirty/broken] [is superUVcycling]
- anchored = 1
- density = 1
- var/mob/living/carbon/human/OCCUPANT = null
- var/obj/item/clothing/suit/space/SUIT = null
- var/SUIT_TYPE = null
- var/obj/item/clothing/head/helmet/space/HELMET = null
- var/HELMET_TYPE = null
- var/obj/item/clothing/mask/MASK = null //All the stuff that's gonna be stored insiiiiiiiiiiiiiiiiiiide, nyoro~n
- var/MASK_TYPE = null //Erro's idea on standarising SSUs whle keeping creation of other SSU types easy: Make a child SSU, name it something then set the TYPE vars to your desired suit output. New() should take it from there by itself.
- var/isopen = 0
- var/islocked = 0
- var/isUV = 0
- var/ispowered = 1 //starts powered
- var/isbroken = 0
- var/issuperUV = 0
- var/panelopen = 0
- var/safetieson = 1
- var/cycletime_left = 0
+ icon = 'icons/obj/machines/suit_storage.dmi'
+ icon_state = "close"
+ anchored = TRUE
+ density = TRUE
+ max_integrity = 250
+ var/obj/item/clothing/suit/space/suit = null
+ var/obj/item/clothing/head/helmet/space/helmet = null
+ var/obj/item/clothing/mask/mask = null
+ var/obj/item/storage = null
+
+ var/helmet_type = null
+ var/suit_type = null
+ var/mask_type = null
+ var/storage_type = null
+
+ var/locked = FALSE
+ var/safeties = TRUE
+ var/broken = FALSE
+
+ var/uv = FALSE
+ var/uv_super = FALSE
+ var/uv_cycles = 6
+ var/message_cooldown
+ var/breakout_time = 300
+
+ //abstract these onto machinery eventually
+ var/state_open = FALSE
+ var/list/occupant_typecache //if set, turned into typecache in Initialize, other wise, defaults to mob/living typecache
+ var/atom/movable/occupant = null
-//The units themselves/////////////////
/obj/machinery/suit_storage_unit/standard_unit
- SUIT_TYPE = /obj/item/clothing/suit/space/eva
- HELMET_TYPE = /obj/item/clothing/head/helmet/space/eva
- MASK_TYPE = /obj/item/clothing/mask/breath
+ suit_type = /obj/item/clothing/suit/space/eva
+ helmet_type = /obj/item/clothing/head/helmet/space/eva
+ mask_type = /obj/item/clothing/mask/breath
/obj/machinery/suit_storage_unit/captain
- SUIT_TYPE = /obj/item/clothing/suit/space/captain
- HELMET_TYPE = /obj/item/clothing/head/helmet/space/capspace
- MASK_TYPE = /obj/item/clothing/mask/gas
+ suit_type = /obj/item/clothing/suit/space/captain
+ helmet_type = /obj/item/clothing/head/helmet/space/capspace
+ mask_type = /obj/item/clothing/mask/gas
+ storage_type = /obj/item/tank/jetpack/oxygen/captain
/obj/machinery/suit_storage_unit/engine
- SUIT_TYPE = /obj/item/clothing/suit/space/hardsuit/engineering
- HELMET_TYPE = /obj/item/clothing/head/helmet/space/hardsuit/engineering
- MASK_TYPE = /obj/item/clothing/mask/breath
+ suit_type = /obj/item/clothing/suit/space/hardsuit/engineering
+ helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/engineering
+ mask_type = /obj/item/clothing/mask/breath
+ storage_type = /obj/item/clothing/shoes/magboots
/obj/machinery/suit_storage_unit/ce
- SUIT_TYPE = /obj/item/clothing/suit/space/hardsuit/elite
- HELMET_TYPE = /obj/item/clothing/head/helmet/space/hardsuit/elite
- MASK_TYPE = /obj/item/clothing/mask/breath
+ suit_type = /obj/item/clothing/suit/space/hardsuit/elite
+ helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/elite
+ mask_type = /obj/item/clothing/mask/gas
+ storage_type = /obj/item/clothing/shoes/magboots/advance
/obj/machinery/suit_storage_unit/security
- SUIT_TYPE = /obj/item/clothing/suit/space/hardsuit/security
- HELMET_TYPE = /obj/item/clothing/head/helmet/space/hardsuit/security
- MASK_TYPE = /obj/item/clothing/mask/gas/sechailer
+ suit_type = /obj/item/clothing/suit/space/hardsuit/security
+ helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/security
+ mask_type = /obj/item/clothing/mask/gas/sechailer
/obj/machinery/suit_storage_unit/atmos
- SUIT_TYPE = /obj/item/clothing/suit/space/hardsuit/atmos
- HELMET_TYPE = /obj/item/clothing/head/helmet/space/hardsuit/atmos
- MASK_TYPE = /obj/item/clothing/mask/gas
+ suit_type = /obj/item/clothing/suit/space/hardsuit/atmos
+ helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/atmos
+ mask_type = /obj/item/clothing/mask/gas
+ storage_type = /obj/item/clothing/shoes/magboots
/obj/machinery/suit_storage_unit/mining
- SUIT_TYPE = /obj/item/clothing/suit/space/hardsuit/mining
- HELMET_TYPE = /obj/item/clothing/head/helmet/space/hardsuit/mining
- MASK_TYPE = /obj/item/clothing/mask/breath
+ suit_type = /obj/item/clothing/suit/space/hardsuit/mining
+ helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/mining
+ mask_type = /obj/item/clothing/mask/breath
/obj/machinery/suit_storage_unit/cmo
- SUIT_TYPE = /obj/item/clothing/suit/space/hardsuit/medical
- HELMET_TYPE = /obj/item/clothing/head/helmet/space/hardsuit/medical
- MASK_TYPE = /obj/item/clothing/mask/breath
+ suit_type = /obj/item/clothing/suit/space/hardsuit/medical
+ helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/medical
+ mask_type = /obj/item/clothing/mask/breath
-/obj/machinery/suit_storage_unit/New()
- src.update_icon()
- if(SUIT_TYPE)
- SUIT = new SUIT_TYPE(src)
- if(HELMET_TYPE)
- HELMET = new HELMET_TYPE(src)
- if(MASK_TYPE)
- MASK = new MASK_TYPE(src)
+/obj/machinery/suit_storage_unit/syndicate
+ suit_type = /obj/item/clothing/suit/space/hardsuit/syndi
+ helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/syndi
+ mask_type = /obj/item/clothing/mask/gas/syndicate
+ storage_type = /obj/item/tank/jetpack/oxygen/harness
+
+/obj/machinery/suit_storage_unit/ert/command
+ suit_type = /obj/item/clothing/suit/space/hardsuit/ert/commander
+ helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/ert/commander
+ mask_type = /obj/item/clothing/mask/breath
+ storage_type = /obj/item/tank/emergency_oxygen/double
+
+/obj/machinery/suit_storage_unit/ert/security
+ suit_type = /obj/item/clothing/suit/space/hardsuit/ert/security
+ helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/ert/security
+ mask_type = /obj/item/clothing/mask/breath
+ storage_type = /obj/item/tank/emergency_oxygen/double
+
+/obj/machinery/suit_storage_unit/ert/engineer
+ suit_type = /obj/item/clothing/suit/space/hardsuit/ert/engineer
+ helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/ert/engineer
+ mask_type = /obj/item/clothing/mask/breath
+ storage_type = /obj/item/tank/emergency_oxygen/double
+
+/obj/machinery/suit_storage_unit/ert/medical
+ suit_type = /obj/item/clothing/suit/space/hardsuit/ert/medical
+ helmet_type = /obj/item/clothing/head/helmet/space/hardsuit/ert/medical
+ mask_type = /obj/item/clothing/mask/breath
+ storage_type = /obj/item/tank/emergency_oxygen/double
+
+
+
+/obj/machinery/suit_storage_unit/Initialize()
+ . = ..()
+ if(suit_type)
+ suit = new suit_type(src)
+ if(helmet_type)
+ helmet = new helmet_type(src)
+ if(mask_type)
+ mask = new mask_type(src)
+ if(storage_type)
+ storage = new storage_type(src)
+ update_icon()
+
+ //move this into machinery eventually...
+ if(occupant_typecache)
+ occupant_typecache = typecacheof(occupant_typecache)
+
+/obj/machinery/suit_storage_unit/Destroy()
+ QDEL_NULL(suit)
+ QDEL_NULL(helmet)
+ QDEL_NULL(mask)
+ QDEL_NULL(storage)
+ return ..()
/obj/machinery/suit_storage_unit/update_icon()
- var/hashelmet = 0
- var/hassuit = 0
- var/hashuman = 0
- if(HELMET)
- hashelmet = 1
- if(SUIT)
- hassuit = 1
- if(OCCUPANT)
- hashuman = 1
- icon_state = text("suitstorage[][][][][][][][][]",hashelmet,hassuit,hashuman,src.isopen,src.islocked,src.isUV,src.ispowered,src.isbroken,src.issuperUV)
+ cut_overlays()
+ if(uv)
+ if(uv_super)
+ add_overlay("super")
+ else if(occupant)
+ add_overlay("uvhuman")
+ else
+ add_overlay("uv")
+ else if(state_open)
+ if(stat & BROKEN)
+ add_overlay("broken")
+ else
+ add_overlay("open")
+ if(suit)
+ add_overlay("suit")
+ if(helmet)
+ add_overlay("helm")
+ if(storage)
+ add_overlay("storage")
+ else if(occupant)
+ add_overlay("human")
+
+/obj/machinery/suit_storage_unit/attackby(obj/item/I as obj, mob/user as mob, params)
+ if(!is_operational())
+ return
+ if(isscrewdriver(I))
+ panel_open = !panel_open
+ playsound(loc, I.usesound, 100, 1)
+ to_chat(user, text("You [panel_open ? "open up" : "close"] the unit's maintenance panel."))
+ updateUsrDialog()
/obj/machinery/suit_storage_unit/power_change()
- if( powered() )
- src.ispowered = 1
- stat &= ~NOPOWER
- src.update_icon()
+ ..()
+ if(!is_operational() && state_open)
+ open_machine()
+ dump_contents()
+ update_icon()
+
+
+/obj/machinery/suit_storage_unit/proc/dump_contents()
+ dropContents()
+ helmet = null
+ suit = null
+ mask = null
+ storage = null
+ occupant = null
+
+/obj/machinery/suit_storage_unit/deconstruct(disassembled = TRUE)
+ open_machine()
+ dump_contents()
+ new /obj/item/stack/sheet/metal (loc, 2)
+ qdel(src)
+
+/obj/machinery/suit_storage_unit/MouseDrop_T(atom/A, mob/user)
+ if(user.stat || user.lying || !Adjacent(user) || !Adjacent(A) || !isliving(A))
+ return
+ var/mob/living/target = A
+ if(!state_open)
+ to_chat(user, "The [src]'s doors are shut!")
+ return
+ if(!is_operational())
+ to_chat(user, "The [src] is not operational!")
+ return
+ if(occupant || helmet || suit || storage)
+ to_chat(user, "It's too cluttered inside to fit in!")
+ return
+
+ if(target == user)
+ user.visible_message("[user] starts squeezing into [src]!", "You start working your way into [src]...")
else
- spawn(rand(0, 15))
- src.ispowered = 0
- stat |= NOPOWER
- src.islocked = 0
- src.isopen = 1
- src.dump_everything()
- src.update_icon()
+ target.visible_message("[user] starts shoving [target] into [src]!", "[user] starts shoving you into [src]!")
-
-/obj/machinery/suit_storage_unit/ex_act(severity)
- switch(severity)
- if(1.0)
- if(prob(50))
- src.dump_everything() //So suits dont survive all the time
- qdel(src)
- return
- if(2.0)
- if(prob(50))
- src.dump_everything()
- qdel(src)
+ if(do_mob(user, target, 30))
+ if(occupant || helmet || suit || storage)
return
+ if(target == user)
+ user.visible_message("[user] slips into [src] and closes the door behind [user.p_them()]!", "You slip into [src]'s cramped space and shut its door.")
else
- return
- return
+ target.visible_message("[user] pushes [target] into [src] and shuts its door!", "[user] shoves you into [src] and shuts the door!")
+ close_machine(target)
+ add_fingerprint(user)
+/obj/machinery/suit_storage_unit/proc/cook()
+ if(uv_cycles)
+ uv_cycles--
+ uv = TRUE
+ locked = TRUE
+ update_icon()
+ if(occupant)
+ var/mob/living/mob_occupant = occupant
+ if(uv_super)
+ mob_occupant.adjustFireLoss(rand(20, 36))
+ else
+ mob_occupant.adjustFireLoss(rand(10, 16))
+ mob_occupant.emote("scream")
+ addtimer(CALLBACK(src, .proc/cook), 50)
+ else
+ uv_cycles = initial(uv_cycles)
+ uv = FALSE
+ locked = FALSE
+ if(uv_super)
+ visible_message("[src]'s door creaks open with a loud whining noise. A cloud of foul black smoke escapes from its chamber.")
+ playsound(src, 'sound/machines/airlock_alien_prying.ogg', 50, 1)
+ helmet = null
+ qdel(helmet)
+ suit = null
+ qdel(suit) // Delete everything but the occupant.
+ mask = null
+ qdel(mask)
+ storage = null
+ qdel(storage)
+ else
+ if(!occupant)
+ visible_message("[src]'s door slides open. The glowing yellow lights dim to a gentle green.")
+ else
+ visible_message("[src]'s door slides open, barraging you with the nauseating smell of charred flesh.")
+ playsound(src, 'sound/machines/airlock_close.ogg', 25, 1)
+ open_machine(FALSE)
+ if(occupant)
+ dump_contents()
+
+/obj/machinery/suit_storage_unit/shock(mob/user, prb)
+ if(!prob(prb))
+ var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
+ s.set_up(5, 1, src)
+ s.start()
+ if(electrocute_mob(user, src, src, 1, TRUE))
+ return 1
+
+/obj/machinery/suit_storage_unit/relaymove(mob/user)
+ if(locked)
+ if(message_cooldown <= world.time)
+ message_cooldown = world.time + 50
+ to_chat(user, "[src]'s door won't budge!")
+ return
+ open_machine()
+ dump_contents()
+
+/obj/machinery/suit_storage_unit/container_resist(mob/living/user)
+ if(!locked)
+ open_machine()
+ dump_contents()
+ return
+ user.changeNext_move(CLICK_CD_BREAKOUT)
+ user.last_special = world.time + CLICK_CD_BREAKOUT
+ user.visible_message("You see [user] kicking against the doors of [src]!", \
+ "You start kicking against the doors... (this will take about [DisplayTimeText(breakout_time)].)", \
+ "You hear a thump from [src].")
+ if(do_after(user,(breakout_time), target = src))
+ if(!user || user.stat != CONSCIOUS || user.loc != src )
+ return
+ user.visible_message("[user] successfully broke out of [src]!", \
+ "You successfully break out of [src]!")
+ open_machine()
+ dump_contents()
+
+ add_fingerprint(user)
+ if(locked)
+ visible_message("You see [user] kicking against the doors of [src]!", \
+ "You start kicking against the doors...")
+ addtimer(CALLBACK(src, .proc/resist_open, user), 300)
+ else
+ open_machine()
+ dump_contents()
+
+/obj/machinery/suit_storage_unit/proc/resist_open(mob/user)
+ if(!state_open && occupant && (user in src) && !user.stat) // Check they're still here.
+ visible_message("You see [user] burst out of [src]!", \
+ "You escape the cramped confines of [src]!")
+ open_machine()
+
+//eventually move these onto the parent....
+
+/obj/machinery/suit_storage_unit/proc/open_machine(drop = TRUE)
+ state_open = TRUE
+ if(drop)
+ dropContents()
+ update_icon()
+ updateUsrDialog()
+
+/obj/machinery/suit_storage_unit/dropContents()
+ var/turf/T = get_turf(src)
+ for(var/atom/movable/A in contents)
+ A.forceMove(T)
+ if(isliving(A))
+ var/mob/living/L = A
+ L.update_canmove()
+ occupant = null
+
+/obj/machinery/suit_storage_unit/proc/close_machine(atom/movable/target = null)
+ state_open = FALSE
+ if(!target)
+ for(var/am in loc)
+ if(!(occupant_typecache ? is_type_in_typecache(am, occupant_typecache) : isliving(am)))
+ continue
+ var/atom/movable/AM = am
+ if(AM.has_buckled_mobs())
+ continue
+ if(isliving(AM))
+ var/mob/living/L = am
+ if(L.buckled || L.mob_size >= MOB_SIZE_LARGE)
+ continue
+ target = am
+
+ var/mob/living/mobtarget = target
+ if(target && !target.has_buckled_mobs() && (!isliving(target) || !mobtarget.buckled))
+ occupant = target
+ target.forceMove(src)
+ updateUsrDialog()
+ update_icon()
+
+
+////////
/obj/machinery/suit_storage_unit/attack_hand(mob/user as mob)
var/dat
@@ -131,54 +356,49 @@
if(stat & NOPOWER)
return
if(!user.IsAdvancedToolUser())
- return 0
- if(src.panelopen) //The maintenance panel is open. Time for some shady stuff
+ return FALSE
+ if(panel_open) //The maintenance panel is open. Time for some shady stuff
dat+= "
"
dat+= "The panel is ridden with controls, button and meters, labeled in strange signs and symbols that
you cannot understand. Probably the manufactoring world's language.
Among other things, a few controls catch your eye.
"
- dat+= text("A small dial with a \"�\" symbol embroidded on it. It's pointing towards a gauge that reads [].
Turn towards []
",(src.issuperUV ? "15nm" : "185nm"),(src.issuperUV ? "185nm" : "15nm") )
- dat+= text("A thick old-style button, with 2 grimy LED lights next to it. The [] LED is on.
Press button",(src.safetieson? "GREEN" : "RED"))
+ dat+= text("A small dial with a arrow embroidered on it. It's pointing towards a gauge that reads [].
Turn towards []
",(uv_super ? "15nm" : "185nm"),(uv_super ? "185nm" : "15nm") )
+ dat+= text("A thick old-style button, with 2 grimy LED lights next to it. The [] LED is on.
Press button",(safeties ? "GREEN" : "RED"))
dat+= "
Close panel"
- //user << browse(dat, "window=ssu_m_panel;size=400x500")
- //onclose(user, "ssu_m_panel")
- else if(src.isUV) //The thing is running its cauterisation cycle. You have to wait.
+ else if(uv) //The thing is running its cauterisation cycle. You have to wait.
dat += "
"
- //dat+= "Cycle end in: [src.cycletimeleft()] seconds. "
- //user << browse(dat, "window=ssu_cycling_panel;size=400x500")
- //onclose(user, "ssu_cycling_panel")
else
- if(!src.isbroken)
+ if(!broken)
dat+= "Welcome to the Unit control panel.
"
- dat+= text("Helmet storage compartment: []
",(src.HELMET ? HELMET.name : "No helmet detected.") )
- if(HELMET && src.isopen)
+ dat+= text("Helmet storage compartment: []
",(helmet ? helmet.name : "No helmet detected.") )
+ if(helmet && state_open)
dat+="Dispense helmet
"
- dat+= text("Suit storage compartment: []
",(src.SUIT ? SUIT.name : "No exosuit detected.") )
- if(SUIT && src.isopen)
+ dat+= text("Suit storage compartment: []
",(suit ? suit.name : "No exosuit detected.") )
+ if(suit && state_open)
dat+="Dispense suit
"
- dat+= text("Breathmask storage compartment: []
",(src.MASK ? MASK.name : "No breathmask detected.") )
- if(MASK && src.isopen)
+ dat+= text("Breathmask storage compartment: []
",(mask ? mask.name : "No breathmask detected.") )
+ if(mask && state_open)
dat+="Dispense mask
"
- if(src.OCCUPANT)
+ dat+= text("Breathmask storage compartment: []
",(storage ? storage.name : "No storage item detected.") )
+ if(storage && state_open)
+ dat+="Dispense storage item
"
+ if(occupant)
dat+= "
WARNING: Biological entity detected inside the Unit's storage. Please remove.
"
dat+= "Eject extra load"
- dat+= text("
Unit is: [] - [] Unit ",(src.isopen ? "Open" : "Closed"),(src.isopen ? "Close" : "Open"))
- if(src.isopen)
+ dat+= text("
Unit is: [] - [] Unit ",(state_open ? "Open" : "Closed"),(state_open ? "Close" : "Open"))
+ if(state_open)
dat+="
"
else
- dat+= text(" - *[] Unit*
",(src.islocked ? "Unlock" : "Lock") )
- dat+= text("Unit status: []",(src.islocked? "**LOCKED**
" : "**UNLOCKED**
") )
- dat+= "Start Disinfection cycle
"
+ dat+= text(" - *[] Unit*
",(locked ? "Unlock" : "Lock") )
+ dat+= text("Unit status: []",(locked? "**LOCKED**
" : "**UNLOCKED**
") )
+ dat+= "Start Disinfection cycle
"
dat += "
Close control panel"
- //user << browse(dat, "window=Suit Storage Unit;size=400x500")
- //onclose(user, "Suit Storage Unit")
else //Ohhhh shit it's dirty or broken! Let's inform the guy.
dat+= "
"
dat+= "
Close control panel"
- //user << browse(dat, "window=suit_storage_unit;size=400x500")
- //onclose(user, "suit_storage_unit")
+
var/datum/browser/popup = new(user, "suit_storage_unit", name, 400, 500)
popup.set_content(dat)
@@ -187,263 +407,134 @@
return
-/obj/machinery/suit_storage_unit/Topic(href, href_list) //I fucking HATE this proc
+/obj/machinery/suit_storage_unit/Topic(href, href_list)
if(..())
return 1
if((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
usr.set_machine(src)
if(href_list["toggleUV"])
- src.toggleUV(usr)
- src.updateUsrDialog()
- src.update_icon()
+ toggleUV(usr)
+ updateUsrDialog()
+ update_icon()
if(href_list["togglesafeties"])
- src.togglesafeties(usr)
- src.updateUsrDialog()
- src.update_icon()
+ togglesafeties(usr)
+ updateUsrDialog()
+ update_icon()
if(href_list["dispense_helmet"])
- src.dispense_helmet(usr)
- src.updateUsrDialog()
- src.update_icon()
+ dispense_helmet(usr)
+ updateUsrDialog()
+ update_icon()
if(href_list["dispense_suit"])
- src.dispense_suit(usr)
- src.updateUsrDialog()
- src.update_icon()
+ dispense_suit(usr)
+ updateUsrDialog()
+ update_icon()
if(href_list["dispense_mask"])
- src.dispense_mask(usr)
- src.updateUsrDialog()
- src.update_icon()
+ dispense_mask(usr)
+ updateUsrDialog()
+ update_icon()
+ if(href_list["dispense_storage"])
+ dispense_storage(usr)
+ updateUsrDialog()
+ update_icon()
if(href_list["toggle_open"])
- src.toggle_open(usr)
- src.updateUsrDialog()
- src.update_icon()
+ toggle_open(usr)
+ updateUsrDialog()
+ update_icon()
if(href_list["toggle_lock"])
- src.toggle_lock(usr)
- src.updateUsrDialog()
- src.update_icon()
- if(href_list["start_UV"])
- src.start_UV(usr)
- src.updateUsrDialog()
- src.update_icon()
+ toggle_lock(usr)
+ updateUsrDialog()
+ update_icon()
+ if(href_list["cook"])
+ cook(usr)
+ updateUsrDialog()
+ update_icon()
if(href_list["eject_guy"])
- src.eject_occupant(usr)
- src.updateUsrDialog()
- src.update_icon()
- /*if(href_list["refresh"])
- src.updateUsrDialog()*/
- src.add_fingerprint(usr)
+ eject_occupant(usr)
+ updateUsrDialog()
+ update_icon()
+ add_fingerprint(usr)
return
/obj/machinery/suit_storage_unit/proc/toggleUV(mob/user as mob)
-// var/protected = 0
-// var/mob/living/carbon/human/H = user
- if(!src.panelopen)
+
+ if(!panel_open)
return
-
- /*if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves
- if(H.gloves)
- var/obj/item/clothing/gloves/G = H.gloves
- if(istype(G,/obj/item/clothing/gloves/color/yellow))
- protected = 1
-
- if(!protected)
- playsound(src.loc, "sparks", 75, 1, -1)
- to_chat(user, "You try to touch the controls but you get zapped. There must be a short circuit somewhere.")
- return*/
- else //welp, the guy is protected, we can continue
- if(src.issuperUV)
- to_chat(user, "You slide the dial back towards \"185nm\".")
- src.issuperUV = 0
+ else
+ if(uv_super)
+ to_chat(user, "You slide the dial back towards \"185nm\".")
+ uv_super = FALSE
else
- to_chat(user, "You crank the dial all the way up to \"15nm\".")
- src.issuperUV = 1
- return
-
+ to_chat(user, "You crank the dial all the way up to \"15nm\".")
+ uv_super = TRUE
/obj/machinery/suit_storage_unit/proc/togglesafeties(mob/user as mob)
-// var/protected = 0
-// var/mob/living/carbon/human/H = user
- if(!src.panelopen) //Needed check due to bugs
+ if(!panel_open)
return
-
- /*if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves
- if(H.gloves)
- var/obj/item/clothing/gloves/G = H.gloves
- if(istype(G,/obj/item/clothing/gloves/color/yellow) )
- protected = 1
-
- if(!protected)
- playsound(src.loc, "sparks", 75, 1, -1)
- to_chat(user, "You try to touch the controls but you get zapped. There must be a short circuit somewhere.")
- return*/
else
- to_chat(user, "You push the button. The coloured LED next to it changes.")
- src.safetieson = !src.safetieson
-
+ to_chat(user, "You push the button. The coloured LED next to it changes.")
+ safeties = !safeties
/obj/machinery/suit_storage_unit/proc/dispense_helmet(mob/user as mob)
- if(!src.HELMET)
- return //Do I even need this sanity check? Nyoro~n
- else
- src.HELMET.loc = src.loc
- src.HELMET = null
+ if(!helmet)
return
-
+ else
+ helmet.forceMove(loc)
+ helmet = null
/obj/machinery/suit_storage_unit/proc/dispense_suit(mob/user as mob)
- if(!src.SUIT)
+ if(!suit)
return
else
- src.SUIT.loc = src.loc
- src.SUIT = null
- return
-
+ suit.forceMove(loc)
+ suit = null
/obj/machinery/suit_storage_unit/proc/dispense_mask(mob/user as mob)
- if(!src.MASK)
+ if(!mask)
return
else
- src.MASK.loc = src.loc
- src.MASK = null
+ mask.forceMove(loc)
+ mask = null
+
+/obj/machinery/suit_storage_unit/proc/dispense_storage(mob/user as mob)
+ if(!storage)
return
-
-
-/obj/machinery/suit_storage_unit/proc/dump_everything()
- src.islocked = 0 //locks go free
- if(src.SUIT)
- src.SUIT.loc = src.loc
- src.SUIT = null
- if(src.HELMET)
- src.HELMET.loc = src.loc
- src.HELMET = null
- if(src.MASK)
- src.MASK.loc = src.loc
- src.MASK = null
- if(src.OCCUPANT)
- src.eject_occupant(OCCUPANT)
- return
-
+ else
+ storage.forceMove(loc)
+ storage = null
/obj/machinery/suit_storage_unit/proc/toggle_open(mob/user as mob)
- if(src.islocked || src.isUV)
- to_chat(user, "Unable to open unit.")
+ if(locked || uv)
+ to_chat(user, "Unable to open unit.")
return
- if(src.OCCUPANT)
- src.eject_occupant(user)
- return // eject_occupant opens the door, so we need to return
- src.isopen = !src.isopen
- return
-
+ if(occupant)
+ eject_occupant(user)
+ return
+ state_open = !state_open
/obj/machinery/suit_storage_unit/proc/toggle_lock(mob/user as mob)
- if(src.OCCUPANT && src.safetieson)
- to_chat(user, "The Unit's safety protocols disallow locking when a biological form is detected inside its compartments.")
+ if(occupant && safeties)
+ to_chat(user, "The unit's safety protocols disallow locking when a biological form is detected inside its compartments.")
return
- if(src.isopen)
+ if(state_open)
return
- src.islocked = !src.islocked
- return
-
-
-/obj/machinery/suit_storage_unit/proc/start_UV(mob/user as mob)
- if(src.isUV || src.isopen) //I'm bored of all these sanity checks
- return
- if(src.OCCUPANT && src.safetieson)
- to_chat(user, "WARNING: Biological entity detected in the confines of the Unit's storage. Cannot initiate cycle.")
- return
- if(!src.HELMET && !src.MASK && !src.SUIT && !src.OCCUPANT ) //shit's empty yo
- to_chat(user, "Unit storage bays empty. Nothing to disinfect -- Aborting.")
- return
- to_chat(user, "You start the Unit's cauterisation cycle.")
- src.cycletime_left = 20
- src.isUV = 1
- if(src.OCCUPANT && !src.islocked)
- src.islocked = 1 //Let's lock it for good measure
- src.update_icon()
- src.updateUsrDialog()
-
- var/i //our counter
- for(i=0,i<4,i++)
- sleep(50)
- if(src.OCCUPANT)
- if(src.issuperUV)
- var/burndamage = rand(35,45)
- OCCUPANT.take_organ_damage(0,burndamage)
- OCCUPANT.emote("scream")
- else
- var/burndamage = rand(10,15)
- OCCUPANT.take_organ_damage(0,burndamage)
- OCCUPANT.emote("scream")
- if(i==3) //End of the cycle
- if(!src.issuperUV)
- if(src.HELMET)
- HELMET.clean_blood()
- if(src.SUIT)
- SUIT.clean_blood()
- if(src.MASK)
- MASK.clean_blood()
- else //It was supercycling, destroy everything
- if(src.HELMET)
- src.HELMET = null
- if(src.SUIT)
- src.SUIT = null
- if(src.MASK)
- src.MASK = null
- visible_message("With a loud whining noise, the Suit Storage Unit's door grinds open. Puffs of ashen smoke come out of its chamber.")
- src.isbroken = 1
- src.isopen = 1
- src.islocked = 0
- src.eject_occupant(OCCUPANT) //Mixing up these two lines causes bug. DO NOT DO IT.
- src.isUV = 0 //Cycle ends
- src.update_icon()
- src.updateUsrDialog()
- return
-
-/* spawn(200) //Let's clean dat shit after 20 secs //Eh, this doesn't work
- if(src.HELMET)
- HELMET.clean_blood()
- if(src.SUIT)
- SUIT.clean_blood()
- if(src.MASK)
- MASK.clean_blood()
- src.isUV = 0 //Cycle ends
- src.update_icon()
- src.updateUsrDialog()
-
- var/i
- for(i=0,i<4,i++) //Gradually give the guy inside some damaged based on the intensity
- spawn(50)
- if(OCCUPANT)
- if(issuperUV)
- OCCUPANT.take_organ_damage(0,40)
- to_chat(user, "Test. You gave [OCCUPANT.p_them()] 40 damage")
- else
- OCCUPANT.take_organ_damage(0,8)
- to_chat(user, "Test. You gave [OCCUPANT.p_them()] 8 damage")
- return*/
-
-
-/obj/machinery/suit_storage_unit/proc/cycletimeleft()
- if(src.cycletime_left >= 1)
- src.cycletime_left--
- return src.cycletime_left
-
+ locked = !locked
/obj/machinery/suit_storage_unit/proc/eject_occupant(mob/user as mob)
- if(islocked)
+ if(locked)
return
- if(!OCCUPANT)
+ if(!occupant)
return
- if(user != OCCUPANT)
- to_chat(OCCUPANT, "The machine kicks you out!")
+ if(user != occupant)
+ to_chat(occupant, "The machine kicks you out!")
if(user.loc != loc)
- to_chat(OCCUPANT, "You leave the not-so-cozy confines of the SSU.")
- OCCUPANT.forceMove(loc)
- OCCUPANT = null
- if(!isopen)
- isopen = 1
+ to_chat(occupant, "You leave the not-so-cozy confines of the SSU.")
+ occupant.forceMove(loc)
+ occupant = null
+ if(!state_open)
+ state_open = 1
update_icon()
return
@@ -455,13 +546,12 @@
if(usr.stat != 0)
return
- src.eject_occupant(usr)
+ eject_occupant(usr)
add_fingerprint(usr)
- src.updateUsrDialog()
- src.update_icon()
+ updateUsrDialog()
+ update_icon()
return
-
/obj/machinery/suit_storage_unit/verb/move_inside()
set name = "Hide in Suit Storage Unit"
set category = "Object"
@@ -469,640 +559,28 @@
if(usr.stat != 0)
return
- if(!src.isopen)
- to_chat(usr, "The unit's doors are shut.")
+ if(!state_open)
+ to_chat(usr, "The unit's doors are shut.")
return
- if(!src.ispowered || src.isbroken)
- to_chat(usr, "The unit is not operational.")
+ if(broken)
+ to_chat(usr, "The unit is not operational.")
return
- if( (src.OCCUPANT) || (src.HELMET) || (src.SUIT) )
- to_chat(usr, "It's too cluttered inside for you to fit in!")
+ if((occupant) || (helmet) || (suit) || (storage))
+ to_chat(usr, "It's too cluttered inside for you to fit in!")
return
visible_message("[usr] starts squeezing into the suit storage unit!")
if(do_after(usr, 10, target = usr))
usr.stop_pulling()
usr.forceMove(src)
-// usr.metabslow = 1
- src.OCCUPANT = usr
- src.isopen = 0 //Close the thing after the guy gets inside
- src.update_icon()
+ occupant = usr
+ state_open = FALSE //Close the thing after the guy gets inside
+ update_icon()
-// for(var/obj/O in src)
-// qdel(O)
-
- src.add_fingerprint(usr)
- src.updateUsrDialog()
+ add_fingerprint(usr)
+ updateUsrDialog()
return
else
- src.OCCUPANT = null //Testing this as a backup sanity test
- return
-
-
-/obj/machinery/suit_storage_unit/attackby(obj/item/I as obj, mob/user as mob, params)
- if(!src.ispowered)
- return
- if(istype(I, /obj/item/screwdriver))
- src.panelopen = !src.panelopen
- playsound(src.loc, I.usesound, 100, 1)
- to_chat(user, text("You [] the unit's maintenance panel.",(src.panelopen ? "open up" : "close") ))
- src.updateUsrDialog()
- return
- if( istype(I, /obj/item/grab) )
- var/obj/item/grab/G = I
- if( !(ismob(G.affecting)) )
- return
- if(!src.isopen)
- to_chat(usr, "The unit's doors are shut.")
- return
- if(!src.ispowered || src.isbroken)
- to_chat(usr, "The unit is not operational.")
- return
- if( (src.OCCUPANT) || (src.HELMET) || (src.SUIT) ) //Unit needs to be absolutely empty
- to_chat(user, "The unit's storage area is too cluttered.")
- return
- visible_message("[user] starts putting [G.affecting.name] into the Suit Storage Unit.")
- if(do_after(user, 20, target = G:affecting))
- if(!G || !G.affecting) return //derpcheck
- var/mob/M = G.affecting
- M.forceMove(src)
- src.OCCUPANT = M
- src.isopen = 0 //close ittt
-
- //for(var/obj/O in src)
- // O.loc = src.loc
- src.add_fingerprint(user)
- qdel(G)
- src.updateUsrDialog()
- src.update_icon()
- return
- return
- if( istype(I,/obj/item/clothing/suit/space) )
- if(!src.isopen)
- return
- var/obj/item/clothing/suit/space/S = I
- if(src.SUIT)
- to_chat(user, "The unit already contains a suit.")
- return
- to_chat(user, "You load the [S.name] into the storage compartment.")
- user.drop_item()
- S.loc = src
- src.SUIT = S
- src.update_icon()
- src.updateUsrDialog()
- return
- if( istype(I,/obj/item/clothing/head/helmet) )
- if(!src.isopen)
- return
- var/obj/item/clothing/head/helmet/H = I
- if(src.HELMET)
- to_chat(user, "The unit already contains a helmet.")
- return
- to_chat(user, "You load the [H.name] into the storage compartment.")
- user.drop_item()
- H.loc = src
- src.HELMET = H
- src.update_icon()
- src.updateUsrDialog()
- return
- if( istype(I,/obj/item/clothing/mask) )
- if(!src.isopen)
- return
- var/obj/item/clothing/mask/M = I
- if(src.MASK)
- to_chat(user, "The unit already contains a mask.")
- return
- to_chat(user, "You load the [M.name] into the storage compartment.")
- user.drop_item()
- M.loc = src
- src.MASK = M
- src.update_icon()
- src.updateUsrDialog()
- return
- src.update_icon()
- src.updateUsrDialog()
- return
-
+ occupant = null
/obj/machinery/suit_storage_unit/attack_ai(mob/user as mob)
- return src.attack_hand(user)
-
-
-
-//////////////////////////////REMINDER: Make it lock once you place some fucker inside.
-
-//God this entire file is fucking awful
-//Suit painter for Bay's special snowflake aliums.
-
-/obj/machinery/suit_cycler
-
- name = "suit cycler"
- desc = "An industrial machine for repairing, painting and equipping hardsuits."
- anchored = 1
- density = 1
-
- icon = 'icons/obj/suitstorage.dmi'
- icon_state = "suitstorage000000100"
-
- req_access = list(access_captain,access_heads)
-
- var/active = 0 // PLEASE HOLD.
- var/safeties = 1 // The cycler won't start with a living thing inside it unless safeties are off.
- var/irradiating = 0 // If this is > 0, the cycler is decontaminating whatever is inside it.
- var/radiation_level = 2 // 1 is removing germs, 2 is removing blood, 3 is removing plasma.
- var/model_text = "" // Some flavour text for the topic box.
- var/locked = 1 // If locked, nothing can be taken from or added to the cycler.
-
- // Wiring bollocks.
- var/wires = 15
- var/electrified = 0
- var/const/WIRE_EXTEND = 1 // Safeties
- var/const/WIRE_SCANID = 2 // Locked status
- var/const/WIRE_SHOCK = 3 // What it says on the tin.
-
- //Departments that the cycler can paint suits to look like.
- var/list/departments = list("Engineering","Mining","Medical","Security","Atmos")
- //Species that the suits can be configured to fit.
- var/list/species = list("Human","Skrell","Unathi","Tajaran")
-
- var/target_department = "Engineering"
- var/target_species = "Human"
-
- var/mob/living/carbon/human/occupant = null
- var/obj/item/clothing/suit/space/hardsuit/suit = null
- var/obj/item/clothing/head/helmet/space/helmet = null
-
-/obj/machinery/suit_cycler/engineering
- name = "Engineering suit cycler"
- model_text = "Engineering"
- req_access = list(access_construction)
- departments = list("Engineering","Atmos")
- species = list("Human","Unathi","Tajaran")
-
-/obj/machinery/suit_cycler/mining
- name = "Mining suit cycler"
- model_text = "Mining"
- req_access = list(access_mining)
- departments = list("Mining")
- species = list("Human","Unathi","Tajaran")
-
-/obj/machinery/suit_cycler/attack_ai(mob/user as mob)
- return src.attack_hand(user)
-
-/obj/machinery/suit_cycler/attackby(obj/item/I as obj, mob/user as mob, params)
-
- if(electrified != 0)
- if(src.shock(user, 100))
- return
-
- //Hacking init.
- if(istype(I, /obj/item/multitool) || istype(I, /obj/item/wirecutters))
- if(panel_open)
- attack_hand(user)
- return
- //Other interface stuff.
- if(istype(I, /obj/item/grab))
- var/obj/item/grab/G = I
-
- if(!(ismob(G.affecting)))
- return
-
- if(locked)
- to_chat(user, "The suit cycler is locked.")
- return
-
- if(src.contents.len > 0)
- to_chat(user, "There is no room inside the cycler for [G.affecting.name].")
- return
-
- visible_message("[user] starts putting [G.affecting.name] into the suit cycler.")
-
- if(do_after(user, 20, target = G:affecting))
- if(!G || !G.affecting) return
- var/mob/M = G.affecting
- M.forceMove(src)
- src.occupant = M
-
- src.add_fingerprint(user)
- qdel(G)
-
- src.updateUsrDialog()
-
- return
- else if(istype(I,/obj/item/screwdriver))
-
- panel_open = !panel_open
- to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.")
- src.updateUsrDialog()
- return
-
- else if(istype(I,/obj/item/clothing/head/helmet/space))
-
- if(locked)
- to_chat(user, "The suit cycler is locked.")
- return
-
- if(helmet)
- to_chat(user, "The cycler already contains a helmet.")
- return
-
- to_chat(user, "You fit \the [I] into the suit cycler.")
- user.drop_item()
- I.loc = src
- helmet = I
-
- src.update_icon()
- src.updateUsrDialog()
- return
-
- else if(istype(I,/obj/item/clothing/suit/space/hardsuit))
-
- if(locked)
- to_chat(user, "The suit cycler is locked.")
- return
-
- if(suit)
- to_chat(user, "The cycler already contains a hardsuit.")
- return
-
- var/obj/item/clothing/suit/space/hardsuit/S = I
-
- if(S.helmet)
- to_chat(user, "\The [S] will not fit into the cycler with a helmet attached.")
- return
-
- if(S.boots)
- to_chat(user, "\The [S] will not fit into the cycler with boots attached.")
- return
-
- to_chat(user, "You fit \the [I] into the suit cycler.")
- user.drop_item()
- I.loc = src
- suit = I
-
- src.update_icon()
- src.updateUsrDialog()
- return
-
- ..()
-
-/obj/machinery/suit_cycler/emag_act(user as mob)
- if(emagged)
- to_chat(user, "The cycler has already been subverted.")
- return
-
- //Clear the access reqs, disable the safeties, and open up all paintjobs.
- to_chat(user, "You run the sequencer across the interface, corrupting the operating protocols.")
- departments = list("Engineering","Mining","Medical","Security","Atmos","^%###^%$")
- emagged = 1
- safeties = 0
- req_access = list()
- return
-
-/obj/machinery/suit_cycler/attack_hand(mob/user as mob)
-
- add_fingerprint(user)
-
- if(..() || stat & (BROKEN|NOPOWER))
- return
-
- if(!user.IsAdvancedToolUser())
- return 0
-
- if(electrified != 0)
- if(src.shock(user, 100))
- return
-
- usr.set_machine(src)
-
- var/dat = "
The [model_text ? "[model_text] " : ""]suit cycler is currently in use. Please wait..."
-
- else if(locked)
- dat += "
The [model_text ? "[model_text] " : ""]suit cycler is currently locked. Please contact your system administrator."
- if(src.allowed(usr))
- dat += "
\[unlock unit\]"
- else
- dat += "Suit cycler
"
- dat += "Welcome to the [model_text ? "[model_text] " : ""]suit cycler control panel. \[lock unit\]
"
-
- dat += "Maintenance
"
- dat += "Helmet: [helmet ? "\the [helmet]" : "no helmet stored" ]. \[eject\]
"
- dat += "Suit: [suit ? "\the [suit]" : "no suit stored" ]. \[eject\]"
-
- if(suit && istype(suit))
- dat += "[(suit.damage ? " \[repair\]" : "")]"
-
- dat += "
UV decontamination systems: SYSTEM ERROR" : "green'>READY"]
"
- dat += "Output level: [radiation_level]
"
- dat += "\[select power level\] \[begin decontamination cycle\]
"
-
- dat += "Customisation
"
- dat += "Target product: [target_department], [target_species]."
- dat += "
\[apply customisation routine\]
"
-
-/* if(panel_open)
- var/list/vendwires = list(
- "Violet" = 1,
- "Orange" = 2,
- "Goldenrod" = 3,
- )
- dat += "Access Panel
"
- for(var/wiredesc in vendwires)
- var/is_uncut = src.wires & APCWireColorToFlag[vendwires[wiredesc]]
- dat += "[wiredesc] wire: "
- if(!is_uncut)
- dat += "Mend"
- else
- dat += "Cut "
- dat += "Pulse "
- dat += "
"
-
- dat += "
"
- dat += "The orange light is [(electrified == 0) ? "off" : "on"].
"
- dat += "The red light is [safeties ? "blinking" : "off"].
"
- dat += "The yellow light is [locked ? "on" : "off"].
" */
-
- var/datum/browser/popup = new(user, "suit_cycler", name, 400, 400)
- popup.set_content(dat)
- popup.open(0)
- onclose(user, "suit_cycler")
- return
-
-/obj/machinery/suit_cycler/Topic(href, href_list)
- if(href_list["eject_suit"])
- if(!suit) return
- suit.loc = get_turf(src)
- suit = null
- else if(href_list["eject_helmet"])
- if(!helmet) return
- helmet.loc = get_turf(src)
- helmet = null
- else if(href_list["select_department"])
- var/choice = input("Please select the target department paintjob.","Suit cycler",null) as null|anything in departments
- if(choice) target_department = choice
- else if(href_list["select_species"])
- var/choice = input("Please select the target species configuration.","Suit cycler",null) as null|anything in species
- if(choice) target_species = choice
- else if(href_list["select_rad_level"])
- var/choices = list(1,2,3)
- if(emagged)
- choices = list(1,2,3,4,5)
- radiation_level = input("Please select the desired radiation level.","Suit cycler",null) as null|anything in choices
- else if(href_list["repair_suit"])
-
- if(!suit) return
- active = 1
- spawn(100)
- repair_suit()
- finished_job()
-
- else if(href_list["apply_paintjob"])
-
- if(!suit && !helmet) return
- active = 1
- spawn(100)
- apply_paintjob()
- finished_job()
-
- else if(href_list["toggle_safties"])
- safeties = !safeties
-
- else if(href_list["toggle_lock"])
-
- if(src.allowed(usr))
- locked = !locked
- to_chat(usr, "You [locked ? "" : "un"]lock \the [src].")
- else
- to_chat(usr, "Access denied.")
-
- else if(href_list["begin_decontamination"])
-
- if(safeties && occupant)
- to_chat(usr, "The cycler has detected an occupant. Please remove the occupant before commencing the decontamination cycle.")
- return
-
- active = 1
- irradiating = 10
- src.updateUsrDialog()
-
- sleep(10)
-
- if(helmet)
- if(radiation_level > 1)
- helmet.clean_blood()
-
- if(suit)
- if(radiation_level > 1)
- suit.clean_blood()
-
-/* else if((href_list["cutwire"]) && (src.panel_open))
- var/twire = text2num(href_list["cutwire"])
- if(!( istype(usr.get_active_hand(), /obj/item/wirecutters) ))
- to_chat(usr, "You need wirecutters!")
- return
- if(src.isWireColorCut(twire))
- src.mend(twire)
- else
- src.cut(twire)
-
- else if((href_list["pulsewire"]) && (src.panel_open))
- var/twire = text2num(href_list["pulsewire"])
- if(!istype(usr.get_active_hand(), /obj/item/multitool))
- to_chat(usr, "You need a multitool!")
- return
- if(src.isWireColorCut(twire))
- to_chat(usr, "You can't pulse a cut wire.")
- return
- else
- src.pulse(twire)*/
-
- src.updateUsrDialog()
- return
-
-/obj/machinery/suit_cycler/process()
-
- if(electrified > 0)
- electrified--
-
- if(!active)
- return
-
- if(active && stat & (BROKEN|NOPOWER))
- active = 0
- irradiating = 0
- electrified = 0
- return
-
- if(irradiating == 1)
- finished_job()
- irradiating = 0
- return
-
- irradiating--
-
- if(occupant)
- if(prob(radiation_level*2)) occupant.emote("scream")
- if(radiation_level > 2)
- occupant.take_organ_damage(0,radiation_level*2 + rand(1,3))
- if(radiation_level > 1)
- occupant.take_organ_damage(0,radiation_level + rand(1,3))
- occupant.apply_effect(radiation_level*10, IRRADIATE)
-
-/obj/machinery/suit_cycler/proc/finished_job()
- var/turf/T = get_turf(src)
- T.visible_message("\The [src] pings loudly.")
- icon_state = initial(icon_state)
- active = 0
- src.updateUsrDialog()
-
-/obj/machinery/suit_cycler/proc/repair_suit()
- if(!suit || !suit.damage || !suit.can_breach)
- return
-
- suit.breaches = list()
- suit.calc_breach_damage()
-
- return
-
-/obj/machinery/suit_cycler/verb/leave()
- set name = "Eject Cycler"
- set category = "Object"
- set src in oview(1)
-
- if(usr.stat != 0)
- return
-
- eject_occupant(usr)
-
-/obj/machinery/suit_cycler/proc/eject_occupant(mob/user as mob)
-
- if(locked || active)
- to_chat(user, "The cycler is locked.")
- return
-
- if(!occupant)
- return
-
- occupant.forceMove(loc)
- occupant = null
-
- add_fingerprint(usr)
- updateUsrDialog()
- update_icon()
-
- return
-/*
-//HACKING PROCS, MOSTLY COPIED FROM VENDING MACHINES
-/obj/machinery/suit_cycler/proc/isWireColorCut(var/wireColor)
- var/wireFlag = APCWireColorToFlag[wireColor]
- return ((src.wires & wireFlag) == 0)
-
-/obj/machinery/suit_cycler/proc/isWireCut(var/wireIndex)
- var/wireFlag = APCIndexToFlag[wireIndex]
- return ((src.wires & wireFlag) == 0)
-
-/obj/machinery/suit_cycler/proc/cut(var/wireColor)
- var/wireFlag = APCWireColorToFlag[wireColor]
- var/wireIndex = APCWireColorToIndex[wireColor]
- src.wires &= ~wireFlag
- switch(wireIndex)
-
- if(WIRE_EXTEND)
- safeties = 0
- if(WIRE_SHOCK)
- electrified = -1
- if(WIRE_SCANID)
- locked = 0
-
-/obj/machinery/suit_cycler/proc/mend(var/wireColor)
- var/wireFlag = APCWireColorToFlag[wireColor]
- var/wireIndex = APCWireColorToIndex[wireColor] //not used in this function
- src.wires |= wireFlag
- switch(wireIndex)
- if(WIRE_SHOCK)
- src.electrified = 0
-
-/obj/machinery/suit_cycler/proc/pulse(var/wireColor)
- var/wireIndex = APCWireColorToIndex[wireColor]
- switch(wireIndex)
- if(WIRE_EXTEND)
- safeties = !locked
- if(WIRE_SHOCK)
- electrified = 30
- if(WIRE_SCANID)
- locked = !locked
-*/
-
-//There HAS to be a less bloated way to do this. TODO: some kind of table/icon name coding? ~Z
-/obj/machinery/suit_cycler/proc/apply_paintjob()
-
- if(!target_species || !target_department)
- return
-
- if(target_species)
- if(helmet) helmet.refit_for_species(target_species)
- if(suit) suit.refit_for_species(target_species)
-
- switch(target_department)
- if("Engineering")
- if(helmet)
- helmet.name = "engineering hardsuit helmet"
- helmet.icon_state = "hardsuit0-engineering"
- helmet.item_state = "eng_helm"
- helmet.item_color = "engineering"
- if(suit)
- suit.name = "engineering hardsuit"
- suit.icon_state = "hardsuit-engineering"
- suit.item_state = "eng_hardsuit"
- if("Mining")
- if(helmet)
- helmet.name = "mining hardsuit helmet"
- helmet.icon_state = "hardsuit0-mining"
- helmet.item_state = "mining_helm"
- helmet.item_color = "mining"
- if(suit)
- suit.name = "mining hardsuit"
- suit.icon_state = "hardsuit-mining"
- suit.item_state = "mining_hardsuit"
- if("Medical")
- if(helmet)
- helmet.name = "medical hardsuit helmet"
- helmet.icon_state = "hardsuit0-medical"
- helmet.item_state = "medical_helm"
- helmet.item_color = "medical"
- if(suit)
- suit.name = "medical hardsuit"
- suit.icon_state = "hardsuit-medical"
- suit.item_state = "medical_hardsuit"
- if("Security")
- if(helmet)
- helmet.name = "security hardsuit helmet"
- helmet.icon_state = "hardsuit0-sec"
- helmet.item_state = "sec_helm"
- helmet.item_color = "sec"
- if(suit)
- suit.name = "security hardsuit"
- suit.icon_state = "hardsuit-sec"
- suit.item_state = "sec_hardsuit"
- if("Atmos")
- if(helmet)
- helmet.name = "atmospherics hardsuit helmet"
- helmet.icon_state = "hardsuit0-atmos"
- helmet.item_state = "atmos_helm"
- helmet.item_color = "atmos"
- if(suit)
- suit.name = "atmospherics hardsuit"
- suit.icon_state = "hardsuit-atmos"
- suit.item_state = "atmos_hardsuit"
- if("^%###^%$")
- if(helmet)
- helmet.name = "blood-red hardsuit helmet"
- helmet.icon_state = "hardsuit0-syndie"
- helmet.item_state = "syndie_helm"
- helmet.item_color = "syndie"
- if(suit)
- suit.name = "blood-red hardsuit"
- suit.item_state = "syndie_hardsuit"
- suit.icon_state = "hardsuit-syndie"
+ return attack_hand(user)
diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm
index a8e854467a2..9dc6c8e6f11 100644
--- a/code/game/mecha/equipment/tools/medical_tools.dm
+++ b/code/game/mecha/equipment/tools/medical_tools.dm
@@ -519,3 +519,50 @@
for(var/reagent in processed_reagents)
reagents.add_reagent(reagent,amount)
chassis.use_power(energy_drain)
+
+/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw
+ name = "rescue jaw"
+ desc = "Emergency rescue jaws, designed to help first responders reach their patients. Opens doors and removes obstacles."
+ icon_state = "mecha_clamp" //can work, might use a blue resprite later but I think it works for now
+ origin_tech = "materials=2;engineering=2" //kind of sad, but identical to jaws of life
+ equip_cooldown = 15
+ energy_drain = 10
+ var/dam_force = 20
+
+
+/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/action(atom/target)
+ if(!action_checks(target))
+ return
+ if(istype(target, /obj))
+ if(!istype(target, /obj/machinery/door))//early return if we're not trying to open a door
+ return
+ var/obj/machinery/door/D = target //the door we want to open
+ D.try_to_crowbar(src, chassis.occupant)//use the door's crowbar function
+ if(isliving(target)) //interact with living beings
+ var/mob/living/M = target
+ if(chassis.occupant.a_intent == INTENT_HARM)//the patented, medical rescue claw is incapable of doing harm. Worry not.
+ target.visible_message("[chassis] gently boops [target] on the nose, its hydraulics hissing as safety overrides slow a brutal punch down at the last second.", \
+ "")
+ else
+ push_aside(chassis, M)//out of the way, I have people to save!
+ occupant_message("You gently push [target] out of the way.")
+ chassis.visible_message("[chassis] gently pushes [target] out of the way.")
+
+/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/proc/push_aside(obj/mecha/M, mob/living/L)
+ switch(get_dir(M, L))
+ if(NORTH, SOUTH)
+ if(prob(50))
+ step(L, WEST)
+ else
+ step(L, EAST)
+ if(WEST, EAST)
+ if(prob(50))
+ step(L, NORTH)
+ else
+ step(L, SOUTH)
+
+/obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/can_attach(obj/mecha/M)
+ if(istype(M, /obj/mecha/medical) || istype(M, /obj/mecha/working/ripley/firefighter)) //Odys or firefighters
+ if(M.equipment.len < M.max_equip)
+ return TRUE
+ return FALSE
diff --git a/code/game/mecha/equipment/tools/other_tools.dm b/code/game/mecha/equipment/tools/other_tools.dm
index 501b41be4cb..a42e76015c1 100644
--- a/code/game/mecha/equipment/tools/other_tools.dm
+++ b/code/game/mecha/equipment/tools/other_tools.dm
@@ -69,7 +69,7 @@
P.failchance = 0
P.icon_state = "anom"
P.name = "wormhole"
- message_admins("[key_name_admin(chassis.occupant, chassis.occupant.client)](?) (FLW) used a Wormhole Generator in ([loc.x],[loc.y],[loc.z] - JMP)",0,1)
+ message_admins("[key_name_admin(chassis.occupant, chassis.occupant.client)]([ADMIN_QUE(chassis.occupant,"?")]) ([ADMIN_FLW(chassis.occupant,"FLW")]) used a Wormhole Generator in ([loc.x],[loc.y],[loc.z] - JMP)",0,1)
log_game("[key_name(chassis.occupant)] used a Wormhole Generator in ([loc.x],[loc.y],[loc.z])")
src = null
spawn(rand(150,300))
diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm
index b63bb4fc40c..d119469d55a 100644
--- a/code/game/mecha/equipment/tools/work_tools.dm
+++ b/code/game/mecha/equipment/tools/work_tools.dm
@@ -63,8 +63,8 @@
start_cooldown()
else
step_away(M,chassis)
- occupant_message("You push [target] out of the way.")
- chassis.visible_message("[chassis] pushes [target] out of the way.")
+ occupant_message("You push [target] out of the way.")
+ chassis.visible_message("[chassis] pushes [target] out of the way.")
return 1
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 41f60361831..d4650aa1bbb 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -41,7 +41,7 @@
var/datum/effect_system/spark_spread/spark_system = new
var/lights = 0
var/lights_power = 6
- var/emagged = 0
+ var/emagged = FALSE
//inner atmos
var/use_internal_tank = 0
@@ -851,14 +851,8 @@
check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
-/obj/mecha/emag_act(user as mob)
- if(istype(src, /obj/mecha/working/ripley) && emagged == 0)
- emagged = 1
- to_chat(usr, "You slide the card through the [src]'s ID slot.")
- playsound(loc, "sparks", 100, 1)
- desc += "The mech's equipment slots spark dangerously!"
- else
- to_chat(usr, "The [src]'s ID slot rejects the card.")
+/obj/mecha/emag_act(mob/user)
+ to_chat(user, "[src]'s ID slot rejects the card.")
return
diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm
index 333c05fdd5d..d0fcb0f99be 100644
--- a/code/game/mecha/medical/odysseus.dm
+++ b/code/game/mecha/medical/odysseus.dm
@@ -42,5 +42,4 @@
A.remove_hud_from(H)
builtin_hud_user = 0
- . = ..()
-
+ . = ..()
\ No newline at end of file
diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm
index d29bf2ae460..407c9cd63dc 100644
--- a/code/game/mecha/working/ripley.dm
+++ b/code/game/mecha/working/ripley.dm
@@ -180,4 +180,13 @@
else
step_in = 5
for(var/obj/item/mecha_parts/mecha_equipment/drill/drill in equipment)
- drill.equip_cooldown = initial(drill.equip_cooldown)
\ No newline at end of file
+ drill.equip_cooldown = initial(drill.equip_cooldown)
+
+/obj/mecha/working/ripley/emag_act(mob/user)
+ if(!emagged)
+ emagged = TRUE
+ to_chat(user, "You slide the card through [src]'s ID slot.")
+ playsound(loc, "sparks", 100, 1)
+ desc += "The mech's equipment slots spark dangerously!"
+ else
+ to_chat(user, "[src]'s ID slot rejects the card.")
diff --git a/code/game/objects/effects/decals/Cleanable/robots.dm b/code/game/objects/effects/decals/Cleanable/robots.dm
index 16a9bf5a711..1c8ad706dc8 100644
--- a/code/game/objects/effects/decals/Cleanable/robots.dm
+++ b/code/game/objects/effects/decals/Cleanable/robots.dm
@@ -29,9 +29,7 @@
var/obj/effect/decal/cleanable/blood/oil/streak = new(src.loc)
streak.update_icon()
else if(prob(10))
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(3, 1, src)
- s.start()
+ do_sparks(3, 1, src)
if(step_to(src, get_step(src, direction), 0))
break
diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm
index 9dc62b3551e..130a50cac89 100644
--- a/code/game/objects/effects/decals/cleanable.dm
+++ b/code/game/objects/effects/decals/cleanable.dm
@@ -12,13 +12,13 @@
src.icon_state = pick(src.random_icon_states)
create_reagents(100)
if(smooth)
- smooth_icon(src)
- smooth_icon_neighbors(src)
+ queue_smooth(src)
+ queue_smooth_neighbors(src)
..()
/obj/effect/decal/cleanable/Destroy()
if(smooth)
- smooth_icon_neighbors(src)
+ queue_smooth_neighbors(src)
return ..()
/obj/effect/decal/cleanable/attackby(obj/item/W as obj, mob/user as mob,)
diff --git a/code/game/objects/effects/decals/remains.dm b/code/game/objects/effects/decals/remains.dm
index b97b149991b..77a51b4d975 100644
--- a/code/game/objects/effects/decals/remains.dm
+++ b/code/game/objects/effects/decals/remains.dm
@@ -22,12 +22,6 @@
icon_state = "remainsrobot"
anchored = TRUE
-/obj/effect/decal/remains/robot/New()
- ..()
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(3, 1, src)
- s.start()
-
/obj/effect/decal/remains/slime
name = "You shouldn't see this"
desc = "Noooooooooooooooooooooo"
diff --git a/code/game/objects/effects/effect_system/effect_system.dm b/code/game/objects/effects/effect_system/effect_system.dm
index d71e7631565..1231c8136fa 100644
--- a/code/game/objects/effects/effect_system/effect_system.dm
+++ b/code/game/objects/effects/effect_system/effect_system.dm
@@ -8,8 +8,9 @@ would spawn and follow the beaker, even if it is carried or thrown.
/obj/effect/particle_effect
name = "particle effect"
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
- unacidable = 1//So effects are not targeted by alien acid.
+ unacidable = TRUE //So effects are not targeted by alien acid.
pass_flags = PASSTABLE | PASSGRILLE
+ anchored = TRUE
/obj/effect/particle_effect/New()
..()
@@ -28,6 +29,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
var/atom/holder
var/effect_type
var/total_effects = 0
+ var/autocleanup = FALSE //will delete itself after use
/datum/effect_system/Destroy()
holder = null
@@ -71,3 +73,5 @@ would spawn and follow the beaker, even if it is carried or thrown.
/datum/effect_system/proc/decrement_total_effect()
total_effects--
+ if(autocleanup && total_effects <= 0)
+ qdel(src)
\ No newline at end of file
diff --git a/code/game/objects/effects/effect_system/effects_other.dm b/code/game/objects/effects/effect_system/effects_other.dm
index ef9ed8ac11a..194a37c860f 100644
--- a/code/game/objects/effects/effect_system/effects_other.dm
+++ b/code/game/objects/effects/effect_system/effects_other.dm
@@ -155,9 +155,7 @@
/datum/effect_system/reagents_explosion/start()
if(amount <= 2)
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(2, 1, location)
- s.start()
+ do_sparks(2, 1, location)
for(var/mob/M in viewers(5, location))
to_chat(M, "The solution violently explodes.")
diff --git a/code/game/objects/effects/effect_system/effects_sparks.dm b/code/game/objects/effects/effect_system/effects_sparks.dm
index 77925b3170a..f59f44ca1db 100644
--- a/code/game/objects/effects/effect_system/effects_sparks.dm
+++ b/code/game/objects/effects/effect_system/effects_sparks.dm
@@ -5,15 +5,26 @@
// will always spawn at the items location.
/////////////////////////////////////////////
+/proc/do_sparks(n, c, source)
+ // n - number of sparks
+ // c - cardinals, bool, do the sparks only move in cardinal directions?
+ // source - source of the sparks.
+
+ var/datum/effect_system/spark_spread/sparks = new
+ sparks.set_up(n, c, source)
+ sparks.autocleanup = TRUE
+ sparks.start()
+
/obj/effect/particle_effect/sparks
name = "sparks"
desc = "it's a spark what do you need to know?"
icon_state = "sparks"
- anchored = 1
+ anchored = TRUE
var/hotspottemp = 1000
/obj/effect/particle_effect/sparks/New()
..()
+ flick("sparks", src) // replay the animation
playsound(loc, "sparks", 100, 1)
var/turf/T = loc
if(isturf(T))
diff --git a/code/game/objects/effects/gibs.dm b/code/game/objects/effects/gibs.dm
index 3cffb3f7eaf..3b08c44114b 100644
--- a/code/game/objects/effects/gibs.dm
+++ b/code/game/objects/effects/gibs.dm
@@ -30,9 +30,7 @@
var/obj/effect/decal/cleanable/blood/gibs/gib = null
if(sparks)
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(2, 1, location)
- s.start()
+ do_sparks(2, 1, location)
for(var/i = 1, i<= gibtypes.len, i++)
if(gibamounts[i])
diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm
index 8323641c899..1b619faa41b 100644
--- a/code/game/objects/effects/mines.dm
+++ b/code/game/objects/effects/mines.dm
@@ -25,9 +25,7 @@
if(triggered)
return
visible_message("[victim] sets off [bicon(src)] [src]!")
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(3, 1, src)
- s.start()
+ do_sparks(3, 1, src)
mineEffect(victim)
triggered = 1
qdel(src)
diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm
index e190988392d..793d7265c27 100644
--- a/code/game/objects/effects/portals.dm
+++ b/code/game/objects/effects/portals.dm
@@ -57,9 +57,7 @@
/obj/effect/portal/proc/invalid_teleport()
visible_message("[src] flickers and fails due to bluespace interference!")
- var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
- spark_system.set_up(5, 0, loc)
- spark_system.start()
+ do_sparks(5, 0, loc)
qdel(src)
diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm
index b587c650c4c..7a25f4ece1b 100644
--- a/code/game/objects/items/devices/chameleonproj.dm
+++ b/code/game/objects/items/devices/chameleonproj.dm
@@ -67,10 +67,7 @@
/obj/item/chameleon/proc/disrupt(var/delete_dummy = 1)
if(active_dummy)
- var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread
- spark_system.set_up(5, 0, src)
- spark_system.attach(src)
- spark_system.start()
+ do_sparks(5, 0, src)
eject_all()
if(delete_dummy)
qdel(active_dummy)
diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm
index 175ca0886ad..8b53e3d8ed7 100644
--- a/code/game/objects/items/devices/megaphone.dm
+++ b/code/game/objects/items/devices/megaphone.dm
@@ -35,7 +35,7 @@
return
if(H.mind)
span = H.mind.speech_span
- if((COMIC in H.mutations) || H.get_int_organ(/obj/item/organ/internal/cyberimp/brain/clown_voice))
+ if((COMIC in H.mutations) || H.get_int_organ(/obj/item/organ/internal/cyberimp/brain/clown_voice) || istype(H.get_item_by_slot(slot_wear_mask), /obj/item/clothing/mask/gas/voice/clown))
span = "sans"
if(spamcheck)
to_chat(user, "\The [src] needs to recharge!")
diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm
index 9aa30053983..71fc397a2c4 100644
--- a/code/game/objects/items/devices/radio/electropack.dm
+++ b/code/game/objects/items/devices/radio/electropack.dm
@@ -87,9 +87,7 @@
if(M)
M.moved_recently = 0
to_chat(M, "You feel a sharp shock!")
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(3, 1, M)
- s.start()
+ do_sparks(3, 1, M)
M.Weaken(5)
diff --git a/code/game/objects/items/random_items.dm b/code/game/objects/items/random_items.dm
index 906c04ba8c8..e6e6fcfc8a0 100644
--- a/code/game/objects/items/random_items.dm
+++ b/code/game/objects/items/random_items.dm
@@ -51,9 +51,9 @@
/obj/item/reagent_containers/glass/bottle/random_reagent/New()
..()
var/list/possible_chems = GLOB.chemical_reagents_list.Copy()
- possible_chems -= blocked_chems.Copy()
+ possible_chems -= GLOB.blocked_chems.Copy()
var/datum/reagent/R = pick(possible_chems)
- if(rare_chemicals.Find(R))
+ if(GLOB.rare_chemicals.Find(R))
reagents.add_reagent(R, 10)
else
reagents.add_reagent(R, rand(2, 3)*10)
@@ -68,7 +68,7 @@
/obj/item/reagent_containers/glass/bottle/random_chem/New()
..()
var/R = get_random_reagent_id()
- if(rare_chemicals.Find(R))
+ if(GLOB.rare_chemicals.Find(R))
reagents.add_reagent(R, 10)
else
reagents.add_reagent(R, rand(2, 3)*10)
@@ -82,7 +82,7 @@
/obj/item/reagent_containers/glass/bottle/random_base_chem/New()
..()
- var/datum/reagent/R = pick(base_chemicals)
+ var/datum/reagent/R = pick(GLOB.base_chemicals)
reagents.add_reagent(R, rand(2, 6)*5)
name = "unlabelled bottle"
pixel_x = rand(-10, 10)
@@ -94,7 +94,7 @@
/obj/item/reagent_containers/food/drinks/bottle/random_drink/New()
..()
- var/list/possible_drinks = drinks.Copy()
+ var/list/possible_drinks = GLOB.drinks.Copy()
if(prob(50))
possible_drinks += list("pancuronium","lsd","omnizine","blood")
@@ -113,7 +113,7 @@
..()
var/R = get_random_reagent_id()
- if(rare_chemicals.Find(R))
+ if(GLOB.rare_chemicals.Find(R))
reagents.add_reagent(R, 10)
else
reagents.add_reagent(R, rand(3, 10)*10)
@@ -131,13 +131,13 @@
/obj/item/storage/pill_bottle/random_meds/New()
..()
for(var/i in 1 to storage_slots)
- var/list/possible_medicines = standard_medicines.Copy()
+ var/list/possible_medicines = GLOB.standard_medicines.Copy()
if(prob(50))
- possible_medicines += rare_medicines.Copy()
+ possible_medicines += GLOB.rare_medicines.Copy()
var/datum/reagent/R = pick(possible_medicines)
var/obj/item/reagent_containers/food/pill/P = new(src)
- if(rare_medicines.Find(R))
+ if(GLOB.rare_medicines.Find(R))
P.reagents.add_reagent(R, 10)
else
P.reagents.add_reagent(R, rand(2, 5)*10)
@@ -182,7 +182,7 @@
/obj/structure/closet/crate/secure/chemicals/New()
..()
- for(var/chem in standard_chemicals)
+ for(var/chem in GLOB.standard_chemicals)
var/obj/item/reagent_containers/glass/bottle/B = new(src)
B.reagents.add_reagent(chem, B.volume)
if(prob(85))
diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm
index 4064bf63adb..017dade9ac4 100644
--- a/code/game/objects/items/stacks/sheets/mineral.dm
+++ b/code/game/objects/items/stacks/sheets/mineral.dm
@@ -166,7 +166,7 @@ var/global/list/datum/stack_recipe/abductor_recipes = list ( \
/obj/item/stack/sheet/mineral/plasma/attackby(obj/item/W, mob/user, params)
if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite
- message_admins("Plasma sheets ignited by [key_name_admin(user)](?) (FLW) in ([x],[y],[z] - JMP)",0,1)
+ message_admins("Plasma sheets ignited by [key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) in ([x],[y],[z] - JMP)",0,1)
log_game("Plasma sheets ignited by [key_name(user)] in ([x],[y],[z])")
investigate_log("was ignited by [key_name(user)]","atmos")
fire_act()
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index bd06be3282b..3c33d8f66a0 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -54,7 +54,7 @@
to_chat(user, "There are [amount] [singular_name]\s in the stack.")
else
to_chat(user, "There are [amount] [name]\s in the stack.")
- to_chat(user,"Alt-click to take a custom amount.")
+ to_chat(user,"Ctrl-Shift-click to take a custom amount.")
/obj/item/stack/proc/add(newamount)
amount += newamount
@@ -269,7 +269,7 @@
else
..()
-/obj/item/stack/AltClick(mob/living/user)
+/obj/item/stack/CtrlShiftClick(mob/living/user)
if(!istype(user) || user.incapacitated())
to_chat(user, "You can't do that right now!")
return
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index c1b88897bfd..e672ff14b10 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -250,9 +250,7 @@
/obj/item/toy/snappop/virus/throw_impact(atom/hit_atom)
..()
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(3, 1, src)
- s.start()
+ do_sparks(3, 1, src)
new /obj/effect/decal/cleanable/ash(src.loc)
visible_message("The [name] explodes!","You hear a bang!")
playsound(src, 'sound/effects/snap.ogg', 50, 1)
@@ -270,9 +268,7 @@
var/ash_type = /obj/effect/decal/cleanable/ash
/obj/item/toy/snappop/proc/pop_burst(var/n=3, var/c=1)
- var/datum/effect_system/spark_spread/s = new()
- s.set_up(n, c, src)
- s.start()
+ do_sparks(n, c, src)
new ash_type(loc)
visible_message("[src] explodes!",
"You hear a snap!")
diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm
index 19f989ec7b7..dc691055420 100644
--- a/code/game/objects/items/weapons/RCD.dm
+++ b/code/game/objects/items/weapons/RCD.dm
@@ -152,8 +152,13 @@ RCD
var/obj/item/pda/pda = I
I = pda.id
var/obj/item/card/id/ID = I
- if(istype(ID) && ID && check_access(ID))
- locked = 0
+ if(istype(ID) && ID)
+ if(check_access(ID))
+ locked = 0
+ else
+ to_chat(usr, "This ID lacks access.")
+ else
+ to_chat(usr, "You can't swipe without your ID in hand.")
. = 1
if(href_list["logout"])
diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm
index daaa5c3e4c4..38051dde621 100644
--- a/code/game/objects/items/weapons/cards_ids.dm
+++ b/code/game/objects/items/weapons/cards_ids.dm
@@ -774,9 +774,9 @@
// Decals
/obj/item/id_decal
name = "identification card decal"
- desc = "A modification kit to make your ID cards look snazzy.."
- icon = 'icons/obj/device.dmi'
- icon_state = "batterer"
+ desc = "A nano-cellophane wrap that molds to an ID card to make it look snazzy."
+ icon = 'icons/obj/toy.dmi'
+ icon_state = "id_decal"
var/decal_name = "identification card"
var/decal_desc = "A card used to provide ID and determine access across the station."
var/decal_icon_state = "id"
@@ -784,30 +784,40 @@
var/override_name = 0
/obj/item/id_decal/gold
- name = "gold ID card card decal"
+ name = "gold ID card decal"
+ icon_state = "id_decal_gold"
+ desc = "Make your ID look like the Captain's or a self-centered HOP's. Applies to any ID."
decal_desc = "A golden card which shows power and might."
decal_icon_state = "gold"
decal_item_state = "gold_id"
/obj/item/id_decal/silver
name = "silver ID card decal"
+ icon_state = "id_decal_silver"
+ desc = "Make your ID look like HOP's because they wouldn't change it officially. Applies to any ID."
decal_desc = "A silver card which shows honour and dedication."
decal_icon_state = "silver"
decal_item_state = "silver_id"
/obj/item/id_decal/prisoner
name = "prisoner ID card decal"
+ icon_state = "id_decal_prisoner"
+ desc = "All the cool kids have an ID that's this color. Applies to any ID."
decal_desc = "You are a number, you are not a free man."
decal_icon_state = "prisoner"
decal_item_state = "orange-id"
/obj/item/id_decal/centcom
name = "centcom ID card decal"
+ icon_state = "id_decal_centcom"
+ desc = "All the prestige without the responsibility or the access. Applies to any ID."
decal_desc = "An ID straight from Cent. Com."
decal_icon_state = "centcom"
/obj/item/id_decal/emag
name = "cryptographic sequencer ID card decal"
+ icon_state = "id_decal_emag"
+ desc = "A bundle of wires that you can tape to your ID to look very suspect. Applies to any ID."
decal_name = "cryptographic sequencer"
decal_desc = "It's a card with a magnetic strip attached to some circuitry."
decal_icon_state = "emag"
diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm
index 26639543426..34877ac8788 100644
--- a/code/game/objects/items/weapons/explosives.dm
+++ b/code/game/objects/items/weapons/explosives.dm
@@ -79,7 +79,7 @@
src.target = AM
loc = null
- message_admins("[key_name_admin(user)](?) (FLW) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - JMP) with [det_time] second fuse",0,1)
+ message_admins("[key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - JMP) with [det_time] second fuse",0,1)
log_game("[key_name(user)] planted [name] on [target.name] at ([target.x],[target.y],[target.z]) with [det_time] second fuse")
target.overlays += image_overlay
@@ -88,7 +88,7 @@
addtimer(CALLBACK(src, .proc/prime), det_time*10)
/obj/item/grenade/plastic/suicide_act(mob/user)
- message_admins("[key_name_admin(user)](?) (FLW) suicided with [src.name] at ([user.x],[user.y],[user.z] - JMP)",0,1)
+ message_admins("[key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) suicided with [src.name] at ([user.x],[user.y],[user.z] - JMP)",0,1)
log_game("[key_name(user)] suicided with [name] at ([user.x],[user.y],[user.z])")
user.visible_message("[user] activates the [name] and holds it above [user.p_their()] head! It looks like [user.p_theyre()] going out with a bang!")
var/message_say = "FOR NO RAISIN!"
diff --git a/code/game/objects/items/weapons/fireworks.dm b/code/game/objects/items/weapons/fireworks.dm
index 138cb24ff40..d2e523cf953 100644
--- a/code/game/objects/items/weapons/fireworks.dm
+++ b/code/game/objects/items/weapons/fireworks.dm
@@ -25,7 +25,7 @@ obj/item/sparkler
icon = 'icons/obj/fireworks.dmi'
icon_state = "sparkler_0"
var/litzor = 0
- var/datum/effect_system/spark_spread/S
+
obj/item/sparkler/attackby(obj/item/W,mob/user, params)
if(litzor)
return
@@ -36,11 +36,7 @@ obj/item/sparkler/attackby(obj/item/W,mob/user, params)
icon_state = "sparkler_1"
var/b = rand(5,9)
for(var/xy, xy<=b, xy++)
- S = new()
- S.set_up(1,0,src.loc)
- if(ismob(src.loc) || isobj(src.loc))
- S.attach(src.loc)
- S.start()
+ do_sparks(1, 0, loc)
sleep(10)
qdel(src)
/obj/crate/fireworks
diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm
index 9e836fecc87..6d2bd3649cf 100644
--- a/code/game/objects/items/weapons/grenades/chem_grenade.dm
+++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm
@@ -289,7 +289,7 @@
var/mob/last = get_mob_by_ckey(nadeassembly.fingerprintslast)
var/turf/T = get_turf(src)
var/area/A = get_area(T)
- message_admins("grenade primed by an assembly, attached by [key_name_admin(M)](?) ([admin_jump_link(M)]) and last touched by [key_name_admin(last)](?) ([admin_jump_link(last)]) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] (JMP). [contained]")
+ message_admins("grenade primed by an assembly, attached by [key_name_admin(M)][ADMIN_QUE(M,"(?)")] ([admin_jump_link(M)]) and last touched by [key_name_admin(last)][ADMIN_QUE(last,"(?)")] ([admin_jump_link(last)]) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] (JMP). [contained]")
log_game("grenade primed by an assembly, attached by [key_name(M)] and last touched by [key_name(last)] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] ([T.x], [T.y], [T.z]) [contained]")
update_mob()
@@ -419,7 +419,7 @@
var/mob/last = get_mob_by_ckey(nadeassembly.fingerprintslast)
var/turf/T = get_turf(src)
var/area/A = get_area(T)
- message_admins("grenade primed by an assembly, attached by [key_name_admin(M)](?) (FLW) and last touched by [key_name_admin(last)](?) (FLW) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] (JMP).")
+ message_admins("grenade primed by an assembly, attached by [key_name_admin(M)][ADMIN_QUE(M,"(?)")] ([ADMIN_FLW(M,"FLW")]) and last touched by [key_name_admin(last)][ADMIN_QUE(last,"(?)")] ([ADMIN_FLW(last,"FLW")]) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] (JMP).")
log_game("grenade primed by an assembly, attached by [key_name(M)] and last touched by [key_name(last)] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] ([T.x], [T.y], [T.z])")
else
addtimer(CALLBACK(src, .proc/prime), det_time)
diff --git a/code/game/objects/items/weapons/legcuffs.dm b/code/game/objects/items/weapons/legcuffs.dm
index c705374f7a9..3391687f20a 100644
--- a/code/game/objects/items/weapons/legcuffs.dm
+++ b/code/game/objects/items/weapons/legcuffs.dm
@@ -136,9 +136,7 @@
/obj/item/restraints/legcuffs/beartrap/energy/proc/dissipate()
if(!ismob(loc))
- var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
- sparks.set_up(1, 1, src)
- sparks.start()
+ do_sparks(1, 1, src)
qdel(src)
/obj/item/restraints/legcuffs/beartrap/energy/attack_hand(mob/user)
diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm
index 2dcbef5b1a5..8ad283a77da 100644
--- a/code/game/objects/items/weapons/melee/energy.dm
+++ b/code/game/objects/items/weapons/melee/energy.dm
@@ -215,16 +215,8 @@
throw_speed = 3
throw_range = 1
w_class = WEIGHT_CLASS_BULKY //So you can't hide it in your pocket or some such.
- var/datum/effect_system/spark_spread/spark_system
sharp = 1
-//Most of the other special functions are handled in their own files. aka special snowflake code so kewl
-/obj/item/melee/energy/blade/New()
- ..()
- spark_system = new /datum/effect_system/spark_spread()
- spark_system.set_up(5, 0, src)
- spark_system.attach(src)
-
/obj/item/melee/energy/blade/attack_self(mob/user)
return
diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm
index 85a0e679bb6..cd2f6dff192 100644
--- a/code/game/objects/items/weapons/storage/backpack.dm
+++ b/code/game/objects/items/weapons/storage/backpack.dm
@@ -89,6 +89,24 @@
icon_state = "clownpack"
item_state = "clownpack"
+/obj/item/storage/backpack/clown/syndie
+
+/obj/item/storage/backpack/clown/syndie/New()
+ ..()
+ new /obj/item/clothing/under/rank/clown(src)
+ new /obj/item/clothing/shoes/magboots/clown(src)
+ new /obj/item/clothing/mask/gas/voice/clown(src)
+ new /obj/item/radio/headset/headset_service(src)
+ new /obj/item/pda/clown(src)
+ new /obj/item/reagent_containers/food/snacks/grown/banana(src)
+ new /obj/item/stamp/clown(src)
+ new /obj/item/toy/crayon/rainbow(src)
+ new /obj/item/storage/fancy/crayons(src)
+ new /obj/item/reagent_containers/spray/waterflower(src)
+ new /obj/item/reagent_containers/food/drinks/bottle/bottleofbanana(src)
+ new /obj/item/instrument/bikehorn(src)
+ new /obj/item/bikehorn(src)
+
/obj/item/storage/backpack/mime
name = "Parcel Parceaux"
desc = "A silent backpack made for those silent workers. Silence Co."
diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm
index bb78ba208ec..0a256136d2e 100644
--- a/code/game/objects/items/weapons/storage/secure.dm
+++ b/code/game/objects/items/weapons/storage/secure.dm
@@ -74,9 +74,7 @@
overlays += image('icons/obj/storage.dmi', icon_locking)
locked = 0
if(istype(weapon, /obj/item/melee/energy/blade))
- var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
- spark_system.set_up(5, 0, src.loc)
- spark_system.start()
+ do_sparks(5, 0, loc)
playsound(loc, 'sound/weapons/blade1.ogg', 50, 1)
playsound(loc, "sparks", 50, 1)
to_chat(user, "You slice through the lock on [src].")
diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm
index 4defb3b4aae..be803058ea7 100644
--- a/code/game/objects/items/weapons/storage/storage.dm
+++ b/code/game/objects/items/weapons/storage/storage.dm
@@ -100,6 +100,8 @@
return L
/obj/item/storage/proc/show_to(mob/user as mob)
+ if(!user.client)
+ return
if(user.s_active != src)
for(var/obj/item/I in src)
if(I.on_found(user))
diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm
index 56bf5538b02..b9d383b9308 100644
--- a/code/game/objects/items/weapons/stunbaton.dm
+++ b/code/game/objects/items/weapons/stunbaton.dm
@@ -139,12 +139,15 @@
/obj/item/melee/baton/proc/baton_stun(mob/living/L, mob/user)
+ if(!ismob(L)) //because this was being called on turfs for some reason
+ return
+
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.check_shields(0, "[user]'s [name]", src, MELEE_ATTACK)) //No message; check_shields() handles that
playsound(L, 'sound/weapons/Genhit.ogg', 50, 1)
return
-
+
L.Stun(stunforce)
L.Weaken(stunforce)
L.apply_effect(STUTTER, stunforce)
diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm
index 08a6a3e168c..b30d932eed2 100644
--- a/code/game/objects/items/weapons/tools.dm
+++ b/code/game/objects/items/weapons/tools.dm
@@ -120,7 +120,7 @@
name = "screwdriver"
desc = "You can be totally screwy with this."
icon = 'icons/obj/tools.dmi'
- icon_state = null
+ icon_state = "screwdriver_map"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 5
@@ -133,6 +133,7 @@
hitsound = 'sound/weapons/bladeslice.ogg'
usesound = 'sound/items/Screwdriver.ogg'
toolspeed = 1
+ var/random_color = TRUE //if the screwdriver uses random coloring
/obj/item/screwdriver/nuke
name = "screwdriver"
@@ -146,7 +147,7 @@
/obj/item/screwdriver/New(loc, var/param_color = null)
..()
- if(!icon_state)
+ if(random_color)
if(!param_color)
param_color = pick("red","blue","pink","brown","green","cyan","yellow")
icon_state = "screwdriver_[param_color]"
@@ -168,6 +169,7 @@
desc = "A screwdriver made of brass. The handle feels freezing cold."
icon_state = "screwdriver_brass"
toolspeed = 0.5
+ random_color = FALSE
/obj/item/screwdriver/abductor
name = "alien screwdriver"
@@ -176,6 +178,7 @@
icon_state = "screwdriver"
usesound = 'sound/items/PSHOOM.ogg'
toolspeed = 0.1
+ random_color = FALSE
/obj/item/screwdriver/power
name = "hand drill"
@@ -192,6 +195,7 @@
hitsound = 'sound/items/drill_hit.ogg'
usesound = 'sound/items/drill_use.ogg'
toolspeed = 0.25
+ random_color = FALSE
/obj/item/screwdriver/power/suicide_act(mob/user)
user.visible_message("[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!")
@@ -215,7 +219,7 @@
name = "wirecutters"
desc = "This cuts wires."
icon = 'icons/obj/tools.dmi'
- icon_state = null
+ icon_state = "cutters"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 6
@@ -229,10 +233,11 @@
usesound = 'sound/items/Wirecutter.ogg'
sharp = 1
toolspeed = 1
+ var/random_color = TRUE
/obj/item/wirecutters/New(loc, param_color = null)
..()
- if(!icon_state)
+ if(random_color)
if(!param_color)
param_color = pick("yellow", "red")
icon_state = "cutters_[param_color]"
@@ -258,6 +263,7 @@
desc = "A pair of wirecutters made of brass. The handle feels freezing cold to the touch."
icon_state = "cutters_brass"
toolspeed = 0.5
+ random_color = FALSE
/obj/item/wirecutters/abductor
name = "alien wirecutters"
@@ -266,6 +272,7 @@
icon_state = "cutters"
toolspeed = 0.1
origin_tech = "materials=5;engineering=4;abductor=3"
+ random_color = FALSE
/obj/item/wirecutters/cyborg
name = "wirecutters"
@@ -281,6 +288,7 @@
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
usesound = 'sound/items/jaws_cut.ogg'
toolspeed = 0.25
+ random_color = FALSE
/obj/item/wirecutters/power/suicide_act(mob/user)
user.visible_message("[user] is wrapping \the [src] around [user.p_their()] neck. It looks like [user.p_theyre()] trying to rip [user.p_their()] head off!")
diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm
index 9b50956f1af..9418df86368 100644
--- a/code/game/objects/items/weapons/twohanded.dm
+++ b/code/game/objects/items/weapons/twohanded.dm
@@ -614,9 +614,7 @@
origin_tech = "combat=4;powerstorage=7"
/obj/item/twohanded/mjollnir/proc/shock(mob/living/target)
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread()
- s.set_up(5, 1, target.loc)
- s.start()
+ do_sparks(5, 1, target.loc)
target.visible_message("[target.name] was shocked by the [name]!", \
"You feel a powerful shock course through your body sending you flying!", \
"You hear a heavy electrical crack!")
@@ -739,9 +737,7 @@
Z.take_organ_damage(0, 30)
user.visible_message("[user] slams the charged axe into [Z.name] with all [user.p_their()] might!")
playsound(loc, 'sound/magic/lightningbolt.ogg', 5, 1)
- var/datum/effect_system/spark_spread/sparks = new /datum/effect_system/spark_spread
- sparks.set_up(1, 1, src)
- sparks.start()
+ do_sparks(1, 1, src)
if(A && wielded && (istype(A, /obj/structure/window) || istype(A, /obj/structure/grille)))
if(istype(A, /obj/structure/window))
diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm
index f74a3b542ca..e38350a0136 100644
--- a/code/game/objects/structures.dm
+++ b/code/game/objects/structures.dm
@@ -32,8 +32,8 @@
..()
if(smooth)
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
- smooth_icon(src)
- smooth_icon_neighbors(src)
+ queue_smooth(src)
+ queue_smooth_neighbors(src)
icon_state = ""
if(climbable)
verbs += /obj/structure/proc/climb_on
@@ -46,7 +46,7 @@
if(smooth)
var/turf/T = get_turf(src)
spawn(0)
- smooth_icon_neighbors(T)
+ queue_smooth_neighbors(T)
return ..()
/obj/structure/proc/climb_on()
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 2f681c79d76..8e328c9400e 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -206,9 +206,7 @@
if(!(E.rcell && E.rcell.use(E.chargecost)))
to_chat(user, "Unable to teleport, insufficient charge.")
return
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(5, 1, src)
- s.start()
+ do_sparks(5, 1, src)
do_teleport(src, E.pad, 0)
to_chat(user, "Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.")
return
@@ -233,9 +231,7 @@
if(!(E.rcell && E.rcell.use(E.chargecost)))
to_chat(user, "Unable to teleport, insufficient charge.")
return
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(5, 1, src)
- s.start()
+ do_sparks(5, 1, src)
do_teleport(src, L)
to_chat(user, "Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.")
return
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
index 2a5639eb081..b5b29e8caac 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
@@ -253,6 +253,7 @@
new /obj/item/clothing/accessory/holster(src)
new /obj/item/clothing/accessory/blue(src)
new /obj/item/clothing/shoes/jackboots/jacksandals(src)
+ new /obj/item/clothing/under/rank/centcom/blueshield(src)
/obj/structure/closet/secure_closet/ntrep
diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm
index 648f3c95622..87cae2fb993 100644
--- a/code/game/objects/structures/crates_lockers/crates.dm
+++ b/code/game/objects/structures/crates_lockers/crates.dm
@@ -38,15 +38,13 @@
if(isliving(usr))
var/mob/living/L = usr
if(L.electrocute_act(17, src))
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(5, 1, src)
- s.start()
+ do_sparks(5, 1, src)
return 2
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
for(var/obj/O in src) //Objects
- O.forceMove(loc)
- for(var/mob/M in src) //Mobs
+ O.forceMove(loc)
+ for(var/mob/M in src) //Mobs
M.forceMove(loc)
icon_state = icon_opened
src.opened = 1
@@ -115,9 +113,7 @@
if(!(E.rcell && E.rcell.use(E.chargecost)))
to_chat(user, "Unable to teleport, insufficient charge.")
return
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(5, 1, src)
- s.start()
+ do_sparks(5, 1, src)
do_teleport(src, E.pad, 0)
to_chat(user, "Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.")
return
@@ -139,9 +135,7 @@
if(!(E.rcell && E.rcell.use(E.chargecost)))
to_chat(user, "Unable to teleport, insufficient charge.")
return
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(5, 1, src)
- s.start()
+ do_sparks(5, 1, src)
do_teleport(src, L)
to_chat(user, "Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.")
return
@@ -217,9 +211,7 @@
if(isliving(user))
var/mob/living/L = user
if(L.electrocute_act(17, src))
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(5, 1, src)
- s.start()
+ do_sparks(5, 1, src)
return
src.add_fingerprint(user)
src.toggle(user)
diff --git a/code/game/objects/structures/electricchair.dm b/code/game/objects/structures/electricchair.dm
index 348c6fde265..dcbc7c017bb 100644
--- a/code/game/objects/structures/electricchair.dm
+++ b/code/game/objects/structures/electricchair.dm
@@ -69,9 +69,7 @@
A.updateicon()
flick("echair_shock", src)
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(12, 1, src)
- s.start()
+ do_sparks(12, 1, src)
visible_message("The electric chair went off!", "You hear a deep sharp shock!")
if(buckled_mob)
buckled_mob.electrocute_act(110, src, 1)
diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm
index 31239a5ecb4..98d17d71be9 100644
--- a/code/game/objects/structures/false_walls.dm
+++ b/code/game/objects/structures/false_walls.dm
@@ -82,7 +82,7 @@
if(density)
icon_state = initial(icon_state)
smooth = SMOOTH_TRUE
- smooth_icon(src)
+ queue_smooth(src)
else
icon_state = "fwall_open"
@@ -322,4 +322,4 @@
mineral = /obj/item/stack/sheet/mineral/plastitanium
walltype = /turf/simulated/wall/mineral/plastitanium
smooth = SMOOTH_MORE
- canSmoothWith = list(/turf/simulated/wall/mineral/plastitanium, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater)
\ No newline at end of file
+ canSmoothWith = list(/turf/simulated/wall/mineral/plastitanium, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock, /obj/structure/window/full/shuttle, /obj/structure/shuttle/engine/heater)
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 6b8f5544428..22b796c4c20 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -254,9 +254,7 @@
var/obj/structure/cable/C = T.get_cable_node()
if(C)
if(electrocute_mob(user, C, src))
- var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
- s.set_up(3, 1, src)
- s.start()
+ do_sparks(3, 1, src)
return 1
else
return 0
diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm
index 44c9da74b20..7cee3769888 100644
--- a/code/game/objects/structures/safe.dm
+++ b/code/game/objects/structures/safe.dm
@@ -6,29 +6,44 @@ FLOOR SAFES
//SAFES
/obj/structure/safe
- name = "safe"
+ name = "\improper Safe"
desc = "A huge chunk of metal with a dial embedded in it. Fine print on the dial reads \"Scarborough Arms - 2 tumbler safe, guaranteed thermite resistant, explosion resistant, and assistant resistant.\""
icon = 'icons/obj/structures.dmi'
icon_state = "safe"
anchored = 1
density = 1
- var/open = 0 //is the safe open?
+ var/open = FALSE //is the safe open?
+ var/unlocked = FALSE
var/tumbler_1_pos //the tumbler position- from 0 to 72
var/tumbler_1_open //the tumbler position to open at- 0 to 72
var/tumbler_2_pos
var/tumbler_2_open
+ var/open_pos
var/dial = 0 //where is the dial pointing?
var/space = 0 //the combined w_class of everything in the safe
var/maxspace = 24 //the maximum combined w_class of stuff in the safe
+ var/combo_to_open //so admins know the code
/obj/structure/safe/New()
- tumbler_1_pos = rand(0, 71)
- tumbler_1_open = rand(0, 71)
+ tumbler_2_pos = rand(0, 99) // first value in the combination set first
+ tumbler_2_open = rand(0, 99)
- tumbler_2_pos = rand(0, 71)
- tumbler_2_open = rand(0, 71)
+ tumbler_1_pos = rand(0, 99)
+ do
+ tumbler_1_open = rand(0, 99)
+ while(tumbler_1_open > Wrap(tumbler_2_open +48, 0, 100) && tumbler_1_open < Wrap(tumbler_2_open + 53, 0, 100)) // prevents a combination that wont open
+ do
+ open_pos = rand(0,99)
+ while(open_pos > Wrap(tumbler_1_open - 2, 0, 100) && open_pos < Wrap(tumbler_1_open + 2, 0, 100)) // prevents a combination that wont open
+ var/num1 = tumbler_2_open + 54
+ if(num1 > 99)
+ num1 = num1 - 100
+ var/num2 = tumbler_1_open + 98
+ if(num2 > 99)
+ num2 = num2 - 100
+ combo_to_open = "Go right past [num1] twice then stop at [num1]. Go left past [num2] once then stop at [num2]. Turn right till it stops and its open."
/obj/structure/safe/Initialize()
..()
@@ -40,31 +55,28 @@ FLOOR SAFES
I.loc = src
-/obj/structure/safe/proc/check_unlocked(mob/user, canhear)
+/obj/structure/safe/proc/check_unlocked()
+ if(tumbler_1_pos == tumbler_1_open && tumbler_2_pos == tumbler_2_open && dial == open_pos)
+ unlocked = TRUE
+ return TRUE
+ unlocked = FALSE
+ return FALSE
+
+/obj/structure/safe/proc/make_noise(turns, turns_total, tum1 = 0, tum2 = 0, mob/user, canhear)
if(user && canhear)
- if(tumbler_1_pos == tumbler_1_open)
+ if(turns == 2)
+ to_chat(user, "The sounds from [src] are too fast and blend together.")
+ if(tum1 && (turns_total == 1 || prob(10))) // So multi turns dont super spam the chat
+ to_chat(user, "You hear a [pick("clack", "scrape", "clank")] from [src].")
+ if(tum2 && (turns_total == 1 || prob(10))) // So multi turns dont super spam the chat
+ to_chat(user, "You hear a [pick("click", "chink", "clink")] from [src].")
+ if(tumbler_1_pos == tumbler_1_open && turns_total == 1) // You cant hear tumblers if you spin fast!
to_chat(user, "You hear a [pick("tonk", "krunk", "plunk")] from [src].")
- if(tumbler_2_pos == tumbler_2_open)
+ if(tumbler_2_pos == tumbler_2_open && turns_total == 1 ) // You cant hear tumblers if you spin fast!
to_chat(user, "You hear a [pick("tink", "krink", "plink")] from [src].")
- if(tumbler_1_pos == tumbler_1_open && tumbler_2_pos == tumbler_2_open)
- if(user) visible_message("[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!")
- return 1
- return 0
-
-
-/obj/structure/safe/proc/decrement(num)
- num -= 1
- if(num < 0)
- num = 71
- return num
-
-
-/obj/structure/safe/proc/increment(num)
- num += 1
- if(num > 71)
- num = 0
- return num
-
+ if(unlocked)
+ if(user)
+ visible_message("[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!")
/obj/structure/safe/update_icon()
if(open)
@@ -72,75 +84,112 @@ FLOOR SAFES
else
icon_state = initial(icon_state)
-
/obj/structure/safe/attack_hand(mob/user)
- user.set_machine(src)
- var/dat = ""
- for(var/i = contents.len, i>=1, i--)
- var/obj/item/P = contents[i]
- dat += "
"
- dat += "[P.name]
\[ "
body += "VV - "
- body += "TP - "
- body += "PM - "
- body += "SM - "
+ body += "[ADMIN_TP(M,"TP")] - "
+ body += "PM - "
+ body += "[ADMIN_SM(M,"SM")] - "
if(ishuman(M) && M.mind)
body += "HM -"
body += "[admin_jump_link(M)]\]
"
@@ -70,45 +70,45 @@ var/global/nologevent = 0
if(M.client.related_accounts_ip.len)
body += "Related accounts by IP: [jointext(M.client.related_accounts_ip, " - ")]
"
- body += "Kick | "
+ body += "Kick | "
body += "Warn | "
- body += "Ban | "
- body += "Jobban | "
- body += "Appearance Ban | "
+ body += "Ban | "
+ body += "Jobban | "
+ body += "Appearance Ban | "
body += "Notes | "
if(M.client)
if(M.client.check_watchlist(M.client.ckey))
body += "Remove from Watchlist | "
body += "Edit Watchlist Reason "
else
- body += "Add to Watchlist "
+ body += "Add to Watchlist "
if(M.client)
- body += "| Prison | "
- body += "\ Send back to Lobby | "
+ body += "| Prison | "
+ body += "\ Send back to Lobby | "
var/muted = M.client.prefs.muted
body += {"
Mute:
- \[IC |
- OOC |
- PRAY |
- ADMINHELP |
- DEADCHAT\]
- (toggle all)
+ \[IC |
+ OOC |
+ PRAY |
+ ADMINHELP |
+ DEADCHAT\]
+ (toggle all)
"}
var/jumptoeye = ""
if(isAI(M))
var/mob/living/silicon/ai/A = M
if(A.client && A.eyeobj) // No point following clientless AI eyes
- jumptoeye = " (Eye)"
+ jumptoeye = " (Eye)"
body += {"
- Jump to[jumptoeye] |
- Get |
- Send To
+ Jump to[jumptoeye] |
+ Get |
+ Send To
- [check_rights(R_ADMIN,0) ? "Traitor panel | " : "" ]
- Narrate to |
- Subtle message
+ [check_rights(R_ADMIN,0) ? "[ADMIN_TP(M,"Traitor panel")] | " : "" ]
+ Narrate to |
+ [ADMIN_SM(M,"Subtle message")]
"}
if(check_rights(R_EVENT, 0))
@@ -128,39 +128,39 @@ var/global/nologevent = 0
if(issmall(M))
body += "Monkeyized | "
else
- body += "Monkeyize | "
+ body += "Monkeyize | "
//Corgi
if(iscorgi(M))
body += "Corgized | "
else
- body += "Corgize | "
+ body += "Corgize | "
//AI / Cyborg
if(isAI(M))
body += "Is an AI "
else if(ishuman(M))
- body += {"Make AI |
- Make Mask |
- Make Robot |
- Make Alien |
- Make Slime |
- Make Superhero
+ body += {"Make AI |
+ Make Mask |
+ Make Robot |
+ Make Alien |
+ Make Slime |
+ Make Superhero
"}
//Simple Animals
if(isanimal(M))
- body += "Re-Animalize | "
+ body += "Re-Animalize | "
else
- body += "Animalize | "
+ body += "Animalize | "
if(istype(M, /mob/dead/observer))
- body += "Re-incarnate | "
+ body += "Re-incarnate | "
if(ispAI(M))
body += "Is a pAI "
else
- body += "Make pAI | "
+ body += "Make pAI | "
// DNA2 - Admin Hax
if(M.dna && iscarbon(M))
@@ -175,7 +175,7 @@ var/global/nologevent = 0
if(bname)
var/bstate=M.dna.GetSEState(block)
var/bcolor="[(bstate)?"#006600":"#ff0000"]"
- body += "[bname][block]"
+ body += "[bname][block]"
else
body += "[block]"
body+=""
@@ -183,39 +183,39 @@ var/global/nologevent = 0
body += {"
Rudimentary transformation:
These transformations only create a new mob type and copy stuff over. They do not take into account MMIs and similar mob-specific things. The buttons in 'Transformations' are preferred, when possible.
- Observer |
- \[ Alien: Drone,
- Hunter,
- Queen,
- Sentinel,
- Larva \]
- Human
- \[ slime: Baby,
- Adult \]
- Monkey |
- Cyborg |
- Cat |
- Runtime |
- Corgi |
- Ian |
- Crab |
- Coffee |
- \[ Construct: Armoured ,
- Builder ,
- Wraith \]
- Shade
+ Observer |
+ \[ Alien: Drone,
+ Hunter,
+ Queen,
+ Sentinel,
+ Larva \]
+ Human
+ \[ slime: Baby,
+ Adult \]
+ Monkey |
+ Cyborg |
+ Cat |
+ Runtime |
+ Corgi |
+ Ian |
+ Crab |
+ Coffee |
+ \[ Construct: Armoured ,
+ Builder ,
+ Wraith \]
+ Shade
"}
if(M.client)
body += {"
Other actions:
- Forcesay |
- Admin Room |
- Thunderdome 1 |
- Thunderdome 2 |
- Thunderdome Admin |
- Thunderdome Observer |
+ Forcesay |
+ Admin Room |
+ Thunderdome 1 |
+ Thunderdome 2 |
+ Thunderdome Admin |
+ Thunderdome Observer |
"}
body += {"
@@ -953,7 +953,7 @@ var/gamma_ship_location = 1 // 0 = station , 1 = space
return "[A.name] - [loc.x],[loc.y],[loc.z]"
/proc/formatPlayerPanel(var/mob/U,var/text="PP")
- return "[text]"
+ return "[ADMIN_PP(U,"[text]")]"
//Kicks all the clients currently in the lobby. The second parameter (kick_only_afk) determins if an is_afk() check is ran, or if all clients are kicked
//defaults to kicking everyone (afk + non afk clients in the lobby)
diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm
index 9a39c51d971..8c83961d8ad 100644
--- a/code/modules/admin/player_panel.dm
+++ b/code/modules/admin/player_panel.dm
@@ -61,7 +61,7 @@
}
- function expand(id,job,name,real_name,image,key,ip,antagonist,ref,eyeref){
+ function expand(id,job,name,real_name,image,key,ip,antagonist,UID,eyeUID){
clearAll();
@@ -75,15 +75,15 @@
body += "