"
if(sprite)
- body += "| [bicon(D)] | "
+ body += "| [bicon(D, use_class=0)] | "
else
body += ""
@@ -350,14 +350,14 @@ body
else if(isicon(value))
#ifdef VARSICON
- html += "[name] = /icon ([value]) [bicon(value)]"
+ html += "[name] = /icon ([value]) [bicon(value, use_class=0)]"
#else
html += "[name] = /icon ([value])"
#endif
else if(istype(value, /image))
#ifdef VARSICON
- html += "[name] \ref[value] = /image ([value]) [bicon(value)]"
+ html += "[name] \ref[value] = /image ([value]) [bicon(value, use_class=0)]"
#else
html += "[name] \ref[value] = /image ([value])"
#endif
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index 4bef4896cc8..b97ce1f5c7f 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -406,7 +406,8 @@ var/list/advance_cures = list(
AD.Refresh()
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
- if(H.z != 1)
+ // TODO: Tie into space manager
+ if(H.z != ZLEVEL_STATION)
continue
if(!H.HasDisease(D))
H.ForceContractDisease(D)
diff --git a/code/datums/diseases/advance/symptoms/choking.dm b/code/datums/diseases/advance/symptoms/choking.dm
index 83b3a4a226a..172c4b63757 100644
--- a/code/datums/diseases/advance/symptoms/choking.dm
+++ b/code/datums/diseases/advance/symptoms/choking.dm
@@ -43,11 +43,11 @@ Bonus
return
/datum/symptom/choking/proc/Choke_stage_3_4(mob/living/M, datum/disease/advance/A)
- var/get_damage = (sqrt(20+A.totalStageSpeed())/2)+(sqrt(16+A.totalStealth())*1)
+ var/get_damage = sqrt(21+A.totalStageSpeed()*0.5)+sqrt(16+A.totalStealth())
M.adjustOxyLoss(get_damage)
return 1
/datum/symptom/choking/proc/Choke(mob/living/M, datum/disease/advance/A)
- var/get_damage = (sqrt(20+A.totalStageSpeed())/2)+(sqrt(16+A.totalStealth()*5))
+ var/get_damage = sqrt(21+A.totalStageSpeed()*0.5)+sqrt(16+A.totalStealth()*5)
M.adjustOxyLoss(get_damage)
return 1
\ No newline at end of file
diff --git a/code/datums/diseases/advance/symptoms/damage_converter.dm b/code/datums/diseases/advance/symptoms/damage_converter.dm
index eb7afcaf6be..cba4d4a4cd0 100644
--- a/code/datums/diseases/advance/symptoms/damage_converter.dm
+++ b/code/datums/diseases/advance/symptoms/damage_converter.dm
@@ -45,9 +45,11 @@ Bonus
if(!parts.len)
return
- M.heal_overall_damage(get_damage, get_damage)
+ for(var/obj/item/organ/external/E in parts)
+ E.heal_damage(get_damage, get_damage, 0, 0)
M.adjustToxLoss(get_damage*parts.len)
+
else
if(M.getFireLoss() > 0 || M.getBruteLoss() > 0)
M.adjustFireLoss(-get_damage)
diff --git a/code/datums/diseases/advance/symptoms/sensory.dm b/code/datums/diseases/advance/symptoms/sensory.dm
index 3ec0f16358a..9234b54b088 100644
--- a/code/datums/diseases/advance/symptoms/sensory.dm
+++ b/code/datums/diseases/advance/symptoms/sensory.dm
@@ -21,7 +21,7 @@ Bonus
resistance = -4
stage_speed = -4
transmittable = -3
- level = 6
+ level = 5
severity = 0
/datum/symptom/sensory_restoration/Activate(var/datum/disease/advance/A)
@@ -38,12 +38,12 @@ Bonus
M.reagents.add_reagent_list(list("antihol"=10, "oculine"=10))
to_chat(M, "You feel sober.")
if(4)
- if(M.reagents.get_reagent_amount("antihol") < 10 && M.reagents.get_reagent_amount("oculine") < 10 && M.reagents.get_reagent_amount("synaptizine") < 10)
- M.reagents.add_reagent_list(list("antihol"=10, "oculine"=10, "synaptizine"=5))
+ if(M.reagents.get_reagent_amount("antihol") < 10 && M.reagents.get_reagent_amount("oculine") < 10 && M.reagents.get_reagent_amount("synaphydramine") < 10)
+ M.reagents.add_reagent_list(list("antihol"=10, "oculine"=10, "synaphydramine"=5))
to_chat(M, "You feel focused.")
if(5)
- if(M.reagents.get_reagent_amount("antihol") < 10 && M.reagents.get_reagent_amount("oculine") < 10 && M.reagents.get_reagent_amount("synaptizine") < 10 && M.reagents.get_reagent_amount("mannitol") < 10)
- M.reagents.add_reagent_list(list("mannitol"=10, "antihol"=10, "oculine"=10, "synaptizine"=10))
+ if(M.reagents.get_reagent_amount("antihol") < 10 && M.reagents.get_reagent_amount("oculine") < 10 && M.reagents.get_reagent_amount("synaphydramine") < 10 && M.reagents.get_reagent_amount("mannitol") < 10)
+ M.reagents.add_reagent_list(list("mannitol"=10, "antihol"=10, "oculine"=10, "synaphydramine"=10))
to_chat(M, "Your mind feels relaxed.")
return
diff --git a/code/datums/helper_datums/map_template.dm b/code/datums/helper_datums/map_template.dm
index 8b26807199e..a2d00e69558 100644
--- a/code/datums/helper_datums/map_template.dm
+++ b/code/datums/helper_datums/map_template.dm
@@ -48,7 +48,7 @@
// This system will metaphorically snap in half (not postpone init everywhere)
// if given a multi-z template
// it might need to be adapted for that when that time comes
- zlevels.add_dirt(placement.z)
+ space_manager.add_dirt(placement.z)
var/list/bounds = maploader.load_map(get_file(), min_x, min_y, placement.z, cropMap = 1)
if(!bounds)
return 0
@@ -65,7 +65,7 @@
late_setup_level(
block(bot_left, top_right),
block(ST_bot_left, ST_top_right))
- zlevels.remove_dirt(placement.z)
+ space_manager.remove_dirt(placement.z)
log_game("[name] loaded at [min_x],[min_y],[placement.z]")
return 1
diff --git a/code/datums/spell.dm b/code/datums/spell.dm
index c7aa3dfd9a0..63b9405f73e 100644
--- a/code/datums/spell.dm
+++ b/code/datums/spell.dm
@@ -67,6 +67,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
caster.reset_view(0)
return 0
+ // TODO: Tie into space manager
if(user.z == ZLEVEL_CENTCOMM && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel
return 0
if(user.z == ZLEVEL_CENTCOMM && ticker.mode.name == "ragin' mages")
@@ -363,6 +364,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
if(((!user.mind) || !(src in user.mind.spell_list)) && !(src in user.mob_spell_list))
return 0
+ // TODO: Tie into space manager
if(user.z == ZLEVEL_CENTCOMM && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel
return 0
if(user.z == ZLEVEL_CENTCOMM && ticker.mode.name == "ragin' mages")
@@ -400,4 +402,4 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
return 0
if(isbrain(user) || ispAI(user))
return 0
- return 1
\ No newline at end of file
+ return 1
diff --git a/code/datums/spells/ethereal_jaunt.dm b/code/datums/spells/ethereal_jaunt.dm
index eba2aa895f4..b75cba1f858 100644
--- a/code/datums/spells/ethereal_jaunt.dm
+++ b/code/datums/spells/ethereal_jaunt.dm
@@ -98,6 +98,7 @@
var/canmove = 1
density = 0
anchored = 1
+ burn_state = LAVA_PROOF
/obj/effect/dummy/spell_jaunt/Destroy()
// Eject contents if deleted somehow
diff --git a/code/datums/spells/horsemask.dm b/code/datums/spells/horsemask.dm
index d39ff42ea51..3d2ab9d4718 100644
--- a/code/datums/spells/horsemask.dm
+++ b/code/datums/spells/horsemask.dm
@@ -12,7 +12,6 @@
range = 7
cooldown_min = 30 //30 deciseconds reduction per rank
selection_type = "range"
- var/list/compatible_mobs = list(/mob/living/carbon/human)
action_icon_state = "barn"
@@ -26,7 +25,8 @@
if(!target)
return
- if((target.type in compatible_mobs) || ishuman(target))
+
+ if(!ishuman(target))
to_chat(user, "It'd be stupid to curse [target] with a horse's head!")
return
diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm
index cafbb579f34..211374c3c31 100644
--- a/code/datums/uplink_item.dm
+++ b/code/datums/uplink_item.dm
@@ -309,6 +309,14 @@ var/list/uplink_items = list()
item = /obj/item/clothing/under/contortionist
cost = 6
job = list("Life Support Specialist")
+
+/datum/uplink_item/dangerous/energizedfireaxe
+ name = "Energized Fire Axe"
+ desc = "A fire axe with a massive electrical charge built into it. It can release this charge on its first victim and will be rather plain after that."
+ reference = "EFA"
+ item = /obj/item/weapon/twohanded/energizedfireaxe
+ cost = 10
+ job = list("Life Support Specialist")
//Stimulants
@@ -462,6 +470,13 @@ var/list/uplink_items = list()
gamemodes = list(/datum/game_mode/nuclear)
surplus = 0
+/datum/uplink_item/dangerous/atmosgrenades
+ name = "Atmos Grenades"
+ desc = "A box of two (2) grenades that wreak havoc with the atmosphere of the target area. Capable of engulfing a large area in lit plasma, or N2O. Deploy with extreme caution!"
+ reference = "AGG"
+ item = /obj/item/weapon/storage/box/syndie_kit/atmosgasgrenades
+ cost = 6
+
/datum/uplink_item/dangerous/emp
name = "EMP Grenades and Implanter Kit"
desc = "A box that contains two EMP grenades and an EMP implant. Useful to disrupt communication, \
@@ -879,8 +894,8 @@ var/list/uplink_items = list()
cost = 1
/datum/uplink_item/device_tools/surgerybag
- name = "Syndicate Surgery Dufflebag"
- desc = "The Syndicate surgery dufflebag is a toolkit containing all surgery tools, a straitjacket, and a muzzle."
+ name = "Syndicate Surgery Duffelbag"
+ desc = "The Syndicate surgery duffelbag is a toolkit containing all surgery tools, a straitjacket, and a muzzle."
reference = "SSDB"
item = /obj/item/weapon/storage/backpack/duffel/syndie/surgery
cost = 4
diff --git a/code/datums/weather/weather_types.dm b/code/datums/weather/weather_types.dm
index 07735e85968..bf942b7ceba 100644
--- a/code/datums/weather/weather_types.dm
+++ b/code/datums/weather/weather_types.dm
@@ -1,4 +1,5 @@
//Different types of weather.
+// TODO: Tie into space manager
/datum/weather/floor_is_lava //The Floor is Lava: Makes all turfs damage anyone on them unless they're standing on a solid object.
name = "the floor is lava"
diff --git a/code/defines/procs/radio.dm b/code/defines/procs/radio.dm
index b13cfe9ca05..b78345b0638 100644
--- a/code/defines/procs/radio.dm
+++ b/code/defines/procs/radio.dm
@@ -47,6 +47,7 @@
/proc/get_receiver_reception(var/receiver, var/datum/signal/signal)
if(receiver && check_signal(signal))
var/turf/pos = get_turf(receiver)
+ // Maybe should get tie-in to the space manager?
if(pos && (pos.z in signal.data["level"]))
return TELECOMMS_RECEPTION_RECEIVER
return TELECOMMS_RECEPTION_NONE
diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm
index 3992f97fd0b..07ad5956002 100644
--- a/code/game/area/Space Station 13 areas.dm
+++ b/code/game/area/Space Station 13 areas.dm
@@ -67,6 +67,7 @@ var/list/teleportlocs = list()
if(AR.no_teleportlocs) continue
if(teleportlocs.Find(AR.name)) continue
var/turf/picked = safepick(get_area_turfs(AR.type))
+ // TODO: Tie into space manager
if(picked && (picked.z == ZLEVEL_STATION))
teleportlocs += AR.name
teleportlocs[AR.name] = AR
@@ -2632,4 +2633,3 @@ var/list/the_station_areas = list (
/area/turret_protected/ai_upload_foyer,
/area/turret_protected/ai,
)
-
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index 43540f347de..5963d461daf 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -376,6 +376,7 @@
return 1
else
// There's a gravity generator on our z level
+ // This would do well when integrated with the z level manager
if(T && gravity_generators["[T.z]"] && length(gravity_generators["[T.z]"]))
return 1
return 0
diff --git a/code/game/asteroid.dm b/code/game/asteroid.dm
index 229bc979c37..89b31f478dd 100644
--- a/code/game/asteroid.dm
+++ b/code/game/asteroid.dm
@@ -72,7 +72,7 @@ var/global/max_secret_rooms = 6
treasureitems = list(/obj/item/device/soulstone=1, /obj/item/clothing/suit/space/cult=1, /obj/item/weapon/bedsheet/cult=2,
/obj/item/clothing/suit/hooded/cultrobes=2, /mob/living/simple_animal/hostile/creature=3)
fluffitems = list(/obj/effect/gateway=1,/obj/effect/gibspawner=1,/obj/structure/cult/talisman=1,/obj/item/toy/crayon/red=2,
- /obj/item/organ/internal/heart=2, /obj/effect/decal/cleanable/blood=4,/obj/structure/table/woodentable=2,/obj/item/weapon/ectoplasm=3,
+ /obj/item/organ/internal/heart=2, /obj/effect/decal/cleanable/blood=4,/obj/structure/table/woodentable=2,/obj/item/weapon/reagent_containers/food/snacks/ectoplasm=3,
/obj/item/clothing/head/helmet/space/cult=1, /obj/item/clothing/shoes/cult=1)
if("wizden")
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 7e5c26b52e5..0435ead41b2 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -13,6 +13,7 @@
var/germ_level = GERM_LEVEL_AMBIENT // The higher the germ level, the more germ on the atom.
var/simulated = 1 //filter for actions - used by lighting overlays
var/atom_say_verb = "says"
+ var/dont_save = 0 // For atoms that are temporary by necessity - like lighting overlays
///Chemistry.
var/datum/reagents/reagents = null
@@ -41,6 +42,7 @@
if(!T)
return 0
+ // TODO: Tie into space manager
if(T.z != ZLEVEL_CENTCOMM)//if not, don't bother
return 0
@@ -58,6 +60,7 @@
if(!T)
return 0
+ // TODO: Tie into space manager
if(T.z != ZLEVEL_CENTCOMM)//if not, don't bother
return 0
@@ -446,11 +449,10 @@
/atom/proc/narsie_act()
return
-/atom/proc/atom_say(var/message)
- if((!message))
+/atom/proc/atom_say(message)
+ if(!message)
return
- for(var/mob/O in hearers(src, null))
- O.show_message("[src] [atom_say_verb], \"[message]\"",2)
+ audible_message("[src] [atom_say_verb], \"[message]\"")
/atom/proc/speech_bubble(var/bubble_state = "",var/bubble_loc = src, var/list/bubble_recipients = list())
return
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index cb612eec455..a903e4ea8ed 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -44,8 +44,8 @@
// at which point object creations are a fair toss more seldom
/atom/movable/proc/attempt_init()
var/turf/T = get_turf(src)
- if(T && zlevels.is_zlevel_dirty(T.z))
- zlevels.postpone_init(T.z, src)
+ if(T && space_manager.is_zlevel_dirty(T.z))
+ space_manager.postpone_init(T.z, src)
else if(auto_init)
initialize()
diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm
index 76254b13c44..4224ad1aa5e 100644
--- a/code/game/dna/dna2.dm
+++ b/code/game/dna/dna2.dm
@@ -419,3 +419,26 @@ var/global/list/bad_blocks[0]
unique_enzymes = md5(character.real_name)
reg_dna[unique_enzymes] = character.real_name
+
+// Hmm, I wonder how to go about this without a huge convention break
+/datum/dna/serialize()
+ var/data = list()
+ data["UE"] = unique_enzymes
+ data["SE"] = SE.Copy() // This is probably too lazy for my own good
+ data["UI"] = UI.Copy()
+ data["species"] = species // This works because `species` is a string, not a datum
+ // Because old DNA coders were insane or something
+ data["b_type"] = b_type
+ data["real_name"] = real_name
+ return data
+
+/datum/dna/deserialize(data)
+ unique_enzymes = data["UE"]
+ // The de-serializer is unlikely to tamper with the lists
+ SE = data["SE"]
+ UI = data["UI"]
+ UpdateUI()
+ UpdateSE()
+ species = data["species"]
+ b_type = data["b_type"]
+ real_name = data["real_name"]
diff --git a/code/game/dna/genes/goon_disabilities.dm b/code/game/dna/genes/goon_disabilities.dm
index cac55d7d317..f2489a2490a 100644
--- a/code/game/dna/genes/goon_disabilities.dm
+++ b/code/game/dna/genes/goon_disabilities.dm
@@ -131,7 +131,17 @@
/datum/dna/gene/disability/speech/swedish/OnSay(var/mob/M, var/message)
// svedish
- message = replacetext(message,"w","v")
+ message = replacetextEx(message,"W","V")
+ message = replacetextEx(message,"w","v")
+ message = replacetextEx(message,"J","Y")
+ message = replacetextEx(message,"j","y")
+ message = replacetextEx(message,"A",pick("Å","Ä","Æ","A"))
+ message = replacetextEx(message,"a",pick("å","ä","æ","a"))
+ message = replacetextEx(message,"BO","BJO")
+ message = replacetextEx(message,"Bo","Bjo")
+ message = replacetextEx(message,"bo","bjo")
+ message = replacetextEx(message,"O",pick("Ö","Ø","O"))
+ message = replacetextEx(message,"o",pick("ö","ø","o"))
if(prob(30))
message += " Bork[pick("",", bork",", bork, bork")]!"
return message
diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm
index 1dc7985d648..7d9aed3d442 100644
--- a/code/game/gamemodes/antag_spawner.dm
+++ b/code/game/gamemodes/antag_spawner.dm
@@ -80,6 +80,7 @@
var/mob/living/demon_type = /mob/living/simple_animal/slaughter
/obj/item/weapon/antag_spawner/slaughter_demon/attack_self(mob/user as mob)
+ // TODO: Tie into space manager
if(user.z == ZLEVEL_CENTCOMM)//this is to make sure the wizard does NOT summon a demon from the Den..
to_chat(user, "You should probably wait until you reach the station.")
return
@@ -135,4 +136,4 @@
veil_msg = "You sense an adorable presence \
lurking just beyond the veil..."
objective_verb = "Hug and Tickle"
- demon_type = /mob/living/simple_animal/slaughter/laughter
\ No newline at end of file
+ demon_type = /mob/living/simple_animal/slaughter/laughter
diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm
index 35b469258ef..ebab12dc0f2 100644
--- a/code/game/gamemodes/blob/blob.dm
+++ b/code/game/gamemodes/blob/blob.dm
@@ -118,6 +118,7 @@ var/list/blob_nodes = list()
if(directory[ckey(blob.key)])
blob_client = directory[ckey(blob.key)]
location = get_turf(C)
+ // TODO: Tie into space manager
if(location.z != ZLEVEL_STATION || istype(location, /turf/space))
if(!warned)
to_chat(C, "You feel ready to burst, but this isn't an appropriate place! You must return to the station!")
diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm
index c6d3bd13e0f..e74a0677942 100644
--- a/code/game/gamemodes/blob/blob_report.dm
+++ b/code/game/gamemodes/blob/blob_report.dm
@@ -23,6 +23,7 @@
var/nukecode = rand(10000, 99999)
for(var/obj/machinery/nuclearbomb/bomb in world)
if(bomb && bomb.r_code)
+ // TODO: Tie into space manager
if(bomb.z == ZLEVEL_STATION)
bomb.r_code = nukecode
diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm
index e2f4fc50c12..5b0884788b9 100644
--- a/code/game/gamemodes/blob/blobs/blob_mobs.dm
+++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm
@@ -36,7 +36,6 @@
melee_damage_upper = 4
attacktext = "hits"
attack_sound = 'sound/weapons/genhit1.ogg'
- del_on_death = 1
speak_emote = list("pulses")
var/obj/effect/blob/factory/factory = null
var/list/human_overlays = list()
@@ -92,6 +91,7 @@
loc.visible_message("The corpse of [H.name] suddenly rises!")
/mob/living/simple_animal/hostile/blob/blobspore/death(gibbed)
+ ..()
// On death, create a small smoke of harmful gas (s-Acid)
var/datum/effect/system/chem_smoke_spread/S = new
var/turf/location = get_turf(src)
@@ -108,7 +108,7 @@
S.attach(location)
S.set_up(reagents, 1, 1, location, 15, 1) // only 1-2 smoke cloud
S.start()
- ..()
+ qdel(src)
/mob/living/simple_animal/hostile/blob/blobspore/Destroy()
if(factory)
diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm
index 01e44ba5888..5640c9a71f6 100644
--- a/code/game/gamemodes/changeling/changeling.dm
+++ b/code/game/gamemodes/changeling/changeling.dm
@@ -110,7 +110,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
if(identity_theft.target && identity_theft.target.current)
identity_theft.target_real_name = kill_objective.target.current.real_name //Whoops, forgot this.
var/mob/living/carbon/human/H = identity_theft.target.current
- if(H.species && H.species.flags && H.species.flags & NO_SCAN) // For species that can't be absorbed - should default to an escape objective instead
+ if(check_species_absorb(H.species)) // For species that can't be absorbed - should default to an escape objective
return
else
identity_theft.explanation_text = "Escape on the shuttle or an escape pod with the identity of [identity_theft.target_real_name], the [identity_theft.target.assigned_role] while wearing their identification card."
@@ -329,3 +329,5 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
return 1
+/proc/check_species_absorb(datum/species/S)
+ return !((S.flags & NO_DNA) || (S.flags & NO_SCAN) || (S.flags & NO_BLOOD))
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index 7ad1e33b747..dc12c64fbed 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -14,7 +14,8 @@ var/list/sacrificed = list()
for(var/obj/effect/rune/R in world)
if(R == src)
continue
- if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && R.z != 2)
+ // TODO: Tie into space manager
+ if(R.word1 == cultwords["travel"] && R.word2 == cultwords["self"] && R.word3 == key && R.z != ZLEVEL_CENTCOMM)
index++
allrunesloc.len = index
allrunesloc[index] = R.loc
diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm
index fd384e61d1f..54db8374d29 100644
--- a/code/game/gamemodes/events.dm
+++ b/code/game/gamemodes/events.dm
@@ -2,6 +2,7 @@
//command_announcement.Announce("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", new_sound = 'sound/AI/aliens.ogg')
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
+ // TODO: Tie into space manager
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded)
if(temp_vent.parent.other_atmosmch.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology
vents += temp_vent
@@ -53,7 +54,7 @@
apc.overload_lighting()
else
- for(var/obj/machinery/power/apc/apc in machines)
+ for(var/obj/machinery/power/apc/apc in apcs)
apc.overload_lighting()
return
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index e91f7156208..a3125ed1895 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -427,6 +427,7 @@ proc/get_nt_opposed()
/proc/get_nuke_code()
var/nukecode = "ERROR"
for(var/obj/machinery/nuclearbomb/bomb in world)
+ // TODO: Tie into space manager
if(bomb && bomb.r_code && bomb.z == ZLEVEL_STATION)
nukecode = bomb.r_code
return nukecode
@@ -452,6 +453,7 @@ proc/get_nt_opposed()
else
text += " survived"
if(fleecheck && ply.current.z > ZLEVEL_STATION)
+ // TODO: Tie into space manager
text += " while fleeing the station"
if(ply.current.real_name != ply.name)
text += " as [ply.current.real_name]"
@@ -468,4 +470,4 @@ proc/get_nt_opposed()
else
text += " Objective #[count]: [objective.explanation_text] Fail."
count++
- return text
\ No newline at end of file
+ return text
diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm
index 7d6ea9b4e7d..4fd8c5a452b 100644
--- a/code/game/gamemodes/gameticker.dm
+++ b/code/game/gamemodes/gameticker.dm
@@ -266,7 +266,8 @@ var/round_start_time = 0
M.client.screen += cinematic
if(M.stat != DEAD)
var/turf/T = get_turf(M)
- if(T && T.z == 1)
+ // TODO: Tie into space manager
+ if(T && T.z == ZLEVEL_STATION)
M.death(0) //no mercy
//Now animate the cinematic
diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm
index c6b65472c2e..59a731bed47 100644
--- a/code/game/gamemodes/malfunction/Malf_Modules.dm
+++ b/code/game/gamemodes/malfunction/Malf_Modules.dm
@@ -1,19 +1,3 @@
-// TO DO:
-/*
-epilepsy flash on lights
-delay round message
-microwave makes robots
-dampen radios
-reactivate cameras - done
-eject engine
-core sheild
-cable stun
-rcd light flash thingy on matter drain
-
-
-
-*/
-
/datum/AI_Module
var/uses = 0
var/module_name
@@ -25,7 +9,6 @@ rcd light flash thingy on matter drain
var/power_type
-
/datum/AI_Module/large/
uses = 1
@@ -33,28 +16,11 @@ rcd light flash thingy on matter drain
uses = 5
-/datum/AI_Module/large/fireproof_core
- module_name = "Core Upgrade"
- mod_pick_name = "coreup"
- description = "An upgrade to improve core resistance, making it immune to fire and heat. This effect is permanent."
- cost = 50
- one_time = 1
-
- power_type = /mob/living/silicon/ai/proc/fireproof_core
-
-/mob/living/silicon/ai/proc/fireproof_core()
- set category = "Malfunction"
- set name = "Fireproof Core"
- for(var/mob/living/silicon/ai/ai in player_list)
- ai.fire_res_on_core = 1
- src.verbs -= /mob/living/silicon/ai/proc/fireproof_core
- to_chat(src, "Core fireproofed.")
-
/datum/AI_Module/large/upgrade_turrets
module_name = "AI Turret Upgrade"
mod_pick_name = "turret"
- description = "Improves the firing power and health of all AI turrets. This effect is permanent."
- cost = 50
+ description = "Improves the power and health of all AI turrets. This effect is permanent."
+ cost = 30
one_time = 1
power_type = /mob/living/silicon/ai/proc/upgrade_turrets
@@ -69,16 +35,52 @@ rcd light flash thingy on matter drain
src.verbs -= /mob/living/silicon/ai/proc/upgrade_turrets
for(var/obj/machinery/porta_turret/turret in machines)
var/turf/T = get_turf(turret)
+ // TODO: Tie into space manager
if(T.z in config.station_levels)
- // Increase health by 37.5% of original max, decrease delays between shots to 66%
- turret.health += initial(turret.health) * 3 / 8
+ turret.health += 30
turret.eprojectile = /obj/item/projectile/beam/laser/heavylaser //Once you see it, you will know what it means to FEAR.
turret.eshot_sound = 'sound/weapons/lasercannonfire.ogg'
to_chat(src, "Turrets upgraded.")
+
+
+/datum/AI_Module/large/lockdown
+ module_name = "Hostile Station Lockdown"
+ mod_pick_name = "lockdown"
+ description = "Overload the airlock, blast door and fire control networks, locking them down. Caution! This command also electrifies all airlocks. The networks will automatically reset after 90 seconds."
+ cost = 30
+ one_time = 1
+
+ power_type = /mob/living/silicon/ai/proc/lockdown
+
+/mob/living/silicon/ai/proc/lockdown()
+ set category = "Malfunction"
+ set name = "Initiate Hostile Lockdown"
+
+ if(stat)
+ return
+
+ for(var/obj/machinery/door/D in airlocks)
+ if(D.z != ZLEVEL_STATION)
+ continue
+ spawn(0)
+ D.hostile_lockdown(src)
+ addtimer(D, "disable_lockdown", 900)
+
+ var/obj/machinery/computer/communications/C = locate() in machines
+ if(C)
+ C.post_status("alert", "lockdown")
+
+ verbs -= /mob/living/silicon/ai/proc/lockdown
+ minor_announcement.Announce("Hostile runtime detected in door controllers. Isolation lockdown protocols are now in effect. Please remain calm.", "Network Alert")
+ to_chat(src, "Lockdown Initiated. Network reset in 90 seconds.")
+ spawn(900)
+ minor_announcement.Announce("Automatic system reboot complete. Have a secure day.","Network reset:")
+
+
/datum/AI_Module/large/destroy_rcd
module_name = "Destroy RCDs"
mod_pick_name = "rcd"
- description = "Send a specialised pulse to detonate all hand-held and exosuit Rapid Cconstruction Devices on the station."
+ description = "Send a specialised pulse to detonate all hand-held and exosuit Rapid Construction Devices on the station."
cost = 25
one_time = 1
@@ -92,23 +94,20 @@ rcd light flash thingy on matter drain
if(stat || malf_cooldown)
return
- for(var/obj/item/RCD in rcd_list)
+ for(var/obj/item/weapon/rcd/RCD in rcd_list)
if(!istype(RCD, /obj/item/weapon/rcd/borg)) //Ensures that cyborg RCDs are spared.
- RCD.audible_message("[RCD] begins to vibrate and buzz loudly!","[RCD] begins vibrating violently!")
- spawn(50) //5 seconds to get rid of it!
- if(RCD) //Make sure it still exists (In case of chain-reaction)
- explosion(RCD, 0, 0, 3, 1, flame_range = 1)
- qdel(RCD)
+ RCD.detonate_pulse()
to_chat(src, "RCD detonation pulse emitted.")
malf_cooldown = 1
spawn(100)
malf_cooldown = 0
+
/datum/AI_Module/large/mecha_domination
module_name = "Viral Mech Domination"
mod_pick_name = "mechjack"
- description = "Hack into a mech's onboard computer, shunting all processes into it and ejecting any occupants. Once uploaded to the mech, it is impossible to leave.\
+ description = "Hack into a mech's onboard computer, shunting all processes into it and ejecting any occupants. Once uploaded to the mech, it is impossible to leave. \
Do not allow the mech to leave the station's vicinity or allow it to be destroyed."
cost = 30
one_time = 1
@@ -124,21 +123,71 @@ rcd light flash thingy on matter drain
return
can_dominate_mechs = 1 //Yep. This is all it does. Honk!
- to_chat(src, "Virus package compiled. Select a target mech at any time. \
- You must remain on the station at all times. Loss of signal will result in total system lockout.")
+ to_chat(src, "Virus package compiled. Select a target mech at any time. You must remain on the station at all times. Loss of signal will result in total system lockout.")
verbs -= /mob/living/silicon/ai/proc/mech_takeover
+
+/datum/AI_Module/large/break_fire_alarms
+ module_name = "Thermal Sensor Override"
+ mod_pick_name = "burnpigs"
+ description = "Gives you the ability to override the thermal sensors on all fire alarms. This will remove their ability to scan for fire and thus their ability to alert. \
+ Anyone can check the fire alarm's interface and may be tipped off by its status."
+ one_time = 1
+ cost = 25
+
+ power_type = /mob/living/silicon/ai/proc/break_fire_alarms
+
+/mob/living/silicon/ai/proc/break_fire_alarms()
+ set name = "Override Thermal Sensors"
+ set category = "Malfunction"
+
+ if(stat)
+ return
+
+ for(var/obj/machinery/firealarm/F in machines)
+ if(F.z != ZLEVEL_STATION)
+ continue
+ F.emagged = 1
+ to_chat(src, "All thermal sensors on the station have been disabled. Fire alerts will no longer be recognized.")
+ verbs -= /mob/living/silicon/ai/proc/break_fire_alarms
+
+
+/datum/AI_Module/large/break_air_alarms
+ module_name = "Air Alarm Safety Override"
+ mod_pick_name = "allow_flooding"
+ description = "Gives you the ability to disable safeties on all air alarms. This will allow you to use the environmental mode Flood, which disables scrubbers as well as pressure checks on vents. \
+ Anyone can check the air alarm's interface and may be tipped off by their nonfunctionality."
+ one_time = 1
+ cost = 50
+
+ power_type = /mob/living/silicon/ai/proc/break_air_alarms
+
+/mob/living/silicon/ai/proc/break_air_alarms()
+ set name = "Disable Air Alarm Safeties"
+ set category = "Malfunction"
+
+ if(stat)
+ return
+
+ for(var/obj/machinery/alarm/AA in machines)
+ if(AA.z != ZLEVEL_STATION)
+ continue
+ AA.emagged = 1
+ to_chat(src, "All air alarm safeties on the station have been overriden. Air alarms may now use the Flood environmental mode.")
+ verbs -= /mob/living/silicon/ai/proc/break_air_alarms
+
+
/datum/AI_Module/small/overload_machine
module_name = "Machine Overload"
mod_pick_name = "overload"
description = "Overloads an electrical machine, causing a small explosion. 2 uses."
uses = 2
- cost = 15
+ cost = 20
power_type = /mob/living/silicon/ai/proc/overload_machine
-/mob/living/silicon/ai/proc/overload_machine(obj/machinery/M as obj in world)
+/mob/living/silicon/ai/proc/overload_machine(obj/machinery/M in machines)
set name = "Overload Machine"
set category = "Malfunction"
@@ -146,56 +195,55 @@ rcd light flash thingy on matter drain
return
if(istype(M, /obj/machinery))
- if(istype(M,/obj/machinery/field/generator))
- to_chat(src, "This machine can not be overloaded due to a firewall.")
- return
for(var/datum/AI_Module/small/overload_machine/overload in current_modules)
if(overload.uses > 0)
overload.uses --
- for(var/mob/V in hearers(M, null))
- V.show_message("You hear a loud electrical buzzing sound!", 2)
+ audible_message("You hear a loud electrical buzzing sound!")
+ to_chat(src, "Overloading machine circuitry...")
spawn(50)
- explosion(get_turf(M), 0,1,1,0)
- qdel(M)
+ if(M)
+ explosion(get_turf(M), 0,1,1,0)
+ qdel(M)
else
- to_chat(src, "Out of uses.")
+ to_chat(src, "Out of uses.")
else
to_chat(src, "That's not a machine.")
+
/datum/AI_Module/small/override_machine
module_name = "Machine Override"
mod_pick_name = "override"
description = "Overrides a machine's programming, causing it to rise up and attack everyone except other machines. 4 uses."
uses = 4
- cost = 15
+ cost = 30
power_type = /mob/living/silicon/ai/proc/override_machine
-/mob/living/silicon/ai/proc/override_machine(obj/machinery/M as obj in world)
+
+/mob/living/silicon/ai/proc/override_machine(obj/machinery/M in machines)
set name = "Override Machine"
set category = "Malfunction"
if(stat)
return
- if(istype(M, /obj/machinery))
- if(istype(M,/obj/machinery/field/generator))
- to_chat(src, "This machine can not be overloaded due to a firewall.")
- return
+ if (istype(M, /obj/machinery))
+ if(!M.can_be_overridden())
+ to_chat(src, "Can't override this device.")
for(var/datum/AI_Module/small/override_machine/override in current_modules)
if(override.uses > 0)
override.uses --
- for(var/mob/V in hearers(M, null))
- V.show_message("You hear a loud electrical buzzing sound!", 2)
+ audible_message("You hear a loud electrical buzzing sound!")
to_chat(src, "Reprogramming machine behaviour...")
spawn(50)
- if(M)
+ if(M && !qdeleted(M))
new /mob/living/simple_animal/hostile/mimic/copy/machine(get_turf(M), M, src, 1)
else
- to_chat(src, "Out of uses.")
+ to_chat(src, "Out of uses.")
else
to_chat(src, "That's not a machine.")
+
/datum/AI_Module/large/place_cyborg_transformer
module_name = "Robotic Factory (Removes Shunting)"
mod_pick_name = "cyborgtransformer"
@@ -267,7 +315,7 @@ rcd light flash thingy on matter drain
if(success)
return 1
alert(src, alert_msg)
- return
+
/datum/AI_Module/small/blackout
module_name = "Blackout"
@@ -288,7 +336,7 @@ rcd light flash thingy on matter drain
for(var/datum/AI_Module/small/blackout/blackout in current_modules)
if(blackout.uses > 0)
blackout.uses --
- for(var/obj/machinery/power/apc/apc in world)
+ for(var/obj/machinery/power/apc/apc in apcs)
if(prob(30*apc.overload))
apc.overload_lighting()
else
@@ -297,6 +345,7 @@ rcd light flash thingy on matter drain
else
to_chat(src, "Out of uses.")
+
/datum/AI_Module/small/reactivate_cameras
module_name = "Reactivate Camera Network"
mod_pick_name = "recam"
@@ -338,7 +387,8 @@ rcd light flash thingy on matter drain
spawn(30) //Lag protection
malf_cooldown = 0
-/datum/AI_Module/small/upgrade_cameras
+
+/datum/AI_Module/large/upgrade_cameras
module_name = "Upgrade Camera Network"
mod_pick_name = "upgradecam"
description = "Install broad-spectrum scanning and electrical redundancy firmware to the camera network, enabling EMP-Proofing and light-amplified X-ray vision." //I <3 pointless technobabble
@@ -357,6 +407,7 @@ rcd light flash thingy on matter drain
var/upgradedcams = 0
see_override = SEE_INVISIBLE_MINIMUM //Night-vision, without which X-ray would be very limited in power.
+ update_sight()
for(var/obj/machinery/camera/C in cameranet.cameras)
if(C.assembly)
@@ -378,6 +429,26 @@ rcd light flash thingy on matter drain
to_chat(src, "OTA firmware distribution complete! Cameras upgraded: [upgradedcams]. Light amplification system online.")
verbs -= /mob/living/silicon/ai/proc/upgrade_cameras
+
+/datum/AI_Module/large/eavesdrop
+ module_name = "Enhanced Surveillance"
+ mod_pick_name = "eavesdrop"
+ description = "Via a combination of hidden microphones and lip reading software, you are able to use your cameras to listen in on conversations."
+ cost = 30
+ one_time = 1
+
+ power_type = /mob/living/silicon/ai/proc/surveillance
+
+/mob/living/silicon/ai/proc/surveillance()
+ set category = "Malfunction"
+ set name = "Enhanced Surveillance"
+
+ if(eyeobj)
+ eyeobj.relay_speech = TRUE
+ to_chat(src, "OTA firmware distribution complete! Cameras upgraded: Enhanced surveillance package online.")
+ verbs -= /mob/living/silicon/ai/proc/surveillance
+
+
/datum/module_picker
var/temp = null
var/processing_time = 100
@@ -420,6 +491,10 @@ rcd light flash thingy on matter drain
return
var/mob/living/silicon/ai/A = usr
+ if(A.stat == DEAD)
+ to_chat(A, "You are already dead!") //Omae Wa Mou Shindeiru
+ return
+
for(var/datum/AI_Module/AM in possible_modules)
if(href_list[AM.mod_pick_name])
@@ -441,6 +516,7 @@ rcd light flash thingy on matter drain
break
// Give the power and take away the money.
+ A.view_core() //A BYOND bug requires you to be viewing your core before your verbs update
A.verbs += AM.power_type
A.current_modules += new AM.type
temp = AM.description
@@ -449,6 +525,4 @@ rcd light flash thingy on matter drain
if(href_list["showdesc"])
if(AM.mod_pick_name == href_list["showdesc"])
temp = AM.description
-
- src.use(usr)
- return
+ use(usr)
\ No newline at end of file
diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm
index 77c45956eb4..fb85a0a1606 100644
--- a/code/game/gamemodes/malfunction/malfunction.dm
+++ b/code/game/gamemodes/malfunction/malfunction.dm
@@ -141,6 +141,7 @@
/datum/game_mode/proc/check_ai_loc()
for(var/datum/mind/AI_mind in malf_ai)
var/turf/ai_location = get_turf(AI_mind.current)
+ // TODO: Tie into space manager
if(ai_location && (ai_location.z == ZLEVEL_STATION))
return 1
return 0
@@ -343,4 +344,4 @@
text += module_text_temp
to_chat(world, text)
- return 1
\ No newline at end of file
+ return 1
diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm
index 2f7af290229..a2ff0f4e1d8 100644
--- a/code/game/gamemodes/meteor/meteors.dm
+++ b/code/game/gamemodes/meteor/meteors.dm
@@ -36,7 +36,8 @@
var/Me = pickweight(meteortypes)
var/obj/effect/meteor/M = new Me(pickedstart)
M.dest = pickedgoal
- M.z_original = 1
+ // TODO: Tie into space manager
+ M.z_original = ZLEVEL_STATION
spawn(0)
walk_towards(M, M.dest, 1)
return
@@ -102,6 +103,7 @@
var/dropamt = 2
/obj/effect/meteor/Move()
+ // TODO: Tie into space manager
if(z != z_original || loc == dest)
qdel(src)
return
@@ -309,5 +311,3 @@
/obj/effect/meteor/goreops/Bump(atom/A)
A.ex_act(hitpwr)
get_hit()
-
-
diff --git a/code/game/gamemodes/miniantags/borer/borer_event.dm b/code/game/gamemodes/miniantags/borer/borer_event.dm
index ed096526d10..28a0282487d 100644
--- a/code/game/gamemodes/miniantags/borer/borer_event.dm
+++ b/code/game/gamemodes/miniantags/borer/borer_event.dm
@@ -17,6 +17,7 @@
/datum/event/borer_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
+ // TODO: Tie into space manager
if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded)
//Stops cortical borers getting stuck in small networks. See: Security, Virology
if(temp_vent.parent.other_atmosmch.len > 50)
@@ -33,4 +34,3 @@
spawncount--
successSpawn = 1
-
diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
index d5541f70e0d..ed84f211e53 100644
--- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
+++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
@@ -290,6 +290,7 @@
/mob/living/simple_animal/hostile/swarmer/proc/DisperseTarget(var/mob/living/target)
if(target != src)
to_chat(src, "Attempting to remove this being from our presence.")
+ // TODO: Tie into space manager
if(src.z != ZLEVEL_STATION)
to_chat(src, "Our bluespace transceiver cannot locate a viable bluespace link, our teleportation abilities are useless in this area.")
return
@@ -512,4 +513,3 @@
for(var/mob/M in mob_list)
if(isswarmer(M) || (M in dead_mob_list))
to_chat(M, "Swarm communication - [src] states: [message]")
-
diff --git a/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm b/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm
index 5977f362bdc..73165079b6e 100644
--- a/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm
+++ b/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm
@@ -159,6 +159,7 @@
density = 0
anchored = 1
invisibility = 60
+ burn_state = LAVA_PROOF
/obj/effect/dummy/slaughter/relaymove(mob/user, direction)
forceMove(get_step(src,direction))
diff --git a/code/game/gamemodes/mutiny/emergency_authentication_device.dm b/code/game/gamemodes/mutiny/emergency_authentication_device.dm
index 168f0049560..0df97401a2e 100644
--- a/code/game/gamemodes/mutiny/emergency_authentication_device.dm
+++ b/code/game/gamemodes/mutiny/emergency_authentication_device.dm
@@ -49,31 +49,31 @@
return
if(!mode.current_directive.directives_complete())
- state("Command aborted. Communication with CentComm is prohibited until Directive X has been completed.")
+ atom_say("Command aborted. Communication with CentComm is prohibited until Directive X has been completed.")
return
check_key_existence()
if(captains_key && secondary_key)
activated = 1
to_chat(user, "\blue You activate \the [src]!")
- state("Command acknowledged. Initiating quantum entanglement relay to Nanotrasen High Command.")
+ atom_say("Command acknowledged. Initiating quantum entanglement relay to Nanotrasen High Command.")
launch_shuttle()
return
if(!captains_key && !secondary_key)
- state("Command aborted. Please present the authentication keys before proceeding.")
+ atom_say("Command aborted. Please present the authentication keys before proceeding.")
return
if(!captains_key)
- state("Command aborted. Please present the Captain's Authentication Key.")
+ atom_say("Command aborted. Please present the Captain's Authentication Key.")
return
if(!secondary_key)
- state("Command aborted. Please present the Emergency Secondary Authentication Key.")
+ atom_say("Command aborted. Please present the Emergency Secondary Authentication Key.")
return
// Impossible!
- state("Command aborted. This unit is defective.")
+ atom_say("Command aborted. This unit is defective.")
/obj/machinery/emergency_authentication_device/attackby(obj/item/weapon/O, mob/user, params)
if(activated)
@@ -81,7 +81,7 @@
return
if(!mode.current_directive.directives_complete())
- state({"Command aborted. Communication with CentComm is prohibited until Directive X has been completed."})
+ atom_say("Command aborted. Communication with CentComm is prohibited until Directive X has been completed.")
return
check_key_existence()
@@ -90,9 +90,9 @@
user.drop_item()
O.loc = src
- state("Key received. Thank you, Captain [mode.head_loyalist].")
+ atom_say("Key received. Thank you, Captain [mode.head_loyalist].")
spawn(5)
- state(secondary_key ? "Your keys have been authenticated. Communication with CentComm is now authorized." : "Please insert the Emergency Secondary Authentication Key now.")
+ atom_say(secondary_key ? "Your keys have been authenticated. Communication with CentComm is now authorized." : "Please insert the Emergency Secondary Authentication Key now.")
return
if(istype(O, /obj/item/weapon/mutiny/auth_key/secondary) && !secondary_key)
@@ -100,9 +100,9 @@
user.drop_item()
O.loc = src
- state("Key received. Thank you, Secondary Authenticator [mode.head_mutineer].")
+ atom_say("Key received. Thank you, Secondary Authenticator [mode.head_mutineer].")
spawn(5)
- state(captains_key ? "Your keys have been authenticated. Communication with CentComm is now authorized." : "Please insert the Captain's Authentication Key now.")
+ atom_say(captains_key ? "Your keys have been authenticated. Communication with CentComm is now authorized." : "Please insert the Captain's Authentication Key now.")
return
..()
diff --git a/code/game/gamemodes/nations/nations.dm b/code/game/gamemodes/nations/nations.dm
index ca867028585..5f729e4484e 100644
--- a/code/game/gamemodes/nations/nations.dm
+++ b/code/game/gamemodes/nations/nations.dm
@@ -142,6 +142,7 @@ datum/game_mode/nations
/datum/game_mode/nations/proc/remove_access()
for(var/obj/machinery/door/airlock/W in airlocks)
+ // TODO: Tie into space manager
if(W.z in config.station_levels)
W.req_access = list()
@@ -253,4 +254,4 @@ datum/game_mode/nations
/datum/game_mode/proc/update_nations_icons_removed(datum/mind/nations_mind)
var/datum/atom_hud/antag/nations_hud = huds[GAME_HUD_NATIONS]
nations_hud.leave_hud(nations_mind)
- set_nations_hud(nations_mind, null)
\ No newline at end of file
+ set_nations_hud(nations_mind, null)
diff --git a/code/game/gamemodes/newobjective.dm b/code/game/gamemodes/newobjective.dm
index a70074a919e..ef0edffd5f8 100644
--- a/code/game/gamemodes/newobjective.dm
+++ b/code/game/gamemodes/newobjective.dm
@@ -651,7 +651,7 @@ datum
return 10
else
return 20
-
+
/*burger
steal_target = /obj/item/weapon/reagent_containers/food/snacks/human/burger
@@ -1358,6 +1358,7 @@ datum
var/turf/T = get_turf(target.current)
if(target.current.stat == 2)
return 1
+ // TODO: Tie into space manager
else if((T) && !(T.z in config.station_levels))//If they leave the station they count as dead for this
return 2
else
@@ -1413,4 +1414,4 @@ datum/objective/silence
#undef LENIENT
#undef NORMAL
#undef HARD
-#undef IMPOSSIBLE
\ No newline at end of file
+#undef IMPOSSIBLE
diff --git a/code/game/gamemodes/nuclear/nuclear_challenge.dm b/code/game/gamemodes/nuclear/nuclear_challenge.dm
index c11b43f81ec..15a4c8ec246 100644
--- a/code/game/gamemodes/nuclear/nuclear_challenge.dm
+++ b/code/game/gamemodes/nuclear/nuclear_challenge.dm
@@ -19,6 +19,7 @@
if(player_list.len < MIN_CHALLENGE_PLAYERS)
to_chat(user, "The enemy crew is too small to be worth declaring war on.")
return
+ // TODO: Tie into space manager
if(user.z != ZLEVEL_CENTCOMM)
to_chat(user, "You have to be at your base to use this.")
return
diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm
index 18791cd15f0..ae22e0ec458 100644
--- a/code/game/gamemodes/nuclear/nuclearbomb.dm
+++ b/code/game/gamemodes/nuclear/nuclearbomb.dm
@@ -353,6 +353,7 @@ var/bomb_set
var/off_station = 0
var/turf/bomb_location = get_turf(src)
+ // TODO: Tie into space manager
if( bomb_location && (bomb_location.z in config.station_levels) )
if( (bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)) )
off_station = 1
@@ -363,7 +364,8 @@ var/bomb_set
if(ticker.mode && ticker.mode.name == "nuclear emergency")
var/obj/docking_port/mobile/syndie_shuttle = shuttle_master.getShuttle("syndicate")
if(syndie_shuttle)
- ticker.mode:syndies_didnt_escape = (syndie_shuttle.z > 1 ? 0 : 1) //muskets will make me change this, but it will do for now
+ // TODO: Tie into space manager
+ ticker.mode:syndies_didnt_escape = (syndie_shuttle.z > ZLEVEL_STATION ? 0 : 1) //muskets will make me change this, but it will do for now
ticker.mode:nuke_off_station = off_station
ticker.station_explosion_cinematic(off_station,null)
if(ticker.mode)
@@ -401,6 +403,7 @@ var/bomb_set
/obj/item/weapon/disk/nuclear/process()
var/turf/disk_loc = get_turf(src)
+ // TODO: Tie into space manager
if(disk_loc.z != ZLEVEL_STATION && disk_loc.z != ZLEVEL_CENTCOMM)
var/holder = get(src, /mob)
if(holder)
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index 825e1183529..f0a8f8957b2 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -77,7 +77,8 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \
check_completion()
if(target && target.current)
- if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > 6 || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
+ // TODO: Tie into space manager
+ if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
return 1
return 0
return 1
@@ -109,6 +110,7 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \
if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey || !target.current.client)
return 1
var/turf/T = get_turf(target.current)
+ // TODO: Tie into space manager
if(T && !(T.z in config.station_levels)) //If they leave the station they count as dead for this
return 2
return 0
@@ -144,6 +146,7 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \
if(target in ticker.mode:head_revolutionaries)
return 1
var/turf/T = get_turf(target.current)
+ // TODO: Tie into space manager
if(T && !(T.z in config.station_levels)) //If they leave the station they count as dead for this
rval = 2
return 0
@@ -170,9 +173,12 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \
check_completion()
if(target && target.current)
- if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > 6 || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
+ // TODO: Tie into space manager
+ if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
return 1
- if((target.current.z in config.admin_levels))
+ // TODO: Tie into space manager
+ var/turf/target_location = get_turf(target.current)
+ if(target_location.z in config.admin_levels) //No hiding in lockers and cheezing greentext.
return 0
return 1
@@ -337,16 +343,6 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \
/datum/objective/escape
explanation_text = "Escape on the shuttle or an escape pod alive and free."
- var/escape_areas = list(/area/shuttle/escape,
- /area/shuttle/escape_pod1/centcom,
- /area/shuttle/escape_pod1/transit,
- /area/shuttle/escape_pod2/centcom,
- /area/shuttle/escape_pod2/transit,
- /area/shuttle/escape_pod3/centcom,
- /area/shuttle/escape_pod3/transit,
- /area/shuttle/escape_pod5/centcom,
- /area/shuttle/escape_pod5/transit,
- /area/centcom/evac)
check_completion()
if(issilicon(owner.current))
@@ -572,7 +568,8 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \
check_completion()
if(target && target.current)
- if(target.current.stat == DEAD || target.current.z > 6 || !target.current.ckey)
+ // TODO: Tie into space manager
+ if(target.current.stat == DEAD || target.current.z > ZLEVEL_DERELICT || !target.current.ckey)
return 1
return 0
return 1
@@ -861,4 +858,4 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \
/datum/objective/wizchaos
explanation_text = "Wreak havoc upon the station as much you can. Send those wandless Nanotrasen scum a message!"
- completed = 1
\ No newline at end of file
+ completed = 1
diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm
index b3f889377c8..9e74459dadd 100644
--- a/code/game/gamemodes/revolution/revolution.dm
+++ b/code/game/gamemodes/revolution/revolution.dm
@@ -314,6 +314,7 @@
/datum/game_mode/revolution/proc/check_heads_victory()
for(var/datum/mind/rev_mind in head_revolutionaries)
var/turf/T = get_turf(rev_mind.current)
+ // TODO: Tie into space manager
if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && rev_mind.current.client && T && (T.z == ZLEVEL_STATION))
if(ishuman(rev_mind.current))
return 0
@@ -448,4 +449,4 @@
dat += "Revolution Successful: [score_traitorswon ? "Yes" : "No"] (-[score_traitorswon * 10000] Points) "
dat += " "
- return dat
\ No newline at end of file
+ return dat
diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm
index e4f7bc15657..c17a4d057c7 100644
--- a/code/game/gamemodes/sandbox/h_sandbox.dm
+++ b/code/game/gamemodes/sandbox/h_sandbox.dm
@@ -128,7 +128,7 @@ datum/hSB
if("hsbtoolbox")
var/obj/item/weapon/storage/hsb = new/obj/item/weapon/storage/toolbox/mechanical
for(var/obj/item/device/radio/T in hsb)
- del(T)
+ qdel(T)
new/obj/item/weapon/crowbar (hsb)
hsb.loc = usr.loc
if("hsbmedkit")
diff --git a/code/game/gamemodes/scoreboard.dm b/code/game/gamemodes/scoreboard.dm
index 298f71bc991..a8091d04727 100644
--- a/code/game/gamemodes/scoreboard.dm
+++ b/code/game/gamemodes/scoreboard.dm
@@ -21,11 +21,13 @@
// Who is alive/dead, who escaped
for(var/mob/living/silicon/ai/I in mob_list)
+ // TODO: Tie into space manager
if(I.stat == DEAD && (I.z in config.station_levels))
score_deadaipenalty++
score_deadcrew++
for(var/mob/living/carbon/human/I in mob_list)
+ // TODO: Tie into space manager
if(I.stat == DEAD && (I.z in config.station_levels))
score_deadcrew++
@@ -78,7 +80,8 @@
// Check station's power levels
- for(var/obj/machinery/power/apc/A in machines)
+ for(var/obj/machinery/power/apc/A in apcs)
+ // TODO: Tie into space manager
if(!(A.z in config.station_levels)) continue
for(var/obj/item/weapon/stock_parts/cell/C in A.contents)
@@ -88,6 +91,7 @@
// Check how much uncleaned mess is on the station
for(var/obj/effect/decal/cleanable/M in world)
+ // TODO: Tie into space manager
if(!(M.z in config.station_levels)) continue
if(istype(M, /obj/effect/decal/cleanable/blood/gibs))
score_mess += 3
@@ -244,4 +248,4 @@
if(50000 to INFINITY) score_rating = "Nanotrasen's Finest"
dat += "RATING: [score_rating]"
- src << browse(dat, "window=roundstats;size=500x600")
\ No newline at end of file
+ src << browse(dat, "window=roundstats;size=500x600")
diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm
index 5c509c2d26d..15ec89d71a2 100644
--- a/code/game/gamemodes/setupgame.dm
+++ b/code/game/gamemodes/setupgame.dm
@@ -148,102 +148,3 @@
// Populate the syndicate coalition:
for(var/datum/faction/syndicate/S in ticker.factions)
ticker.syndicate_coalition.Add(S)
-
-
-/* This was used for something before, I think, but is not worth the effort to process now.
-/proc/setupcorpses()
- for(var/obj/effect/landmark/A in landmarks_list)
- if(A.name == "Corpse")
- var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
- M.real_name = "Corpse"
- M.death()
- qdel(A)
- continue
- if(A.name == "Corpse-Engineer")
- var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
- M.real_name = "Corpse"
- M.death()
- M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
- M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(M), slot_w_uniform)
- M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
- // M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
- M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow(M), slot_gloves)
- M.equip_to_slot_or_del(new /obj/item/device/t_scanner(M), slot_r_store)
- //M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
- M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/hardhat(M), slot_head)
- else
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/welding(M), slot_head)
- del(A)
- continue
- if(A.name == "Corpse-Engineer-Space")
- var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
- M.real_name = "Corpse"
- M.death()
- M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
- M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen(M), slot_belt)
- M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(M), slot_w_uniform)
- M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
- M.equip_to_slot_or_del(new /obj/item/clothing/suit/space(M), slot_wear_suit)
- // M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
- M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow(M), slot_gloves)
- M.equip_to_slot_or_del(new /obj/item/device/t_scanner(M), slot_r_store)
- M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
- M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/hardhat(M), slot_head)
- else
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/welding(M), slot_head)
- else
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space(M), slot_head)
- del(A)
- continue
- if(A.name == "Corpse-Engineer-Chief")
- var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
- M.real_name = "Corpse"
- M.death()
- M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
- M.equip_to_slot_or_del(new /obj/item/weapon/storage/utilitybelt(M), slot_belt)
- M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chief_engineer(M), slot_w_uniform)
- M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
- // M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
- M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow(M), slot_gloves)
- M.equip_to_slot_or_del(new /obj/item/device/t_scanner(M), slot_r_store)
- M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/hardhat(M), slot_head)
- else
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/welding(M), slot_head)
- del(A)
- continue
- if(A.name == "Corpse-Syndicate")
- var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
- M.real_name = "Corpse"
- M.death()
- M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
- //M.equip_to_slot_or_del(new /obj/item/weapon/gun/revolver(M), slot_belt)
- M.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(M), slot_w_uniform)
- M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
- M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
- M.equip_to_slot_or_del(new /obj/item/weapon/tank/jetpack(M), slot_back)
- M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/syndicate(M), slot_wear_suit)
- if(prob(50))
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/swat(M), slot_head)
- else
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/syndicate(M), slot_head)
- else
- M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(M), slot_wear_suit)
- M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/swat(M), slot_head)
- qdel(A)
- continue
-*/
diff --git a/code/game/gamemodes/steal_items.dm b/code/game/gamemodes/steal_items.dm
index 9c6989cb1b9..fd3ad379fe0 100644
--- a/code/game/gamemodes/steal_items.dm
+++ b/code/game/gamemodes/steal_items.dm
@@ -19,9 +19,6 @@
var/list/all_items = owner.current.get_contents()
for(var/obj/I in all_items) //Check for items
if(istype(I, typepath) && check_special_completion(I))
- //Stealing the cheap autoinjector doesn't count
- if(istype(I, /obj/item/weapon/reagent_containers/hypospray/autoinjector))
- continue
return 1
return 0
@@ -111,7 +108,7 @@ datum/theft_objective/ai/check_special_completion(var/obj/item/device/aicard/C)
/datum/theft_objective/hypospray
name = "a hypospray"
- typepath = /obj/item/weapon/reagent_containers/hypospray
+ typepath = /obj/item/weapon/reagent_containers/hypospray/CMO
protected_jobs = list("Chief Medical Officer")
/datum/theft_objective/ablative
diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm
index 2d8018a3f8e..a0286f7c95b 100644
--- a/code/game/gamemodes/vampire/vampire.dm
+++ b/code/game/gamemodes/vampire/vampire.dm
@@ -10,7 +10,7 @@
config_tag = "vampire"
restricted_jobs = list("AI", "Cyborg")
protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Blueshield", "Nanotrasen Representative", "Security Pod Pilot", "Magistrate", "Chaplain", "Brig Physician", "Internal Affairs Agent", "Nanotrasen Navy Officer", "Special Operations Officer")
- protected_species = list("Machine")
+ protected_species = list("Machine", "Plasmaman")
required_players = 15
required_enemies = 1
recommended_enemies = 4
@@ -273,7 +273,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
owner.attack_log += text("\[[time_stamp()]\] Bit [H] ([H.ckey]) in the neck and draining their blood")
H.attack_log += text("\[[time_stamp()]\] Has been bit in the neck by [owner] ([owner.ckey])")
log_attack("[owner] ([owner.ckey]) bit [H] ([H.ckey]) in the neck")
- owner.visible_message("[owner] bites [H]'s neck!", "You bite [H]'s neck and begin to drain their blood.", "You hear a soft puncture and a wet sucking noise.")
+ owner.visible_message("[owner] grabs [H]'s neck harshly and sinks in their fangs!", "You sink your fangs into [H] and begin to drain their blood.", "You hear a soft puncture and a wet sucking noise.")
if(!iscarbon(owner))
H.LAssailant = null
else
diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm
index b7c1d7920e1..8b9cb6eb0e9 100644
--- a/code/game/gamemodes/wizard/artefact.dm
+++ b/code/game/gamemodes/wizard/artefact.dm
@@ -766,8 +766,8 @@ var/global/list/multiverse = list()
var/obj/item/link = null
var/cooldown_time = 30 //3s
var/cooldown = 0
-
-
+ burntime = 0
+ burn_state = FLAMMABLE
/obj/item/voodoo/attackby(obj/item/I as obj, mob/user as mob, params)
if(target && cooldown < world.time)
diff --git a/code/game/gamemodes/xenos/xenos.dm b/code/game/gamemodes/xenos/xenos.dm
index 37e9b39ce11..4d3fc5bfae8 100644
--- a/code/game/gamemodes/xenos/xenos.dm
+++ b/code/game/gamemodes/xenos/xenos.dm
@@ -122,6 +122,7 @@
command_announcement.Announce("The aliens have nearly succeeded in capturing the station and exterminating the crew. Activate the nuclear failsafe to stop the alien threat once and for all. The Nuclear Authentication Code is [get_nuke_code()] ", "Alien Lifeform Alert")
set_security_level("gamma")
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
+ // TODO: Tie into space manager
if(V && (V.z in config.station_levels))
V.locked = 0
V.update_icon()
@@ -142,6 +143,7 @@
var/list/livingplayers = list()
for(var/mob/M in player_list)
var/turf/T = get_turf(M)
+ // TODO: Tie into space manager
if((M) && (M.stat != 2) && M.client && T && ((T.z in config.station_levels) || shuttle_master.emergency.mode >= SHUTTLE_ESCAPE && ((T.z in config.station_levels) || (T.z in config.admin_levels))))
if(ishuman(M))
livingplayers += 1
@@ -182,4 +184,4 @@
to_chat(world, text)
..()
- return 1
\ No newline at end of file
+ return 1
diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm
index fdf754df57f..b858225caf5 100644
--- a/code/game/jobs/job/security.dm
+++ b/code/game/jobs/job/security.dm
@@ -244,7 +244,7 @@
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_sec(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
- H.equip_or_collect(new /obj/item/clothing/under/rank/security(H), slot_w_uniform)
+ H.equip_or_collect(new /obj/item/clothing/under/rank/security/pod_pilot(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/suit/jacket/pilot(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/device/pda/security(H), slot_wear_pda)
diff --git a/code/game/jobs/job/supervisor.dm b/code/game/jobs/job/supervisor.dm
index 7768cf11870..22c114a0f2c 100644
--- a/code/game/jobs/job/supervisor.dm
+++ b/code/game/jobs/job/supervisor.dm
@@ -39,7 +39,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
L.imp_in = H
L.implanted = 1
H.sec_hud_set_implants()
- captain_announcement.Announce("All hands, captain [H.real_name] on deck!")
+ captain_announcement.Announce("All hands, Captain [H.real_name] on deck!")
callHook("captain_spawned", list("captain" = H))
return 1
@@ -143,7 +143,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
department_flag = KARMA
total_positions = 1
spawn_positions = 1
- supervisors = "the nanotrasen representative"
+ supervisors = "the Nanotrasen representative"
selection_color = "#ddddff"
idtype = /obj/item/weapon/card/id/nanotrasen
req_admin_notify = 1
diff --git a/code/game/jobs/job/support.dm b/code/game/jobs/job/support.dm
index 1de4ecef264..982d2be445f 100644
--- a/code/game/jobs/job/support.dm
+++ b/code/game/jobs/job/support.dm
@@ -339,7 +339,8 @@
equip(var/mob/living/carbon/human/H)
- if(!H) return 0
+ if(!H)
+ return 0
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
@@ -348,12 +349,10 @@
H.equip_or_collect(new /obj/item/clothing/under/suit_jacket/red(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/device/pda/librarian(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes)
- H.equip_or_collect(new /obj/item/weapon/barcodescanner(H), slot_l_hand)
+ H.equip_or_collect(new /obj/item/weapon/storage/bag/books(H), slot_l_hand)
+ H.equip_or_collect(new /obj/item/weapon/barcodescanner(H), slot_r_store)
H.equip_or_collect(new /obj/item/device/laser_pointer(H), slot_l_store)
- if(H.backbag == 1)
- H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
- else
- H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
+ H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
/datum/job/barber
diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm
index 9388942d549..24b233a4b41 100644
--- a/code/game/machinery/PDApainter.dm
+++ b/code/game/machinery/PDApainter.dm
@@ -39,6 +39,11 @@
src.colorlist += D
+/obj/machinery/pdapainter/Destroy()
+ if(storedpda)
+ qdel(storedpda)
+ storedpda = null
+ return ..()
/obj/machinery/pdapainter/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/device/pda))
diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm
index 3ea08ee842c..4c7cd096fc3 100644
--- a/code/game/machinery/alarm.dm
+++ b/code/game/machinery/alarm.dm
@@ -710,7 +710,7 @@
data["rcon"] = rcon_setting
data["target_temp"] = target_temperature - T0C
data["atmos_alarm"] = alarm_area.atmosalm
- data["emagged"] = emagged || isAI(user)
+ data["emagged"] = emagged
data["modes"] = list(
AALARM_MODE_SCRUBBING = list("name"="Filtering", "desc"="Scrubs out contaminants"),\
AALARM_MODE_VENTING = list("name"="Draught", "desc"="Siphons out air while replacing"),\
@@ -769,6 +769,7 @@
var/turf/pos = get_turf(src)
data["x"] = pos.x
data["y"] = pos.y
+ // TODO: Tie into space manager
data["z"] = pos.z
return data
diff --git a/code/game/machinery/atmoalter/area_atmos_computer.dm b/code/game/machinery/atmoalter/area_atmos_computer.dm
index 89cf4cd3610..a75c3afac88 100644
--- a/code/game/machinery/atmoalter/area_atmos_computer.dm
+++ b/code/game/machinery/atmoalter/area_atmos_computer.dm
@@ -113,6 +113,7 @@
scrubber.update_icon()
proc/validscrubber( var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber as obj )
+ // TODO: Tie into space manager
if(!isobj(scrubber) || get_dist(scrubber.loc, src.loc) > src.range || scrubber.loc.z != src.loc.z)
return 0
@@ -176,4 +177,4 @@
if(!found)
status = "ERROR: No scrubber found!"
- src.updateUsrDialog()
\ No newline at end of file
+ src.updateUsrDialog()
diff --git a/code/game/machinery/bees_apiary.dm b/code/game/machinery/bees_apiary.dm
deleted file mode 100644
index ad9fb8795cb..00000000000
--- a/code/game/machinery/bees_apiary.dm
+++ /dev/null
@@ -1,245 +0,0 @@
-//http://www.youtube.com/watch?v=-1GadTfGFvU
-//i could have done these as just an ordinary plant, but fuck it - there would have been too much snowflake code
-
-/obj/machinery/apiary
- name = "apiary tray"
- icon = 'icons/obj/hydroponics.dmi'
- icon_state = "hydrotray3"
- density = 1
- anchored = 1
- var/nutrilevel = 0
- var/yieldmod = 1
- var/mut = 1
- var/toxic = 0
- var/dead = 0
- var/health = -1
- var/maxhealth = 100
- var/lastcycle = 0
- var/cycledelay = 100
- var/harvestable_honey = 0
- var/beezeez = 0
- var/swarming = 0
-
- var/bees_in_hive = 0
- var/list/owned_bee_swarms = list()
- var/hydrotray_type = /obj/machinery/portable_atmospherics/hydroponics
-
-//overwrite this after it's created if the apiary needs a custom machinery sprite
-/obj/machinery/apiary/New()
- ..()
- overlays += image('icons/obj/apiary_bees_etc.dmi', icon_state="apiary")
-
-/obj/machinery/apiary/bullet_act(var/obj/item/projectile/Proj) //Works with the Somatoray to modify plant variables.
- if(istype(Proj ,/obj/item/projectile/energy/floramut))
- mut++
- else if(istype(Proj ,/obj/item/projectile/energy/florayield))
- if(!yieldmod)
- yieldmod += 1
-// to_chat(world, "Yield increased by 1, from 0, to a total of [myseed.yield]")
- else if(prob(1/(yieldmod * yieldmod) *100))//This formula gives you diminishing returns based on yield. 100% with 1 yield, decreasing to 25%, 11%, 6, 4, 2...
- yieldmod += 1
-// to_chat(world, "Yield increased by 1, to a total of [myseed.yield]")
- else
- ..()
- return
-
-/obj/machinery/apiary/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
- if(istype(O, /obj/item/queen_bee))
- if(health > 0)
- to_chat(user, "\red There is already a queen in there.")
- else
- health = 10
- nutrilevel += 10
- user.drop_item()
- del(O)
- to_chat(user, "\blue You carefully insert the queen into [src], she gets busy making a hive.")
- bees_in_hive = 0
- else if(istype(O, /obj/item/beezeez))
- beezeez += 100
- nutrilevel += 10
- user.drop_item()
- if(health > 0)
- to_chat(user, "\blue You insert [O] into [src]. A relaxed humming appears to pick up.")
- else
- to_chat(user, "\blue You insert [O] into [src]. Now it just needs some bees.")
- del(O)
- else if(istype(O, /obj/item/weapon/minihoe))
- if(health > 0)
- to_chat(user, "\red You begin to dislodge the apiary from the tray, the bees don't like that.")
- angry_swarm(user)
- else
- to_chat(user, "\blue You begin to dislodge the dead apiary from the tray.")
- if(do_after(user, 50, target = src))
- new hydrotray_type(src.loc)
- new /obj/item/apiary(src.loc)
- to_chat(user, "\red You dislodge the apiary from the tray.")
- del(src)
- else if(istype(O, /obj/item/weapon/bee_net))
- var/obj/item/weapon/bee_net/N = O
- if(N.caught_bees > 0)
- to_chat(user, "\blue You empty the bees into the apiary.")
- bees_in_hive += N.caught_bees
- N.caught_bees = 0
- else
- to_chat(user, "\blue There are no more bees in the net.")
- else if(istype(O, /obj/item/weapon/reagent_containers/glass))
- var/obj/item/weapon/reagent_containers/glass/G = O
- if(harvestable_honey > 0)
- if(health > 0)
- to_chat(user, "\red You begin to harvest the honey. The bees don't seem to like it.")
- angry_swarm(user)
- else
- to_chat(user, "\blue You begin to harvest the honey.")
- if(do_after(user,50, target = src))
- G.reagents.add_reagent("honey",harvestable_honey)
- harvestable_honey = 0
- to_chat(user, "\blue You successfully harvest the honey.")
- else
- to_chat(user, "\blue There is no honey left to harvest.")
- else
- angry_swarm(user)
- ..()
-
-/obj/machinery/apiary/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
- if(air_group || (height==0)) return 1
-
- if(istype(mover) && mover.checkpass(PASSTABLE))
- return 1
- else
- return 0
-
-/obj/machinery/apiary/process()
-
- if(swarming > 0)
- swarming -= 1
- if(swarming <= 0)
- for(var/mob/living/simple_animal/bee/B in src.loc)
- bees_in_hive += B.strength
- del(B)
- else if(bees_in_hive < 10)
- for(var/mob/living/simple_animal/bee/B in src.loc)
- bees_in_hive += B.strength
- del(B)
-
- if(world.time > (lastcycle + cycledelay))
- lastcycle = world.time
- if(health < 0)
- return
-
- //magical bee formula
- if(beezeez > 0)
- beezeez -= 1
-
- nutrilevel += 2
- health += 1
- toxic = max(0, toxic - 1)
-
- //handle nutrients
- nutrilevel -= bees_in_hive / 10 + owned_bee_swarms.len / 5
- if(nutrilevel > 0)
- bees_in_hive += 1 * yieldmod
- if(health < maxhealth)
- health++
- else
- //nutrilevel is less than 1, so we're effectively subtracting here
- health += max(nutrilevel - 1, round(-health / 2))
- bees_in_hive += max(nutrilevel - 1, round(-bees_in_hive / 2))
- if(owned_bee_swarms.len)
- var/mob/living/simple_animal/bee/B = pick(owned_bee_swarms)
- B.target_turf = get_turf(src)
-
- //clear out some toxins
- if(toxic > 0)
- toxic -= 1
- health -= 1
-
- if(health <= 0)
- return
-
- //make a bit of honey
- if(harvestable_honey < 50)
- harvestable_honey += 0.5
-
- //make some new bees
- if(bees_in_hive >= 10 && prob(bees_in_hive * 10))
- var/mob/living/simple_animal/bee/B = new(get_turf(src), src)
- owned_bee_swarms.Add(B)
- B.mut = mut
- B.toxic = toxic
- bees_in_hive -= 1
-
- //find some plants, harvest
- for(var/obj/machinery/portable_atmospherics/hydroponics/H in view(7, src))
- if(H.seed && !H.dead && prob(owned_bee_swarms.len * 10))
- src.nutrilevel++
- H.nutrilevel++
- if(mut < H.mutation_mod - 1)
- mut = H.mutation_mod - 1
- else if(mut > H.mutation_mod - 1)
- H.mutation_mod = mut
-
- //flowers give us pollen (nutrients)
-/* - All plants should be giving nutrients to the hive.
- if(H.myseed.type == /obj/item/seeds/harebell || H.myseed.type == /obj/item/seeds/sunflowerseed)
- src.nutrilevel++
- H.nutrilevel++
-*/
- //have a few beneficial effects on nearby plants
- if(prob(10))
- H.lastcycle -= 5
- if(prob(10))
- H.seed.lifespan = max(initial(H.seed.lifespan) * 1.5, H.seed.lifespan + 1)
- if(prob(10))
- H.seed.endurance = max(initial(H.seed.endurance) * 1.5, H.seed.endurance + 1)
- if(H.toxins && prob(10))
- H.toxins = min(0, H.toxins - 1)
- toxic++
-
-/obj/machinery/apiary/proc/die()
- if(owned_bee_swarms.len)
- var/mob/living/simple_animal/bee/B = pick(owned_bee_swarms)
- B.target_turf = get_turf(src)
- B.strength -= 1
- if(B.strength <= 0)
- del(B)
- else if(B.strength <= 5)
- B.icon_state = "bees[B.strength]"
- bees_in_hive = 0
- health = 0
-
-/obj/machinery/apiary/proc/angry_swarm(var/mob/M)
- for(var/mob/living/simple_animal/bee/B in owned_bee_swarms)
- B.feral = 25
- B.target_mob = M
-
- swarming = 25
-
- while(bees_in_hive > 0)
- var/spawn_strength = bees_in_hive
- if(bees_in_hive >= 5)
- spawn_strength = 6
-
- var/mob/living/simple_animal/bee/B = new(get_turf(src), src)
- B.target_mob = M
- B.strength = spawn_strength
- B.feral = 25
- B.mut = mut
- B.toxic = toxic
- bees_in_hive -= spawn_strength
-
-/obj/machinery/apiary/verb/harvest_honeycomb()
- set src in oview(1)
- set name = "Harvest honeycomb"
- set category = "Object"
-
- if(usr.stat || !usr.canmove || usr.restrained())
- return
-
- while(health > 15)
- health -= 15
- var/obj/item/weapon/reagent_containers/food/snacks/honeycomb/H = new(src.loc)
- if(toxic > 0)
- H.reagents.add_reagent("toxin", toxic)
-
- to_chat(usr, "\blue You harvest the honeycomb from the hive. There is a wild buzzing!")
- angry_swarm(usr)
diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm
index aa32db20688..cccc7e52f91 100644
--- a/code/game/machinery/camera/tracking.dm
+++ b/code/game/machinery/camera/tracking.dm
@@ -1,6 +1,7 @@
/mob/living/silicon/ai/proc/InvalidTurf(turf/T as turf)
if(!T)
return 1
+ // TODO: Tie into space manager
if((T.z in config.admin_levels))
return 1
if(T.z > MAX_Z)
diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm
index 81b2c6b86a4..a9b1e3ff31c 100644
--- a/code/game/machinery/computer/camera.dm
+++ b/code/game/machinery/computer/camera.dm
@@ -75,6 +75,7 @@
var/list/cameras = list()
for(var/obj/machinery/camera/C in cameranet.cameras)
+ // TODO: Tie into space manager
if((z > MAX_Z || C.z > MAX_Z) && (C.z != z)) //can only recieve away mission cameras on away missions
continue
if(!can_access_camera(C))
@@ -313,4 +314,4 @@
icon_keyboard = "power_key"
icon_screen = "engie_cams"
light_color = "#FAC54B"
- network = list("Power Alarms","Atmosphere Alarms","Fire Alarms")
\ No newline at end of file
+ network = list("Power Alarms","Atmosphere Alarms","Fire Alarms")
diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm
index e87802f728c..790c516fc95 100644
--- a/code/game/machinery/computer/communications.dm
+++ b/code/game/machinery/computer/communications.dm
@@ -54,6 +54,7 @@
if(..(href, href_list))
return 1
+ // TODO: Tie into space manager
if((!(src.z in config.station_levels) && !(src.z in config.admin_levels)))
to_chat(usr, "Unable to establish a connection: You're too far away from the station!")
return 1
@@ -303,6 +304,7 @@
if(stat & (NOPOWER|BROKEN))
return
+ // TODO: Tie into space manager
if(!(src.z in list(ZLEVEL_STATION, ZLEVEL_CENTCOMM)))
to_chat(user, "Unable to establish a connection: You're too far away from the station!")
return
diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm
index 1cb4ba64b02..d50bdbb8bc5 100644
--- a/code/game/machinery/computer/computer.dm
+++ b/code/game/machinery/computer/computer.dm
@@ -14,7 +14,6 @@
var/light_range_on = 2
var/light_power_on = 1
var/overlay_layer
- atom_say_verb = "beeps"
/obj/machinery/computer/New()
overlay_layer = layer
diff --git a/code/game/machinery/computer/honkputer.dm b/code/game/machinery/computer/honkputer.dm
index 2f26663395e..75880d41975 100644
--- a/code/game/machinery/computer/honkputer.dm
+++ b/code/game/machinery/computer/honkputer.dm
@@ -20,6 +20,7 @@
/obj/machinery/computer/HONKputer/Topic(href, href_list)
if(..())
return 1
+ // TODO: Tie into space manager
if(!(src.z in config.station_levels))
to_chat(usr, "Unable to establish a connection: You're too far away from the station!")
return
@@ -68,7 +69,8 @@
/obj/machinery/computer/HONKputer/attack_hand(var/mob/user as mob)
if(..())
return
- if(src.z > 6)
+ // TODO: Tie into space manager
+ if(src.z > ZLEVEL_DERELICT)
to_chat(user, "Unable to establish a connection: You're too far away from the station!")
return
diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm
index d50edbfd0cb..a6f1a0e6c26 100644
--- a/code/game/machinery/computer/law.dm
+++ b/code/game/machinery/computer/law.dm
@@ -29,7 +29,8 @@
attackby(obj/item/weapon/O as obj, mob/user as mob, params)
- if(user.z > 6)
+ // TODO: Tie into space manager
+ if(user.z > ZLEVEL_DERELICT)
to_chat(user, "Unable to establish a connection: You're too far away from the station!")
return
if(istype(O, /obj/item/weapon/aiModule))
diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm
index 38e6c139f2e..84b467d2072 100644
--- a/code/game/machinery/computer/pod.dm
+++ b/code/game/machinery/computer/pod.dm
@@ -43,7 +43,7 @@
loopings += ident_tag
loopings[ident_tag] = 0
break
- for(var/obj/machinery/door/poddoor/M in world)
+ for(var/obj/machinery/door/poddoor/M in airlocks)
if(M.z != src.z) continue
for(var/ident_tag in id_tags)
if((M.id_tag == ident_tag) && !(ident_tag in synced) && !(ident_tag in door_only_tags))
@@ -69,7 +69,7 @@
loopings[ident_tag] = 0
break
if(!(ident_tag in synced))
- for(var/obj/machinery/door/poddoor/M in world)
+ for(var/obj/machinery/door/poddoor/M in airlocks)
if(M.z != src.z) continue
if((M.id_tag == ident_tag) && !(ident_tag in synced) && !(ident_tag in door_only_tags))
door_only_tags += ident_tag
@@ -90,7 +90,7 @@
visible_message("Cannot locate any mass driver of that ID. Cancelling firing sequence!")
return
- for(var/obj/machinery/door/poddoor/M in world)
+ for(var/obj/machinery/door/poddoor/M in airlocks)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
spawn()
@@ -104,7 +104,7 @@
M.drive()
sleep(50)
- for(var/obj/machinery/door/poddoor/M in world)
+ for(var/obj/machinery/door/poddoor/M in airlocks)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
spawn()
@@ -242,7 +242,7 @@
maxtimes[ident_tag] = min(max(round(maxtimes[ident_tag]), 0), 120)
if(href_list["door"])
var/ident_tag = href_list["driver"]
- for(var/obj/machinery/door/poddoor/M in world)
+ for(var/obj/machinery/door/poddoor/M in airlocks)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
spawn()
@@ -315,7 +315,7 @@
P.failchance = 0//So it has no fail chance when teleporting.
spawn_marauder.Remove(P.target)
- for(var/obj/machinery/door/poddoor/M in world)
+ for(var/obj/machinery/door/poddoor/M in airlocks)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
spawn()
@@ -328,7 +328,7 @@
M.drive()
sleep(50)
- for(var/obj/machinery/door/poddoor/M in world)
+ for(var/obj/machinery/door/poddoor/M in airlocks)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
spawn()
diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm
index ebc0db47c32..e3683361ef2 100644
--- a/code/game/machinery/computer/prisoner.dm
+++ b/code/game/machinery/computer/prisoner.dm
@@ -65,6 +65,7 @@
health_display = "DEAD"
else if(total_loss)
health_display = "HURT ([total_loss])"
+ // TODO: Tie into space manager
if((M.z in config.station_levels) && !istype(M.loc, /turf/space))
loc_display = "[get_area(M)]"
dat += "ID: [T.id] Subject: [M] Location: [loc_display] Health: [health_display] "
diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm
index 7ab400823b1..c7c23dbc724 100644
--- a/code/game/machinery/computer/security.dm
+++ b/code/game/machinery/computer/security.dm
@@ -41,11 +41,12 @@
/obj/machinery/computer/secure_data/attack_hand(mob/user as mob)
if(..())
return
- if(src.z > 6)
+ // TODO: Tie into space manager
+ if(src.z > ZLEVEL_DERELICT)
to_chat(user, "Unable to establish a connection: You're too far away from the station!")
return
var/dat
-
+
// search javascript
var/head_content = {"
@@ -89,7 +90,7 @@
//body tag start + onload and onkeypress (onkeyup) javascript event calls
dat += ""
-
+
dat += {"
"}
dat += text("New Record ", src)
diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm
index 2f039841cc3..7c0680f26d3 100644
--- a/code/game/machinery/computer/skills.dm
+++ b/code/game/machinery/computer/skills.dm
@@ -40,7 +40,9 @@
/obj/machinery/computer/skills/attack_hand(mob/user as mob)
if(..())
return
- if(src.z > 6)
+
+ // TODO: Tie into space manager
+ if(src.z > ZLEVEL_DERELICT)
to_chat(user, "Unable to establish a connection: You're too far away from the station!")
return
var/dat
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index 257c583814b..727f4d77d8c 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -174,7 +174,9 @@
var/mob/living/occupant = null // Person waiting to be despawned.
var/orient_right = null // Flips the sprite.
- var/time_till_despawn = 9000 // 15 minutes-ish safe period before being despawned.
+ // 15 minutes-ish safe period before being despawned.
+ var/time_till_despawn = 9000 // This is reduced by 90% if a player manually enters cryo
+ var/willing_time_divisor = 10
var/time_entered = 0 // Used to keep track of the safe period.
var/obj/item/device/radio/intercom/announce //
@@ -335,7 +337,7 @@
job_master.FreeRole(job)
if(occupant.mind.objectives.len)
- qdel(occupant.mind.objectives)
+ occupant.mind.objectives.Cut()
occupant.mind.special_role = null
else
if(ticker.mode.name == "AutoTraitor")
@@ -382,7 +384,12 @@
announce.autosay("[occupant.real_name] [on_store_message]", "[on_store_name]")
visible_message("\The [src] hums and hisses as it moves [occupant.real_name] into storage.")
- // Delete the mob.
+ // Ghost and delete the mob.
+ if(!occupant.get_ghost(1))
+ if(TOO_EARLY_TO_GHOST)
+ occupant.ghostize(0) // Players despawned too early may not re-enter the game
+ else
+ occupant.ghostize(1)
qdel(occupant)
occupant = null
name = initial(name)
@@ -404,6 +411,7 @@
var/willing = null //We don't want to allow people to be forced into despawning.
var/mob/living/M = G:affecting
+ time_till_despawn = initial(time_till_despawn)
if(!istype(M) || M.stat == DEAD)
to_chat(user, "Dead people can not be put into cryo.")
@@ -412,7 +420,7 @@
if(M.client)
if(alert(M,"Would you like to enter long-term storage?",,"Yes","No") == "Yes")
if(!M || !G || !G:affecting) return
- willing = 1
+ willing = willing_time_divisor
else
willing = 1
@@ -433,6 +441,8 @@
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
+ time_till_despawn = initial(time_till_despawn) / willing
+
else //because why the fuck would you keep going if the mob isn't in the pod
to_chat(user, "You stop putting [M] into the cryopod.")
return
@@ -458,7 +468,7 @@
// Book keeping!
log_admin("[key_name(M)] has entered a stasis pod.")
- message_admins("[key_name_admin(user)] has entered a stasis pod. (JMP)")
+ message_admins("[key_name_admin(M)] has entered a stasis pod. (JMP)")
//Despawning occurs when process() is called with an occupant without a client.
src.add_fingerprint(M)
@@ -502,11 +512,12 @@
var/willing = null //We don't want to allow people to be forced into despawning.
+ time_till_despawn = initial(time_till_despawn)
if(L.client)
if(alert(L,"Would you like to enter cryosleep?",,"Yes","No") == "Yes")
if(!L) return
- willing = 1
+ willing = willing_time_divisor
else
willing = 1
@@ -523,6 +534,7 @@
to_chat(user, "\The [src] is in use.")
return
L.loc = src
+ time_till_despawn = initial(time_till_despawn) / willing
if(L.client)
L.client.perspective = EYE_PERSPECTIVE
@@ -622,6 +634,7 @@
usr.client.eye = src
usr.loc = src
src.occupant = usr
+ time_till_despawn = initial(time_till_despawn) / willing_time_divisor
if(orient_right)
icon_state = "[occupied_icon_state]-r"
diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm
index a0f6c9a08ce..f952f8f2bc3 100644
--- a/code/game/machinery/door_control.dm
+++ b/code/game/machinery/door_control.dm
@@ -109,7 +109,7 @@
D.safe = 1
else
- for(var/obj/machinery/door/poddoor/M in world)
+ for(var/obj/machinery/door/poddoor/M in airlocks)
if(M.id_tag == src.id)
if(M.density)
spawn( 0 )
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 394f29a1ccf..7248a5e1022 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -980,7 +980,7 @@ About the new airlock wires panel:
wires = new(src)
if(src.closeOtherId != null)
spawn (5)
- for(var/obj/machinery/door/airlock/A in world)
+ for(var/obj/machinery/door/airlock/A in airlocks)
if(A.closeOtherId == src.closeOtherId && A != src)
src.closeOther = A
break
@@ -1069,4 +1069,23 @@ About the new airlock wires panel:
src.unlock()
src.open()
src.lock()
- return
+
+/obj/machinery/door/airlock/hostile_lockdown(mob/origin)
+ // Must be powered and have working AI wire.
+ if(canAIControl(src) && !stat)
+ locked = FALSE //For airlocks that were bolted open.
+ safe = FALSE //DOOR CRUSH
+ close()
+ lock() //Bolt it!
+ electrified_until = -1 //Shock it!
+ if(origin)
+ shockedby += "\[[time_stamp()]\][origin](ckey:[origin.ckey])"
+
+
+/obj/machinery/door/airlock/disable_lockdown()
+ // Must be powered and have working AI wire.
+ if(canAIControl(src) && !stat)
+ unlock()
+ electrified_until = 0
+ open()
+ safe = TRUE
\ No newline at end of file
diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm
index 9c4d881f378..e33d3e4d9c4 100644
--- a/code/game/machinery/doors/airlock_control.dm
+++ b/code/game/machinery/doors/airlock_control.dm
@@ -10,8 +10,7 @@ obj/machinery/door/airlock
obj/machinery/door/airlock/process()
if(arePowerSystemsOn() && cur_command)
- spawn()
- execute_current_command()
+ execute_current_command()
else
return PROCESS_KILL
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 6c9537667fb..8c5a1fd85fc 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -301,3 +301,11 @@
/obj/machinery/door/morgue
icon = 'icons/obj/doors/doormorgue.dmi'
+
+/obj/machinery/door/proc/hostile_lockdown(mob/origin)
+ if(!stat) //So that only powered doors are closed.
+ close() //Close ALL the doors!
+
+/obj/machinery/door/proc/disable_lockdown()
+ if(!stat) //Opens only powered doors.
+ open() //Open everything!
\ No newline at end of file
diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm
index cbb9aabd20f..777c2c1bfd5 100644
--- a/code/game/machinery/doppler_array.dm
+++ b/code/game/machinery/doppler_array.dm
@@ -7,6 +7,7 @@ var/list/doppler_arrays = list()
icon_state = "tdoppler"
density = 1
anchored = 1
+ atom_say_verb = "states coldly"
/obj/machinery/doppler_array/New()
..()
@@ -74,9 +75,8 @@ var/list/doppler_arrays = list()
if(devastation_range < orig_dev_range || heavy_impact_range < orig_heavy_range || light_impact_range < orig_light_range)
messages += "Theoretical: Epicenter radius: [orig_dev_range]. Outer radius: [orig_heavy_range]. Shockwave radius: [orig_light_range]."
- for(var/mob/O in hearers(src, null))
- for(var/message in messages)
- O.show_message("[src] states coldly, \"[message]\"",2)
+ for(var/message in messages)
+ atom_say(message)
/obj/machinery/doppler_array/power_change()
diff --git a/code/game/machinery/drying_rack.dm b/code/game/machinery/drying_rack.dm
deleted file mode 100644
index 9ec3974483f..00000000000
--- a/code/game/machinery/drying_rack.dm
+++ /dev/null
@@ -1,105 +0,0 @@
-/obj/machinery/drying_rack
- name = "drying rack"
- desc = "A large rack with a heater built into the base. Used for drying things out."
- icon = 'icons/obj/hydroponics.dmi'
- icon_state = "drying_rack"
- layer = 2.9
- density = 1
- anchored = 1
- use_power = 1
- idle_power_usage = 5
- active_power_usage = 50
- var/list/accepted = list()
- var/running = 0
- var/volume = 100
-
-/obj/machinery/drying_rack/New()
- ..()
- flags |= NOREACT
- create_reagents(volume)
- accepted = list(/obj/item/weapon/reagent_containers/food/snacks/grown/coffee_arabica,
- /obj/item/weapon/reagent_containers/food/snacks/grown/coffee_robusta,
- /obj/item/weapon/reagent_containers/food/snacks/grown/tobacco,
- /obj/item/weapon/reagent_containers/food/snacks/grown/tobacco_space,
- /obj/item/weapon/reagent_containers/food/snacks/grown/tea_aspera,
- /obj/item/weapon/reagent_containers/food/snacks/grown/tea_astra,
- /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris,
- /obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiadeus,
- /obj/item/weapon/reagent_containers/food/snacks/meat,
- /obj/item/weapon/reagent_containers/food/snacks/grown/grapes,
- /obj/item/weapon/reagent_containers/food/snacks/grown/greengrapes)
-
-
-
-/obj/machinery/drying_rack/attackby(var/obj/item/W as obj, var/mob/user as mob, params)
- if(is_type_in_list(W,accepted))
- if(!running)
- if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/meat))
- user.unEquip(W)
- del(W)
- to_chat(user, "You add the meat to the drying rack.")
- src.running = 1
- use_power = 2
- icon_state = "drying_rack_on"
- sleep(60)
- icon_state = "drying_rack"
- new /obj/item/weapon/reagent_containers/food/snacks/sosjerky(src.loc)
- use_power = 1
- src.running = 0
- return
- if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/grown/grapes))
- user.unEquip(W)
- del(W)
- to_chat(user, "You add the grapes to the drying rack.")
- src.running = 1
- use_power = 2
- icon_state = "drying_rack_on"
- sleep(60)
- icon_state = "drying_rack"
- new /obj/item/weapon/reagent_containers/food/snacks/no_raisin(src.loc)
- use_power = 1
- src.running = 0
- return
- if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/grown/greengrapes))
- user.unEquip(W)
- del(W)
- to_chat(user, "You add the green grapes to the drying rack.")
- src.running = 1
- use_power = 2
- icon_state = "drying_rack_on"
- sleep(60)
- icon_state = "drying_rack"
- new /obj/item/weapon/reagent_containers/food/snacks/no_raisin(src.loc)
- use_power = 1
- src.running = 0
- return
- else
- if(W:dry == 0)
- var/J = W.type
- var/obj/item/weapon/reagent_containers/food/snacks/grown/B = W
- B.reagents.trans_to(src, B.reagents.total_volume)
- to_chat(user, "You add the [W] to the drying rack.")
- user.unEquip(W)
- del(W)
- src.running = 1
- use_power = 2
- icon_state = "drying_rack_on"
- sleep(60)
- icon_state = "drying_rack"
- var/obj/item/weapon/reagent_containers/food/snacks/grown/D = new J(src.loc)
- to_chat(user, "\blue You finish drying the [D]")
- D.icon_state = "[D.icon_state]_dry"
- D.dry = 1
- D.reagents.remove_any(50)
- src.reagents.trans_to(D, src.reagents.total_volume)
- use_power = 1
- src.running = 0
- return
- else
- to_chat(user, "\red That has already been dried!")
- else
- to_chat(user, "\red Please wait until the last item has dried.")
- else
- to_chat(user, "\red You cannot add that to the drying rack.")
-
-
diff --git a/code/game/machinery/embedded_controller/airlock_docking_controller.dm b/code/game/machinery/embedded_controller/airlock_docking_controller.dm
deleted file mode 100644
index e94a975b91f..00000000000
--- a/code/game/machinery/embedded_controller/airlock_docking_controller.dm
+++ /dev/null
@@ -1,180 +0,0 @@
-//a docking port based on an airlock
-/obj/machinery/embedded_controller/radio/airlock/docking_port
- name = "docking port controller"
- var/datum/computer/file/embedded_program/airlock/docking/airlock_program
- var/datum/computer/file/embedded_program/docking/airlock/docking_program
- tag_secure = 1
-
-/obj/machinery/embedded_controller/radio/airlock/docking_port/initialize()
- ..()
- airlock_program = new/datum/computer/file/embedded_program/airlock/docking(src)
- docking_program = new/datum/computer/file/embedded_program/docking/airlock(src, airlock_program)
- program = docking_program
-
-/obj/machinery/embedded_controller/radio/airlock/docking_port/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
- var/data[0]
-
- data = list(
- "chamber_pressure" = round(airlock_program.memory["chamber_sensor_pressure"]),
- "exterior_status" = airlock_program.memory["exterior_status"],
- "interior_status" = airlock_program.memory["interior_status"],
- "processing" = airlock_program.memory["processing"],
- "docking_status" = docking_program.get_docking_status(),
- "airlock_disabled" = !(docking_program.undocked() || docking_program.override_enabled),
- "override_enabled" = docking_program.override_enabled,
- )
-
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
-
- if(!ui)
- ui = new(user, src, ui_key, "docking_airlock_console.tmpl", name, 470, 290)
- ui.set_initial_data(data)
- ui.open()
- ui.set_auto_update(1)
-
-/obj/machinery/embedded_controller/radio/airlock/docking_port/Topic(href, href_list)
- if(..())
- return
-
- usr.set_machine(src)
- src.add_fingerprint(usr)
-
- var/clean = 0
- switch(href_list["command"]) //anti-HTML-hacking checks
- if("cycle_ext")
- clean = 1
- if("cycle_int")
- clean = 1
- if("force_ext")
- clean = 1
- if("force_int")
- clean = 1
- if("abort")
- clean = 1
- if("toggle_override")
- clean = 1
-
- if(clean)
- program.receive_user_command(href_list["command"])
-
- return 1
-
-
-
-//A docking controller for an airlock based docking port
-/datum/computer/file/embedded_program/docking/airlock
- var/datum/computer/file/embedded_program/airlock/docking/airlock_program
-
-/datum/computer/file/embedded_program/docking/airlock/New(var/obj/machinery/embedded_controller/M, var/datum/computer/file/embedded_program/airlock/docking/A)
- ..(M)
- airlock_program = A
- airlock_program.master_prog = src
-
-/datum/computer/file/embedded_program/docking/airlock/receive_user_command(command)
- if(command == "toggle_override")
- if(override_enabled)
- disable_override()
- else
- enable_override()
- return
-
- ..(command)
- airlock_program.receive_user_command(command) //pass along to subprograms
-
-/datum/computer/file/embedded_program/docking/airlock/process()
- airlock_program.process()
- ..()
-
-/datum/computer/file/embedded_program/docking/airlock/receive_signal(datum/signal/signal, receive_method, receive_param)
- airlock_program.receive_signal(signal, receive_method, receive_param) //pass along to subprograms
- ..(signal, receive_method, receive_param)
-
-//tell the docking port to start getting ready for docking - e.g. pressurize
-/datum/computer/file/embedded_program/docking/airlock/prepare_for_docking()
- airlock_program.begin_cycle_in()
-
-//are we ready for docking?
-/datum/computer/file/embedded_program/docking/airlock/ready_for_docking()
- return airlock_program.done_cycling()
-
-//we are docked, open the doors or whatever.
-/datum/computer/file/embedded_program/docking/airlock/finish_docking()
- airlock_program.enable_mech_regulators()
- airlock_program.open_doors()
-
-//tell the docking port to start getting ready for undocking - e.g. close those doors.
-/datum/computer/file/embedded_program/docking/airlock/prepare_for_undocking()
- airlock_program.stop_cycling()
- airlock_program.close_doors()
- airlock_program.disable_mech_regulators()
-
-//are we ready for undocking?
-/datum/computer/file/embedded_program/docking/airlock/ready_for_undocking()
- var/ext_closed = airlock_program.check_exterior_door_secured()
- var/int_closed = airlock_program.check_interior_door_secured()
- return (ext_closed || int_closed)
-
-//An airlock controller to be used by the airlock-based docking port controller.
-//Same as a regular airlock controller but allows disabling of the regular airlock functions when docking
-/datum/computer/file/embedded_program/airlock/docking
- var/datum/computer/file/embedded_program/docking/airlock/master_prog
-
-/datum/computer/file/embedded_program/airlock/docking/receive_user_command(command)
- if(master_prog.undocked() || master_prog.override_enabled) //only allow the port to be used as an airlock if nothing is docked here or the override is enabled
- ..(command)
-
-/datum/computer/file/embedded_program/airlock/docking/proc/enable_mech_regulators()
- enable_mech_regulation()
-
-/datum/computer/file/embedded_program/airlock/docking/proc/disable_mech_regulators()
- disable_mech_regulation()
-
-/datum/computer/file/embedded_program/airlock/docking/proc/open_doors()
- toggleDoor(memory["interior_status"], tag_interior_door, memory["secure"], "open")
- toggleDoor(memory["exterior_status"], tag_exterior_door, memory["secure"], "open")
-
-/datum/computer/file/embedded_program/airlock/docking/cycleDoors(var/target)
- if(master_prog.undocked() || master_prog.override_enabled) //only allow the port to be used as an airlock if nothing is docked here or the override is enabled
- ..(target)
-
-/*** DEBUG VERBS ***
-
-/datum/computer/file/embedded_program/docking/proc/print_state()
- to_chat(world, "id_tag: [id_tag]")
- to_chat(world, "dock_state: [dock_state]")
- to_chat(world, "control_mode: [control_mode]")
- to_chat(world, "tag_target: [tag_target]")
- to_chat(world, "response_sent: [response_sent]")
-
-/datum/computer/file/embedded_program/docking/post_signal(datum/signal/signal, comm_line)
- to_chat(world, "Program [id_tag] sent a message!")
- print_state()
- to_chat(world, "[id_tag] sent command \"[signal.data["command"]]\" to \"[signal.data["recipient"]]\"")
- ..(signal)
-
-/obj/machinery/embedded_controller/radio/airlock/docking_port/verb/view_state()
- set category = "Debug"
- set src in view(1)
- src.program:print_state()
-
-/obj/machinery/embedded_controller/radio/airlock/docking_port/verb/spoof_signal(var/command as text, var/sender as text)
- set category = "Debug"
- set src in view(1)
- var/datum/signal/signal = new
- signal.data["tag"] = sender
- signal.data["command"] = command
- signal.data["recipient"] = id_tag
-
- src.program:receive_signal(signal)
-
-/obj/machinery/embedded_controller/radio/airlock/docking_port/verb/debug_init_dock(var/target as text)
- set category = "Debug"
- set src in view(1)
- src.program:initiate_docking(target)
-
-/obj/machinery/embedded_controller/radio/airlock/docking_port/verb/debug_init_undock()
- set category = "Debug"
- set src in view(1)
- src.program:initiate_undocking()
-
-*/
\ No newline at end of file
diff --git a/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm b/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm
deleted file mode 100644
index 8eeb93b8a8e..00000000000
--- a/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm
+++ /dev/null
@@ -1,153 +0,0 @@
-//a controller for a docking port with multiple independent airlocks
-//this is the master controller, that things will try to dock with.
-/obj/machinery/embedded_controller/radio/docking_port_multi
- name = "docking port controller"
-
- var/child_tags_txt
- var/child_names_txt
- var/list/child_names = list()
-
- var/datum/computer/file/embedded_program/docking/multi/docking_program
-
-/obj/machinery/embedded_controller/radio/docking_port_multi/initialize()
- ..()
- docking_program = new/datum/computer/file/embedded_program/docking/multi(src)
- program = docking_program
-
- var/list/names = splittext(child_names_txt, ";")
- var/list/tags = splittext(child_tags_txt, ";")
-
- if(names.len == tags.len)
- for(var/i = 1; i <= tags.len; i++)
- child_names[tags[i]] = names[i]
-
-
-/obj/machinery/embedded_controller/radio/docking_port_multi/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
- var/data[0]
-
- var/list/airlocks[child_names.len]
- var/i = 1
- for(var/child_tag in child_names)
- airlocks[i++] = list("name"=child_names[child_tag], "override_enabled"=(docking_program.children_override[child_tag] == "enabled"))
-
- data = list(
- "docking_status" = docking_program.get_docking_status(),
- "airlocks" = airlocks,
- )
-
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
-
- if(!ui)
- ui = new(user, src, ui_key, "multi_docking_console.tmpl", name, 470, 290)
- ui.set_initial_data(data)
- ui.open()
- ui.set_auto_update(1)
-
-/obj/machinery/embedded_controller/radio/docking_port_multi/Topic(href, href_list)
- return
-
-
-
-//a docking port based on an airlock
-/obj/machinery/embedded_controller/radio/airlock/docking_port_multi
- name = "docking port controller"
- var/master_tag //for mapping
- var/datum/computer/file/embedded_program/airlock/multi_docking/airlock_program
- tag_secure = 1
-
-/obj/machinery/embedded_controller/radio/airlock/docking_port_multi/initialize()
- ..()
- airlock_program = new/datum/computer/file/embedded_program/airlock/multi_docking(src)
- program = airlock_program
-
-/obj/machinery/embedded_controller/radio/airlock/docking_port_multi/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
- var/data[0]
-
- data = list(
- "chamber_pressure" = round(airlock_program.memory["chamber_sensor_pressure"]),
- "exterior_status" = airlock_program.memory["exterior_status"],
- "interior_status" = airlock_program.memory["interior_status"],
- "processing" = airlock_program.memory["processing"],
- "docking_status" = airlock_program.master_status,
- "airlock_disabled" = (airlock_program.docking_enabled && !airlock_program.override_enabled),
- "override_enabled" = airlock_program.override_enabled,
- )
-
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
-
- if(!ui)
- ui = new(user, src, ui_key, "docking_airlock_console.tmpl", name, 470, 290)
- ui.set_initial_data(data)
- ui.open()
- ui.set_auto_update(1)
-
-/obj/machinery/embedded_controller/radio/airlock/docking_port_multi/Topic(href, href_list)
- if(..())
- return
-
- usr.set_machine(src)
- src.add_fingerprint(usr)
-
- var/clean = 0
- switch(href_list["command"]) //anti-HTML-hacking checks
- if("cycle_ext")
- clean = 1
- if("cycle_int")
- clean = 1
- if("force_ext")
- clean = 1
- if("force_int")
- clean = 1
- if("abort")
- clean = 1
- if("toggle_override")
- clean = 1
-
- if(clean)
- program.receive_user_command(href_list["command"])
-
- return 1
-
-
-
-/*** DEBUG VERBS ***
-
-/datum/computer/file/embedded_program/docking/multi/proc/print_state()
- to_chat(world, "id_tag: [id_tag]")
- to_chat(world, "dock_state: [dock_state]")
- to_chat(world, "control_mode: [control_mode]")
- to_chat(world, "tag_target: [tag_target]")
- to_chat(world, "response_sent: [response_sent]")
-
-/datum/computer/file/embedded_program/docking/multi/post_signal(datum/signal/signal, comm_line)
- to_chat(world, "Program [id_tag] sent a message!")
- print_state()
- to_chat(world, "[id_tag] sent command \"[signal.data["command"]]\" to \"[signal.data["recipient"]]\"")
- ..(signal)
-
-/obj/machinery/embedded_controller/radio/docking_port_multi/verb/view_state()
- set category = "Debug"
- set src in view(1)
- src.program:print_state()
-
-/obj/machinery/embedded_controller/radio/docking_port_multi/verb/spoof_signal(var/command as text, var/sender as text)
- set category = "Debug"
- set src in view(1)
- var/datum/signal/signal = new
- signal.data["tag"] = sender
- signal.data["command"] = command
- signal.data["recipient"] = id_tag
-
- src.program:receive_signal(signal)
-
-/obj/machinery/embedded_controller/radio/docking_port_multi/verb/debug_init_dock(var/target as text)
- set category = "Debug"
- set src in view(1)
- src.program:initiate_docking(target)
-
-/obj/machinery/embedded_controller/radio/docking_port_multi/verb/debug_init_undock()
- set category = "Debug"
- set src in view(1)
- src.program:initiate_undocking()
-
-*/
diff --git a/code/game/machinery/embedded_controller/docking_program.dm b/code/game/machinery/embedded_controller/docking_program.dm
deleted file mode 100644
index 725ec6a337b..00000000000
--- a/code/game/machinery/embedded_controller/docking_program.dm
+++ /dev/null
@@ -1,286 +0,0 @@
-
-#define STATE_UNDOCKED 0
-#define STATE_DOCKING 1
-#define STATE_UNDOCKING 2
-#define STATE_DOCKED 3
-
-#define MODE_NONE 0
-#define MODE_SERVER 1
-#define MODE_CLIENT 2 //The one who initiated the docking, and who can initiate the undocking. The server cannot initiate undocking, and is the one responsible for deciding to accept a docking request and signals when docking and undocking is complete. (Think server == station, client == shuttle)
-
-#define MESSAGE_RESEND_TIME 5 //how long (in seconds) do we wait before resending a message
-
-/*
- *** STATE TABLE ***
-
- MODE_CLIENT|STATE_UNDOCKED sent a request for docking and now waiting for a reply.
- MODE_CLIENT|STATE_DOCKING server told us they are OK to dock, waiting for our docking port to be ready.
- MODE_CLIENT|STATE_DOCKED idle - docked as client.
- MODE_CLIENT|STATE_UNDOCKING we are either waiting for our docking port to be ready or for the server to give us the OK to finish undocking.
-
- MODE_SERVER|STATE_UNDOCKED should never happen.
- MODE_SERVER|STATE_DOCKING someone requested docking, we are waiting for our docking port to be ready.
- MODE_SERVER|STATE_DOCKED idle - docked as server
- MODE_SERVER|STATE_UNDOCKING client requested undocking, we are waiting for our docking port to be ready.
-
- MODE_NONE|STATE_UNDOCKED idle - not docked.
- MODE_NONE|anything else should never happen.
-
- *** Docking Signals ***
-
- Docking
- Client sends request_dock
-
- Server sends confirm_dock to say that yes, we will serve your request
- When client is ready, sends confirm_dock
- Server sends confirm_dock back to indicate that docking is complete
-
- Undocking
- Client sends request_undock
- When client is ready, sends confirm_undock
- Server sends confirm_undock back to indicate that docking is complete
-
- Note that in both cases each side exchanges confirm_dock before the docking operation is considered done.
- The client first sends a confirm message to indicate it is ready, and then finally the server will send it's
- confirm message to indicate that the operation is complete.
-
- Note also that when docking, the server sends an additional confirm message. This is because before docking,
- the server and client do not have a defined relationship. Before undocking, the server and client are already
- related to each other, thus the extra confirm message is not needed.
-
- *** Override, what is it? ***
-
- The purpose of enabling the override is to prevent the docking program from automatically doing things with the docking port when docking or undocking.
- Maybe the shuttle is full of plasma for some reason, and you don't want the door to automatically open, or the airlock to cycle.
- This means that the prepare_for_docking/undocking and finish_docking/undocking procs don't get called.
-
- The docking controller will still check the state of the docking port, and thus prevent the shuttle from launching unless they force the launch (handling forced
- launches is not the docking controller's responsibility). In this case it is up to the players to manually get the docking port into a good state to undock
- (which usually just means closing and locking the doors).
-
- In line with this, docking controllers should prevent players from manually doing things when the override is NOT enabled.
-*/
-
-
-/datum/computer/file/embedded_program/docking
- var/tag_target //the tag of the docking controller that we are trying to dock with
- var/dock_state = STATE_UNDOCKED
- var/control_mode = MODE_NONE
- var/response_sent = 0 //so we don't spam confirmation messages
- var/resend_counter = 0 //for periodically resending confirmation messages in case they are missed
-
- var/override_enabled = 0 //when enabled, do not open/close doors or cycle airlocks and wait for the player to do it manually
- var/received_confirm = 0 //for undocking, whether the server has recieved a confirmation from the client
-
-/datum/computer/file/embedded_program/docking/receive_signal(datum/signal/signal, receive_method, receive_param)
- var/receive_tag = signal.data["tag"] //for docking signals, this is the sender id
- var/command = signal.data["command"]
- var/recipient = signal.data["recipient"] //the intended recipient of the docking signal
-
- if(recipient != id_tag)
- return //this signal is not for us
-
- switch(command)
- if("confirm_dock")
- if(control_mode == MODE_CLIENT && dock_state == STATE_UNDOCKED && receive_tag == tag_target)
- dock_state = STATE_DOCKING
- broadcast_docking_status()
- if(!override_enabled)
- prepare_for_docking()
-
- else if(control_mode == MODE_CLIENT && dock_state == STATE_DOCKING && receive_tag == tag_target)
- dock_state = STATE_DOCKED
- broadcast_docking_status()
- if(!override_enabled)
- finish_docking() //client done docking!
- response_sent = 0
- else if(control_mode == MODE_SERVER && dock_state == STATE_DOCKING && receive_tag == tag_target) //client just sent us the confirmation back, we're done with the docking process
- received_confirm = 1
-
- if("request_dock")
- if(control_mode == MODE_NONE && dock_state == STATE_UNDOCKED)
- control_mode = MODE_SERVER
-
- dock_state = STATE_DOCKING
- broadcast_docking_status()
-
- tag_target = receive_tag
- if(!override_enabled)
- prepare_for_docking()
- send_docking_command(tag_target, "confirm_dock") //acknowledge the request
-
- if("confirm_undock")
- if(control_mode == MODE_CLIENT && dock_state == STATE_UNDOCKING && receive_tag == tag_target)
- if(!override_enabled)
- finish_undocking()
- reset() //client is done undocking!
- else if(control_mode == MODE_SERVER && dock_state == STATE_UNDOCKING && receive_tag == tag_target)
- received_confirm = 1
-
- if("request_undock")
- if(control_mode == MODE_SERVER && dock_state == STATE_DOCKED && receive_tag == tag_target)
- dock_state = STATE_UNDOCKING
- broadcast_docking_status()
-
- if(!override_enabled)
- prepare_for_undocking()
-
- if("dock_error")
- if(receive_tag == tag_target)
- reset()
-
-/datum/computer/file/embedded_program/docking/process()
- switch(dock_state)
- if(STATE_DOCKING) //waiting for our docking port to be ready for docking
- if(ready_for_docking())
- if(control_mode == MODE_CLIENT)
- if(!response_sent)
- send_docking_command(tag_target, "confirm_dock") //tell the server we're ready
- response_sent = 1
-
- else if(control_mode == MODE_SERVER && received_confirm)
- send_docking_command(tag_target, "confirm_dock") //tell the client we are done docking.
-
- dock_state = STATE_DOCKED
- broadcast_docking_status()
-
- if(!override_enabled)
- finish_docking() //server done docking!
- response_sent = 0
- received_confirm = 0
-
- if(STATE_UNDOCKING)
- if(ready_for_undocking())
- if(control_mode == MODE_CLIENT)
- if(!response_sent)
- send_docking_command(tag_target, "confirm_undock") //tell the server we are OK to undock.
- response_sent = 1
-
- else if(control_mode == MODE_SERVER && received_confirm)
- send_docking_command(tag_target, "confirm_undock") //tell the client we are done undocking.
- if(!override_enabled)
- finish_undocking()
- reset() //server is done undocking!
-
- if(response_sent || resend_counter > 0)
- resend_counter++
-
- if(resend_counter >= MESSAGE_RESEND_TIME || (dock_state != STATE_DOCKING && dock_state != STATE_UNDOCKING))
- response_sent = 0
- resend_counter = 0
-
- //handle invalid states
- if(control_mode == MODE_NONE && dock_state != STATE_UNDOCKED)
- if(tag_target)
- send_docking_command(tag_target, "dock_error")
- reset()
- if(control_mode == MODE_SERVER && dock_state == STATE_UNDOCKED)
- control_mode = MODE_NONE
-
-
-/datum/computer/file/embedded_program/docking/proc/initiate_docking(var/target)
- if(dock_state != STATE_UNDOCKED || control_mode == MODE_SERVER) //must be undocked and not serving another request to begin a new docking handshake
- return
-
- tag_target = target
- control_mode = MODE_CLIENT
-
- send_docking_command(tag_target, "request_dock")
-
-/datum/computer/file/embedded_program/docking/proc/initiate_undocking()
- if(dock_state != STATE_DOCKED || control_mode != MODE_CLIENT) //must be docked and must be client to start undocking
- return
-
- dock_state = STATE_UNDOCKING
- broadcast_docking_status()
-
- if(!override_enabled)
- prepare_for_undocking()
-
- send_docking_command(tag_target, "request_undock")
-
-//tell the docking port to start getting ready for docking - e.g. pressurize
-/datum/computer/file/embedded_program/docking/proc/prepare_for_docking()
- return
-
-//are we ready for docking?
-/datum/computer/file/embedded_program/docking/proc/ready_for_docking()
- return 1
-
-//we are docked, open the doors or whatever.
-/datum/computer/file/embedded_program/docking/proc/finish_docking()
- return
-
-//tell the docking port to start getting ready for undocking - e.g. close those doors.
-/datum/computer/file/embedded_program/docking/proc/prepare_for_undocking()
- return
-
-//we are docked, open the doors or whatever.
-/datum/computer/file/embedded_program/docking/proc/finish_undocking()
- return
-
-//are we ready for undocking?
-/datum/computer/file/embedded_program/docking/proc/ready_for_undocking()
- return 1
-
-/datum/computer/file/embedded_program/docking/proc/enable_override()
- override_enabled = 1
-
-/datum/computer/file/embedded_program/docking/proc/disable_override()
- override_enabled = 0
-
-/datum/computer/file/embedded_program/docking/proc/reset()
- dock_state = STATE_UNDOCKED
- broadcast_docking_status()
-
- control_mode = MODE_NONE
- tag_target = null
- response_sent = 0
- received_confirm = 0
-
-/datum/computer/file/embedded_program/docking/proc/force_undock()
-// to_chat(world, "[id_tag]: forcing undock")
- if(tag_target)
- send_docking_command(tag_target, "dock_error")
- reset()
-
-/datum/computer/file/embedded_program/docking/proc/docked()
- return (dock_state == STATE_DOCKED)
-
-/datum/computer/file/embedded_program/docking/proc/undocked()
- return (dock_state == STATE_UNDOCKED)
-
-//returns 1 if we are saftely undocked (and the shuttle can leave)
-/datum/computer/file/embedded_program/docking/proc/can_launch()
- return undocked()
-
-/datum/computer/file/embedded_program/docking/proc/send_docking_command(var/recipient, var/command)
- var/datum/signal/signal = new
- signal.data["tag"] = id_tag
- signal.data["command"] = command
- signal.data["recipient"] = recipient
- post_signal(signal)
-
-/datum/computer/file/embedded_program/docking/proc/broadcast_docking_status()
- var/datum/signal/signal = new
- signal.data["tag"] = id_tag
- signal.data["dock_status"] = get_docking_status()
- post_signal(signal)
-
-//this is mostly for NanoUI
-/datum/computer/file/embedded_program/docking/proc/get_docking_status()
- switch(dock_state)
- if(STATE_UNDOCKED) return "undocked"
- if(STATE_DOCKING) return "docking"
- if(STATE_UNDOCKING) return "undocking"
- if(STATE_DOCKED) return "docked"
-
-
-#undef STATE_UNDOCKED
-#undef STATE_DOCKING
-#undef STATE_UNDOCKING
-#undef STATE_DOCKED
-
-#undef MODE_NONE
-#undef MODE_SERVER
-#undef MODE_CLIENT
\ No newline at end of file
diff --git a/code/game/machinery/embedded_controller/docking_program_multi.dm b/code/game/machinery/embedded_controller/docking_program_multi.dm
deleted file mode 100644
index 0a3d9228435..00000000000
--- a/code/game/machinery/embedded_controller/docking_program_multi.dm
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- These programs are for docking controllers that consist of multiple independent airlocks
- Each airlock has an airlock controller running the child program, and there is one docking controller running the master program
-*/
-
-/*
- the master program
-*/
-/datum/computer/file/embedded_program/docking/multi
- var/list/children_tags
- var/list/children_ready
- var/list/children_override
-
-/datum/computer/file/embedded_program/docking/multi/New(var/obj/machinery/embedded_controller/M)
- ..(M)
-
- if(istype(M,/obj/machinery/embedded_controller/radio/docking_port_multi)) //if our parent controller is the right type, then we can auto-init stuff at construction
- var/obj/machinery/embedded_controller/radio/docking_port_multi/controller = M
- //parse child_tags_txt and create child tags
- children_tags = splittext(controller.child_tags_txt, ";")
-
- children_ready = list()
- children_override = list()
- for(var/child_tag in children_tags)
- children_ready[child_tag] = 0
- children_override[child_tag] = "disabled"
-
-/datum/computer/file/embedded_program/docking/multi/proc/clear_children_ready_status()
- for(var/child_tag in children_tags)
- children_ready[child_tag] = 0
-
-/datum/computer/file/embedded_program/docking/multi/receive_signal(datum/signal/signal, receive_method, receive_param)
- var/receive_tag = signal.data["tag"] //for docking signals, this is the sender id
- var/command = signal.data["command"]
- var/recipient = signal.data["recipient"] //the intended recipient of the docking signal
-
- if(receive_tag in children_tags)
-
- //track children status
- if(signal.data["override_status"])
- children_override[receive_tag] = signal.data["override_status"]
-
- if(recipient == id_tag)
- switch(command)
- if("ready_for_docking")
- children_ready[receive_tag] = 1
- if("ready_for_undocking")
- children_ready[receive_tag] = 1
- if("status_override_enabled")
- children_override[receive_tag] = 1
- if("status_override_disabled")
- children_override[receive_tag] = 0
-
- ..(signal, receive_method, receive_param)
-
-/datum/computer/file/embedded_program/docking/multi/prepare_for_docking()
- //clear children ready status
- clear_children_ready_status()
-
- //tell children to prepare for docking
- for(var/child_tag in children_tags)
- send_docking_command(child_tag, "prepare_for_docking")
-
-/datum/computer/file/embedded_program/docking/multi/ready_for_docking()
- //check children ready status
- for(var/child_tag in children_tags)
- if(!children_ready[child_tag])
- return 0
- return 1
-
-/datum/computer/file/embedded_program/docking/multi/finish_docking()
- //tell children to finish docking
- for(var/child_tag in children_tags)
- send_docking_command(child_tag, "finish_docking")
-
- //clear ready flags
- clear_children_ready_status()
-
-/datum/computer/file/embedded_program/docking/multi/prepare_for_undocking()
- //clear children ready status
- clear_children_ready_status()
-
- //tell children to prepare for undocking
- for(var/child_tag in children_tags)
- send_docking_command(child_tag, "prepare_for_undocking")
-
-/datum/computer/file/embedded_program/docking/multi/ready_for_undocking()
- //check children ready status
- for(var/child_tag in children_tags)
- if(!children_ready[child_tag])
- return 0
- return 1
-
-/datum/computer/file/embedded_program/docking/multi/finish_undocking()
- //tell children to finish undocking
- for(var/child_tag in children_tags)
- send_docking_command(child_tag, "finish_undocking")
-
- //clear ready flags
- clear_children_ready_status()
-
-
-
-
-/*
- the child program
- technically should be "slave" but eh... I'm too politically correct.
-*/
-/datum/computer/file/embedded_program/airlock/multi_docking
- var/master_tag
-
- var/master_status = "undocked"
- var/override_enabled = 0
- var/docking_enabled = 0
- var/docking_mode = 0 //0 = docking, 1 = undocking
- var/response_sent = 0
-
-/datum/computer/file/embedded_program/airlock/multi_docking/New(var/obj/machinery/embedded_controller/M)
- ..(M)
-
- if(istype(M, /obj/machinery/embedded_controller/radio/airlock/docking_port_multi)) //if our parent controller is the right type, then we can auto-init stuff at construction
- var/obj/machinery/embedded_controller/radio/airlock/docking_port_multi/controller = M
- src.master_tag = controller.master_tag
-
-/datum/computer/file/embedded_program/airlock/multi_docking/receive_user_command(command)
- if(command == "toggle_override")
- if(override_enabled)
- override_enabled = 0
- broadcast_override_status()
- else
- override_enabled = 1
- broadcast_override_status()
- return
-
- if(!docking_enabled|| override_enabled) //only allow the port to be used as an airlock if nothing is docked here or the override is enabled
- ..(command)
-
-/datum/computer/file/embedded_program/airlock/multi_docking/receive_signal(datum/signal/signal, receive_method, receive_param)
- ..()
-
- var/receive_tag = signal.data["tag"] //for docking signals, this is the sender id
- var/command = signal.data["command"]
- var/recipient = signal.data["recipient"] //the intended recipient of the docking signal
-
- if(receive_tag != master_tag)
- return //only respond to master
-
- //track master's status
- if(signal.data["dock_status"])
- master_status = signal.data["dock_status"]
-
- if(recipient != id_tag)
- return //this signal is not for us
-
- switch(command)
- if("prepare_for_docking")
- docking_enabled = 1
- docking_mode = 0
- response_sent = 0
-
- if(!override_enabled)
- begin_cycle_in()
-
- if("prepare_for_undocking")
- docking_mode = 1
- response_sent = 0
-
- if(!override_enabled)
- stop_cycling()
- close_doors()
- disable_mech_regulation()
-
- if("finish_docking")
- if(!override_enabled)
- enable_mech_regulation()
- open_doors()
-
- if("finish_undocking")
- docking_enabled = 0
-
-/datum/computer/file/embedded_program/airlock/multi_docking/process()
- ..()
-
- if(docking_enabled && !response_sent)
-
- switch(docking_mode)
- if(0) //docking
- if(ready_for_docking())
- send_signal_to_master("ready_for_docking")
- response_sent = 1
- if(1) //undocking
- if(ready_for_undocking())
- send_signal_to_master("ready_for_undocking")
- response_sent = 1
-
-//checks if we are ready for docking
-/datum/computer/file/embedded_program/airlock/multi_docking/proc/ready_for_docking()
- return done_cycling()
-
-//checks if we are ready for undocking
-/datum/computer/file/embedded_program/airlock/multi_docking/proc/ready_for_undocking()
- return check_doors_secured()
-
-/datum/computer/file/embedded_program/airlock/multi_docking/proc/open_doors()
- toggleDoor(memory["interior_status"], tag_interior_door, memory["secure"], "open")
- toggleDoor(memory["exterior_status"], tag_exterior_door, memory["secure"], "open")
-
-/datum/computer/file/embedded_program/airlock/multi_docking/cycleDoors(var/target)
- if(!docking_enabled|| override_enabled) //only allow the port to be used as an airlock if nothing is docked here or the override is enabled
- ..(target)
-
-/datum/computer/file/embedded_program/airlock/multi_docking/proc/send_signal_to_master(var/command)
- var/datum/signal/signal = new
- signal.data["tag"] = id_tag
- signal.data["command"] = command
- signal.data["recipient"] = master_tag
- post_signal(signal)
-
-/datum/computer/file/embedded_program/airlock/multi_docking/proc/broadcast_override_status()
- var/datum/signal/signal = new
- signal.data["tag"] = id_tag
- signal.data["override_status"] = override_enabled? "enabled" : "disabled"
- post_signal(signal)
diff --git a/code/game/machinery/embedded_controller/simple_docking_controller.dm b/code/game/machinery/embedded_controller/simple_docking_controller.dm
deleted file mode 100644
index 996a56b92ac..00000000000
--- a/code/game/machinery/embedded_controller/simple_docking_controller.dm
+++ /dev/null
@@ -1,158 +0,0 @@
-//a docking port that uses a single door
-/obj/machinery/embedded_controller/radio/simple_docking_controller
- name = "docking hatch controller"
- var/tag_door
- var/datum/computer/file/embedded_program/docking/simple/docking_program
-
-/obj/machinery/embedded_controller/radio/simple_docking_controller/initialize()
- ..()
- docking_program = new/datum/computer/file/embedded_program/docking/simple(src)
- program = docking_program
-
-/obj/machinery/embedded_controller/radio/simple_docking_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
- var/data[0]
-
- data = list(
- "docking_status" = docking_program.get_docking_status(),
- "override_enabled" = docking_program.override_enabled,
- "door_state" = docking_program.memory["door_status"]["state"],
- "door_lock" = docking_program.memory["door_status"]["lock"],
- )
-
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
-
- if(!ui)
- ui = new(user, src, ui_key, "simple_docking_console.tmpl", name, 470, 290)
- ui.set_initial_data(data)
- ui.open()
- ui.set_auto_update(1)
-
-/obj/machinery/embedded_controller/radio/simple_docking_controller/Topic(href, href_list)
- if(..())
- return 1
-
- usr.set_machine(src)
- src.add_fingerprint(usr)
-
- var/clean = 0
- switch(href_list["command"]) //anti-HTML-hacking checks
- if("force_door")
- clean = 1
- if("toggle_override")
- clean = 1
-
- if(clean)
- program.receive_user_command(href_list["command"])
-
- return 0
-
-
-//A docking controller program for a simple door based docking port
-/datum/computer/file/embedded_program/docking/simple
- var/tag_door
-
-/datum/computer/file/embedded_program/docking/simple/New(var/obj/machinery/embedded_controller/M)
- ..(M)
- memory["door_status"] = list(state = "closed", lock = "locked") //assume closed and locked in case the doors dont report in
-
- if(istype(M, /obj/machinery/embedded_controller/radio/simple_docking_controller))
- var/obj/machinery/embedded_controller/radio/simple_docking_controller/controller = M
-
- tag_door = controller.tag_door? controller.tag_door : "[id_tag]_hatch"
-
- spawn(10)
- signal_door("update") //signals connected doors to update their status
-
-
-/datum/computer/file/embedded_program/docking/simple/receive_signal(datum/signal/signal, receive_method, receive_param)
- var/receive_tag = signal.data["tag"]
-
- if(!receive_tag) return
-
- if(receive_tag==tag_door)
- memory["door_status"]["state"] = signal.data["door_status"]
- memory["door_status"]["lock"] = signal.data["lock_status"]
-
- ..(signal, receive_method, receive_param)
-
-/datum/computer/file/embedded_program/docking/simple/receive_user_command(command)
- switch(command)
- if("force_door")
- if(override_enabled)
- if(memory["door_status"]["state"] == "open")
- close_door()
- else
- open_door()
- if("toggle_override")
- if(override_enabled)
- disable_override()
- else
- enable_override()
-
-
-/datum/computer/file/embedded_program/docking/simple/proc/signal_door(var/command)
- var/datum/signal/signal = new
- signal.data["tag"] = tag_door
- signal.data["command"] = command
- post_signal(signal)
-
-/datum/computer/file/embedded_program/docking/simple/proc/open_door()
- if(memory["door_status"]["state"] == "closed")
- signal_door("secure_open")
- else if(memory["door_status"]["lock"] == "unlocked")
- signal_door("lock")
-
-/datum/computer/file/embedded_program/docking/simple/proc/close_door()
- if(memory["door_status"]["state"] == "open")
- signal_door("secure_close")
- else if(memory["door_status"]["lock"] == "unlocked")
- signal_door("lock")
-
-//tell the docking port to start getting ready for docking - e.g. pressurize
-/datum/computer/file/embedded_program/docking/simple/prepare_for_docking()
- return //don't need to do anything
-
-//are we ready for docking?
-/datum/computer/file/embedded_program/docking/simple/ready_for_docking()
- return 1 //don't need to do anything
-
-//we are docked, open the doors or whatever.
-/datum/computer/file/embedded_program/docking/simple/finish_docking()
- open_door()
-
-//tell the docking port to start getting ready for undocking - e.g. close those doors.
-/datum/computer/file/embedded_program/docking/simple/prepare_for_undocking()
- close_door()
-
-//are we ready for undocking?
-/datum/computer/file/embedded_program/docking/simple/ready_for_undocking()
- return (memory["door_status"]["state"] == "closed" && memory["door_status"]["lock"] == "locked")
-
-/*** DEBUG VERBS ***
-
-/obj/machinery/embedded_controller/radio/simple_docking_controller/verb/view_state()
- set category = "Debug"
- set src in view(1)
- src.program:print_state()
-
-/obj/machinery/embedded_controller/radio/simple_docking_controller/verb/spoof_signal(var/command as text, var/sender as text)
- set category = "Debug"
- set src in view(1)
- var/datum/signal/signal = new
- signal.data["tag"] = sender
- signal.data["command"] = command
- signal.data["recipient"] = id_tag
-
- src.program:receive_signal(signal)
-
-/obj/machinery/embedded_controller/radio/simple_docking_controller/verb/debug_init_dock(var/target as text)
- set category = "Debug"
- set src in view(1)
- src.program:initiate_docking(target)
-
-/obj/machinery/embedded_controller/radio/simple_docking_controller/verb/debug_init_undock()
- set category = "Debug"
- set src in view(1)
- src.program:initiate_undocking()
-
-*/
diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm
index 45b515734f7..ffa35c963d0 100644
--- a/code/game/machinery/firealarm.dm
+++ b/code/game/machinery/firealarm.dm
@@ -49,10 +49,17 @@ FIRE ALARM
else
icon_state = "fire0"
+/obj/machinery/firealarm/emag_act(mob/user)
+ if(!emagged)
+ emagged = 1
+ if(user)
+ user.visible_message("Sparks fly out of the [src]!",
+ "You emag [src], disabling its thermal sensors.")
+ playsound(loc, 'sound/effects/sparks4.ogg', 50, 1)
+
/obj/machinery/firealarm/temperature_expose(datum/gas_mixture/air, temperature, volume)
- if(detecting)
- if(temperature > T0C+200)
- alarm() // added check of detector status here
+ if(!emagged && detecting && temperature > T0C + 200)
+ alarm() // added check of detector status here
/obj/machinery/firealarm/attack_ai(mob/user as mob)
src.add_hiddenprint(user)
@@ -148,11 +155,6 @@ FIRE ALARM
updateDialog()
last_process = world.timeofday
- if(locate(/obj/effect/hotspot) in loc)
- alarm()
-
- return
-
/obj/machinery/firealarm/power_change()
if(powered(ENVIRON))
stat &= ~NOPOWER
@@ -293,6 +295,8 @@ FIRE ALARM
pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
+ // TODO: Tie into space manager
+ // also hwat
if(z == ZLEVEL_STATION || ZLEVEL_ASTEROID == 5)
if(security_level)
src.overlays += image('icons/obj/monitors.dmi', "overlay_[get_security_level()]")
diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm
index 53977708650..cee7706d256 100644
--- a/code/game/machinery/floodlight.dm
+++ b/code/game/machinery/floodlight.dm
@@ -19,6 +19,12 @@
src.cell = new(src)
..()
+/obj/machinery/floodlight/Destroy()
+ if(cell)
+ qdel(cell)
+ cell = null
+ return ..()
+
/obj/machinery/floodlight/proc/updateicon()
icon_state = "flood[open ? "o" : ""][open && cell ? "b" : ""]0[on]"
@@ -31,7 +37,7 @@
set_light(0)
src.visible_message("[src] shuts down due to lack of power!")
return
-
+
/obj/machinery/floodlight/attack_ai(mob/user as mob)
return
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index abe99777410..53e85ba72c4 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -108,21 +108,8 @@ var/const/HOLOPAD_MODE = 0
/*This is the proc for special two-way communication between AI and holopad/people talking near holopad.
For the other part of the code, check silicon say.dm. Particularly robot talk.*/
/obj/machinery/hologram/holopad/hear_talk(mob/living/M, text, verb, datum/language/speaking)
- if(M&&hologram&&master)//Master is mostly a safety in case lag hits or something.
- if(!master.say_understands(M, speaking))//The AI will be able to understand most mobs talking through the holopad.
- if(speaking)
- text = speaking.scramble(text)
- else
- text = stars(text)
- var/name_used = M.GetVoice()
- //This communication is imperfect because the holopad "filters" voices and is only designed to connect to the master only.
- var/rendered
- if(speaking)
- rendered = "Holopad received, [name_used] [speaking.format_message(text, verb)]"
- else
- rendered = "Holopad received, [name_used] [verb], \"[text]\""
- master.show_message(rendered, 2)
- return
+ if(M && hologram && master)//Master is mostly a safety in case lag hits or something.
+ master.relay_speech(M, text, verb, speaking)
/obj/machinery/hologram/holopad/hear_message(mob/living/M, text)
if(M&&hologram&&master)//Master is mostly a safety in case lag hits or something.
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index c0ecd475f5e..17552c3fe1c 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -116,6 +116,7 @@ Class Procs:
var/interact_offline = 0 // Can the machine be interacted with while de-powered.
var/use_log = list()
var/list/settagwhitelist = list()//WHITELIST OF VARIABLES THAT THE set_tag HREF CAN MODIFY, DON'T PUT SHIT YOU DON'T NEED ON HERE, AND IF YOU'RE GONNA USE set_tag (format_tag() proc), ADD TO THIS LIST.
+ atom_say_verb = "beeps"
/obj/machinery/initialize()
addAtProcessing()
@@ -418,17 +419,6 @@ Class Procs:
return 1
return 0
-/obj/machinery/proc/state(var/msg)
- for(var/mob/O in hearers(src, null))
- O.show_message("[bicon(src)] [msg]", 2)
-
-/obj/machinery/proc/ping(text=null)
- if(!text)
- text = "\The [src] pings."
-
- state(text, "blue")
- playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
-
/obj/machinery/proc/exchange_parts(mob/user, obj/item/weapon/storage/part_replacer/W)
var/shouldplaysound = 0
if(istype(W) && component_parts)
@@ -544,6 +534,8 @@ Class Procs:
return 0
if(!prob(prb))
return 0
+ if((TK in user.mutations) && !Adjacent(user))
+ return 0
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
@@ -556,6 +548,9 @@ Class Procs:
/obj/machinery/proc/construction()
return
+/obj/machinery/proc/can_be_overridden()
+ . = 1
+
/obj/machinery/tesla_act(var/power)
..()
if(prob(85))
diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm
index 5b6cfb5e73d..3d980e769e7 100644
--- a/code/game/machinery/navbeacon.dm
+++ b/code/game/machinery/navbeacon.dm
@@ -26,11 +26,13 @@
var/turf/T = loc
hide(T.intact)
- if(codes["patrol"])
+ if(!codes || !codes.len)
+ log_debug("Empty codes datum at ([x],[y],[z])")
+ if("patrol" in codes)
if(!navbeacons["[z]"])
navbeacons["[z]"] = list()
navbeacons["[z]"] += src //Register with the patrol list!
- if(codes["delivery"])
+ if("delivery" in codes)
deliverybeacons += src
deliverybeacontags += location
@@ -39,6 +41,15 @@
deliverybeacons -= src
return ..()
+/obj/machinery/navbeacon/serialize()
+ var/list/data = ..()
+ data["codes"] = codes
+ return data
+
+/obj/machinery/navbeacon/deserialize(list/data)
+ codes = data["codes"]
+ ..()
+
// set the transponder codes assoc list from codes_txt
/obj/machinery/navbeacon/proc/set_codes()
if(!codes_txt)
@@ -201,4 +212,4 @@ Transponder Codes:"}
codes[newkey] = newval
- updateDialog()
\ No newline at end of file
+ updateDialog()
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 3a6ef2dbd81..b96f42e4441 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -979,11 +979,9 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob, pa
// return //bode well with a newscaster network of 10+ machines. Let's just return it, as it's added in the machines list.
/obj/machinery/newscaster/proc/newsAlert(var/news_call) //This isn't Agouri's work, for it is ugly and vile.
- var/turf/T = get_turf(src) //Who the fuck uses spawn(600) anyway, jesus christ
if(news_call)
- for(var/mob/O in hearers(world.view-1, T))
- O.show_message("[src.name] beeps, \"[news_call]\"",2)
+ atom_say("Breaking news from [news_call]!")
src.alert = 1
src.update_icon()
spawn(300)
@@ -992,7 +990,6 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob, pa
if(!silence)
playsound(src.loc, 'sound/machines/twobeep.ogg', 75, 1)
else
- for(var/mob/O in hearers(world.view-1, T))
- O.show_message("[src.name] beeps, \"Attention! Wanted issue distributed!\"",2)
+ atom_say("Attention! Wanted issue distributed!")
playsound(src.loc, 'sound/machines/warning-buzzer.ogg', 75, 1)
return
diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index 9b2515e8914..c0e8f7ac20d 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -276,7 +276,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
update_icon()
if(!src.silent)
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1)
- state(title)
+ atom_say(title)
switch(priority)
if(2) // High
diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm
index ce5ca3ce85d..68c4ab10a34 100644
--- a/code/game/machinery/spaceheater.dm
+++ b/code/game/machinery/spaceheater.dm
@@ -19,6 +19,12 @@
update_icon()
return
+/obj/machinery/space_heater/Destroy()
+ if(cell)
+ qdel(cell)
+ cell = null
+ return ..()
+
/obj/machinery/space_heater/update_icon()
overlays.Cut()
icon_state = "sheater[on]"
diff --git a/code/game/machinery/supply_display.dm b/code/game/machinery/supply_display.dm
index 3b55d8423f7..caf0c9c67d9 100644
--- a/code/game/machinery/supply_display.dm
+++ b/code/game/machinery/supply_display.dm
@@ -5,6 +5,7 @@
/obj/machinery/status_display/supply_display/update()
if(!..() && mode == STATUS_DISPLAY_CUSTOM)
if(shuttle_master.supply.mode == SHUTTLE_IDLE)
+ // TODO: Tie into space manager
if(shuttle_master.supply.z == ZLEVEL_STATION)
message1 = "CARGO"
message2 = "Docked"
diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm
index db4cb0271c0..bf4300351fa 100644
--- a/code/game/machinery/syndicatebomb.dm
+++ b/code/game/machinery/syndicatebomb.dm
@@ -182,6 +182,7 @@
item_state = "eshield0"
w_class = 3
origin_tech = "syndicate=6;combat=5"
+ burn_state = FLAMMABLE //Burnable (but the casing isn't)
var/adminlog = null
/obj/item/weapon/bombcore/ex_act(severity) //Little boom can chain a big boom
diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm
index 4d90971f003..7ddb0f4b963 100644
--- a/code/game/machinery/telecomms/broadcaster.dm
+++ b/code/game/machinery/telecomms/broadcaster.dm
@@ -439,6 +439,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
if(data == 1)
for(var/obj/item/device/radio/intercom/R in connection.devices["[RADIO_CHAT]"])
var/turf/position = get_turf(R)
+ // TODO: Tie into space manager
if(position && position.z == level)
receive |= R.send_hear(display_freq, level)
@@ -451,6 +452,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
if(istype(R, /obj/item/device/radio/headset))
continue
var/turf/position = get_turf(R)
+ // TODO: Tie into space manager
if(position && position.z == level)
receive |= R.send_hear(display_freq)
@@ -462,6 +464,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
var/datum/radio_frequency/antag_connection = radio_controller.return_frequency(freq)
for(var/obj/item/device/radio/R in antag_connection.devices["[RADIO_CHAT]"])
var/turf/position = get_turf(R)
+ // TODO: Tie into space manager
if(position && position.z == level)
receive |= R.send_hear(freq)
@@ -471,6 +474,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
else
for(var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"])
var/turf/position = get_turf(R)
+ // TODO: Tie into space manager
if(position && position.z == level)
receive |= R.send_hear(display_freq)
@@ -597,6 +601,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
/atom/proc/test_telecomms()
var/datum/signal/signal = src.telecomms_process()
var/turf/position = get_turf(src)
+ // TODO: Tie into space manager
return (position.z in signal.data["level"]) && signal.data["done"]
/atom/proc/telecomms_process(var/do_sleep = 1)
@@ -615,6 +620,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
"type" = 4, // determines what type of radio input it is: test broadcast
"reject" = 0,
"done" = 0,
+ // TODO: Tie into space manager
"level" = pos.z // The level it is being broadcasted at.
)
signal.frequency = PUB_FREQ// Common channel
@@ -630,4 +636,3 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
//log_to_dd("Level: [signal.data["level"]] - Done: [signal.data["done"]]")
return signal
-
diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm
index da9fe5a046e..0c0dfd178fe 100644
--- a/code/game/machinery/telecomms/machine_interactions.dm
+++ b/code/game/machinery/telecomms/machine_interactions.dm
@@ -180,6 +180,7 @@
var/turf/position = get_turf(src)
// Toggle on/off getting signals from the station or the current Z level
+ // TODO: Tie into space manager
if(src.listening_level == ZLEVEL_STATION) // equals the station
src.listening_level = position.z
return 1
@@ -393,4 +394,3 @@
if(issilicon(user) || in_range(user, src))
return 1
return 0
-
diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm
index 787483ac45d..22c7863a3bb 100644
--- a/code/game/machinery/telecomms/telecomunications.dm
+++ b/code/game/machinery/telecomms/telecomunications.dm
@@ -56,40 +56,17 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
continue
if(amount && send_count >= amount)
break
+ // TODO: Tie into space manager
if(machine.loc.z != listening_level)
if(long_range_link == 0 && machine.long_range_link == 0)
continue
// If we're sending a copy, be sure to create the copy for EACH machine and paste the data
- var/datum/signal/copy = new
+ var/datum/signal/copy
if(copysig)
-
+ copy = new
copy.transmission_method = 2
copy.frequency = signal.frequency
- // Copy the main data contents! Workaround for some nasty bug where the actual array memory is copied and not its contents.
- copy.data = list(
-
- "mob" = signal.data["mob"],
- "mobtype" = signal.data["mobtype"],
- "realname" = signal.data["realname"],
- "name" = signal.data["name"],
- "job" = signal.data["job"],
- "key" = signal.data["key"],
- "vmessage" = signal.data["vmessage"],
- "vname" = signal.data["vname"],
- "vmask" = signal.data["vmask"],
- "compression" = signal.data["compression"],
- "message" = signal.data["message"],
- "connection" = signal.data["connection"],
- "radio" = signal.data["radio"],
- "slow" = signal.data["slow"],
- "traffic" = signal.data["traffic"],
- "type" = signal.data["type"],
- "server" = signal.data["server"],
- "reject" = signal.data["reject"],
- "level" = signal.data["level"],
- "verb" = signal.data["verb"],
- "language" = signal.data["language"]
- )
+ copy.data = signal.data.Copy()
// Keep the "original" signal constant
if(!signal.data["original"])
@@ -97,15 +74,11 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
else
copy.data["original"] = signal.data["original"]
- else
- qdel(copy)
-
-
send_count++
if(machine.is_freq_listening(signal))
machine.traffic++
- if(copysig && copy)
+ if(copysig)
machine.receive_information(copy, src)
else
machine.receive_information(signal, src)
@@ -142,6 +115,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
if(!listening_level)
//Defaults to our Z level!
var/turf/position = get_turf(src)
+ // TODO: Tie into space manager
listening_level = position.z
/obj/machinery/telecomms/initialize()
@@ -167,6 +141,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
/obj/machinery/telecomms/proc/add_link(var/obj/machinery/telecomms/T)
var/turf/position = get_turf(src)
var/turf/T_position = get_turf(T)
+ // TODO: Tie into space manager
if((position.z == T_position.z) || (src.long_range_link && T.long_range_link))
for(var/x in autolinkers)
if(T.autolinkers.Find(x))
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index 63aeb4e25ee..6ecc675fdef 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -182,7 +182,8 @@
var/turf/T = get_turf(R)
if(!T)
continue
- if((T.z in config.admin_levels) || T.z > 7)
+ // TODO: Tie into space manager
+ if((T.z in config.admin_levels) || T.z > ZLEVEL_EMPTY)
continue
if(R.syndicate == 1 && emagged == 0)
continue
@@ -203,6 +204,7 @@
continue
var/turf/T = get_turf(M)
if(!T) continue
+ // TODO: Tie into space manager
if((T.z in config.admin_levels)) continue
var/tmpname = M.real_name
if(areaindex[tmpname])
@@ -225,7 +227,8 @@
var/turf/T = get_turf(R)
if(!T || !R.teleporter_hub || !R.teleporter_console)
continue
- if((T.z in config.admin_levels) || T.z > 7)
+ // TODO: Tie into space manager
+ if((T.z in config.admin_levels) || T.z > ZLEVEL_EMPTY)
continue
var/tmpname = T.loc.name
if(areaindex[tmpname])
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 11b8b5c3d42..06b97e586fb 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -602,16 +602,13 @@
return
-/obj/machinery/vending/proc/speak(var/message)
+/obj/machinery/vending/proc/speak(message)
if(stat & NOPOWER)
return
-
if(!message)
return
- for(var/mob/O in hearers(src, null))
- O.show_message("[src] beeps, \"[message]\"",2)
- return
+ atom_say(message)
/obj/machinery/vending/power_change()
if(stat & BROKEN)
@@ -894,7 +891,7 @@
/obj/item/weapon/reagent_containers/glass/bottle/toxin = 4,/obj/item/weapon/reagent_containers/syringe/antiviral = 6,/obj/item/weapon/reagent_containers/syringe/insulin = 4,
/obj/item/weapon/reagent_containers/syringe = 12,/obj/item/device/healthanalyzer = 5,/obj/item/device/healthupgrade = 5,/obj/item/weapon/reagent_containers/glass/beaker = 4,
/obj/item/weapon/reagent_containers/dropper = 2,/obj/item/stack/medical/bruise_pack/advanced = 3, /obj/item/stack/medical/ointment/advanced = 3,
- /obj/item/stack/medical/bruise_pack = 3,/obj/item/stack/medical/splint = 2, /obj/item/device/sensor_device = 2)
+ /obj/item/stack/medical/bruise_pack = 3,/obj/item/stack/medical/splint = 4, /obj/item/device/sensor_device = 2)
contraband = list(/obj/item/weapon/reagent_containers/glass/bottle/pancuronium = 1,/obj/item/weapon/reagent_containers/glass/bottle/sulfonal = 1)
@@ -1232,7 +1229,7 @@
/obj/item/clothing/accessory/scarf/zebra=1,/obj/item/clothing/accessory/scarf/christmas=1,/obj/item/clothing/accessory/stripedredscarf=1,
/obj/item/clothing/accessory/stripedbluescarf=1,/obj/item/clothing/accessory/stripedgreenscarf=1,/obj/item/clothing/accessory/waistcoat=1,
/obj/item/clothing/under/sundress=2,/obj/item/clothing/under/stripeddress = 1, /obj/item/clothing/under/sailordress = 1, /obj/item/clothing/under/redeveninggown = 1, /obj/item/clothing/under/blacktango=1,/obj/item/clothing/suit/jacket=3,
- /obj/item/clothing/glasses/regular=2,/obj/item/clothing/head/sombrero=1,/obj/item/clothing/suit/poncho=1,
+ /obj/item/clothing/glasses/regular=2,/obj/item/clothing/glasses/sunglasses/fake=2,/obj/item/clothing/head/sombrero=1,/obj/item/clothing/suit/poncho=1,
/obj/item/clothing/suit/ianshirt=1,/obj/item/clothing/shoes/laceup=2,/obj/item/clothing/shoes/black=4,
/obj/item/clothing/shoes/sandal=1, /obj/item/clothing/gloves/fingerless=2,
/obj/item/weapon/storage/belt/fannypack=1, /obj/item/weapon/storage/belt/fannypack/blue=1, /obj/item/weapon/storage/belt/fannypack/red=1)
diff --git a/code/game/mecha/combat/marauder.dm b/code/game/mecha/combat/marauder.dm
index 386afc0710c..b34897764e2 100644
--- a/code/game/mecha/combat/marauder.dm
+++ b/code/game/mecha/combat/marauder.dm
@@ -8,6 +8,7 @@
deflect_chance = 25
damage_absorption = list("brute"=0.5,"fire"=0.7,"bullet"=0.45,"laser"=0.6,"energy"=0.7,"bomb"=0.7)
max_temperature = 60000
+ burn_state = LAVA_PROOF
infra_luminosity = 3
var/zoom = 0
var/thrusters = 0
diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm
index bef015cb7fa..cb55c783005 100644
--- a/code/game/mecha/equipment/tools/tools.dm
+++ b/code/game/mecha/equipment/tools/tools.dm
@@ -382,6 +382,7 @@
range = RANGED
action(atom/target)
+ // TODO: Tie into space manager
if(!action_checks(target) || (src.loc.z in config.admin_levels)) return
var/turf/T = get_turf(target)
if(T)
@@ -403,6 +404,7 @@
action(atom/target)
+ // TODO: Tie into space manager
if(!action_checks(target) || (src.loc.z in config.admin_levels)) return
var/list/theareas = list()
for(var/area/AR in orange(100, chassis))
@@ -1144,4 +1146,4 @@
if(do_after_cooldown(target))
new /obj/structure/barricade/mime/mrcd(target)
chassis.spark_system.start()
- chassis.use_power(energy_drain*2)
\ No newline at end of file
+ chassis.use_power(energy_drain*2)
diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm
index c4916306ac2..2a4f6adf189 100644
--- a/code/game/mecha/working/ripley.dm
+++ b/code/game/mecha/working/ripley.dm
@@ -68,6 +68,7 @@
initial_icon = "firefighter"
max_temperature = 65000
health = 250
+ burn_state = LAVA_PROOF
lights_power = 7
damage_absorption = list("brute"=0.6,"fire"=0.5,"bullet"=0.7,"laser"=0.7,"energy"=1,"bomb"=0.4)
max_equip = 5 // More armor, less tools
diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm
index ada2399f20d..cead6e33ffd 100644
--- a/code/game/objects/buckling.dm
+++ b/code/game/objects/buckling.dm
@@ -49,6 +49,13 @@
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled, new_master = src)
return 1
+/obj/buckle_mob(mob/living/M)
+ . = ..()
+ if(.)
+ if(burn_state == ON_FIRE) //Sets the mob on fire if you buckle them to a burning atom/movableect
+ M.adjust_fire_stacks(1)
+ M.IgniteMob()
+
/atom/movable/proc/unbuckle_mob()
if(buckled_mob && buckled_mob.buckled == src && buckled_mob.can_unbuckle(usr))
. = buckled_mob
diff --git a/code/game/objects/effects/biomass_rift.dm b/code/game/objects/effects/biomass_rift.dm
deleted file mode 100644
index 5b4cf9970a5..00000000000
--- a/code/game/objects/effects/biomass_rift.dm
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-/obj/effect/biomass
- icon = 'icons/obj/biomass.dmi'
- icon_state = "stage1"
- opacity = 0
- density = 0
- anchored = 1
- layer = 20 //DEBUG
- plane = HUD_PLANE //DEBUG
- var/health = 10
- var/stage = 1
- var/obj/effect/rift/originalRift = null //the originating rift of that biomass
- var/maxDistance = 15 //the maximum length of a thread
- var/newSpreadDistance = 10 //the length of a thread at which new ones are created
- var/curDistance = 1 //the current length of a thread
- var/continueChance = 3 //weighed chance of continuing in the same direction. turning left or right has 1 weight both
- var/spreadDelay = 1 //will change to something bigger later, but right now I want it to spread as fast as possible for testing
-
-/obj/effect/rift
- icon = 'icons/obj/biomass.dmi'
- icon_state = "rift"
- var/list/obj/effect/biomass/linkedBiomass = list() //all the biomass patches that have spread from it
- var/newicon = 1 //DEBUG
-
-/obj/effect/rift/New()
- set background = 1
-
- ..()
-
- for(var/turf/T in orange(1,src))
- if(!IsValidBiomassLoc(T))
- continue
- var/obj/effect/biomass/starting = new /obj/effect/biomass(T)
- starting.dir = get_dir(src,starting)
- starting.originalRift = src
- linkedBiomass += starting
- spawn(1) //DEBUG
- starting.icon_state = "[newicon]"
-
-/obj/effect/rift/Del()
- for(var/obj/effect/biomass/biomass in linkedBiomass)
- del(biomass)
- ..()
-
-/obj/effect/biomass/New()
- set background = 1
-
- ..()
- if(!IsValidBiomassLoc(loc,src))
- del(src)
- return
- spawn(1) //so that the dir and stuff can be set by the source first
- if(curDistance >= maxDistance)
- return
- switch(dir)
- if(NORTHWEST)
- dir = NORTH
- if(NORTHEAST)
- dir = EAST
- if(SOUTHWEST)
- dir = WEST
- if(SOUTHEAST)
- dir = SOUTH
- sleep(spreadDelay)
- Spread()
-
-/obj/effect/biomass/proc/Spread(var/direction = dir)
- set background = 1
- var/possibleDirsInt = 0
-
- for(var/newDirection in cardinal)
- if(newDirection == turn(direction,180)) //can't go backwards
- continue
- var/turf/T = get_step(loc,newDirection)
- if(!IsValidBiomassLoc(T,src))
- continue
- possibleDirsInt |= newDirection
-
- var/list/possibleDirs = list()
-
- if(possibleDirsInt & direction)
- for(var/i=0 , i 0)
+ spawn(lifespan)
+ qdel(src)
/obj/effect/portal/Destroy()
portals -= src
@@ -33,6 +33,7 @@
var/obj/item/weapon/gun/energy/wormhole_projector/P = creator
P.portal_destroyed(src)
creator = null
+ target = null
return ..()
/obj/effect/portal/proc/teleport(atom/movable/M as mob|obj)
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 111f7c4dc33..82412c8e883 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -192,6 +192,22 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
to_chat(user, "You try to move your [temp.name], but cannot!")
return 0
+ if(burn_state == ON_FIRE)
+ var/mob/living/carbon/human/H = user
+ if(istype(H))
+ if(H.gloves && (H.gloves.max_heat_protection_temperature > 360))
+ extinguish()
+ to_chat(user, "You put out the fire on [src].")
+ else
+ to_chat(user, "You burn your hand on [src]!")
+ var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_arm")
+ if(affecting && affecting.take_damage(0, 5)) // 5 burn damage
+ H.UpdateDamageIcon()
+ H.updatehealth()
+ return
+ else
+ extinguish()
+
if(istype(src.loc, /obj/item/weapon/storage))
//If the item is in a storage item, take it out
var/obj/item/weapon/storage/S = src.loc
diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm
index 9a46a843a56..f0c3ee84e98 100644
--- a/code/game/objects/items/candle.dm
+++ b/code/game/objects/items/candle.dm
@@ -1,81 +1,90 @@
/obj/item/candle
name = "red candle"
- desc = "a candle"
+ desc = "In Greek myth, Prometheus stole fire from the Gods and gave it to humankind. The jewelry he kept for himself."
icon = 'icons/obj/candle.dmi'
icon_state = "candle1"
item_state = "candle1"
w_class = 1
-
- light_color = "#E09D37"
-
var/wax = 200
var/lit = 0
- proc
- light(var/flavor_text = "\red [usr] lights the [name].")
+ var/infinite = 0
+ var/start_lit = 0
+ light_color = "#E09D37"
+
+/obj/item/candle/New()
+ ..()
+ if(start_lit)
+ // No visible message
+ light(show_message = 0)
+
+/obj/item/candle/update_icon()
+ var/i
+ if(wax>150)
+ i = 1
+ else if(wax>80)
+ i = 2
+ else i = 3
+ icon_state = "candle[i][lit ? "_lit" : ""]"
- update_icon()
- var/i
- if(wax>150)
- i = 1
- else if(wax>80)
- i = 2
- else i = 3
- icon_state = "candle[i][lit ? "_lit" : ""]"
+/obj/item/candle/attackby(obj/item/weapon/W, mob/user, params)
+ ..()
+ if(istype(W, /obj/item/weapon/weldingtool))
+ var/obj/item/weapon/weldingtool/WT = W
+ if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool
+ light("[user] casually lights [src] with [WT], what a badass.")
+ else if(istype(W, /obj/item/weapon/lighter))
+ var/obj/item/weapon/lighter/L = W
+ if(L.lit)
+ light("After some fiddling, [user] manages to light [src] with [L].")
+ else if(istype(W, /obj/item/weapon/match))
+ var/obj/item/weapon/match/M = W
+ if(M.lit)
+ light("[user] lights [src] with [M]")
+ else if(istype(W, /obj/item/candle))
+ var/obj/item/candle/C = W
+ if(C.lit)
+ light("[user] tilts [C] and lights [src] with it.")
- attackby(obj/item/weapon/W as obj, mob/user as mob, params)
- ..()
- if(istype(W, /obj/item/weapon/weldingtool))
- var/obj/item/weapon/weldingtool/WT = W
- if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool
- light("\red [user] casually lights the [name] with [W], what a badass.")
- else if(istype(W, /obj/item/weapon/lighter))
- var/obj/item/weapon/lighter/L = W
- if(L.lit)
- light()
- else if(istype(W, /obj/item/weapon/match))
- var/obj/item/weapon/match/M = W
- if(M.lit)
- light()
- else if(istype(W, /obj/item/candle))
- var/obj/item/candle/C = W
- if(C.lit)
- light()
+/obj/item/candle/fire_act()
+ if(!lit)
+ light() //honk
-
- light(var/flavor_text = "\red [usr] lights the [name].")
- if(!src.lit)
- src.lit = 1
- //src.damtype = "fire"
- for(var/mob/O in viewers(usr, null))
- O.show_message(flavor_text, 1)
- set_light(CANDLE_LUM)
- processing_objects.Add(src)
-
-
- process()
- if(!lit)
- return
- wax--
- if(!wax)
- new/obj/item/trash/candle(src.loc)
- if(istype(src.loc, /mob))
- var/mob/M = src.loc
- M.unEquip(src, 1) //src is being deleted anyway
- qdel(src)
+/obj/item/candle/proc/light(show_message)
+ if(!lit)
+ lit = 1
+ if(show_message)
+ usr.visible_message(show_message)
+ set_light(CANDLE_LUM)
+ processing_objects.Add(src)
update_icon()
- if(istype(loc, /turf)) //start a fire if possible
- var/turf/T = loc
- T.hotspot_expose(700, 5)
- attack_self(mob/user as mob)
- if(lit)
- lit = 0
- update_icon()
- set_light(0)
+/obj/item/candle/process()
+ if(!lit)
+ return
+ if(!infinite)
+ wax--
+ if(!wax)
+ new/obj/item/trash/candle(src.loc)
+ if(istype(src.loc, /mob))
+ var/mob/M = src.loc
+ M.unEquip(src, 1) //src is being deleted anyway
+ qdel(src)
+ update_icon()
+ if(isturf(loc)) //start a fire if possible
+ var/turf/T = loc
+ T.hotspot_expose(700, 5)
+
+
+/obj/item/candle/attack_self(mob/user)
+ if(lit)
+ user.visible_message("[user] snuffs out [src].")
+ lit = 0
+ update_icon()
+ set_light(0)
/obj/item/candle/eternal
desc = "A candle. This one seems to have an odd quality about the wax."
- wax = 10000
\ No newline at end of file
+ infinite = 1
\ No newline at end of file
diff --git a/code/game/objects/items/control_wand.dm b/code/game/objects/items/control_wand.dm
index 178f56912c1..4c2c5420d1a 100644
--- a/code/game/objects/items/control_wand.dm
+++ b/code/game/objects/items/control_wand.dm
@@ -18,6 +18,12 @@
ID = new /obj/item/weapon/card/id
ID.access = get_region_accesses(region_access)
+/obj/item/weapon/door_remote/Destroy()
+ if(ID)
+ qdel(ID)
+ ID = null
+ return ..()
+
/obj/item/weapon/door_remote/attack_self(mob/user)
switch(mode)
if(WAND_OPEN)
diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm
index 974835b6a2d..dec4f4c75fb 100644
--- a/code/game/objects/items/devices/camera_bug.dm
+++ b/code/game/objects/items/devices/camera_bug.dm
@@ -61,6 +61,7 @@
return null
var/turf/T = get_turf(user.loc)
+ // TODO: Tie into space manager
if(T.z != current.z || !current.can_use())
to_chat(user, "[src] has lost the signal.")
current = null
@@ -225,6 +226,7 @@
to_chat(usr, "Something's wrong with that camera. You can't get a feed.")
return
var/turf/T = get_turf(loc)
+ // TODO: Tie into space manager
if(!T || C.z != T.z)
to_chat(usr, "You can't get a signal.")
return
@@ -284,4 +286,4 @@
#undef BUGMODE_LIST
#undef BUGMODE_MONITOR
-#undef BUGMODE_TRACK
\ No newline at end of file
+#undef BUGMODE_TRACK
diff --git a/code/game/objects/items/devices/guitar.dm b/code/game/objects/items/devices/guitar.dm
index dc9067c34e4..b95cea0aae3 100644
--- a/code/game/objects/items/devices/guitar.dm
+++ b/code/game/objects/items/devices/guitar.dm
@@ -7,6 +7,8 @@
icon_state = "guitar"
item_state = "guitar"
force = 10
+ burn_state = FLAMMABLE
+ burntime = 20
var/datum/song/handheld/song
hitsound = 'sound/effects/guitarsmash.ogg'
diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm
index 0996fdd6de5..18aff184931 100644
--- a/code/game/objects/items/devices/laserpointer.dm
+++ b/code/game/objects/items/devices/laserpointer.dm
@@ -11,7 +11,6 @@
w_class = 2 //Increased to 2, because diodes are w_class 2. Conservation of matter.
origin_tech = "combat=1"
origin_tech = "magnets=2"
- var/turf/pointer_loc
var/energy = 5
var/max_energy = 5
var/effectchance = 33
@@ -35,6 +34,12 @@
if(!pointer_icon_state)
pointer_icon_state = pick("red_laser","green_laser","blue_laser","purple_laser")
+/obj/item/device/laser_pointer/Destroy()
+ if(diode)
+ qdel(diode)
+ diode = null
+ return ..()
+
/obj/item/device/laser_pointer/upgraded/New()
..()
diode = new /obj/item/weapon/stock_parts/micro_laser/ultra
diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm
index 893ce504319..f6f39504390 100644
--- a/code/game/objects/items/devices/paicard.dm
+++ b/code/game/objects/items/devices/paicard.dm
@@ -24,9 +24,13 @@
overlays += "pai-off"
/obj/item/device/paicard/Destroy()
- //Will stop people throwing friend pAIs into the singularity so they can respawn
- if(!isnull(pai))
- pai.death(0)
+ if(pai)
+ pai.ghostize()
+ qdel(pai)
+ pai = null
+ if(radio)
+ qdel(radio)
+ radio = null
return ..()
/obj/item/device/paicard/attack_self(mob/user)
diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm
index 455a0f7098c..a8623b17f56 100644
--- a/code/game/objects/items/devices/radio/intercom.dm
+++ b/code/game/objects/items/devices/radio/intercom.dm
@@ -124,6 +124,7 @@
return -1
if(!(0 in level))
var/turf/position = get_turf(src)
+ // TODO: Tie into space manager
if(isnull(position) || !(position.z in level))
return -1
if(!src.listening)
diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm
index 9ea2f17378a..d804c874e1a 100644
--- a/code/game/objects/items/devices/taperecorder.dm
+++ b/code/game/objects/items/devices/taperecorder.dm
@@ -20,6 +20,12 @@
mytape = new /obj/item/device/tape/random(src)
update_icon()
+/obj/item/device/taperecorder/Destroy()
+ if(mytape)
+ qdel(mytape)
+ mytape = null
+ return ..()
+
/obj/item/device/taperecorder/examine(mob/user)
if(..(user, 1))
to_chat(user, "The wire panel is [open_panel ? "opened" : "closed"].")
@@ -42,6 +48,10 @@
update_icon()
+/obj/item/device/taperecorder/fire_act()
+ mytape.ruin() //Fires destroy the tape
+ return ..()
+
/obj/item/device/taperecorder/attack_hand(mob/user)
if(loc == user)
if(mytape)
@@ -253,6 +263,8 @@
var/list/timestamp = list()
var/ruined = 0
+/obj/item/device/tape/fire_act()
+ ruin()
/obj/item/device/tape/attack_self(mob/user)
if(!ruined)
@@ -277,7 +289,8 @@
timestamp.Cut()
/obj/item/device/tape/proc/ruin()
- overlays += "ribbonoverlay"
+ if(!ruined)
+ overlays += "ribbonoverlay"
ruined = 1
diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm
index 8e8e00a0343..9cd39c7a7d9 100644
--- a/code/game/objects/items/devices/transfer_valve.dm
+++ b/code/game/objects/items/devices/transfer_valve.dm
@@ -11,6 +11,18 @@
var/toggle = 1
origin_tech = "materials=1;engineering=1"
+/obj/item/device/transfer_valve/Destroy()
+ if(tank_one)
+ qdel(tank_one)
+ tank_one = null
+ if(tank_two)
+ qdel(tank_two)
+ tank_two = null
+ if(attached_device)
+ qdel(attached_device)
+ attached_device = null
+ return ..()
+
/obj/item/device/transfer_valve/proc/process_activation(var/obj/item/device/D)
/obj/item/device/transfer_valve/IsAssemblyHolder()
diff --git a/code/game/objects/items/devices/violin.dm b/code/game/objects/items/devices/violin.dm
index 9c4d5e9ddb4..c0cc320fdc3 100644
--- a/code/game/objects/items/devices/violin.dm
+++ b/code/game/objects/items/devices/violin.dm
@@ -7,6 +7,8 @@
icon_state = "violin"
item_state = "violin"
force = 10
+ burn_state = FLAMMABLE
+ burntime = 20
hitsound = 'sound/weapons/smash.ogg'
var/datum/song/handheld/song
@@ -18,7 +20,7 @@
qdel(song)
song = null
return ..()
-
+
/obj/item/device/violin/initialize()
song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
..()
diff --git a/code/game/objects/items/flag.dm b/code/game/objects/items/flag.dm
index 879a6846639..ea018289e0f 100644
--- a/code/game/objects/items/flag.dm
+++ b/code/game/objects/items/flag.dm
@@ -1,77 +1,14 @@
/obj/item/flag
icon = 'icons/obj/flag.dmi'
w_class = 4
- var/lit = 0
- var/burntime = 30
+ burntime = 20
+ burn_state = FLAMMABLE
-/obj/item/flag/fire_act(null, temperature, volume)
- if(!lit)
- Ignite()
- return
-
-/obj/item/flag/proc/Ignite()
- if(lit) return
- lit = 1
- update_icons()
- processing_objects.Add(src)
-
-/obj/item/flag/process()
- burntime--
- if(burntime < 1)
- processing_objects.Remove(src)
- if(istype(src.loc,/turf))
- new /obj/effect/decal/cleanable/ash(src.loc)
- new /obj/item/stack/rods(src.loc)
- qdel(src)
- return
- if(istype(src.loc,/mob/living/carbon))
- var/mob/living/carbon/C = src.loc
- var/turf/location = get_turf(C)
- new /obj/effect/decal/cleanable/ash(location)
- new /obj/item/stack/rods(location)
- qdel(src)
- return
- else
- qdel(src)
- return
-
-/obj/item/flag/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
+/obj/item/flag/attackby(obj/item/weapon/W, mob/user, params)
..()
- if(istype(W, /obj/item/weapon/weldingtool))
- var/obj/item/weapon/weldingtool/WT = W
- if(WT.isOn())//Badasses dont get blinded while lighting their cig with a welding tool
- light("[user] casually lights the [name] with [W], what a badass.")
-
- else if(istype(W, /obj/item/weapon/lighter/zippo))
- var/obj/item/weapon/lighter/zippo/Z = W
- if(Z.lit)
- light("With a single flick of their wrist, [user] smoothly lights the [name] with their [W]. Damn they're cool.")
-
- else if(istype(W, /obj/item/weapon/lighter))
- var/obj/item/weapon/lighter/L = W
- if(L.lit)
- light("After some fiddling, [user] manages to light the [name] with [W].")
-
- else if(istype(W, /obj/item/weapon/match))
- var/obj/item/weapon/match/M = W
- if(M.lit)
- light("[user] lights the [name] with their [W].")
-
- else if(istype(W, /obj/item/weapon/melee/energy/sword/saber))
- var/obj/item/weapon/melee/energy/sword/saber/S = W
- if(S.active)
- light("[user] swings their [W], barely missing their nose. They light the [name] in the process.")
-
- else if(istype(W, /obj/item/device/assembly/igniter))
- light("[user] fiddles with [W], and manages to light the [name].")
-
-/obj/item/flag/proc/light(var/flavor_text = "[usr] lights the [name].")
- if(!src.lit)
- src.lit = 1
- var/turf/T = get_turf(src)
- T.visible_message(flavor_text)
- update_icons()
- processing_objects.Add(src)
+ if(is_hot(W) && burn_state != ON_FIRE)
+ user.visible_message("[user] lights the [name] with [W].")
+ fire_act()
/obj/item/flag/proc/update_icons()
overlays = null
diff --git a/code/game/objects/items/latexballoon.dm b/code/game/objects/items/latexballoon.dm
index 575680f28ac..855c97d9b12 100644
--- a/code/game/objects/items/latexballoon.dm
+++ b/code/game/objects/items/latexballoon.dm
@@ -11,6 +11,12 @@
var/state
var/datum/gas_mixture/air_contents = null
+/obj/item/latexballon/Destroy()
+ if(air_contents)
+ qdel(air_contents)
+ air_contents = null
+ return ..()
+
/obj/item/latexballon/proc/blow(obj/item/weapon/tank/tank, mob/user)
if(icon_state == "latexballon_bursted")
return
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index c34710d01f0..2c6d04b9c06 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -2,16 +2,18 @@
name = "medical pack"
singular_name = "medical pack"
icon = 'icons/obj/items.dmi'
- amount = 5
- max_amount = 5
+ amount = 6
+ max_amount = 6
w_class = 1
throw_speed = 3
throw_range = 7
var/heal_brute = 0
var/heal_burn = 0
+ var/self_delay = 20
+ var/unique_handling = 0 //some things give a special prompt, do we want to bypass some checks in parent?
-/obj/item/stack/medical/attack(mob/living/carbon/M, mob/user)
- if(!istype(M))
+/obj/item/stack/medical/attack(mob/living/M, mob/user)
+ if(!iscarbon(M) && !isanimal(M))
to_chat(user, "[src] cannot be applied to [M]!")
return 1
@@ -20,13 +22,12 @@
return 1
- if(istype(M, /mob/living/carbon/human))
+ if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
- if(isliving(M))
- if(!M.can_inject(user, 1))
- return 1
+ if(!H.can_inject(user, 1))
+ return 1
if(!affecting)
to_chat(user, "That limb is missing!")
@@ -36,16 +37,36 @@
to_chat(user, "This can't be used on a robotic limb.")
return 1
+ if(M == user && !unique_handling)
+ user.visible_message("[user] starts to apply [src] on [H]...")
+ if(!do_mob(user, H, self_delay))
+ return 1
+ return
- H.UpdateDamageIcon()
+ if(isanimal(M))
+ var/mob/living/simple_animal/critter = M
+ if(!(critter.healable))
+ to_chat(user, "You cannot use [src] on [critter]!")
+ return
+ else if (critter.health == critter.maxHealth)
+ to_chat(user, "[critter] is at full health.")
+ return
+ else if(heal_brute < 1)
+ to_chat(user, "[src] won't help [critter] at all.")
+ return
+
+ critter.heal_organ_damage(heal_brute, heal_burn)
+ user.visible_message("[user] applies [src] on [critter].", \
+ "You apply [src] on [critter].")
- else
- M.heal_organ_damage(heal_brute/2, heal_burn/2)
- user.visible_message("[M] has been applied with [src] by [user].", \
- "You apply [src] to [M].")
use(1)
- M.updatehealth()
+ else
+ M.heal_organ_damage(heal_brute, heal_burn)
+ M.updatehealth()
+ user.visible_message("[user] applies [src] on [M].", \
+ "You apply [src] on [M].")
+ use(1)
//Bruise Packs//
@@ -56,11 +77,11 @@
icon_state = "gauze"
origin_tech = "biotech=1"
-/obj/item/stack/medical/bruise_pack/attack(mob/living/carbon/M, mob/user)
+/obj/item/stack/medical/bruise_pack/attack(mob/living/M, mob/user)
if(..())
return 1
- if(istype(M, /mob/living/carbon/human))
+ if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
@@ -69,26 +90,17 @@
var/disinfected = affecting.disinfect()
if(!(bandaged || disinfected))
- to_chat(user, "The wounds on [M]'s [affecting.name] have already been bandaged.")
+ to_chat(user, "The wounds on [H]'s [affecting.name] have already been bandaged.")
return 1
else
- for(var/datum/wound/W in affecting.wounds)
- if(W.internal)
- continue
- if(W.current_stage <= W.max_bleeding_stage)
- user.visible_message("[user] bandages \the [W.desc] on [M]'s [affecting.name].", \
- "You bandage \the [W.desc] on [M]'s [affecting.name]." )
- else if(istype(W,/datum/wound/bruise))
- user.visible_message("[user] places a bruise patch over \the [W.desc] on [M]'s [affecting.name].", \
- "You place a bruise patch over \the [W.desc] on [M]'s [affecting.name]." )
- else
- user.visible_message("[user] places a bandaid over \the [W.desc] on [M]'s [affecting.name].", \
- "You place a bandaid over \the [W.desc] on [M]'s [affecting.name]." )
- if(bandaged)
- affecting.heal_damage(heal_brute, heal_burn)
+ user.visible_message("[user] bandages the wounds on [H]'s [affecting.name].", \
+ "You bandage the wounds on [H]'s [affecting.name]." )
+
+ affecting.heal_damage(heal_brute, heal_burn)
+ H.UpdateDamageIcon()
use(1)
else
- to_chat(user, "[affecting] is cut open, you'll need more than a bandage!")
+ to_chat(user, "[affecting] is cut open, you'll need more than a bandage!")
/obj/item/stack/medical/bruise_pack/advanced
@@ -96,7 +108,7 @@
singular_name = "advanced trauma kit"
desc = "An advanced trauma kit for severe injuries."
icon_state = "traumakit"
- heal_brute = 12
+ heal_brute = 25
@@ -111,25 +123,26 @@
icon_state = "ointment"
origin_tech = "biotech=1"
-/obj/item/stack/medical/ointment/attack(mob/living/carbon/M, mob/user)
+/obj/item/stack/medical/ointment/attack(mob/living/M, mob/user)
if(..())
return 1
- if(istype(M, /mob/living/carbon/human))
+ if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
if(affecting.open == 0)
if(!affecting.salve())
- to_chat(user, "The wounds on [M]'s [affecting.name] have already been salved.")
+ to_chat(user, "The wounds on [H]'s [affecting.name] have already been salved.")
return 1
else
- user.visible_message("[user] salves the wounds on [M]'s [affecting.name].", \
- "You salve the wounds on [M]'s [affecting.name]." )
+ user.visible_message("[user] salves the wounds on [H]'s [affecting.name].", \
+ "You salve the wounds on [H]'s [affecting.name]." )
affecting.heal_damage(heal_brute, heal_burn)
+ H.UpdateDamageIcon()
use(1)
else
- to_chat(user, "[affecting] is cut open, you'll need more than some ointment!")
+ to_chat(user, "[affecting] is cut open, you'll need more than some ointment!")
/obj/item/stack/medical/ointment/advanced
@@ -137,7 +150,7 @@
singular_name = "advanced burn kit"
desc = "An advanced treatment kit for severe burns."
icon_state = "burnkit"
- heal_burn = 12
+ heal_burn = 25
@@ -151,7 +164,7 @@
icon = 'icons/obj/hydroponics_products.dmi'
icon_state = "alien3-product"
color = "#378C61"
- heal_brute = 7
+ heal_brute = 12
/obj/item/stack/medical/ointment/aloe
@@ -161,7 +174,7 @@
icon = 'icons/obj/hydroponics_products.dmi'
icon_state = "ambrosia-product"
color = "#4CC5C7"
- heal_burn = 7
+ heal_burn = 12
@@ -172,14 +185,14 @@
name = "medical splints"
singular_name = "medical splint"
icon_state = "splint"
- amount = 5
- max_amount = 5
+ unique_handling = 1
+ self_delay = 100
-/obj/item/stack/medical/splint/attack(mob/living/carbon/M, mob/user)
+/obj/item/stack/medical/splint/attack(mob/living/M, mob/user)
if(..())
return 1
- if(istype(M, /mob/living/carbon/human))
+ if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
var/limb = affecting.name
@@ -187,36 +200,21 @@
to_chat(user, "You can't apply a splint there!")
return
if(affecting.status & ORGAN_SPLINTED)
- to_chat(user, "[M]'s [limb] is already splinted!")
- if(alert(user, "Would you like to remove the splint from [M]'s [limb]?", "Removing.", "Yes", "No") == "Yes")
+ to_chat(user, "[H]'s [limb] is already splinted!")
+ if(alert(user, "Would you like to remove the splint from [H]'s [limb]?", "Removing.", "Yes", "No") == "Yes")
affecting.status &= ~ORGAN_SPLINTED
- to_chat(user, "You remove the splint from [M]'s [limb].")
+ to_chat(user, "You remove the splint from [H]'s [limb].")
return
- if(M != user)
- user.visible_message("[user] starts to apply [src] to [M]'s [limb].", \
- "You start to apply [src] to [M]'s [limb].", \
+ if(M == user)
+ user.visible_message("[user] starts to apply [src] to [H]'s [limb].", \
+ "You start to apply [src] to [H]'s [limb].", \
"You hear something being wrapped.")
- else
- if((!user.hand && affecting.limb_name in list("r_arm", "r_hand")) || (user.hand && affecting.limb_name in list("l_arm", "l_hand")))
- to_chat(user, "You can't apply a splint to the arm you're using!")
+ if(!do_mob(user, H, self_delay))
return
- user.visible_message("[user] starts to apply [src] to their [limb].", \
- "You start to apply [src] to your [limb].", \
- "You hear something being wrapped.")
- if(do_after(user, 50, target = M))
- if(M != user)
- user.visible_message("[user] finishes applying [src] to [M]'s [limb].", \
- "You finish applying [src] to [M]'s [limb].", \
- "You hear something being wrapped.")
- else
- if(prob(25))
- user.visible_message("[user] successfully applies [src] to their [limb].", \
- "You successfully apply [src] to your [limb].", \
- "You hear something being wrapped.")
- else
- user.visible_message("[user] fumbles [src].",
- "You fumble [src].",
- "You hear something being wrapped.")
- return
- affecting.status |= ORGAN_SPLINTED
- use(1)
+ else
+ user.visible_message("[user] applies [src] to their [limb].", \
+ "You apply [src] to your [limb].", \
+ "You hear something being wrapped.")
+
+ affecting.status |= ORGAN_SPLINTED
+ use(1)
diff --git a/code/game/objects/items/stacks/sheets/light.dm b/code/game/objects/items/stacks/sheets/light.dm
index f96b10fff23..4d8b27a6690 100644
--- a/code/game/objects/items/stacks/sheets/light.dm
+++ b/code/game/objects/items/stacks/sheets/light.dm
@@ -21,16 +21,16 @@
new/obj/item/stack/sheet/glass(user.loc)
if(amount <= 0)
user.unEquip(src, 1)
- del(src)
+ qdel(src)
if(istype(O,/obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = O
M.amount--
if(M.amount <= 0)
user.unEquip(src, 1)
- del(M)
+ qdel(M)
amount--
new/obj/item/stack/tile/light(user.loc)
if(amount <= 0)
user.unEquip(src, 1)
- del(src)
+ qdel(src)
diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm
index 55fda54267f..f509f74d79b 100644
--- a/code/game/objects/items/stacks/sheets/mineral.dm
+++ b/code/game/objects/items/stacks/sheets/mineral.dm
@@ -125,11 +125,25 @@ var/global/list/datum/stack_recipe/mime_recipes = list ( \
origin_tech = "plasmatech=2;materials=2"
sheettype = "plasma"
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT)
+ burn_state = FLAMMABLE
+ burntime = 5
/obj/item/stack/sheet/mineral/plasma/New()
..()
recipes = plasma_recipes
+/obj/item/stack/sheet/mineral/plasma/attackby(obj/item/weapon/W, mob/user, params)
+ if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite
+ message_admins("Plasma sheets ignited by [key_name_admin(user)](?) (FLW) in ([x],[y],[z] - JMP)",0,1)
+ log_game("Plasma sheets ignited by [key_name(user)] in ([x],[y],[z])")
+ fire_act()
+ else
+ return ..()
+
+/obj/item/stack/sheet/mineral/plasma/fire_act()
+ atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, amount*10)
+ qdel(src)
+
/obj/item/stack/sheet/mineral/plastic
name = "Plastic"
icon_state = "sheet-plastic"
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index 98fa7a955ab..0b99edde497 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -10,80 +10,82 @@
/*
* Metal
*/
-var/global/list/datum/stack_recipe/metal_recipes = list ( \
- new/datum/stack_recipe("stool", /obj/structure/stool, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("sofa (middle)", /obj/structure/stool/bed/chair/sofa, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("sofa (left)", /obj/structure/stool/bed/chair/sofa/left, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("sofa (right)", /obj/structure/stool/bed/chair/sofa/right, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("sofa (corner)", /obj/structure/stool/bed/chair/sofa/corner, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("barber chair", /obj/structure/stool/bed/chair/barber, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("wheelchair", /obj/structure/stool/bed/chair/wheelchair, 15, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1), \
- null, \
- new/datum/stack_recipe_list("office chairs",list( \
- new/datum/stack_recipe("dark office chair", /obj/structure/stool/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("light office chair", /obj/structure/stool/bed/chair/office/light, 5, one_per_turf = 1, on_floor = 1), \
- ), 5), \
- new/datum/stack_recipe_list("comfy chairs", list( \
- new/datum/stack_recipe("beige comfy chair", /obj/structure/stool/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("black comfy chair", /obj/structure/stool/bed/chair/comfy/black, 2, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("brown comfy chair", /obj/structure/stool/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("lime comfy chair", /obj/structure/stool/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("teal comfy chair", /obj/structure/stool/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("red comfy chair", /obj/structure/stool/bed/chair/comfy/red, 2, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("blue comfy chair", /obj/structure/stool/bed/chair/comfy/blue, 2, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("purple comfy chair", /obj/structure/stool/bed/chair/comfy/purp, 2, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("green comfy chair", /obj/structure/stool/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1), \
- ), 2), \
- null, \
- new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
- new/datum/stack_recipe("glass table frame parts", /obj/item/weapon/table_parts/glass, 2), \
- new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \
- new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \
- null, \
- new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \
- null, \
- new/datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20), \
- new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60), \
- null, \
- new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("meatspike frame", /obj/structure/kitchenspike_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \
- null, \
- new/datum/stack_recipe_list("airlock assemblies", list( \
- new/datum/stack_recipe("standard airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("command airlock assembly", /obj/structure/door_assembly/door_assembly_com, 4, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("security airlock assembly", /obj/structure/door_assembly/door_assembly_sec, 4, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("engineering airlock assembly", /obj/structure/door_assembly/door_assembly_eng, 4, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("mining airlock assembly", /obj/structure/door_assembly/door_assembly_min, 4, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("atmospherics airlock assembly", /obj/structure/door_assembly/door_assembly_atmo, 4, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("research airlock assembly", /obj/structure/door_assembly/door_assembly_research, 4, time = 50, one_per_turf = 1, on_floor = 1), \
-/* new/datum/stack_recipe("science airlock assembly", /obj/structure/door_assembly/door_assembly_science, 4, time = 50, one_per_turf = 1, on_floor = 1), \ */
- new/datum/stack_recipe("medical airlock assembly", /obj/structure/door_assembly/door_assembly_med, 4, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("maintenance airlock assembly", /obj/structure/door_assembly/door_assembly_mai, 4, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("external airlock assembly", /obj/structure/door_assembly/door_assembly_ext, 4, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("freezer airlock assembly", /obj/structure/door_assembly/door_assembly_fre, 4, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("airtight hatch assembly", /obj/structure/door_assembly/door_assembly_hatch, 4, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("maintenance hatch assembly", /obj/structure/door_assembly/door_assembly_mhatch, 4, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("high security airlock assembly", /obj/structure/door_assembly/door_assembly_highsecurity, 4, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("multi-tile airlock assembly", /obj/structure/door_assembly/multi_tile, 4, time = 50, one_per_turf = 1, on_floor = 1), \
- ), 4), \
- null, \
- new/datum/stack_recipe("mass driver button frame", /obj/item/mounted/frame/driver_button, 1, time = 50, one_per_turf = 0, on_floor = 1), \
- new/datum/stack_recipe("light switch frame", /obj/item/mounted/frame/light_switch, 1, time = 50, one_per_turf = 0, on_floor = 1), \
- null, \
- new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \
- new/datum/stack_recipe("light fixture frame", /obj/item/mounted/frame/light_fixture, 2), \
- new/datum/stack_recipe("small light fixture frame", /obj/item/mounted/frame/light_fixture/small, 1), \
- null, \
- new/datum/stack_recipe("apc frame", /obj/item/mounted/frame/apc_frame, 2), \
- new/datum/stack_recipe("air alarm frame", /obj/item/mounted/frame/alarm_frame, 2), \
- new/datum/stack_recipe("fire alarm frame", /obj/item/mounted/frame/firealarm, 2), \
- new/datum/stack_recipe("intercom frame", /obj/item/mounted/frame/intercom, 2), \
- null, \
+var/global/list/datum/stack_recipe/metal_recipes = list(
+ new /datum/stack_recipe("stool", /obj/structure/stool, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("sofa (middle)", /obj/structure/stool/bed/chair/sofa, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("sofa (left)", /obj/structure/stool/bed/chair/sofa/left, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("sofa (right)", /obj/structure/stool/bed/chair/sofa/right, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("sofa (corner)", /obj/structure/stool/bed/chair/sofa/corner, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("barber chair", /obj/structure/stool/bed/chair/barber, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("wheelchair", /obj/structure/stool/bed/chair/wheelchair, 15, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1),
+ null,
+ new /datum/stack_recipe_list("office chairs",list(
+ new /datum/stack_recipe("dark office chair", /obj/structure/stool/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("light office chair", /obj/structure/stool/bed/chair/office/light, 5, one_per_turf = 1, on_floor = 1),
+ ), 5),
+
+ new /datum/stack_recipe_list("comfy chairs", list(
+ new /datum/stack_recipe("beige comfy chair", /obj/structure/stool/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("black comfy chair", /obj/structure/stool/bed/chair/comfy/black, 2, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("brown comfy chair", /obj/structure/stool/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("lime comfy chair", /obj/structure/stool/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("teal comfy chair", /obj/structure/stool/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("red comfy chair", /obj/structure/stool/bed/chair/comfy/red, 2, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("blue comfy chair", /obj/structure/stool/bed/chair/comfy/blue, 2, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("purple comfy chair", /obj/structure/stool/bed/chair/comfy/purp, 2, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("green comfy chair", /obj/structure/stool/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1),
+ ), 2),
+
+ null,
+ new /datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2),
+ new /datum/stack_recipe("glass table frame parts", /obj/item/weapon/table_parts/glass, 2),
+ new /datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts),
+ new /datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1),
+ null,
+ new /datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1),
+ null,
+ new /datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20),
+ new /datum/stack_recipe/rods("metal rod", /obj/item/stack/rods, 1, 2, 60),
+ null,
+ new /datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("meatspike frame", /obj/structure/kitchenspike_frame, 5, time = 25, one_per_turf = 1, on_floor = 1),
+ null,
+ new /datum/stack_recipe_list("airlock assemblies", list(
+ new /datum/stack_recipe("standard airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("command airlock assembly", /obj/structure/door_assembly/door_assembly_com, 4, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("security airlock assembly", /obj/structure/door_assembly/door_assembly_sec, 4, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("engineering airlock assembly", /obj/structure/door_assembly/door_assembly_eng, 4, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("mining airlock assembly", /obj/structure/door_assembly/door_assembly_min, 4, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("atmospherics airlock assembly", /obj/structure/door_assembly/door_assembly_atmo, 4, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("research airlock assembly", /obj/structure/door_assembly/door_assembly_research, 4, time = 50, one_per_turf = 1, on_floor = 1),
+/* new /datum/stack_recipe("science airlock assembly", /obj/structure/door_assembly/door_assembly_science, 4, time = 50, one_per_turf = 1, on_floor = 1), */
+ new /datum/stack_recipe("medical airlock assembly", /obj/structure/door_assembly/door_assembly_med, 4, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("maintenance airlock assembly", /obj/structure/door_assembly/door_assembly_mai, 4, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("external airlock assembly", /obj/structure/door_assembly/door_assembly_ext, 4, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("freezer airlock assembly", /obj/structure/door_assembly/door_assembly_fre, 4, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("airtight hatch assembly", /obj/structure/door_assembly/door_assembly_hatch, 4, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("maintenance hatch assembly", /obj/structure/door_assembly/door_assembly_mhatch, 4, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("high security airlock assembly", /obj/structure/door_assembly/door_assembly_highsecurity, 4, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("multi-tile airlock assembly", /obj/structure/door_assembly/multi_tile, 4, time = 50, one_per_turf = 1, on_floor = 1),
+ ), 4),
+ null,
+ new /datum/stack_recipe("mass driver button frame", /obj/item/mounted/frame/driver_button, 1, time = 50, one_per_turf = 0, on_floor = 1),
+ new /datum/stack_recipe("light switch frame", /obj/item/mounted/frame/light_switch, 1, time = 50, one_per_turf = 0, on_floor = 1),
+ null,
+ new /datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade),
+ new /datum/stack_recipe("light fixture frame", /obj/item/mounted/frame/light_fixture, 2),
+ new /datum/stack_recipe("small light fixture frame", /obj/item/mounted/frame/light_fixture/small, 1),
+ null,
+ new /datum/stack_recipe("apc frame", /obj/item/mounted/frame/apc_frame, 2),
+ new /datum/stack_recipe("air alarm frame", /obj/item/mounted/frame/alarm_frame, 2),
+ new /datum/stack_recipe("fire alarm frame", /obj/item/mounted/frame/firealarm, 2),
+ new /datum/stack_recipe("intercom frame", /obj/item/mounted/frame/intercom, 2),
+ null
)
/obj/item/stack/sheet/metal
@@ -106,13 +108,12 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
/*
* Plasteel
*/
-var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
- new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \
- new/datum/stack_recipe("Surgery Table", /obj/machinery/optable, 5, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1), \
- new/datum/stack_recipe("Mass Driver frame", /obj/machinery/mass_driver_frame, 3, time = 50, one_per_turf = 1), \
-
- )
+var/global/list/datum/stack_recipe/plasteel_recipes = list(
+ new /datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1),
+ new /datum/stack_recipe("Surgery Table", /obj/machinery/optable, 5, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1),
+ new /datum/stack_recipe("Mass Driver frame", /obj/machinery/mass_driver_frame, 3, time = 50, one_per_turf = 1)
+)
/obj/item/stack/sheet/plasteel
name = "plasteel"
@@ -132,21 +133,21 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
/*
* Wood
*/
-var/global/list/datum/stack_recipe/wood_recipes = list ( \
- new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
- new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
- new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \
- new/datum/stack_recipe("wooden chair", /obj/structure/stool/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("bookcase", /obj/structure/bookcase, 5, time = 50, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), \
- new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("easel", /obj/structure/easel, 3, one_per_turf = 1, on_floor = 1), \
- new/datum/stack_recipe("wooden buckler", /obj/item/weapon/shield/riot/buckler, 20, time = 40), \
- new/datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50),\
- new/datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10),\
- )
+var/global/list/datum/stack_recipe/wood_recipes = list(
+ new /datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1),
+ new /datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20),
+ new /datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2),
+ new /datum/stack_recipe("wooden chair", /obj/structure/stool/bed/chair/wood/normal, 3, time = 10, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("bookcase", /obj/structure/bookcase, 5, time = 50, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40),
+ new /datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("easel", /obj/structure/easel, 3, one_per_turf = 1, on_floor = 1),
+ new /datum/stack_recipe("wooden buckler", /obj/item/weapon/shield/riot/buckler, 20, time = 40),
+ new /datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50),
+ new /datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10)
+)
/obj/item/stack/sheet/wood
name = "wooden planks"
@@ -155,6 +156,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
singular_name = "wood plank"
icon_state = "sheet-wood"
origin_tech = "materials=1;biotech=1"
+ burn_state = FLAMMABLE
/obj/item/stack/sheet/wood/New(var/loc, var/amount=null)
recipes = wood_recipes
@@ -169,22 +171,23 @@ var/global/list/datum/stack_recipe/wood_recipes = list ( \
singular_name = "cloth roll"
icon_state = "sheet-cloth"
origin_tech = "materials=2"
+ burn_state = FLAMMABLE
/*
* Cardboard
*/
-var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
- new/datum/stack_recipe("box", /obj/item/weapon/storage/box), \
- new/datum/stack_recipe("large box", /obj/item/weapon/storage/box/large, 4), \
- new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/box/lights/tubes), \
- new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/box/lights/bulbs), \
- new/datum/stack_recipe("mouse traps", /obj/item/weapon/storage/box/mousetraps), \
- new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \
- new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \
- new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \
- new/datum/stack_recipe("folder", /obj/item/weapon/folder), \
- new/datum/stack_recipe("cardboard tube", /obj/item/weapon/c_tube), \
- new/datum/stack_recipe("cardboard box", /obj/structure/closet/cardboard, 4), \
+var/global/list/datum/stack_recipe/cardboard_recipes = list (
+ new /datum/stack_recipe("box", /obj/item/weapon/storage/box),
+ new /datum/stack_recipe("large box", /obj/item/weapon/storage/box/large, 4),
+ new /datum/stack_recipe("light tubes", /obj/item/weapon/storage/box/lights/tubes),
+ new /datum/stack_recipe("light bulbs", /obj/item/weapon/storage/box/lights/bulbs),
+ new /datum/stack_recipe("mouse traps", /obj/item/weapon/storage/box/mousetraps),
+ new /datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3),
+ new /datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg),
+ new /datum/stack_recipe("pizza box", /obj/item/pizzabox),
+ new /datum/stack_recipe("folder", /obj/item/weapon/folder),
+ new /datum/stack_recipe("cardboard tube", /obj/item/weapon/c_tube),
+ new /datum/stack_recipe("cardboard box", /obj/structure/closet/cardboard, 4),
)
/obj/item/stack/sheet/cardboard //BubbleWrap
@@ -193,7 +196,8 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
singular_name = "cardboard sheet"
icon_state = "sheet-card"
origin_tech = "materials=1"
+ burn_state = FLAMMABLE
-/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null)
- recipes = cardboard_recipes
- return ..()
+/obj/item/stack/sheet/cardboard/New(var/loc, var/amt = null)
+ recipes = cardboard_recipes
+ return ..()
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 5b78e8587d9..753cc9f9de8 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -10,156 +10,172 @@
*/
/obj/item/stack
origin_tech = "materials=1"
- var/list/datum/stack_recipe/recipes
+ var/list/recipes = list() // /datum/stack_recipe
var/singular_name
var/amount = 1
var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount
-/obj/item/stack/New(var/loc, var/amount=null)
+/obj/item/stack/New(var/loc, var/amt = null)
..()
- if(amount!=null) //Allow for stacks with the amount=0
- src.amount=amount
- return
+ if(amt != null) //Allow for stacks with the amount=0
+ amount = amt
/obj/item/stack/Destroy()
- if(usr && usr.machine==src)
+ if(usr && usr.machine == src)
usr << browse(null, "window=stack")
- return ..()
+ ..()
+ return QDEL_HINT_HARDDEL_NOW // because qdel'd stacks act strange for cyborgs
/obj/item/stack/examine(mob/user)
if(..(user, 1))
- to_chat(user, "There are [src.amount] [src.singular_name]\s in the stack.")
+ to_chat(user, "There are [amount] [singular_name]\s in the stack.")
-
-/obj/item/stack/attack_self(mob/user as mob)
+/obj/item/stack/attack_self(mob/user)
list_recipes(user)
-/obj/item/stack/proc/list_recipes(mob/user as mob, recipes_sublist)
+/obj/item/stack/proc/list_recipes(mob/user, recipes_sublist)
if(!recipes)
return
- if(!src || amount<=0)
+
+ if(amount <= 0)
user << browse(null, "window=stack")
+ return
+
user.set_machine(src) //for correct work of onclose
+
var/list/recipe_list = recipes
if(recipes_sublist && recipe_list[recipes_sublist] && istype(recipe_list[recipes_sublist], /datum/stack_recipe_list))
var/datum/stack_recipe_list/srl = recipe_list[recipes_sublist]
recipe_list = srl.recipes
+
var/t1 = "Amount Left: [amount] "
- for(var/i=1;i<=recipe_list.len,i++)
+ for(var/i in 1 to recipe_list.len)
var/E = recipe_list[i]
if(isnull(E))
t1 += " "
continue
- if(i>1 && !isnull(recipe_list[i-1]))
- t1+=" "
+ if(i > 1 && !isnull(recipe_list[i - 1]))
+ t1 += " "
if(istype(E, /datum/stack_recipe_list))
var/datum/stack_recipe_list/srl = E
- if(src.amount >= srl.req_amount)
- t1 += "[srl.title] ([srl.req_amount] [src.singular_name]\s)"
+ if(amount >= srl.req_amount)
+ t1 += "[srl.title] ([srl.req_amount] [singular_name]\s)"
else
- t1 += "[srl.title] ([srl.req_amount] [src.singular_name]\s) "
+ t1 += "[srl.title] ([srl.req_amount] [singular_name]\s) "
if(istype(E, /datum/stack_recipe))
var/datum/stack_recipe/R = E
var/max_multiplier = round(src.amount / R.req_amount)
- var/title as text
+ var/title
var/can_build = 1
- can_build = can_build && (max_multiplier>0)
+ can_build = can_build && (max_multiplier > 0)
/*
if(R.one_per_turf)
can_build = can_build && !(locate(R.result_type) in usr.loc)
if(R.on_floor)
can_build = can_build && istype(usr.loc, /turf/simulated/floor)
*/
- if(R.res_amount>1)
- title+= "[R.res_amount]x [R.title]\s"
+ if(R.res_amount > 1)
+ title += "[R.res_amount]x [R.title]\s"
else
- title+= "[R.title]"
- title+= " ([R.req_amount] [src.singular_name]\s)"
+ title += "[R.title]"
+ title += " ([R.req_amount] [src.singular_name]\s)"
if(can_build)
- t1 += text("[title] ")
+ t1 += "[title] "
else
- t1 += text("[]", title)
+ t1 += "[title]"
continue
if(R.max_res_amount>1 && max_multiplier>1)
- max_multiplier = min(max_multiplier, round(R.max_res_amount/R.res_amount))
+ max_multiplier = min(max_multiplier, round(R.max_res_amount / R.res_amount))
t1 += " |"
var/list/multipliers = list(5,10,25)
for(var/n in multipliers)
if(max_multiplier>=n)
- t1 += " [n*R.res_amount]x"
+ t1 += " [n * R.res_amount]x"
if(!(max_multiplier in multipliers))
- t1 += " [max_multiplier*R.res_amount]x"
+ t1 += " [max_multiplier * R.res_amount]x"
var/datum/browser/popup = new(user, "stack", name, 400, 400)
popup.set_content(t1)
popup.open(0)
onclose(user, "stack")
- return
/obj/item/stack/Topic(href, href_list)
..()
- if((usr.restrained() || usr.stat || usr.get_active_hand() != src))
- return
+ if(usr.incapacitated() || usr.get_active_hand() != src)
+ return 0
if(href_list["sublist"] && !href_list["make"])
list_recipes(usr, text2num(href_list["sublist"]))
if(href_list["make"])
- if(src.amount < 1) del(src) //Never should happen
+ if(amount < 1)
+ qdel(src) //Never should happen
var/list/recipes_list = recipes
if(href_list["sublist"])
var/datum/stack_recipe_list/srl = recipes_list[text2num(href_list["sublist"])]
recipes_list = srl.recipes
+
var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])]
var/multiplier = text2num(href_list["multiplier"])
- if(!multiplier) multiplier = 1
- if(src.amount < R.req_amount*multiplier)
- if(R.req_amount*multiplier>1)
- to_chat(usr, "\red You haven't got enough [src] to build \the [R.req_amount*multiplier] [R.title]\s!")
+ if(!multiplier)
+ multiplier = 1
+
+ if(amount < R.req_amount * multiplier)
+ if(R.req_amount * multiplier>1)
+ to_chat(usr, "You haven't got enough [src] to build \the [R.req_amount * multiplier] [R.title]\s!")
else
- to_chat(usr, "\red You haven't got enough [src] to build \the [R.title]!")
- return
+ to_chat(usr, "You haven't got enough [src] to build \the [R.title]!")
+ return 0
+
if(R.one_per_turf && (locate(R.result_type) in usr.loc))
- to_chat(usr, "\red There is another [R.title] here!")
- return
+ to_chat(usr, "There is another [R.title] here!")
+ return 0
+
if(R.on_floor && !istype(usr.loc, /turf/simulated))
- to_chat(usr, "\red \The [R.title] must be constructed on the floor!")
- return
+ to_chat(usr, "\The [R.title] must be constructed on the floor!")
+ return 0
+
if(R.time)
- to_chat(usr, "\blue Building [R.title] ...")
+ to_chat(usr, "Building [R.title] ...")
if(!do_after(usr, R.time, target = usr))
- return
- if(src.amount < R.req_amount*multiplier)
+ return 0
+
+ if(amount < R.req_amount * multiplier)
return
- var/atom/O = new R.result_type( usr.loc )
+
+ var/atom/O = new R.result_type(usr.loc)
O.dir = usr.dir
- if(R.max_res_amount>1)
+ if(R.max_res_amount > 1)
var/obj/item/stack/new_item = O
- new_item.amount = R.res_amount*multiplier
+ new_item.amount = R.res_amount * multiplier
//new_item.add_to_stacks(usr)
- src.amount-=R.req_amount*multiplier
- if(src.amount < 1) // Just in case a stack's amount ends up fractional somehow
+
+ R.post_build(src, O)
+
+ amount -= R.req_amount * multiplier
+ if(amount < 1) // Just in case a stack's amount ends up fractional somehow
var/oldsrc = src
src = null //dont kill proc after del()
usr.unEquip(oldsrc, 1)
- del(oldsrc) // Not qdel, because qdel'd stacks act strange for cyborgs
- if(istype(O,/obj/item))
+ qdel(oldsrc)
+ if(istype(O, /obj/item))
usr.put_in_hands(O)
+
O.add_fingerprint(usr)
//BubbleWrap - so newly formed boxes are empty
- if( istype(O, /obj/item/weapon/storage) )
+ if(istype(O, /obj/item/weapon/storage))
for(var/obj/item/I in O)
- del(I)
+ qdel(I)
//BubbleWrap END
- if(src && usr.machine==src) //do not reopen closed window
- spawn( 0 )
- src.interact(usr)
+
+ if(src && usr.machine == src) //do not reopen closed window
+ spawn(0)
+ interact(usr)
return
- return
/obj/item/stack/proc/use(var/used)
if(amount < used)
@@ -169,19 +185,19 @@
if(usr)
usr.unEquip(src, 1)
spawn()
- del(src) // Not qdel, because qdel'd stacks act strange for cyborgs
+ qdel(src)
update_icon()
return 1
-/obj/item/stack/proc/add_to_stacks(mob/usr as mob)
+/obj/item/stack/proc/add_to_stacks(mob/usr)
var/obj/item/stack/oldsrc = src
src = null
for(var/obj/item/stack/item in usr.loc)
- if(item==oldsrc)
+ if(item == oldsrc)
continue
if(!istype(item, oldsrc.type))
continue
- if(item.amount>=item.max_amount)
+ if(item.amount >= item.max_amount)
continue
oldsrc.attackby(item, usr)
to_chat(usr, "You add new [item.singular_name] to the stack. It now contains [item.amount] [item.singular_name]\s.")
@@ -204,7 +220,7 @@
use(amt)
return F
-/obj/item/stack/attack_hand(mob/user as mob)
+/obj/item/stack/attack_hand(mob/user)
if(user.get_inactive_hand() == src)
var/obj/item/stack/F = split(user, 1)
user.put_in_hands(F)
@@ -214,14 +230,15 @@
else
..()
-/obj/item/stack/attackby(obj/item/W as obj, mob/user as mob, params)
+/obj/item/stack/attackby(obj/item/W, mob/user, params)
..()
- if(istype(W, src.type))
+ if(istype(W, type))
var/obj/item/stack/S = W
if(S.amount >= max_amount)
return 1
- var/to_transfer as num
- if(user.get_inactive_hand()==src)
+
+ var/to_transfer
+ if(user.get_inactive_hand() == src)
var/desired = input("How much would you like to transfer from this stack?", "How much?", 1) as null|num
if(!desired)
return
@@ -229,52 +246,22 @@
to_transfer = max(1,min(desired,S.max_amount-S.amount,src.amount))
else
to_transfer = min(src.amount, S.max_amount-S.amount)
- S.amount+=to_transfer
- if(S && usr.machine==S)
- spawn(0) S.interact(usr)
- src.use(to_transfer)
- if(src && usr.machine==src)
- spawn(0) src.interact(usr)
+
+ S.amount += to_transfer
+ if(S && usr.machine == S)
+ spawn(0)
+ S.interact(usr)
+ use(to_transfer)
+ if(src && usr.machine == src)
+ spawn(0)
+ interact(usr)
S.update_icon()
- else return ..()
+ else
+ return ..()
-/obj/item/stack/proc/copy_evidences(obj/item/stack/from as obj)
- src.blood_DNA = from.blood_DNA
- src.fingerprints = from.fingerprints
- src.fingerprintshidden = from.fingerprintshidden
- src.fingerprintslast = from.fingerprintslast
- //TODO bloody overlay
-
-/*
- * Recipe datum
- */
-/datum/stack_recipe
- var/title = "ERROR"
- var/result_type
- var/req_amount = 1
- var/res_amount = 1
- var/max_res_amount = 1
- var/time = 0
- var/one_per_turf = 0
- var/on_floor = 0
- New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0)
- src.title = title
- src.result_type = result_type
- src.req_amount = req_amount
- src.res_amount = res_amount
- src.max_res_amount = max_res_amount
- src.time = time
- src.one_per_turf = one_per_turf
- src.on_floor = on_floor
-
-/*
- * Recipe list datum
- */
-/datum/stack_recipe_list
- var/title = "ERROR"
- var/list/recipes = null
- var/req_amount = 1
- New(title, recipes, req_amount = 1)
- src.title = title
- src.recipes = recipes
- src.req_amount = req_amount
+/obj/item/stack/proc/copy_evidences(obj/item/stack/from)
+ blood_DNA = from.blood_DNA
+ fingerprints = from.fingerprints
+ fingerprintshidden = from.fingerprintshidden
+ fingerprintslast = from.fingerprintslast
+ //TODO bloody overlay
\ No newline at end of file
diff --git a/code/game/objects/items/stacks/stack_recipe.dm b/code/game/objects/items/stacks/stack_recipe.dm
new file mode 100644
index 00000000000..4fe283c6db6
--- /dev/null
+++ b/code/game/objects/items/stacks/stack_recipe.dm
@@ -0,0 +1,55 @@
+
+/*
+ * Recipe datum
+ */
+/datum/stack_recipe
+ var/title = "ERROR"
+ var/result_type
+ var/req_amount = 1
+ var/res_amount = 1
+ var/max_res_amount = 1
+ var/time = 0
+ var/one_per_turf = 0
+ var/on_floor = 0
+
+/datum/stack_recipe/New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0)
+ src.title = title
+ src.result_type = result_type
+ src.req_amount = req_amount
+ src.res_amount = res_amount
+ src.max_res_amount = max_res_amount
+ src.time = time
+ src.one_per_turf = one_per_turf
+ src.on_floor = on_floor
+
+/datum/stack_recipe/proc/post_build(var/obj/item/stack/S, var/obj/result)
+ return
+
+/* Special Recipes */
+
+/datum/stack_recipe/cable_restraints
+/datum/stack_recipe/cable_restraints/post_build(var/obj/item/stack/S, var/obj/result)
+ if(istype(result, /obj/item/weapon/restraints/handcuffs/cable))
+ result.color = S.color
+ ..()
+
+/datum/stack_recipe/rods
+/datum/stack_recipe/rods/post_build(var/obj/item/stack/S, var/obj/result)
+ if(istype(result, /obj/item/stack/rods))
+ var/obj/item/stack/rods/R = result
+ R.update_icon()
+ ..()
+
+/*
+ * Recipe list datum
+ */
+/datum/stack_recipe_list
+ var/title = "ERROR"
+ var/list/recipes = null
+ var/req_amount = 1
+
+/datum/stack_recipe_list/New(title, recipes, req_amount = 1)
+ src.title = title
+ src.recipes = recipes
+ src.req_amount = req_amount
+
diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm
index d7fcf1bcb53..bfbd0a4ccb6 100644
--- a/code/game/objects/items/stacks/tiles/tile_types.dm
+++ b/code/game/objects/items/stacks/tiles/tile_types.dm
@@ -37,6 +37,7 @@
icon_state = "tile_grass"
origin_tech = "biotech=1"
turf_type = /turf/simulated/floor/grass
+ burn_state = FLAMMABLE
/*
* Wood
@@ -48,6 +49,7 @@
desc = "an easy to fit wood floor tile"
icon_state = "tile-wood"
turf_type = /turf/simulated/floor/wood
+ burn_state = FLAMMABLE
/*
* Carpets
@@ -58,6 +60,7 @@
desc = "A piece of carpet. It is the same size as a floor tile"
icon_state = "tile-carpet"
turf_type = /turf/simulated/floor/carpet
+ burn_state = FLAMMABLE
/*
* Plasteel
@@ -100,6 +103,7 @@
desc = "A piece of carpet with a convincing star pattern."
icon_state = "tile_space"
turf_type = /turf/simulated/floor/fakespace
+ burn_state = FLAMMABLE
/obj/item/stack/tile/fakespace/loaded
amount = 30
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index ec524314b71..7e38c7a6e4e 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -257,31 +257,31 @@
icon = 'icons/obj/toy.dmi'
icon_state = "snappop"
w_class = 1
+ var/ash_type = /obj/effect/decal/cleanable/ash
-/obj/item/toy/snappop/throw_impact(atom/hit_atom)
- ..()
- var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
- s.set_up(3, 1, src)
+/obj/item/toy/snappop/proc/pop_burst(var/n=3, var/c=1)
+ var/datum/effect/system/spark_spread/s = new()
+ s.set_up(n, c, src)
s.start()
- new /obj/effect/decal/cleanable/ash(src.loc)
- visible_message("The [src.name] explodes!","You hear a snap!")
+ new ash_type(loc)
+ visible_message("[src] explodes!",
+ "You hear a snap!")
playsound(src, 'sound/effects/snap.ogg', 50, 1)
qdel(src)
+/obj/item/toy/snappop/fire_act()
+ pop_burst()
+
+/obj/item/toy/snappop/throw_impact(atom/hit_atom)
+ ..()
+ pop_burst()
+
/obj/item/toy/snappop/Crossed(H as mob|obj)
- if((ishuman(H))) //i guess carp and shit shouldn't set them off
+ if(ishuman(H) || issilicon(H)) //i guess carp and shit shouldn't set them off
var/mob/living/carbon/M = H
- if(M.m_intent == "run")
- to_chat(M, "You step on the snap pop!")
-
- var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
- s.set_up(2, 0, src)
- s.start()
- new /obj/effect/decal/cleanable/ash(src.loc)
- visible_message("The [name] explodes!","You hear a snap!")
- playsound(src, 'sound/effects/snap.ogg', 50, 1)
- qdel(src)
-
+ if(issilicon(H) || M.m_intent == "run")
+ to_chat(M, "You step on the snap pop!")
+ pop_burst(2, 0)
/*
@@ -394,6 +394,8 @@
obj/item/toy/cards
+ burn_state = FLAMMABLE
+ burntime = 5
var/parentdeck = null
var/deckstyle = "nanotrasen"
var/card_hitsound = null
@@ -749,6 +751,7 @@ obj/item/toy/cards/deck/syndicate
card_throw_speed = 3
card_throw_range = 20
card_attack_verb = list("attacked", "sliced", "diced", "slashed", "cut")
+ burn_state = FIRE_PROOF
/*
|| Custom card decks ||
@@ -884,6 +887,7 @@ obj/item/toy/cards/deck/syndicate/black
icon_state = "carpplushie"
attack_verb = list("bitten", "eaten", "fin slapped")
var/bitesound = 'sound/weapons/bite.ogg'
+ burn_state = FLAMMABLE
// Attack mob
/obj/item/toy/carpplushie/attack(mob/M as mob, mob/user as mob)
@@ -946,6 +950,7 @@ obj/item/toy/cards/deck/syndicate/black
icon = 'icons/obj/toy.dmi'
var/poof_sound = 'sound/weapons/thudswoosh.ogg'
attack_verb = list("poofed", "bopped", "whapped","cuddled","fluffed")
+ burn_state = FLAMMABLE
/obj/item/toy/plushie/attack(mob/M as mob, mob/user as mob)
playsound(loc, poof_sound, 20, 1) // Play the whoosh sound in local area
@@ -1071,6 +1076,7 @@ obj/item/toy/cards/deck/syndicate/black
item_state = "arm_blade"
attack_verb = list("pricked", "absorbed", "gored")
w_class = 2
+ burn_state = FLAMMABLE
/*
* Toy/fake flash
diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm
index 928eba59a6a..dc538674993 100644
--- a/code/game/objects/items/trash.dm
+++ b/code/game/objects/items/trash.dm
@@ -6,6 +6,7 @@
icon = 'icons/obj/trash.dmi'
w_class = 1
desc = "This is rubbish."
+ burn_state = FLAMMABLE
/obj/item/trash/raisins
name = "4no raisins"
@@ -42,6 +43,7 @@
/obj/item/trash/plate
name = "Plate"
icon_state = "plate"
+ burn_state = FIRE_PROOF
/obj/item/trash/snack_bowl
name = "Snack bowl"
@@ -58,6 +60,7 @@
/obj/item/trash/tray
name = "Tray"
icon_state = "tray"
+ burn_state = FIRE_PROOF
/obj/item/trash/candle
name = "candle"
@@ -73,6 +76,7 @@
icon_state = "cola"
var/is_glass = 0
var/is_plastic = 0
+ burn_state = FIRE_PROOF
/obj/item/trash/gum
name = "chewed gum"
diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm
index 44ef04ab401..a0dcdaec042 100644
--- a/code/game/objects/items/weapons/RCD.dm
+++ b/code/game/objects/items/weapons/RCD.dm
@@ -91,13 +91,13 @@ RCD
data["max_matter"] = max_matter
data["one_access"] = one_access
data["locked"] = locked
-
+
if(menu == 2)
var/list/door_types_list = list()
for(var/type in allowed_door_types)
door_types_list[++door_types_list.len] = list("name" = allowed_door_types[type], "type" = type)
data["allowed_door_types"] = door_types_list
-
+
data["door_accesses"] = door_accesses_list
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
@@ -110,14 +110,14 @@ RCD
/obj/item/weapon/rcd/Topic(href, href_list, nowindow, state)
if(..())
return 1
-
+
if(prob(20))
spark_system.start()
-
+
if(href_list["mode"])
mode = text2num(href_list["mode"])
. = 1
-
+
if(href_list["door_type"])
var/new_door_type = text2path(href_list["door_type"])
if(!(new_door_type in allowed_door_types))
@@ -125,11 +125,11 @@ RCD
return
door_type = new_door_type
. = 1
-
+
if(href_list["menu"])
menu = text2num(href_list["menu"])
. = 1
-
+
if(href_list["login"])
if(istype(usr,/mob/living/silicon))
locked = 0
@@ -142,15 +142,15 @@ RCD
if(istype(ID) && ID && check_access(ID))
locked = 0
. = 1
-
+
if(href_list["logout"])
locked = 1
. = 1
-
+
if(href_list["toggle_one_access"] && !locked)
one_access = !one_access
. = 1
-
+
if(href_list["toggle_access"] && !locked)
var/href_access = text2num(href_list["toggle_access"])
if(href_access in door_accesses)
@@ -251,10 +251,10 @@ RCD
qdel(A)
return 1
return 0
-
+
if(istype(A, /obj/structure/window)) // You mean the grille of course, do you?
A = locate(/obj/structure/grille) in A.loc
-
+
if(istype(A, /obj/structure/grille))
if(!checkResource(2, user))
return 0
@@ -326,7 +326,7 @@ RCD
else
to_chat(user, "ERROR: RCD in MODE: [mode] attempted use by [user]. Send this text #coderbus or an admin.")
return 0
-
+
nanomanager.update_uis(src)
/obj/item/weapon/rcd/proc/useResource(var/amount, var/mob/user)
@@ -354,6 +354,18 @@ RCD
desc = "A device used to rapidly build and deconstruct walls and floors."
canRwall = 1
+
+/obj/item/weapon/rcd/proc/detonate_pulse()
+ audible_message("[src] begins to vibrate and \
+ buzz loudly!","[src] begins \
+ vibrating violently!")
+ // 5 seconds to get rid of it
+ addtimer(src, "detonate_pulse_explode", 50)
+
+/obj/item/weapon/rcd/proc/detonate_pulse_explode()
+ explosion(src, 0, 0, 3, 1, flame_range = 1)
+ qdel(src)
+
/obj/item/weapon/rcd/combat
name = "combat RCD"
max_matter = 500
diff --git a/code/game/objects/items/weapons/bee_briefcase.dm b/code/game/objects/items/weapons/bee_briefcase.dm
index 665ad549bd2..98f3fc1709b 100644
--- a/code/game/objects/items/weapons/bee_briefcase.dm
+++ b/code/game/objects/items/weapons/bee_briefcase.dm
@@ -64,6 +64,7 @@
//Play sound through the station intercomms, so everyone knows the doom you have wrought.
for(var/O in global_intercoms)
var/obj/item/device/radio/intercom/I = O
+ // TODO: Tie into space manager
if(I.z != ZLEVEL_STATION) //Only broadcast to the station intercoms
continue
if(!I.on) //Only broadcast to active intercoms (powered, switched on)
@@ -75,4 +76,4 @@
var/mob/living/simple_animal/hostile/poison/bees/syndi/B = new /mob/living/simple_animal/hostile/poison/bees/syndi(null)
B.master_and_friends = blood_list //Doesn't automatically add the person who opens the case, so the bees will attack the user unless they gave their blood
B.forceMove(get_turf(user)) //RELEASE THE BEES!
- bees_left -= 5
\ No newline at end of file
+ bees_left -= 5
diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm
index 0ee843fe85c..d1721c5c247 100644
--- a/code/game/objects/items/weapons/cards_ids.dm
+++ b/code/game/objects/items/weapons/cards_ids.dm
@@ -105,13 +105,13 @@
var/photo
var/dat
var/stamped = 0
-
+
var/obj/item/weapon/card/id/guest/guest_pass = null // Guest pass attached to the ID
/obj/item/weapon/card/id/New()
..()
spawn(30)
- if(ishuman(loc))
+ if(ishuman(loc) && blood_type == "\[UNSET\]")
var/mob/living/carbon/human/H = loc
SetOwnerInfo(H)
@@ -242,10 +242,10 @@
set name = "Remove Guest Pass"
set category = "Object"
set src in range(0)
-
+
if(usr.stat || !usr.canmove || usr.restrained())
return
-
+
if(guest_pass)
to_chat(usr, "You remove the guest pass from this ID.")
guest_pass.forceMove(get_turf(src))
@@ -253,6 +253,37 @@
else
to_chat(usr, "There is no guest pass attached to this ID")
+/obj/item/weapon/card/id/serialize()
+ var/list/data = ..()
+
+ data["sex"] = sex
+ data["age"] = age
+ data["btype"] = blood_type
+ data["dna_hash"] = dna_hash
+ data["fprint_hash"] = fingerprint_hash
+ data["access"] = access
+ data["job"] = assignment
+ data["account"] = associated_account_number
+ data["owner"] = registered_name
+ data["mining"] = mining_points
+ return data
+
+/obj/item/weapon/card/id/deserialize(list/data)
+ sex = data["sex"]
+ age = data["age"]
+ blood_type = data["btype"]
+ dna_hash = data["dna_hash"]
+ fingerprint_hash = data["fprint_hash"]
+ access = data["access"] // No need for a copy, the list isn't getting touched
+ assignment = data["job"]
+ associated_account_number = data["account"]
+ registered_name = data["owner"]
+ mining_points = data["mining"]
+ // We'd need to use icon serialization(b64) to save the photo, and I don't feel like i
+ UpdateName()
+ RebuildHTML()
+ ..()
+
/obj/item/weapon/card/id/silver
name = "identification card"
desc = "A silver card which shows honour and dedication."
@@ -767,4 +798,4 @@
if("TDgreen")
return "Thunderdome Green"
else
- return capitalize(skin)
\ No newline at end of file
+ return capitalize(skin)
diff --git a/code/game/objects/items/weapons/cash.dm b/code/game/objects/items/weapons/cash.dm
index 7c1432bb772..3608d7861f3 100644
--- a/code/game/objects/items/weapons/cash.dm
+++ b/code/game/objects/items/weapons/cash.dm
@@ -23,6 +23,7 @@ var/global/list/moneytypes=list(
throw_speed = 1
throw_range = 2
w_class = 1
+ burn_state = FLAMMABLE
var/access = list()
access = access_crate_cash
var/worth = 1 // Per chip
diff --git a/code/game/objects/items/weapons/cigs.dm b/code/game/objects/items/weapons/cigs.dm
index a06619fcca4..8449e17a9db 100644
--- a/code/game/objects/items/weapons/cigs.dm
+++ b/code/game/objects/items/weapons/cigs.dm
@@ -59,6 +59,9 @@ LIGHTERS ARE IN LIGHTERS.DM
return ..()
+/obj/item/clothing/mask/cigarette/fire_act()
+ light()
+
/obj/item/clothing/mask/cigarette/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/weapon/weldingtool))
@@ -110,7 +113,7 @@ LIGHTERS ARE IN LIGHTERS.DM
to_chat(user, "[src] is full.")
-/obj/item/clothing/mask/cigarette/proc/light(var/flavor_text = "[usr] lights the [name].")
+/obj/item/clothing/mask/cigarette/proc/light(flavor_text = null)
if(!src.lit)
src.lit = 1
damtype = "fire"
@@ -136,8 +139,9 @@ LIGHTERS ARE IN LIGHTERS.DM
reagents.handle_reactions()
icon_state = icon_on
item_state = icon_on
- var/turf/T = get_turf(src)
- T.visible_message(flavor_text)
+ if(flavor_text)
+ var/turf/T = get_turf(src)
+ T.visible_message(flavor_text)
set_light(2, 0.25, "#E38F46")
processing_objects.Add(src)
@@ -321,14 +325,15 @@ LIGHTERS ARE IN LIGHTERS.DM
..()
reagents.add_reagent("nicotine", chem_volume)
-/obj/item/clothing/mask/cigarette/pipe/light(var/flavor_text = "[usr] lights the [name].")
+/obj/item/clothing/mask/cigarette/pipe/light(flavor_text = null)
if(!src.lit)
src.lit = 1
damtype = "fire"
icon_state = icon_on
item_state = icon_on
- var/turf/T = get_turf(src)
- T.visible_message(flavor_text)
+ if(flavor_text)
+ var/turf/T = get_turf(src)
+ T.visible_message(flavor_text)
processing_objects.Add(src)
/obj/item/clothing/mask/cigarette/pipe/process()
diff --git a/code/game/objects/items/weapons/courtroom.dm b/code/game/objects/items/weapons/courtroom.dm
index f070a1fe4ad..055faa03a8c 100644
--- a/code/game/objects/items/weapons/courtroom.dm
+++ b/code/game/objects/items/weapons/courtroom.dm
@@ -11,6 +11,7 @@
throwforce = 6.0
w_class = 2
attack_verb = list("bashed", "battered", "judged", "whacked")
+ burn_state = FLAMMABLE
/obj/item/weapon/gavelhammer/suicide_act(mob/user)
user.visible_message("[user] has sentenced \himself to death with the [src.name]! It looks like \he's trying to commit suicide.")
@@ -25,6 +26,7 @@
force = 2.0
throwforce = 2.0
w_class = 1
+ burn_state = FLAMMABLE
/obj/item/weapon/gavelblock/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/gavelhammer))
diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm
index 0ec893b53a6..6dcbef385b0 100644
--- a/code/game/objects/items/weapons/gift_wrappaper.dm
+++ b/code/game/objects/items/weapons/gift_wrappaper.dm
@@ -13,6 +13,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "gift1"
item_state = "gift1"
+ burn_state = FLAMMABLE
/obj/item/weapon/a_gift/New()
..()
@@ -139,6 +140,7 @@
flags = NOBLUDGEON
amount = 25
max_amount = 25
+ burn_state = FLAMMABLE
/obj/item/stack/wrapping_paper/attack_self(mob/user)
to_chat(user, "You need to use it on a package that has already been wrapped!")
diff --git a/code/game/objects/items/weapons/grenades/atmosgrenade.dm b/code/game/objects/items/weapons/grenades/atmosgrenade.dm
new file mode 100644
index 00000000000..4bfda1ab659
--- /dev/null
+++ b/code/game/objects/items/weapons/grenades/atmosgrenade.dm
@@ -0,0 +1,24 @@
+
+
+
+/obj/item/weapon/grenade/gas
+ name = "Plasma Fire Grenade"
+ desc = "A compressed plasma grenade, used to start horrific plasma fires."
+ origin_tech = "materials=3;magnets=4;syndicate=4"
+ icon = 'icons/obj/grenade.dmi'
+ icon_state = "syndicate"
+ item_state = "flashbang"
+ var/spawn_contents = SPAWN_HEAT | SPAWN_TOXINS
+ var/spawn_amount = 100
+
+/obj/item/weapon/grenade/gas/prime()
+ var/turf/simulated/target_turf = get_turf(src)
+ if(istype(target_turf))
+ target_turf.atmos_spawn_air(spawn_contents, spawn_amount)
+ target_turf.air_update_turf()
+ qdel(src)
+
+/obj/item/weapon/grenade/gas/knockout
+ name = "Knockout Grenade"
+ desc = "A grenade that completely removes all air and heat from its detonation area."
+ spawn_contents = SPAWN_20C | SPAWN_N2O
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/grenades/clusterbuster.dm b/code/game/objects/items/weapons/grenades/clusterbuster.dm
index 8ba1782cf18..851c625b765 100644
--- a/code/game/objects/items/weapons/grenades/clusterbuster.dm
+++ b/code/game/objects/items/weapons/grenades/clusterbuster.dm
@@ -242,6 +242,16 @@
desc = "Reserved for those pesky request."
payload = /mob/living/simple_animal/crab
+/obj/item/weapon/grenade/clusterbuster/plasma
+ name = "Plasma Cluster Grenade"
+ desc = "For when everything needs to die in a fire."
+ payload = /obj/item/weapon/grenade/gas
+
+/obj/item/weapon/grenade/clusterbuster/n2o
+ name = "N2O Cluster Grenade"
+ desc = "For when you need to knock out EVERYONE."
+ payload = /obj/item/weapon/grenade/gas/knockout
+
////////////Clusterbuster of Clusterbusters////////////
/obj/item/weapon/grenade/clusterbuster/mega_fox
diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm
index 8cbd76041bd..af855e63016 100644
--- a/code/game/objects/items/weapons/grenades/grenade.dm
+++ b/code/game/objects/items/weapons/grenades/grenade.dm
@@ -9,6 +9,8 @@
throw_range = 20
flags = CONDUCT
slot_flags = SLOT_BELT
+ burn_state = FLAMMABLE
+ burntime = 5
var/active = 0
var/det_time = 50
var/display_timer = 1
diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm
index 2fb7b0de0b8..4e63ee67497 100644
--- a/code/game/objects/items/weapons/handcuffs.dm
+++ b/code/game/objects/items/weapons/handcuffs.dm
@@ -65,7 +65,7 @@
/obj/item/weapon/restraints/handcuffs/cable
name = "cable restraints"
desc = "Looks like some cables tied together. Could be used to tie something up."
- icon_state = "cuff_red"
+ icon_state = "cuff_white"
materials = list(MAT_METAL=150, MAT_GLASS=75)
breakouttime = 300 //Deciseconds = 30s
cuffsound = 'sound/weapons/cablecuff.ogg'
diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm
index 8b5baf79a35..12219eadd0b 100644
--- a/code/game/objects/items/weapons/mop.dm
+++ b/code/game/objects/items/weapons/mop.dm
@@ -11,6 +11,7 @@
throw_range = 7
w_class = 3
attack_verb = list("mopped", "bashed", "bludgeoned", "whacked")
+ burn_state = FLAMMABLE
var/mopping = 0
var/mopcount = 0
var/mopcap = 5
diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm
index a7741267d09..67d4f078264 100644
--- a/code/game/objects/items/weapons/paint.dm
+++ b/code/game/objects/items/weapons/paint.dm
@@ -8,6 +8,8 @@
item_state = "paintcan"
materials = list(MAT_METAL=200)
w_class = 3
+ burn_state = FLAMMABLE
+ burntime = 5
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(5,10,20,30,50,70)
volume = 70
diff --git a/code/game/objects/items/weapons/pneumaticCannon.dm b/code/game/objects/items/weapons/pneumaticCannon.dm
index d7c33164543..3e8dbb6239d 100644
--- a/code/game/objects/items/weapons/pneumaticCannon.dm
+++ b/code/game/objects/items/weapons/pneumaticCannon.dm
@@ -16,6 +16,14 @@
var/list/loadedItems = list() //The items loaded into the cannon that will be fired out
var/pressureSetting = 1 //How powerful the cannon is - higher pressure = more gas but more powerful throws
+/obj/item/weapon/pneumatic_cannon/Destroy()
+ if(tank)
+ qdel(tank)
+ tank = null
+ for(var/obj/item/I in loadedItems)
+ qdel(I)
+ loadedItems.Cut()
+ return ..()
/obj/item/weapon/pneumatic_cannon/examine(mob/user)
..()
diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm
index 90c98c6fdac..de419dc1b7d 100644
--- a/code/game/objects/items/weapons/scrolls.dm
+++ b/code/game/objects/items/weapons/scrolls.dm
@@ -9,6 +9,7 @@
throw_speed = 4
throw_range = 20
origin_tech = "bluespace=4"
+ burn_state = FLAMMABLE
/obj/item/weapon/teleportation_scroll/apprentice
name = "lesser scroll of teleportation"
diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm
index 809bf0d298d..be831bbe0d1 100644
--- a/code/game/objects/items/weapons/shields.dm
+++ b/code/game/objects/items/weapons/shields.dm
@@ -44,6 +44,7 @@
icon_state = "buckler"
item_state = "buckler"
materials = list()
+ burn_state = FLAMMABLE
block_chance = 30
/obj/item/weapon/shield/energy
diff --git a/code/game/objects/items/weapons/signs.dm b/code/game/objects/items/weapons/signs.dm
index 00ac859528d..fa68b09135e 100644
--- a/code/game/objects/items/weapons/signs.dm
+++ b/code/game/objects/items/weapons/signs.dm
@@ -6,6 +6,7 @@
force = 5
w_class = 4
attack_verb = list("bashed","smacked")
+ burn_state = FLAMMABLE
var/delayed = 0 //used to do delays
diff --git a/code/game/objects/items/weapons/staff.dm b/code/game/objects/items/weapons/staff.dm
index ffaadb59d59..19c771873ce 100644
--- a/code/game/objects/items/weapons/staff.dm
+++ b/code/game/objects/items/weapons/staff.dm
@@ -10,6 +10,7 @@
w_class = 2
armour_penetration = 100
attack_verb = list("bludgeoned", "whacked", "disciplined")
+ burn_state = FLAMMABLE
/obj/item/weapon/twohanded/staff/broom
name = "broom"
diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm
index fa8de4f51bf..c664ca9fff9 100644
--- a/code/game/objects/items/weapons/storage/backpack.dm
+++ b/code/game/objects/items/weapons/storage/backpack.dm
@@ -15,6 +15,8 @@
max_w_class = 3
max_combined_w_class = 21
storage_slots = 21
+ burn_state = FLAMMABLE
+ burntime = 20
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/back.dmi'
@@ -22,7 +24,7 @@
/obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
playsound(src.loc, "rustle", 50, 1, -5)
- ..()
+ return ..()
/*
* Backpack Types
@@ -35,6 +37,7 @@
icon_state = "holdingpack"
max_w_class = 5
max_combined_w_class = 35
+ burn_state = FIRE_PROOF
New()
..()
@@ -123,12 +126,14 @@
desc = "It's a special backpack made exclusively for Nanotrasen officers."
icon_state = "captainpack"
item_state = "captainpack"
+ burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/industrial
name = "industrial backpack"
desc = "It's a tough backpack for the daily grind of station life."
icon_state = "engiepack"
item_state = "engiepack"
+ burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/botany
name = "botany backpack"
@@ -153,6 +158,7 @@
desc = "A specially designed backpack. It's fire resistant and smells vaguely of plasma."
icon_state = "toxpack"
item_state = "toxpack"
+ burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/virology
name = "virology backpack"
@@ -168,6 +174,7 @@
name = "leather satchel"
desc = "It's a very fancy satchel made with fine leather."
icon_state = "satchel"
+ burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/satcheldeluxe
name = "leather satchel"
@@ -188,6 +195,7 @@
name = "industrial satchel"
desc = "A tough satchel with extra pockets."
icon_state = "satchel-eng"
+ burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/satchel_med
name = "medical satchel"
@@ -213,6 +221,7 @@
name = "scientist satchel"
desc = "Useful for holding research materials."
icon_state = "satchel-tox"
+ burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/satchel_sec
name = "security satchel"
@@ -228,6 +237,7 @@
name = "captain's satchel"
desc = "An exclusive satchel for Nanotrasen officers."
icon_state = "satchel-cap"
+ burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/satchel_flat
name = "smuggler's satchel"
@@ -266,8 +276,8 @@
slowdown = 1
/obj/item/weapon/storage/backpack/duffel/syndie
- name = "suspicious looking dufflebag"
- desc = "A large dufflebag for holding extra tactical supplies."
+ name = "suspicious looking duffelbag"
+ desc = "A large duffelbag for holding extra tactical supplies."
icon_state = "duffel-syndi"
item_state = "duffel-syndimed"
origin_tech = "syndicate=1"
@@ -287,7 +297,7 @@
item_state = "duffel-syndiammo"
/obj/item/weapon/storage/backpack/duffel/syndie/ammo/loaded
- desc = "A large dufflebag, packed to the brim with Bulldog shotgun ammo."
+ desc = "A large duffelbag, packed to the brim with Bulldog shotgun ammo."
/obj/item/weapon/storage/backpack/duffel/syndie/ammo/loaded/New()
..()
@@ -302,10 +312,10 @@
new /obj/item/ammo_box/magazine/m12g/dragon(src)
/obj/item/weapon/storage/backpack/duffel/syndie/surgery
- name = "surgery dufflebag"
- desc = "A suspicious looking dufflebag for holding surgery tools."
+ name = "surgery duffelbag"
+ desc = "A suspicious looking duffelbag for holding surgery tools."
icon_state = "duffel-syndimed"
- item_state = "duffle-syndimed"
+ item_state = "duffel-syndimed"
/obj/item/weapon/storage/backpack/duffel/syndie/surgery/New()
..()
@@ -323,10 +333,10 @@
new /obj/item/device/mmi/syndie(src)
/obj/item/weapon/storage/backpack/duffel/syndie/surgery_fake //for maint spawns
- name = "surgery dufflebag"
- desc = "A suspicious looking dufflebag for holding surgery tools."
+ name = "surgery duffelbag"
+ desc = "A suspicious looking duffelbag for holding surgery tools."
icon_state = "duffel-syndimed"
- item_state = "duffle-syndimed"
+ item_state = "duffel-syndimed"
/obj/item/weapon/storage/backpack/duffel/syndie/surgery_fake/New()
..()
@@ -346,6 +356,7 @@
desc = "A duffelbag designed to hold large quantities of condoms."
icon_state = "duffel-captain"
item_state = "duffel-captain"
+ burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/duffel/security
name = "security duffelbag"
@@ -388,6 +399,7 @@
desc = "A duffelbag designed to hold tools."
icon_state = "duffel-eng"
item_state = "duffel-eng"
+ burn_state = FIRE_PROOF
/obj/item/weapon/storage/backpack/duffel/hydro
name = "hydroponics duffelbag"
diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm
index 66cb11a9dd6..395d27d0300 100644
--- a/code/game/objects/items/weapons/storage/bags.dm
+++ b/code/game/objects/items/weapons/storage/bags.dm
@@ -162,7 +162,7 @@
max_w_class = 3
w_class = 1
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/grown","/obj/item/seeds","/obj/item/weapon/grown", "/obj/item/stack/tile/grass","/obj/item/stack/medical/ointment/aloe","/obj/item/stack/medical/bruise_pack/comfrey", "/obj/item/weapon/reagent_containers/honeycomb")
-
+ burn_state = FLAMMABLE
/obj/item/weapon/storage/bag/plants/portaseeder
name = "portable seed extractor"
@@ -375,7 +375,8 @@
max_combined_w_class = 21
max_w_class = 3
w_class = 4 //Bigger than a book because physics
- can_hold = list("/obj/item/weapon/book", "/obj/item/weapon/spellbook") //No bibles, consistent with bookcase
+ can_hold = list("/obj/item/weapon/book", "/obj/item/weapon/storage/bible", "/obj/item/weapon/tome", "/obj/item/weapon/spellbook")
+ burn_state = FLAMMABLE
/*
* Trays - Agouri
@@ -484,7 +485,7 @@
max_combined_w_class = 200
w_class = 1
can_hold = list("/obj/item/weapon/reagent_containers/food/pill","/obj/item/weapon/reagent_containers/glass/beaker","/obj/item/weapon/reagent_containers/glass/bottle")
-
+ burn_state = FLAMMABLE
/*
* Biowaste bag (mostly for xenobiologists)
*/
@@ -497,4 +498,5 @@
storage_slots = 25
max_combined_w_class = 200
w_class = 1
- can_hold = list("/obj/item/slime_extract","/obj/item/weapon/reagent_containers/food/snacks/monkeycube","/obj/item/weapon/reagent_containers/syringe","/obj/item/weapon/reagent_containers/glass/beaker","/obj/item/weapon/reagent_containers/glass/bottle","/obj/item/weapon/reagent_containers/blood","/obj/item/weapon/reagent_containers/hypospray/autoinjector")
\ No newline at end of file
+ can_hold = list("/obj/item/slime_extract","/obj/item/weapon/reagent_containers/food/snacks/monkeycube","/obj/item/weapon/reagent_containers/syringe","/obj/item/weapon/reagent_containers/glass/beaker","/obj/item/weapon/reagent_containers/glass/bottle","/obj/item/weapon/reagent_containers/blood","/obj/item/weapon/reagent_containers/hypospray/autoinjector")
+ burn_state = FLAMMABLE
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm
index a0e3d4dd69e..23f8f9ea685 100644
--- a/code/game/objects/items/weapons/storage/belt.dm
+++ b/code/game/objects/items/weapons/storage/belt.dm
@@ -37,7 +37,9 @@
src.add_fingerprint(usr)
return
-
+/obj/item/weapon/storage/belt/deserialize(list/data)
+ ..()
+ update_icon()
/obj/item/weapon/storage/belt/utility
name = "tool-belt" //Carn: utility belt is nicer, but it bamboozles the text parsing.
diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm
index 57332ae24d6..b98805e3275 100644
--- a/code/game/objects/items/weapons/storage/bible.dm
+++ b/code/game/objects/items/weapons/storage/bible.dm
@@ -5,6 +5,7 @@
throw_speed = 1
throw_range = 5
w_class = 3
+ burn_state = FLAMMABLE
var/mob/affecting = null
var/deity_name = "Christ"
diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm
index 76cbc9ab102..bfdc3a80727 100644
--- a/code/game/objects/items/weapons/storage/boxes.dm
+++ b/code/game/objects/items/weapons/storage/boxes.dm
@@ -24,6 +24,7 @@
desc = "It's just an ordinary box."
icon_state = "box"
item_state = "syringe_kit"
+ burn_state = FLAMMABLE
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
/obj/item/weapon/storage/box/large
diff --git a/code/game/objects/items/weapons/storage/briefcase.dm b/code/game/objects/items/weapons/storage/briefcase.dm
index 543865aa592..7f2a91054c1 100644
--- a/code/game/objects/items/weapons/storage/briefcase.dm
+++ b/code/game/objects/items/weapons/storage/briefcase.dm
@@ -12,6 +12,8 @@
max_w_class = 3
max_combined_w_class = 21
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
+ burn_state = FLAMMABLE
+ burntime = 20
/obj/item/weapon/storage/briefcase/New()
..()
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm
index 367874b0d7d..c4488216b12 100644
--- a/code/game/objects/items/weapons/storage/fancy.dm
+++ b/code/game/objects/items/weapons/storage/fancy.dm
@@ -17,6 +17,7 @@
icon = 'icons/obj/food/food.dmi'
icon_state = "donutbox6"
name = "donut box"
+ burn_state = FLAMMABLE
var/icon_type = "donut"
/obj/item/weapon/storage/fancy/update_icon(var/itemremoved = 0)
diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm
index 0c03e65beab..03ba6bed54b 100644
--- a/code/game/objects/items/weapons/storage/firstaid.dm
+++ b/code/game/objects/items/weapons/storage/firstaid.dm
@@ -138,15 +138,15 @@
/obj/item/weapon/storage/firstaid/adv/New()
..()
- if(empty) return
- new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src )
- new /obj/item/stack/medical/bruise_pack/advanced(src)
+ if(empty)
+ return
+ new /obj/item/stack/medical/bruise_pack(src)
new /obj/item/stack/medical/bruise_pack/advanced(src)
new /obj/item/stack/medical/bruise_pack/advanced(src)
new /obj/item/stack/medical/ointment/advanced(src)
new /obj/item/stack/medical/ointment/advanced(src)
- new /obj/item/stack/medical/splint(src)
- return
+ new /obj/item/weapon/reagent_containers/hypospray/autoinjector(src)
+ new /obj/item/device/healthanalyzer(src)
/obj/item/weapon/storage/firstaid/adv/empty
empty = 1
diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm
index e2324fcb434..c34b392430e 100644
--- a/code/game/objects/items/weapons/storage/storage.dm
+++ b/code/game/objects/items/weapons/storage/storage.dm
@@ -323,7 +323,7 @@
return 1
//Call this proc to handle the removal of an item from the storage item. The item will be moved to the atom sent as new_target
-/obj/item/weapon/storage/proc/remove_from_storage(obj/item/W as obj, atom/new_location)
+/obj/item/weapon/storage/proc/remove_from_storage(obj/item/W as obj, atom/new_location, burn = 0)
if(!istype(W)) return 0
if(istype(src, /obj/item/weapon/storage/fancy))
@@ -357,8 +357,14 @@
W.on_exit_storage(src)
update_icon()
W.mouse_opacity = initial(W.mouse_opacity)
+ if(burn)
+ W.fire_act()
return 1
+/obj/item/weapon/storage/empty_object_contents(burn, loc)
+ for(var/obj/item/Item in contents)
+ remove_from_storage(Item, loc, burn)
+
//This proc is called when you want to place an item into the storage item.
/obj/item/weapon/storage/attackby(obj/item/W as obj, mob/user as mob, params)
..()
@@ -541,3 +547,34 @@
return depth
+/obj/item/weapon/storage/serialize()
+ var data = ..()
+ var/list/content_list = list()
+ data["content"] = content_list
+ data["slots"] = storage_slots
+ data["max_w_class"] = max_w_class
+ data["max_c_w_class"] = max_combined_w_class
+ for(var/thing in contents)
+ var/atom/movable/AM = thing
+ // This code does not watch out for infinite loops
+ // But then again a tesseract would destroy the server anyways
+ // Also I wish I could just insert a list instead of it reading it the wrong way
+ content_list.len++
+ content_list[content_list.len] = AM.serialize()
+ return data
+
+/obj/item/weapon/storage/deserialize(list/data)
+ if(isnum(data["slots"]))
+ storage_slots = data["slots"]
+ if(isnum(data["max_w_class"]))
+ max_w_class = data["max_w_class"]
+ if(isnum(data["max_c_w_class"]))
+ max_combined_w_class = data["max_c_w_class"]
+ for(var/thing in contents)
+ qdel(thing) // out with the old
+ for(var/thing in data["content"])
+ if(islist(thing))
+ list_to_object(thing, src)
+ else
+ log_debug("Non-list thing: [thing]. We are a [name]")
+ ..()
diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm
index 71d488672aa..ac994fe4b77 100644
--- a/code/game/objects/items/weapons/storage/uplink_kits.dm
+++ b/code/game/objects/items/weapons/storage/uplink_kits.dm
@@ -195,4 +195,13 @@
new /obj/item/ammo_casing/shotgun/dart/assassination(src)
new /obj/item/ammo_casing/shotgun/dart/assassination(src)
new /obj/item/ammo_casing/shotgun/dart/assassination(src)
- new /obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/cane(src)
\ No newline at end of file
+ new /obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/cane(src)
+
+
+/obj/item/weapon/storage/box/syndie_kit/atmosgasgrenades
+ name = "Atmos Grenades"
+
+/obj/item/weapon/storage/box/syndie_kit/atmosgasgrenades/New()
+ ..()
+ new /obj/item/weapon/grenade/clusterbuster/plasma(src)
+ new /obj/item/weapon/grenade/clusterbuster/n2o(src)
diff --git a/code/game/objects/items/weapons/storage/wallets.dm b/code/game/objects/items/weapons/storage/wallets.dm
index e34f9687d7e..5bc1ae65e84 100644
--- a/code/game/objects/items/weapons/storage/wallets.dm
+++ b/code/game/objects/items/weapons/storage/wallets.dm
@@ -5,6 +5,7 @@
icon = 'icons/obj/wallets.dmi'
icon_state = "wallet"
w_class = 2
+ burn_state = FLAMMABLE
can_hold = list(
"/obj/item/weapon/spacecash",
"/obj/item/weapon/card",
diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm
index c0935f5d316..3e7b63857cb 100644
--- a/code/game/objects/items/weapons/stunbaton.dm
+++ b/code/game/objects/items/weapons/stunbaton.dm
@@ -23,6 +23,12 @@
update_icon()
return
+/obj/item/weapon/melee/baton/Destroy()
+ if(bcell)
+ qdel(bcell)
+ bcell = null
+ return ..()
+
/obj/item/weapon/melee/baton/CheckParts(list/parts_list)
..()
bcell = locate(/obj/item/weapon/stock_parts/cell) in contents
diff --git a/code/game/objects/items/weapons/table_rack_parts.dm b/code/game/objects/items/weapons/table_rack_parts.dm
index 62c2f7aabfd..3073125bae0 100644
--- a/code/game/objects/items/weapons/table_rack_parts.dm
+++ b/code/game/objects/items/weapons/table_rack_parts.dm
@@ -40,6 +40,7 @@
icon_state = "wood_tableparts"
flags = null
upgradable = 0
+ burn_state = FLAMMABLE
result = /obj/structure/table/woodentable
parts = list(
/obj/item/stack/sheet/wood,
diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm
index 9415e49d3cd..4ec1b1587c8 100644
--- a/code/game/objects/items/weapons/tanks/tanks.dm
+++ b/code/game/objects/items/weapons/tanks/tanks.dm
@@ -35,6 +35,7 @@
/obj/item/weapon/tank/Destroy()
if(air_contents)
qdel(air_contents)
+ air_contents = null
processing_objects.Remove(src)
diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm
index e6e88563d4b..9068460ae80 100644
--- a/code/game/objects/items/weapons/tanks/watertank.dm
+++ b/code/game/objects/items/weapons/tanks/watertank.dm
@@ -373,7 +373,8 @@
V.visible_message("[V] was frozen shut!")
for(var/mob/living/L in T)
L.ExtinguishMob()
- return
+ for(var/obj/item/Item in T)
+ Item.extinguish()
/datum/effect/system/freezing_smoke_spread
diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm
index 4728e8c730e..decfa424872 100644
--- a/code/game/objects/items/weapons/teleportation.dm
+++ b/code/game/objects/items/weapons/teleportation.dm
@@ -48,6 +48,7 @@ Frequency:
return 1
var/turf/current_location = get_turf(usr)//What turf is the user on?
+ // TODO: Tie into space manager
if(!current_location ||( current_location.z in config.admin_levels))//If turf was not found or they're on z level 2.
to_chat(usr, "\The [src] is malfunctioning.")
return 1
@@ -61,6 +62,7 @@ Frequency:
for(var/obj/item/device/radio/beacon/W in beacons)
if(W.frequency == frequency && !W.syndicate)
+ // TODO: Tie into space manager
if(W && W.z == z)
var/turf/TB = get_turf(W)
temp += "[W.code]: [TB.x], [TB.y], [TB.z] "
@@ -107,7 +109,8 @@ Frequency:
/obj/item/weapon/hand_tele/attack_self(mob/user as mob)
var/turf/current_location = get_turf(user)//What turf is the user on?
- if(!current_location||(current_location.z in config.admin_levels)||current_location.z>=7)//If turf was not found or they're on z level 2 or >7 which does not currently exist.
+ // TODO: Tie into space manager
+ if(!current_location||(current_location.z in config.admin_levels)||current_location.z>=ZLEVEL_EMPTY)//If turf was not found or they're on z level 2 or >7 which does not currently exist.
to_chat(user, "\The [src] is malfunctioning.")
return
var/list/L = list( )
diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm
index 88138657270..da21397529d 100644
--- a/code/game/objects/items/weapons/twohanded.dm
+++ b/code/game/objects/items/weapons/twohanded.dm
@@ -140,7 +140,7 @@
if(get_dist(src,user) > 1)
return 0
if(H != null)
- user.visible_message("[src.name] is too cumbersome to carry in one hand!")
+ to_chat(user, "[src.name] is too cumbersome to carry in one hand!")
return
var/obj/item/weapon/twohanded/offhand/O = new(user)
user.put_in_inactive_hand(O)
@@ -365,6 +365,7 @@
if(!L.stat && prob(50))
var/mob/living/simple_animal/hostile/illusion/M = new(user.loc)
M.faction = user.faction.Copy()
+ M.attack_sound = hitsound
M.Copy_Parent(user, 100, user.health/2.5, 12, 30)
M.GiveTarget(L)
@@ -693,3 +694,55 @@
Z.ex_act(2)
charged = 3
playsound(user, 'sound/weapons/marauder.ogg', 50, 1)
+
+// Energized Fire axe
+/obj/item/weapon/twohanded/energizedfireaxe
+ name = "energized fire axe"
+ desc = "Someone with a love for fire axes decided to turn one into a single-charge energy weapon. Seems excessive."
+ icon_state = "fireaxe0"
+ force = 5
+ throwforce = 15
+ sharp = 1
+ edge = 1
+ w_class = 5
+ armour_penetration = 20
+ slot_flags = SLOT_BACK
+ force_unwielded = 5
+ force_wielded = 30
+ attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
+ hitsound = 'sound/weapons/bladeslice.ogg'
+ var/charged = 1
+
+/obj/item/weapon/twohanded/energizedfireaxe/update_icon()
+ if(wielded)
+ icon_state = "fireaxe2"
+ else
+ icon_state = "fireaxe0"
+
+/obj/item/weapon/twohanded/energizedfireaxe/afterattack(atom/A, mob/user, proximity)
+ if(!proximity)
+ return
+ if(wielded)
+ if(istype(A, /mob/living))
+ var/mob/living/Z = A
+ if(charged)
+ charged--
+ Z.take_organ_damage(0,30)
+ user.visible_message("[user] slams the charged axe into [Z.name] with all their might!")
+ playsound(loc, 'sound/magic/lightningbolt.ogg', 5, 1)
+ var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread
+ sparks.set_up(1, 1, src)
+ sparks.start()
+
+ if(A && wielded && (istype(A, /obj/structure/window) || istype(A, /obj/structure/grille)))
+ if(istype(A, /obj/structure/window))
+ var/obj/structure/window/W = A
+ W.destroy()
+ if(prob(4))
+ charged++
+ user.visible_message("The axe starts to emit an electric buzz!")
+ else
+ qdel(A)
+ if(prob(4))
+ charged++
+ user.visible_message("The axe starts to emit an electric buzz!")
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index 4e318d26fed..7c5fe09dd06 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -16,7 +16,9 @@
var/Mtoollink = 0 // variable to decide if an object should show the multitool menu linking menu, not all objects use it
-
+ var/burn_state = FIRE_PROOF // LAVA_PROOF | FIRE_PROOF | FLAMMABLE | ON_FIRE
+ var/burntime = 10 //How long it takes to burn to ashes, in seconds
+ var/burn_world_time //What world time the object will burn up completely
var/being_shocked = 0
var/on_blueprints = FALSE //Are we visible on the station blueprints at roundstart?
@@ -288,4 +290,32 @@ a {
being_shocked = 0
/obj/proc/CanAStarPass()
- . = !density
\ No newline at end of file
+ . = !density
+
+/obj/fire_act(global_overlay=1)
+ if(!burn_state)
+ burn_state = ON_FIRE
+ fire_master.burning += src
+ burn_world_time = world.time + burntime*rand(10,20)
+ if(global_overlay)
+ overlays += fire_overlay
+ return 1
+
+/obj/proc/burn()
+ empty_object_contents(1, loc)
+ var/obj/effect/decal/cleanable/ash/A = new(loc)
+ A.desc = "Looks like this used to be a [name] some time ago."
+ fire_master.burning -= src
+ qdel(src)
+
+/obj/proc/extinguish()
+ if(burn_state == ON_FIRE)
+ burn_state = FLAMMABLE
+ overlays -= fire_overlay
+ fire_master.burning -= src
+
+/obj/proc/empty_object_contents(burn = 0, new_loc = loc)
+ for(var/obj/item/Item in contents) //Empty out the contents
+ Item.forceMove(new_loc)
+ if(burn)
+ Item.fire_act() //Set them on fire, too
\ No newline at end of file
diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm
index 9251890dc6e..045f58d577d 100644
--- a/code/game/objects/structures/artstuff.dm
+++ b/code/game/objects/structures/artstuff.dm
@@ -15,6 +15,8 @@
icon = 'icons/obj/artstuff.dmi'
icon_state = "easel"
density = 1
+ burn_state = FLAMMABLE
+ burntime = 15
var/obj/item/weapon/canvas/painting = null
@@ -56,6 +58,7 @@ var/global/list/globalBlankCanvases[AMT_OF_CANVASES]
desc = "Draw out your soul on this canvas! Only crayons can draw on it. Examine it to focus on the canvas."
icon = 'icons/obj/artstuff.dmi'
icon_state = "11x11"
+ burn_state = FLAMMABLE
var/whichGlobalBackup = 1 //List index
/obj/item/weapon/canvas/nineteenXnineteen
diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm
index 31958409954..10f09401ba5 100644
--- a/code/game/objects/structures/bedsheet_bin.dm
+++ b/code/game/objects/structures/bedsheet_bin.dm
@@ -16,6 +16,7 @@ LINEN BINS
throw_range = 2
w_class = 1
item_color = "white"
+ burn_state = FLAMMABLE
slot_flags = SLOT_BACK
@@ -161,6 +162,8 @@ LINEN BINS
icon = 'icons/obj/structures.dmi'
icon_state = "linenbin-full"
anchored = 1
+ burn_state = FLAMMABLE
+ burntime = 20
var/amount = 20
var/list/sheets = list()
var/obj/item/hidden = null
@@ -184,6 +187,16 @@ LINEN BINS
else icon_state = "linenbin-full"
+/obj/structure/bedsheetbin/fire_act()
+ if(!amount)
+ return
+ ..()
+
+/obj/structure/bedsheetbin/burn()
+ amount = 0
+ extinguish()
+ update_icon()
+
/obj/structure/bedsheetbin/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/bedsheet))
user.drop_item()
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index de0ef28d255..4fe639160d4 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -192,6 +192,7 @@
return
var/obj/item/weapon/rcs/E = W
if(E.rcell && (E.rcell.charge >= E.chargecost))
+ // TODO: Tie into space manager
if(!(src.z in config.contact_levels))
to_chat(user, "The rapid-crate-sender can't locate any telepads!")
return
diff --git a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm
index 45c2f538e26..e859c0348f1 100644
--- a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm
+++ b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm
@@ -5,6 +5,8 @@
icon_opened = "cardboard_open"
icon_closed = "cardboard"
health = 10
+ burn_state = FLAMMABLE
+ burntime = 20
sound = 'sound/effects/rustle2.ogg'
material_drop = /obj/item/stack/sheet/cardboard
cutting_sound = 'sound/items/poster_ripped.ogg'
diff --git a/code/game/objects/structures/crates_lockers/closets/coffin.dm b/code/game/objects/structures/crates_lockers/closets/coffin.dm
index 03337e6a260..6e34e70894e 100644
--- a/code/game/objects/structures/crates_lockers/closets/coffin.dm
+++ b/code/game/objects/structures/crates_lockers/closets/coffin.dm
@@ -4,6 +4,9 @@
icon_state = "coffin"
icon_closed = "coffin"
icon_opened = "coffin_open"
+ burn_state = FLAMMABLE
+ burntime = 20
+ material_drop = /obj/item/stack/sheet/wood
/obj/structure/closet/coffin/update_icon()
if(!opened)
@@ -16,4 +19,5 @@
icon_state = "sarc"
icon_closed = "sarc"
icon_opened = "sarc_open"
- sound = 'sound/effects/stonedoor_openclose.ogg'
\ No newline at end of file
+ sound = 'sound/effects/stonedoor_openclose.ogg'
+ material_drop = /obj/item/stack/sheet/mineral/sandstone
\ No newline at end of file
diff --git a/code/game/objects/structures/crates_lockers/closets/gimmick.dm b/code/game/objects/structures/crates_lockers/closets/gimmick.dm
index bff3228dbc9..169179ca375 100644
--- a/code/game/objects/structures/crates_lockers/closets/gimmick.dm
+++ b/code/game/objects/structures/crates_lockers/closets/gimmick.dm
@@ -4,6 +4,8 @@
icon_state = "cabinet_closed"
icon_closed = "cabinet_closed"
icon_opened = "cabinet_open"
+ burn_state = FLAMMABLE
+ burntime = 20
/obj/structure/closet/cabinet/update_icon()
if(!opened)
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/bar.dm b/code/game/objects/structures/crates_lockers/closets/secure/bar.dm
index af6424571ca..49006fb7fb5 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/bar.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/bar.dm
@@ -7,6 +7,8 @@
icon_opened = "cabinetdetective_open"
icon_broken = "cabinetdetective_broken"
icon_off = "cabinetdetective_broken"
+ burn_state = FLAMMABLE
+ burntime = 20
New()
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm
index 7c880918e41..d130b22074c 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm
@@ -117,12 +117,12 @@
/obj/structure/closet/secure_closet/atmos_personal
name = "technician's locker"
req_access = list(access_atmospherics)
- icon_state = "secureeng1"
- icon_closed = "secureeng"
- icon_locked = "secureeng1"
- icon_opened = "secureengopen"
- icon_broken = "secureengbroken"
- icon_off = "secureengoff"
+ icon_state = "secureatm1"
+ icon_closed = "secureatm"
+ icon_locked = "secureatm1"
+ icon_opened = "secureatmopen"
+ icon_broken = "secureatmbroken"
+ icon_off = "secureatmoff"
New()
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm
index 51e3e8d06c3..7eab1e6de85 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm
@@ -33,6 +33,8 @@
icon_opened = "cabinetdetective_open"
icon_broken = "cabinetdetective_broken"
icon_off = "cabinetdetective_broken"
+ burn_state = FLAMMABLE
+ burntime = 20
/obj/structure/closet/secure_closet/personal/cabinet/update_icon()
if(broken)
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
index 66c470882c8..93d200e020d 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
@@ -317,6 +317,8 @@
icon_opened = "cabinetdetective_open"
icon_broken = "cabinetdetective_broken"
icon_off = "cabinetdetective_broken"
+ burn_state = FLAMMABLE
+ burntime = 20
New()
..()
@@ -339,6 +341,7 @@
new /obj/item/clothing/accessory/holster/armpit(src)
new /obj/item/clothing/glasses/sunglasses/yeah(src)
new /obj/item/device/flashlight/seclite(src)
+ new /obj/item/clothing/accessory/black(src)
/obj/structure/closet/secure_closet/detective/update_icon()
if(broken)
diff --git a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm
index c23701575df..d651ad55adb 100644
--- a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm
+++ b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm
@@ -168,8 +168,8 @@
/obj/structure/closet/wardrobe/atmospherics_yellow
name = "atmospherics wardrobe"
- icon_state = "yellow"
- icon_closed = "yellow"
+ icon_state = "atmostech"
+ icon_closed = "atmostech"
/obj/structure/closet/wardrobe/atmospherics_yellow/New()
..()
@@ -193,8 +193,8 @@
/obj/structure/closet/wardrobe/engineering_yellow
name = "engineering wardrobe"
- icon_state = "yellow"
- icon_closed = "yellow"
+ icon_state = "engineer"
+ icon_closed = "engineer"
/obj/structure/closet/wardrobe/engineering_yellow/New()
..()
diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm
index c4178baec15..f9b32b071f7 100644
--- a/code/game/objects/structures/crates_lockers/crates.dm
+++ b/code/game/objects/structures/crates_lockers/crates.dm
@@ -84,6 +84,7 @@
if(istype(W, /obj/item/weapon/rcs) && !src.opened)
var/obj/item/weapon/rcs/E = W
if(E.rcell && (E.rcell.charge >= E.chargecost))
+ // TODO: Tie into space manager
if(!(src.z in config.player_levels))
to_chat(user, "The rapid-crate-sender can't locate any telepads!")
return
diff --git a/code/game/objects/structures/electricchair.dm b/code/game/objects/structures/electricchair.dm
index f5ab3cb14aa..7719f9b547d 100644
--- a/code/game/objects/structures/electricchair.dm
+++ b/code/game/objects/structures/electricchair.dm
@@ -77,13 +77,10 @@
s.start()
visible_message("The electric chair went off!", "You hear a deep sharp shock!")
if(buckled_mob)
- buckled_mob.burn_skin(90)
+ buckled_mob.electrocute_act(110, src, 1)
to_chat(buckled_mob, "You feel a deep shock course through your body!")
- sleep(1)
- buckled_mob.burn_skin(90)
- sleep(5)
- buckled_mob.burn_skin(max(rand(5,20),rand(5,20),rand(5,20)))
-
+ spawn(1)
+ buckled_mob.electrocute_act(110, src, 1)
A.power_light = light
A.updateicon()
return
diff --git a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm
index e4f8acd2c5b..23c6e096748 100644
--- a/code/game/objects/structures/flora.dm
+++ b/code/game/objects/structures/flora.dm
@@ -1,3 +1,7 @@
+/obj/structure/flora
+ burn_state = FLAMMABLE
+ burntime = 30
+
//trees
/obj/structure/flora/tree
name = "tree"
@@ -230,6 +234,7 @@
desc = "a rock"
icon_state = "rock1"
icon = 'icons/obj/flora/rocks.dmi'
+ burn_state = FIRE_PROOF
anchored = 1
/obj/structure/flora/rock/New()
diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm
index 9ce9e59e423..b9af7b2d032 100644
--- a/code/game/objects/structures/mineral_doors.dm
+++ b/code/game/objects/structures/mineral_doors.dm
@@ -219,6 +219,8 @@
/obj/structure/mineral_door/wood
mineralType = "wood"
hardness = 1
+ burn_state = FLAMMABLE
+ burntime = 30
Open()
isSwitchingStates = 1
diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm
index 71a0c8379a9..cf5c97ed593 100644
--- a/code/game/objects/structures/morgue.dm
+++ b/code/game/objects/structures/morgue.dm
@@ -361,6 +361,8 @@
user.attack_log +="\[[time_stamp()]\] Cremated [M.name] ([M.ckey])"
log_attack("[user.name] ([user.ckey]) cremated [M.name] ([M.ckey])")
M.death(1)
+ if(!M || !isnull(M.gcDestroyed))
+ continue // Re-check for mobs that delete themselves on death
M.ghostize()
qdel(M)
diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm
index 24ea6b5a358..bfb5d584965 100644
--- a/code/game/objects/structures/signs.dm
+++ b/code/game/objects/structures/signs.dm
@@ -41,6 +41,7 @@
desc = ""
icon = 'icons/obj/decals.dmi'
w_class = 3 //big
+ burn_state = FLAMMABLE
var/sign_state = ""
/obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction
diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
index f13bffb9d44..c5a3b2f15ba 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
@@ -13,6 +13,8 @@
icon_state = "bed"
can_buckle = 1
buckle_lying = 1
+ burn_state = FLAMMABLE
+ burntime = 30
var/movable = 0 // For mobility checks
/obj/structure/stool/bed/MouseDrop(atom/over_object)
@@ -46,6 +48,7 @@
name = "roller bed"
icon = 'icons/obj/rollerbed.dmi'
icon_state = "down"
+ burn_state = FIRE_PROOF
anchored = 0
/obj/structure/stool/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
index a12f804d308..1c3c3f8e793 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
@@ -3,6 +3,7 @@
desc = "You sit in this. Either by will or force."
icon_state = "chair"
buckle_lying = 0 //you sit in a chair, not lay
+ burn_state = FIRE_PROOF
var/propelled = 0 // Check for fire-extinguisher-driven chairs
@@ -76,6 +77,8 @@
// Chair types
/obj/structure/stool/bed/chair/wood
+ burn_state = FLAMMABLE
+ burntime = 20
// TODO: Special ash subtype that looks like charred chair legs
/obj/structure/stool/bed/chair/wood/normal
@@ -103,6 +106,8 @@
desc = "It looks comfy."
icon_state = "comfychair"
color = rgb(255,255,255)
+ burn_state = FLAMMABLE
+ burntime = 30
var/image/armrest = null
/obj/structure/stool/bed/chair/comfy/New()
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 285b1da8aa5..48193933a66 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -369,6 +369,8 @@
parts = /obj/item/weapon/table_parts/wood
health = 50
canSmoothWith = list(/obj/structure/table/woodentable, /obj/structure/table/woodentable/poker)
+ burn_state = FLAMMABLE
+ burntime = 20
var/canPokerize = 1
/obj/structure/table/woodentable/attackby(obj/item/I as obj, mob/user as mob, params)
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 5d8c98be329..b27d3f6e4f8 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -249,12 +249,16 @@
/obj/machinery/shower/proc/wash(atom/movable/O as obj|mob)
if(!on) return
+ if(istype(O, /obj/item))
+ var/obj/item/I = O
+ I.extinguish()
+
O.water_act(100, convertHeat(), src)
if(isliving(O))
var/mob/living/L = O
L.ExtinguishMob()
- L.fire_stacks = -20 //Douse ourselves with water to avoid fire more easily
+ L.adjust_fire_stacks(-20) //Douse ourselves with water to avoid fire more easily
to_chat(L, "You've been drenched in water!")
if(iscarbon(O))
var/mob/living/carbon/M = O
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 7ae2ddcd27d..051dbe55495 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -425,11 +425,6 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
hit(round(exposed_volume / 1000), 0)
..()
-/obj/structure/window/plasmabasic/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
- if(exposed_temperature > T0C + 32000)
- hit(round(exposed_volume / 1000), 0)
- ..()
-
/obj/structure/window/plasmabasic/BlockSuperconductivity()
return 1
@@ -457,9 +452,6 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
/obj/structure/window/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
return
-/obj/structure/window/plasmareinforced/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
- return
-
/obj/structure/window/plasmareinforced/BlockSuperconductivity()
return 1 //okay this SHOULD MAKE THE TOXINS CHAMBER WORK
diff --git a/code/game/response_team.dm b/code/game/response_team.dm
index abd4f0fcffa..abda62f9420 100644
--- a/code/game/response_team.dm
+++ b/code/game/response_team.dm
@@ -114,13 +114,17 @@ var/ert_request_answered = 0
active_team = response_team_type
send_emergency_team = 1
- var/list/ert_candidates = pollCandidates("Join the Emergency Response Team?",, responseteam_age, 600)
+ var/list/ert_candidates = pollCandidates("Join the Emergency Response Team?",, responseteam_age, 600, 1)
if(!ert_candidates.len)
active_team.cannot_send_team()
send_emergency_team = 0
return
var/teamsize = 0
- for(var/mob/dead/observer/M in ert_candidates)
+ // Respawnable players get first dibs
+ for(var/mob/dead/observer/M in (ert_candidates & respawnable_list))
+ teamsize += M.JoinResponseTeam()
+ // If there's still open slots, non-respawnable players can fill them
+ for(var/mob/dead/observer/M in (ert_candidates - respawnable_list))
teamsize += M.JoinResponseTeam()
send_emergency_team = 0
if (!teamsize)
@@ -422,7 +426,7 @@ var/ert_request_answered = 0
switch(officer_type)
if("Engineer")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots(M), slot_shoes)
- M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow(M), slot_gloves)
+ M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/engineer(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/engi(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/meson(M), slot_glasses)
@@ -442,7 +446,7 @@ var/ert_request_answered = 0
if("Security")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
- M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
+ M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/security(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun/advtaser(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/sunglasses(M), slot_glasses)
@@ -460,7 +464,7 @@ var/ert_request_answered = 0
if("Medic")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(M), slot_shoes)
- M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/latex/nitrile(M), slot_gloves)
+ M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/medical(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health/health_advanced(M), slot_glasses)
@@ -479,7 +483,7 @@ var/ert_request_answered = 0
if("Commander")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
- M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
+ M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/commander(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/sunglasses(M), slot_glasses)
@@ -507,7 +511,7 @@ var/ert_request_answered = 0
switch(officer_type)
if("Engineer")
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/advance(M), slot_shoes)
- M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow(M), slot_gloves)
+ M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/engineer(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/meson/night(M), slot_glasses)
diff --git a/code/game/sound.dm b/code/game/sound.dm
index 7bf3af10e9c..fe5e361f16a 100644
--- a/code/game/sound.dm
+++ b/code/game/sound.dm
@@ -25,25 +25,26 @@ var/list/ricochet = list('sound/weapons/effects/ric1.ogg', 'sound/weapons/effect
var/turf/turf_source = get_turf(source)
// Looping through the player list has the added bonus of working for mobs inside containers
+ var/sound/S = sound(soundin)
+ var/maxdistance = (world.view + extrarange) * 3
for(var/P in player_list)
var/mob/M = P
if(!M || !M.client)
continue
-
var/distance = get_dist(M, turf_source)
- if(distance <= (world.view + extrarange) * 3)
+
+ if(distance <= maxdistance)
var/turf/T = get_turf(M)
if(T && T.z == turf_source.z)
- M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, is_global)
+ M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, is_global, S)
-var/const/FALLOFF_SOUNDS = 0.5
+/mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff, is_global, sound/S)
+ if(!src.client || ear_deaf > 0)
+ return
-/mob/proc/playsound_local(var/turf/turf_source, soundin, vol as num, vary, frequency, falloff, is_global)
- if(!src.client || ear_deaf > 0) return
- soundin = get_sfx(soundin)
-
- var/sound/S = sound(soundin)
+ if(!S)
+ S = sound(get_sfx(soundin))
S.wait = 0 //No queue
S.channel = 0 //Any channel
S.volume = vol
diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm
index 3c73c0789e7..b8a6635225a 100644
--- a/code/game/turfs/simulated/floor.dm
+++ b/code/game/turfs/simulated/floor.dm
@@ -80,17 +80,6 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
src.hotspot_expose(1000,CELL_VOLUME)
return
-/turf/simulated/floor/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
- if(!burnt && prob(5))
- burn_tile()
-
-/turf/simulated/floor/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume)
- var/dir_to = get_dir(src, adj_turf)
-
- for(var/obj/structure/window/W in src)
- if(W.dir == dir_to || W.is_fulltile()) //Same direction or diagonal (full tile)
- W.fire_act(adj_air, adj_temp, adj_volume)
-
/turf/simulated/floor/is_shielded()
for(var/obj/structure/A in contents)
if(A.level == 3)
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index 4d7c8ccd5da..547efaed2a6 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -32,7 +32,8 @@
/obj/structure/falsewall,
/obj/structure/falsewall/reinforced,
/turf/simulated/wall/rust,
- /turf/simulated/wall/r_wall/rust)
+ /turf/simulated/wall/r_wall/rust,
+ /turf/simulated/wall/r_wall/coated)
smooth = SMOOTH_TRUE
/turf/simulated/wall/ChangeTurf(var/newtype)
@@ -110,13 +111,11 @@
update_icon()
return
-/*
-/turf/simulated/wall/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume)
- if(adj_temp > max_temperature)
- take_damage(rand(10, 20) * (adj_temp / max_temperature))
- return ..()
-*/
+/turf/simulated/wall/proc/adjacent_fire_act(turf/simulated/wall, radiated_temperature)
+ if(radiated_temperature > max_temperature)
+ take_damage(rand(10, 20) * (radiated_temperature / max_temperature))
+
/turf/simulated/wall/proc/dismantle_wall(devastated=0, explode=0)
if(istype(src,/turf/simulated/wall/r_wall))
if(!devastated)
diff --git a/code/game/turfs/simulated/walls_misc.dm b/code/game/turfs/simulated/walls_misc.dm
index 3d65d97c95b..6d59513e761 100644
--- a/code/game/turfs/simulated/walls_misc.dm
+++ b/code/game/turfs/simulated/walls_misc.dm
@@ -21,4 +21,9 @@
desc = "A huge chunk of rusted reinforced metal."
icon = 'icons/turf/walls/rusty_reinforced_wall.dmi'
icon_state = "rrust"
- walltype = "rrust"
\ No newline at end of file
+ walltype = "rrust"
+
+/turf/simulated/wall/r_wall/coated //Coated for heat resistance
+ name = "coated reinforced wall"
+ desc = "A huge chunk of reinforced metal used to seperate rooms. It seems to have additional plating to protect against heat."
+ max_temperature = INFINITY
\ No newline at end of file
diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm
index 27154fd00fb..7c6c750c70e 100644
--- a/code/game/turfs/simulated/walls_reinforced.dm
+++ b/code/game/turfs/simulated/walls_reinforced.dm
@@ -12,6 +12,7 @@
walltype = "rwall"
var/d_state = 0
+ var/can_be_reinforced = 1
/turf/simulated/wall/r_wall/attackby(obj/item/W as obj, mob/user as mob, params)
user.changeNext_move(CLICK_CD_MELEE)
@@ -229,6 +230,24 @@
smooth_icon_neighbors(src)
to_chat(user, "You repair the last of the damage.")
+ //UPGRADING TO COATED
+ else if(istype(W, /obj/item/stack/sheet/plasteel) && !d_state)
+ var/obj/item/stack/sheet/plasteel/MS = W
+ if(!can_be_reinforced)
+ to_chat(user, "The wall is already coated!")
+ return
+ to_chat(user, "You begin adding an additional layer of coating to the wall with \a [MS].")
+
+ if(do_after(user, 40, target = src) && !d_state)
+ if(!MS.use(2))
+ to_chat(user, "You don't have enough plasteel for that!")
+ return
+ 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)
+ can_be_reinforced = 0
+ return
//APC
else if(istype(W,/obj/item/mounted))
@@ -293,4 +312,5 @@
clear_smooth_overlays()
else
smooth = SMOOTH_TRUE
- icon_state = ""
\ No newline at end of file
+ icon_state = ""
+
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index d76791e7f97..93b9c339652 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -135,9 +135,6 @@
loopsanity--
A.HasProximity(M, 1)
-/turf/proc/adjacent_fire_act(turf/simulated/floor/source, temperature, volume)
- return
-
/turf/proc/levelupdate()
for(var/obj/O in src)
if(O.level == 1)
@@ -166,6 +163,7 @@
var/list/old_affecting_lights = affecting_lights
var/old_lighting_overlay = lighting_overlay
var/old_blueprint_data = blueprint_data
+ var/old_obscured = obscured
if(air_master)
air_master.remove_from_active(src)
@@ -188,6 +186,8 @@
lighting_build_overlays()
else
lighting_clear_overlays()
+
+ obscured = old_obscured
return W
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 894fc07bd60..fa452446e87 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -114,7 +114,8 @@ var/list/admin_verbs_event = list(
var/list/admin_verbs_spawn = list(
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
- /client/proc/respawn_character
+ /client/proc/respawn_character,
+ /client/proc/admin_deserialize
)
var/list/admin_verbs_server = list(
/client/proc/ToRban,
@@ -152,8 +153,6 @@ var/list/admin_verbs_debug = list(
/client/proc/toggledebuglogs,
/client/proc/qdel_toggle,
/client/proc/gc_dump_hdl,
- /client/proc/gc_toggle_profiling,
- /client/proc/gc_show_del_report,
/client/proc/debugNatureMapGenerator,
/client/proc/check_bomb_impacts,
/client/proc/test_movable_UI,
@@ -162,7 +161,9 @@ var/list/admin_verbs_debug = list(
/proc/machine_upgrade,
/client/proc/map_template_load,
/client/proc/map_template_upload,
- /client/proc/view_runtimes
+ /client/proc/view_runtimes,
+ /client/proc/admin_serialize,
+ /client/proc/admin_deserialize
)
var/list/admin_verbs_possess = list(
/proc/possess,
diff --git a/code/modules/admin/buildmode.dm b/code/modules/admin/buildmode.dm
index db97d7eb5ec..f08121634d3 100644
--- a/code/modules/admin/buildmode.dm
+++ b/code/modules/admin/buildmode.dm
@@ -8,7 +8,8 @@
#define FILL_BUILDMODE 8
#define LINK_BUILDMODE 9
#define BOOM_BUILDMODE 10
-#define NUM_BUILDMODES 10
+#define SAVE_BUILDMODE 11
+#define NUM_BUILDMODES 11
/obj/screen/buildmode
icon = 'icons/misc/buildmode.dmi'
@@ -81,8 +82,11 @@
/obj/effect/buildmode_reticule/New(var/turf/t, var/client/c)
loc = t
I = image('icons/mob/blob.dmi', t, "marker",19.0,2) // Sprite reuse wooo
- cl = c
- cl.images += I
+ if(c)
+ cl = c
+ cl.images += I
+ else
+ log_debug("Buildmode reticule created without a client!")
/obj/effect/buildmode_reticule/proc/deselect()
qdel(src)
@@ -174,6 +178,8 @@
var/light = -1
var/flash = -1
var/flames = -1
+ // Saving mode
+ var/use_json = TRUE
/datum/click_intercept/buildmode/New(client/c)
..()
@@ -261,6 +267,13 @@
to_chat(user, "***********************************************************")
to_chat(user, "Mouse Button on obj = Kaboom")
to_chat(user, "***********************************************************")
+ if(SAVE_BUILDMODE)
+ to_chat(user, "***********************************************************")
+ to_chat(user, "Left Mouse Button on turf/obj/mob = Select corner")
+ to_chat(user, "***********************************************************")
+
+
+
/datum/click_intercept/buildmode/proc/change_settings(mob/user)
switch(mode)
@@ -345,6 +358,9 @@
var/flames = input("Range of flames. -1 to none", text("Input")) as num|null
if(flames == null) flames = -1
+ if(SAVE_BUILDMODE)
+ use_json = (alert("Would you like to use json (Default is \"Yes\")?",,"Yes","No") == "Yes")
+
/datum/click_intercept/buildmode/proc/change_dir()
switch(build_dir)
if(NORTH)
@@ -613,7 +629,7 @@
var/obj/effect/buildmode_line/L2 = new(holder, P, M, "[M.name] to [P.name]") // Yes, reversed one so that you can see it from both sides.
L2.color = L.color
link_lines += L2
- for(var/obj/machinery/door/poddoor/P in world)
+ for(var/obj/machinery/door/poddoor/P in airlocks)
if(P.id_tag == M.id)
var/obj/effect/buildmode_line/L = new(holder, M, P, "[M.name] to [P.name]")
L.color = M.normaldoorcontrol ? "#993333" : "#339933"
@@ -625,3 +641,27 @@
link_lines += L2
if(BOOM_BUILDMODE)
explosion(object, devastation, heavy, light, flash, null, null,flames)
+ if(SAVE_BUILDMODE)
+ if(!cornerA)
+ cornerA = select_tile(get_turf(object))
+ return
+ if(!cornerB)
+ cornerB = select_tile(get_turf(object))
+ if(left_click)
+ if(cornerA && cornerB)
+ var/turf/A = get_turf(cornerA)
+ var/turf/B = get_turf(cornerB)
+ deselect_region() // So we don't read our own reticules
+ var/map_name = input(holder, "Please select a name for your map", "Buildmode", "")
+ if(map_name == "")
+ return
+ var/map_flags = 0
+ if(use_json)
+ map_flags = 32 // Magic number defined in `writer.dm` that I can't use directly
+ // because #defines are for some reason our coding standard
+ var/our_map = maploader.save_map(A,B,map_name,map_flags)
+ holder << ftp(our_map) // send the map they've made! Or are stealing, whatever
+ to_chat(holder, "Map saving complete! [our_map]")
+ return
+
+ deselect_region()
diff --git a/code/modules/admin/holder2.dm b/code/modules/admin/holder2.dm
index 3849317b03e..7ee714090cc 100644
--- a/code/modules/admin/holder2.dm
+++ b/code/modules/admin/holder2.dm
@@ -24,6 +24,10 @@ var/list/admin_datums = list()
rights = initial_rights
admin_datums[ckey] = src
+/datum/admins/Destroy()
+ ..()
+ return QDEL_HINT_HARDDEL_NOW
+
/datum/admins/proc/associate(client/C)
if(istype(C))
owner = C
@@ -85,7 +89,7 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
admin_datums -= ckey
if(holder)
holder.disassociate()
- del(holder)
+ qdel(holder)
return 1
//This proc checks whether subject has at least ONE of the rights specified in rights_required.
diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm
index e2b6ab56d62..929e224494c 100644
--- a/code/modules/admin/secrets.dm
+++ b/code/modules/admin/secrets.dm
@@ -38,13 +38,7 @@
Make all areas powered
Make all areas unpowered
Power all SMES
-
- Shuttle options
- Launch a shuttle
- Force launch a shuttle
- Jump a shuttle
- Move a shuttle
-
+
"}
else if(check_rights(R_SERVER,0)) //only add this if admin secrets are unavailiable; otherwise, it's added inline
@@ -73,7 +67,7 @@
IC Events
Teams
- Send in a strike team
+ Send in the Deathsquad
Send in a syndicate strike team
Send in a HONKsquad
Change Security Level
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index a7fc809aa88..252636abcda 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -1252,6 +1252,7 @@
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] back to the Lobby.")
var/mob/new_player/NP = new()
+ non_respawnable_keys -= M.ckey
NP.ckey = M.ckey
qdel(M)
@@ -1565,53 +1566,7 @@
else if(href_list["adminmoreinfo"])
var/mob/M = locate(href_list["adminmoreinfo"])
- if(!ismob(M))
- to_chat(usr, "This can only be used on instances of type /mob")
- return
-
- var/location_description = ""
- var/special_role_description = ""
- var/health_description = ""
- var/gender_description = ""
- var/turf/T = get_turf(M)
-
- //Location
- if(isturf(T))
- if(isarea(T.loc))
- location_description = "([M.loc == T ? "at coordinates " : "in [M.loc] at coordinates "] [T.x], [T.y], [T.z] in area [T.loc])"
- else
- location_description = "([M.loc == T ? "at coordinates " : "in [M.loc] at coordinates "] [T.x], [T.y], [T.z])"
-
- //Job + antagonist
- if(M.mind)
- special_role_description = "Role: [M.mind.assigned_role]; Antagonist: [M.mind.special_role]; Has been rev: [(M.mind.has_been_rev)?"Yes":"No"]"
- else
- special_role_description = "Role: Mind datum missing Antagonist: Mind datum missing; Has been rev: Mind datum missing;"
-
- //Health
- if(isliving(M))
- var/mob/living/L = M
- var/status
- switch(M.stat)
- if(0) status = "Alive"
- if(1) status = "Unconscious"
- if(2) status = "Dead"
- health_description = "Status = [status]"
- health_description += " Oxy: [L.getOxyLoss()] - Tox: [L.getToxLoss()] - Fire: [L.getFireLoss()] - Brute: [L.getBruteLoss()] - Clone: [L.getCloneLoss()] - Brain: [L.getBrainLoss()]"
- else
- health_description = "This mob type has no health to speak of."
-
- //Gener
- switch(M.gender)
- if(MALE,FEMALE) gender_description = "[M.gender]"
- else gender_description = "[M.gender]"
-
- to_chat(src.owner, "Info about [M.name]: ")
- to_chat(src.owner, "Mob type = [M.type]; Gender = [gender_description] Damage = [health_description]")
- to_chat(src.owner, "Name = [M.name]; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = [M.key];")
- to_chat(src.owner, "Location = [location_description];")
- to_chat(src.owner, "[special_role_description]")
- to_chat(src.owner, "(PM) (PP) (VV) (SM) (FLW) (CA)")
+ admin_mob_info(M)
else if(href_list["adminspawncookie"])
if(!check_rights(R_ADMIN|R_EVENT)) return
@@ -2025,6 +1980,7 @@
return
else
for(var/obj/machinery/photocopier/faxmachine/F in allfaxes)
+ // TODO: Tie into space manager
if((F.z in config.station_levels))
spawn(0)
if(!F.receivefax(P))
@@ -2372,6 +2328,7 @@
for(var/mob/living/carbon/human/H in mob_list)
var/turf/loc = find_loc(H)
var/security = 0
+ // TODO: Tie into space manager
if(!(loc.z in config.station_levels) || prisonwarped.Find(H))
//don't warp them if they aren't ready or are already there
@@ -2608,7 +2565,8 @@
if("eagles")//SCRAW
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","EgL")
- for(var/obj/machinery/door/airlock/W in world)
+ for(var/obj/machinery/door/airlock/W in airlocks)
+ // TODO: Tie into space manager
if((W.z in config.station_levels) && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
W.req_access = list()
message_admins("[key_name_admin(usr)] activated Egalitarian Station mode")
@@ -2801,12 +2759,12 @@
dat += "No-one has done anything this round!"
usr << browse(dat, "window=admin_log")
if("maint_access_brig")
- for(var/obj/machinery/door/airlock/maintenance/M in world)
+ for(var/obj/machinery/door/airlock/maintenance/M in airlocks)
if(access_maint_tunnels in M.req_access)
M.req_access = list(access_brig)
message_admins("[key_name_admin(usr)] made all maint doors brig access-only.")
if("maint_access_engiebrig")
- for(var/obj/machinery/door/airlock/maintenance/M in world)
+ for(var/obj/machinery/door/airlock/maintenance/M in airlocks)
if(access_maint_tunnels in M.req_access)
M.req_access = list()
M.req_one_access = list(access_brig,access_engine)
diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
index 27048b441dd..e07bda7c8ee 100644
--- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm
+++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
@@ -89,7 +89,7 @@
if("delete")
for(var/datum/d in objs)
- del(d)
+ qdel(d)
if("select")
var/text = ""
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 1cc723ab903..2c930080edc 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -373,6 +373,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
for(var/I in singularities)
var/obj/singularity/S = I
+ // TODO: Tie into space manager
if(S.z == ZLEVEL_CENTCOMM || S.z >= MAX_Z)
continue
qdel(S)
@@ -593,17 +594,25 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
"tournament janitor",
"pirate",
"space pirate",
+ "soviet tourist",
+ "soviet soldier",
"soviet admiral",
"tunnel clown",
+ "mime assassin",
"survivor",
+ "greytide",
+ "greytide leader",
+ "greytide xeno",
"masked killer",
"singuloth knight",
"dark lord",
"assassin",
"spy",
+ "vox",
"death commando",
"syndicate agent",
"syndicate operative",
+ "syndicate bomber",
"syndicate strike team",
"syndicate officer",
"chrono legionnaire",
@@ -728,7 +737,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
var/obj/item/weapon/storage/backpack/backpack = new(M)
for(var/obj/item/I in backpack)
- del(I)
+ qdel(I)
M.equip_to_slot_or_del(backpack, slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/mop(M), slot_r_hand)
var/obj/item/weapon/reagent_containers/glass/bucket/bucket = new(M)
@@ -746,30 +755,29 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if("pirate")
M.equip_to_slot_or_del(new /obj/item/clothing/under/pirate(M), slot_w_uniform)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/head/bandana(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/pirate(M), slot_r_hand)
- equip_special_id(M,get_all_accesses(), "Pirate", /obj/item/weapon/card/id)
+ equip_special_id(M,list(access_maint_tunnels), "Pirate", /obj/item/weapon/card/id)
- if("space pirate")
+ if("space pirate") // not spaceworthy, just has fancier coat.
M.equip_to_slot_or_del(new /obj/item/clothing/under/pirate(M), slot_w_uniform)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/pirate(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/pirate(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/pirate(M), slot_r_hand)
- equip_special_id(M,get_all_accesses(), "Space Pirate", /obj/item/weapon/card/id)
-
- if("soviet soldier")
- M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
- M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
- M.equip_to_slot_or_del(new /obj/item/clothing/head/ushanka(M), slot_head)
- equip_special_id(M,get_all_accesses(), "Soviet Soldier", /obj/item/weapon/card/id)
+ equip_special_id(M,list(access_maint_tunnels), "Space Pirate", /obj/item/weapon/card/id)
if("tunnel clown")
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(M), slot_wear_mask)
@@ -780,25 +788,106 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/suit/chaplain_hoodie(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(M), slot_r_store)
- equip_special_id(M,get_all_accesses(), "Tunnel Clown", /obj/item/weapon/card/id)
+ equip_special_id(M,list(access_clown, access_theatre, access_maint_tunnels), "Tunnel Clown", /obj/item/weapon/card/id)
M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
var/obj/item/weapon/twohanded/fireaxe/fire_axe = new(M)
M.equip_to_slot_or_del(fire_axe, slot_r_hand)
+
+ if("mime assassin")
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/mime(M), slot_back)
+ if(M.gender == FEMALE)
+ M.equip_or_collect(new /obj/item/clothing/under/sexymime(M), slot_w_uniform)
+ M.equip_or_collect(new /obj/item/clothing/mask/gas/sexymime(M), slot_wear_mask)
+ else
+ M.equip_or_collect(new /obj/item/clothing/under/mime(M), slot_w_uniform)
+ M.equip_or_collect(new /obj/item/clothing/mask/gas/mime(M), slot_wear_mask)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
+ M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/white(M), slot_gloves)
+ M.equip_to_slot_or_del(new /obj/item/clothing/head/beret(M), slot_head)
+ M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full/multitool(M), slot_belt)
+ M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle(M), slot_glasses)
+ M.equip_to_slot_or_del(new /obj/item/clothing/suit/suspenders(M), slot_wear_suit)
+ M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/syndie_kit/caneshotgun, slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/toy/crayon/mime, slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/pistol(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/weapon/suppressor(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/weapon/pen/sleepy(M), slot_in_backpack)
+ M.equip_or_collect(new /obj/item/weapon/reagent_containers/food/snacks/syndidonkpocket(M), slot_in_backpack)
+ var/obj/item/device/pda/mime/pda = new(M)
+ pda.owner = M.real_name
+ pda.ownjob = "Mime"
+ pda.name = "PDA-[M.real_name] ([pda.ownjob])"
+ M.equip_to_slot_or_del(pda, slot_wear_pda)
+ equip_special_id(M,list(access_mime, access_theatre, access_maint_tunnels), "Mime", /obj/item/weapon/card/id/syndicate)
+ M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
+
if("survivor")
M.equip_to_slot_or_del(new /obj/item/clothing/under/overalls(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/latex(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
- equip_special_id(M,get_all_accesses(), "Survivor", /obj/item/weapon/card/id)
+ equip_special_id(M,list(access_maint_tunnels), "Survivor", /obj/item/weapon/card/id)
for(var/obj/item/carried_item in M.contents)
if(!istype(carried_item, /obj/item/weapon/implant))
carried_item.add_blood(M)
+ if("greytide")
+ M.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(M), slot_w_uniform)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(M), slot_shoes)
+ M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
+ M.equip_to_slot_or_del(new /obj/item/flag/grey(M), slot_r_hand)
+ M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
+ M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
+ equip_special_id(M,list(access_maint_tunnels), "Greytide", /obj/item/weapon/card/id)
+
+ if("greytide leader")
+ M.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(M), slot_w_uniform)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(M), slot_shoes)
+ M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
+ M.equip_to_slot_or_del(new /obj/item/flag/grey(M), slot_r_hand)
+ M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
+ M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow(M), slot_gloves)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full/multitool(M), slot_belt)
+ M.equip_to_slot_or_del(new /obj/item/clothing/head/welding(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
+ equip_special_id(M,list(access_maint_tunnels), "Greytide Leader", /obj/item/weapon/card/id)
+
+ if("greytide xeno")
+ M.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(M), slot_w_uniform)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
+ M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
+ M.equip_to_slot_or_del(new /obj/item/clothing/suit/xenos(M), slot_wear_suit)
+ M.equip_to_slot_or_del(new /obj/item/clothing/head/xenos(M), slot_head)
+ M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal(M), slot_glasses)
+ M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_l_store)
+ M.equip_to_slot_or_del(new /obj/item/toy/toy_xeno(M), slot_r_store)
+ M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
+ M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow(M), slot_gloves)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full/multitool(M), slot_belt)
+ M.equip_to_slot_or_del(new /obj/item/clothing/head/welding(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
+ equip_special_id(M,list(access_maint_tunnels), "Legit Xenomorph", /obj/item/weapon/card/id)
+
if("masked killer")
M.equip_to_slot_or_del(new /obj/item/clothing/under/overalls(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/latex(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(M), slot_wear_mask)
@@ -809,7 +898,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/kitchen/knife(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/scalpel(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
- equip_special_id(M,get_all_accesses(), "Masked Killer", /obj/item/weapon/card/id/syndicate, "syndie")
+ equip_special_id(M,list(access_maint_tunnels), "Masked Killer", /obj/item/weapon/card/id/syndicate, "syndie")
var/obj/item/weapon/twohanded/fireaxe/fire_axe = new(M)
M.equip_to_slot_or_del(fire_axe, slot_r_hand)
for(var/obj/item/carried_item in M.contents)
@@ -821,6 +910,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/syndicate(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/dualsaber/red(M), slot_l_hand)
@@ -841,6 +931,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/suit/wcoat(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword/saber(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
var/obj/item/weapon/storage/secure/briefcase/sec_briefcase = new(M)
for(var/obj/item/briefcase_item in sec_briefcase)
@@ -880,14 +971,39 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/pen/sleepy(M), slot_r_store)
var/obj/item/weapon/implant/dust/DUST = new /obj/item/weapon/implant/dust(M)
DUST.implant(M)
- var/obj/item/weapon/implant/dust/STOR = new /obj/item/weapon/implant/storage(M)
- STOR.implant(M)
+ M.equip_to_slot_or_del(new /obj/item/weapon/implanter/storage(M), slot_in_backpack)
var/obj/item/device/pda/heads/pda = new(M)
pda.owner = M.real_name
pda.ownjob = "Spy"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
M.equip_to_slot_or_del(pda, slot_belt)
- equip_special_id(M,get_all_accesses(), "Spy", /obj/item/weapon/card/id/syndicate, "syndie")
+ equip_special_id(M,list(access_maint_tunnels), "Spy", /obj/item/weapon/card/id/syndicate, "syndie")
+
+
+ if("vox")
+ if(istype(M, /mob/living/carbon/human/voxarmalis)) // have to do this, they cannot wear normal vox gear!
+ M.equip_to_slot_or_del(new /obj/item/clothing/under/vox_grey(M), slot_w_uniform)
+ M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/syndicate(M), slot_wear_mask)
+ M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/vox/carapace(M), slot_wear_suit)
+ M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/vox/carapace(M), slot_head)
+ M.equip_to_slot_or_del(new /obj/item/clothing/under/vox/vox_robes (M), slot_w_uniform)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
+ M.equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/vox(M), slot_shoes)
+ M.equip_to_slot_or_del(new /obj/item/weapon/card/id/syndicate/vox(M), slot_shoes)
+ M.equip_to_slot_or_del(new /obj/item/device/radio/headset/syndicate, slot_l_ear)
+ M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/yellow/vox, slot_gloves)
+ M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic, slot_l_store)
+ M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/vox, slot_r_store)
+ M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/monocle, slot_glasses)
+ M.equip_to_slot_or_del(new /obj/item/device/flashlight, slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/weapon/restraints/handcuffs/cable/zipties, slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/device/flash, slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/noisecannon, slot_in_backpack)
+ equip_special_id(M,get_all_accesses(), "Vox Armalis", /obj/item/weapon/card/id/syndicate/vox, "syndie")
+ else
+ M.equip_vox_raider()
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_l_hand)
+ M.regenerate_icons()
if("death commando")
M.equip_death_commando()
@@ -909,15 +1025,31 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
U.hidden_uplink.uses = 20
M.equip_to_slot_or_del(U, slot_r_store)
+ if("syndicate bomber")
+ M.equip_or_collect(new /obj/item/clothing/under/syndicate(M), slot_w_uniform)
+ M.equip_or_collect(new /obj/item/clothing/shoes/combat(M), slot_shoes)
+ M.equip_or_collect(new /obj/item/clothing/gloves/combat(M), slot_gloves)
+ M.equip_or_collect(new /obj/item/weapon/storage/backpack(M), slot_back)
+ M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
+ M.equip_or_collect(new /obj/item/device/flashlight(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/weapon/card/emag(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/device/radio/beacon/syndicate/bomb(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/device/radio/beacon/syndicate/bomb(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/device/syndicatedetonator(M), slot_in_backpack)
+ M.equip_or_collect(new /obj/item/weapon/storage/belt/utility/full/multitool(M), slot_belt)
+ M.equip_or_collect(new /obj/item/weapon/reagent_containers/food/snacks/syndidonkpocket(M), slot_in_backpack)
+ M.equip_or_collect(new /obj/item/device/radio/headset/syndicate(M), slot_l_ear)
+ equip_special_id(M,get_syndicate_access("Syndicate Operative"), "Syndicate Bomber", /obj/item/weapon/card/id/syndicate, "syndie")
+
if("syndicate operative")
M.equip_or_collect(new /obj/item/clothing/under/syndicate(M), slot_w_uniform)
M.equip_or_collect(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_or_collect(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_or_collect(new /obj/item/weapon/storage/backpack(M), slot_back)
+ M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/reagent_containers/food/pill/initropidril(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/gun/projectile/automatic/pistol(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/ammo_box/magazine/m10mm(M), slot_in_backpack)
- M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/crowbar/red(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/clothing/glasses/night(M), slot_glasses)
M.equip_or_collect(new /obj/item/weapon/storage/belt/military(M), slot_belt)
@@ -948,8 +1080,8 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_or_collect(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_or_collect(new /obj/item/clothing/gloves/combat(M), slot_gloves)
M.equip_or_collect(new /obj/item/weapon/storage/backpack(M), slot_back)
- M.equip_or_collect(new /obj/item/weapon/reagent_containers/food/pill/initropidril(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
+ M.equip_or_collect(new /obj/item/weapon/reagent_containers/food/pill/initropidril(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/clothing/glasses/thermal(M), slot_glasses)
M.equip_or_collect(new /obj/item/weapon/storage/belt/military(M), slot_belt)
M.equip_or_collect(new /obj/item/weapon/pinpointer/advpinpointer(M), slot_l_store)
@@ -974,6 +1106,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_or_collect(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_or_collect(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
+ M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/clothing/head/that(M), slot_head)
M.equip_or_collect(new /obj/item/device/radio/headset/ert(M), slot_l_ear)
M.equip_or_collect(new /obj/item/device/pda/(M), slot_wear_pda)
@@ -989,6 +1122,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_or_collect(new /obj/item/clothing/glasses/hud/security/sunglasses(M), slot_glasses)
M.equip_or_collect(new /obj/item/weapon/gun/energy/pulse/pistol(M), slot_belt)
M.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
+ M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/implanter/dust(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/implanter/death_alarm(M), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(M)
@@ -1007,6 +1141,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_or_collect(new /obj/item/clothing/glasses/hud/security/sunglasses(M), slot_glasses)
M.equip_or_collect(new /obj/item/weapon/gun/energy/pulse/pistol(M), slot_belt)
M.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
+ M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/implanter/dust(M), slot_in_backpack)
M.equip_or_collect(new /obj/item/weapon/implanter/death_alarm(M), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(M)
@@ -1051,6 +1186,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/cyber(M), slot_glasses) // job has /obj/item/clothing/glasses/hud/security/sunglasses
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol/m1911(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(M), slot_back)
+ M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/deathsquad/officer(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen/double/full(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/implanter/dust(M), slot_in_backpack)
@@ -1078,6 +1214,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol/m1911(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/cigarette/cigar/cohiba(M), slot_wear_mask)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
+ M.equip_or_collect(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/matches(M), slot_r_store)
M.equip_or_collect(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_in_backpack)
@@ -1117,7 +1254,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
- M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
equip_special_id(M,get_all_accesses(), "Wizard", /obj/item/weapon/card/id)
if("red wizard")
@@ -1130,7 +1267,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
- M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
equip_special_id(M,get_all_accesses(), "Wizard", /obj/item/weapon/card/id)
if("marisa wizard")
@@ -1143,20 +1280,53 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
- M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
equip_special_id(M,get_all_accesses(), "Wizard", /obj/item/weapon/card/id)
+ if("soviet tourist")
+ M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
+ M.equip_to_slot_or_del(new /obj/item/clothing/head/ushanka(M), slot_head)
+ M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
+ M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
+ M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(M), slot_in_backpack)
+ equip_special_id(M,list(access_maint_tunnels), "Soviet Tourist", /obj/item/weapon/card/id)
+
+ if("soviet soldier")
+ M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
+ M.equip_to_slot_or_del(new /obj/item/clothing/head/ushanka(M), slot_head)
+ M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
+ M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
+ M.equip_to_slot_or_del(new /obj/item/device/radio/headset/syndicate(M), slot_l_ear)
+ M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(M), slot_glasses)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/weapon/card/emag(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/device/flashlight(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/c4(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/c4(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/ammo_box/a357(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/ammo_box/a357(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/ammo_box/a357(M), slot_in_backpack)
+ equip_special_id(M,list(access_maint_tunnels), "Soviet Soldier", /obj/item/weapon/card/id)
+
if("soviet admiral")
+ M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/head/hgpiratecap(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(M), slot_gloves)
- M.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(M), slot_l_ear)
+ M.equip_to_slot_or_del(new /obj/item/device/radio/headset/syndicate(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/hgpirate(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back)
- M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(M), slot_belt)
- M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform)
- equip_special_id(M,get_all_accesses() + get_all_centcom_access(), "Admiral", /obj/item/weapon/card/id, "commander")
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/ammo_box/a357(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/ammo_box/a357(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/ammo_box/a357(M), slot_in_backpack)
+ equip_special_id(M,get_all_accesses() + get_all_centcom_access(), "Soviet Admiral", /obj/item/weapon/card/id, "commander")
//W.icon_state = "commander"
if("chrono legionnaire")
@@ -1201,19 +1371,25 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes")
return
- for(var/obj/machinery/power/emitter/E in world)
+ for(var/obj/machinery/power/emitter/E in machines)
if(E.anchored)
E.active = 1
- for(var/obj/machinery/field/generator/F in world)
- if(F.anchored)
- F.Varedit_start = 1
+ for(var/obj/machinery/field/generator/F in machines)
+ if(F.active == 0)
+ F.active = 1
+ F.state = 2
+ F.power = 250
+ F.anchored = 1
+ F.warming_up = 3
+ F.start_fields()
+ F.update_icon()
+
spawn(30)
- for(var/obj/machinery/the_singularitygen/G in world)
+ for(var/obj/machinery/the_singularitygen/G in machines)
if(G.anchored)
var/obj/singularity/S = new /obj/singularity(get_turf(G), 50)
- spawn(0)
- qdel(G)
+// qdel(G)
S.energy = 1750
S.current_size = 7
S.icon = 'icons/effects/224x224.dmi'
@@ -1227,7 +1403,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
//S.dissipate_track = 0
//S.dissipate_strength = 10
- for(var/obj/machinery/power/rad_collector/Rad in world)
+ for(var/obj/machinery/power/rad_collector/Rad in machines)
if(Rad.anchored)
if(!Rad.P)
var/obj/item/weapon/tank/plasma/Plasma = new/obj/item/weapon/tank/plasma(Rad)
@@ -1239,7 +1415,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(!Rad.active)
Rad.toggle_power()
- for(var/obj/machinery/power/smes/SMES in world)
+ for(var/obj/machinery/power/smes/SMES in machines)
if(SMES.anchored)
SMES.input_attempt = 1
diff --git a/code/modules/admin/verbs/freeze.dm b/code/modules/admin/verbs/freeze.dm
index 3537dd3d6df..92af790dc4b 100644
--- a/code/modules/admin/verbs/freeze.dm
+++ b/code/modules/admin/verbs/freeze.dm
@@ -21,7 +21,7 @@ var/global/list/frozen_mob_list = list()
///mob freeze procs
-/mob/living/var/frozen = 0 //used for preventing attacks on admin-frozen mobs
+/mob/living/var/frozen = null //used for preventing attacks on admin-frozen mobs
/mob/living/var/admin_prev_sleeping = 0 //used for keeping track of previous sleeping value with admin freeze
/mob/living/proc/admin_Freeze(var/client/admin)
@@ -34,7 +34,7 @@ var/global/list/frozen_mob_list = list()
src.overlays += AO
anchored = 1
- frozen = 1
+ frozen = AO
admin_prev_sleeping = sleeping
sleeping += 20000
if(!(src in frozen_mob_list))
@@ -46,15 +46,16 @@ var/global/list/frozen_mob_list = list()
message_admins("\blue [key_name_admin(admin)] unfroze [key_name_admin(src)]")
log_admin("[key_name(admin)] unfroze [key_name(src)]")
- update_icons()
-
anchored = 0
- frozen = 0
+ overlays -= frozen
+ frozen = null
sleeping = admin_prev_sleeping
admin_prev_sleeping = null
if(src in frozen_mob_list)
frozen_mob_list -= src
+ update_icons()
+
/mob/living/carbon/slime/admin_Freeze(admin)
..(admin)
diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm
index 6578898a0bd..d58e51971dd 100644
--- a/code/modules/admin/verbs/mapping.dm
+++ b/code/modules/admin/verbs/mapping.dm
@@ -139,7 +139,9 @@ var/list/admin_verbs_show_debug_verbs = list(
/client/proc/print_jobban_old_filter,
/client/proc/forceEvent,
/client/proc/nanomapgen_DumpImage,
- /client/proc/reload_nanoui_resources
+ /client/proc/reload_nanoui_resources,
+ /client/proc/admin_redo_space_transitions,
+ /client/proc/make_turf_space_map
)
/client/proc/enable_debug_verbs()
diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm
index 5506b3b9076..8da22a71b62 100644
--- a/code/modules/admin/verbs/one_click_antag.dm
+++ b/code/modules/admin/verbs/one_click_antag.dm
@@ -146,40 +146,16 @@ client/proc/one_click_antag()
return 0
/datum/admins/proc/makeWizard()
- var/list/mob/candidates = list()
- var/mob/theghost = null
- var/time_passed = world.time
- for(var/mob/G in respawnable_list)
- if(istype(G) && G.client && (ROLE_WIZARD in G.client.prefs.be_special))
- if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate"))
- if(player_old_enough_antag(G.client,ROLE_WIZARD))
- spawn(0)
- switch(G.timed_alert("Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","No",300,"Yes","No"))//alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No"))
- if("Yes")
- if((world.time-time_passed)>300)//If more than 30 game seconds passed.
- return
- candidates += G
- if("No")
- return
- else
- return
-
- sleep(300)
+ var/list/candidates = pollCandidates("Do you wish to be considered for the position of a Wizard Foundation 'diplomat'?", "wizard")
if(candidates.len)
- candidates = shuffle(candidates)
- for(var/mob/dead/observer/i in candidates)
- if(!i || !i.client) continue //Dont bother removing them from the list since we only grab one wizard
+ var/mob/dead/observer/selected = pick(candidates)
+ candidates -= selected
- theghost = i
- break
-
- if(theghost)
- var/mob/living/carbon/human/new_character=makeBody(theghost)
+ var/mob/living/carbon/human/new_character = makeBody(selected)
new_character.mind.make_Wizard()
return 1
-
return 0
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm
index 47c7da15724..660a1c8f199 100644
--- a/code/modules/admin/verbs/playsound.dm
+++ b/code/modules/admin/verbs/playsound.dm
@@ -81,6 +81,7 @@ var/list/sounds_cache = list()
for(var/O in global_intercoms)
var/obj/item/device/radio/intercom/I = O
+ // TODO: Tie into space manager
if(I.z != ZLEVEL_STATION && !ignore_z)
continue
if(!I.on && !ignore_power)
diff --git a/code/modules/admin/verbs/serialization.dm b/code/modules/admin/verbs/serialization.dm
new file mode 100644
index 00000000000..41ba5d11aa1
--- /dev/null
+++ b/code/modules/admin/verbs/serialization.dm
@@ -0,0 +1,26 @@
+/client/proc/admin_serialize()
+ set name = "Serialize Marked Datum"
+ set desc = "Turns your marked object into a JSON string you can later use to re-create the object"
+ set category = "Debug"
+
+ if(!check_rights(R_ADMIN))
+ return
+
+ if(!istype(holder.marked_datum, /atom/movable))
+ to_chat(src, "The marked datum is not an atom/movable!")
+ return
+
+ var/atom/movable/AM = holder.marked_datum
+ to_chat(src, json_encode(AM.serialize()))
+
+/client/proc/admin_deserialize()
+ set name = "Deserialize JSON datum"
+ set desc = "Creates an object from a JSON string"
+ set category = "Debug"
+
+ if(!check_rights(R_ADMIN|R_DEBUG))
+ return
+
+ var/json_text = input("Enter the JSON code:","Text") as message|null
+ if(json_text)
+ json_to_object(json_text, get_turf(usr))
\ No newline at end of file
diff --git a/code/modules/admin/verbs/space_transitions.dm b/code/modules/admin/verbs/space_transitions.dm
new file mode 100644
index 00000000000..eda17996c65
--- /dev/null
+++ b/code/modules/admin/verbs/space_transitions.dm
@@ -0,0 +1,41 @@
+/client/proc/admin_redo_space_transitions()
+ set name = "Remake Space Transitions"
+ set desc = "Re-assigns all space transitions"
+ set category = "Debug"
+
+ if(!check_rights(R_ADMIN|R_DEBUG))
+ return
+
+ var/choice = alert("Do you want to rebuild space transitions?",,"Yes", "No")
+
+ if(choice == "No")
+ return
+
+
+ message_admins("[key_name_admin(usr)] re-assigned all space transitions")
+ space_manager.do_transition_setup()
+ log_admin("[key_name(usr)] re-assigned all space transitions")
+
+ feedback_add_details("admin_verb","SPCRST") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+
+
+
+
+/client/proc/make_turf_space_map()
+ set name = "Make Space Map"
+ set desc = "Create a map of the space levels as turfs at your feet"
+ set category = "Debug"
+
+ if(!check_rights(R_ADMIN|R_DEBUG))
+ return
+
+ var/choice = alert("Are you sure you want to make a space map out of turfs?",,"Yes","No")
+
+ if(choice == "No")
+ return
+
+ message_admins("[key_name_admin(usr)] made a space map")
+
+
+ space_manager.map_as_turfs(get_turf(usr))
+ log_admin("[key_name(usr)] made a space map")
diff --git a/code/modules/awaymissions/maploader/reader.dm b/code/modules/awaymissions/maploader/reader.dm
index fcfd8d2e600..9cb75d4a22b 100644
--- a/code/modules/awaymissions/maploader/reader.dm
+++ b/code/modules/awaymissions/maploader/reader.dm
@@ -96,7 +96,7 @@ var/global/dmm_suite/preloader/_preloader = new
if(cropMap)
continue
else
- zlevels.increase_max_zlevel_to(zcrd) //create a new z_level if needed
+ space_manager.increase_max_zlevel_to(zcrd) //create a new z_level if needed
bounds[MAP_MINX] = min(bounds[MAP_MINX], xcrdStart)
bounds[MAP_MINZ] = min(bounds[MAP_MINZ], zcrd)
@@ -228,10 +228,12 @@ var/global/dmm_suite/preloader/_preloader = new
var/full_def = trim_text(copytext(model, old_position, dpos)) //full definition, e.g : /obj/foo/bar{variables=derp}
var/variables_start = findtext(full_def, "{")
- var/atom_def = text2path(trim_text(copytext(full_def, 1, variables_start))) //path definition, e.g /obj/foo/bar
+ var/atom_text = trim_text(copytext(full_def, 1, variables_start))
+ var/atom_def = text2path(atom_text) //path definition, e.g /obj/foo/bar
old_position = dpos + 1
if(!atom_def) // Skip the item if the path does not exist. Fix your crap, mappers!
+ log_debug("Bad path: [atom_text]")
continue
members.Add(atom_def)
@@ -378,8 +380,15 @@ var/global/dmm_suite/preloader/_preloader = new
var/trim_right = trim_text(copytext(text,equal_position+1,position))//the content of the variable
//Check for string
+ // Make it read to the next delimiter, instead of the quote
if(findtext(trim_right,quote,1,2))
- trim_right = copytext(trim_right,2,findtext(trim_right,quote,3,0))
+ var/endquote = findtext(trim_right,quote,-1)
+ if(!endquote)
+ log_debug("Terminating quote not found!")
+ // Our map writer escapes quotes and curly brackets to avoid
+ // letting our simple parser choke on meanly-crafted names/etc
+ // - so we decode it here so it's back to good ol' legibility
+ trim_right = dmm_decode(copytext(trim_right,2,endquote))
//Check for number
else if(isnum(text2num(trim_right)))
@@ -430,14 +439,27 @@ var/global/dmm_suite/preloader/_preloader = new
parent_type = /datum
var/list/attributes
var/target_path
+ var/json_ready = 0
/dmm_suite/preloader/proc/setup(list/the_attributes, path)
if(the_attributes.len)
+ json_ready = 0
+ if("map_json_data" in the_attributes)
+ json_ready = 1
use_preloader = TRUE
attributes = the_attributes
target_path = path
/dmm_suite/preloader/proc/load(atom/what)
+ if(json_ready)
+ var/json_data = attributes["map_json_data"]
+ attributes -= "map_json_data"
+ json_data = dmm_decode(json_data)
+ try
+ what.deserialize(json_decode(json_data))
+ catch(var/exception/e)
+ log_debug("Bad json data: '[json_data]'")
+ throw e
for(var/attribute in attributes)
var/value = attributes[attribute]
if(islist(value))
diff --git a/code/modules/awaymissions/maploader/swapmaps.dm b/code/modules/awaymissions/maploader/swapmaps.dm
index 7115cfcbf13..fab504b150d 100644
--- a/code/modules/awaymissions/maploader/swapmaps.dm
+++ b/code/modules/awaymissions/maploader/swapmaps.dm
@@ -326,7 +326,7 @@ swapmap
x2+=x1-1
y2+=y1-1
z2+=z1-1
- zlevels.increase_max_zlevel_to(z2) // stretch z if necessary
+ space_manager.increase_max_zlevel_to(z2) // stretch z if necessary
if(!ischunk)
swapmaps_loaded[src]=null
swapmaps_byname[id]=src
@@ -373,7 +373,7 @@ swapmap
mz=max(mz,M.z2)
world.maxx=mx
world.maxy=my
- zlevels.cut_levels_downto(mz)
+ space_manager.cut_levels_downto(mz)
// save and delete
proc/Unload()
diff --git a/code/modules/awaymissions/maploader/writer.dm b/code/modules/awaymissions/maploader/writer.dm
index 208d0935a32..842a51fbce5 100644
--- a/code/modules/awaymissions/maploader/writer.dm
+++ b/code/modules/awaymissions/maploader/writer.dm
@@ -4,10 +4,10 @@
#define DMM_IGNORE_NPCS 8
#define DMM_IGNORE_PLAYERS 16
#define DMM_IGNORE_MOBS 24
-dmm_suite{
- var{
- quote = "\""
- list/letter_digits = list(
+#define DMM_USE_JSON 32
+/dmm_suite
+ var/quote = "\""
+ var/list/letter_digits = list(
"a","b","c","d","e",
"f","g","h","i","j",
"k","l","m","n","o",
@@ -21,154 +21,202 @@ dmm_suite{
"U","V","W","X","Y",
"Z"
)
- }
- save_map(var/turf/t1 as turf, var/turf/t2 as turf, var/map_name as text, var/flags as num){
- //Check for illegal characters in file name... in a cheap way.
- if(!((ckeyEx(map_name)==map_name) && ckeyEx(map_name))){
- CRASH("Invalid text supplied to proc save_map, invalid characters or empty string.")
- }
- //Check for valid turfs.
- if(!isturf(t1) || !isturf(t2)){
- CRASH("Invalid arguments supplied to proc save_map, arguments were not turfs.")
- }
- var/file_text = write_map(t1,t2,flags)
- if(fexists("[map_name].dmm")){
- fdel("[map_name].dmm")
- }
- var/saved_map = file("[map_name].dmm")
- saved_map << file_text
- return saved_map
- }
- write_map(var/turf/t1 as turf, var/turf/t2 as turf, var/flags as num){
- //Check for valid turfs.
- if(!isturf(t1) || !isturf(t2)){
- CRASH("Invalid arguments supplied to proc write_map, arguments were not turfs.")
- }
- var/turf/nw = locate(min(t1.x,t2.x),max(t1.y,t2.y),min(t1.z,t2.z))
- var/turf/se = locate(max(t1.x,t2.x),min(t1.y,t2.y),max(t1.z,t2.z))
- var/list/templates[0]
- var/template_buffer = {""}
- var/dmm_text = {""}
- for(var/pos_z in nw.z to se.z){
- for(var/pos_y in nw.y to se.y){
- for(var/pos_x in nw.x to se.x){
- var/turf/test_turf = locate(pos_x,pos_y,pos_z)
- var/test_template = make_template(test_turf, flags)
- var/template_number = templates.Find(test_template)
- if(!template_number){
- templates.Add(test_template)
- template_number = templates.len
- }
- template_buffer += "[template_number],"
- }
- template_buffer += ";"
- }
- template_buffer += "."
- }
- var/key_length = round/*floor*/(log(letter_digits.len,templates.len-1)+1)
- var/list/keys[templates.len]
- for(var/key_pos in 1 to templates.len){
- keys[key_pos] = get_model_key(key_pos,key_length)
- dmm_text += {""[keys[key_pos]]" = ([templates[key_pos]])\n"}
- }
- var/z_level = 0
- for(var/z_pos=1;TRUE;z_pos=findtext(template_buffer,".",z_pos)+1){
- if(z_pos>=length(template_buffer)){break}
- if(z_level){dmm_text+={"\n"}}
- dmm_text += {"\n(1,1,[++z_level]) = {"\n"}
- var/z_block = copytext(template_buffer,z_pos,findtext(template_buffer,".",z_pos))
- for(var/y_pos=1;TRUE;y_pos=findtext(z_block,";",y_pos)+1){
- if(y_pos>=length(z_block)){break}
- var/y_block = copytext(z_block,y_pos,findtext(z_block,";",y_pos))
- for(var/x_pos=1;TRUE;x_pos=findtext(y_block,",",x_pos)+1){
- if(x_pos>=length(y_block)){break}
- var/x_block = copytext(y_block,x_pos,findtext(y_block,",",x_pos))
- var/key_number = text2num(x_block)
- var/temp_key = keys[key_number]
- dmm_text += temp_key
- sleep(-1)
- }
- dmm_text += {"\n"}
- sleep(-1)
- }
- dmm_text += {"\"}"}
- sleep(-1)
- }
- return dmm_text
- }
- proc{
- make_template(var/turf/model as turf, var/flags as num){
- var/template = ""
- var/obj_template = ""
- var/mob_template = ""
- var/turf_template = ""
- if(!(flags & DMM_IGNORE_TURFS)){
- turf_template = "[model.type][check_attributes(model)],"
- } else{ turf_template = "[world.turf],"}
- var/area_template = ""
- if(!(flags & DMM_IGNORE_OBJS)){
- for(var/obj/O in model.contents){
- obj_template += "[O.type][check_attributes(O)],"
- }
- }
- for(var/mob/M in model.contents){
- if(M.client){
- if(!(flags & DMM_IGNORE_PLAYERS)){
- mob_template += "[M.type][check_attributes(M)],"
- }
- }
- else{
- if(!(flags & DMM_IGNORE_NPCS)){
- mob_template += "[M.type][check_attributes(M)],"
- }
- }
- }
- if(!(flags & DMM_IGNORE_AREAS)){
- var/area/m_area = model.loc
- area_template = "[m_area.type][check_attributes(m_area)]"
- } else{ area_template = "[world.area]"}
- template = "[obj_template][mob_template][turf_template][area_template]"
- return template
- }
- check_attributes(var/atom/A){
- var/attributes_text = {"{"}
- for(var/V in A.vars){
- sleep(-1)
- if((!issaved(A.vars[V])) || (A.vars[V]==initial(A.vars[V]))){continue}
- if(istext(A.vars[V])){
- attributes_text += {"[V] = "[A.vars[V]]""}
- }
- else if(isnum(A.vars[V])||ispath(A.vars[V])){
- attributes_text += {"[V] = [A.vars[V]]"}
- }
- else if(isicon(A.vars[V])||isfile(A.vars[V])){
- attributes_text += {"[V] = '[A.vars[V]]'"}
- }
- else{
- continue
- }
- if(attributes_text != {"{"}){
- attributes_text+={"; "}
- }
- }
- if(attributes_text=={"{"}){
- return
- }
- if(copytext(attributes_text, length(attributes_text)-1, 0) == {"; "}){
- attributes_text = copytext(attributes_text, 1, length(attributes_text)-1)
- }
- attributes_text += {"}"}
- return attributes_text
- }
- get_model_key(var/which as num, var/key_length as num){
- var/key = ""
- var/working_digit = which-1
- for(var/digit_pos in key_length to 1 step -1){
- var/place_value = round/*floor*/(working_digit/(letter_digits.len**(digit_pos-1)))
- working_digit-=place_value*(letter_digits.len**(digit_pos-1))
- key = "[key][letter_digits[place_value+1]]"
- }
- return key
- }
- }
- }
\ No newline at end of file
+
+/dmm_suite/save_map(var/turf/t1 as turf, var/turf/t2 as turf, var/map_name as text, var/flags as num)
+ //Check for illegal characters in file name... in a cheap way.
+ if(!((ckeyEx(map_name)==map_name) && ckeyEx(map_name)))
+ CRASH("Invalid text supplied to proc save_map, invalid characters or empty string.")
+ //Check for valid turfs.
+ if(!isturf(t1) || !isturf(t2))
+ CRASH("Invalid arguments supplied to proc save_map, arguments were not turfs.")
+
+ var/map_prefix = "_maps/quicksave/"
+ var/map_path = "[map_prefix][map_name].dmm"
+ if(fexists(map_path))
+ fdel(map_path)
+ var/saved_map = file(map_path)
+ var/map_text = write_map(t1,t2,flags,saved_map)
+ saved_map << map_text
+ return saved_map
+
+/dmm_suite/write_map(var/turf/t1 as turf, var/turf/t2 as turf, var/flags as num)
+ //Check for valid turfs.
+ if(!isturf(t1) || !isturf(t2))
+ CRASH("Invalid arguments supplied to proc write_map, arguments were not turfs.")
+
+ var/turf/ne = locate(max(t1.x,t2.x),max(t1.y,t2.y),max(t1.z,t2.z)) // Outer corner
+ var/turf/sw = locate(min(t1.x,t2.x),min(t1.y,t2.y),min(t1.z,t2.z)) // Inner corner
+ var/list/templates[0]
+ var/list/template_buffer = list()
+ var/template_buffer_text
+ var/dmm_text = ""
+
+ var/total_timer = start_watch()
+ var/timer = start_watch()
+ log_debug("Reading turfs...")
+ // Read the contents of all the turfs we were given
+ for(var/pos_z in sw.z to ne.z)
+ for(var/pos_y in ne.y to sw.y step -1) // We're reversing this because the map format is silly
+ for(var/pos_x in sw.x to ne.x)
+ var/turf/test_turf = locate(pos_x,pos_y,pos_z)
+ var/test_template = make_template(test_turf, flags)
+ var/template_number = templates.Find(test_template)
+ if(!template_number)
+ templates.Add(test_template)
+ template_number = templates.len
+ template_buffer += "[template_number],"
+ CHECK_TICK
+
+ template_buffer += ";"
+
+ template_buffer += "."
+ template_buffer_text = jointext(template_buffer,"")
+ log_debug("Reading turfs took [stop_watch(timer)]s.")
+
+ if(templates.len == 0)
+ CRASH("No templates found!")
+ var/key_length = round/*floor*/(log(letter_digits.len,templates.len-1)+1)
+ var/list/keys[templates.len]
+ // Write the list of key/model pairs to the file
+ timer = start_watch()
+ log_debug("Writing out key/model pairs to file header...")
+ var/list/key_models = list()
+ for(var/key_pos in 1 to templates.len)
+ keys[key_pos] = get_model_key(key_pos,key_length)
+ key_models += "\"[keys[key_pos]]\" = ([templates[key_pos]])\n"
+ CHECK_TICK
+ dmm_text += jointext(key_models,"")
+ log_debug("Writing key/model pairs complete, took [stop_watch(timer)]s.")
+
+ var/z_level = 0
+ // Loop over all z in our zone
+ timer = start_watch()
+ log_debug("Writing out key map...")
+ var/list/key_map = list()
+ for(var/z_pos=1;TRUE;z_pos=findtext(template_buffer_text,".",z_pos)+1)
+ if(z_pos>=length(template_buffer_text)) break
+ if(z_level) key_map += "\n"
+ key_map += "\n(1,1,[++z_level]) = {\"\n"
+ var/z_block = copytext(template_buffer_text,z_pos,findtext(template_buffer_text,".",z_pos))
+ for(var/y_pos=1;TRUE;y_pos=findtext(z_block,";",y_pos)+1)
+ if(y_pos>=length(z_block)) break
+ var/y_block = copytext(z_block,y_pos,findtext(z_block,";",y_pos))
+ // A row of keys
+ for(var/x_pos=1;TRUE;x_pos=findtext(y_block,",",x_pos)+1)
+ if(x_pos>=length(y_block)) break
+ var/x_block = copytext(y_block,x_pos,findtext(y_block,",",x_pos))
+ var/key_number = text2num(x_block)
+ var/temp_key = keys[key_number]
+ key_map += temp_key
+ CHECK_TICK
+ key_map += "\n"
+ key_map += "\"}"
+ dmm_text += jointext(key_map,"")
+ log_debug("Writing key map complete, took [stop_watch(timer)]s.")
+ log_debug("TOTAL TIME: [stop_watch(total_timer)]s.")
+ return dmm_text
+
+/dmm_suite/proc/make_template(var/turf/model as turf, var/flags as num)
+ var/use_json = 0
+ if(flags & DMM_USE_JSON)
+ use_json = 1
+ var/template = ""
+ var/turf_template = ""
+ var/list/obj_template = list()
+ var/list/mob_template = list()
+ var/area_template = ""
+
+
+
+ // Turf
+ if(!(flags & DMM_IGNORE_TURFS))
+ turf_template = "[model.type][check_attributes(model,use_json=use_json)],"
+ else turf_template = "[world.turf],"
+
+ // Objects loop
+ if(!(flags & DMM_IGNORE_OBJS))
+ for(var/obj/O in model.contents)
+ if(O.dont_save || !isnull(O.gcDestroyed))
+ continue
+ obj_template += "[O.type][check_attributes(O,use_json=use_json)],"
+
+ // Mobs Loop
+ for(var/mob/M in model.contents)
+ if(M.dont_save || !isnull(M.gcDestroyed))
+ continue
+ if(M.client)
+ if(!(flags & DMM_IGNORE_PLAYERS))
+ mob_template += "[M.type][check_attributes(M,use_json=use_json)],"
+ else
+ if(!(flags & DMM_IGNORE_NPCS))
+ mob_template += "[M.type][check_attributes(M,use_json=use_json)],"
+
+ // Area
+ if(!(flags & DMM_IGNORE_AREAS))
+ var/area/m_area = model.loc
+ area_template = "[m_area.type][check_attributes(m_area,use_json=use_json)]"
+ else area_template = "[world.area]"
+
+ template = "[jointext(obj_template,"")][jointext(mob_template,"")][turf_template][area_template]"
+ return template
+
+/dmm_suite/proc/check_attributes(var/atom/A,use_json=0)
+ var/attributes_text = "{"
+ var/list/attributes = list()
+ if(!use_json)
+ for(var/V in A.vars)
+ CHECK_TICK
+ if((!issaved(A.vars[V])) || (A.vars[V]==initial(A.vars[V]))) continue
+
+ attributes += var_to_dmm(A.vars[V], V)
+ else
+ var/list/yeah = A.serialize()
+ // We'll want to write out vars that are important to the editor
+ // So that the map is legible as before
+ for(var/thing in A.map_important_vars())
+ // Save vars that are important for the map editor, so that
+ // json-encoded maps are legible for standard editors
+ if(A.vars[thing] != initial(A.vars[thing]))
+ yeah -= thing
+ attributes += var_to_dmm(A.vars[thing],thing)
+
+ // Remove useless info
+ yeah -= "type"
+ if(yeah.len)
+ var/json_stuff = json_encode(yeah)
+ attributes += var_to_dmm(json_stuff, "map_json_data")
+ if(attributes.len == 0)
+ return
+
+ // Trim a trailing semicolon - `var_to_dmm` always appends a semicolon,
+ // so the last one will be trailing.
+ if(copytext(attributes_text, length(attributes_text)-1, 0) == "; ")
+ attributes_text = copytext(attributes_text, 1, length(attributes_text)-1)
+ attributes_text = "{[jointext(attributes,"; ")]}"
+ return attributes_text
+
+
+/dmm_suite/proc/get_model_key(var/which as num, var/key_length as num)
+ var/list/key = list()
+ var/working_digit = which-1
+ for(var/digit_pos in key_length to 1 step -1)
+ var/place_value = round/*floor*/(working_digit/(letter_digits.len**(digit_pos-1)))
+ working_digit-=place_value*(letter_digits.len**(digit_pos-1))
+ key += letter_digits[place_value+1]
+ return jointext(key,"")
+
+
+/dmm_suite/proc/var_to_dmm(attr, name)
+ if(istext(attr))
+ // dmm_encode will strip out characters that would be capable of disrupting
+ // parsing - namely, quotes and curly braces
+ return "[name] = \"[dmm_encode(attr)]\""
+ else if(isnum(attr)||ispath(attr))
+ return "[name] = [attr]"
+ else if(isicon(attr)||isfile(attr))
+ if(length("[attr]") == 0)
+ // The DM map reader is unable to read files that have a '' file/icon entry
+ return
+ return "[name] = '[attr]'"
+ else
+ return ""
diff --git a/code/modules/awaymissions/mission_code/spacehotel.dm b/code/modules/awaymissions/mission_code/spacehotel.dm
index b7670737193..d1e9a9555be 100644
--- a/code/modules/awaymissions/mission_code/spacehotel.dm
+++ b/code/modules/awaymissions/mission_code/spacehotel.dm
@@ -92,7 +92,6 @@
icon = 'icons/obj/doors/Doorsand.dmi'
icon_state = "door_closed"
autoclose = 1
- atom_say_verb = "beeps"
var/doorOpen = 'sound/machines/airlock.ogg'
var/doorClose = 'sound/machines/airlock.ogg'
var/doorDeni = 'sound/machines/DeniedBeep.ogg'
diff --git a/code/modules/awaymissions/zlevel.dm b/code/modules/awaymissions/zlevel.dm
index 7fff68cf031..da6515a591d 100644
--- a/code/modules/awaymissions/zlevel.dm
+++ b/code/modules/awaymissions/zlevel.dm
@@ -59,15 +59,13 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
var/map = pick(potentialRandomZlevels)
var/file = file(map)
if(isfile(file))
- var/zlev = zlevels.add_new_zlevel()
- zlevels.add_dirt(zlev)
+ var/zlev = space_manager.add_new_zlevel(AWAY_MISSION, linkage = UNAFFECTED)
+ space_manager.add_dirt(zlev)
maploader.load_map(file, z_offset = zlev)
late_setup_level(block(locate(1, 1, zlev), locate(world.maxx, world.maxy, zlev)))
- zlevels.remove_dirt(zlev)
+ space_manager.remove_dirt(zlev)
log_to_dd(" Away mission loaded: [map]")
- //map_transition_config.Add(AWAY_MISSION_LIST)
-
for(var/obj/effect/landmark/L in landmarks_list)
if(L.name != "awaystart")
continue
@@ -91,11 +89,11 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
var/file = file(map)
if(isfile(file))
log_startup_progress("Loading away mission: [map]")
- var/zlev = zlevels.add_new_zlevel()
- zlevels.add_dirt(zlev)
+ var/zlev = space_manager.add_new_zlevel()
+ space_manager.add_dirt(zlev)
maploader.load_map(file, z_offset = zlev)
late_setup_level(block(locate(1, 1, zlev), locate(world.maxx, world.maxy, zlev)))
- zlevels.remove_dirt(zlev)
+ space_manager.remove_dirt(zlev)
log_to_dd(" Away mission loaded: [map]")
//map_transition_config.Add(AWAY_MISSION_LIST)
@@ -151,8 +149,6 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
var/initialbudget = budget
var/watch = start_watch()
- log_startup_progress("Loading ruins...")
-
while(budget > 0 && overall_sanity > 0)
// Pick a ruin
var/datum/map_template/ruin/ruin = ruins[pick(ruins)]
@@ -187,7 +183,6 @@ var/global/list/potentialRandomZlevels = generateMapList(filename = "config/away
ruins -= ruin.name
break
- to_chat(world, " Loaded ruins. Or not.") //So the players don't know if we loaded ruins, but we do have a message
if(initialbudget == budget) //Kill me
log_to_dd(" No ruins loaded.")
diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm
index 0d56f0d1122..7a87264d815 100644
--- a/code/modules/client/client procs.dm
+++ b/code/modules/client/client procs.dm
@@ -57,7 +57,6 @@
if( findtext(href," |
|
|
|