"
- if(!autolink)
- dat += {"
- Frequency: [frequency]
- Code: [code]
- Probe Generators
- "}
+ break
- if(magnets.len >= 1)
+ looping = 1
- dat += "Magnets confirmed: "
- var/i = 0
- for(var/obj/machinery/magnetic_module/M in magnets)
- i++
- dat += " < \[[i]\] ([M.on ? "On":"Off"]) | Electricity level: - [M.electricity_level] +; Magnetic field: - [M.magnetic_field] + "
+ // Prepare the radio signal
+ var/datum/signal/signal = new
+ signal.transmission_method = 1 // radio transmission
+ signal.source = src
+ signal.frequency = frequency
+ signal.data["code"] = code
- dat += " Speed: - [speed] + "
- dat += "Path: {[path]} "
- dat += "Moving: [moving ? "Enabled":"Disabled"]"
+ if(pathpos > rpath.len) // if the position is greater than the length, we just loop through the list!
+ pathpos = 1
+
+ var/nextmove = uppertext(rpath[pathpos]) // makes it un-case-sensitive
+
+ if(!(nextmove in list("N","S","E","W","C","R")))
+ // N, S, E, W are directional
+ // C is center
+ // R is random (in magnetic field's bounds)
+ qdel(signal)
+ break // break the loop if the character located is invalid
+
+ signal.data["command"] = nextmove
- user << browse(dat, "window=magnet;size=400x500")
- onclose(user, "magnet")
-
- Topic(href, href_list)
- if(stat & (BROKEN|NOPOWER))
- return
- usr.set_machine(src)
- src.add_fingerprint(usr)
-
- if(href_list["radio-op"])
-
- // Prepare signal beforehand, because this is a radio operation
- var/datum/signal/signal = new
- signal.transmission_method = 1 // radio transmission
- signal.source = src
- signal.frequency = frequency
- signal.data["code"] = code
-
- // Apply any necessary commands
- switch(href_list["radio-op"])
- if("togglepower")
- signal.data["command"] = "toggle-power"
-
- if("minuselec")
- signal.data["command"] = "sub-elec"
- if("pluselec")
- signal.data["command"] = "add-elec"
-
- if("minusmag")
- signal.data["command"] = "sub-mag"
- if("plusmag")
- signal.data["command"] = "add-mag"
-
-
- // Broadcast the signal
+ pathpos++ // increase iterator
+ // Broadcast the signal
+ spawn()
radio_connection.post_signal(src, signal, filter = RADIO_MAGNETS)
- spawn(1)
- updateUsrDialog() // pretty sure this increases responsiveness
+ if(speed == 10)
+ sleep(1)
+ else
+ sleep(12-speed)
- if(href_list["operation"])
- switch(href_list["operation"])
- if("plusspeed")
- speed++
- if(speed > 10)
- speed = 10
- if("minusspeed")
- speed --
- if(speed <= 0)
- speed = 1
- if("setpath")
- var/newpath = sanitize(copytext(input(usr, "Please define a new path!",,path) as text|null,1,MAX_MESSAGE_LEN))
- if(newpath && newpath != "")
- moving = 0 // stop moving
- path = newpath
- pathpos = 1 // reset position
- filter_path() // renders rpath
-
- if("togglemoving")
- moving = !moving
- if(moving)
- spawn() MagnetMove()
+ looping = 0
- updateUsrDialog()
+/obj/machinery/magnetic_controller/proc/filter_path()
+ // Generates the rpath variable using the path string, think of this as "string2list"
+ // Doesn't use params2list() because of the akward way it stacks entities
+ rpath = list() // clear rpath
+ var/maximum_character = min( 50, length(path) ) // chooses the maximum length of the iterator. 50 max length
- proc/MagnetMove()
- if(looping) return
+ for(var/i=1, i<=maximum_character, i++) // iterates through all characters in path
- while(moving && rpath.len >= 1)
+ var/nextchar = copytext(path, i, i+1) // find next character
- if(stat & (BROKEN|NOPOWER))
- break
+ if(!(nextchar in list(";", "&", "*", " "))) // if char is a separator, ignore
+ rpath += copytext(path, i, i+1) // else, add to list
- looping = 1
-
- // Prepare the radio signal
- var/datum/signal/signal = new
- signal.transmission_method = 1 // radio transmission
- signal.source = src
- signal.frequency = frequency
- signal.data["code"] = code
-
- if(pathpos > rpath.len) // if the position is greater than the length, we just loop through the list!
- pathpos = 1
-
- var/nextmove = uppertext(rpath[pathpos]) // makes it un-case-sensitive
-
- if(!(nextmove in list("N","S","E","W","C","R")))
- // N, S, E, W are directional
- // C is center
- // R is random (in magnetic field's bounds)
- qdel(signal)
- break // break the loop if the character located is invalid
-
- signal.data["command"] = nextmove
-
-
- pathpos++ // increase iterator
-
- // Broadcast the signal
- spawn()
- radio_connection.post_signal(src, signal, filter = RADIO_MAGNETS)
-
- if(speed == 10)
- sleep(1)
- else
- sleep(12-speed)
-
- looping = 0
-
-
- proc/filter_path()
- // Generates the rpath variable using the path string, think of this as "string2list"
- // Doesn't use params2list() because of the akward way it stacks entities
- rpath = list() // clear rpath
- var/maximum_character = min( 50, length(path) ) // chooses the maximum length of the iterator. 50 max length
-
- for(var/i=1, i<=maximum_character, i++) // iterates through all characters in path
-
- var/nextchar = copytext(path, i, i+1) // find next character
-
- if(!(nextchar in list(";", "&", "*", " "))) // if char is a separator, ignore
- rpath += copytext(path, i, i+1) // else, add to list
-
- // there doesn't HAVE to be separators but it makes paths syntatically visible
+ // there doesn't HAVE to be separators but it makes paths syntatically visible
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+= "Suit storage unit: Maintenance panel"
dat+= "Maintenance panel controls"
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 += "Suit storage unit"
dat+= "Unit is cauterising contents with selected UV ray intensity. Please wait. "
- //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+= "Suit storage unit"
dat+= "Unit chamber is too contaminated to continue usage. Please call for a qualified individual to perform maintenance.
"
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 = "Suit Cycler Interface"
-
- if(src.active)
- 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 += "
\"[pick("I want to switch teams.", "I want to work for you.", "Let me join you.", "I can be of use to you.", "You want me working for you, and here's why...", "Give me an objective.", "How's the 401k over at the Syndicate?")]\" "
- dat += temptext
- user << browse(dat, "window=syndbeacon")
- onclose(user, "syndbeacon")
+/obj/machinery/syndicate_beacon/attack_hand(var/mob/user as mob)
+ usr.set_machine(src)
+ var/dat = "Scanning [pick("retina pattern", "voice print", "fingerprints", "dna sequence")]... Identity confirmed, "
+ if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai))
+ if(is_special_character(user))
+ dat += "Operative record found. Greetings, Agent [user.name]. "
+ else if(charges < 1)
+ dat += "Connection severed. "
+ else
+ var/honorific = "Mr."
+ if(user.gender == FEMALE)
+ honorific = "Ms."
+ dat += "Identity not found in operative database. What can the Syndicate do for you today, [honorific] [user.name]? "
+ if(!selfdestructing)
+ dat += "
\"[pick("I want to switch teams.", "I want to work for you.", "Let me join you.", "I can be of use to you.", "You want me working for you, and here's why...", "Give me an objective.", "How's the 401k over at the Syndicate?")]\" "
+ dat += temptext
+ user << browse(dat, "window=syndbeacon")
+ onclose(user, "syndbeacon")
- Topic(href, href_list)
- if(..())
- return 1
- if(href_list["betraitor"])
- if(charges < 1)
+/obj/machinery/syndicate_beacon/Topic(href, href_list)
+ if(..())
+ return 1
+ if(href_list["betraitor"])
+ if(charges < 1)
+ src.updateUsrDialog()
+ return
+ var/mob/M = locate(href_list["traitormob"])
+ if(M.mind.special_role)
+ temptext = "We have no need for you at this time. Have a pleasant day. "
+ src.updateUsrDialog()
+ return
+ charges -= 1
+ switch(rand(1,2))
+ if(1)
+ temptext = "Double-crosser. You planned to betray us from the start. Allow us to repay the favor in kind."
src.updateUsrDialog()
+ spawn(rand(50,200)) selfdestruct()
return
- var/mob/M = locate(href_list["traitormob"])
- if(M.mind.special_role)
- temptext = "We have no need for you at this time. Have a pleasant day. "
- src.updateUsrDialog()
- return
- charges -= 1
- switch(rand(1,2))
- if(1)
- temptext = "Double-crosser. You planned to betray us from the start. Allow us to repay the favor in kind."
- src.updateUsrDialog()
- spawn(rand(50,200)) selfdestruct()
- return
- if(istype(M, /mob/living/carbon/human))
- var/mob/living/carbon/human/N = M
- ticker.mode.equip_traitor(N)
- ticker.mode.traitors += N.mind
- N.mind.special_role = SPECIAL_ROLE_TRAITOR
- var/objective = "Free Objective"
- switch(rand(1,100))
- if(1 to 50)
- objective = "Steal [pick("a hand teleporter", "the Captain's antique laser gun", "a jetpack", "the Captain's ID", "the Captain's jumpsuit")]."
- if(51 to 60)
- objective = "Destroy 70% or more of the station's plasma tanks."
- if(61 to 70)
- objective = "Cut power to 80% or more of the station's tiles."
- if(71 to 80)
- objective = "Destroy the AI."
- if(81 to 90)
- objective = "Kill all monkeys aboard the station."
- else
- objective = "Make certain at least 80% of the station evacuates on the shuttle."
- var/datum/objective/custom_objective = new(objective)
- custom_objective.owner = N.mind
- N.mind.objectives += custom_objective
+ if(istype(M, /mob/living/carbon/human))
+ var/mob/living/carbon/human/N = M
+ ticker.mode.equip_traitor(N)
+ ticker.mode.traitors += N.mind
+ N.mind.special_role = SPECIAL_ROLE_TRAITOR
+ var/objective = "Free Objective"
+ switch(rand(1,100))
+ if(1 to 50)
+ objective = "Steal [pick("a hand teleporter", "the Captain's antique laser gun", "a jetpack", "the Captain's ID", "the Captain's jumpsuit")]."
+ if(51 to 60)
+ objective = "Destroy 70% or more of the station's plasma tanks."
+ if(61 to 70)
+ objective = "Cut power to 80% or more of the station's tiles."
+ if(71 to 80)
+ objective = "Destroy the AI."
+ if(81 to 90)
+ objective = "Kill all monkeys aboard the station."
+ else
+ objective = "Make certain at least 80% of the station evacuates on the shuttle."
+ var/datum/objective/custom_objective = new(objective)
+ custom_objective.owner = N.mind
+ N.mind.objectives += custom_objective
- var/datum/objective/escape/escape_objective = new
- escape_objective.owner = N.mind
- N.mind.objectives += escape_objective
+ var/datum/objective/escape/escape_objective = new
+ escape_objective.owner = N.mind
+ N.mind.objectives += escape_objective
- to_chat(M, "You have joined the ranks of the Syndicate and become a traitor to the station!")
+ to_chat(M, "You have joined the ranks of the Syndicate and become a traitor to the station!")
- message_admins("[key_name_admin(N)] has accepted a traitor objective from a syndicate beacon.")
+ message_admins("[key_name_admin(N)] has accepted a traitor objective from a syndicate beacon.")
- var/obj_count = 1
- for(var/datum/objective/OBJ in M.mind.objectives)
- to_chat(M, "Objective #[obj_count]: [OBJ.explanation_text]")
- obj_count++
+ var/obj_count = 1
+ for(var/datum/objective/OBJ in M.mind.objectives)
+ to_chat(M, "Objective #[obj_count]: [OBJ.explanation_text]")
+ obj_count++
- src.add_fingerprint(usr)
- src.updateUsrDialog()
- return
+ src.add_fingerprint(usr)
+ src.updateUsrDialog()
+ return
- proc/selfdestruct()
- selfdestructing = 1
- spawn() explosion(src.loc, rand(3,8), rand(1,3), 1, 10)
+/obj/machinery/syndicate_beacon/proc/selfdestruct()
+ selfdestructing = 1
+ spawn() explosion(src.loc, rand(3,8), rand(1,3), 1, 10)
@@ -196,4 +196,4 @@
/obj/machinery/power/singularity_beacon/syndicate
icontype = "beaconsynd"
- icon_state = "beaconsynd0"
\ No newline at end of file
+ icon_state = "beaconsynd0"
diff --git a/code/game/machinery/telecomms/presets.dm b/code/game/machinery/telecomms/presets.dm
index 0a12b637a39..539e4565d66 100644
--- a/code/game/machinery/telecomms/presets.dm
+++ b/code/game/machinery/telecomms/presets.dm
@@ -75,10 +75,10 @@
freq_listening = list(AI_FREQ, COMM_FREQ, ENG_FREQ, SEC_FREQ)
//Common and other radio frequencies for people to freely use
- New()
- for(var/i = PUBLIC_LOW_FREQ, i < PUBLIC_HIGH_FREQ, i += 2)
- freq_listening |= i
- ..()
+/obj/machinery/telecomms/receiver/preset_right/New()
+ for(var/i = PUBLIC_LOW_FREQ, i < PUBLIC_HIGH_FREQ, i += 2)
+ freq_listening |= i
+ ..()
/obj/machinery/telecomms/receiver/preset_cent
id = "CentComm Receiver"
diff --git a/code/game/mecha/mecha_parts.dm b/code/game/mecha/mecha_parts.dm
index a5a1bb95bc1..75b9fc6b1b8 100644
--- a/code/game/mecha/mecha_parts.dm
+++ b/code/game/mecha/mecha_parts.dm
@@ -33,9 +33,9 @@
/obj/item/mecha_parts/chassis/ripley
name = "Ripley Chassis"
- New()
- ..()
- construct = new /datum/construction/mecha/ripley_chassis(src)
+/obj/item/mecha_parts/chassis/ripley/New()
+ ..()
+ construct = new /datum/construction/mecha/ripley_chassis(src)
/obj/item/mecha_parts/part/ripley_torso
name="Ripley Torso"
@@ -68,9 +68,9 @@
/obj/item/mecha_parts/chassis/gygax
name = "Gygax Chassis"
- New()
- ..()
- construct = new /datum/construction/mecha/gygax_chassis(src)
+/obj/item/mecha_parts/chassis/gygax/New()
+ ..()
+ construct = new /datum/construction/mecha/gygax_chassis(src)
/obj/item/mecha_parts/part/gygax_torso
name="Gygax Torso"
@@ -117,9 +117,9 @@
/obj/item/mecha_parts/chassis/durand
name = "Durand Chassis"
- New()
- ..()
- construct = new /datum/construction/mecha/durand_chassis(src)
+/obj/item/mecha_parts/chassis/durand/New()
+ ..()
+ construct = new /datum/construction/mecha/durand_chassis(src)
/obj/item/mecha_parts/part/durand_torso
name="Durand Torso"
@@ -163,39 +163,18 @@
/obj/item/mecha_parts/chassis/firefighter
name = "Firefighter Chassis"
- New()
- ..()
- construct = new /datum/construction/mecha/firefighter_chassis(src)
-/*
-/obj/item/mecha_parts/part/firefighter_torso
- name="Ripley-on-Fire Torso"
- icon_state = "ripley_harness"
-
-/obj/item/mecha_parts/part/firefighter_left_arm
- name="Ripley-on-Fire Left Arm"
- icon_state = "ripley_l_arm"
-
-/obj/item/mecha_parts/part/firefighter_right_arm
- name="Ripley-on-Fire Right Arm"
- icon_state = "ripley_r_arm"
-
-/obj/item/mecha_parts/part/firefighter_left_leg
- name="Ripley-on-Fire Left Leg"
- icon_state = "ripley_l_leg"
-
-/obj/item/mecha_parts/part/firefighter_right_leg
- name="Ripley-on-Fire Right Leg"
- icon_state = "ripley_r_leg"
-*/
+/obj/item/mecha_parts/chassis/firefighter/New()
+ ..()
+ construct = new /datum/construction/mecha/firefighter_chassis(src)
////////// HONK
/obj/item/mecha_parts/chassis/honker
name = "H.O.N.K Chassis"
- New()
- ..()
- construct = new /datum/construction/mecha/honker_chassis(src)
+/obj/item/mecha_parts/chassis/honker/New()
+ ..()
+ construct = new /datum/construction/mecha/honker_chassis(src)
/obj/item/mecha_parts/part/honker_torso
name="H.O.N.K Torso"
@@ -275,9 +254,9 @@
/obj/item/mecha_parts/chassis/phazon
name = "Phazon Chassis"
- New()
- ..()
- construct = new /datum/construction/mecha/phazon_chassis(src)
+/obj/item/mecha_parts/chassis/phazon/New()
+ ..()
+ construct = new /datum/construction/mecha/phazon_chassis(src)
/obj/item/mecha_parts/part/phazon_torso
name="Phazon Torso"
@@ -319,9 +298,9 @@
/obj/item/mecha_parts/chassis/odysseus
name = "Odysseus Chassis"
- New()
- ..()
- construct = new /datum/construction/mecha/odysseus_chassis(src)
+/obj/item/mecha_parts/chassis/odysseus/New()
+ ..()
+ construct = new /datum/construction/mecha/odysseus_chassis(src)
/obj/item/mecha_parts/part/odysseus_head
name="Odysseus Head"
diff --git a/code/game/mecha/mecha_wreckage.dm b/code/game/mecha/mecha_wreckage.dm
index 204fcfc67f2..d108311b99d 100644
--- a/code/game/mecha/mecha_wreckage.dm
+++ b/code/game/mecha/mecha_wreckage.dm
@@ -15,10 +15,10 @@
var/list/crowbar_salvage
var/salvage_num = 5
- New()
- ..()
- crowbar_salvage = new
- return
+/obj/effect/decal/mecha_wreckage/New()
+ ..()
+ crowbar_salvage = new
+ return
/obj/effect/decal/mecha_wreckage/ex_act(severity)
if(severity < 2)
@@ -86,20 +86,20 @@
name = "Gygax wreckage"
icon_state = "gygax-broken"
- New()
- ..()
- var/list/parts = list(/obj/item/mecha_parts/part/gygax_torso,
- /obj/item/mecha_parts/part/gygax_head,
- /obj/item/mecha_parts/part/gygax_left_arm,
- /obj/item/mecha_parts/part/gygax_right_arm,
- /obj/item/mecha_parts/part/gygax_left_leg,
- /obj/item/mecha_parts/part/gygax_right_leg)
- for(var/i=0;i<2;i++)
- if(!isemptylist(parts) && prob(40))
- var/part = pick(parts)
- welder_salvage += part
- parts -= part
- return
+/obj/effect/decal/mecha_wreckage/gygax/New()
+ ..()
+ var/list/parts = list(/obj/item/mecha_parts/part/gygax_torso,
+ /obj/item/mecha_parts/part/gygax_head,
+ /obj/item/mecha_parts/part/gygax_left_arm,
+ /obj/item/mecha_parts/part/gygax_right_arm,
+ /obj/item/mecha_parts/part/gygax_left_leg,
+ /obj/item/mecha_parts/part/gygax_right_leg)
+ for(var/i=0;i<2;i++)
+ if(!isemptylist(parts) && prob(40))
+ var/part = pick(parts)
+ welder_salvage += part
+ parts -= part
+ return
/obj/effect/decal/mecha_wreckage/gygax/dark
name = "Dark Gygax wreckage"
@@ -126,38 +126,38 @@
name = "Ripley wreckage"
icon_state = "ripley-broken"
- New()
- ..()
- var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
- /obj/item/mecha_parts/part/ripley_left_arm,
- /obj/item/mecha_parts/part/ripley_right_arm,
- /obj/item/mecha_parts/part/ripley_left_leg,
- /obj/item/mecha_parts/part/ripley_right_leg)
- for(var/i=0;i<2;i++)
- if(!isemptylist(parts) && prob(40))
- var/part = pick(parts)
- welder_salvage += part
- parts -= part
- return
+/obj/effect/decal/mecha_wreckage/ripley/New()
+ ..()
+ var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
+ /obj/item/mecha_parts/part/ripley_left_arm,
+ /obj/item/mecha_parts/part/ripley_right_arm,
+ /obj/item/mecha_parts/part/ripley_left_leg,
+ /obj/item/mecha_parts/part/ripley_right_leg)
+ for(var/i=0;i<2;i++)
+ if(!isemptylist(parts) && prob(40))
+ var/part = pick(parts)
+ welder_salvage += part
+ parts -= part
+ return
/obj/effect/decal/mecha_wreckage/ripley/firefighter
name = "Firefighter wreckage"
icon_state = "firefighter-broken"
- New()
- ..()
- var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
- /obj/item/mecha_parts/part/ripley_left_arm,
- /obj/item/mecha_parts/part/ripley_right_arm,
- /obj/item/mecha_parts/part/ripley_left_leg,
- /obj/item/mecha_parts/part/ripley_right_leg,
- /obj/item/clothing/suit/fire)
- for(var/i=0;i<2;i++)
- if(!isemptylist(parts) && prob(40))
- var/part = pick(parts)
- welder_salvage += part
- parts -= part
- return
+/obj/effect/decal/mecha_wreckage/ripley/firefighter/New()
+ ..()
+ var/list/parts = list(/obj/item/mecha_parts/part/ripley_torso,
+ /obj/item/mecha_parts/part/ripley_left_arm,
+ /obj/item/mecha_parts/part/ripley_right_arm,
+ /obj/item/mecha_parts/part/ripley_left_leg,
+ /obj/item/mecha_parts/part/ripley_right_leg,
+ /obj/item/clothing/suit/fire)
+ for(var/i=0;i<2;i++)
+ if(!isemptylist(parts) && prob(40))
+ var/part = pick(parts)
+ welder_salvage += part
+ parts -= part
+ return
/obj/effect/decal/mecha_wreckage/ripley/deathripley
name = "Death-Ripley wreckage"
@@ -167,42 +167,42 @@
name = "Honker wreckage"
icon_state = "honker-broken"
- New()
- ..()
- var/list/parts = list(
- /obj/item/mecha_parts/chassis/honker,
- /obj/item/mecha_parts/part/honker_torso,
- /obj/item/mecha_parts/part/honker_head,
- /obj/item/mecha_parts/part/honker_left_arm,
- /obj/item/mecha_parts/part/honker_right_arm,
- /obj/item/mecha_parts/part/honker_left_leg,
- /obj/item/mecha_parts/part/honker_right_leg)
- for(var/i=0;i<2;i++)
- if(!isemptylist(parts) && prob(40))
- var/part = pick(parts)
- welder_salvage += part
- parts -= part
- return
+/obj/effect/decal/mecha_wreckage/honker/New()
+ ..()
+ var/list/parts = list(
+ /obj/item/mecha_parts/chassis/honker,
+ /obj/item/mecha_parts/part/honker_torso,
+ /obj/item/mecha_parts/part/honker_head,
+ /obj/item/mecha_parts/part/honker_left_arm,
+ /obj/item/mecha_parts/part/honker_right_arm,
+ /obj/item/mecha_parts/part/honker_left_leg,
+ /obj/item/mecha_parts/part/honker_right_leg)
+ for(var/i=0;i<2;i++)
+ if(!isemptylist(parts) && prob(40))
+ var/part = pick(parts)
+ welder_salvage += part
+ parts -= part
+ return
/obj/effect/decal/mecha_wreckage/durand
name = "Durand wreckage"
icon_state = "durand-broken"
- New()
- ..()
- var/list/parts = list(
- /obj/item/mecha_parts/part/durand_torso,
- /obj/item/mecha_parts/part/durand_head,
- /obj/item/mecha_parts/part/durand_left_arm,
- /obj/item/mecha_parts/part/durand_right_arm,
- /obj/item/mecha_parts/part/durand_left_leg,
- /obj/item/mecha_parts/part/durand_right_leg)
- for(var/i=0;i<2;i++)
- if(!isemptylist(parts) && prob(40))
- var/part = pick(parts)
- welder_salvage += part
- parts -= part
- return
+/obj/effect/decal/mecha_wreckage/durand/New()
+ ..()
+ var/list/parts = list(
+ /obj/item/mecha_parts/part/durand_torso,
+ /obj/item/mecha_parts/part/durand_head,
+ /obj/item/mecha_parts/part/durand_left_arm,
+ /obj/item/mecha_parts/part/durand_right_arm,
+ /obj/item/mecha_parts/part/durand_left_leg,
+ /obj/item/mecha_parts/part/durand_right_leg)
+ for(var/i=0;i<2;i++)
+ if(!isemptylist(parts) && prob(40))
+ var/part = pick(parts)
+ welder_salvage += part
+ parts -= part
+ return
/obj/effect/decal/mecha_wreckage/durand/old
@@ -218,18 +218,18 @@
name = "Odysseus wreckage"
icon_state = "odysseus-broken"
- New()
- ..()
- var/list/parts = list(
- /obj/item/mecha_parts/part/odysseus_torso,
- /obj/item/mecha_parts/part/odysseus_head,
- /obj/item/mecha_parts/part/odysseus_left_arm,
- /obj/item/mecha_parts/part/odysseus_right_arm,
- /obj/item/mecha_parts/part/odysseus_left_leg,
- /obj/item/mecha_parts/part/odysseus_right_leg)
- for(var/i=0;i<2;i++)
- if(!isemptylist(parts) && prob(40))
- var/part = pick(parts)
- welder_salvage += part
- parts -= part
- return
+/obj/effect/decal/mecha_wreckage/odysseus/New()
+ ..()
+ var/list/parts = list(
+ /obj/item/mecha_parts/part/odysseus_torso,
+ /obj/item/mecha_parts/part/odysseus_head,
+ /obj/item/mecha_parts/part/odysseus_left_arm,
+ /obj/item/mecha_parts/part/odysseus_right_arm,
+ /obj/item/mecha_parts/part/odysseus_left_leg,
+ /obj/item/mecha_parts/part/odysseus_right_leg)
+ for(var/i=0;i<2;i++)
+ if(!isemptylist(parts) && prob(40))
+ var/part = pick(parts)
+ welder_salvage += part
+ parts -= part
+ return
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/gibs.dm b/code/game/objects/effects/gibs.dm
index 3b08c44114b..9248134b0a7 100644
--- a/code/game/objects/effects/gibs.dm
+++ b/code/game/objects/effects/gibs.dm
@@ -16,38 +16,38 @@
var/list/gibamounts = list()
var/list/gibdirections = list() //of lists
- New(location, datum/dna/MobDNA)
- ..()
+/obj/effect/gibspawner/New(location, datum/dna/MobDNA)
+ ..()
- if(istype(loc,/turf)) //basically if a badmin spawns it
- Gib(loc, MobDNA)
+ if(istype(loc,/turf)) //basically if a badmin spawns it
+ Gib(loc, MobDNA)
- proc/Gib(atom/location, datum/dna/MobDNA = null)
- if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
- to_chat(world, "Gib list length mismatch!")
- return
+/obj/effect/gibspawner/proc/Gib(atom/location, datum/dna/MobDNA = null)
+ if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
+ to_chat(world, "Gib list length mismatch!")
+ return
- var/obj/effect/decal/cleanable/blood/gibs/gib = null
+ var/obj/effect/decal/cleanable/blood/gibs/gib = null
- if(sparks)
- do_sparks(2, 1, location)
+ if(sparks)
+ do_sparks(2, 1, location)
- for(var/i = 1, i<= gibtypes.len, i++)
- if(gibamounts[i])
- for(var/j = 1, j<= gibamounts[i], j++)
- var/gibType = gibtypes[i]
- gib = new gibType(location)
+ for(var/i = 1, i<= gibtypes.len, i++)
+ if(gibamounts[i])
+ for(var/j = 1, j<= gibamounts[i], j++)
+ var/gibType = gibtypes[i]
+ gib = new gibType(location)
- gib.blood_DNA = list()
- if(MobDNA)
- gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type
- else if(istype(src, /obj/effect/gibspawner/xeno))
- gib.blood_DNA["UNKNOWN DNA"] = "X*"
- else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey
- gib.blood_DNA["Non-human DNA"] = "A+"
- var/list/directions = gibdirections[i]
- if(directions.len)
- gib.streak(directions)
+ gib.blood_DNA = list()
+ if(MobDNA)
+ gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type
+ else if(istype(src, /obj/effect/gibspawner/xeno))
+ gib.blood_DNA["UNKNOWN DNA"] = "X*"
+ else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey
+ gib.blood_DNA["Non-human DNA"] = "A+"
+ var/list/directions = gibdirections[i]
+ if(directions.len)
+ gib.streak(directions)
- qdel(src)
+ qdel(src)
diff --git a/code/game/objects/effects/spawners/gibspawner.dm b/code/game/objects/effects/spawners/gibspawner.dm
index 5446ba348e6..b75df275659 100644
--- a/code/game/objects/effects/spawners/gibspawner.dm
+++ b/code/game/objects/effects/spawners/gibspawner.dm
@@ -1,36 +1,35 @@
-/obj/effect/gibspawner
- generic
- gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
- gibamounts = list(2,2,1)
+/obj/effect/gibspawner/generic
+ gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
+ gibamounts = list(2,2,1)
- New()
- gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list())
- ..()
+/obj/effect/gibspawner/generic/New()
+ gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list())
+ ..()
- human
- gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/down,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
- gibamounts = list(1,1,1,1,1,1,1)
+/obj/effect/gibspawner/human
+ gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/down,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
+ gibamounts = list(1,1,1,1,1,1,1)
- New()
- gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
- gibamounts[6] = pick(0,1,2)
- ..()
+/obj/effect/gibspawner/human/New()
+ gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
+ gibamounts[6] = pick(0,1,2)
+ ..()
- xeno
- gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/xeno/up,/obj/effect/decal/cleanable/blood/gibs/xeno/down,/obj/effect/decal/cleanable/blood/gibs/xeno,/obj/effect/decal/cleanable/blood/gibs/xeno,/obj/effect/decal/cleanable/blood/gibs/xeno/body,/obj/effect/decal/cleanable/blood/gibs/xeno/limb,/obj/effect/decal/cleanable/blood/gibs/xeno/core)
- gibamounts = list(1,1,1,1,1,1,1)
+/obj/effect/gibspawner/xeno
+ gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/xeno/up,/obj/effect/decal/cleanable/blood/gibs/xeno/down,/obj/effect/decal/cleanable/blood/gibs/xeno,/obj/effect/decal/cleanable/blood/gibs/xeno,/obj/effect/decal/cleanable/blood/gibs/xeno/body,/obj/effect/decal/cleanable/blood/gibs/xeno/limb,/obj/effect/decal/cleanable/blood/gibs/xeno/core)
+ gibamounts = list(1,1,1,1,1,1,1)
- New()
- gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
- gibamounts[6] = pick(0,1,2)
- ..()
+/obj/effect/gibspawner/xeno/New()
+ gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
+ gibamounts[6] = pick(0,1,2)
+ ..()
- robot
- sparks = 1
- gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/robot/up,/obj/effect/decal/cleanable/blood/gibs/robot/down,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot/limb)
- gibamounts = list(1,1,1,1,1,1)
+/obj/effect/gibspawner/robot
+ sparks = 1
+ gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/robot/up,/obj/effect/decal/cleanable/blood/gibs/robot/down,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot/limb)
+ gibamounts = list(1,1,1,1,1,1)
- New()
- gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs)
- gibamounts[6] = pick(0,1,2)
- ..()
\ No newline at end of file
+/obj/effect/gibspawner/robot/New()
+ gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs)
+ gibamounts[6] = pick(0,1,2)
+ ..()
diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm
index cf698f439f5..286bd315b61 100644
--- a/code/game/objects/items/bodybag.dm
+++ b/code/game/objects/items/bodybag.dm
@@ -17,15 +17,16 @@
name = "body bags"
desc = "This box contains body bags."
icon_state = "bodybags"
- New()
- ..()
- new /obj/item/bodybag(src)
- new /obj/item/bodybag(src)
- new /obj/item/bodybag(src)
- new /obj/item/bodybag(src)
- new /obj/item/bodybag(src)
- new /obj/item/bodybag(src)
- new /obj/item/bodybag(src)
+
+/obj/item/storage/box/bodybags/New()
+ ..()
+ new /obj/item/bodybag(src)
+ new /obj/item/bodybag(src)
+ new /obj/item/bodybag(src)
+ new /obj/item/bodybag(src)
+ new /obj/item/bodybag(src)
+ new /obj/item/bodybag(src)
+ new /obj/item/bodybag(src)
/obj/structure/closet/body_bag
@@ -40,47 +41,47 @@
density = 0
- attackby(W as obj, mob/user as mob, params)
- if(istype(W, /obj/item/pen))
- var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
- if(user.get_active_hand() != W)
- return
- if(!in_range(src, user) && src.loc != user)
- return
- t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
- if(t)
- src.name = "body bag - "
- src.name += t
- src.overlays += image(src.icon, "bodybag_label")
- else
- src.name = "body bag"
- //..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri
+/obj/structure/closet/body_bag/attackby(W as obj, mob/user as mob, params)
+ if(istype(W, /obj/item/pen))
+ var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
+ if(user.get_active_hand() != W)
return
- else if(istype(W, /obj/item/wirecutters))
- to_chat(user, "You cut the tag off the bodybag")
+ if(!in_range(src, user) && src.loc != user)
+ return
+ t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
+ if(t)
+ src.name = "body bag - "
+ src.name += t
+ src.overlays += image(src.icon, "bodybag_label")
+ else
src.name = "body bag"
- src.overlays.Cut()
- return
+ //..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri
+ return
+ else if(istype(W, /obj/item/wirecutters))
+ to_chat(user, "You cut the tag off the bodybag")
+ src.name = "body bag"
+ src.overlays.Cut()
+ return
- close()
- if(..())
- density = 0
- return 1
- return 0
+/obj/structure/closet/body_bag/close()
+ if(..())
+ density = 0
+ return 1
+ return 0
- MouseDrop(over_object, src_location, over_location)
- ..()
- if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
- if(!ishuman(usr)) return
- if(opened) return 0
- if(contents.len) return 0
- visible_message("[usr] folds up the [src.name]")
- new item_path(get_turf(src))
- spawn(0)
- qdel(src)
- return
+/obj/structure/closet/body_bag/MouseDrop(over_object, src_location, over_location)
+ ..()
+ if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
+ if(!ishuman(usr)) return
+ if(opened) return 0
+ if(contents.len) return 0
+ visible_message("[usr] folds up the [src.name]")
+ new item_path(get_turf(src))
+ spawn(0)
+ qdel(src)
+ return
/obj/structure/closet/body_bag/relaymove(mob/user as mob)
if(user.stat)
@@ -89,4 +90,4 @@
// Make it possible to escape from bodybags in morgues and crematoriums
if(loc && (isturf(loc) || istype(loc, /obj/structure/morgue) || istype(loc, /obj/structure/crematorium)))
if(!open())
- to_chat(user, "It won't budge!")
\ No newline at end of file
+ to_chat(user, "It won't budge!")
diff --git a/code/game/objects/items/devices/radio/beacon.dm b/code/game/objects/items/devices/radio/beacon.dm
index 7b37080d783..26b0e8c915e 100644
--- a/code/game/objects/items/devices/radio/beacon.dm
+++ b/code/game/objects/items/devices/radio/beacon.dm
@@ -46,9 +46,10 @@
return
/obj/item/radio/beacon/bacon //Probably a better way of doing this, I'm lazy.
- proc/digest_delay()
+
+/obj/item/radio/beacon/bacon/proc/digest_delay()
spawn(600)
- qdel(src)
+ qdel(src)
// SINGULO BEACON SPAWNER
/obj/item/radio/beacon/syndicate
@@ -82,4 +83,4 @@
new /obj/machinery/syndicatebomb( user.loc )
playsound(src, 'sound/effects/pop.ogg', 100, 1, 1)
qdel(src)
- return
\ No newline at end of file
+ return
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 2f1a280f83f..aece125c657 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -439,7 +439,8 @@ REAGENT SCANNER
icon_state = "spectrometer"
item_state = "analyzer"
w_class = WEIGHT_CLASS_SMALL
- flags = CONDUCT | OPENCONTAINER
+ flags = CONDUCT
+ container_type = OPENCONTAINER
slot_flags = SLOT_BELT
throwforce = 5
throw_speed = 4
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/shooting_range.dm b/code/game/objects/items/shooting_range.dm
index 2a4a5a3fab1..a91410c28fe 100644
--- a/code/game/objects/items/shooting_range.dm
+++ b/code/game/objects/items/shooting_range.dm
@@ -159,21 +159,21 @@
var/b2y1 = 0
var/b2y2 = 0
- New(var/obj/item/target/Target, var/pixel_x = 0, var/pixel_y = 0)
- if(!Target) return
+/datum/bullethole/New(obj/item/target/Target, pixel_x = 0, pixel_y = 0)
+ if(!Target) return
- // Randomize the first box
- b1x1 = pixel_x - pick(1,1,1,1,2,2,3,3,4)
- b1x2 = pixel_x + pick(1,1,1,1,2,2,3,3,4)
- b1y = pixel_y
- if(prob(35))
- b1y += rand(-4,4)
+ // Randomize the first box
+ b1x1 = pixel_x - pick(1,1,1,1,2,2,3,3,4)
+ b1x2 = pixel_x + pick(1,1,1,1,2,2,3,3,4)
+ b1y = pixel_y
+ if(prob(35))
+ b1y += rand(-4,4)
- // Randomize the second box
- b2x = pixel_x
- if(prob(35))
- b2x += rand(-4,4)
- b2y1 = pixel_y + pick(1,1,1,1,2,2,3,3,4)
- b2y2 = pixel_y - pick(1,1,1,1,2,2,3,3,4)
+ // Randomize the second box
+ b2x = pixel_x
+ if(prob(35))
+ b2x += rand(-4,4)
+ b2y1 = pixel_y + pick(1,1,1,1,2,2,3,3,4)
+ b2y2 = pixel_y - pick(1,1,1,1,2,2,3,3,4)
- Target.bulletholes.Add(src)
+ Target.bulletholes.Add(src)
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/caution.dm b/code/game/objects/items/weapons/caution.dm
index 264753dc695..a4599a2e79f 100644
--- a/code/game/objects/items/weapons/caution.dm
+++ b/code/game/objects/items/weapons/caution.dm
@@ -10,53 +10,52 @@
w_class = WEIGHT_CLASS_SMALL
attack_verb = list("warned", "cautioned", "smashed")
- proximity_sign
- var/timing = 0
- var/armed = 0
- var/timepassed = 0
+/obj/item/caution/proximity_sign
+ var/timing = 0
+ var/armed = 0
+ var/timepassed = 0
- attack_self(mob/user as mob)
- if(ishuman(user))
- var/mob/living/carbon/human/H = user
- if(H.mind.assigned_role != "Janitor")
- return
- if(armed)
- armed = 0
- to_chat(user, "You disarm \the [src].")
- return
- timing = !timing
- if(timing)
- processing_objects.Add(src)
- else
- armed = 0
- timepassed = 0
- to_chat(H, "You [timing ? "activate \the [src]'s timer, you have 15 seconds." : "de-activate \the [src]'s timer."]")
+/obj/item/caution/proximity_sign/attack_self(mob/user as mob)
+ if(ishuman(user))
+ var/mob/living/carbon/human/H = user
+ if(H.mind.assigned_role != "Janitor")
+ return
+ if(armed)
+ armed = 0
+ to_chat(user, "You disarm \the [src].")
+ return
+ timing = !timing
+ if(timing)
+ processing_objects.Add(src)
+ else
+ armed = 0
+ timepassed = 0
+ to_chat(H, "You [timing ? "activate \the [src]'s timer, you have 15 seconds." : "de-activate \the [src]'s timer."]")
- process()
- if(!timing)
- processing_objects.Remove(src)
- timepassed++
- if(timepassed >= 15 && !armed)
- armed = 1
- timing = 0
+/obj/item/caution/proximity_sign/process()
+ if(!timing)
+ processing_objects.Remove(src)
+ timepassed++
+ if(timepassed >= 15 && !armed)
+ armed = 1
+ timing = 0
- HasProximity(atom/movable/AM as mob|obj)
- if(armed)
- if(istype(AM, /mob/living/carbon) && !istype(AM, /mob/living/carbon/brain))
- var/mob/living/carbon/C = AM
- if(C.m_intent != MOVE_INTENT_WALK)
- src.visible_message("The [src.name] beeps, \"Running on wet floors is hazardous to your health.\"")
- explosion(src.loc,-1,0,2)
- if(ishuman(C))
- dead_legs(C)
- if(src)
- qdel(src)
-
- proc/dead_legs(mob/living/carbon/human/H as mob)
- var/obj/item/organ/external/l = H.get_organ("l_leg")
- var/obj/item/organ/external/r = H.get_organ("r_leg")
- if(l)
- l.droplimb(0, DROPLIMB_SHARP)
- if(r)
- r.droplimb(0, DROPLIMB_SHARP)
+/obj/item/caution/proximity_sign/HasProximity(atom/movable/AM as mob|obj)
+ if(armed)
+ if(istype(AM, /mob/living/carbon) && !istype(AM, /mob/living/carbon/brain))
+ var/mob/living/carbon/C = AM
+ if(C.m_intent != MOVE_INTENT_WALK)
+ src.visible_message("The [src.name] beeps, \"Running on wet floors is hazardous to your health.\"")
+ explosion(src.loc,-1,0,2)
+ if(ishuman(C))
+ dead_legs(C)
+ if(src)
+ qdel(src)
+/obj/item/caution/proximity_sign/proc/dead_legs(mob/living/carbon/human/H as mob)
+ var/obj/item/organ/external/l = H.get_organ("l_leg")
+ var/obj/item/organ/external/r = H.get_organ("r_leg")
+ if(l)
+ l.droplimb(0, DROPLIMB_SHARP)
+ if(r)
+ r.droplimb(0, DROPLIMB_SHARP)
diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm
index 3a7e203101d..681db222d0b 100644
--- a/code/game/objects/items/weapons/dna_injector.dm
+++ b/code/game/objects/items/weapons/dna_injector.dm
@@ -159,9 +159,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
- New()
- block = HULKBLOCK
- ..()
+
+/obj/item/dnainjector/hulkmut/New()
+ block = HULKBLOCK
+ ..()
/obj/item/dnainjector/antihulk
name = "DNA-Injector (Anti-Hulk)"
@@ -169,9 +170,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
- New()
- block = HULKBLOCK
- ..()
+
+/obj/item/dnainjector/antihulk/New()
+ block = HULKBLOCK
+ ..()
/obj/item/dnainjector/xraymut
name = "DNA-Injector (Xray)"
@@ -179,9 +181,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 8
- New()
- block = XRAYBLOCK
- ..()
+
+/obj/item/dnainjector/xraymut/New()
+ block = XRAYBLOCK
+ ..()
/obj/item/dnainjector/antixray
name = "DNA-Injector (Anti-Xray)"
@@ -189,10 +192,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 8
- New()
- block = XRAYBLOCK
- ..()
+/obj/item/dnainjector/antixray/New()
+ block = XRAYBLOCK
+ ..()
/obj/item/dnainjector/firemut
name = "DNA-Injector (Fire)"
@@ -200,9 +203,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 10
- New()
- block = FIREBLOCK
- ..()
+
+/obj/item/dnainjector/firemut/New()
+ block = FIREBLOCK
+ ..()
/obj/item/dnainjector/antifire
name = "DNA-Injector (Anti-Fire)"
@@ -210,9 +214,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 10
- New()
- block = FIREBLOCK
- ..()
+
+/obj/item/dnainjector/antifire/New()
+ block = FIREBLOCK
+ ..()
/obj/item/dnainjector/telemut
name = "DNA-Injector (Tele.)"
@@ -220,9 +225,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 12
- New()
- block = TELEBLOCK
- ..()
+
+/obj/item/dnainjector/telemut/New()
+ block = TELEBLOCK
+ ..()
/obj/item/dnainjector/telemut/darkbundle
name = "DNA injector"
@@ -235,9 +241,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 12
- New()
- block = TELEBLOCK
- ..()
+
+/obj/item/dnainjector/antitele/New()
+ block = TELEBLOCK
+ ..()
/obj/item/dnainjector/nobreath
name = "DNA-Injector (Breathless)"
@@ -245,9 +252,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
- New()
- block = BREATHLESSBLOCK
- ..()
+
+/obj/item/dnainjector/nobreath/New()
+ block = BREATHLESSBLOCK
+ ..()
/obj/item/dnainjector/antinobreath
name = "DNA-Injector (Anti-Breathless)"
@@ -255,9 +263,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
- New()
- block = BREATHLESSBLOCK
- ..()
+
+/obj/item/dnainjector/antinobreath/New()
+ block = BREATHLESSBLOCK
+ ..()
/obj/item/dnainjector/remoteview
name = "DNA-Injector (Remote View)"
@@ -265,9 +274,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
- New()
- block = REMOTEVIEWBLOCK
- ..()
+
+/obj/item/dnainjector/remoteview/New()
+ block = REMOTEVIEWBLOCK
+ ..()
/obj/item/dnainjector/antiremoteview
name = "DNA-Injector (Anti-Remote View)"
@@ -275,9 +285,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
- New()
- block = REMOTEVIEWBLOCK
- ..()
+
+/obj/item/dnainjector/antiremoteview/New()
+ block = REMOTEVIEWBLOCK
+ ..()
/obj/item/dnainjector/regenerate
name = "DNA-Injector (Regeneration)"
@@ -285,9 +296,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
- New()
- block = REGENERATEBLOCK
- ..()
+
+/obj/item/dnainjector/regenerate/New()
+ block = REGENERATEBLOCK
+ ..()
/obj/item/dnainjector/antiregenerate
name = "DNA-Injector (Anti-Regeneration)"
@@ -295,9 +307,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
- New()
- block = REGENERATEBLOCK
- ..()
+
+/obj/item/dnainjector/antiregenerate/New()
+ block = REGENERATEBLOCK
+ ..()
/obj/item/dnainjector/runfast
name = "DNA-Injector (Increase Run)"
@@ -305,9 +318,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
- New()
- block = INCREASERUNBLOCK
- ..()
+
+/obj/item/dnainjector/runfast/New()
+ block = INCREASERUNBLOCK
+ ..()
/obj/item/dnainjector/antirunfast
name = "DNA-Injector (Anti-Increase Run)"
@@ -315,9 +329,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
- New()
- block = INCREASERUNBLOCK
- ..()
+
+/obj/item/dnainjector/antirunfast/New()
+ block = INCREASERUNBLOCK
+ ..()
/obj/item/dnainjector/morph
name = "DNA-Injector (Morph)"
@@ -325,9 +340,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
- New()
- block = MORPHBLOCK
- ..()
+
+/obj/item/dnainjector/morph/New()
+ block = MORPHBLOCK
+ ..()
/obj/item/dnainjector/antimorph
name = "DNA-Injector (Anti-Morph)"
@@ -335,9 +351,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
- New()
- block = MORPHBLOCK
- ..()
+
+/obj/item/dnainjector/antimorph/New()
+ block = MORPHBLOCK
+ ..()
/obj/item/dnainjector/noprints
name = "DNA-Injector (No Prints)"
@@ -345,9 +362,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
- New()
- block = NOPRINTSBLOCK
- ..()
+
+/obj/item/dnainjector/noprints/New()
+ block = NOPRINTSBLOCK
+ ..()
/obj/item/dnainjector/antinoprints
name = "DNA-Injector (Anti-No Prints)"
@@ -355,9 +373,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
- New()
- block = NOPRINTSBLOCK
- ..()
+
+/obj/item/dnainjector/antinoprints/New()
+ block = NOPRINTSBLOCK
+ ..()
/obj/item/dnainjector/insulation
name = "DNA-Injector (Shock Immunity)"
@@ -365,9 +384,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
- New()
- block = SHOCKIMMUNITYBLOCK
- ..()
+
+/obj/item/dnainjector/insulation/New()
+ block = SHOCKIMMUNITYBLOCK
+ ..()
/obj/item/dnainjector/antiinsulation
name = "DNA-Injector (Anti-Shock Immunity)"
@@ -375,9 +395,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
- New()
- block = SHOCKIMMUNITYBLOCK
- ..()
+
+/obj/item/dnainjector/antiinsulation/New()
+ block = SHOCKIMMUNITYBLOCK
+ ..()
/obj/item/dnainjector/midgit
name = "DNA-Injector (Small Size)"
@@ -385,9 +406,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
- New()
- block = SMALLSIZEBLOCK
- ..()
+
+/obj/item/dnainjector/midgit/New()
+ block = SMALLSIZEBLOCK
+ ..()
/obj/item/dnainjector/antimidgit
name = "DNA-Injector (Anti-Small Size)"
@@ -395,9 +417,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
- New()
- block = SMALLSIZEBLOCK
- ..()
+
+/obj/item/dnainjector/antimidgit/New()
+ block = SMALLSIZEBLOCK
+ ..()
/////////////////////////////////////
/obj/item/dnainjector/antiglasses
@@ -406,9 +429,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 1
- New()
- block = GLASSESBLOCK
- ..()
+
+/obj/item/dnainjector/antiglasses/New()
+ block = GLASSESBLOCK
+ ..()
/obj/item/dnainjector/glassesmut
name = "DNA-Injector (Glasses)"
@@ -416,9 +440,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 1
- New()
- block = GLASSESBLOCK
- ..()
+
+/obj/item/dnainjector/glassesmut/New()
+ block = GLASSESBLOCK
+ ..()
/obj/item/dnainjector/epimut
name = "DNA-Injector (Epi.)"
@@ -426,9 +451,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 3
- New()
- block = EPILEPSYBLOCK
- ..()
+
+/obj/item/dnainjector/epimut/New()
+ block = EPILEPSYBLOCK
+ ..()
/obj/item/dnainjector/antiepi
name = "DNA-Injector (Anti-Epi.)"
@@ -436,9 +462,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 3
- New()
- block = EPILEPSYBLOCK
- ..()
+
+/obj/item/dnainjector/antiepi/New()
+ block = EPILEPSYBLOCK
+ ..()
/obj/item/dnainjector/anticough
name = "DNA-Injector (Anti-Cough)"
@@ -446,9 +473,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 5
- New()
- block = COUGHBLOCK
- ..()
+
+/obj/item/dnainjector/anticough/New()
+ block = COUGHBLOCK
+ ..()
/obj/item/dnainjector/coughmut
name = "DNA-Injector (Cough)"
@@ -456,9 +484,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 5
- New()
- block = COUGHBLOCK
- ..()
+
+/obj/item/dnainjector/coughmut/New()
+ block = COUGHBLOCK
+ ..()
/obj/item/dnainjector/clumsymut
name = "DNA-Injector (Clumsy)"
@@ -466,9 +495,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 6
- New()
- block = CLUMSYBLOCK
- ..()
+
+/obj/item/dnainjector/clumsymut/New()
+ block = CLUMSYBLOCK
+ ..()
/obj/item/dnainjector/anticlumsy
name = "DNA-Injector (Anti-Clumy)"
@@ -476,9 +506,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 6
- New()
- block = CLUMSYBLOCK
- ..()
+
+/obj/item/dnainjector/anticlumsy/New()
+ block = CLUMSYBLOCK
+ ..()
/obj/item/dnainjector/antitour
name = "DNA-Injector (Anti-Tour.)"
@@ -486,9 +517,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 7
- New()
- block = TWITCHBLOCK
- ..()
+
+/obj/item/dnainjector/antitour/New()
+ block = TWITCHBLOCK
+ ..()
/obj/item/dnainjector/tourmut
name = "DNA-Injector (Tour.)"
@@ -496,9 +528,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 7
- New()
- block = TWITCHBLOCK
- ..()
+
+/obj/item/dnainjector/tourmut/New()
+ block = TWITCHBLOCK
+ ..()
/obj/item/dnainjector/stuttmut
name = "DNA-Injector (Stutt.)"
@@ -506,9 +539,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 9
- New()
- block = NERVOUSBLOCK
- ..()
+
+/obj/item/dnainjector/stuttmut/New()
+ block = NERVOUSBLOCK
+ ..()
/obj/item/dnainjector/antistutt
@@ -517,9 +551,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 9
- New()
- block = NERVOUSBLOCK
- ..()
+
+/obj/item/dnainjector/antistutt/New()
+ block = NERVOUSBLOCK
+ ..()
/obj/item/dnainjector/blindmut
name = "DNA-Injector (Blind)"
@@ -527,9 +562,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 11
- New()
- block = BLINDBLOCK
- ..()
+
+/obj/item/dnainjector/blindmut/New()
+ block = BLINDBLOCK
+ ..()
/obj/item/dnainjector/antiblind
name = "DNA-Injector (Anti-Blind)"
@@ -537,9 +573,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 11
- New()
- block = BLINDBLOCK
- ..()
+
+/obj/item/dnainjector/antiblind/New()
+ block = BLINDBLOCK
+ ..()
/obj/item/dnainjector/telemut
name = "DNA-Injector (Tele.)"
@@ -547,9 +584,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 12
- New()
- block = TELEBLOCK
- ..()
+
+/obj/item/dnainjector/telemut/New()
+ block = TELEBLOCK
+ ..()
/obj/item/dnainjector/antitele
name = "DNA-Injector (Anti-Tele.)"
@@ -557,9 +595,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 12
- New()
- block = TELEBLOCK
- ..()
+
+/obj/item/dnainjector/antitele/New()
+ block = TELEBLOCK
+ ..()
/obj/item/dnainjector/deafmut
name = "DNA-Injector (Deaf)"
@@ -567,9 +606,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 13
- New()
- block = DEAFBLOCK
- ..()
+
+/obj/item/dnainjector/deafmut/New()
+ block = DEAFBLOCK
+ ..()
/obj/item/dnainjector/antideaf
name = "DNA-Injector (Anti-Deaf)"
@@ -577,9 +617,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 13
- New()
- block = DEAFBLOCK
- ..()
+
+/obj/item/dnainjector/antideaf/New()
+ block = DEAFBLOCK
+ ..()
/obj/item/dnainjector/hallucination
name = "DNA-Injector (Halluctination)"
@@ -587,9 +628,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
- New()
- block = HALLUCINATIONBLOCK
- ..()
+
+/obj/item/dnainjector/hallucination/New()
+ block = HALLUCINATIONBLOCK
+ ..()
/obj/item/dnainjector/antihallucination
name = "DNA-Injector (Anti-Hallucination)"
@@ -597,9 +639,10 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
- New()
- block = HALLUCINATIONBLOCK
- ..()
+
+/obj/item/dnainjector/antihallucination/New()
+ block = HALLUCINATIONBLOCK
+ ..()
/obj/item/dnainjector/h2m
name = "DNA-Injector (Human > Monkey)"
@@ -607,9 +650,10 @@
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 14
- New()
- block = MONKEYBLOCK
- ..()
+
+/obj/item/dnainjector/h2m/New()
+ block = MONKEYBLOCK
+ ..()
/obj/item/dnainjector/m2h
name = "DNA-Injector (Monkey > Human)"
@@ -617,6 +661,7 @@
datatype = DNA2_BUF_SE
value = 0x001
//block = 14
- New()
- block = MONKEYBLOCK
- ..()
+
+/obj/item/dnainjector/m2h/New()
+ block = MONKEYBLOCK
+ ..()
diff --git a/code/game/objects/items/weapons/dnascrambler.dm b/code/game/objects/items/weapons/dnascrambler.dm
index fc13fa69f79..bbad0eb9157 100644
--- a/code/game/objects/items/weapons/dnascrambler.dm
+++ b/code/game/objects/items/weapons/dnascrambler.dm
@@ -6,52 +6,52 @@
icon_state = "lepopen"
var/used = null
+/obj/item/dnascrambler/update_icon()
+ if(used)
+ icon_state = "lepopen0"
+ else
+ icon_state = "lepopen"
+
+/obj/item/dnascrambler/attack(mob/M as mob, mob/user as mob)
+ if(!M || !user)
+ return
+
+ if(!ishuman(M) || !ishuman(user))
+ return
+
+ if(used)
+ return
+
+ if(ishuman(M))
+ var/mob/living/carbon/human/H = M
+ if(NO_DNA in H.dna.species.species_traits)
+ to_chat(user, "You failed to inject [M], as [M.p_they()] [M.p_have()] no DNA to scramble, nor flesh to inject.")
+ return
+
+ if(M == user)
+ user.visible_message("[user] injects [user.p_them()]self with [src]!")
+ injected(user, user)
+ else
+ user.visible_message("[user] is trying to inject [M] with [src]!")
+ if(do_mob(user,M,30))
+ user.visible_message("[user] injects [M] with [src].")
+ injected(M, user)
+ else
+ to_chat(user, "You failed to inject [M].")
+
+/obj/item/dnascrambler/proc/injected(var/mob/living/carbon/human/target, var/mob/living/carbon/user)
+ if(istype(target))
+ var/mob/living/carbon/human/H = target
+ scramble(1, H, 100)
+ H.real_name = random_name(H.gender, H.dna.species.name) //Give them a name that makes sense for their species.
+ H.sync_organ_dna(assimilate = 1)
+ H.update_body(0)
+ H.reset_hair() //No more winding up with hairstyles you're not supposed to have, and blowing your cover.
+ H.reset_markings() //...Or markings.
+ H.dna.ResetUIFrom(H)
+ target.update_icons()
+
+ add_attack_logs(user, target, "injected with [src]")
+ used = 1
update_icon()
- if(used)
- icon_state = "lepopen0"
- else
- icon_state = "lepopen"
-
- attack(mob/M as mob, mob/user as mob)
- if(!M || !user)
- return
-
- if(!ishuman(M) || !ishuman(user))
- return
-
- if(used)
- return
-
- if(ishuman(M))
- var/mob/living/carbon/human/H = M
- if(NO_DNA in H.dna.species.species_traits)
- to_chat(user, "You failed to inject [M], as [M.p_they()] [M.p_have()] no DNA to scramble, nor flesh to inject.")
- return
-
- if(M == user)
- user.visible_message("[user] injects [user.p_them()]self with [src]!")
- injected(user, user)
- else
- user.visible_message("[user] is trying to inject [M] with [src]!")
- if(do_mob(user,M,30))
- user.visible_message("[user] injects [M] with [src].")
- injected(M, user)
- else
- to_chat(user, "You failed to inject [M].")
-
- proc/injected(var/mob/living/carbon/human/target, var/mob/living/carbon/user)
- if(istype(target))
- var/mob/living/carbon/human/H = target
- scramble(1, H, 100)
- H.real_name = random_name(H.gender, H.dna.species.name) //Give them a name that makes sense for their species.
- H.sync_organ_dna(assimilate = 1)
- H.update_body(0)
- H.reset_hair() //No more winding up with hairstyles you're not supposed to have, and blowing your cover.
- H.reset_markings() //...Or markings.
- H.dna.ResetUIFrom(H)
- target.update_icons()
-
- add_attack_logs(user, target, "injected with [src]")
- used = 1
- update_icon()
- name = "used " + name
+ name = "used " + name
diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm
index fb4829dd13f..3d893c86371 100644
--- a/code/game/objects/items/weapons/extinguisher.dm
+++ b/code/game/objects/items/weapons/extinguisher.dm
@@ -11,6 +11,7 @@
throw_speed = 2
throw_range = 7
force = 10
+ container_type = AMOUNT_VISIBLE
materials = list(MAT_METAL=90)
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
var/max_water = 50
@@ -36,11 +37,8 @@
sprite_name = "miniFE"
/obj/item/extinguisher/examine(mob/user)
- if(..(user, 0))
- to_chat(usr, "[bicon(src)] [src.name] contains:")
- if(reagents && reagents.reagent_list.len)
- for(var/datum/reagent/R in reagents.reagent_list)
- to_chat(user, "[R.volume] units of [R.name]")
+ . = ..()
+ to_chat(user, "The safety is [safety ? "on" : "off"].")
/obj/item/extinguisher/New()
diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm
index 6d2bd3649cf..8419f0b7537 100644
--- a/code/game/objects/items/weapons/grenades/chem_grenade.dm
+++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm
@@ -432,18 +432,18 @@
desc = "Used for emergency sealing of air breaches."
stage = READY
- New()
- ..()
- var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
- var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
+/obj/item/grenade/chem_grenade/metalfoam/New()
+ ..()
+ var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
+ var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
- B1.reagents.add_reagent("aluminum", 30)
- B2.reagents.add_reagent("fluorosurfactant", 10)
- B2.reagents.add_reagent("sacid", 10)
+ B1.reagents.add_reagent("aluminum", 30)
+ B2.reagents.add_reagent("fluorosurfactant", 10)
+ B2.reagents.add_reagent("sacid", 10)
- beakers += B1
- beakers += B2
- update_icon()
+ beakers += B1
+ beakers += B2
+ update_icon()
/obj/item/grenade/chem_grenade/incendiary
@@ -451,19 +451,19 @@
desc = "Used for clearing rooms of living things."
stage = READY
- New()
- ..()
- var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
- var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
+/obj/item/grenade/chem_grenade/incendiary/New()
+ ..()
+ var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
+ var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
- B1.reagents.add_reagent("phosphorus", 25)
- B2.reagents.add_reagent("plasma", 25)
- B2.reagents.add_reagent("sacid", 25)
+ B1.reagents.add_reagent("phosphorus", 25)
+ B2.reagents.add_reagent("plasma", 25)
+ B2.reagents.add_reagent("sacid", 25)
- beakers += B1
- beakers += B2
- update_icon()
+ beakers += B1
+ beakers += B2
+ update_icon()
/obj/item/grenade/chem_grenade/antiweed
@@ -471,20 +471,20 @@
desc = "Used for purging large areas of invasive plant species. Contents under pressure. Do not directly inhale contents."
stage = READY
- New()
- ..()
- var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
- var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
+/obj/item/grenade/chem_grenade/antiweed/New()
+ ..()
+ var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
+ var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
- B1.reagents.add_reagent("atrazine", 30)
- B1.reagents.add_reagent("potassium", 20)
- B2.reagents.add_reagent("phosphorus", 20)
- B2.reagents.add_reagent("sugar", 20)
- B2.reagents.add_reagent("atrazine", 10)
+ B1.reagents.add_reagent("atrazine", 30)
+ B1.reagents.add_reagent("potassium", 20)
+ B2.reagents.add_reagent("phosphorus", 20)
+ B2.reagents.add_reagent("sugar", 20)
+ B2.reagents.add_reagent("atrazine", 10)
- beakers += B1
- beakers += B2
- update_icon()
+ beakers += B1
+ beakers += B2
+ update_icon()
/obj/item/grenade/chem_grenade/cleaner
@@ -492,18 +492,18 @@
desc = "BLAM!-brand foaming space cleaner. In a special applicator for rapid cleaning of wide areas."
stage = READY
- New()
- ..()
- var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
- var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
+/obj/item/grenade/chem_grenade/cleaner/New()
+ ..()
+ var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
+ var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
- B1.reagents.add_reagent("fluorosurfactant", 40)
- B2.reagents.add_reagent("cleaner", 10)
- B2.reagents.add_reagent("water", 40) //when you make pre-designed foam reactions that carry the reagents, always add water last
+ B1.reagents.add_reagent("fluorosurfactant", 40)
+ B2.reagents.add_reagent("cleaner", 10)
+ B2.reagents.add_reagent("water", 40) //when you make pre-designed foam reactions that carry the reagents, always add water last
- beakers += B1
- beakers += B2
- update_icon()
+ beakers += B1
+ beakers += B2
+ update_icon()
/obj/item/grenade/chem_grenade/teargas
@@ -511,19 +511,19 @@
desc = "Used for nonlethal riot control. Contents under pressure. Do not directly inhale contents."
stage = READY
- New()
- ..()
- var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
- var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
+/obj/item/grenade/chem_grenade/teargas/New()
+ ..()
+ var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
+ var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
- B1.reagents.add_reagent("condensedcapsaicin", 25)
- B1.reagents.add_reagent("potassium", 25)
- B2.reagents.add_reagent("phosphorus", 25)
- B2.reagents.add_reagent("sugar", 25)
+ B1.reagents.add_reagent("condensedcapsaicin", 25)
+ B1.reagents.add_reagent("potassium", 25)
+ B2.reagents.add_reagent("phosphorus", 25)
+ B2.reagents.add_reagent("sugar", 25)
- beakers += B1
- beakers += B2
- update_icon()
+ beakers += B1
+ beakers += B2
+ update_icon()
/obj/item/grenade/chem_grenade/facid
name = "acid grenade"
@@ -550,19 +550,19 @@
desc = "Contains sarin gas; extremely deadly and fast acting; use with extreme caution."
stage = READY
- New()
- ..()
- var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
- var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
+/obj/item/grenade/chem_grenade/saringas/New()
+ ..()
+ var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
+ var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
- B1.reagents.add_reagent("sarin", 25)
- B1.reagents.add_reagent("potassium", 25)
- B2.reagents.add_reagent("phosphorus", 25)
- B2.reagents.add_reagent("sugar", 25)
+ B1.reagents.add_reagent("sarin", 25)
+ B1.reagents.add_reagent("potassium", 25)
+ B2.reagents.add_reagent("phosphorus", 25)
+ B2.reagents.add_reagent("sugar", 25)
- beakers += B1
- beakers += B2
- update_icon()
+ beakers += B1
+ beakers += B2
+ update_icon()
#undef EMPTY
#undef WIRED
diff --git a/code/game/objects/items/weapons/grenades/clowngrenade.dm b/code/game/objects/items/weapons/grenades/clowngrenade.dm
index 18dbf93ae45..bce9861fb72 100644
--- a/code/game/objects/items/weapons/grenades/clowngrenade.dm
+++ b/code/game/objects/items/weapons/grenades/clowngrenade.dm
@@ -10,44 +10,34 @@
var/path = 0
var/affected_area = 2
- prime()
- ..()
- playsound(src.loc, 'sound/items/bikehorn.ogg', 25, -3)
- /*
- for(var/turf/simulated/floor/T in view(affected_area, src.loc))
- if(prob(75))
- banana(T)
- */
- var/i = 0
- var/number = 0
- for(var/direction in alldirs)
- for(i = 0; i < 2; i++)
- number++
- var/obj/item/grown/bananapeel/traitorpeel/peel = new /obj/item/grown/bananapeel/traitorpeel(get_turf(src.loc))
- /* var/direction = pick(alldirs)
- var/spaces = pick(1;150, 2)
- var/a = 0
- for(a = 0; a < spaces; a++)
- step(peel,direction)*/
- var/a = 1
- if(number & 2)
- for(a = 1; a <= 2; a++)
- step(peel,direction)
- else
+/obj/item/grenade/clown_grenade/prime()
+ ..()
+ playsound(src.loc, 'sound/items/bikehorn.ogg', 25, -3)
+ /*
+ for(var/turf/simulated/floor/T in view(affected_area, src.loc))
+ if(prob(75))
+ banana(T)
+ */
+ var/i = 0
+ var/number = 0
+ for(var/direction in alldirs)
+ for(i = 0; i < 2; i++)
+ number++
+ var/obj/item/grown/bananapeel/traitorpeel/peel = new /obj/item/grown/bananapeel/traitorpeel(get_turf(src.loc))
+ /* var/direction = pick(alldirs)
+ var/spaces = pick(1;150, 2)
+ var/a = 0
+ for(a = 0; a < spaces; a++)
+ step(peel,direction)*/
+ var/a = 1
+ if(number & 2)
+ for(a = 1; a <= 2; a++)
step(peel,direction)
- new /obj/item/grown/bananapeel/traitorpeel(get_turf(src.loc))
- qdel(src)
- return
-/*
- proc/banana(turf/T as turf)
- if(!T || !istype(T))
- return
- if(locate(/obj/structure/grille) in T)
- return
- if(locate(/obj/structure/window) in T)
- return
- new /obj/item/grown/bananapeel/traitorpeel(T)
-*/
+ else
+ step(peel,direction)
+ new /obj/item/grown/bananapeel/traitorpeel(get_turf(src.loc))
+ qdel(src)
+ return
/obj/item/grown/bananapeel/traitorpeel
trip_stun = 0
diff --git a/code/game/objects/items/weapons/grenades/custom_grenades.dm b/code/game/objects/items/weapons/grenades/custom_grenades.dm
index 133cc906850..b5598bc86be 100644
--- a/code/game/objects/items/weapons/grenades/custom_grenades.dm
+++ b/code/game/objects/items/weapons/grenades/custom_grenades.dm
@@ -3,17 +3,17 @@
desc = "From the makers of BLAM! brand foaming space cleaner, this bomb guarantees steady work for any janitor."
stage = 2
- New()
- ..()
- var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
- var/list/muck = list("blood","carbon","flour","radium")
- var/filth = pick(muck - "radium") // not usually radioactive
+/obj/item/grenade/chem_grenade/dirt/New()
+ ..()
+ var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
+ var/list/muck = list("blood","carbon","flour","radium")
+ var/filth = pick(muck - "radium") // not usually radioactive
- B1.reagents.add_reagent(filth,25)
- if(prob(25))
- B1.reagents.add_reagent(pick(muck - filth,25)) // but sometimes...
+ B1.reagents.add_reagent(filth,25)
+ if(prob(25))
+ B1.reagents.add_reagent(pick(muck - filth,25)) // but sometimes...
- beakers += B1
+ beakers += B1
/obj/item/grenade/chem_grenade/meat
@@ -22,18 +22,18 @@
stage = 2
- New()
- ..()
- var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
- var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
+/obj/item/grenade/chem_grenade/meat/New()
+ ..()
+ var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
+ var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
- B1.reagents.add_reagent("blood",60)
- if(prob(5))
- B1.reagents.add_reagent("blood",1) // Quality control problems, causes a mess
- B2.reagents.add_reagent("cryoxadone",30)
+ B1.reagents.add_reagent("blood",60)
+ if(prob(5))
+ B1.reagents.add_reagent("blood",1) // Quality control problems, causes a mess
+ B2.reagents.add_reagent("cryoxadone",30)
- beakers += B1
- beakers += B2
+ beakers += B1
+ beakers += B2
/obj/item/grenade/chem_grenade/holywater
payload_name = "holy water"
@@ -41,11 +41,11 @@
stage = 2
det_time = 30
- New()
- ..()
- var/obj/item/reagent_containers/glass/beaker/large/B = new(src)
- B.reagents.add_reagent("holywater",100)
- beakers += B
+/obj/item/grenade/chem_grenade/holywater/New()
+ ..()
+ var/obj/item/reagent_containers/glass/beaker/large/B = new(src)
+ B.reagents.add_reagent("holywater",100)
+ beakers += B
/obj/item/grenade/chem_grenade/hellwater
payload_name = "hell water"
@@ -53,15 +53,15 @@
stage = 2
det_time = 30
- New()
- ..()
- var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
- var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
- B1.reagents.add_reagent("hell_water",80)
- B1.reagents.add_reagent("sugar",20)
- B2.reagents.add_reagent("hell_water", 60)
- B2.reagents.add_reagent("potassium", 20)
- B2.reagents.add_reagent("phosphorus", 20)
+/obj/item/grenade/chem_grenade/hellwater/New()
+ ..()
+ var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
+ var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
+ B1.reagents.add_reagent("hell_water",80)
+ B1.reagents.add_reagent("sugar",20)
+ B2.reagents.add_reagent("hell_water", 60)
+ B2.reagents.add_reagent("potassium", 20)
+ B2.reagents.add_reagent("phosphorus", 20)
/obj/item/grenade/chem_grenade/drugs
@@ -69,40 +69,40 @@
desc = "How does it work?"
stage = 2
- New()
- ..()
- var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
- var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
+/obj/item/grenade/chem_grenade/drugs/New()
+ ..()
+ var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
+ var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
- B1.reagents.add_reagent("space_drugs", 25)
- B1.reagents.add_reagent("lsd", 25)
- B1.reagents.add_reagent("potassium", 25)
- B2.reagents.add_reagent("phosphorus", 25)
- B2.reagents.add_reagent("sugar", 25)
+ B1.reagents.add_reagent("space_drugs", 25)
+ B1.reagents.add_reagent("lsd", 25)
+ B1.reagents.add_reagent("potassium", 25)
+ B2.reagents.add_reagent("phosphorus", 25)
+ B2.reagents.add_reagent("sugar", 25)
- beakers += B1
- beakers += B2
- update_icon()
+ beakers += B1
+ beakers += B2
+ update_icon()
/obj/item/grenade/chem_grenade/ethanol
payload_name = "ethanol"
desc = "Ach, that hits the spot."
stage = 2
- New()
- ..()
- var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
- var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
+/obj/item/grenade/chem_grenade/ethanol/New()
+ ..()
+ var/obj/item/reagent_containers/glass/beaker/large/B1 = new(src)
+ var/obj/item/reagent_containers/glass/beaker/large/B2 = new(src)
- B1.reagents.add_reagent("ethanol", 75)
- B1.reagents.add_reagent("potassium", 25)
- B2.reagents.add_reagent("phosphorus", 25)
- B2.reagents.add_reagent("sugar", 25)
- B2.reagents.add_reagent("ethanol", 25)
+ B1.reagents.add_reagent("ethanol", 75)
+ B1.reagents.add_reagent("potassium", 25)
+ B2.reagents.add_reagent("phosphorus", 25)
+ B2.reagents.add_reagent("sugar", 25)
+ B2.reagents.add_reagent("ethanol", 25)
- beakers += B1
- beakers += B2
- update_icon()
+ beakers += B1
+ beakers += B2
+ update_icon()
// -------------------------------------
// Grenades using new grenade assemblies
@@ -208,107 +208,67 @@
payload_name = "EMP"
stage = 2
- New()
- ..()
- var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
- var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
- B1.reagents.add_reagent("uranium",50)
- B2.reagents.add_reagent("iron",50)
- beakers += B1
- beakers += B2
+/obj/item/grenade/chem_grenade/emp/New()
+ ..()
+ var/obj/item/reagent_containers/glass/beaker/B1 = new(src)
+ var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
+ B1.reagents.add_reagent("uranium",50)
+ B2.reagents.add_reagent("iron",50)
+ beakers += B1
+ beakers += B2
// Assembly Variants
-/obj/item/grenade/chem_grenade/emp/remote
- New()
- ..()
- CreateDefaultTrigger(/obj/item/assembly/signaler)
+/obj/item/grenade/chem_grenade/emp/remote/New()
+ ..()
+ CreateDefaultTrigger(/obj/item/assembly/signaler)
-/obj/item/grenade/chem_grenade/emp/prox
- New()
- ..()
- CreateDefaultTrigger(/obj/item/assembly/prox_sensor)
+/obj/item/grenade/chem_grenade/emp/prox/New()
+ ..()
+ CreateDefaultTrigger(/obj/item/assembly/prox_sensor)
-/obj/item/grenade/chem_grenade/emp/mine
- New()
- ..()
- CreateDefaultTrigger(/obj/item/assembly/mousetrap)
-
-// --------------------------------------
-// Dangerous slime core grenades
-// --------------------------------------
-/*
-/obj/item/grenade/chem_grenade/large/bluespace
- payload_name = "bluespace slime"
- desc = "A standard grenade casing containing weaponized slime extract."
- stage = 2
-
- New()
- ..()
- var/obj/item/slime_extract/bluespace/B1 = new(src)
- B1.Uses = rand(1,3)
- var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
- B2.reagents.add_reagent("plasma",5 * B1.Uses)
- beakers += B1
- beakers += B2
-
-/obj/item/grenade/chem_grenade/large/bluespace/prox
- New()
- ..()
- CreateDefaultTrigger(/obj/item/assembly/prox_sensor)
-
-/obj/item/grenade/chem_grenade/large/bluespace/mine
- New()
- ..()
- CreateDefaultTrigger(/obj/item/assembly/mousetrap)
-
-/obj/item/grenade/chem_grenade/large/bluespace/remote
- New()
- ..()
- CreateDefaultTrigger(/obj/item/assembly/signaler)
-*/
+/obj/item/grenade/chem_grenade/emp/mine/New()
+ ..()
+ CreateDefaultTrigger(/obj/item/assembly/mousetrap)
/obj/item/grenade/chem_grenade/large/monster
payload_name = "gold slime"
desc = "A standard grenade containing weaponized slime extract."
stage = 2
- New()
- ..()
- var/obj/item/slime_extract/gold/B1 = new(src)
- B1.Uses = rand(1,3)
- var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
- B2.reagents.add_reagent("plasma",5 * B1.Uses)
- beakers += B1
- beakers += B2
+/obj/item/grenade/chem_grenade/large/monster/New()
+ ..()
+ var/obj/item/slime_extract/gold/B1 = new(src)
+ B1.Uses = rand(1,3)
+ var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
+ B2.reagents.add_reagent("plasma",5 * B1.Uses)
+ beakers += B1
+ beakers += B2
-/obj/item/grenade/chem_grenade/large/monster/prox
- New()
- ..()
- CreateDefaultTrigger(/obj/item/assembly/prox_sensor)
+/obj/item/grenade/chem_grenade/large/monster/prox/New()
+ ..()
+ CreateDefaultTrigger(/obj/item/assembly/prox_sensor)
-/obj/item/grenade/chem_grenade/large/monster/mine
- New()
- ..()
- CreateDefaultTrigger(/obj/item/assembly/mousetrap)
+/obj/item/grenade/chem_grenade/large/monster/mine/New()
+ ..()
+ CreateDefaultTrigger(/obj/item/assembly/mousetrap)
-/obj/item/grenade/chem_grenade/large/monster/remote
- New()
- ..()
- CreateDefaultTrigger(/obj/item/assembly/signaler)
+/obj/item/grenade/chem_grenade/large/monster/remote/New()
+ ..()
+ CreateDefaultTrigger(/obj/item/assembly/signaler)
/obj/item/grenade/chem_grenade/large/feast
payload_name = "silver slime"
desc = "A standard grenade containing weaponized slime extract."
stage = 2
- New()
- ..()
- var/obj/item/slime_extract/silver/B1 = new(src)
- B1.Uses = rand(1,3)
- var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
- B2.reagents.add_reagent("plasma",5 * B1.Uses)
- beakers += B1
- beakers += B2
+/obj/item/grenade/chem_grenade/large/feast/New()
+ ..()
+ var/obj/item/slime_extract/silver/B1 = new(src)
+ B1.Uses = rand(1,3)
+ var/obj/item/reagent_containers/glass/beaker/B2 = new(src)
+ B2.reagents.add_reagent("plasma",5 * B1.Uses)
+ beakers += B1
+ beakers += B2
// --------------------------------------
// Syndie Kits
@@ -316,25 +276,30 @@
/obj/item/storage/box/syndie_kit/remotegrenade
name = "Remote Grenade Kit"
- New()
- ..()
- new /obj/item/grenade/chem_grenade/explosion/remote(src)
- new /obj/item/multitool(src) // used to adjust the chemgrenade's signaller
- new /obj/item/assembly/signaler(src)
- return
+
+/obj/item/storage/box/syndie_kit/remotegrenade/New()
+ ..()
+ new /obj/item/grenade/chem_grenade/explosion/remote(src)
+ new /obj/item/multitool(src) // used to adjust the chemgrenade's signaller
+ new /obj/item/assembly/signaler(src)
+ return
+
/obj/item/storage/box/syndie_kit/remoteemp
name = "Remote EMP Kit"
- New()
- ..()
- new /obj/item/grenade/chem_grenade/emp/remote(src)
- new /obj/item/multitool(src) // used to adjust the chemgrenade's signaller
- new /obj/item/assembly/signaler(src)
- return
+
+/obj/item/storage/box/syndie_kit/remoteemp/New()
+ ..()
+ new /obj/item/grenade/chem_grenade/emp/remote(src)
+ new /obj/item/multitool(src) // used to adjust the chemgrenade's signaller
+ new /obj/item/assembly/signaler(src)
+ return
+
/obj/item/storage/box/syndie_kit/remotelube
name = "Remote Lube Kit"
- New()
- ..()
- new /obj/item/grenade/chem_grenade/lube(src)
- new /obj/item/multitool(src) // used to adjust the chemgrenade's signaller
- new /obj/item/assembly/signaler(src)
- return
\ No newline at end of file
+
+/obj/item/storage/box/syndie_kit/remotelube/New()
+ ..()
+ new /obj/item/grenade/chem_grenade/lube(src)
+ new /obj/item/multitool(src) // used to adjust the chemgrenade's signaller
+ new /obj/item/assembly/signaler(src)
+ return
diff --git a/code/game/objects/items/weapons/grenades/smokebomb.dm b/code/game/objects/items/weapons/grenades/smokebomb.dm
index c4ccb3e83dc..6b9c4d815f4 100644
--- a/code/game/objects/items/weapons/grenades/smokebomb.dm
+++ b/code/game/objects/items/weapons/grenades/smokebomb.dm
@@ -8,31 +8,31 @@
slot_flags = SLOT_BELT
var/datum/effect_system/smoke_spread/bad/smoke
- New()
- ..()
- src.smoke = new /datum/effect_system/smoke_spread/bad
- src.smoke.attach(src)
+/obj/item/grenade/smokebomb/New()
+ ..()
+ src.smoke = new /datum/effect_system/smoke_spread/bad
+ src.smoke.attach(src)
- Destroy()
- QDEL_NULL(smoke)
- return ..()
+/obj/item/grenade/smokebomb/Destroy()
+ QDEL_NULL(smoke)
+ return ..()
- prime()
- playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
- src.smoke.set_up(10, 0, usr.loc)
- spawn(0)
- src.smoke.start()
- sleep(10)
- src.smoke.start()
- sleep(10)
- src.smoke.start()
- sleep(10)
- src.smoke.start()
+/obj/item/grenade/smokebomb/prime()
+ playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
+ src.smoke.set_up(10, 0, usr.loc)
+ spawn(0)
+ src.smoke.start()
+ sleep(10)
+ src.smoke.start()
+ sleep(10)
+ src.smoke.start()
+ sleep(10)
+ src.smoke.start()
- for(var/obj/structure/blob/B in view(8,src))
- var/damage = round(30/(get_dist(B,src)+1))
- B.health -= damage
- B.update_icon()
- sleep(80)
- qdel(src)
- return
+ for(var/obj/structure/blob/B in view(8,src))
+ var/damage = round(30/(get_dist(B,src)+1))
+ B.health -= damage
+ B.update_icon()
+ sleep(80)
+ qdel(src)
+ return
diff --git a/code/game/objects/items/weapons/implants/implant_chem.dm b/code/game/objects/items/weapons/implants/implant_chem.dm
index b2f79f7e5c9..5f0fea79da9 100644
--- a/code/game/objects/items/weapons/implants/implant_chem.dm
+++ b/code/game/objects/items/weapons/implants/implant_chem.dm
@@ -3,7 +3,7 @@
desc = "Injects things."
icon_state = "reagents"
origin_tech = "materials=3;biotech=4"
- flags = OPENCONTAINER
+ container_type = OPENCONTAINER
/obj/item/implant/chem/get_data()
var/dat = {"Implant Specifications:
diff --git a/code/game/objects/items/weapons/lighters.dm b/code/game/objects/items/weapons/lighters.dm
index ac8c7d04a95..c6ece450f5e 100644
--- a/code/game/objects/items/weapons/lighters.dm
+++ b/code/game/objects/items/weapons/lighters.dm
@@ -24,8 +24,7 @@
icon_on = "zippoon"
icon_off = "zippo"
-/obj/item/lighter/random
- New()
+/obj/item/lighter/random/New()
var/color = pick("r","c","y","g")
icon_on = "lighter-[color]-on"
icon_off = "lighter-[color]"
diff --git a/code/game/objects/items/weapons/misc.dm b/code/game/objects/items/weapons/misc.dm
index f8cc628dc01..a38f6e11873 100644
--- a/code/game/objects/items/weapons/misc.dm
+++ b/code/game/objects/items/weapons/misc.dm
@@ -89,25 +89,25 @@
icon_state = "lightning"
desc = "test lightning"
- New()
+/obj/item/lightning/New()
icon = midicon
icon_state = "1"
- afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
- var/angle = get_angle(A, user)
-// to_chat(world, angle)
- angle = round(angle) + 45
- if(angle > 180)
- angle -= 180
- else
- angle += 180
+/obj/item/lightning/afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
+ var/angle = get_angle(A, user)
+ //to_chat(world, angle)
+ angle = round(angle) + 45
+ if(angle > 180)
+ angle -= 180
+ else
+ angle += 180
- if(!angle)
- angle = 1
-// to_chat(world, "adjusted [angle]")
- icon_state = "[angle]"
-// to_chat(world, "[angle] [(get_dist(user, A) - 1)]")
- user.Beam(A, "lightning", 'icons/obj/zap.dmi', 50, 15)
+ if(!angle)
+ angle = 1
+ //to_chat(world, "adjusted [angle]")
+ icon_state = "[angle]"
+ //to_chat(world, "[angle] [(get_dist(user, A) - 1)]")
+ user.Beam(A, "lightning", 'icons/obj/zap.dmi', 50, 15)
/obj/item/newton
name = "newton cradle"
diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm
index 7c8883ca7e8..dc466f479d0 100644
--- a/code/game/objects/items/weapons/paint.dm
+++ b/code/game/objects/items/weapons/paint.dm
@@ -13,7 +13,7 @@
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(5,10,20,30,50,70)
volume = 70
- flags = OPENCONTAINER
+ container_type = OPENCONTAINER
/obj/item/reagent_containers/glass/paint/afterattack(turf/simulated/target, mob/user, proximity)
if(!proximity)
diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm
index cd2f6dff192..6d45e5b7add 100644
--- a/code/game/objects/items/weapons/storage/backpack.dm
+++ b/code/game/objects/items/weapons/storage/backpack.dm
@@ -185,10 +185,9 @@
desc = "An NT Deluxe satchel, with the finest quality leather and the company logo in a thin gold stitch"
icon_state = "nt_deluxe"
-/obj/item/storage/backpack/satchel/withwallet
- New()
- ..()
- new /obj/item/storage/wallet/random( src )
+/obj/item/storage/backpack/satchel/withwallet/New()
+ ..()
+ new /obj/item/storage/wallet/random(src)
/obj/item/storage/backpack/satchel_norm
name = "satchel"
diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm
index 090664e7f32..f5abb96e941 100644
--- a/code/game/objects/items/weapons/storage/bags.dm
+++ b/code/game/objects/items/weapons/storage/bags.dm
@@ -207,122 +207,122 @@
w_class = WEIGHT_CLASS_NORMAL
allow_quick_empty = 1 // this function is superceded
- New()
- ..()
- //verbs -= /obj/item/storage/verb/quick_empty
- //verbs += /obj/item/storage/bag/sheetsnatcher/quick_empty
+/obj/item/storage/bag/sheetsnatcher/New()
+ ..()
+ //verbs -= /obj/item/storage/verb/quick_empty
+ //verbs += /obj/item/storage/bag/sheetsnatcher/quick_empty
- can_be_inserted(obj/item/W as obj, stop_messages = 0)
- if(!istype(W,/obj/item/stack/sheet) || istype(W,/obj/item/stack/sheet/mineral/sandstone) || istype(W,/obj/item/stack/sheet/wood))
- if(!stop_messages)
- to_chat(usr, "The snatcher does not accept [W].")
- return 0 //I don't care, but the existing code rejects them for not being "sheets" *shrug* -Sayu
- var/current = 0
- for(var/obj/item/stack/sheet/S in contents)
- current += S.amount
- if(capacity == current)//If it's full, you're done
- if(!stop_messages)
- to_chat(usr, "The snatcher is full.")
- return 0
- return 1
+/obj/item/storage/bag/sheetsnatcher/can_be_inserted(obj/item/W as obj, stop_messages = 0)
+ if(!istype(W,/obj/item/stack/sheet) || istype(W,/obj/item/stack/sheet/mineral/sandstone) || istype(W,/obj/item/stack/sheet/wood))
+ if(!stop_messages)
+ to_chat(usr, "The snatcher does not accept [W].")
+ return 0 //I don't care, but the existing code rejects them for not being "sheets" *shrug* -Sayu
+ var/current = 0
+ for(var/obj/item/stack/sheet/S in contents)
+ current += S.amount
+ if(capacity == current)//If it's full, you're done
+ if(!stop_messages)
+ to_chat(usr, "The snatcher is full.")
+ return 0
+ return 1
// Modified handle_item_insertion. Would prefer not to, but...
- handle_item_insertion(obj/item/W as obj, prevent_warning = 0)
- var/obj/item/stack/sheet/S = W
- if(!istype(S)) return 0
+/obj/item/storage/bag/sheetsnatcher/handle_item_insertion(obj/item/W as obj, prevent_warning = 0)
+ var/obj/item/stack/sheet/S = W
+ if(!istype(S)) return 0
- var/amount
- var/inserted = 0
- var/current = 0
- for(var/obj/item/stack/sheet/S2 in contents)
- current += S2.amount
- if(capacity < current + S.amount)//If the stack will fill it up
- amount = capacity - current
+ var/amount
+ var/inserted = 0
+ var/current = 0
+ for(var/obj/item/stack/sheet/S2 in contents)
+ current += S2.amount
+ if(capacity < current + S.amount)//If the stack will fill it up
+ amount = capacity - current
+ else
+ amount = S.amount
+
+ for(var/obj/item/stack/sheet/sheet in contents)
+ if(S.type == sheet.type) // we are violating the amount limitation because these are not sane objects
+ sheet.amount += amount // they should only be removed through procs in this file, which split them up.
+ S.amount -= amount
+ inserted = 1
+ break
+
+ if(!inserted || !S.amount)
+ usr.unEquip(S)
+ usr.update_icons() //update our overlays
+ if(usr.client && usr.s_active != src)
+ usr.client.screen -= S
+ S.dropped(usr)
+ if(!S.amount)
+ qdel(S)
else
- amount = S.amount
+ S.loc = src
- for(var/obj/item/stack/sheet/sheet in contents)
- if(S.type == sheet.type) // we are violating the amount limitation because these are not sane objects
- sheet.amount += amount // they should only be removed through procs in this file, which split them up.
- S.amount -= amount
- inserted = 1
- break
-
- if(!inserted || !S.amount)
- usr.unEquip(S)
- usr.update_icons() //update our overlays
- if(usr.client && usr.s_active != src)
- usr.client.screen -= S
- S.dropped(usr)
- if(!S.amount)
- qdel(S)
- else
- S.loc = src
-
- orient2hud(usr)
- if(usr.s_active)
- usr.s_active.show_to(usr)
- update_icon()
- return 1
+ orient2hud(usr)
+ if(usr.s_active)
+ usr.s_active.show_to(usr)
+ update_icon()
+ return 1
// Sets up numbered display to show the stack size of each stored mineral
// NOTE: numbered display is turned off currently because it's broken
- orient2hud(mob/user as mob)
- var/adjusted_contents = contents.len
+/obj/item/storage/bag/sheetsnatcher/orient2hud(mob/user as mob)
+ var/adjusted_contents = contents.len
- //Numbered contents display
- var/list/datum/numbered_display/numbered_contents
- if(display_contents_with_number)
- numbered_contents = list()
- adjusted_contents = 0
- for(var/obj/item/stack/sheet/I in contents)
- adjusted_contents++
- var/datum/numbered_display/D = new/datum/numbered_display(I)
- D.number = I.amount
- numbered_contents.Add( D )
+ //Numbered contents display
+ var/list/datum/numbered_display/numbered_contents
+ if(display_contents_with_number)
+ numbered_contents = list()
+ adjusted_contents = 0
+ for(var/obj/item/stack/sheet/I in contents)
+ adjusted_contents++
+ var/datum/numbered_display/D = new/datum/numbered_display(I)
+ D.number = I.amount
+ numbered_contents.Add( D )
- var/row_num = 0
- var/col_count = min(7,storage_slots) -1
- if(adjusted_contents > 7)
- row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width.
- src.standard_orient_objs(row_num, col_count, numbered_contents)
- return
+ var/row_num = 0
+ var/col_count = min(7,storage_slots) -1
+ if(adjusted_contents > 7)
+ row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width.
+ src.standard_orient_objs(row_num, col_count, numbered_contents)
+ return
// Modified quick_empty verb drops appropriate sized stacks
- quick_empty()
- var/location = get_turf(src)
- for(var/obj/item/stack/sheet/S in contents)
- while(S.amount)
- var/obj/item/stack/sheet/N = new S.type(location)
- var/stacksize = min(S.amount,N.max_amount)
- N.amount = stacksize
- S.amount -= stacksize
- if(!S.amount)
- qdel(S) // todo: there's probably something missing here
- orient2hud(usr)
- if(usr.s_active)
- usr.s_active.show_to(usr)
- update_icon()
+/obj/item/storage/bag/sheetsnatcher/quick_empty()
+ var/location = get_turf(src)
+ for(var/obj/item/stack/sheet/S in contents)
+ while(S.amount)
+ var/obj/item/stack/sheet/N = new S.type(location)
+ var/stacksize = min(S.amount,N.max_amount)
+ N.amount = stacksize
+ S.amount -= stacksize
+ if(!S.amount)
+ qdel(S) // todo: there's probably something missing here
+ orient2hud(usr)
+ if(usr.s_active)
+ usr.s_active.show_to(usr)
+ update_icon()
// Instead of removing
- remove_from_storage(obj/item/W as obj, atom/new_location)
- var/obj/item/stack/sheet/S = W
- if(!istype(S)) return 0
+/obj/item/storage/bag/sheetsnatcher/remove_from_storage(obj/item/W as obj, atom/new_location)
+ var/obj/item/stack/sheet/S = W
+ if(!istype(S)) return 0
- //I would prefer to drop a new stack, but the item/attack_hand code
- // that calls this can't recieve a different object than you clicked on.
- //Therefore, make a new stack internally that has the remainder.
- // -Sayu
+ //I would prefer to drop a new stack, but the item/attack_hand code
+ // that calls this can't recieve a different object than you clicked on.
+ //Therefore, make a new stack internally that has the remainder.
+ // -Sayu
- if(S.amount > S.max_amount)
- var/obj/item/stack/sheet/temp = new S.type(src)
- temp.amount = S.amount - S.max_amount
- S.amount = S.max_amount
+ if(S.amount > S.max_amount)
+ var/obj/item/stack/sheet/temp = new S.type(src)
+ temp.amount = S.amount - S.max_amount
+ S.amount = S.max_amount
- return ..(S,new_location)
+ return ..(S,new_location)
// -----------------------------
// Sheet Snatcher (Cyborg)
diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm
index 5ba58e2f313..67f32dbfd58 100644
--- a/code/game/objects/items/weapons/storage/belt.dm
+++ b/code/game/objects/items/weapons/storage/belt.dm
@@ -631,21 +631,21 @@
max_combined_w_class = 280
can_hold = list()
- New()
- ..()
- new /obj/item/crowbar(src)
- new /obj/item/screwdriver(src)
- new /obj/item/weldingtool/hugetank(src)
- new /obj/item/wirecutters(src)
- new /obj/item/wrench(src)
- new /obj/item/multitool(src)
- new /obj/item/stack/cable_coil(src)
+/obj/item/storage/belt/bluespace/admin/New()
+ ..()
+ new /obj/item/crowbar(src)
+ new /obj/item/screwdriver(src)
+ new /obj/item/weldingtool/hugetank(src)
+ new /obj/item/wirecutters(src)
+ new /obj/item/wrench(src)
+ new /obj/item/multitool(src)
+ new /obj/item/stack/cable_coil(src)
- new /obj/item/restraints/handcuffs(src)
- new /obj/item/dnainjector/xraymut(src)
- new /obj/item/dnainjector/firemut(src)
- new /obj/item/dnainjector/telemut(src)
- new /obj/item/dnainjector/hulkmut(src)
+ new /obj/item/restraints/handcuffs(src)
+ new /obj/item/dnainjector/xraymut(src)
+ new /obj/item/dnainjector/firemut(src)
+ new /obj/item/dnainjector/telemut(src)
+ new /obj/item/dnainjector/hulkmut(src)
// new /obj/item/spellbook(src) // for smoke effects, door openings, etc
// new /obj/item/magic/spellbook(src)
@@ -660,15 +660,15 @@
max_combined_w_class = 280
can_hold = list()
- New()
- ..()
- new /obj/item/crowbar(src)
- new /obj/item/screwdriver(src)
- new /obj/item/weldingtool/hugetank(src)
- new /obj/item/wirecutters(src)
- new /obj/item/wrench(src)
- new /obj/item/multitool(src)
- new /obj/item/stack/cable_coil(src)
+/obj/item/storage/belt/bluespace/sandbox/New()
+ ..()
+ new /obj/item/crowbar(src)
+ new /obj/item/screwdriver(src)
+ new /obj/item/weldingtool/hugetank(src)
+ new /obj/item/wirecutters(src)
+ new /obj/item/wrench(src)
+ new /obj/item/multitool(src)
+ new /obj/item/stack/cable_coil(src)
- new /obj/item/analyzer(src)
- new /obj/item/healthanalyzer(src)
+ new /obj/item/analyzer(src)
+ new /obj/item/healthanalyzer(src)
diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm
index 364fd49847b..96dd853be09 100644
--- a/code/game/objects/items/weapons/tanks/watertank.dm
+++ b/code/game/objects/items/weapons/tanks/watertank.dm
@@ -116,7 +116,8 @@
amount_per_transfer_from_this = 50
possible_transfer_amounts = list(25,50,100)
volume = 500
- flags = NODROP | OPENCONTAINER | NOBLUDGEON
+ flags = NODROP | NOBLUDGEON
+ container_type = OPENCONTAINER
var/obj/item/watertank/tank
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/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/janicart.dm b/code/game/objects/structures/janicart.dm
index b19c5a56e99..bba1dc18de6 100644
--- a/code/game/objects/structures/janicart.dm
+++ b/code/game/objects/structures/janicart.dm
@@ -7,7 +7,7 @@
icon_state = "cart"
anchored = 0
density = 1
- flags = OPENCONTAINER
+ container_type = OPENCONTAINER
//copypaste sorry
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
var/obj/item/storage/bag/trash/mybag = null
diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm
index aa9f21a9cce..f01cc8c41ca 100644
--- a/code/game/objects/structures/mop_bucket.dm
+++ b/code/game/objects/structures/mop_bucket.dm
@@ -4,7 +4,7 @@
icon = 'icons/obj/janitor.dmi'
icon_state = "mopbucket"
density = 1
- flags = OPENCONTAINER
+ container_type = OPENCONTAINER
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
/obj/structure/mopbucket/New()
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 91f348d0106..7554b7ae194 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -50,8 +50,8 @@
/obj/structure/table/update_icon()
if(smooth && !flipped)
icon_state = ""
- smooth_icon(src)
- smooth_icon_neighbors(src)
+ queue_smooth(src)
+ queue_smooth_neighbors(src)
if(flipped)
clear_smooth_overlays()
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 751ade6081f..e657e9f8538 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -115,8 +115,8 @@
if(!open)
return
var/obj/item/reagent_containers/RG = I
- if(RG.is_open_container())
- if(RG.reagents.total_volume >= RG.volume)
+ if(RG.is_refillable())
+ if(RG.reagents.holder_full())
to_chat(user, "[RG] is full.")
else
RG.reagents.add_reagent("toiletwater", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 25c78f6e972..a33e4176599 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -65,7 +65,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
else
to_chat(user, "The window is unscrewed from the floor, and could be deconstructed by wrenching.")
if(!anchored && !fulltile)
- to_chat(user, "Alt-click to rotate it clockwise.")
+ to_chat(user, "Alt-click to rotate it.")
/obj/structure/window/New(Loc, direct)
..()
@@ -355,7 +355,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
set category = "Object"
set src in oview(1)
- if(usr.stat || !usr.canmove || usr.restrained())
+ if(usr.incapacitated())
return
if(anchored)
@@ -378,7 +378,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
set category = "Object"
set src in oview(1)
- if(usr.stat || !usr.canmove || usr.restrained())
+ if(usr.incapacitated())
return
if(anchored)
@@ -397,12 +397,31 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
return TRUE
/obj/structure/window/AltClick(mob/user)
+
if(user.incapacitated())
to_chat(user, "You can't do that right now!")
return
+
if(!Adjacent(user))
+ to_chat(user, "Move closer to the window!")
return
- revrotate()
+
+ if(anchored)
+ to_chat(user, "[src] cannot be rotated while it is fastened to the floor!")
+ return FALSE
+
+ var/target_dir = turn(dir, 270)
+
+ if(!valid_window_location(loc, target_dir))
+ target_dir = turn(dir, 90)
+ if(!valid_window_location(loc, target_dir))
+ to_chat(user, "There is no room to rotate the [src]")
+ return FALSE
+
+ setDir(target_dir)
+ ini_dir = dir
+ add_fingerprint(user)
+ return TRUE
/obj/structure/window/Destroy()
density = FALSE
@@ -425,7 +444,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
/obj/structure/window/proc/update_nearby_icons()
update_icon()
if(smooth)
- smooth_icon_neighbors(src)
+ queue_smooth_neighbors(src)
/obj/structure/window/update_icon()
if(!QDELETED(src))
@@ -434,7 +453,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
var/ratio = obj_integrity / max_integrity
ratio = CEILING(ratio*4, 1) * 25
if(smooth)
- smooth_icon(src)
+ queue_smooth(src)
overlays -= crack_overlay
if(ratio > 75)
return
@@ -714,4 +733,4 @@ obj/structure/window/full/reinforced/ice
dir = FULLTILE_WINDOW_DIR
max_integrity = 120
level = 3
- glass_amount = 2
\ No newline at end of file
+ glass_amount = 2
diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm
index fedbfaa5929..21dbdb9e024 100644
--- a/code/game/turfs/simulated.dm
+++ b/code/game/turfs/simulated.dm
@@ -85,6 +85,6 @@
/turf/simulated/ChangeTurf(var/path)
. = ..()
- smooth_icon_neighbors(src)
+ queue_smooth_neighbors(src)
/turf/simulated/proc/is_shielded()
diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm
index 42d241404b1..d26a24b39a2 100644
--- a/code/game/turfs/simulated/floor.dm
+++ b/code/game/turfs/simulated/floor.dm
@@ -180,7 +180,6 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
var/turf/simulated/floor/plating/P = pry_tile(CB, user, TRUE)
if(!istype(P))
return
- update_icon()
P.attackby(T, user, params)
/turf/simulated/floor/proc/pry_tile(obj/item/C, mob/user, silent = FALSE)
diff --git a/code/game/turfs/simulated/floor/fancy_floor.dm b/code/game/turfs/simulated/floor/fancy_floor.dm
index 96f10a832b5..e9f8d96e70f 100644
--- a/code/game/turfs/simulated/floor/fancy_floor.dm
+++ b/code/game/turfs/simulated/floor/fancy_floor.dm
@@ -128,11 +128,11 @@
return 0
if(!broken && !burnt)
if(smooth)
- smooth_icon(src)
+ queue_smooth(src)
else
make_plating()
if(smooth)
- smooth_icon_neighbors(src)
+ queue_smooth_neighbors(src)
/turf/simulated/floor/carpet/break_tile()
broken = 1
diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm
index 4c6eee6311e..c6de130c81a 100644
--- a/code/game/turfs/simulated/floor/plating.dm
+++ b/code/game/turfs/simulated/floor/plating.dm
@@ -15,9 +15,6 @@
/turf/simulated/floor/plating/New()
..()
icon_plating = icon_state
- if(icon == 'icons/turf/floors/plating.dmi')
- smooth = SMOOTH_MORE
- canSmoothWith = list(/turf/simulated/floor/plating, /turf/space)
update_icon()
/turf/simulated/floor/plating/update_icon()
@@ -25,7 +22,6 @@
return
if(!broken && !burnt)
icon_state = icon_plating //Because asteroids are 'platings' too.
- underlays += image(icon, icon_state)
/turf/simulated/floor/plating/attackby(obj/item/C, mob/user, params)
if(..())
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index c22c7530505..6008b093c5a 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -72,7 +72,7 @@
if(!damage_overlays[1]) //list hasn't been populated
generate_overlays()
- smooth_icon(src)
+ queue_smooth(src)
if(!damage)
if(damage_overlay)
overlays -= damage_overlays[damage_overlay]
diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm
index eb054ba19ed..f1837173d6d 100644
--- a/code/game/turfs/simulated/walls_reinforced.dm
+++ b/code/game/turfs/simulated/walls_reinforced.dm
@@ -65,7 +65,7 @@
d_state = RWALL_INTACT
update_icon()
- smooth_icon_neighbors(src)
+ queue_smooth_neighbors(src)
to_chat(user, "You repair the last of the damage.")
return TRUE
@@ -84,7 +84,7 @@
to_chat(user, "You add an additional layer of coating to the wall.")
ChangeTurf(/turf/simulated/wall/r_wall/coated)
update_icon()
- smooth_icon_neighbors(src)
+ queue_smooth_neighbors(src)
can_be_reinforced = FALSE
return TRUE
return FALSE
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index 2e60537ce6f..d7ed44c3c9a 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -39,18 +39,18 @@
for(var/atom/movable/AM in src)
Entered(AM)
if(smooth && ticker && ticker.current_state == GAME_STATE_PLAYING)
- smooth_icon(src)
+ queue_smooth(src)
/hook/startup/proc/smooth_world()
var/watch = start_watch()
log_startup_progress("Smoothing atoms...")
for(var/turf/T in world)
if(T.smooth)
- smooth_icon(T)
+ queue_smooth(T)
for(var/A in T)
var/atom/AA = A
if(AA.smooth)
- smooth_icon(AA)
+ queue_smooth(AA)
log_startup_progress(" Smoothed atoms in [stop_watch(watch)]s.")
return 1
@@ -226,8 +226,6 @@
for(var/obj/structure/cable/C in contents)
qdel(C)
- smooth_icon(src)
-
/turf/simulated/AfterChange(ignore_air, keep_cabling = FALSE)
..()
RemoveLattice()
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index b507af0871e..365a0beaead 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -663,8 +663,17 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
if(job_master)
+ var/currentpositiontally
+ var/totalpositiontally
+ to_chat(src, "Job Name: Filled job slot / Total job slots (Free job slots)")
for(var/datum/job/job in job_master.occupations)
- to_chat(src, "[job.title]: [job.total_positions]")
+ to_chat(src, "[job.title]: [job.current_positions] / \
+ [job.total_positions == -1 ? "UNLIMITED" : job.total_positions] \
+ ([job.total_positions == -1 ? "UNLIMITED" : job.total_positions - job.current_positions])")
+ if(job.total_positions != -1) // Only count position that isn't unlimited
+ currentpositiontally += job.current_positions
+ totalpositiontally += job.total_positions
+ to_chat(src, "Currently filled job slots (Excluding unlimited): [currentpositiontally] / [totalpositiontally] ([totalpositiontally - currentpositiontally])")
feedback_add_details("admin_verb","LFS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in view())
diff --git a/code/modules/atmos_automation/console.dm b/code/modules/atmos_automation/console.dm
index e486898d18d..f4c3873717c 100644
--- a/code/modules/atmos_automation/console.dm
+++ b/code/modules/atmos_automation/console.dm
@@ -13,216 +13,216 @@
var/list/datum/automation/automations = list()
- receive_signal(datum/signal/signal)
- if(!signal || signal.encryption) return
+/obj/machinery/computer/general_air_control/atmos_automation/receive_signal(datum/signal/signal)
+ if(!signal || signal.encryption) return
- var/id_tag = signal.data["tag"]
- if(!id_tag)
- return
+ var/id_tag = signal.data["tag"]
+ if(!id_tag)
+ return
- sensor_information[id_tag] = signal.data
+ sensor_information[id_tag] = signal.data
- process()
- if(on)
- for(var/datum/automation/A in automations)
- A.process()
+/obj/machinery/computer/general_air_control/atmos_automation/process()
+ if(on)
+ for(var/datum/automation/A in automations)
+ A.process()
- update_icon()
+/obj/machinery/computer/general_air_control/atmos_automation/update_icon()
+ icon_state = initial(icon_state)
+ // Broken
+ if(stat & BROKEN)
+ icon_state += "b"
+
+ // Powered
+ else if(stat & NOPOWER)
icon_state = initial(icon_state)
- // Broken
- if(stat & BROKEN)
- icon_state += "b"
+ icon_state += "0"
+ else if(on)
+ icon_state += "_active"
- // Powered
- else if(stat & NOPOWER)
- icon_state = initial(icon_state)
- icon_state += "0"
- else if(on)
- icon_state += "_active"
+/obj/machinery/computer/general_air_control/atmos_automation/proc/request_device_refresh(device)
+ send_signal(list("tag"=device, "status"))
- proc/request_device_refresh(var/device)
- send_signal(list("tag"=device, "status"))
+/obj/machinery/computer/general_air_control/atmos_automation/proc/send_signal(list/data, filter = RADIO_ATMOSIA)//filter's here so the AAC can cross communicate to things like vents, which have a different filter
+ var/datum/signal/signal = new
+ signal.transmission_method = 1 //radio signal
+ signal.source = src
+ signal.data=data
+ signal.data["sigtype"]="command"
+ signal.data["advcontrol"]=1//AAC balancing, you need to manually get up to the machine to make it listen to this
+ radio_connection.post_signal(src, signal, range = 8, filter = filter)
- proc/send_signal(var/list/data, var/filter = RADIO_ATMOSIA)//filter's here so the AAC can cross communicate to things like vents, which have a different filter
- var/datum/signal/signal = new
- signal.transmission_method = 1 //radio signal
- signal.source = src
- signal.data=data
- signal.data["sigtype"]="command"
- signal.data["advcontrol"]=1//AAC balancing, you need to manually get up to the machine to make it listen to this
- radio_connection.post_signal(src, signal, range = 8, filter = filter)
+/obj/machinery/computer/general_air_control/atmos_automation/proc/selectValidChildFor(datum/automation/parent, mob/user, list/valid_returntypes)
+ var/list/choices=list()
+ for(var/childtype in automation_types)
+ var/datum/automation/A = new childtype(src)
+ if(A.returntype == null)
+ continue
+ if(!(A.returntype in valid_returntypes))
+ continue
+ choices[A.name]=A
+ if(choices.len==0)
+ testing("Unable to find automations with returntype in [english_list(valid_returntypes)]!")
+ return 0
+ var/label=input(user, "Select new automation:", "Automations", "Cancel") as null|anything in choices
+ if(!label)
+ return 0
+ return choices[label]
- proc/selectValidChildFor(var/datum/automation/parent, var/mob/user, var/list/valid_returntypes)
- var/list/choices=list()
- for(var/childtype in automation_types)
- var/datum/automation/A = new childtype(src)
- if(A.returntype == null)
- continue
- if(!(A.returntype in valid_returntypes))
- continue
- choices[A.name]=A
- if(choices.len==0)
- testing("Unable to find automations with returntype in [english_list(valid_returntypes)]!")
- return 0
- var/label=input(user, "Select new automation:", "Automations", "Cancel") as null|anything in choices
- if(!label)
- return 0
- return choices[label]
+/obj/machinery/computer/general_air_control/atmos_automation/return_text()
+ var/out=..()
- return_text()
- var/out=..()
+ if(on)
+ out += "RUNNING"
+ else
+ out += "STOPPED"
- if(on)
- out += "RUNNING"
- else
- out += "STOPPED"
+ out += {"
+
- "}
- return out
-
- Topic(href,href_list)
- if(..())
- return 1
-
- if(href_list["on"])
- on = !on
- updateUsrDialog()
- update_icon()
- return 1
-
- if(href_list["add"])
- var/new_child=selectValidChildFor(null,usr,list(0))
- if(!new_child)
- return 1
- automations += new_child
- updateUsrDialog()
- return 1
-
- if(href_list["label"])
- var/datum/automation/A=locate(href_list["label"])
- if(!A) return 1
- var/nl=input(usr, "Please enter a label for this automation task.") as text|null
- if(!nl) return 1
- nl = copytext(sanitize(nl), 1, 50)
- A.label=nl
- updateUsrDialog()
- return 1
-
- if(href_list["reset"])
- if(href_list["reset"]=="*")
- for(var/datum/automation/A in automations)
- if(!A) continue
- A.OnReset()
- else
- var/datum/automation/A=locate(href_list["reset"])
- if(!A) return 1
+ if(!A) continue
A.OnReset()
- updateUsrDialog()
- return 1
+ else
+ var/datum/automation/A=locate(href_list["reset"])
+ if(!A) return 1
+ A.OnReset()
+ updateUsrDialog()
+ return 1
- if(href_list["remove"])
- if(href_list["remove"]=="*")
- var/confirm=alert("Are you sure you want to remove ALL automations?","Automations","Yes","No")
- if(confirm == "No") return 0
- for(var/datum/automation/A in automations)
- if(!A) continue
- A.OnRemove()
- automations.Remove(A)
- else
- var/datum/automation/A=locate(href_list["remove"])
- if(!A) return 1
+ if(href_list["remove"])
+ if(href_list["remove"]=="*")
+ var/confirm=alert("Are you sure you want to remove ALL automations?","Automations","Yes","No")
+ if(confirm == "No") return 0
+ for(var/datum/automation/A in automations)
+ if(!A) continue
A.OnRemove()
automations.Remove(A)
- updateUsrDialog()
- return 1
+ else
+ var/datum/automation/A=locate(href_list["remove"])
+ if(!A) return 1
+ A.OnRemove()
+ automations.Remove(A)
+ updateUsrDialog()
+ return 1
- if(href_list["read"])
- var/code = input("Input exported AAC code.","Automations","") as message|null
- if(!code) return 0
- ReadCode(code)
- updateUsrDialog()
- return 1
+ if(href_list["read"])
+ var/code = input("Input exported AAC code.","Automations","") as message|null
+ if(!code) return 0
+ ReadCode(code)
+ updateUsrDialog()
+ return 1
- if(href_list["dump"])
- input("Exported AAC code:","Automations",DumpCode()) as message|null
- return 0
+ if(href_list["dump"])
+ input("Exported AAC code:","Automations",DumpCode()) as message|null
+ return 0
- proc/MakeCompare(var/datum/automation/a, var/datum/automation/b, var/comparetype)
- var/datum/automation/compare/compare=new(src)
- compare.comparator = comparetype
- compare.children[1] = a
- compare.children[2] = b
- return compare
+/obj/machinery/computer/general_air_control/atmos_automation/proc/MakeCompare(datum/automation/a, datum/automation/b, comparetype)
+ var/datum/automation/compare/compare=new(src)
+ compare.comparator = comparetype
+ compare.children[1] = a
+ compare.children[2] = b
+ return compare
- proc/MakeNumber(var/value)
- var/datum/automation/static_value/val = new(src)
- val.value=value
- return val
+/obj/machinery/computer/general_air_control/atmos_automation/proc/MakeNumber(value)
+ var/datum/automation/static_value/val = new(src)
+ val.value=value
+ return val
- proc/MakeGetSensorData(var/sns_tag,var/field)
- var/datum/automation/get_sensor_data/sensor=new(src)
- sensor.sensor=sns_tag
- sensor.field=field
- return sensor
+/obj/machinery/computer/general_air_control/atmos_automation/proc/MakeGetSensorData(sns_tag,field)
+ var/datum/automation/get_sensor_data/sensor=new(src)
+ sensor.sensor=sns_tag
+ sensor.field=field
+ return sensor
- proc/DumpCode()
- var/list/json[0]
- for(var/datum/automation/A in automations)
- json += list(A.Export())
- return json_encode(json)
+/obj/machinery/computer/general_air_control/atmos_automation/proc/DumpCode()
+ var/list/json[0]
+ for(var/datum/automation/A in automations)
+ json += list(A.Export())
+ return json_encode(json)
- proc/ReadCode(var/jsonStr)
- automations.Cut()
- var/list/json = json_decode(jsonStr)
- if(json.len>0)
- for(var/list/cData in json)
- if(isnull(cData) || !("type" in cData))
- testing("AAC: Null cData in root JS array.")
- continue
- var/Atype=text2path(cData["type"])
- if(!(Atype in automation_types))
- testing("AAC: Unrecognized Atype [Atype].")
- continue
- var/datum/automation/A = new Atype(src)
- A.Import(cData)
- automations += A
+/obj/machinery/computer/general_air_control/atmos_automation/proc/ReadCode(jsonStr)
+ automations.Cut()
+ var/list/json = json_decode(jsonStr)
+ if(json.len>0)
+ for(var/list/cData in json)
+ if(isnull(cData) || !("type" in cData))
+ testing("AAC: Null cData in root JS array.")
+ continue
+ var/Atype=text2path(cData["type"])
+ if(!(Atype in automation_types))
+ testing("AAC: Unrecognized Atype [Atype].")
+ continue
+ var/datum/automation/A = new Atype(src)
+ A.Import(cData)
+ automations += A
/obj/machinery/computer/general_air_control/atmos_automation/burnchamber
var/injector_tag="inc_in"
@@ -230,79 +230,80 @@
var/sensor_tag="inc_sensor"
frequency=1449
var/temperature=1000
- New()
- ..()
- // On State
- // Pretty much this:
- /*
- if(get_sensor("inc_sensor","temperature") < 200)
- set_injector_state("inc_in",1)
- set_vent_pump_power("inc_out",0)
- else
- set_vent_pump_power("inc_out",1
- */
+/obj/machinery/computer/general_air_control/atmos_automation/burnchamber/New()
+ ..()
- var/datum/automation/get_sensor_data/sensor=new(src)
- sensor.sensor=sensor_tag
- sensor.field="temperature"
+ // On State
+ // Pretty much this:
+ /*
+ if(get_sensor("inc_sensor","temperature") < 200)
+ set_injector_state("inc_in",1)
+ set_vent_pump_power("inc_out",0)
+ else
+ set_vent_pump_power("inc_out",1
+ */
- var/datum/automation/static_value/val = new(src)
- val.value=temperature - 800
+ var/datum/automation/get_sensor_data/sensor=new(src)
+ sensor.sensor=sensor_tag
+ sensor.field="temperature"
- var/datum/automation/compare/compare=new(src)
- compare.comparator = "Less Than"
- compare.children[1] = sensor
- compare.children[2] = val
+ var/datum/automation/static_value/val = new(src)
+ val.value=temperature - 800
- var/datum/automation/set_injector_power/inj_on=new(src)
- inj_on.injector=injector_tag
- inj_on.state=1
+ var/datum/automation/compare/compare=new(src)
+ compare.comparator = "Less Than"
+ compare.children[1] = sensor
+ compare.children[2] = val
- var/datum/automation/set_vent_pump_power/vp_on=new(src)
- vp_on.vent_pump=output_tag
- vp_on.state=1
+ var/datum/automation/set_injector_power/inj_on=new(src)
+ inj_on.injector=injector_tag
+ inj_on.state=1
- var/datum/automation/set_vent_pump_power/vp_off=new(src)
- vp_off.vent_pump=output_tag
- vp_off.state=0
+ var/datum/automation/set_vent_pump_power/vp_on=new(src)
+ vp_on.vent_pump=output_tag
+ vp_on.state=1
- var/datum/automation/if_statement/i = new (src)
- i.label = "Fuel Injector On"
- i.condition = compare
- i.children_then.Add(inj_on)
- i.children_then.Add(vp_off)
- i.children_else.Add(vp_on)
+ var/datum/automation/set_vent_pump_power/vp_off=new(src)
+ vp_off.vent_pump=output_tag
+ vp_off.state=0
- automations += i
+ var/datum/automation/if_statement/i = new (src)
+ i.label = "Fuel Injector On"
+ i.condition = compare
+ i.children_then.Add(inj_on)
+ i.children_then.Add(vp_off)
+ i.children_else.Add(vp_on)
- // Off state
- /*
- if(get_sensor("inc_sensor","temperature") > 1000)
- set_injector_state("inc_in",0)
- */
- sensor=new(src)
- sensor.sensor=sensor_tag
- sensor.field="temperature"
+ automations += i
- val = new(src)
- val.value=temperature
+ // Off state
+ /*
+ if(get_sensor("inc_sensor","temperature") > 1000)
+ set_injector_state("inc_in",0)
+ */
+ sensor=new(src)
+ sensor.sensor=sensor_tag
+ sensor.field="temperature"
- compare=new(src)
- compare.comparator = "Greater Than"
- compare.children[1] = sensor
- compare.children[2] = val
+ val = new(src)
+ val.value=temperature
- var/datum/automation/set_injector_power/inj_off=new(src)
- inj_off.injector=injector_tag
- inj_off.state=0
+ compare=new(src)
+ compare.comparator = "Greater Than"
+ compare.children[1] = sensor
+ compare.children[2] = val
- i = new (src)
- i.label = "Fuel Injector Off"
- i.condition = compare
- i.children_then.Add(inj_off)
+ var/datum/automation/set_injector_power/inj_off=new(src)
+ inj_off.injector=injector_tag
+ inj_off.state=0
- automations += i
+ i = new (src)
+ i.label = "Fuel Injector Off"
+ i.condition = compare
+ i.children_then.Add(inj_off)
+
+ automations += i
/obj/machinery/computer/general_air_control/atmos_automation/air_mixing
var/n2_injector_tag="air_n2_in"
@@ -311,142 +312,143 @@
var/sensor_tag="air_sensor"
frequency=1443
var/temperature=1000
- New()
- ..()
- buildO2()
- buildN2()
- buildOutletVent()
- proc/buildO2()
- ///////////////////////////////////////////////////////////////
- // Oxygen Injection
- ///////////////////////////////////////////////////////////////
+/obj/machinery/computer/general_air_control/atmos_automation/air_mixing/New()
+ ..()
+ buildO2()
+ buildN2()
+ buildOutletVent()
- var/datum/automation/set_injector_power/inj_on=new(src)
- inj_on.injector=o2_injector_tag
- inj_on.state=1
+/obj/machinery/computer/general_air_control/atmos_automation/air_mixing/proc/buildO2()
+ ///////////////////////////////////////////////////////////////
+ // Oxygen Injection
+ ///////////////////////////////////////////////////////////////
- var/datum/automation/set_injector_power/inj_off=new(src)
- inj_off.injector=o2_injector_tag
- inj_off.state=0
+ var/datum/automation/set_injector_power/inj_on=new(src)
+ inj_on.injector=o2_injector_tag
+ inj_on.state=1
- var/datum/automation/if_statement/i = new (src)
- i.label = "Oxygen Injection"
- i.condition = MakeCompare(
+ var/datum/automation/set_injector_power/inj_off=new(src)
+ inj_off.injector=o2_injector_tag
+ inj_off.state=0
+
+ var/datum/automation/if_statement/i = new (src)
+ i.label = "Oxygen Injection"
+ i.condition = MakeCompare(
+ MakeGetSensorData(sensor_tag,"oxygen"),
+ MakeNumber(20),
+ "Less Than or Equal to"
+ )
+ i.children_then.Add(inj_on)
+ i.children_else.Add(inj_off)
+
+ automations += i
+
+/obj/machinery/computer/general_air_control/atmos_automation/air_mixing/proc/buildN2()
+ ///////////////////////////////////////////////////////////////
+ // Nitrogen Injection
+ ///////////////////////////////////////////////////////////////
+ /*
+ if(get_sensor_data("pressure") < 100)
+ injector_on()
+ else
+ if(get_sensor_data("pressure") > 5000)
+ injector_off()
+ */
+
+ var/datum/automation/set_injector_power/inj_on=new(src)
+ inj_on.injector=n2_injector_tag
+ inj_on.state=1
+
+ var/datum/automation/set_injector_power/inj_off=new(src)
+ inj_off.injector=n2_injector_tag
+ inj_off.state=0
+
+ var/datum/automation/if_statement/if_on = new (src)
+ if_on.label = "Nitrogen Injection"
+ if_on.condition = MakeCompare(
+ MakeGetSensorData(sensor_tag,"pressure"),
+ MakeNumber(100),
+ "Less Than"
+ )
+ if_on.children_then.Add(inj_on)
+
+
+ var/datum/automation/if_statement/if_off=new(src)
+ if_off.condition=MakeCompare(
+ MakeGetSensorData(sensor_tag,"pressure"),
+ MakeNumber(5000),
+ "Greater Than"
+ )
+ if_off.children_then.Add(inj_off)
+
+ if_on.children_else.Add(if_off)
+
+ automations += if_on
+
+/obj/machinery/computer/general_air_control/atmos_automation/air_mixing/proc/buildOutletVent()
+ ///////////////////////////////////////////////////////////////
+ // Outlet Management
+ ///////////////////////////////////////////////////////////////
+ /*
+ if(get_sensor_data("pressure") >= 5000 && get_sensor_data("oxygen") >= 20)
+ vent_on()
+ else
+ if(get_sensor_data("oxygen") < 20 || get_sensor_data("pressure") < 100)
+ vent_off()
+ */
+
+ var/datum/automation/set_vent_pump_power/vp_on=new(src)
+ vp_on.vent_pump=output_tag
+ vp_on.state=1
+
+ var/datum/automation/set_vent_pump_power/vp_off=new(src)
+ vp_off.vent_pump=output_tag
+ vp_off.state=0
+
+ var/datum/automation/if_statement/if_on=new(src)
+ if_on.label="Air Output"
+
+ var/datum/automation/and/and_on=new(src)
+ and_on.children.Add(
+ MakeCompare(
+ MakeGetSensorData(sensor_tag,"pressure"),
+ MakeNumber(5000),
+ "Greater Than or Equal to"
+ )
+ )
+ and_on.children.Add(
+ MakeCompare(
MakeGetSensorData(sensor_tag,"oxygen"),
MakeNumber(20),
- "Less Than or Equal to"
+ "Greater Than or Equal to"
)
- i.children_then.Add(inj_on)
- i.children_else.Add(inj_off)
+ )
+ if_on.condition=and_on
+ if_on.children_then.Add(vp_on)
- automations += i
+ //////////////////////////////
- proc/buildN2()
- ///////////////////////////////////////////////////////////////
- // Nitrogen Injection
- ///////////////////////////////////////////////////////////////
- /*
- if(get_sensor_data("pressure") < 100)
- injector_on()
- else
- if(get_sensor_data("pressure") > 5000)
- injector_off()
- */
+ var/datum/automation/if_statement/if_off=new(src)
- var/datum/automation/set_injector_power/inj_on=new(src)
- inj_on.injector=n2_injector_tag
- inj_on.state=1
-
- var/datum/automation/set_injector_power/inj_off=new(src)
- inj_off.injector=n2_injector_tag
- inj_off.state=0
-
- var/datum/automation/if_statement/if_on = new (src)
- if_on.label = "Nitrogen Injection"
- if_on.condition = MakeCompare(
+ var/datum/automation/or/or_off=new(src)
+ or_off.children.Add(
+ MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(100),
"Less Than"
)
- if_on.children_then.Add(inj_on)
-
-
- var/datum/automation/if_statement/if_off=new(src)
- if_off.condition=MakeCompare(
- MakeGetSensorData(sensor_tag,"pressure"),
- MakeNumber(5000),
- "Greater Than"
+ )
+ or_off.children.Add(
+ MakeCompare(
+ MakeGetSensorData(sensor_tag,"oxygen"),
+ MakeNumber(20),
+ "Less Than"
)
- if_off.children_then.Add(inj_off)
+ )
+ if_off.condition=or_off
+ if_off.children_then.Add(vp_off)
- if_on.children_else.Add(if_off)
+ if_on.children_else.Add(if_off)
- automations += if_on
-
- proc/buildOutletVent()
- ///////////////////////////////////////////////////////////////
- // Outlet Management
- ///////////////////////////////////////////////////////////////
- /*
- if(get_sensor_data("pressure") >= 5000 && get_sensor_data("oxygen") >= 20)
- vent_on()
- else
- if(get_sensor_data("oxygen") < 20 || get_sensor_data("pressure") < 100)
- vent_off()
- */
-
- var/datum/automation/set_vent_pump_power/vp_on=new(src)
- vp_on.vent_pump=output_tag
- vp_on.state=1
-
- var/datum/automation/set_vent_pump_power/vp_off=new(src)
- vp_off.vent_pump=output_tag
- vp_off.state=0
-
- var/datum/automation/if_statement/if_on=new(src)
- if_on.label="Air Output"
-
- var/datum/automation/and/and_on=new(src)
- and_on.children.Add(
- MakeCompare(
- MakeGetSensorData(sensor_tag,"pressure"),
- MakeNumber(5000),
- "Greater Than or Equal to"
- )
- )
- and_on.children.Add(
- MakeCompare(
- MakeGetSensorData(sensor_tag,"oxygen"),
- MakeNumber(20),
- "Greater Than or Equal to"
- )
- )
- if_on.condition=and_on
- if_on.children_then.Add(vp_on)
-
- //////////////////////////////
-
- var/datum/automation/if_statement/if_off=new(src)
-
- var/datum/automation/or/or_off=new(src)
- or_off.children.Add(
- MakeCompare(
- MakeGetSensorData(sensor_tag,"pressure"),
- MakeNumber(100),
- "Less Than"
- )
- )
- or_off.children.Add(
- MakeCompare(
- MakeGetSensorData(sensor_tag,"oxygen"),
- MakeNumber(20),
- "Less Than"
- )
- )
- if_off.condition=or_off
- if_off.children_then.Add(vp_off)
-
- if_on.children_else.Add(if_off)
-
- automations += if_on
+ automations += if_on
diff --git a/code/modules/awaymissions/zlevel.dm b/code/modules/awaymissions/zlevel.dm
index c617b90030f..36a4eeda829 100644
--- a/code/modules/awaymissions/zlevel.dm
+++ b/code/modules/awaymissions/zlevel.dm
@@ -17,11 +17,11 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
log_debug("Smoothing tiles")
for(var/turf/T in smoothTurfs)
if(T.smooth)
- smooth_icon(T)
+ queue_smooth(T)
for(var/R in T)
var/atom/A = R
if(A.smooth)
- smooth_icon(A)
+ queue_smooth(A)
if(istype(T, /turf/simulated/mineral)) // For the listening post, among other maps
var/turf/simulated/mineral/MT = T
MT.add_edges()
diff --git a/code/modules/client/preference/preferences_spawnpoints.dm b/code/modules/client/preference/preferences_spawnpoints.dm
index 60d77b38873..38b6b87ef43 100644
--- a/code/modules/client/preference/preferences_spawnpoints.dm
+++ b/code/modules/client/preference/preferences_spawnpoints.dm
@@ -13,14 +13,14 @@ var/list/spawntypes = list()
var/list/restrict_job = null
var/list/disallow_job = null
- proc/check_job_spawning(job)
- if(restrict_job && !(job in restrict_job))
- return 0
+/datum/spawnpoint/proc/check_job_spawning(job)
+ if(restrict_job && !(job in restrict_job))
+ return 0
- if(disallow_job && (job in disallow_job))
- return 0
+ if(disallow_job && (job in disallow_job))
+ return 0
- return 1
+ return 1
/datum/spawnpoint/arrivals
display_name = "Arrivals Shuttle"
@@ -54,4 +54,4 @@ var/list/spawntypes = list()
/datum/spawnpoint/cyborg/New()
..()
- turfs = latejoin_cyborg
\ No newline at end of file
+ turfs = latejoin_cyborg
diff --git a/code/modules/crafting/craft.dm b/code/modules/crafting/craft.dm
index 37fa041af77..ea5e4a652aa 100644
--- a/code/modules/crafting/craft.dm
+++ b/code/modules/crafting/craft.dm
@@ -69,7 +69,7 @@
else
if(istype(I, /obj/item/reagent_containers))
var/obj/item/reagent_containers/RC = I
- if(RC.flags & OPENCONTAINER)
+ if(RC.container_type & OPENCONTAINER)
for(var/datum/reagent/A in RC.reagents.reagent_list)
.[A.type] += A.volume
.[I.type] += 1
diff --git a/code/modules/detective_work/footprints_and_rag.dm b/code/modules/detective_work/footprints_and_rag.dm
index dda9490b82a..31f9e66255b 100644
--- a/code/modules/detective_work/footprints_and_rag.dm
+++ b/code/modules/detective_work/footprints_and_rag.dm
@@ -19,7 +19,8 @@
possible_transfer_amounts = list(5)
volume = 5
can_be_placed_into = null
- flags = OPENCONTAINER | NOBLUDGEON
+ flags = NOBLUDGEON
+ container_type = OPENCONTAINER
var/wipespeed = 30
/obj/item/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag)
diff --git a/code/modules/fish/fishtank.dm b/code/modules/fish/fishtank.dm
index f0451d25817..be11094bc6b 100644
--- a/code/modules/fish/fishtank.dm
+++ b/code/modules/fish/fishtank.dm
@@ -474,7 +474,7 @@
//Finally, report the full examine_message constructed from the above reports
- to_chat(user, "[examine_message]")
+ to_chat(user, "[examine_message]")
return examine_message
//////////////////////////////
@@ -485,37 +485,37 @@
if(istype(M, /mob/living/simple_animal/pet/cat))
if(M.a_intent == INTENT_HELP) //Cats can try to fish in open tanks on help intent
if(lid_switch) //Can't fish in a closed tank. Fishbowls are ALWAYS open.
- M.visible_message("[M.name] stares at into [src] while sitting perfectly still.", "The lid is closed, so you stare into [src] intently.")
+ M.visible_message("[M.name] stares at into [src] while sitting perfectly still.", "The lid is closed, so you stare into [src] intently.")
else
if(fish_count) //Tank must actually have fish to try catching one
- M.visible_message("[M.name] leaps up onto [src] and attempts to fish through the opening!", "You jump up onto [src] and begin fishing through the opening!")
+ M.visible_message("[M.name] leaps up onto [src] and attempts to fish through the opening!", "You jump up onto [src] and begin fishing through the opening!")
if(water_level && prob(45)) //If there is water, there is a chance the cat will slip, Syndicat will spark like E-N when this happens
- M.visible_message("[M.name] slipped and got soaked!", "You slipped and got soaked!")
+ M.visible_message("[M.name] slipped and got soaked!", "You slipped and got soaked!")
if(istype(M, /mob/living/simple_animal/pet/cat/Syndi))
do_sparks(3, 1, src)
else //No water or didn't slip, get that fish!
- M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!")
+ M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!")
kill_fish() //Kill a random fish
M.health = M.maxHealth //Eating fish heals the predator
else
- to_chat(M, "There are no fish in [src]!")
+ to_chat(M, "There are no fish in [src]!")
else
return ..()
else if(istype(M, /mob/living/simple_animal/hostile/bear))
if(M.a_intent == INTENT_HELP) //Bears can try to fish in open tanks on help intent
if(lid_switch) //Can't fish in a closed tank. Fishbowls are ALWAYS open.
- M.visible_message("[M.name] scrapes it's claws along [src]'s lid.", "The lid is closed, so you scrape your claws against [src]'s lid.")
+ M.visible_message("[M.name] scrapes it's claws along [src]'s lid.", "The lid is closed, so you scrape your claws against [src]'s lid.")
else
if(fish_count) //Tank must actually have fish to try catching one
- M.visible_message("[M.name] reaches into [src] and attempts to fish through the opening!", "You reach into [src] and begin fishing through the opening!")
+ M.visible_message("[M.name] reaches into [src] and attempts to fish through the opening!", "You reach into [src] and begin fishing through the opening!")
if(water_level && prob(5)) //Bears are good at catching fish, only a 5% chance to fail
- M.visible_message("[M.name] swipes at the water!", "You just barely missed that fish!")
+ M.visible_message("[M.name] swipes at the water!", "You just barely missed that fish!")
else //No water or didn't slip, get that fish!
- M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!")
+ M.visible_message("[M.name] catches and devours a live fish!", "You catch and devour a live fish, yum!")
kill_fish() //Kill a random fish
M.health = M.maxHealth //Eating fish heals the predator
else
- to_chat(M, "There are no fish in [src]!")
+ to_chat(M, "There are no fish in [src]!")
else
return ..()
else
@@ -530,8 +530,8 @@
"You hear a banging sound.")
else
playsound(loc, 'sound/effects/glassknock.ogg', 80, 1)
- user.visible_message("[user.name] taps on the [name].", \
- "You tap on the [name].", \
+ user.visible_message("[user.name] taps on the [name].", \
+ "You tap on the [name].", \
"You hear a knocking sound.")
/obj/machinery/fishtank/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
@@ -571,62 +571,57 @@
if(W.isOn())
if(obj_integrity < max_integrity)
playsound(loc, W.usesound, 50, 1)
- to_chat(user, "You repair some of the cracks on [src].")
+ to_chat(user, "You repair some of the cracks on [src].")
obj_integrity = min(obj_integrity + 20, max_integrity)
check_health()
else
- to_chat(user, "There is no damage to fix!")
+ to_chat(user, "There is no damage to fix!")
else
if(obj_integrity < max_integrity)
- to_chat(user, "[W] must be on to repair this damage.")
+ to_chat(user, "[W] must be on to repair this damage.")
else
return ..()
//Open reagent containers add and remove water
- else if(O.is_open_container())
- if(istype(O, /obj/item/reagent_containers/glass))
- if(lid_switch)
- to_chat(user, "Open the lid on [src] first!")
- return
- var/obj/item/reagent_containers/glass/C = O
- //Containers with any reagents will get dumped in
- if(C.reagents.total_volume)
- var/water_value = 0
- water_value += C.reagents.get_reagent_amount("water") //Water is full value
- water_value += C.reagents.get_reagent_amount("holywater") *1.1 //Holywater is (somehow) better. Who said religion had to make sense?
- water_value += C.reagents.get_reagent_amount("tonic") * 0.25 //Tonic water is 25% value
- water_value += C.reagents.get_reagent_amount("sodawater") * 0.50 //Sodawater is 50% value
- water_value += C.reagents.get_reagent_amount("fishwater") * 0.75 //Fishwater is 75% value, to account for the fish poo
- water_value += C.reagents.get_reagent_amount("ice") * 0.80 //Ice is 80% value
- var/message = ""
- if(!water_value) //The container has no water value, clear everything in it
- message = "The filtration process removes everything, leaving the water level unchanged."
- C.reagents.clear_reagents()
- else
- if(water_level == water_capacity)
- to_chat(user, "[src] is already full!")
- else
- message = "The filtration process purifies the water, raising the water level."
-
- if((water_level + water_value) == water_capacity)
- message += " You filled [src] to the brim!"
- if((water_level + water_value) > water_capacity)
- message += " You overfilled [src] and some water runs down the side, wasted."
- C.reagents.clear_reagents()
- adjust_water_level(water_value)
- user.visible_message("[user.name] pours the contents of [C.name] into [src].", "[message]")
- //Empty containers will scoop out water, filling the container as much as possible from the water_level
+ else if(O.is_drainable())
+ //Containers with any reagents will get dumped in
+ if(O.reagents.total_volume)
+ var/water_value = 0
+ water_value += O.reagents.get_reagent_amount("water") //Water is full value
+ water_value += O.reagents.get_reagent_amount("holywater") *1.1 //Holywater is (somehow) better. Who said religion had to make sense?
+ water_value += O.reagents.get_reagent_amount("tonic") * 0.25 //Tonic water is 25% value
+ water_value += O.reagents.get_reagent_amount("sodawater") * 0.50 //Sodawater is 50% value
+ water_value += O.reagents.get_reagent_amount("fishwater") * 0.75 //Fishwater is 75% value, to account for the fish poo
+ water_value += O.reagents.get_reagent_amount("ice") * 0.80 //Ice is 80% value
+ var/message = ""
+ if(!water_value) //The container has no water value, clear everything in it
+ message = "The filtration process removes everything, leaving the water level unchanged."
+ O.reagents.clear_reagents()
else
- if(!water_level)
- to_chat(user, "[src] is empty!")
+ if(water_level == water_capacity)
+ to_chat(user, "[src] is already full!")
else
- if(water_level >= C.volume) //Enough to fill the container completely
- C.reagents.add_reagent("fishwater", C.volume)
- adjust_water_level(-C.volume)
- user.visible_message("[user.name] scoops out some water from [src].", "You completely fill [C.name] from [src].")
- else //Fill the container as much as possible with the water_level
- C.reagents.add_reagent("fishwater", water_level)
- adjust_water_level(-water_level)
- user.visible_message("[user.name] scoops out some water from [src].", "You fill [C.name] with the last of the water in [src].")
+ message = "The filtration process purifies the water, raising the water level."
+
+ if((water_level + water_value) == water_capacity)
+ message += " You filled [src] to the brim!"
+ if((water_level + water_value) > water_capacity)
+ message += " You overfilled [src] and some water runs down the side, wasted."
+ O.reagents.clear_reagents()
+ adjust_water_level(water_value)
+ user.visible_message("[user.name] pours the contents of [O.name] into [src].", "[message]")
+ //Empty containers will scoop out water, filling the container as much as possible from the water_level
+ else if(O.is_refillable())
+ if(!water_level)
+ to_chat(user, "[src] is empty!")
+ else
+ if(water_level >= O.reagents.maximum_volume) //Enough to fill the container completely
+ O.reagents.add_reagent("fishwater", O.reagents.maximum_volume)
+ adjust_water_level(-O.reagents.maximum_volume)
+ user.visible_message("[user.name] scoops out some water from [src].", "You completely fill [O.name] from [src].")
+ else //Fill the container as much as possible with the water_level
+ O.reagents.add_reagent("fishwater", water_level)
+ adjust_water_level(-water_level)
+ user.visible_message("[user.name] scoops out some water from [src].", "You fill [O.name] with the last of the water in [src].")
//Wrenches can deconstruct empty tanks, but not tanks with any water. Kills any fish left inside and destroys any unharvested eggs in the process
else if(iswrench(O))
if(!water_level)
@@ -635,17 +630,17 @@
if(do_after(user, 50 * O.toolspeed, target = src))
deconstruct(TRUE)
else
- to_chat(user, "[src] must be empty before you disassemble it!")
+ to_chat(user, "[src] must be empty before you disassemble it!")
//Fish eggs
else if(istype(O, /obj/item/fish_eggs))
var/obj/item/fish_eggs/egg = O
//Don't add eggs if there is no water (they kinda need that to live)
if(!water_level)
- to_chat(user, "[src] has no water; [egg.name] won't hatch without water!")
+ to_chat(user, "[src] has no water; [egg.name] won't hatch without water!")
else
//Don't add eggs if the tank already has the max number of fish
if(fish_count >= max_fish)
- to_chat(user, "[src] can't hold any more fish.")
+ to_chat(user, "[src] can't hold any more fish.")
else
add_fish(egg.fish_type)
qdel(egg)
@@ -655,30 +650,30 @@
if(water_level)
if(food_level < 10)
if(fish_count == 0)
- user.visible_message("[user.name] shakes some fish food into the empty [src]... How sad.", "You shake some fish food into the empty [src]... If only it had fish.")
+ user.visible_message("[user.name] shakes some fish food into the empty [src]... How sad.", "You shake some fish food into the empty [src]... If only it had fish.")
else
- user.visible_message("[user.name] feeds the fish in [src]. The fish look excited!", "You feed the fish in [src]. They look excited!")
+ user.visible_message("[user.name] feeds the fish in [src]. The fish look excited!", "You feed the fish in [src]. They look excited!")
adjust_food_level(10)
else
- to_chat(user, "[src] already has plenty of food in it. You decide to not add more.")
+ to_chat(user, "[src] already has plenty of food in it. You decide to not add more.")
else
- to_chat(user, "[src] doesn't have any water in it. You should fill it with water first.")
+ to_chat(user, "[src] doesn't have any water in it. You should fill it with water first.")
//Fish egg scoop
else if(istype(O, /obj/item/egg_scoop))
if(egg_count)
- user.visible_message("[user.name] harvests some fish eggs from [src].", "You scoop the fish eggs out of [src].")
+ user.visible_message("[user.name] harvests some fish eggs from [src].", "You scoop the fish eggs out of [src].")
harvest_eggs(user)
else
- user.visible_message("[user.name] fails to harvest any fish eggs from [src].", "There are no fish eggs in [src] to scoop out.")
+ user.visible_message("[user.name] fails to harvest any fish eggs from [src].", "There are no fish eggs in [src] to scoop out.")
//Fish net
else if(istype(O, /obj/item/fish_net))
harvest_fish(user)
//Tank brush
else if(istype(O, /obj/item/tank_brush))
if(filth_level == 0)
- to_chat(user, "[src] is already spotless!")
+ to_chat(user, "[src] is already spotless!")
else
adjust_filth_level(-filth_level)
- user.visible_message("[user.name] scrubs the inside of [src], cleaning the filth.", "You scrub the inside of [src], cleaning the filth.")
+ user.visible_message("[user.name] scrubs the inside of [src], cleaning the filth.", "You scrub the inside of [src], cleaning the filth.")
else
return ..()
\ No newline at end of file
diff --git a/code/modules/food_and_drinks/drinks/bottler/bottler.dm b/code/modules/food_and_drinks/drinks/bottler/bottler.dm
index 6086f2798a7..4cf5c58bd06 100644
--- a/code/modules/food_and_drinks/drinks/bottler/bottler.dm
+++ b/code/modules/food_and_drinks/drinks/bottler/bottler.dm
@@ -235,7 +235,7 @@
//empties aren't sealed, so let's open it quietly
drink_container = new drink_container()
drink_container.canopened = 1
- drink_container.flags |= OPENCONTAINER
+ drink_container.container_type |= OPENCONTAINER
drink_container.forceMove(loc)
containers[con_type]--
diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm
index e64b74f1635..fd8a32ff7fc 100644
--- a/code/modules/food_and_drinks/drinks/drinks.dm
+++ b/code/modules/food_and_drinks/drinks/drinks.dm
@@ -6,7 +6,7 @@
desc = "yummy"
icon = 'icons/obj/drinks.dmi'
icon_state = null
- flags = OPENCONTAINER
+ container_type = OPENCONTAINER
consume_sound = 'sound/items/drink.ogg'
possible_transfer_amounts = list(5,10,15,20,25,30,50)
volume = 50
@@ -26,7 +26,11 @@
/obj/item/reagent_containers/food/drinks/attack(mob/M, mob/user, def_zone)
if(!reagents || !reagents.total_volume)
to_chat(user, " None of [src] left, oh no!")
- return 0
+ return FALSE
+
+ if(!is_drainable())
+ to_chat(user, " You need to open [src] first!")
+ return FALSE
if(istype(M, /mob/living/carbon))
var/mob/living/carbon/C = M
@@ -35,15 +39,14 @@
var/mob/living/silicon/robot/borg = user
borg.cell.use(30)
var/refill = reagents.get_master_reagent_id()
- if(refill in drinks) // Only synthesize drinks
- spawn(600)
- reagents.add_reagent(refill, bitesize)
- return 1
- return 0
+ if(refill in GLOB.drinks) // Only synthesize drinks
+ addtimer(CALLBACK(reagents, /datum/reagents.proc/add_reagent, refill, bitesize), 600)
+ return TRUE
+ return FALSE
/obj/item/reagent_containers/food/drinks/MouseDrop(atom/over_object) //CHUG! CHUG! CHUG!
var/mob/living/carbon/chugger = over_object
- if (!(flags & OPENCONTAINER))
+ if (!(container_type & DRAINABLE))
to_chat(chugger, "You need to open [src] first!")
return
if(istype(chugger) && loc == chugger && src == chugger.get_active_hand() && reagents.total_volume)
@@ -56,39 +59,18 @@
break
/obj/item/reagent_containers/food/drinks/afterattack(obj/target, mob/user, proximity)
- if(!proximity) return
+ if(!proximity)
+ return
- // Moved from the can code; not necessary since closed cans aren't open containers now, but, eh.
- if(istype(target, /obj/item/reagent_containers/food/drinks/cans))
- var/obj/item/reagent_containers/food/drinks/cans/cantarget = target
- if(cantarget.canopened == 0)
- to_chat(user, "You need to open the drink you want to pour into!")
- return
-
- if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
-
- if(!target.reagents.total_volume)
- to_chat(user, " [target] is empty.")
- return
-
- if(reagents.total_volume >= reagents.maximum_volume)
- to_chat(user, " [src] is full.")
- return
-
- var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
- to_chat(user, " You fill [src] with [trans] units of the contents of [target].")
-
- else if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it.
+ if(target.is_open_container()) //Something like a glass. Player probably wants to transfer TO it.
if(!reagents.total_volume)
to_chat(user, " [src] is empty.")
- return
+ return FALSE
- if(target.reagents.total_volume >= target.reagents.maximum_volume)
+ if(target.reagents.holder_full())
to_chat(user, " [target] is full.")
- return
-
-
-
+ return FALSE
+
var/datum/reagent/refill
var/datum/reagent/refillName
if(isrobot(user))
@@ -99,22 +81,34 @@
to_chat(user, " You transfer [trans] units of the solution to [target].")
if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell
- if(refill in drinks) // Only synthesize drinks
+ if(refill in GLOB.drinks) // Only synthesize drinks
var/mob/living/silicon/robot/bro = user
var/chargeAmount = max(30,4*trans)
bro.cell.use(chargeAmount)
- to_chat(user, "Now synthesizing [trans] units of [refillName]...")
+ to_chat(user, "Now synthesizing [trans] units of [refillName]...")
+ addtimer(CALLBACK(reagents, /datum/reagents.proc/add_reagent, refill, trans), 300)
+ addtimer(CALLBACK(GLOBAL_PROC, .proc/__to_chat, user, "Cyborg [src] refilled."), 300)
+ else if(target.is_drainable()) //A dispenser. Transfer FROM it TO us.
+ if(!is_refillable())
+ to_chat(user, "[src]'s tab isn't open!")
+ return FALSE
+ if(!target.reagents.total_volume)
+ to_chat(user, "[target] is empty.")
+ return FALSE
- spawn(300)
- reagents.add_reagent(refill, trans)
- to_chat(user, "Cyborg [src] refilled.")
+ if(reagents.holder_full())
+ to_chat(user, "[src] is full.")
+ return FALSE
- return
+ var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
+ to_chat(user, "You fill [src] with [trans] units of the contents of [target].")
+
+ return FALSE
/obj/item/reagent_containers/food/drinks/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/clothing/mask/cigarette)) //ciggies are weird
- return
+ return FALSE
if(is_hot(I))
if(reagents)
reagents.chem_temp += 15
@@ -151,7 +145,8 @@
materials = list(MAT_METAL=100)
possible_transfer_amounts = list()
volume = 5
- flags = CONDUCT | OPENCONTAINER
+ flags = CONDUCT
+ container_type = OPENCONTAINER
/obj/item/reagent_containers/food/drinks/trophy/gold_cup
name = "gold cup"
diff --git a/code/modules/food_and_drinks/food/condiment.dm b/code/modules/food_and_drinks/food/condiment.dm
index b0c0d24efaa..60642cab847 100644
--- a/code/modules/food_and_drinks/food/condiment.dm
+++ b/code/modules/food_and_drinks/food/condiment.dm
@@ -10,7 +10,7 @@
desc = "Just your average condiment container."
icon = 'icons/obj/food/containers.dmi'
icon_state = "emptycondiment"
- flags = OPENCONTAINER
+ container_type = OPENCONTAINER
possible_transfer_amounts = list(1, 5, 10, 15, 20, 25, 30, 50)
volume = 50
//Possible_states has the reagent id as key and a list of, in order, the icon_state, the name and the desc as values. Used in the on_reagent_change() to change names, descs and sprites.
@@ -47,7 +47,7 @@
if(!reagents || !reagents.total_volume)
return // The condiment might be empty after the delay.
user.visible_message("[user] feeds [M] from [src].")
- add_attack_logs(user, M, "Fed [src] containing [reagentlist()]")
+ add_attack_logs(user, M, "Fed [src] containing [reagents.log_list()]")
var/fraction = min(10/reagents.total_volume, 1)
reagents.reaction(M, INGEST, fraction)
@@ -75,7 +75,7 @@
to_chat(user, "You fill [src] with [trans] units of the contents of [target].")
//Something like a glass or a food item. Player probably wants to transfer TO it.
- else if(target.is_open_container() || istype(target, /obj/item/reagent_containers/food/snacks))
+ else if(target.is_drainable() || istype(target, /obj/item/reagent_containers/food/snacks))
if(!reagents.total_volume)
to_chat(user, "[src] is empty!")
return
diff --git a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm
index f36f6400f27..298a5ae2e7e 100644
--- a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm
+++ b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm
@@ -8,7 +8,7 @@
use_power = IDLE_POWER_USE
idle_power_usage = 5
active_power_usage = 100
- flags = OPENCONTAINER
+ container_type = OPENCONTAINER
var/operating = 0 // Is it on?
var/dirty = 0 // = {0..100} Does it need cleaning?
var/broken = 0 // ={0,1,2} How broken is it???
@@ -93,7 +93,7 @@
icon_state = off_icon
broken = 0 // Fix it!
dirty = 0 // just to be sure
- flags = OPENCONTAINER
+ container_type = OPENCONTAINER
else
to_chat(user, "It's broken!")
return 1
@@ -105,7 +105,7 @@
dirty = 0 // It's clean!
broken = 0 // just to be sure
icon_state = off_icon
- flags = OPENCONTAINER
+ container_type = OPENCONTAINER
else //Otherwise bad luck!!
to_chat(user, "It's dirty!")
return 1
diff --git a/code/modules/hydroponics/grown/kudzu.dm b/code/modules/hydroponics/grown/kudzu.dm
index 855ca829bfa..ba67bf426fa 100644
--- a/code/modules/hydroponics/grown/kudzu.dm
+++ b/code/modules/hydroponics/grown/kudzu.dm
@@ -59,7 +59,7 @@
mutations.Remove(pick(temp_mut_list))
temp_mut_list.Cut()
- if(S.has_reagent("welding_fuel", 5))
+ if(S.has_reagent("fuel", 5))
for(var/datum/spacevine_mutation/SM in mutations)
if(SM.quality == POSITIVE)
temp_mut_list += SM
@@ -94,4 +94,4 @@
desc = "Pueraria Virallis: An invasive species with vines that rapidly creep and wrap around whatever they contact."
icon_state = "kudzupod"
filling_color = "#6B8E23"
- bitesize_mod = 2
\ No newline at end of file
+ bitesize_mod = 2
diff --git a/code/modules/hydroponics/grown/mushrooms.dm b/code/modules/hydroponics/grown/mushrooms.dm
index 56d032045c0..95ea83cd424 100644
--- a/code/modules/hydroponics/grown/mushrooms.dm
+++ b/code/modules/hydroponics/grown/mushrooms.dm
@@ -81,7 +81,7 @@
/obj/item/reagent_containers/food/snacks/grown/mushroom/angel
seed = /obj/item/seeds/angel
name = "destroying angel"
- desc = "Amanita Virosa: Deadly poisonous basidiomycete fungus filled with alpha amatoxins."
+ desc = "Amanita Virosa: Deadly poisonous basidiomycete fungus filled with alpha amanitin."
icon_state = "angel"
filling_color = "#C0C0C0"
diff --git a/code/modules/hydroponics/hydroitemdefines.dm b/code/modules/hydroponics/hydroitemdefines.dm
index 6b2da2c29ae..a3453585817 100644
--- a/code/modules/hydroponics/hydroitemdefines.dm
+++ b/code/modules/hydroponics/hydroitemdefines.dm
@@ -21,7 +21,7 @@
icon_state = "weedspray"
item_state = "plantbgone"
volume = 100
- flags = OPENCONTAINER
+ container_type = OPENCONTAINER
slot_flags = SLOT_BELT
throwforce = 0
w_class = WEIGHT_CLASS_SMALL
@@ -43,7 +43,7 @@
icon_state = "pestspray"
item_state = "plantbgone"
volume = 100
- flags = OPENCONTAINER
+ container_type = OPENCONTAINER
slot_flags = SLOT_BELT
throwforce = 0
w_class = WEIGHT_CLASS_SMALL
diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm
index b5bea1fc6b3..92f91ddf51a 100644
--- a/code/modules/hydroponics/hydroponics.dm
+++ b/code/modules/hydroponics/hydroponics.dm
@@ -763,8 +763,8 @@
else if(transfer_amount) // Droppers, cans, beakers, what have you.
visi_msg="[user] uses [reagent_source] on [target]"
irrigate = 1
- // Beakers, bottles, buckets, etc. Can't use is_open_container though.
- if(istype(reagent_source, /obj/item/reagent_containers/glass/))
+ // Beakers, bottles, buckets, etc.
+ if(reagent_source.is_drainable())
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
if(irrigate && transfer_amount > 30 && reagent_source.reagents.total_volume >= 30 && using_irrigation)
diff --git a/code/modules/hydroponics/sample.dm b/code/modules/hydroponics/sample.dm
index 4478671b2fb..10ba2642107 100644
--- a/code/modules/hydroponics/sample.dm
+++ b/code/modules/hydroponics/sample.dm
@@ -11,8 +11,8 @@ var/list/chem_t2_reagents = list(
var/list/chem_t3_reagents = list(
"ethanol", "chlorine", "potassium",
- "aluminium", "radium", "fluorine",
- "iron", "welding_fuel", "silver",
+ "aluminum", "radium", "fluorine",
+ "iron", "fuel", "silver",
"stable_plasma"
)
@@ -41,4 +41,4 @@ var/list/chem_t4_reagents = list(
/obj/item/seeds/sample/alienweed
name = "alien weed sample"
icon_state = "alienweed"
- sample_color = null
\ No newline at end of file
+ sample_color = null
diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm
index 303b34aed34..79cfc3ae9f8 100644
--- a/code/modules/mining/mine_turfs.dm
+++ b/code/modules/mining/mine_turfs.dm
@@ -462,10 +462,10 @@ var/global/list/rockTurfEdgeCache = list(
/turf/simulated/floor/plating/airless/asteroid/New()
var/proper_name = name
+ ..()
name = proper_name
if(prob(20))
icon_state = "asteroid[rand(0,12)]"
- ..()
/turf/simulated/floor/plating/airless/asteroid/ex_act(severity, target)
switch(severity)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index b793ec154c7..e9b09ba1f2b 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -1019,7 +1019,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
return 1
/mob/living/carbon/proc/forceFedAttackLog(var/obj/item/reagent_containers/food/toEat, mob/user)
- add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagentlist(toEat)]", ATKLOG_MOST)
+ add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagents.log_list(toEat)]", ATKLOG_MOST)
if(!iscarbon(user))
LAssailant = null
else
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index fdd91bf1cd9..591c62ff862 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -329,7 +329,13 @@
/mob/living/proc/can_inject()
- return 1
+ return TRUE
+
+/mob/living/is_injectable(allowmobs = TRUE)
+ return (allowmobs && reagents && can_inject())
+
+/mob/living/is_drawable(allowmobs = TRUE)
+ return (allowmobs && reagents && can_inject())
/mob/living/proc/get_organ_target()
var/mob/shooter = src
diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm
index 07df995658e..1797fc8b4bd 100644
--- a/code/modules/mob/living/silicon/pai/recruit.dm
+++ b/code/modules/mob/living/silicon/pai/recruit.dm
@@ -22,102 +22,235 @@ var/datum/paiController/paiController // Global handler for pAI candidates
var/askDelay = 10 * 60 * 1 // One minute [ms * sec * min]
- Topic(href, href_list[])
- if("signup" in href_list)
- var/mob/dead/observer/O = locate(href_list["signup"])
- if(!O) return
- if(!(O in GLOB.respawnable_list))
- to_chat(O, "You've given up your ability to respawn!")
- return
- if(!check_recruit(O)) return
- recruitWindow(O)
+/datum/paiController/Topic(href, href_list[])
+ if("signup" in href_list)
+ var/mob/dead/observer/O = locate(href_list["signup"])
+ if(!O) return
+ if(!(O in GLOB.respawnable_list))
+ to_chat(O, "You've given up your ability to respawn!")
return
+ if(!check_recruit(O)) return
+ recruitWindow(O)
+ return
- if(href_list["download"])
- var/datum/paiCandidate/candidate = locate(href_list["candidate"])
- var/obj/item/paicard/card = locate(href_list["device"])
- if(card.pai)
+ if(href_list["download"])
+ var/datum/paiCandidate/candidate = locate(href_list["candidate"])
+ var/obj/item/paicard/card = locate(href_list["device"])
+ if(card.pai)
+ return
+ if(usr.incapacitated() || isobserver(usr) || !card.Adjacent(usr))
+ return
+ if(istype(card,/obj/item/paicard) && istype(candidate,/datum/paiCandidate))
+ var/mob/living/silicon/pai/pai = new(card)
+ if(!candidate.name)
+ pai.name = pick(GLOB.ninja_names)
+ else
+ pai.name = candidate.name
+ pai.real_name = pai.name
+ pai.key = candidate.key
+
+ card.setPersonality(pai)
+ card.looking_for_personality = 0
+
+ ticker.mode.update_cult_icons_removed(card.pai.mind)
+ ticker.mode.update_rev_icons_removed(card.pai.mind)
+
+ pai_candidates -= candidate
+ usr << browse(null, "window=findPai")
+
+ if(href_list["new"])
+ var/datum/paiCandidate/candidate = locate(href_list["candidate"])
+ var/option = href_list["option"]
+ var/t = ""
+
+ switch(option)
+ if("name")
+ t = input("Enter a name for your pAI", "pAI Name", candidate.name) as text
+ if(t)
+ candidate.name = sanitize(copytext(t,1,MAX_NAME_LEN))
+ if("desc")
+ t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
+ if(t)
+ candidate.description = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
+ if("role")
+ t = input("Enter a role for your pAI", "pAI Role", candidate.role) as text
+ if(t)
+ candidate.role = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
+ if("ooc")
+ t = input("Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
+ if(t)
+ candidate.comments = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
+ if("save")
+ candidate.savefile_save(usr)
+ if("load")
+ candidate.savefile_load(usr)
+ //In case people have saved unsanitized stuff.
+ if(candidate.name)
+ candidate.name = sanitize(copytext(candidate.name,1,MAX_NAME_LEN))
+ if(candidate.description)
+ candidate.description = sanitize(copytext(candidate.description,1,MAX_MESSAGE_LEN))
+ if(candidate.role)
+ candidate.role = sanitize(copytext(candidate.role,1,MAX_MESSAGE_LEN))
+ if(candidate.comments)
+ candidate.comments = sanitize(copytext(candidate.comments,1,MAX_MESSAGE_LEN))
+
+ if("submit")
+ if(candidate)
+ candidate.ready = 1
+ for(var/obj/item/paicard/p in world)
+ if(p.looking_for_personality == 1)
+ p.alertUpdate()
+ usr << browse(null, "window=paiRecruit")
return
- if(istype(card,/obj/item/paicard) && istype(candidate,/datum/paiCandidate))
- var/mob/living/silicon/pai/pai = new(card)
- if(!candidate.name)
- pai.name = pick(GLOB.ninja_names)
- else
- pai.name = candidate.name
- pai.real_name = pai.name
- pai.key = candidate.key
+ recruitWindow(usr)
- card.setPersonality(pai)
- card.looking_for_personality = 0
-
- ticker.mode.update_cult_icons_removed(card.pai.mind)
- ticker.mode.update_rev_icons_removed(card.pai.mind)
-
- pai_candidates -= candidate
- usr << browse(null, "window=findPai")
-
- if(href_list["new"])
- var/datum/paiCandidate/candidate = locate(href_list["candidate"])
- var/option = href_list["option"]
- var/t = ""
-
- switch(option)
- if("name")
- t = input("Enter a name for your pAI", "pAI Name", candidate.name) as text
- if(t)
- candidate.name = reject_bad_name(sanitize(copytext(t,1,MAX_NAME_LEN)))
- if("desc")
- t = input("Enter a description for your pAI", "pAI Description", candidate.description) as message
- if(t)
- candidate.description = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
- if("role")
- t = input("Enter a role for your pAI", "pAI Role", candidate.role) as text
- if(t)
- candidate.role = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
- if("ooc")
- t = input("Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
- if(t)
- candidate.comments = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
- if("save")
- candidate.savefile_save(usr)
- if("load")
- candidate.savefile_load(usr)
- //In case people have saved unsanitized stuff.
- if(candidate.name)
- candidate.name = reject_bad_name(sanitize(copytext(candidate.name,1,MAX_NAME_LEN)))
- if(candidate.description)
- candidate.description = sanitize(copytext(candidate.description,1,MAX_MESSAGE_LEN))
- if(candidate.role)
- candidate.role = sanitize(copytext(candidate.role,1,MAX_MESSAGE_LEN))
- if(candidate.comments)
- candidate.comments = sanitize(copytext(candidate.comments,1,MAX_MESSAGE_LEN))
-
- if("submit")
- if(candidate)
- candidate.ready = 1
- for(var/obj/item/paicard/p in world)
- if(p.looking_for_personality == 1)
- p.alertUpdate()
- usr << browse(null, "window=paiRecruit")
- return
- recruitWindow(usr)
-
- proc/recruitWindow(var/mob/M as mob)
- var/datum/paiCandidate/candidate
- for(var/datum/paiCandidate/c in pai_candidates)
- if(!istype(c) || !istype(M))
- break
- if(c.key == M.key)
- candidate = c
- if(!candidate)
- candidate = new /datum/paiCandidate()
- candidate.key = M.key
- pai_candidates.Add(candidate)
+/datum/paiController/proc/recruitWindow(var/mob/M as mob)
+ var/datum/paiCandidate/candidate
+ for(var/datum/paiCandidate/c in pai_candidates)
+ if(!istype(c) || !istype(M))
+ break
+ if(c.key == M.key)
+ candidate = c
+ if(!candidate)
+ candidate = new /datum/paiCandidate()
+ candidate.key = M.key
+ pai_candidates.Add(candidate)
- var/dat = ""
- dat += {"
-
+ "}
+
+ dat += {"
+
+ pAI Personality Configuration
+
Please configure your pAI personality's options. Remember, what you enter here could determine whether or not the user requesting a personality chooses you!
Do you like to partner with sneaky social ninjas? Like to help security hunt down thugs? Enjoy watching an engineer's back while he saves the station yet again? This doesn't have to be limited to just station jobs. Pretty much any general descriptor for what you'd like to be doing works here.
Anything you'd like to address specifically to the player reading this in an OOC manner. \"I prefer more serious RP.\", \"I'm still learning the interface!\", etc. Feel free to leave this blank if you want.
+
+
+ "}
+
+ M << browse(dat, "window=paiRecruit;size=580x580;")
+
+/datum/paiController/proc/findPAI(var/obj/item/paicard/p, var/mob/user)
+ requestRecruits(p, user)
+ var/list/available = list()
+ for(var/datum/paiCandidate/c in paiController.pai_candidates)
+ if(c.ready)
+ var/found = 0
+ for(var/mob/o in GLOB.respawnable_list)
+ if(o.key == c.key)
+ found = 1
+ if(found)
+ available.Add(c)
+ var/dat = ""
+
+ dat += {"
+
+
+
+
- "}
+
+
+ pAI Availability List
+ "}
+ dat += "
Displaying available AI personalities from central database... If there are no entries, or if a suitable entry is not listed, check again later as more personalities may be added.
"
+ for(var/datum/paiCandidate/c in available)
dat += {"
-
- pAI Personality Configuration
-
Please configure your pAI personality's options. Remember, what you enter here could determine whether or not the user requesting a personality chooses you!
Do you like to partner with sneaky social ninjas? Like to help security hunt down thugs? Enjoy watching an engineer's back while he saves the station yet again? This doesn't have to be limited to just station jobs. Pretty much any general descriptor for what you'd like to be doing works here.
Anything you'd like to address specifically to the player reading this in an OOC manner. \"I prefer more serious RP.\", \"I'm still learning the interface!\", etc. Feel free to leave this blank if you want.
+
"}
- M << browse(dat, "window=paiRecruit;size=580x580;")
+ dat += {"
+
+
+ "}
- proc/findPAI(var/obj/item/paicard/p, var/mob/user)
- requestRecruits(p, user)
- var/list/available = list()
- for(var/datum/paiCandidate/c in paiController.pai_candidates)
- if(c.ready)
- var/found = 0
- for(var/mob/o in GLOB.respawnable_list)
- if(o.key == c.key)
- found = 1
- if(found)
- available.Add(c)
- var/dat = ""
+ user << browse(dat, "window=findPai")
- dat += {"
-
-
-
-
-
-
- pAI Availability List
- "}
- dat += "
Displaying available AI personalities from central database... If there are no entries, or if a suitable entry is not listed, check again later as more personalities may be added.
"
+/datum/paiController/proc/requestRecruits(var/obj/item/paicard/P, mob/user)
+ for(var/mob/dead/observer/O in GLOB.player_list)
+ if(O.client && (ROLE_PAI in O.client.prefs.be_special))
+ if(player_old_enough_antag(O.client,ROLE_PAI))
+ if(check_recruit(O))
+ to_chat(O, "A pAI card activated by [user.real_name] is looking for personalities. (Teleport | Sign Up)")
+ //question(O.client)
- for(var/datum/paiCandidate/c in available)
- dat += {"
-
Current Selection: [currTag ? GLOB.TAGGERLOCATIONS[currTag] : "None"]"
+ dat += "
Current Selection: [currTag ? GLOB.TAGGERLOCATIONS[currTag] : "None"]"
- user << browse(dat, "window=destTagScreen;size=450x350")
- onclose(user, "destTagScreen")
+ user << browse(dat, "window=destTagScreen;size=450x350")
+ onclose(user, "destTagScreen")
- attack_self(mob/user as mob)
- openwindow(user)
- return
+/obj/item/destTagger/attack_self(mob/user as mob)
+ openwindow(user)
+ return
- Topic(href, href_list)
- src.add_fingerprint(usr)
- if(href_list["nextTag"])
- var/n = text2num(href_list["nextTag"])
- src.currTag = n
- openwindow(usr)
+/obj/item/destTagger/Topic(href, href_list)
+ src.add_fingerprint(usr)
+ if(href_list["nextTag"])
+ var/n = text2num(href_list["nextTag"])
+ src.currTag = n
+ openwindow(usr)
/obj/machinery/disposal/deliveryChute
name = "Delivery chute"
diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm
index ce728a4fde3..57a0eaef7da 100644
--- a/code/modules/research/circuitprinter.dm
+++ b/code/modules/research/circuitprinter.dm
@@ -8,7 +8,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
name = "Circuit Imprinter"
desc = "Manufactures circuit boards for the construction of machines."
icon_state = "circuit_imprinter"
- flags = OPENCONTAINER
+ container_type = OPENCONTAINER
var/efficiency_coeff
diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm
index 0fa843cb8ae..a441dff00b3 100644
--- a/code/modules/research/protolathe.dm
+++ b/code/modules/research/protolathe.dm
@@ -11,7 +11,7 @@ Note: Must be placed west/left of and R&D console to function.
name = "Protolathe"
desc = "Converts raw materials into useful objects."
icon_state = "protolathe"
- flags = OPENCONTAINER
+ container_type = OPENCONTAINER
var/efficiency_coeff
diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm
index 56ef19b7c1a..9ad049c604b 100644
--- a/code/modules/research/xenobiology/xenobiology.dm
+++ b/code/modules/research/xenobiology/xenobiology.dm
@@ -8,6 +8,7 @@
icon_state = "grey slime extract"
force = 1
w_class = WEIGHT_CLASS_TINY
+ container_type = INJECTABLE | DRAWABLE
throwforce = 0
throw_speed = 3
throw_range = 6
diff --git a/code/modules/shuttle/on_move.dm b/code/modules/shuttle/on_move.dm
index 88551f49096..4a587ac1253 100644
--- a/code/modules/shuttle/on_move.dm
+++ b/code/modules/shuttle/on_move.dm
@@ -52,7 +52,7 @@
// After docking //
/atom/proc/postDock(obj/docking_port/S1)
if(smooth)
- smooth_icon(src)
+ queue_smooth(src)
/obj/machinery/door/airlock/postDock(obj/docking_port/stationary/S1)
. = ..()
diff --git a/code/modules/shuttle/ripple.dm b/code/modules/shuttle/ripple.dm
index ef3b18d2e39..3d3b52d9023 100644
--- a/code/modules/shuttle/ripple.dm
+++ b/code/modules/shuttle/ripple.dm
@@ -15,5 +15,5 @@
/obj/effect/temp_visual/ripple/New()
. = ..()
- smooth_icon(src)
+ queue_smooth(src)
animate(src, alpha=255, time=SHUTTLE_RIPPLE_TIME)
diff --git a/code/modules/spacepods/spacepod.dm b/code/modules/spacepods/spacepod.dm
index dffb6da79b9..7f5bcda9614 100644
--- a/code/modules/spacepods/spacepod.dm
+++ b/code/modules/spacepods/spacepod.dm
@@ -233,12 +233,19 @@
if(!health)
spawn(0)
message_to_riders("Critical damage to the vessel detected, core explosion imminent!")
- for(var/i = 10, i >= 0; --i)
- message_to_riders("[i]")
- if(i == 0)
- explosion(loc, 2, 4, 8)
- qdel(src)
+ for(var/i in 1 to 3)
+ var/count = 3
+ message_to_riders("[count]")
+ count--
sleep(10)
+ if(LAZYLEN(pilot) || LAZYLEN(passengers))
+ for(var/M in passengers + pilot)
+ var/mob/living/L = M
+ L.adjustBruteLoss(300)
+ explosion(loc, 0, 0, 2)
+ robogibs(loc)
+ robogibs(loc)
+ qdel(src)
update_icons()
diff --git a/code/modules/surgery/organs/liver.dm b/code/modules/surgery/organs/liver.dm
index bf6f085275b..ba3112b6392 100644
--- a/code/modules/surgery/organs/liver.dm
+++ b/code/modules/surgery/organs/liver.dm
@@ -46,7 +46,7 @@
owner.adjustToxLoss(0.1 * PROCESS_ACCURACY)
// Can't cope with toxins at all
- for(var/toxin in list("toxin", "plasma", "sacid", "facid", "cyanide", "amanitin", "carpotoxin"))
+ for(var/toxin in GLOB.liver_toxins)
if(owner.reagents.has_reagent(toxin))
owner.adjustToxLoss(0.3 * PROCESS_ACCURACY)
diff --git a/html/changelog.html b/html/changelog.html
index 735cb9d6cee..eaef528c5ca 100644
--- a/html/changelog.html
+++ b/html/changelog.html
@@ -56,11 +56,100 @@
-->
+
21 October 2018
+
Alonefromhell updated:
+
+
Fixed some formatting issues in post_equip.
+
+
Desolate updated:
+
+
Refactors some reagent lists into global list
+
+
Farie82 updated:
+
+
Cyborgs can now refill welding tools and fire extinguishers using the recharging station
+
+
Purpose updated:
+
+
Moves Icon Smoothing to a Subsystem.
+
Atom code will no longer track a list atoms, for literally zero reason.
+
+
Squirgenheimer updated:
+
+
Explosive holoparasite booby traps will now behave better, such as correctly triggering on mobs
+
+
Triiodine updated:
+
+
Skrell & Tajaran sechardsuit to paracode palette, from Bay12 palette.
+
TG & BS12 sec-hardsuits in all dmis
+
+
Warior4356 updated:
+
+
Final UI update was missed in Safe Refactor PR
+
+
name here updated:
+
+
Holodeck plating sprite is now back to the old one.
+
+
variableundefined updated:
+
+
Improves the List free slots admin verb to show useful information.
+
Cyborg hypospray's attack log message should no longer be reversed.
+
How containers work is now standardized in the back-end. There might be unexpected or odd bugs with containers and reagent transfer, please report them.
+
Minor refactor of revenant code.
+
Some relative path & commented out code has been cleared up in code. Report unexpected issues.
+
+
+
20 October 2018
+
Birdtalon updated:
+
+
Spacepods explosions are significantly reduced.
+
+
Dapocalypse updated:
+
+
Adds password protected files to modular computer.
+
+
Farie82 updated:
+
+
Guardian injectors now tell in their examination text if they are spend or not.
+
Added feedback on the RCD airlock access topic.
+
+
Fox McCloud updated:
+
+
Updates the Garbage SS so it's less likely to induce lag
+
+
Purpose updated:
+
+
Suit storage units now contain magboots for relevant roles.
+
Adds the captains jetpack to his suit storage unit, so it is now stealable again on Delta.
+
Aluminum & Aluminium properly standardized.
+
+
craftxbox updated:
+
+
added check to make sure person downloading pAI isnt dead.
+
+
uc_guy updated:
+
+
It is no longer possible to duplicate uvents.
+
+
variableundefined updated:
+
+
Plating's icon is back to the old one once again.
+
+
19 October 2018
Fox McCloud updated:
Fixes round-start sparks being stuck in maintenance
+
Purpose updated:
+
+
Fixed an issue with Space Vine mutations
+
+
SpaceManiac updated:
+
+
The body zone selector now indicates which body part you are about to select when hovered over.
+
TDSSS updated:
New exosuit equipment: The rescue jaws for the Odysseus lets it open doors, firelocks and even force powered doors. It can also be added to firefighter ripleys.
diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml
index 24edf7d9cf9..4907f56b908 100644
--- a/html/changelogs/.all_changelog.yml
+++ b/html/changelogs/.all_changelog.yml
@@ -7563,6 +7563,11 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
2018-10-19:
Fox McCloud:
- bugfix: Fixes round-start sparks being stuck in maintenance
+ Purpose:
+ - bugfix: Fixed an issue with Space Vine mutations
+ SpaceManiac:
+ - rscadd: The body zone selector now indicates which body part you are about to
+ select when hovered over.
TDSSS:
- rscadd: 'New exosuit equipment: The rescue jaws for the Odysseus lets it open
doors, firelocks and even force powered doors. It can also be added to firefighter
@@ -7574,3 +7579,54 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
- rscdel: Removed old UI from safe
- tweak: Safe now is only Right - Left - Right. Safe is 0-99 rather than 0-71.
- imageadd: Added safe dial for it's nanoui.
+2018-10-20:
+ Birdtalon:
+ - tweak: Spacepods explosions are significantly reduced.
+ Dapocalypse:
+ - rscadd: Adds password protected files to modular computer.
+ Farie82:
+ - tweak: Guardian injectors now tell in their examination text if they are spend
+ or not.
+ - tweak: Added feedback on the RCD airlock access topic.
+ Fox McCloud:
+ - tweak: Updates the Garbage SS so it's less likely to induce lag
+ Purpose:
+ - rscadd: Suit storage units now contain magboots for relevant roles.
+ - bugfix: Adds the captains jetpack to his suit storage unit, so it is now stealable
+ again on Delta.
+ - spellcheck: Aluminum & Aluminium properly standardized.
+ craftxbox:
+ - bugfix: added check to make sure person downloading pAI isnt dead.
+ uc_guy:
+ - bugfix: It is no longer possible to duplicate uvents.
+ variableundefined:
+ - tweak: Plating's icon is back to the old one once again.
+2018-10-21:
+ Alonefromhell:
+ - spellcheck: Fixed some formatting issues in post_equip.
+ Desolate:
+ - tweak: Refactors some reagent lists into global list
+ Farie82:
+ - tweak: Cyborgs can now refill welding tools and fire extinguishers using the recharging
+ station
+ Purpose:
+ - tweak: Moves Icon Smoothing to a Subsystem.
+ - rscdel: Atom code will no longer track a list atoms, for literally zero reason.
+ Squirgenheimer:
+ - bugfix: Explosive holoparasite booby traps will now behave better, such as correctly
+ triggering on mobs
+ Triiodine:
+ - tweak: Skrell & Tajaran sechardsuit to paracode palette, from Bay12 palette.
+ - rscdel: TG & BS12 sec-hardsuits in all dmis
+ Warior4356:
+ - bugfix: Final UI update was missed in Safe Refactor PR
+ name here:
+ - tweak: Holodeck plating sprite is now back to the old one.
+ variableundefined:
+ - tweak: Improves the List free slots admin verb to show useful information.
+ - bugfix: Cyborg hypospray's attack log message should no longer be reversed.
+ - tweak: How containers work is now standardized in the back-end. There might be
+ unexpected or odd bugs with containers and reagent transfer, please report them.
+ - tweak: Minor refactor of revenant code.
+ - bugfix: Some relative path & commented out code has been cleared up in code. Report
+ unexpected issues.
diff --git a/icons/mob/species/drask/suit.dmi b/icons/mob/species/drask/suit.dmi
index 0259f9c9275..697c3888f77 100644
Binary files a/icons/mob/species/drask/suit.dmi and b/icons/mob/species/drask/suit.dmi differ
diff --git a/icons/mob/species/skrell/helmet.dmi b/icons/mob/species/skrell/helmet.dmi
index 7c7142516cb..e17fa4174c5 100644
Binary files a/icons/mob/species/skrell/helmet.dmi and b/icons/mob/species/skrell/helmet.dmi differ
diff --git a/icons/mob/species/skrell/suit.dmi b/icons/mob/species/skrell/suit.dmi
index 0dcd38e5364..878831b5595 100644
Binary files a/icons/mob/species/skrell/suit.dmi and b/icons/mob/species/skrell/suit.dmi differ
diff --git a/icons/mob/species/tajaran/helmet.dmi b/icons/mob/species/tajaran/helmet.dmi
index a2626a6fb24..41e8c84959b 100644
Binary files a/icons/mob/species/tajaran/helmet.dmi and b/icons/mob/species/tajaran/helmet.dmi differ
diff --git a/icons/mob/species/tajaran/suit.dmi b/icons/mob/species/tajaran/suit.dmi
index 0a6cf3c9787..1b7299cc8fb 100644
Binary files a/icons/mob/species/tajaran/suit.dmi and b/icons/mob/species/tajaran/suit.dmi differ
diff --git a/icons/mob/suit.dmi b/icons/mob/suit.dmi
index d840a98cf05..354d0fbebf6 100644
Binary files a/icons/mob/suit.dmi and b/icons/mob/suit.dmi differ
diff --git a/icons/obj/machines/suit_storage.dmi b/icons/obj/machines/suit_storage.dmi
new file mode 100644
index 00000000000..e61f9567c60
Binary files /dev/null and b/icons/obj/machines/suit_storage.dmi differ
diff --git a/icons/obj/suitstorage.dmi b/icons/obj/suitstorage.dmi
deleted file mode 100644
index 3fc3e4e7337..00000000000
Binary files a/icons/obj/suitstorage.dmi and /dev/null differ
diff --git a/icons/turf/floors.dmi b/icons/turf/floors.dmi
index 99210d9cf88..2f493a8acc1 100644
Binary files a/icons/turf/floors.dmi and b/icons/turf/floors.dmi differ
diff --git a/icons/turf/floors/plating.dmi b/icons/turf/floors/plating.dmi
index c3c480bfc6a..fee52346e3c 100644
Binary files a/icons/turf/floors/plating.dmi and b/icons/turf/floors/plating.dmi differ
diff --git a/nano/templates/file_manager.tmpl b/nano/templates/file_manager.tmpl
index 1bdb0cd95c4..51d40b84475 100644
--- a/nano/templates/file_manager.tmpl
+++ b/nano/templates/file_manager.tmpl
@@ -32,6 +32,11 @@
{{:helper.link('DELETE', 'trash', {'action' : 'PRG_deletefile', 'name' : value.name}, value.undeletable ? 'disabled' : null)}}
{{:helper.link('RENAME', 'pencil', {'action' : 'PRG_rename', 'name' : value.name}, value.undeletable ? 'disabled' : null)}}
{{:helper.link('CLONE', 'files-o', {'action' : 'PRG_clone', 'name' : value.name}, value.undeletable ? 'disabled' : null)}}
+ {{if !value.encrypted}}
+ {{:helper.link('ENCRYPT', null, {'action' : 'PRG_encrypt', 'name' : value.name}, value.undeletable ? 'disabled' : null)}}
+ {{else}}
+ {{:helper.link('DECRYPT', null, {'action' : 'PRG_decrypt', 'name' : value.name}, value.undeletable ? 'disabled' : null)}}
+ {{/if}}
{{if data.usbconnected}}
{{:helper.link('EXPORT', 'upload', {'action' : 'PRG_copytousb', 'name' : value.name}, value.undeletable ? 'disabled' : null)}}
{{/if}}
diff --git a/nano/templates/safe.tmpl b/nano/templates/safe.tmpl
index e0c98215737..0e8bb29faa0 100644
--- a/nano/templates/safe.tmpl
+++ b/nano/templates/safe.tmpl
@@ -3,6 +3,9 @@
body {
background: #3E4E69;
}
+ #uiTitleFluff {
+ display: none;
+ }
{{if data.open}}
@@ -48,15 +51,15 @@
-
How to open your Scarborough Arms - 2 tumbler safe
+
How to open your Scarborough Arms - 2 tumbler safe.
-
1. Turn the dial to the right past the first number twice
-
2. Stop at the first number
-
3. Turn the dial to the left past the second number once
-
4. Stop at the second number
-
5. Turn to the right until the dial stops
-
6. Open the safe
+
1. Turn the dial right two full turns.
+
2. Keep turning right and stop on first number.
+
3. Turn the dial left one full turn.
+
4. Turn left to second number. Do not go past it.
+
5. Turn the dial right until it stops.
+
6. Open the safe.
-
To lock fully, turn the dial to the left for three rotations
+
To lock fully, turn the dial to the left for three rotations.
-{{/if}}
\ No newline at end of file
+{{/if}}
diff --git a/paradise.dme b/paradise.dme
index 841a7c02e24..4cafa744d5a 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -203,6 +203,7 @@
#include "code\controllers\subsystem\atoms.dm"
#include "code\controllers\subsystem\fires.dm"
#include "code\controllers\subsystem\garbage.dm"
+#include "code\controllers\subsystem\icon_smooth.dm"
#include "code\controllers\subsystem\machinery.dm"
#include "code\controllers\subsystem\mobs.dm"
#include "code\controllers\subsystem\nano_mob_hunter.dm"