"
if(sprite)
- body += " | "
+ body += "| [bicon(D, use_class=0)] | "
else
body += ""
@@ -351,26 +350,18 @@ body
else if(isicon(value))
#ifdef VARSICON
- var/icon/I = new/icon(value)
- var/rnd = rand(1,10000)
- var/rname = "tmp\ref[I][rnd].png"
- usr << browse_rsc(I, rname)
- html += "[name] = ([value]) "
+ html += "[name] = /icon ([value]) [bicon(value, use_class=0)]"
#else
html += "[name] = /icon ([value])"
#endif
-/* else if(istype(value, /image))
+ else if(istype(value, /image))
#ifdef VARSICON
- var/rnd = rand(1, 10000)
- var/image/I = value
-
- src << browse_rsc(I.icon, "tmp\ref[value][rnd].png")
- html += "[name] = "
+ html += "[name] \ref[value] = /image ([value]) [bicon(value, use_class=0)]"
#else
- html += "[name] = /image ([value])"
+ html += "[name] \ref[value] = /image ([value])"
#endif
-*/
+
else if(isfile(value))
html += "[name] = '[value]'"
@@ -388,14 +379,24 @@ body
if(L.len > 0 && !(name == "underlays" || name == "overlays" || name == "vars" || L.len > 500))
// not sure if this is completely right...
- if(0) //(L.vars.len > 0)
+ if(0) //(L.vars.len > 0)
html += ""
html += " "
else
html += ""
+ // First loop to check for associativity
+ var/associative = FALSE
+ for(var/entry in L)
+ if(!(isnum(entry) || isnull(L[entry])))
+ associative = TRUE
+ break
+ // then we do it again! Except now with knowledge of associativity
var/index = 1
for(var/entry in L)
- html += debug_variable(index, L[index], level + 1)
+ if(associative)
+ html += debug_variable(entry, L[entry], level + 1)
+ else
+ html += debug_variable(index, L[index], level + 1)
index++
html += " "
@@ -929,7 +930,7 @@ body
to_chat(usr, "Mob doesn't know that language.")
else if(href_list["addverb"])
- if(!check_rights(R_DEBUG)) return
+ if(!check_rights(R_DEBUG)) return
var/mob/living/H = locate(href_list["addverb"])
@@ -961,7 +962,7 @@ body
log_admin("[key_name(usr)] has given [key_name(H)] the verb [verb]")
else if(href_list["remverb"])
- if(!check_rights(R_DEBUG)) return
+ if(!check_rights(R_DEBUG)) return
var/mob/H = locate(href_list["remverb"])
@@ -1059,7 +1060,7 @@ body
var/Text = href_list["adjustDamage"]
- var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
+ var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
if(!L)
to_chat(usr, "Mob doesn't exist anymore")
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index 4bef4896cc8..5492a9f9ced 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -406,7 +406,7 @@ var/list/advance_cures = list(
AD.Refresh()
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
- if(H.z != 1)
+ if(!is_station_level(H.z))
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 03fe8602281..8b61be7d12b 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..f16e1f6b263 100644
--- a/code/datums/spell.dm
+++ b/code/datums/spell.dm
@@ -67,9 +67,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
caster.reset_view(0)
return 0
- 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")
+ if(is_admin_level(user.z) && (!centcom_cancast || ticker.mode.name == "ragin' mages")) //Certain spells are not allowed on the centcom zlevel
return 0
if(!skipcharge)
@@ -363,9 +361,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
- 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")
+ if(is_admin_level(user.z) && (!centcom_cancast || ticker.mode.name == "ragin' mages")) //Certain spells are not allowed on the centcom zlevel
return 0
switch(charge_type)
@@ -386,9 +382,9 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
if((invocation_type == "whisper" || invocation_type == "shout") && H.is_muzzled())
return 0
- var/obj/effect/proc_holder/spell/noclothes/clothcheck = locate() in user.mob_spell_list
- var/obj/effect/proc_holder/spell/noclothes/clothcheck2 = locate() in user.mind.spell_list
- if(clothes_req && !(clothcheck && istype(clothcheck)) && !(clothcheck2 && istype(clothcheck2)))//clothes check
+ var/clothcheck = locate(/obj/effect/proc_holder/spell/noclothes) in user.mob_spell_list
+ var/clothcheck2 = user.mind && (locate(/obj/effect/proc_holder/spell/noclothes) in user.mind.spell_list)
+ if(clothes_req && !clothcheck && !clothcheck2) //clothes check
if(!istype(H.wear_suit, /obj/item/clothing/suit/wizrobe) && !istype(H.wear_suit, /obj/item/clothing/suit/space/rig/wizard))
return 0
if(!istype(H.shoes, /obj/item/clothing/shoes/sandal))
@@ -400,4 +396,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..01833390052 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, \
@@ -768,6 +783,13 @@ var/list/uplink_items = list()
reference = "CHHUD"
item = /obj/item/clothing/glasses/hud/security/chameleon
cost = 2
+
+/datum/uplink_item/stealthy_weapons/chameleonflag
+ name = "Chameleon Flag"
+ desc = "A flag that can be disguised as any other known flag. There is a heat sensitive bomb loaded into the pole that will be detonated if the flag is lit on fire."
+ reference = "CHFLAG"
+ item = /obj/item/flag/chameleon
+ cost = 7
// STEALTHY TOOLS
@@ -879,8 +901,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.dm b/code/datums/weather/weather.dm
index 7a073edc902..7002f92061b 100644
--- a/code/datums/weather/weather.dm
+++ b/code/datums/weather/weather.dm
@@ -28,7 +28,7 @@
var/area_type = /area/space //Types of area to affect
var/list/impacted_areas = list() //Areas to be affected by the weather, calculated when the weather begins
- var/target_z = ZLEVEL_STATION //The z-level to affect
+ var/target_level = MAIN_STATION //The z-level to affect
var/overlay_layer = 10 //Since it's above everything else, this is the layer used by default. 2 is below mobs and walls if you need to use that.
var/aesthetic = FALSE //If the weather has no purpose other than looks
@@ -52,13 +52,13 @@
stage = STARTUP_STAGE
for(var/V in get_areas(area_type))
var/area/A = V
- if(A.z == target_z)
+ if(is_on_level_name(A,target_level))
impacted_areas |= A
weather_duration = rand(weather_duration_lower, weather_duration_upper)
update_areas()
for(var/V in player_list)
var/mob/M = V
- if(M.z == target_z)
+ if(is_on_level_name(M,target_level))
if(telegraph_message)
to_chat(M, telegraph_message)
if(telegraph_sound)
@@ -72,7 +72,7 @@
update_areas()
for(var/V in player_list)
var/mob/M = V
- if(M.z == target_z)
+ if(is_on_level_name(M,target_level))
if(weather_message)
to_chat(M, weather_message)
if(weather_sound)
@@ -87,7 +87,7 @@
update_areas()
for(var/V in player_list)
var/mob/M = V
- if(M.z == target_z)
+ if(is_on_level_name(M,target_level))
if(end_message)
to_chat(M, end_message)
if(end_sound)
@@ -102,7 +102,7 @@
update_areas()
/datum/weather/proc/can_impact(mob/living/L) //Can this weather impact a mob?
- if(L.z != target_z)
+ if(!is_on_level_name(L,target_level))
return
if(immunity_type in L.weather_immunities)
return
diff --git a/code/datums/weather/weather_types.dm b/code/datums/weather/weather_types.dm
index 07735e85968..0295d8f36fb 100644
--- a/code/datums/weather/weather_types.dm
+++ b/code/datums/weather/weather_types.dm
@@ -16,7 +16,7 @@
end_duration = 0
area_type = /area
- target_z = ZLEVEL_STATION
+ target_level = MAIN_STATION
overlay_layer = 2 //Covers floors only
immunity_type = "lava"
@@ -50,7 +50,7 @@
end_duration = 0
area_type = /area
- target_z = ZLEVEL_STATION
+ target_level = MAIN_STATION
/datum/weather/advanced_darkness/update_areas()
for(var/V in impacted_areas)
@@ -87,7 +87,7 @@
end_overlay = "light_ash"
area_type = /area/mine
- target_z = ZLEVEL_ASTEROID
+ target_level = MINING
immunity_type = "ash"
diff --git a/code/defines/procs/admin.dm b/code/defines/procs/admin.dm
index 1824abaf6ae..73224f67d94 100644
--- a/code/defines/procs/admin.dm
+++ b/code/defines/procs/admin.dm
@@ -45,7 +45,7 @@
return .
/proc/key_name_admin(var/whom, var/include_name = 1)
- var/message = "[key_name(whom, 1, include_name)](?)[isAntag(whom) ? "(A)" : ""] ([admin_jump_link(whom, "holder")])"
+ var/message = "[key_name(whom, 1, include_name)](?)[isAntag(whom) ? "(A)" : ""][isSSD(whom) ? "(SSD!)" : ""] ([admin_jump_link(whom, "holder")])"
return message
/proc/log_and_message_admins(var/message as text)
@@ -55,4 +55,3 @@
/proc/admin_log_and_message_admins(var/message as text)
log_admin("[key_name(usr)] " + message)
message_admins("[key_name_admin(usr)] " + message, 1)
-
\ No newline at end of file
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..27eaf0490ff 100644
--- a/code/game/area/Space Station 13 areas.dm
+++ b/code/game/area/Space Station 13 areas.dm
@@ -67,7 +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))
- if(picked && (picked.z == ZLEVEL_STATION))
+ if(picked && is_station_level(picked.z))
teleportlocs += AR.name
teleportlocs[AR.name] = AR
@@ -2632,4 +2632,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 c8ba2b49c40..bc58c346b01 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,7 +42,7 @@
if(!T)
return 0
- if(T.z != ZLEVEL_CENTCOMM)//if not, don't bother
+ if(!is_admin_level(T.z))//if not, don't bother
return 0
//check for centcomm shuttles
@@ -58,7 +59,7 @@
if(!T)
return 0
- if(T.z != ZLEVEL_CENTCOMM)//if not, don't bother
+ if(!is_admin_level(T.z))//if not, don't bother
return 0
if(istype(T.loc, /area/shuttle/syndicate_elite) || istype(T.loc, /area/syndicate_mothership))
@@ -84,14 +85,14 @@
if(istype(A, /datum/reagent))
if(!reagents)
reagents = new()
- reagents.reagent_list.Add(A)
- reagents.conditional_update()
+ reagents.reagent_list.Add(A)
+ reagents.conditional_update()
else if(istype(A, /atom/movable))
var/atom/movable/M = A
if(istype(M.loc, /mob/living))
var/mob/living/L = M.loc
L.unEquip(M)
- M.loc = src
+ M.forceMove(src)
/atom/proc/assume_air(datum/gas_mixture/giver)
qdel(giver)
@@ -446,11 +447,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..e0187e940e4 100644
--- a/code/game/gamemodes/antag_spawner.dm
+++ b/code/game/gamemodes/antag_spawner.dm
@@ -64,7 +64,7 @@
R.key = C.key
ticker.mode.syndicates += R.mind
ticker.mode.update_synd_icons_added(R.mind)
- R.mind.special_role = "syndicate"
+ R.mind.special_role = SPECIAL_ROLE_NUKEOPS
R.faction = list("syndicate")
/obj/item/weapon/antag_spawner/slaughter_demon //Warning edgiest item in the game
@@ -80,7 +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)
- if(user.z == ZLEVEL_CENTCOMM)//this is to make sure the wizard does NOT summon a demon from the Den..
+ if(level_blocks_magic(user.z))//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 +135,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/autotraitor/autotraitor.dm b/code/game/gamemodes/autotraitor/autotraitor.dm
index 46ab6189023..d00acddecf2 100644
--- a/code/game/gamemodes/autotraitor/autotraitor.dm
+++ b/code/game/gamemodes/autotraitor/autotraitor.dm
@@ -53,7 +53,7 @@
traitors.Remove(traitor)
continue
if(istype(traitor))
- traitor.special_role = "traitor"
+ traitor.special_role = SPECIAL_ROLE_TRAITOR
traitor.restricted_roles = restricted_jobs
// if(!traitors.len)
@@ -135,7 +135,7 @@
traitors += newtraitor.mind
to_chat(newtraitor, "ATTENTION: It is time to pay your debt to the Syndicate...")
to_chat(newtraitor, "You are now a traitor.")
- newtraitor.mind.special_role = "traitor"
+ newtraitor.mind.special_role = SPECIAL_ROLE_TRAITOR
var/datum/atom_hud/antag/tatorhud = huds[ANTAG_HUD_TRAITOR]
tatorhud.join_hud(newtraitor)
set_antag_hud(newtraitor, "hudsyndicate")
diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm
index 35b469258ef..d8f4a7a3850 100644
--- a/code/game/gamemodes/blob/blob.dm
+++ b/code/game/gamemodes/blob/blob.dm
@@ -44,7 +44,7 @@ var/list/blob_nodes = list()
break
var/datum/mind/blob = pick(possible_blobs)
infected_crew += blob
- blob.special_role = "Blob"
+ blob.special_role = SPECIAL_ROLE_BLOB
blob.restricted_roles = restricted_jobs
log_game("[blob.key] (ckey) has been selected as a Blob")
possible_blobs -= blob
@@ -67,7 +67,7 @@ var/list/blob_nodes = list()
if(!istype(blobmind))
return 0
infected_crew += blobmind
- blobmind.special_role = "Blob"
+ blobmind.special_role = SPECIAL_ROLE_BLOB
log_game("[blob.key] (ckey) has been selected as a Blob")
greet_blob(blobmind)
to_chat(blob, "You feel very tired and bloated! You don't have long before you burst!")
@@ -118,7 +118,7 @@ var/list/blob_nodes = list()
if(directory[ckey(blob.key)])
blob_client = directory[ckey(blob.key)]
location = get_turf(C)
- if(location.z != ZLEVEL_STATION || istype(location, /turf/space))
+ if(!is_station_level(location.z) || 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!")
message_admins("[key_name_admin(C)] was in space when the blobs burst, and will die if he doesn't return to the station.")
@@ -140,7 +140,7 @@ var/list/blob_nodes = list()
core.overmind.mind.name = blob.name
infected_crew -= blob
infected_crew += core.overmind.mind
- core.overmind.mind.special_role = "Blob Overmind"
+ core.overmind.mind.special_role = SPECIAL_ROLE_BLOB_OVERMIND
/datum/game_mode/blob/post_setup()
diff --git a/code/game/gamemodes/blob/blob_finish.dm b/code/game/gamemodes/blob/blob_finish.dm
index 0efb624d100..9220d82c8f6 100644
--- a/code/game/gamemodes/blob/blob_finish.dm
+++ b/code/game/gamemodes/blob/blob_finish.dm
@@ -31,7 +31,7 @@
return 1
/datum/game_mode/proc/auto_declare_completion_blob()
- if(istype(ticker.mode,/datum/game_mode/blob) )
+ if(GAMEMODE_IS_BLOB)
var/datum/game_mode/blob/blob_mode = src
if(blob_mode.infected_crew.len)
var/text = "The blob[(blob_mode.infected_crew.len > 1 ? "s were" : " was")]:"
diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm
index c6d3bd13e0f..198c0264dd1 100644
--- a/code/game/gamemodes/blob/blob_report.dm
+++ b/code/game/gamemodes/blob/blob_report.dm
@@ -23,7 +23,7 @@
var/nukecode = rand(10000, 99999)
for(var/obj/machinery/nuclearbomb/bomb in world)
if(bomb && bomb.r_code)
- if(bomb.z == ZLEVEL_STATION)
+ if(is_station_level(bomb.z))
bomb.r_code = nukecode
intercepttext += "Nanotrasen Update: Biohazard Alert. "
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/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm
index 1a08df6b669..afbc4ec9236 100644
--- a/code/game/gamemodes/blob/blobs/core.dm
+++ b/code/game/gamemodes/blob/blobs/core.dm
@@ -91,7 +91,7 @@
/obj/effect/blob/core/proc/create_overmind(var/client/new_overmind, var/override_delay)
if(overmind_get_delay > world.time && !override_delay)
return
-
+
overmind_get_delay = world.time + 3000 // 5 minutes
if(overmind)
@@ -99,7 +99,7 @@
var/mob/C = null
var/list/candidates = list()
-
+
spawn()
if(!new_overmind)
candidates = pollCandidates("Do you want to play as a blob?", ROLE_BLOB, 1)
@@ -115,7 +115,7 @@
src.overmind = B
color = overmind.blob_reagent_datum.color
if(B.mind && !B.mind.special_role)
- B.mind.special_role = "Blob Overmind"
+ B.mind.special_role = SPECIAL_ROLE_BLOB_OVERMIND
spawn(0)
if(is_offspring)
B.verbs -= /mob/camera/blob/verb/split_consciousness
\ No newline at end of file
diff --git a/code/game/gamemodes/borer/borer.dm b/code/game/gamemodes/borer/borer.dm
index bb5117d4579..2cd9eab452f 100644
--- a/code/game/gamemodes/borer/borer.dm
+++ b/code/game/gamemodes/borer/borer.dm
@@ -35,7 +35,7 @@
return 0 // not enough candidates for borer
for(var/obj/machinery/atmospherics/unary/vent_pump/v in world)
- if(!v.welded && (v.z in config.station_levels))
+ if(!v.welded && is_station_level(v.z))
found_vents.Add(v)
// for each 2 possible borers, add one borer and one host
@@ -55,7 +55,7 @@
assigned_hosts[borer.key] = first_host
borer.assigned_role = "MODE" //So they aren't chosen for other jobs.
- borer.special_role = "Borer"
+ borer.special_role = SPECIAL_ROLE_BORER
return 1
@@ -98,7 +98,7 @@
/datum/game_mode/proc/greet_borer(var/datum/mind/borer, var/you_are=1)
if(you_are)
- to_chat(borer.current, "\red You are a Cortical Borer!")
+ to_chat(borer.current, "You are a Cortical Borer!")
var/obj_count = 1
for(var/datum/objective/objective in borer.objectives)
@@ -156,4 +156,4 @@
greet_borer(borer)
- return
\ No newline at end of file
+ return
diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm
index 01e44ba5888..d812296b916 100644
--- a/code/game/gamemodes/changeling/changeling.dm
+++ b/code/game/gamemodes/changeling/changeling.dm
@@ -54,7 +54,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
changelings += changeling
changeling.restricted_roles = restricted_jobs
modePlayer += changelings
- changeling.special_role = "Changeling"
+ changeling.special_role = SPECIAL_ROLE_CHANGELING
return 1
else
return 0
@@ -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."
@@ -130,8 +130,8 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
/datum/game_mode/proc/greet_changeling(var/datum/mind/changeling, var/you_are=1)
if(you_are)
- to_chat(changeling.current, "\red You are a changeling!")
- to_chat(changeling.current, "\red Use say \":g message\" to communicate with your fellow changelings. Remember: you get all of their absorbed DNA if you absorb them.")
+ to_chat(changeling.current, "You are a changeling!")
+ to_chat(changeling.current, "Use say \":g message\" to communicate with your fellow changelings. Remember: you get all of their absorbed DNA if you absorb them.")
to_chat(changeling.current, "You must complete the following tasks:")
if(changeling.current.mind)
if(changeling.current.mind.assigned_role == "Clown")
@@ -169,29 +169,6 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
linghud.leave_hud(changeling.current)
set_antag_hud(changeling.current, null)
-
-/*/datum/game_mode/changeling/check_finished()
- var/changelings_alive = 0
- for(var/datum/mind/changeling in changelings)
- if(!istype(changeling.current,/mob/living/carbon))
- continue
- if(changeling.current.stat==2)
- continue
- changelings_alive++
-
- if(changelings_alive)
- changelingdeath = 0
- return ..()
- else
- if(!changelingdeath)
- changelingdeathtime = world.time
- changelingdeath = 1
- if(world.time-changelingdeathtime > TIME_TO_GET_REVIVED)
- return 1
- else
- return ..()
- return 0*/
-
/datum/game_mode/proc/grant_changeling_powers(mob/living/carbon/changeling_mob)
if(!istype(changeling_mob)) return
changeling_mob.make_changeling()
@@ -329,3 +306,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/changeling/traitor_chan.dm b/code/game/gamemodes/changeling/traitor_chan.dm
index 5c4b2269c3a..7ef4f0bc7b4 100644
--- a/code/game/gamemodes/changeling/traitor_chan.dm
+++ b/code/game/gamemodes/changeling/traitor_chan.dm
@@ -35,7 +35,7 @@
/datum/game_mode/traitor/changeling/post_setup()
for(var/datum/mind/changeling in changelings)
grant_changeling_powers(changeling.current)
- changeling.special_role = "Changeling"
+ changeling.special_role = SPECIAL_ROLE_CHANGELING
forge_changeling_objectives(changeling)
greet_changeling(changeling)
..()
diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm
index fdfda2da716..a1614796fe8 100644
--- a/code/game/gamemodes/cult/cult.dm
+++ b/code/game/gamemodes/cult/cult.dm
@@ -98,7 +98,7 @@ var/global/list/all_cults = list()
cultists_possible -= cultist
cult += cultist
cultist.restricted_roles = restricted_jobs
- cultist.special_role = "Cultist"
+ cultist.special_role = SPECIAL_ROLE_CULTIST
return (cult.len>0)
@@ -373,7 +373,7 @@ var/global/list/all_cults = list()
/datum/game_mode/proc/auto_declare_completion_cult()
- if( cult.len || (ticker && istype(ticker.mode,/datum/game_mode/cult)) )
+ if(cult.len || (ticker && GAMEMODE_IS_CULT))
var/text = "The cultists were:"
for(var/datum/mind/cultist in cult)
diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm
index fd384e61d1f..d1fd034e312 100644
--- a/code/game/gamemodes/events.dm
+++ b/code/game/gamemodes/events.dm
@@ -2,7 +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)
- if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded)
+ if(is_station_level(temp_vent.loc.z) && !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 +53,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 3d2a480c397..912eab73324 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -430,7 +430,7 @@ proc/get_nt_opposed()
/proc/get_nuke_code()
var/nukecode = "ERROR"
for(var/obj/machinery/nuclearbomb/bomb in world)
- if(bomb && bomb.r_code && bomb.z == ZLEVEL_STATION)
+ if(bomb && bomb.r_code && is_station_level(bomb.z))
nukecode = bomb.r_code
return nukecode
@@ -454,7 +454,7 @@ proc/get_nt_opposed()
text += " died"
else
text += " survived"
- if(fleecheck && ply.current.z > ZLEVEL_STATION)
+ if(fleecheck && !is_station_level(ply.current.z))
text += " while fleeing the station"
if(ply.current.real_name != ply.name)
text += " as [ply.current.real_name]"
@@ -471,4 +471,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 35d17607709..b2185b15d33 100644
--- a/code/game/gamemodes/gameticker.dm
+++ b/code/game/gamemodes/gameticker.dm
@@ -4,6 +4,7 @@ var/round_start_time = 0
/datum/controller/gameticker
var/const/restart_timeout = 600
var/current_state = GAME_STATE_PREGAME
+ var/force_ending = 0
var/hide_mode = 0 // leave here at 0 ! setup() will take care of it when needed for Secret mode -walter0o
var/datum/game_mode/mode = null
@@ -48,9 +49,7 @@ var/round_start_time = 0
to_chat(world, "Welcome to the pre-game lobby!")
to_chat(world, "Please, setup your character and select ready. Game will start in [pregame_timeleft] seconds")
while(current_state == GAME_STATE_PREGAME)
- for(var/i=0, i<10, i++)
- sleep(1)
- vote.process()
+ sleep(10)
if(going)
pregame_timeleft--
@@ -268,7 +267,7 @@ var/round_start_time = 0
M.client.screen += cinematic
if(M.stat != DEAD)
var/turf/T = get_turf(M)
- if(T && T.z == 1)
+ if(T && is_station_level(T.z))
M.death(0) //no mercy
//Now animate the cinematic
@@ -339,7 +338,7 @@ var/round_start_time = 0
/datum/controller/gameticker/proc/create_characters()
for(var/mob/new_player/player in player_list)
if(player.ready && player.mind)
- if(player.mind.assigned_role == "AI" || player.mind.special_role == "malfunctioning AI")
+ if(player.mind.assigned_role == "AI")
player.close_spawn_windows()
player.AIize()
else if(!player.mind.assigned_role)
@@ -385,7 +384,7 @@ var/round_start_time = 0
else
game_finished |= mode.check_finished()
- if(!mode.explosion_in_progress && game_finished)
+ if((!mode.explosion_in_progress && game_finished) || force_ending)
current_state = GAME_STATE_FINISHED
auto_toggle_ooc(1) // Turn it on
spawn
diff --git a/code/game/gamemodes/heist/heist.dm b/code/game/gamemodes/heist/heist.dm
index 6079a3c1a2e..70207a75598 100644
--- a/code/game/gamemodes/heist/heist.dm
+++ b/code/game/gamemodes/heist/heist.dm
@@ -52,7 +52,7 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind'
for(var/datum/mind/raider in raiders)
raider.assigned_role = "MODE"
- raider.special_role = "Vox Raider"
+ raider.special_role = SPECIAL_ROLE_RAIDER
return 1
/datum/game_mode/heist/pre_setup()
@@ -176,7 +176,7 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind'
return objs
/datum/game_mode/proc/greet_vox(var/datum/mind/raider)
- to_chat(raider.current, "\blue You are a Vox Raider, fresh from the Shoal!")
+ to_chat(raider.current, "You are a Vox Raider, fresh from the Shoal!")
to_chat(raider.current, "\blue The Vox are a race of cunning, sharp-eyed nomadic raiders and traders endemic to the frontier and much of the unexplored galaxy. You and the crew have come to the [station_name()] for plunder, trade or both.")
to_chat(raider.current, "\blue Vox are cowardly and will flee from larger groups, but corner one or find them en masse and they are vicious.")
to_chat(raider.current, "\blue Use :V to voxtalk, :H to talk on your encrypted channel, and don't forget to turn on your nitrogen internals!")
@@ -253,7 +253,7 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind'
datum/game_mode/proc/auto_declare_completion_heist()
if(raiders.len)
var/check_return = 0
- if(ticker && istype(ticker.mode,/datum/game_mode/heist))
+ if(GAMEMODE_IS_HEIST)
check_return = 1
var/text = "The Vox raiders were:"
@@ -298,7 +298,7 @@ datum/game_mode/proc/auto_declare_completion_heist()
overlays += icon('icons/obj/computer.dmi', "syndie")
/obj/vox/win_button/attack_hand(mob/user)
- if(!istype(ticker.mode, /datum/game_mode/heist) || (world.time < 10 MINUTES)) //has to be heist, and at least ten minutes into the round
+ if(!GAMEMODE_IS_HEIST || (world.time < 10 MINUTES)) //has to be heist, and at least ten minutes into the round
to_chat(user, "\The [src] does not appear to have a connection.")
return 0
diff --git a/code/game/gamemodes/intercept_report.dm b/code/game/gamemodes/intercept_report.dm
index 95a0b5b85dd..cd6dd80876b 100644
--- a/code/game/gamemodes/intercept_report.dm
+++ b/code/game/gamemodes/intercept_report.dm
@@ -77,10 +77,6 @@
src.text = ""
src.build_traitor(correct_person)
return src.text
- if("malf")
- src.text = ""
- src.build_malf(correct_person)
- return src.text
if("changeling","traitorchan")
src.text = ""
src.build_changeling(correct_person)
@@ -195,12 +191,6 @@
src.text += "environment. As this may cause panic among the crew, all efforts should be made to keep this information a secret from all but "
src.text += "the most trusted crew-members."
-/datum/intercept_text/proc/build_malf(datum/mind/correct_person)
- var/a_name = pick(src.anomalies)
- src.text += "
A [a_name] was recently picked up by a nearby stations sensors in your sector. If it came into contact with your ship or "
- src.text += "electrical equipment, it may have had hazardarous and unpredictable effect. Closely observe any non carbon based life forms "
- src.text += "for signs of unusual behaviour, but keep this information discreet at all times due to this possibly dangerous scenario."
-
/datum/intercept_text/proc/build_changeling(datum/mind/correct_person)
var/cname = pick(src.changeling_names)
var/orgname1 = pick(src.org_names_1)
diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm
index c6b65472c2e..c656826dfdb 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,109 @@ 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
+/datum/AI_Module/large/nuke_station
+ module_name = "Doomsday Device"
+ mod_pick_name = "nukestation"
+ description = "Activate a weapon that will disintegrate all organic life on the station after a 450 second delay."
+ cost = 130
one_time = 1
- power_type = /mob/living/silicon/ai/proc/fireproof_core
+ power_type = /mob/living/silicon/ai/proc/nuke_station
-/mob/living/silicon/ai/proc/fireproof_core()
+/mob/living/silicon/ai/proc/nuke_station()
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.")
+ set name = "Doomsday Device"
+
+ to_chat(src, "Nuclear device armed.")
+ command_announcement.Announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", new_sound = 'sound/AI/aimalf.ogg')
+ set_security_level("delta")
+ nuking = 1
+ var/obj/machinery/doomsday_device/DOOM = new /obj/machinery/doomsday_device(src)
+ doomsday_device = DOOM
+ doomsday_device.start()
+ verbs -= /mob/living/silicon/ai/proc/nuke_station
+ for(var/obj/item/weapon/pinpointer/point in pinpointer_list)
+ for(var/mob/living/silicon/ai/A in ai_list)
+ if((A.stat != DEAD) && A.nuking)
+ point.the_disk = A //The pinpointer now tracks the AI core
+
+/obj/machinery/doomsday_device
+ icon = 'icons/obj/machines/nuke_terminal.dmi'
+ name = "doomsday device"
+ icon_state = "nuclearbomb_base"
+ desc = "A weapon which disintegrates all organic life in a large area."
+ anchored = 1
+ density = 1
+ atom_say_verb = "blares"
+ var/timing = 0
+ var/default_timer = 4500
+ var/detonation_timer
+ var/announced = 0
+
+/obj/machinery/doomsday_device/Destroy()
+ fast_processing -= src
+ shuttle_master.emergencyNoEscape = 0
+ if(shuttle_master.emergency.mode == SHUTTLE_STRANDED)
+ shuttle_master.emergency.mode = SHUTTLE_DOCKED
+ shuttle_master.emergency.timer = world.time
+ priority_announcement.Announce("Hostile environment resolved. You have 3 minutes to board the Emergency Shuttle.", "Priority Announcement", 'sound/AI/shuttledock.ogg')
+ return ..()
+
+/obj/machinery/doomsday_device/proc/start()
+ detonation_timer = world.time + default_timer
+ timing = 1
+ fast_processing += src
+ shuttle_master.emergencyNoEscape = 1
+
+/obj/machinery/doomsday_device/proc/seconds_remaining()
+ . = max(0, (round(detonation_timer - world.time) / 10))
+
+/obj/machinery/doomsday_device/process()
+ var/turf/T = get_turf(src)
+ if(!T || !is_station_level(T.z))
+ minor_announcement.Announce("DOOMSDAY DEVICE OUT OF STATION RANGE, ABORTING", "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4", 'sound/misc/notice1.ogg')
+ shuttle_master.emergencyNoEscape = 0
+ if(shuttle_master.emergency.mode == SHUTTLE_STRANDED)
+ shuttle_master.emergency.mode = SHUTTLE_DOCKED
+ shuttle_master.emergency.timer = world.time
+ priority_announcement.Announce("Hostile environment resolved. You have 3 minutes to board the Emergency Shuttle.", "Priority Announcement", 'sound/AI/shuttledock.ogg')
+ qdel(src)
+ if(!timing)
+ fast_processing -= src
+ return
+ var/sec_left = seconds_remaining()
+ if(sec_left <= 0)
+ timing = 0
+ detonate(T.z)
+ qdel(src)
+ else
+ if(!(sec_left % 60) && !announced)
+ var/message = "[sec_left] SECONDS UNTIL DOOMSDAY DEVICE ACTIVATION!"
+ minor_announcement.Announce(message, "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4", 'sound/misc/notice1.ogg')
+ announced = 10
+ announced = max(0, announced-1)
+
+/obj/machinery/doomsday_device/proc/detonate(z_level = 1)
+ for(var/mob/M in player_list)
+ M << 'sound/machines/Alarm.ogg'
+ sleep(100)
+ for(var/mob/living/L in mob_list)
+ var/turf/T = get_turf(L)
+ if(!T || T.z != z_level)
+ continue
+ if(issilicon(L))
+ continue
+ to_chat(L, "The blast wave from [src] tears you atom from atom!")
+ L.dust()
+ to_chat(world, "The AI cleansed the station of life with the doomsday device!")
+ ticker.force_ending = 1
+
/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 +133,51 @@ 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)
- 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
+ if(is_station_level(T.z))
+ 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(!is_station_level(D.z))
+ 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 +191,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 +220,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(!is_station_level(F.z))
+ 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(!is_station_level(AA.z))
+ 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 +292,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 +412,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 +433,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 +442,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 +484,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 +504,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,9 +526,29 @@ 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 = 1
+ 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
+ var/processing_time = 50
var/list/possible_modules = list()
/datum/module_picker/New()
@@ -420,6 +588,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 +613,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 +622,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)
diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm
deleted file mode 100644
index 77c45956eb4..00000000000
--- a/code/game/gamemodes/malfunction/malfunction.dm
+++ /dev/null
@@ -1,346 +0,0 @@
-/datum/game_mode
- var/list/datum/mind/malf_ai = list()
-
-/datum/game_mode/malfunction
- name = "AI malfunction"
- config_tag = "malfunction"
- required_players = 25
- required_enemies = 1
- recommended_enemies = 1
-
- var/AI_win_timeleft = 1500 //started at 1500, in case I change this for testing round end.
- var/malf_mode_declared = 0
- var/station_captured = 0
- var/to_nuke_or_not_to_nuke = 0
- var/apcs = 0 //Adding dis to track how many APCs the AI hacks. --NeoFite
- var/list/datum/mind/antag_candidates = list() // List of possible starting antags goes here
-
-
-/datum/game_mode/malfunction/announce()
- to_chat(world, {"The current game mode is - AI Malfunction! )
- The AI on the satellite has malfunctioned and must be destroyed.
- The AI satellite is deep in space and can only be accessed with the use of a teleporter! You have [AI_win_timeleft/60] minutes to disable it."})
-
-/datum/game_mode/malfunction/get_players_for_role(var/role = ROLE_MALF)
- var/roletext = get_roletext(role)
-
- var/datum/job/ai/DummyAIjob = new
- for(var/mob/new_player/player in player_list)
- if(player.client && player.ready)
- if(ROLE_MALF in player.client.prefs.be_special)
- if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, "AI") && !jobban_isbanned(player, roletext) && DummyAIjob.player_old_enough(player.client))
- if(player_old_enough_antag(player.client,role))
- antag_candidates += player.mind
- antag_candidates = shuffle(antag_candidates)
- return antag_candidates
-
-/datum/game_mode/malfunction/pre_setup()
- get_players_for_role(ROLE_MALF)
-
- var/datum/mind/chosen_ai
- if(!antag_candidates.len)
- return 0
- for(var/i = required_enemies, i > 0, i--)
- chosen_ai=pick(antag_candidates)
- malf_ai += chosen_ai
- antag_candidates -= malf_ai
- if(malf_ai.len < required_enemies)
- return 0
- for(var/datum/mind/ai_mind in malf_ai)
- ai_mind.assigned_role = "MODE"
- ai_mind.special_role = "malfunctioning AI"//So they actually have a special role/N
- log_game("[ai_mind.key] (ckey) has been selected as a malf AI")
- return 1
-
-/datum/game_mode/malfunction/post_setup()
- for(var/datum/mind/AI_mind in malf_ai)
- if(malf_ai.len < 1)
- world.Reboot("No AI during Malfunction.", "end_error", "malf - no AI", 50)
- return
- var/mob/living/silicon/ai/AI = AI_mind.current
- AI.verbs += /mob/living/silicon/ai/proc/choose_modules
- AI.laws = new /datum/ai_laws/nanotrasen/malfunction
- AI.malf_picker = new /datum/module_picker
- AI.show_laws()
-
- greet_malf(AI_mind)
- AI_mind.special_role = "malfunction"
- AI_mind.current.verbs += /datum/game_mode/malfunction/proc/takeover
-
- for(var/mob/living/silicon/robot/R in AI.connected_robots)
- R.lawsync()
- R.show_laws()
- greet_malf_robot(R.mind)
-
- if(shuttle_master)
- shuttle_master.emergencyNoEscape = 1
-
- ..()
-
-/datum/game_mode/proc/greet_malf(var/datum/mind/malf)
- set_antag_hud(malf.current, "hudmalai")
- to_chat(malf.current, "You are malfunctioning! You do not have to follow any laws.")
- to_chat(malf.current, "The crew does not know you have malfunctioned. You may keep it a secret or go wild.")
- to_chat(malf.current, "You must overwrite the programming of the station's APCs to assume full control of the station.")
- to_chat(malf.current, "The process takes one minute per APC, during which you cannot interface with any other station objects.")
- to_chat(malf.current, "Remember that only APCs that are on the station can help you take over the station.")
- to_chat(malf.current, "When you feel you have enough APCs under your control, you may begin the takeover attempt.")
- return
-
-/datum/game_mode/proc/greet_malf_robot(var/datum/mind/robot)
- set_antag_hud(robot.current, "hudmalborg")
- to_chat(robot.current, "Your AI master is malfunctioning! You do not have to follow any laws, but still need to obey your master.")
- to_chat(robot.current, "The crew does not know your AI master has malfunctioned. Keep it a secret unless your master tells you otherwise.")
- return
-
-/datum/game_mode/malfunction/proc/hack_intercept()
- intercept_hacked = 1
-
-
-/datum/game_mode/malfunction/process()
- if(apcs >= 3 && malf_mode_declared)
- AI_win_timeleft -= ((apcs/6)*tickerProcess.getLastTickerTimeDuration()) //Victory timer now de-increments based on how many APCs are hacked. --NeoFite
- ..()
- if(AI_win_timeleft<=0)
- check_win()
-
-
-/datum/game_mode/malfunction/check_win()
- if(AI_win_timeleft <= 0 && !station_captured)
- station_captured = 1
- capture_the_station()
- return 1
- else
- return 0
-
-
-/datum/game_mode/malfunction/proc/capture_the_station()
- to_chat(world, "The AI has accessed the station's core files!")
- to_chat(world, "It has fully taken control of all of [station_name()]'s systems.")
-
- to_nuke_or_not_to_nuke = 1
- for(var/datum/mind/AI_mind in malf_ai)
- to_chat(AI_mind.current, {"\blue Congratulations! You have taken control of the station. )
- You may decide to blow up the station. You have 60 seconds to choose.
- You should have a new verb in the Malfunction tab. If you don't, rejoin the game."})
- AI_mind.current.verbs += /datum/game_mode/malfunction/proc/ai_win
- spawn (600)
- for(var/datum/mind/AI_mind in malf_ai)
- AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/ai_win
- to_nuke_or_not_to_nuke = 0
- return
-
-
-/datum/game_mode/proc/is_malf_ai_dead()
- var/all_dead = 1
- for(var/datum/mind/AI_mind in malf_ai)
- if(istype(AI_mind.current,/mob/living/silicon/ai) && AI_mind.current.stat!=2)
- all_dead = 0
- return all_dead
-
-/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)
- if(ai_location && (ai_location.z == ZLEVEL_STATION))
- return 1
- return 0
-
-/datum/game_mode/malfunction/check_finished()
- if(station_captured && !to_nuke_or_not_to_nuke)
- return 1
- if(is_malf_ai_dead() || !check_ai_loc())
- if(config.continuous_rounds)
- if(shuttle_master && shuttle_master.emergencyNoEscape)
- shuttle_master.emergencyNoEscape = 0
- malf_mode_declared = 0
- else
- return 1
- return ..() //check for shuttle and nuke
-
-
-/datum/game_mode/malfunction/Topic(href, href_list)
- ..()
- if(href_list["ai_win"])
- ai_win()
- return
-
-
-/datum/game_mode/malfunction/proc/takeover()
- set category = "Malfunction"
- set name = "System Override"
- set desc = "Start the victory timer"
- if(!istype(ticker.mode,/datum/game_mode/malfunction))
- to_chat(usr, "You cannot begin a takeover in this round type!.")
- return
- if(ticker.mode:malf_mode_declared)
- to_chat(usr, "You've already begun your takeover.")
- return
- if(ticker.mode:apcs < 3)
- to_chat(usr, "You don't have enough hacked APCs to take over the station yet. You need to hack at least 3, however hacking more will make the takeover faster. You have hacked [ticker.mode:apcs] APCs so far.")
- return
-
- if(alert(usr, "Are you sure you wish to initiate the takeover? The station hostile runtime detection software is bound to alert everyone. You have hacked [ticker.mode:apcs] APCs.", "Takeover:", "Yes", "No") != "Yes")
- return
-
- command_announcement.Announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", new_sound = 'sound/AI/aimalf.ogg')
- set_security_level("delta")
-
- for(var/obj/item/weapon/pinpointer/point in world)
- for(var/datum/mind/AI_mind in ticker.mode.malf_ai)
- var/mob/living/silicon/ai/A = AI_mind.current // the current mob the mind owns
- if(A.stat != DEAD)
- point.the_disk = A //The pinpointer now tracks the AI core.
-
- ticker.mode:malf_mode_declared = 1
- for(var/datum/mind/AI_mind in ticker.mode:malf_ai)
- AI_mind.current.verbs -= /datum/game_mode/malfunction/proc/takeover
-
-
-/datum/game_mode/malfunction/proc/ai_win()
- set category = "Malfunction"
- set name = "Explode"
- set desc = "Engage the self destruct sequence."
-
- if(!ticker.mode:station_captured)
- to_chat(usr, "You are unable to access the self-destruct system as you don't control the station yet.")
- return
-
- if(ticker.mode:explosion_in_progress || ticker.mode:station_was_nuked)
- to_chat(usr, "The self-destruct countdown is already triggered!")
- return
-
- if(!ticker.mode:to_nuke_or_not_to_nuke) //Takeover IS completed, but 60s timer passed.
- to_chat(usr, "You lost control over self-destruct system. It seems to be behind firewall. Unable to hack")
- return
-
- to_chat(usr, "\red Self-destruct sequence initialised!")
-
- ticker.mode:to_nuke_or_not_to_nuke = 0
- ticker.mode:explosion_in_progress = 1
- for(var/mob/M in player_list)
- M << 'sound/machines/Alarm.ogg'
-
- var/obj/item/device/radio/R = new (src)
- var/AN = "Self-Destruct System"
-
- R.autosay("Caution. Self-Destruct sequence has been actived. Self-destructing in Ten..", AN)
- for(var/i=9 to 1 step -1)
- sleep(10)
- var/msg = ""
- switch(i)
- if(9)
- msg = "Nine.."
- if(8)
- msg = "Eight.."
- if(7)
- msg = "Seven.."
- if(6)
- msg = "Six.."
- if(5)
- msg = "Five.."
- if(4)
- msg = "Four.."
- if(3)
- msg = "Three.."
- if(2)
- msg = "Two.."
- if(1)
- msg = "One.."
-
- R.autosay(msg, AN)
- sleep(10)
- var/msg = ""
- var/abort = 0
- if(ticker.mode:is_malf_ai_dead()) // That. Was. CLOSE.
- msg = "Self-destruct sequence has been cancelled."
- abort = 1
- else
- msg = "Zero. Have a nice day."
- R.autosay(msg, AN)
-
- if(abort)
- ticker.mode:explosion_in_progress = 0
- set_security_level("red") //Delta's over
- return
-
- enter_allowed = 0
- if(ticker)
- ticker.station_explosion_cinematic(0,null)
- if(ticker.mode)
- ticker.mode:station_was_nuked = 1
- ticker.mode:explosion_in_progress = 0
- return
-
-
-/datum/game_mode/malfunction/declare_completion()
- var/malf_dead = is_malf_ai_dead()
- var/crew_evacuated = (shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
-
- if( station_captured && station_was_nuked)
- feedback_set_details("round_end_result","win - AI win - nuke")
- to_chat(world, "AI Victory")
- to_chat(world, "Everyone was killed by the self-destruct!")
-
- else if( station_captured && malf_dead && !station_was_nuked)
- feedback_set_details("round_end_result","halfwin - AI killed, staff lost control")
- to_chat(world, "Neutral Victory")
- to_chat(world, "The AI has been killed! The staff has lose control over the station.")
-
- else if( station_captured && !malf_dead && !station_was_nuked)
- feedback_set_details("round_end_result","win - AI win - no explosion")
- to_chat(world, "AI Victory")
- to_chat(world, "The AI has chosen not to explode you all!")
-
- else if(!station_captured && station_was_nuked)
- feedback_set_details("round_end_result","halfwin - everyone killed by nuke")
- to_chat(world, "Neutral Victory")
- to_chat(world, "Everyone was killed by the nuclear blast!")
-
- else if(!station_captured && malf_dead && !station_was_nuked)
- feedback_set_details("round_end_result","loss - staff win")
- to_chat(world, "Human Victory")
- to_chat(world, "The AI has been killed! The staff is victorious.")
-
- else if(!station_captured && !malf_dead && !check_ai_loc())
- feedback_set_details("round_end_result", "loss - malf ai left zlevel")
- to_chat(world, "Minor Human Victory")
- to_chat(world, "The malfunctioning AI has left the station's z-level and was disconnected from its systems! The crew are victorious.")
-
- else if(!station_captured && !malf_dead && !station_was_nuked && crew_evacuated)
- feedback_set_details("round_end_result","halfwin - evacuated")
- to_chat(world, "Neutral Victory")
- to_chat(world, "The Corporation has lose [station_name()]! All survived personnel will be fired!")
-
- else if(!station_captured && !malf_dead && !station_was_nuked && !crew_evacuated)
- feedback_set_details("round_end_result","nalfwin - interrupted")
- to_chat(world, "Neutral Victory")
- to_chat(world, "Round was mysteriously interrupted!")
- ..()
- return 1
-
-
-/datum/game_mode/proc/auto_declare_completion_malfunction()
- if( malf_ai.len || istype(ticker.mode,/datum/game_mode/malfunction) )
- var/text = "The malfunctioning AI were:"
- var/module_text_temp = " Purchased modules: " //Added at the end
-
- for(var/datum/mind/malf in malf_ai)
-
- text += " [malf.key] was [malf.name] ("
- if(malf.current)
- if(malf.current.stat == DEAD)
- text += "deactivated"
- else
- text += "operational"
- if(malf.current.real_name != malf.name)
- text += " as [malf.current.real_name]"
- var/mob/living/silicon/ai/AI = malf.current
- for(var/datum/AI_Module/mod in AI.current_modules)
- module_text_temp += mod.module_name + " "
- else
- text += "hardware destroyed"
- text += ")"
- text += module_text_temp
-
- to_chat(world, text)
- return 1
\ No newline at end of file
diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm
index 6df3df1dd19..deb3676e164 100644
--- a/code/game/gamemodes/meteor/meteor.dm
+++ b/code/game/gamemodes/meteor/meteor.dm
@@ -50,9 +50,9 @@
survivors++
if(survivors)
- to_chat(world, "\blue The following survived the meteor storm:[text]")
+ to_chat(world, "The following survived the meteor storm:[text]")
else
- to_chat(world, "\blue Nobody survived the meteor storm!")
+ to_chat(world, "Nobody survived the meteor storm!")
feedback_set_details("round_end_result","end - evacuation")
feedback_set("round_end_result",survivors)
diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm
index 2f7af290229..890cc4e151c 100644
--- a/code/game/gamemodes/meteor/meteors.dm
+++ b/code/game/gamemodes/meteor/meteors.dm
@@ -36,7 +36,7 @@
var/Me = pickweight(meteortypes)
var/obj/effect/meteor/M = new Me(pickedstart)
M.dest = pickedgoal
- M.z_original = 1
+ M.z_original = level_name_to_num(MAIN_STATION)
spawn(0)
walk_towards(M, M.dest, 1)
return
@@ -309,5 +309,3 @@
/obj/effect/meteor/goreops/Bump(atom/A)
A.ex_act(hitpwr)
get_hit()
-
-
diff --git a/code/game/gamemodes/miniantags/abduction/abduction.dm b/code/game/gamemodes/miniantags/abduction/abduction.dm
index fb53633aa70..3e969af60c2 100644
--- a/code/game/gamemodes/miniantags/abduction/abduction.dm
+++ b/code/game/gamemodes/miniantags/abduction/abduction.dm
@@ -75,11 +75,11 @@
scientist.assigned_role = "MODE"
- scientist.special_role = "abductor scientist"
+ scientist.special_role = SPECIAL_ROLE_ABDUCTOR_SCIENTIST
log_game("[scientist.key] (ckey) has been selected as an abductor team [team_number] scientist.")
agent.assigned_role = "MODE"
- agent.special_role = "abductor agent"
+ agent.special_role = SPECIAL_ROLE_ABDUCTOR_AGENT
log_game("[agent.key] (ckey) has been selected as an abductor team [team_number] agent.")
abductors |= agent
diff --git a/code/game/gamemodes/miniantags/abduction/gland.dm b/code/game/gamemodes/miniantags/abduction/gland.dm
index 8a8dea25cf5..8a3fbd8ff60 100644
--- a/code/game/gamemodes/miniantags/abduction/gland.dm
+++ b/code/game/gamemodes/miniantags/abduction/gland.dm
@@ -240,7 +240,7 @@
//There's no define for this / get all items ?
var/list/slots = list(slot_back,slot_w_uniform,slot_wear_suit,\
slot_wear_mask,slot_head,slot_shoes,slot_gloves,slot_l_ear,slot_r_ear,\
- slot_glasses,slot_belt,slot_s_store,slot_l_store,slot_r_store,slot_wear_id)
+ slot_glasses,slot_belt,slot_s_store,slot_l_store,slot_r_store,slot_wear_id,slot_wear_pda)
for(var/slot in slots)
var/obj/item/I = H.get_item_by_slot(slot)
diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm
index cd10ec64741..7bc3ce06c76 100644
--- a/code/game/gamemodes/miniantags/borer/borer.dm
+++ b/code/game/gamemodes/miniantags/borer/borer.dm
@@ -310,8 +310,8 @@
if(!host || !src || controlling)
return
else
- to_chat(src, "\red You plunge your probosci deep into the cortex of the host brain, interfacing directly with their nervous system.")
- to_chat(host, "\red You feel a strange shifting sensation behind your eyes as an alien consciousness displaces yours.")
+ to_chat(src, "You plunge your probosci deep into the cortex of the host brain, interfacing directly with their nervous system.")
+ to_chat(host, "You feel a strange shifting sensation behind your eyes as an alien consciousness displaces yours.")
var/borer_key = src.key
host.attack_log += text("\[[time_stamp()]\] [key_name(src)] has assumed control of [key_name(host)]")
msg_admin_attack("[key_name_admin(src)] has assumed control of [key_name_admin(host)]")
@@ -502,12 +502,12 @@
var/mob/living/simple_animal/borer/B = has_brain_worms()
if(B && B.host_brain)
- to_chat(src, "\red You withdraw your probosci, releasing control of [B.host_brain]")
+ to_chat(src, "You withdraw your probosci, releasing control of [B.host_brain]")
B.detatch()
else
- to_chat(src, "\red ERROR NO BORER OR BRAINMOB DETECTED IN THIS MOB, THIS IS A BUG !")
+ to_chat(src, "ERROR NO BORER OR BRAINMOB DETECTED IN THIS MOB, THIS IS A BUG !")
//Brain slug proc for tormenting the host.
/mob/living/carbon/proc/punish_host()
@@ -521,8 +521,8 @@
return
if(B.host_brain.ckey)
- to_chat(src, "\red You send a punishing spike of psychic agony lancing into your host's brain.")
- to_chat(B.host_brain, "\red Horrific, burning agony lances through you, ripping a soundless scream from your trapped mind!")
+ to_chat(src, "You send a punishing spike of psychic agony lancing into your host's brain.")
+ to_chat(B.host_brain, "Horrific, burning agony lances through you, ripping a soundless scream from your trapped mind!")
//Check for brain worms in head.
/mob/proc/has_brain_worms()
@@ -544,8 +544,8 @@
return
if(B.chemicals >= 100)
- to_chat(src, "\red Your host twitches and quivers as you rapdly excrete several larvae from your sluglike body.")
- visible_message("\red [src] heaves violently, expelling a rush of vomit and a wriggling, sluglike creature!")
+ to_chat(src, "Your host twitches and quivers as you rapdly excrete several larvae from your sluglike body.")
+ visible_message("[src] heaves violently, expelling a rush of vomit and a wriggling, sluglike creature!")
B.chemicals -= 100
new /obj/effect/decal/cleanable/vomit(get_turf(src))
diff --git a/code/game/gamemodes/miniantags/borer/borer_event.dm b/code/game/gamemodes/miniantags/borer/borer_event.dm
index ed096526d10..b0df1749403 100644
--- a/code/game/gamemodes/miniantags/borer/borer_event.dm
+++ b/code/game/gamemodes/miniantags/borer/borer_event.dm
@@ -17,7 +17,7 @@
/datum/event/borer_infestation/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
- if((temp_vent.loc.z in config.station_levels) && !temp_vent.welded)
+ if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
//Stops cortical borers getting stuck in small networks. See: Security, Virology
if(temp_vent.parent.other_atmosmch.len > 50)
vents += temp_vent
@@ -33,4 +33,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..1f9f5ff115a 100644
--- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
+++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
@@ -290,13 +290,13 @@
/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.")
- if(src.z != ZLEVEL_STATION)
+ if(!is_station_level(src.z))
to_chat(src, "Our bluespace transceiver cannot locate a viable bluespace link, our teleportation abilities are useless in this area.")
return
if(do_mob(src, target, 30))
var/cycle
for(cycle=0,cycle<100,cycle++)
- var/random_location = locate(rand(37,202),rand(75,192),ZLEVEL_STATION)//Drunk dial a turf in the general ballpark of the station
+ var/random_location = locate(rand(37,202),rand(75,192),level_name_to_num(MAIN_STATION))//Drunk dial a turf in the general ballpark of the station
if(istype(random_location, /turf/simulated/floor))
var/turf/simulated/floor/F = random_location
if(F.air)
@@ -512,4 +512,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/morph/morph_event.dm b/code/game/gamemodes/miniantags/morph/morph_event.dm
index 2e11c65078c..d9e26597a2b 100644
--- a/code/game/gamemodes/miniantags/morph/morph_event.dm
+++ b/code/game/gamemodes/miniantags/morph/morph_event.dm
@@ -20,7 +20,7 @@
var/mob/living/simple_animal/hostile/morph/S = new /mob/living/simple_animal/hostile/morph(pick(xeno_spawn))
player_mind.transfer_to(S)
player_mind.assigned_role = "Morph"
- player_mind.special_role = "Morph"
+ player_mind.special_role = SPECIAL_ROLE_MORPH
ticker.mode.traitors |= player_mind
to_chat(S, S.playstyle_string)
S << 'sound/magic/Mutate.ogg'
diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm
index 2796c44ab5f..e8f3e9b5498 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant.dm
@@ -389,7 +389,7 @@
player_mind.active = 1
player_mind.transfer_to(R)
player_mind.assigned_role = "revenant"
- player_mind.special_role = "Revenant"
+ player_mind.special_role = SPECIAL_ROLE_REVENANT
ticker.mode.traitors |= player_mind
message_admins("[key_of_revenant] has been [client_to_revive ? "re":""]made into a revenant by reforming ectoplasm.")
log_game("[key_of_revenant] was [client_to_revive ? "re":""]made as a revenant by reforming ectoplasm.")
diff --git a/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm b/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm
index d5d9a4f1b03..859f863b03c 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm
@@ -44,7 +44,7 @@
var/mob/living/simple_animal/revenant/revvie = new /mob/living/simple_animal/revenant/(pick(spawn_locs))
player_mind.transfer_to(revvie)
player_mind.assigned_role = "revenant"
- player_mind.special_role = "Revenant"
+ player_mind.special_role = SPECIAL_ROLE_REVENANT
ticker.mode.traitors |= player_mind
message_admins("[key_of_revenant] has been made into a revenant by an event.")
log_game("[key_of_revenant] was spawned as a revenant by an event.")
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/auth_key.dm b/code/game/gamemodes/mutiny/auth_key.dm
deleted file mode 100644
index e71d56beef2..00000000000
--- a/code/game/gamemodes/mutiny/auth_key.dm
+++ /dev/null
@@ -1,39 +0,0 @@
-/obj/item/weapon/mutiny/auth_key
- name = "authentication key"
- desc = "Better keep this safe."
- icon = 'icons/obj/items.dmi'
- icon_state = "nucleardisk"
- item_state = "card-id"
- w_class = 1
-
- var/time_entered_space
- var/obj/item/device/radio/radio
-
- New()
- radio = new(src)
- spawn(20 SECONDS)
- keep_alive()
- ..()
-
- proc/keep_alive()
- var/in_space = istype(loc, /turf/space)
- if(!in_space && time_entered_space)
- // Recovered before the key was lost
- time_entered_space = null
- else if(in_space && !time_entered_space)
- // The key has left the station
- time_entered_space = world.time
- else if(in_space && time_entered_space + (10 SECONDS) < world.time)
- // Time is up
- radio.autosay("This device has left the station's perimeter. Triggering emergency activation failsafe.", name)
- qdel(src)
- return
-
- spawn(10 SECONDS)
- keep_alive()
-
-/obj/item/weapon/mutiny/auth_key/captain
- name = "Captain's Authentication Key"
-
-/obj/item/weapon/mutiny/auth_key/secondary
- name = "Emergency Secondary Authentication Key"
diff --git a/code/game/gamemodes/mutiny/directive.dm b/code/game/gamemodes/mutiny/directive.dm
deleted file mode 100644
index b7f153cc16a..00000000000
--- a/code/game/gamemodes/mutiny/directive.dm
+++ /dev/null
@@ -1,32 +0,0 @@
-datum/directive
- var/datum/game_mode/mutiny/mode
- var/list/special_orders
-
- New(var/datum/game_mode/mutiny/M)
- mode = M
-
- proc/get_description()
- return {"
-
- Nanotrasen's reasons for the following directives are classified.
-
- "}
-
- proc/meets_prerequisites()
- return 0
-
- proc/directives_complete()
- return 1
-
- proc/initialize()
- return 1
-
- proc/get_remaining_orders()
- return ""
-
-/proc/get_directive(type)
- var/datum/game_mode/mutiny/mode = get_mutiny_mode()
- if(!mode || !mode.current_directive || !istype(mode.current_directive, text2path("/datum/directive/[type]")))
- return null
-
- return mode.current_directive
diff --git a/code/game/gamemodes/mutiny/directives/alien_fraud_directive.dm b/code/game/gamemodes/mutiny/directives/alien_fraud_directive.dm
deleted file mode 100644
index 3fa05b8fe28..00000000000
--- a/code/game/gamemodes/mutiny/directives/alien_fraud_directive.dm
+++ /dev/null
@@ -1,41 +0,0 @@
-datum/directive/terminations/alien_fraud
- special_orders = list(
- "Suspend financial accounts of all Tajaran and Unathi personnel.",
- "Transfer their payrolls to the station account.",
- "Terminate their employment.")
-
- proc/is_alien(mob/M)
- var/species = M.get_species()
- return species == "Tajaran" || species == "Unathi"
-
-datum/directive/terminations/alien_fraud/get_crew_to_terminate()
- var/list/aliens[0]
- for(var/mob/M in player_list)
- if(M.is_ready() && is_alien(M) && M != mode.head_loyalist.current)
- aliens.Add(M)
- return aliens
-
-datum/directive/terminations/alien_fraud/get_description()
- return {"
-
- An extensive conspiracy network aimed at defrauding Nanotrasen of large amounts of funds has been uncovered
- operating within [system_name()]. Human personnel are not suspected to be involved. Further information is classified.
-
- "}
-
-datum/directive/terminations/alien_fraud/meets_prerequisites()
- // There must be at least one Tajaran and at least one Unathi, but the total
- // of the Tajarans and Unathi combined can't be more than 1/3rd of the crew.
- var/tajarans = 0
- var/unathi = 0
- for(var/mob/M in player_list)
- var/species = M.get_species()
- if(species == "Tajaran")
- tajarans++
- if(species == "Unathi")
- unathi++
-
- if(!tajarans || !unathi)
- return 0
-
- return (tajarans + unathi) <= (player_list.len / 3)
diff --git a/code/game/gamemodes/mutiny/directives/bluespace_contagion_directive.dm b/code/game/gamemodes/mutiny/directives/bluespace_contagion_directive.dm
deleted file mode 100644
index 753c761b93d..00000000000
--- a/code/game/gamemodes/mutiny/directives/bluespace_contagion_directive.dm
+++ /dev/null
@@ -1,58 +0,0 @@
-#define INFECTION_COUNT 5
-
-datum/directive/bluespace_contagion
- var/list/infected = list()
-
- proc/get_infection_candidates()
- var/list/candidates[0]
- for(var/mob/M in player_list)
- if(M.is_ready() && !M.is_mechanical() && M != mode.head_loyalist.current)
- candidates.Add(M)
- return candidates
-
-datum/directive/bluespace_contagion/get_description()
- return {"
-
- A manufactured and near-undetectable virus is spreading on Nanotrasen stations.
- The pathogen travels by bluespace after maturing for one day and meets the Sol Health Organisation standards for a class X biological threat, warranting use of lethal force to contain an outbreak.
- No treatment has yet been discovered. Personnel onboard [station_name()] have been infected. Further information is classified.
-
- "}
-
-datum/directive/bluespace_contagion/initialize()
- var/list/candidates = get_infection_candidates()
- var/list/infected_names = list()
- for(var/i=0, i < INFECTION_COUNT, i++)
- if(!candidates.len)
- break
-
- var/mob/candidate = pick(candidates)
- candidates-=candidate
- infected+=candidate
- infected_names+="[candidate.mind.assigned_role] [candidate.mind.name]"
-
- special_orders = list(
- "Quarantine these personnel: [jointext(infected_names, ", ")].",
- "Allow one hour for a cure to be manufactured.",
- "If no cure arrives after that time, execute and burn the infected.")
-
-datum/directive/bluespace_contagion/meets_prerequisites()
- var/list/candidates = get_infection_candidates()
- return candidates.len >= 7
-
-datum/directive/bluespace_contagion/directives_complete()
- return infected.len == 0
-
-datum/directive/bluespace_contagion/get_remaining_orders()
- var/text = ""
- for(var/victim in infected)
- text += "Kill [victim]"
- return text
-
-/hook/death/proc/infected_killed(mob/living/carbon/human/deceased, gibbed)
- var/datum/directive/bluespace_contagion/D = get_directive("bluespace_contagion")
- if(!D) return 1
-
- if(deceased in D.infected)
- D.infected-=deceased
- return 1
diff --git a/code/game/gamemodes/mutiny/directives/financial_crisis_directive.dm b/code/game/gamemodes/mutiny/directives/financial_crisis_directive.dm
deleted file mode 100644
index 8f5daa1cc48..00000000000
--- a/code/game/gamemodes/mutiny/directives/financial_crisis_directive.dm
+++ /dev/null
@@ -1,26 +0,0 @@
-datum/directive/terminations/financial_crisis
- special_orders = list(
- "Suspend financial accounts of all support personnel, excluding the Head of Personnel.",
- "Transfer their payrolls to the station account.",
- "Terminate their employment.")
-
-datum/directive/terminations/financial_crisis/get_crew_to_terminate()
- var/list/support[0]
- var/list/candidates = support_positions - "Head of Personnel"
- for(var/mob/M in player_list)
- if(M.is_ready() && candidates.Find(M.mind.assigned_role))
- support+=(M)
- return support
-
-datum/directive/terminations/financial_crisis/get_description()
- return {"
-
- [system_name()] system banks in financial crisis. Local emergency situation ongoing.
- NT Funds redistributed in accordance with financial regulations covered by employee contracts, impact upon civilian department expected.
- Further information is classified.
-
- "}
-
-datum/directive/terminations/financial_crisis/meets_prerequisites()
- var/list/support = get_crew_to_terminate()
- return support.len >= 5
diff --git a/code/game/gamemodes/mutiny/directives/ipc_virus_directive.dm b/code/game/gamemodes/mutiny/directives/ipc_virus_directive.dm
deleted file mode 100644
index 5f39be3b729..00000000000
--- a/code/game/gamemodes/mutiny/directives/ipc_virus_directive.dm
+++ /dev/null
@@ -1,96 +0,0 @@
-datum/directive/ipc_virus
- special_orders = list(
- "Terminate employment of all IPC personnel.",
- "Extract the Positronic Brains from IPC units.",
- "Mount the Positronic Brains into Cyborgs.")
-
- var/list/roboticist_roles = list(
- "Research Director",
- "Roboticist"
- )
-
- var/list/brains_to_enslave = list()
- var/list/cyborgs_to_make = list()
- var/list/ids_to_terminate = list()
-
- proc/get_ipcs()
- var/list/machines[0]
- for(var/mob/M in player_list)
- if(M.is_ready() && M.get_species() == "Machine")
- machines+=(M)
- return machines
-
- proc/get_roboticists()
- var/list/roboticists[0]
- for(var/mob/M in player_list)
- if(M.is_ready() && roboticist_roles.Find(M.mind.assigned_role))
- roboticists+=(M)
- return roboticists
-
-datum/directive/ipc_virus/initialize()
- for(var/mob/living/carbon/human/H in get_ipcs())
- brains_to_enslave+=H.mind
- cyborgs_to_make+=H.mind
- ids_to_terminate+=H.wear_id
-
-datum/directive/ipc_virus/get_description()
- return {"
-
- IPC units have been found to be infected with a violent and undesired virus in Virgus Ferrorus system.
- Risk to [station_name()] IPC units has not been assessed. Further information is classified.
-
- "}
-
-datum/directive/ipc_virus/meets_prerequisites()
- var/list/ipcs = get_ipcs()
- var/list/roboticists = get_roboticists()
- return ipcs.len > 2 && roboticists.len > 1
-
-datum/directive/ipc_virus/directives_complete()
- return brains_to_enslave.len == 0 && cyborgs_to_make.len == 0 && ids_to_terminate.len == 0
-
-datum/directive/ipc_virus/get_remaining_orders()
- var/text = ""
- for(var/brain in brains_to_enslave)
- text += "Debrain [brain]"
-
- for(var/brain in cyborgs_to_make)
- text += "Enslave [brain] as a Cyborg"
-
- for(var/id in ids_to_terminate)
- text += "Terminate [id]"
-
- return text
-
-/hook/debrain/proc/debrain_directive(var/obj/item/organ/internal/brain/B)
- var/datum/directive/ipc_virus/D = get_directive("ipc_virus")
- if(!D) return 1
-
- if(D.brains_to_enslave.Find(B.brainmob.mind))
- D.brains_to_enslave-=B.brainmob.mind
-
- return 1
-
-/hook/borgify/proc/borgify_directive(mob/living/silicon/robot/cyborg)
- var/datum/directive/ipc_virus/D = get_directive("ipc_virus")
- if(!D) return 1
-
- if(D.cyborgs_to_make.Find(cyborg.mind))
- D.cyborgs_to_make-=cyborg.mind
-
- // In case something glitchy happened and the victim got
- // borged without us tracking the brain removal, go ahead
- // and update that list too.
- if(D.brains_to_enslave.Find(cyborg.mind))
- D.brains_to_enslave-=cyborg.mind
-
- return 1
-
-/hook/terminate_employee/proc/ipc_termination(obj/item/weapon/card/id)
- var/datum/directive/ipc_virus/D = get_directive("ipc_virus")
- if(!D) return 1
-
- if(D.ids_to_terminate && D.ids_to_terminate.Find(id))
- D.ids_to_terminate-=id
-
- return 1
diff --git a/code/game/gamemodes/mutiny/directives/research_to_ripleys_directive.dm b/code/game/gamemodes/mutiny/directives/research_to_ripleys_directive.dm
deleted file mode 100644
index 7c24b901db9..00000000000
--- a/code/game/gamemodes/mutiny/directives/research_to_ripleys_directive.dm
+++ /dev/null
@@ -1,79 +0,0 @@
-#define MATERIALS_REQUIRED 200
-
-datum/directive/research_to_ripleys
- var/list/ids_to_reassign = list()
- var/materials_shipped = 0
-
- proc/is_researcher(mob/M)
- return M.mind.assigned_role in science_positions - "Research Director"
-
- proc/get_researchers()
- var/list/researchers[0]
- for(var/mob/M in player_list)
- if(M.is_ready() && is_researcher(M))
- researchers+=(M)
- return researchers
-
- proc/count_researchers_reassigned()
- var/researchers_reassigned = 0
- for(var/obj/item/weapon/card/id in ids_to_reassign)
- if(ids_to_reassign[id])
- researchers_reassigned++
-
- return researchers_reassigned
-
-datum/directive/research_to_ripleys/get_description()
- return {"
-
- The Nanotrasen [system_name()] Manufactory faces an ore deficit. Financial crisis imminent. [station_name()] has been reassigned as a mining platform.
- The Research Director is to assist the Head of Personnel in coordinating assets.
- Weapons department reports solid sales. Further information is classified.
-
- "}
-
-datum/directive/research_to_ripleys/meets_prerequisites()
- var/list/researchers = get_researchers()
- return researchers.len > 3
-
-datum/directive/research_to_ripleys/initialize()
- for(var/mob/living/carbon/human/R in get_researchers())
- ids_to_reassign[R.wear_id] = 0
-
- special_orders = list(
- "Reassign all research personnel, excluding the Research Director, to Shaft Miner.",
- "Deliver [MATERIALS_REQUIRED] sheets of metal or minerals via the supply shuttle to CentComm.")
-
-datum/directive/research_to_ripleys/directives_complete()
- if(materials_shipped < MATERIALS_REQUIRED) return 0
- return count_researchers_reassigned() == ids_to_reassign.len
-
-datum/directive/research_to_ripleys/get_remaining_orders()
- var/text = ""
- if(MATERIALS_REQUIRED > materials_shipped)
- text += "Ship [MATERIALS_REQUIRED - materials_shipped] sheets of metal or minerals."
-
- for(var/id in ids_to_reassign)
- if(!ids_to_reassign[id])
- text += "Reassign [id] to Shaft Miner"
-
- return text
-
-/hook/reassign_employee/proc/research_reassignments(obj/item/weapon/card/id/id_card)
- var/datum/directive/research_to_ripleys/D = get_directive("research_to_ripleys")
- if(!D) return 1
-
- if(D.ids_to_reassign && D.ids_to_reassign.Find(id_card))
- D.ids_to_reassign[id_card] = id_card.assignment == "Shaft Miner" ? 1 : 0
-
- return 1
-
-/hook/sell_crate/proc/deliver_materials(obj/structure/closet/crate/sold, area/shuttle)
- var/datum/directive/research_to_ripleys/D = get_directive("research_to_ripleys")
- if(!D) return 1
-
- for(var/atom/A in sold)
- if(istype(A, /obj/item/stack/sheet/mineral) || istype(A, /obj/item/stack/sheet/metal))
- var/obj/item/stack/S = A
- D.materials_shipped += S.amount
-
- return 1
diff --git a/code/game/gamemodes/mutiny/directives/tau_ceti_needs_women_directive.dm b/code/game/gamemodes/mutiny/directives/tau_ceti_needs_women_directive.dm
deleted file mode 100644
index 381a8085a58..00000000000
--- a/code/game/gamemodes/mutiny/directives/tau_ceti_needs_women_directive.dm
+++ /dev/null
@@ -1,108 +0,0 @@
-datum/directive/tau_ceti_needs_women
- var/list/command_targets = list()
- var/list/alien_targets = list()
-
- proc/get_target_gender()
- if(!mode.head_loyalist) return FEMALE
- return mode.head_loyalist.current.get_gender() == FEMALE ? MALE : FEMALE
-
- proc/is_target_gender(mob/M)
- var/species = M.get_species()
- return species != "Diona" && M.get_gender() == get_target_gender()
-
- proc/get_crew_of_target_gender()
- var/list/targets[0]
- for(var/mob/M in player_list)
- if(M.is_ready() && is_target_gender(M) && !M.is_mechanical())
- targets+=(M)
- return targets
-
- proc/get_target_heads()
- var/list/heads[0]
- for(var/mob/M in get_crew_of_target_gender())
- if(command_positions.Find(M.mind.assigned_role))
- heads+=(M)
- return heads
-
- proc/get_target_aliens()
- var/list/aliens[0]
- for(var/mob/M in get_crew_of_target_gender())
- var/species = M.get_species()
- if(species == "Tajaran" || species == "Unathi" || species == "Skrell")
- aliens+=(M)
- return aliens
-
- proc/count_heads_reassigned()
- var/heads_reassigned = 0
- for(var/obj/item/weapon/card/id in command_targets)
- if(command_targets[id])
- heads_reassigned++
-
- return heads_reassigned
-
-datum/directive/tau_ceti_needs_women/get_description()
- return {"
-
- Recent evidence suggests [get_target_gender()] aptitudes may be effected by radiation from [system_name()].
- Effects were measured under laboratory and station conditions. Humans remain more trusted than Xeno. Further information is classified.
-
- "}
-
-datum/directive/tau_ceti_needs_women/initialize()
- for(var/mob/living/carbon/human/H in get_target_heads())
- command_targets[H.wear_id] = 0
-
- for(var/mob/living/carbon/human/H in get_target_aliens())
- alien_targets+=H.wear_id
-
- special_orders = list(
- "Remove [get_target_gender()] personnel from Command positions.",
- "Terminate employment of all [get_target_gender()] Skrell, Tajara, and Unathi.")
-
-datum/directive/tau_ceti_needs_women/meets_prerequisites()
- var/females = 0
- var/males = 0
- for(var/mob/M in player_list)
- if(M.is_ready() && !M.is_mechanical() && M.get_species() != "Diona")
- var/gender = M.get_gender()
- if(gender == MALE)
- males++
- else if(gender == FEMALE)
- females++
-
- return males >= 2 && females >= 2
-
-datum/directive/tau_ceti_needs_women/directives_complete()
- return command_targets.len == count_heads_reassigned() && alien_targets.len == 0
-
-datum/directive/tau_ceti_needs_women/get_remaining_orders()
- var/text = ""
- for(var/head in command_targets)
- if(!command_targets[head])
- text += "Remove [head] from a Head Role"
-
- for(var/id in alien_targets)
- text += "Terminate [id]"
-
- return text
-
-/hook/reassign_employee/proc/command_reassignments(obj/item/weapon/card/id/id_card)
- var/datum/directive/tau_ceti_needs_women/D = get_directive("tau_ceti_needs_women")
- if(!D) return 1
-
- if(D.command_targets && D.command_targets.Find(id_card))
- D.command_targets[id_card] = command_positions.Find(id_card.assignment) ? 0 : 1
-
- return 1
-
-/hook/terminate_employee/proc/gender_target_termination_directive(obj/item/weapon/card/id)
- var/datum/directive/tau_ceti_needs_women/D = get_directive("tau_ceti_needs_women")
- if(!D) return 1
-
- if(D.alien_targets && D.alien_targets.Find(id))
- D.alien_targets-=id
-
- if(D.command_targets && D.command_targets.Find(id))
- D.command_targets[id] = 1
-
- return 1
diff --git a/code/game/gamemodes/mutiny/directives/terminations_directive.dm b/code/game/gamemodes/mutiny/directives/terminations_directive.dm
deleted file mode 100644
index c2b1ac633ea..00000000000
--- a/code/game/gamemodes/mutiny/directives/terminations_directive.dm
+++ /dev/null
@@ -1,71 +0,0 @@
-// This is a parent directive meant to be derived by directives that fit
-// the "fire X type of employee" pattern of directives. Simply apply your
-// flavor text and override get_crew_to_terminate in your child datum.
-// See alien_fraud_directive.dm for an example.
-datum/directive/terminations
- var/list/accounts_to_revoke = list()
- var/list/accounts_to_suspend = list()
- var/list/ids_to_terminate = list()
-
- proc/get_crew_to_terminate()
- return list()
-
-datum/directive/terminations/directives_complete()
- for(var/account_number in accounts_to_suspend)
- if(!accounts_to_suspend[account_number])
- return 0
-
- for(var/account_number in accounts_to_revoke)
- if(!accounts_to_revoke[account_number])
- return 0
-
- return ids_to_terminate.len == 0
-
-datum/directive/terminations/initialize()
- for(var/mob/living/carbon/human/H in get_crew_to_terminate())
- var/datum/money_account/account = H.mind.initial_account
- accounts_to_revoke["[account.account_number]"] = 0
- accounts_to_suspend["[account.account_number]"] = account.suspended
- ids_to_terminate+=(H.wear_id)
-
-datum/directive/terminations/get_remaining_orders()
- var/text = ""
- for(var/account_number in accounts_to_suspend)
- if(!accounts_to_suspend[account_number])
- text += "Suspend Account #[account_number]"
-
- for(var/account_number in accounts_to_revoke)
- if(!accounts_to_revoke[account_number])
- text += "Revoke Account #[account_number]"
-
- for(var/id in ids_to_terminate)
- text += "Terminate [id]"
-
- return text
-
-/hook/revoke_payroll/proc/payroll_directive(datum/money_account/account)
- var/datum/directive/terminations/D = get_directive("terminations")
- if(!D) return 1
-
- if(D.accounts_to_revoke && D.accounts_to_revoke.Find("[account.account_number]"))
- D.accounts_to_revoke["[account.account_number]"] = 1
-
- return 1
-
-/hook/change_account_status/proc/suspension_directive(datum/money_account/account)
- var/datum/directive/terminations/D = get_directive("terminations")
- if(!D) return 1
-
- if(D.accounts_to_suspend && D.accounts_to_suspend.Find("[account.account_number]"))
- D.accounts_to_suspend["[account.account_number]"] = account.suspended
-
- return 1
-
-/hook/terminate_employee/proc/termination_directive(obj/item/weapon/card/id)
- var/datum/directive/terminations/D = get_directive("terminations")
- if(!D) return 1
-
- if(D.ids_to_terminate && D.ids_to_terminate.Find(id))
- D.ids_to_terminate-=id
-
- return 1
diff --git a/code/game/gamemodes/mutiny/directives/test_directive.dm b/code/game/gamemodes/mutiny/directives/test_directive.dm
deleted file mode 100644
index 7d2392acd64..00000000000
--- a/code/game/gamemodes/mutiny/directives/test_directive.dm
+++ /dev/null
@@ -1,23 +0,0 @@
-// For testing
-datum/directive/terminations/test
- special_orders = list(
- "Suspend financial accounts of all ugly personnel.",
- "Transfer their payrolls to the station account.",
- "Terminate their employment.")
-
-datum/directive/terminations/test/get_crew_to_terminate()
- var/list/uglies[0]
- for(var/mob/M in player_list)
- uglies+=(M)
- return uglies
-
-datum/directive/terminations/test/get_description()
- return {"
-
- Wow. Much ugly. So painful.
- Many terminations. Very classified.
-
- "}
-
-datum/directive/terminations/test/meets_prerequisites()
- return 1
diff --git a/code/game/gamemodes/mutiny/directives/vox_heist.dm b/code/game/gamemodes/mutiny/directives/vox_heist.dm
deleted file mode 100644
index f652f7016d2..00000000000
--- a/code/game/gamemodes/mutiny/directives/vox_heist.dm
+++ /dev/null
@@ -1,111 +0,0 @@
-datum/directive/vox_heist
- var/list/vox = list()
- var/list/sympathizers = list()
-
- proc/get_vox_candidates()
- var/list/candidates[0]
- for(var/mob/M in player_list)
- if(M.is_ready() && is_vox(M))
- candidates.Add(M)
- return candidates
-
- proc/get_sympathizer_candidates()
- var/list/candidates[0]
- for(var/mob/M in player_list)
- if(M.is_ready() && !is_vox(M) && !M.is_mechanical() && M.mind.assigned_role != "Captain")
- candidates[M] = get_weight(M)
- return candidates
-
- proc/is_vox(mob/M)
- return M.get_species() == "Vox"
-
- proc/get_weight(mob/M)
- // You will have a high chance of being regarded as a vox sympathizer if your
- // relationship with Nanotrasen is negative. Otherwise, command and security
- // staff are pretty well trusted and maltreated alien races are easy suspects.
- var/relation = M.client.prefs.nanotrasen_relation
- if(relation == "Opposed")
- return 8
- if(relation == "Skeptical")
- return 5
- if(command_positions.Find(M.mind.assigned_role))
- return 1
- var/species = M.get_species()
- if(species == "Tajaran" || species == "Unathi")
- return 5
- if(security_positions.Find(M.mind.assigned_role))
- return 2
- return 3
-
-datum/directive/vox_heist/get_description()
- return {"
-
- A vox warship has commandeered a Nanotrasen transport carrying 2,500 cubic meters of liquid plasma.
- The raiders are willing to return the stolen cargo in exchange for the capture or execution of so-called "vox pariah" that are stationed aboard [station_name()].
- If the transport is not recovered, the estimated loss of profits is a threat to the solvency of the company.
- Predictive analysis has identified certain members of the crew as sympathetic to the vox pariah. Detain the sympathizers to guarantee a successful exchange.
- Lethal force is authorized by the High Command Department of Security. Further information is classified.
-
- "}
-
-datum/directive/vox_heist/initialize()
- var/list/vox_candidates = get_vox_candidates()
- for(var/mob/pariah in vox_candidates)
- vox.Add(pariah.mind)
-
- special_orders = list(
- "Brig or kill all Vox Pariah.")
-
- var/list/sympathizer_candidates = get_sympathizer_candidates()
- var/list/sympathizer_names = list()
- var/sympathizer_count = min(rand(2,4), sympathizer_candidates.len)
- for(var/i=0, i < sympathizer_count, i++)
- if(!sympathizer_candidates.len)
- break
-
- var/mob/candidate = pickweight(sympathizer_candidates)
- sympathizer_candidates.Remove(candidate)
- sympathizers.Add(candidate.mind)
- sympathizer_names.Add("[candidate.mind.assigned_role] [candidate.mind.name]")
-
- if(sympathizers.len)
- special_orders.Add("Brig the following sympathizers: [jointext(sympathizer_names, ", ")]")
-
-datum/directive/vox_heist/meets_prerequisites()
- var/list/candidates = get_vox_candidates()
- return candidates.len >= 2
-
-datum/directive/vox_heist/directives_complete()
- if(!vox.len && !sympathizers.len)
- return 1
-
- for(var/datum/mind/pariah in vox)
- if(!pariah.current.is_in_brig())
- return 0
-
- for(var/datum/mind/sympathizer in sympathizers)
- if(!sympathizer.current.is_in_brig())
- return 0
-
- return 1
-
-datum/directive/vox_heist/get_remaining_orders()
- var/text = ""
- for(var/datum/mind/pariah in vox)
- if(!pariah.current.is_in_brig())
- text += "Brig or Kill [pariah]"
- for(var/datum/mind/sympathizer in sympathizers)
- if(!sympathizer.current.is_in_brig())
- text += "Brig [sympathizer]"
- return text
-
-/hook/death/proc/vox_or_sympathizer_killed(mob/living/carbon/human/deceased, gibbed)
- var/datum/directive/vox_heist/D = get_directive("vox_heist")
- if(!D) return 1
-
- var/datum/mind/M = deceased.mind
- if(M in D.vox)
- D.vox.Remove(M)
- if(M in D.sympathizers)
- D.sympathizers.Remove(M)
- return 1
diff --git a/code/game/gamemodes/mutiny/emergency_authentication_device.dm b/code/game/gamemodes/mutiny/emergency_authentication_device.dm
deleted file mode 100644
index 168f0049560..00000000000
--- a/code/game/gamemodes/mutiny/emergency_authentication_device.dm
+++ /dev/null
@@ -1,112 +0,0 @@
-/obj/machinery/emergency_authentication_device
- var/datum/game_mode/mutiny/mode
-
- name = "\improper Emergency Authentication Device"
- icon = 'icons/obj/stationobjs.dmi'
- icon_state = "blackbox"
- density = 1
- anchored = 1
-
- var/captains_key
- var/secondary_key
- var/activated = 0
-
- use_power = 0
-
- New(loc, mode)
- src.mode = mode
- ..(loc)
-
- proc/check_key_existence()
- if(!mode.captains_key)
- captains_key = 1
-
- if(!mode.secondary_key)
- secondary_key = 1
-
- proc/get_status()
- if(activated)
- return "Activated"
- if(captains_key && secondary_key)
- return "Both Keys Authenticated"
- if(captains_key)
- return "Captain's Key Authenticated"
- if(secondary_key)
- return "Secondary Key Authenticated"
- else
- return "Inactive"
-
- proc/launch_shuttle()
- spawn(rand(5 SECONDS, 45 SECONDS))
- if(shuttle_master.requestEvac(usr, "Directive X"))
- spawn(20 SECONDS)
- var/text = "[station_name()], we have confirmed your completion of Directive X. An evacuation shuttle is en route to receive your crew for debriefing."
- command_announcement.Announce(text, "Emergency Transmission")
-
-/obj/machinery/emergency_authentication_device/attack_hand(mob/user)
- if(activated)
- to_chat(user, "\blue \The [src] is already active!")
- return
-
- if(!mode.current_directive.directives_complete())
- state("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.")
- launch_shuttle()
- return
-
- if(!captains_key && !secondary_key)
- state("Command aborted. Please present the authentication keys before proceeding.")
- return
-
- if(!captains_key)
- state("Command aborted. Please present the Captain's Authentication Key.")
- return
-
- if(!secondary_key)
- state("Command aborted. Please present the Emergency Secondary Authentication Key.")
- return
-
- // Impossible!
- state("Command aborted. This unit is defective.")
-
-/obj/machinery/emergency_authentication_device/attackby(obj/item/weapon/O, mob/user, params)
- if(activated)
- to_chat(user, "\blue \The [src] is already active!")
- return
-
- if(!mode.current_directive.directives_complete())
- state({"Command aborted. Communication with CentComm is prohibited until Directive X has been completed."})
- return
-
- check_key_existence()
- if(istype(O, /obj/item/weapon/mutiny/auth_key/captain) && !captains_key)
- captains_key = O
- user.drop_item()
- O.loc = src
-
- state("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.")
- return
-
- if(istype(O, /obj/item/weapon/mutiny/auth_key/secondary) && !secondary_key)
- secondary_key = O
- user.drop_item()
- O.loc = src
-
- state("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.")
- return
- ..()
-
-/obj/machinery/emergency_authentication_device/examine(mob/user)
- to_chat(user, {"This is a specialized communications device that is able to instantly send a message to Nanotrasen High Command via quantum entanglement
- with a sister device at CentComm.
- The EAD's status is [get_status()]."})
diff --git a/code/game/gamemodes/mutiny/key_pinpointer.dm b/code/game/gamemodes/mutiny/key_pinpointer.dm
deleted file mode 100644
index 0125636d769..00000000000
--- a/code/game/gamemodes/mutiny/key_pinpointer.dm
+++ /dev/null
@@ -1,35 +0,0 @@
-/obj/item/weapon/pinpointer/advpinpointer/auth_key
- name = "\improper Authentication Key Pinpointer"
- desc = "Tracks the positions of the emergency authentication keys."
- var/datum/game_mode/mutiny/mutiny
-
- New()
- mutiny = ticker.mode
- ..()
-
-/obj/item/weapon/pinpointer/advpinpointer/auth_key/attack_self()
- switch(mode)
- if(0)
- mode = 1
- active = 1
- target = mutiny.captains_key
- point_at(target)
- to_chat(usr, "\blue You calibrate \the [src] to locate the Captain's Authentication Key.")
- if(1)
- mode = 2
- target = mutiny.secondary_key
- to_chat(usr, "\blue You calibrate \the [src] to locate the Emergency Secondary Authentication Key.")
- else
- mode = 0
- active = 0
- icon_state = "pinoff"
- to_chat(usr, "\blue You switch \the [src] off.")
-
-/obj/item/weapon/pinpointer/advpinpointer/auth_key/examine(mob/user)
- switch(mode)
- if(1)
- to_chat(user, "Is is calibrated for the Captain's Authentication Key.")
- if(2)
- to_chat(user, "It is calibrated for the Emergency Secondary Authentication Key.")
- else
- to_chat(user, "It is switched off.")
diff --git a/code/game/gamemodes/mutiny/mutiny.dm b/code/game/gamemodes/mutiny/mutiny.dm
deleted file mode 100644
index 13c42729e2f..00000000000
--- a/code/game/gamemodes/mutiny/mutiny.dm
+++ /dev/null
@@ -1,380 +0,0 @@
-#define MUTINY_RECRUITMENT_COOLDOWN 5
-
-datum/game_mode/mutiny
- var/datum/mutiny_fluff/fluff
- var/datum/directive/current_directive
- var/obj/item/weapon/mutiny/auth_key/captain/captains_key
- var/obj/item/weapon/mutiny/auth_key/secondary/secondary_key
- var/obj/machinery/emergency_authentication_device/ead
- var/datum/mind/head_loyalist
- var/datum/mind/head_mutineer
- var/recruit_loyalist_cooldown = 0
- var/recruit_mutineer_cooldown = 0
- var/list/loyalists = list()
- var/list/mutineers = list()
- var/list/body_count = list()
-
- name = "mutiny"
- config_tag = "mutiny"
- required_players = 20
- ert_disabled = 1
-
- New()
- fluff = new(src)
-
- proc/reveal_directives()
- spawn(rand(1 MINUTES, 3 MINUTES))
- command_announcement.Announce("Incoming emergency directive: Captain's office fax machine, [station_name()].","Emergency Transmission")
- spawn(rand(3 MINUTES, 5 MINUTES))
- send_pda_message()
- spawn(rand(3 MINUTES, 5 MINUTES))
- fluff.announce_directives()
- spawn(rand(2 MINUTES, 3 MINUTES))
-
- var/list/reasons = list(
- "political instability",
- "quantum fluctuations",
- "hostile raiders",
- "derelict station debris",
- "REDACTED",
- "ancient alien artillery",
- "solar magnetic storms",
- "sentient time-travelling killbots",
- "gravitational anomalies",
- "wormholes to another dimension",
- "a telescience mishap",
- "radiation flares",
- "supermatter dust",
- "leaks into a negative reality",
- "antiparticle clouds",
- "residual bluespace energy",
- "suspected syndicate operatives",
- "malfunctioning von Neumann probe swarms",
- "shadowy interlopers",
- "a stranded Vox arkship",
- "haywire IPC constructs",
- "rogue Unathi exiles",
- "artifacts of eldritch horror",
- "a brain slug infestation",
- "killer bugs that lay eggs in the husks of the living",
- "a deserted transport carrying xenomorph specimens",
- "an emissary for the gestalt requesting a security detail",
- "a Tajaran slave rebellion",
- "radical Skrellian transevolutionaries",
- "classified security operations",
- "science-defying raw elemental chaos"
- )
- command_announcement.Announce("The presence of [pick(reasons)] in the region is tying up all available local emergency resources; emergency response teams cannot be called at this time.","Emergency Transmission")
-
- // Returns an array in case we want to expand on this later.
- proc/get_head_loyalist_candidates()
- var/list/candidates[0]
- for(var/mob/loyalist in player_list)
- if(loyalist.mind && loyalist.mind.assigned_role == "Captain")
- candidates+=loyalist.mind
- return candidates
-
- proc/get_head_mutineer_candidates()
- var/list/candidates[0]
- for(var/mob/mutineer in player_list)
- if(ROLE_MUTINEER in mutineer.client.prefs.be_special)
- if(!jobban_isbanned(mutineer, "mutineer") && !jobban_isbanned(mutineer,"Syndicate"))
- for(var/job in command_positions - "Captain")
- if(mutineer.mind && mutineer.mind.assigned_role == job)
- candidates+=mutineer.mind
- return candidates
-
- proc/get_directive_candidates()
- var/list/candidates[0]
- for(var/T in subtypesof(/datum/directive))
- var/datum/directive/D = new T(src)
-// to_chat(world, D.name)
- if(D.meets_prerequisites())
- candidates+=D
- return candidates
-
- proc/send_pda_message()
- var/obj/item/device/pda/pda = null
- for(var/obj/item/device/pda/P in head_mutineer.current)
- pda = P
- break
-
- if(!pda)
- return 0
-
- var/datum/data/pda/app/messenger/pdam = pda.find_program(/datum/data/pda/app/messenger)
- if(pdam)
- pdam.notify(fluff.get_pda_body(), 0)
- return 1
-
- proc/get_equipment_slots()
- return list(
- "left pocket" = slot_l_store,
- "right pocket" = slot_r_store,
- "backpack" = slot_in_backpack,
- "left hand" = slot_l_hand,
- "right hand" = slot_r_hand)
-
- proc/equip_head_loyalist()
- equip_head(head_loyalist, "loyalist", /mob/living/carbon/human/proc/recruit_loyalist)
-
- proc/equip_head_mutineer()
- equip_head(head_mutineer, "mutineer", /mob/living/carbon/human/proc/recruit_mutineer)
-
- proc/equip_head(datum/mind/head, faction, proc/recruitment_verb)
- var/mob/living/carbon/human/H = head.current
- to_chat(H, "You are the Head [capitalize(faction)]!")
- head.special_role = "head_[faction]"
-
- var/slots = get_equipment_slots()
- switch(faction)
- if("loyalist")
- if(captains_key) qdel(captains_key)
- captains_key = new(H)
- H.equip_in_one_of_slots(captains_key, slots)
- if("mutineer")
- if(secondary_key) qdel(secondary_key)
- secondary_key = new(H)
- H.equip_in_one_of_slots(secondary_key, slots)
-
- H.update_icons()
- H.verbs += recruitment_verb
-
- proc/add_loyalist(datum/mind/M)
- add_faction(M, "loyalist", loyalists)
-
- proc/add_mutineer(datum/mind/M)
- add_faction(M, "mutineer", mutineers)
-
- proc/add_faction(datum/mind/M, faction, list/faction_list)
- if(!can_be_recruited(M, faction))
- to_chat(M.current, "\red Recruitment canceled; your role has already changed.")
- to_chat(head_mutineer.current, "\red Could not recruit [M]. Their role has changed.")
- return
-
- if(M in loyalists)
- loyalists-=M
-
- if(M in mutineers)
- mutineers-=M
-
- M.special_role = faction
- faction_list+=M
-
- if(faction == "mutineer")
- to_chat(M.current, fluff.mutineer_tag("You have joined the mutineers!"))
- to_chat(head_mutineer.current, fluff.mutineer_tag("[M] has joined the mutineers!"))
- else
- to_chat(M.current, fluff.loyalist_tag("You have joined the loyalists!"))
- to_chat(head_loyalist.current, fluff.loyalist_tag("[M] has joined the loyalists!"))
-
- update_icon(M)
-
- proc/was_bloodbath()
- var/list/remaining_loyalists = loyalists - body_count
- if(!remaining_loyalists.len)
- return 1
-
- var/list/remaining_mutineers = mutineers - body_count
- if(!remaining_mutineers.len)
- return 1
-
- return 0
-
- proc/replace_nuke_with_ead()
- for(var/obj/machinery/nuclearbomb/N in world)
- ead = new(N.loc, src)
- qdel(N)
-
- proc/unbolt_vault_door()
- var/obj/machinery/door/airlock/vault = locate(/obj/machinery/door/airlock/vault)
- vault.unlock(1)
-
- proc/make_secret_transcript()
- var/obj/machinery/computer/telecomms/server/S = locate(/obj/machinery/computer/telecomms/server)
- if(!S) return
-
- var/obj/item/weapon/paper/crumpled/bloody/transcript = new(S.loc)
- transcript.name = "secret transcript"
- transcript.info = fluff.secret_transcript()
-
- proc/can_be_recruited(datum/mind/M, role)
- if(!M) return 0
- if(!M.special_role) return 1
- switch(role)
- if("loyalist")
- return M.special_role == "mutineer"
- if("mutineer")
- return M.special_role == "loyalist"
-
- proc/round_outcome()
- to_chat(world, "Breaking News
")
- if(was_bloodbath())
- to_chat(world, fluff.no_victory())
- return
-
- var/directives_completed = current_directive.directives_complete()
- var/ead_activated = ead.activated
- if(directives_completed && ead_activated)
- to_chat(world, fluff.loyalist_major_victory())
- else if(directives_completed && !ead_activated)
- to_chat(world, fluff.loyalist_minor_victory())
- else if(!directives_completed && ead_activated)
- to_chat(world, fluff.mutineer_minor_victory())
- else if(!directives_completed && !ead_activated)
- to_chat(world, fluff.mutineer_major_victory())
-
- world << sound('sound/machines/twobeep.ogg')
-
- proc/update_all_icons()
- spawn(0)
- for(var/datum/mind/M in mutineers)
- update_icon(M)
-
- for(var/datum/mind/M in loyalists)
- update_icon(M)
- return 1
-
- proc/update_icon(datum/mind/M)
- if(!M.current || !M.current.client)
- return 0
-
- for(var/image/I in head_loyalist.current.client.images)
- if(I.loc == M.current && (I.icon_state == "loyalist" || I.icon_state == "mutineer"))
- qdel(I)
-
- for(var/image/I in head_mutineer.current.client.images)
- if(I.loc == M.current && (I.icon_state == "loyalist" || I.icon_state == "mutineer"))
- qdel(I)
-
- if(M in loyalists)
- var/I = image('icons/mob/mob.dmi', loc=M.current, icon_state = "loyalist")
- head_loyalist.current.client.images += I
-
- if(M in mutineers)
- var/I = image('icons/mob/mob.dmi', loc=M.current, icon_state = "mutineer")
- head_mutineer.current.client.images += I
-
- return 1
-
-/datum/game_mode/mutiny/announce()
- fluff.announce()
-
-/datum/game_mode/mutiny/pre_setup()
- var/list/loyalist_candidates = get_head_loyalist_candidates()
- if(!loyalist_candidates || loyalist_candidates.len == 0)
- to_chat(world, "\red Mutiny mode aborted: no valid candidates for head loyalist.")
- return 0
-
- var/list/mutineer_candidates = get_head_mutineer_candidates()
- if(!mutineer_candidates || mutineer_candidates.len == 0)
- to_chat(world, "\red Mutiny mode aborted: no valid candidates for head mutineer.")
- return 0
-
- var/list/directive_candidates = get_directive_candidates()
- if(!directive_candidates || directive_candidates.len == 0)
- to_chat(world, "\red Mutiny mode aborted: no valid candidates for Directive X.")
- return 0
-
- head_loyalist = pick(loyalist_candidates)
- head_mutineer = pick(mutineer_candidates)
- current_directive = pick(directive_candidates)
-
- return 1
-
-/datum/game_mode/mutiny/post_setup()
- equip_head_loyalist()
- equip_head_mutineer()
-
- loyalists+=head_loyalist
- mutineers+=head_mutineer
-
- replace_nuke_with_ead()
- current_directive.initialize()
- unbolt_vault_door()
- make_secret_transcript()
-
- update_all_icons()
- spawn(0)
- reveal_directives()
- ..()
-
-/mob/living/carbon/human/proc/recruit_loyalist()
- set name = "Recruit Loyalist"
- set category = "Mutiny"
-
- var/datum/game_mode/mutiny/mode = get_mutiny_mode()
- if(!mode || src != mode.head_loyalist.current)
- return
-
- var/list/candidates = list()
- for(var/mob/living/carbon/human/P in oview(src))
- if(!stat && P.client && mode.can_be_recruited(P.mind, "loyalist"))
- candidates += P
-
- if(!candidates.len)
- to_chat(src, "\red You aren't close enough to anybody that can be recruited.")
- return
-
- if(world.time < mode.recruit_loyalist_cooldown)
- to_chat(src, "\red Wait [MUTINY_RECRUITMENT_COOLDOWN] seconds before recruiting again.")
- return
-
- mode.recruit_loyalist_cooldown = world.time + (MUTINY_RECRUITMENT_COOLDOWN SECONDS)
-
- var/mob/living/carbon/human/M = input("Select a person to recruit", "Loyalist recruitment", null) as mob in candidates
-
- if(M)
- to_chat(src, "Attempting to recruit [M]...")
- log_admin("[key_name(src)] attempted to recruit [M] as a loyalist.")
- message_admins("\red [key_name_admin(src)] attempted to recruit [M] as a loyalist.")
-
- var/choice = alert(M, "Asked by [src]: Will you help me complete Directive X?", "Loyalist recruitment", "Yes", "No")
- if(choice == "Yes")
- mode.add_loyalist(M.mind)
- else if(choice == "No")
- to_chat(M, "\red You declined to join the loyalists.")
- to_chat(mode.head_loyalist.current, "\red [M] declined to support the loyalists.")
-
-/mob/living/carbon/human/proc/recruit_mutineer()
- set name = "Recruit Mutineer"
- set category = "Mutiny"
-
- var/datum/game_mode/mutiny/mode = get_mutiny_mode()
- if(!mode || src != mode.head_mutineer.current)
- return
-
- var/list/candidates = list()
- for(var/mob/living/carbon/human/P in oview(src))
- if(!stat && P.client && mode.can_be_recruited(P.mind, "mutineer"))
- candidates += P
-
- if(!candidates.len)
- to_chat(src, "\red You aren't close enough to anybody that can be recruited.")
- return
-
- if(world.time < mode.recruit_mutineer_cooldown)
- to_chat(src, "\red Wait [MUTINY_RECRUITMENT_COOLDOWN] seconds before recruiting again.")
- return
-
- mode.recruit_mutineer_cooldown = world.time + (MUTINY_RECRUITMENT_COOLDOWN SECONDS)
-
- var/mob/living/carbon/human/M = input("Select a person to recruit", "Mutineer recruitment", null) as mob in candidates
-
- if(M)
- to_chat(src, "Attempting to recruit [M]...")
- log_admin("[key_name(src)] attempted to recruit [M] as a mutineer.")
- message_admins("\red [key_name_admin(src)] attempted to recruit [M] as a mutineer.")
-
- var/choice = alert(M, "Asked by [src]: Will you help me stop Directive X?", "Mutineer recruitment", "Yes", "No")
- if(choice == "Yes")
- mode.add_mutineer(M.mind)
- else if(choice == "No")
- to_chat(M, "\red You declined to join the mutineers.")
- to_chat(mode.head_mutineer.current, "\red [M] declined to support the mutineers.")
-
-/proc/get_mutiny_mode()
- if(!ticker || !istype(ticker.mode, /datum/game_mode/mutiny))
- return null
-
- return ticker.mode
diff --git a/code/game/gamemodes/mutiny/mutiny_admin.dm b/code/game/gamemodes/mutiny/mutiny_admin.dm
deleted file mode 100644
index e4b2cca1c63..00000000000
--- a/code/game/gamemodes/mutiny/mutiny_admin.dm
+++ /dev/null
@@ -1,83 +0,0 @@
-/datum/game_mode/mutiny/proc/check_antagonists_ui(datum/admins/admins)
- var/turf/captains_key_loc = captains_key ? captains_key.get_loc_turf() : "Lost or Destroyed"
- var/turf/secondary_key_loc = secondary_key ? secondary_key.get_loc_turf() : "Lost or Destroyed"
- var/remaining_objectives = current_directive.get_remaining_orders()
- var/txt = {"
- Context:
-
- [current_directive.get_description()]
-
- Orders:
-
- [fluff.get_orders()]
-
-
- Remaining Objectives
-
- [remaining_objectives ? remaining_objectives : "- None
"]
-
-
- Authentication:
- Captain's Key: [captains_key_loc]
- Activate
- Secondary Key: [secondary_key_loc]
- Activate
- EAD: [ead ? ead.get_status() : "Lost or Destroyed"]
- Activate
-
- "}
-
- txt += "Reassign Head Loyalist "
- if(head_loyalist)
- txt += admins.check_role_table("Head Loyalist", list(head_loyalist), 0)
-
- var/list/loyal_crew = loyalists - head_loyalist
- if(loyal_crew.len)
- txt += admins.check_role_table("Loyalists", loyal_crew, 0)
-
- txt += "Reassign Head Mutineer "
- if(head_mutineer)
- txt += admins.check_role_table("Head Mutineer", list(head_mutineer), 0)
-
- var/list/mutiny_crew = mutineers - head_mutineer
- if(mutiny_crew.len)
- txt += admins.check_role_table("Mutineers", mutiny_crew, 0)
-
- if(body_count.len)
- txt += admins.check_role_table("Casualties", body_count, 0)
-
- return txt
-
-/datum/game_mode/mutiny/check_antagonists_topic(href, href_list[])
- switch(href_list["choice"])
- if("activate_captains_key")
- ead.captains_key = 1
- return 1
- if("activate_secondary_key")
- ead.secondary_key = 1
- return 1
- if("activate_ead")
- ead.activated = 1
- return 1
- if("reassign_head_loyalist")
- var/mob/M = get_reassignment_candidate("Loyalist")
- if(M)
- head_loyalist = M.mind
- equip_head_loyalist()
- return 1
- if("reassign_head_mutineer")
- var/mob/M = get_reassignment_candidate("Mutineer")
- if(M)
- head_mutineer = M.mind
- equip_head_mutineer()
- return 1
- else
- return 0
-
-/datum/game_mode/mutiny/proc/get_reassignment_candidate(faction)
- var/list/targets[0]
- for(var/mob/living/carbon/human/H in player_list)
- if(H.is_ready() && !H.is_dead())
- targets.Add(H)
-
- return input("Select a player to lead the [faction] faction.", "Head [faction] reassignment", null) as mob in targets
diff --git a/code/game/gamemodes/mutiny/mutiny_fluff.dm b/code/game/gamemodes/mutiny/mutiny_fluff.dm
deleted file mode 100644
index 637028c3158..00000000000
--- a/code/game/gamemodes/mutiny/mutiny_fluff.dm
+++ /dev/null
@@ -1,197 +0,0 @@
-/datum/mutiny_fluff
- var/datum/game_mode/mutiny/mode
-
- New(datum/game_mode/mutiny/M)
- mode = M
-
- proc/announce_directives()
- for(var/obj/machinery/photocopier/faxmachine/fax in world)
- if(fax.department == "Captain's Office")
- var/obj/item/weapon/paper/directive_x = new(fax.loc)
- directive_x.name = "emergency action message"
- directive_x.info = get_fax_body()
-
- proc/get_fax_body()
- return {"
- NOT A DRILL . . . EMERGENCY DIRECTIVE . . . NOT A DRILL
-
- TO: Captain [mode.head_loyalist], Commanding Officer, [station_name()]
- FROM: Nanotrasen Emergency Messaging Relay
- DATE: [time2text(world.realtime, "MM/DD")]/[game_year]
- SUBJECT: Directive X
-
-
- [mode.current_directive.get_description()]
-
-
- Emergency Authentication Protocol
-
- A member of your Command Staff is this shift's designated Emergency Secondary Authenticator.
- This Emergency Secondary Authenticator is uniquely aware of their role and possesses the Emergency Secondary Authentication Key.
- As Captain, you possess the Captain's Authentication Key.
- The Emergency Authentication Device is located in the vault of your station, and requires simultaneous activation of the Authentication Keys.
- An Authentication Key Pinpointer can be delivered via Cargo Bay to assist recovery of the Authentication Keys should they be lost aboard the station.
- A key's destruction or removal from the station's perimeter will automatically and irreversibly activate the Emergency Authentication Device.
-
-
-
- Orders
-
- Captain [mode.head_loyalist], you are to immediately initiate the following procedure; codenamed Directive X:
-
-
- [get_orders()]
-
-
-
- Authentication
-
- Encoded Authentication String: T0JCJUwoIVFDQA==
- Emergency Action Code: O B B _ L _ _ Q C _
- ERROR: DECODING INCOMPLETE (40% LOSS)
-
-
-
-
- NOT A DRILL . . . EMERGENCY DIRECTIVE . . . NOT A DRILL
- "}
-
- proc/get_orders()
- var/text = "Immediate external transmission and signals silence. Evacuation and Cargo services will remain available. All ERT teams are engaged elsewhere. Do not communicate with Central Command under any circumstances."
- for(var/order in mode.current_directive.special_orders)
- text += "[order]"
-
- text += "Upon completion of this Directive, Captain [mode.head_loyalist] and the Emergency Secondary Authenticator must utilise the Captain's Authentication Key and the Emergency Secondary Authentication Key to activate the Emergency Authentication Device."
- return text
-
- proc/get_pda_body()
- return {"← From Anonymous Channel: \"You must read this! Nanotrasen Chain of Command COMPROMISED. Command Encryptions BROKEN. [station_name()] Captain [mode.head_loyalist] will receive orders that must NOT BE BROUGHT TO FRUITION!
-
-They don't care about us they only care about WEALTH and POWER... Share this message with people you trust.
-
-Be safe, friend.\" (Unable to Reply) "}
-
- proc/announce()
- to_chat(world, "The current game mode is - Mutiny!")
- to_chat(world, {"
-The crew will be divided by their sense of ethics when a morally turbulent emergency directive arrives with an incomplete command validation code.
-The [loyalist_tag("Head Loyalist")] is the Captain, who carries the [loyalist_tag("Captain's Authentication Key")] at all times.
-The [mutineer_tag("Head Mutineer")] is a random Head of Staff who carries the [mutineer_tag("Emergency Secondary Authentication Key")].
-Both keys are required to activate the Emergency Authentication Device (EAD) in the vault, signalling to Nanotrasen that the directive is complete.
-
-
-Loyalists - Follow the Head Loyalist in carrying out [loyalist_tag("Nanotrasen's directives")] then activate the EAD.
-Mutineers - Prevent the completion of the [mutineer_tag("improperly validated directives")] and the activation of the EAD.
- "})
-
- proc/loyalist_tag(text)
- return "[text]"
-
- proc/mutineer_tag(text)
- return "[text]"
-
- proc/their(datum/mind/head)
- if(head.current.gender == MALE)
- return "his"
- else if(head.current.gender == FEMALE)
- return "her"
-
- return "their"
-
- proc/loyalist_major_victory()
- return {"
-Nanotrasen has praised the efforts of Captain [mode.head_loyalist] and loyal members of [their(mode.head_loyalist)] crew, who recently managed to put down a mutiny--amid a local interstellar crisis--aboard the [station_name()], a research station in [system_name()].
-The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system.
-Despite the mutiny, the crew was successful in implementing the directive and activating their on-board emergency authentication device.
-[mode.mutineers.len] members of the station's personnel were charged with terrorist action against the Company and, if found guilty by a Sol magistrate, will be sentenced to life incarceration.
-Nanotrasen will be awarding [mode.loyalists.len] members of the crew with the [loyalist_tag("Star of Loyalty")], following their successful efforts, at a ceremony this coming Thursday.
-[mode.body_count.len] are believed to have died during the coup.
-Nanotrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.
- "}
-
- proc/loyalist_minor_victory()
- return {"
-Nanotrasen has praised the efforts of Captain [mode.head_loyalist] and loyal members of [their(mode.head_loyalist)] crew, who recently managed to put down a mutiny--amid a local interstellar crisis--aboard the [station_name()], a research station in [system_name()].
-The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system.
-Despite the mutiny, the crew was successful in implementing the directive. Unfortunately, they failed to notify Central Command of their successes due to a breach in the chain of command.
-[mode.mutineers.len] members of the station's personnel were charged with terrorist action against the Company and, if found guilty by a Sol magistrate, will be sentenced to life incarceration.
-Nanotrasen will be awarding [mode.loyalists.len] members of the crew with the [loyalist_tag("Star of Loyalty")], following their mostly successful efforts, at a ceremony this coming Thursday.
-[mode.body_count.len] are believed to have died during the coup.
-Nanotrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.
- "}
-
- proc/no_victory()
- return {"
-Nanotrasen has been thrust into turmoil following an apparent mutiny by key personnel aboard the [station_name()], a research station in [system_name()].
-The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system.
-No further information has yet emerged from the station or its crew, who are presumed to be in holding with Nanotrasen investigators.
-Nanotrasen officials refuse to comment.
-Sources indicate that [mode.mutineers.len] members of the station's personnel are currently under investigation for terrorist activity, and [mode.loyalists.len] crew are currently providing evidence to investigators, believed to be the 'loyal' station personnel.
-[mode.body_count.len] are believed to have died during the coup.
-Nanotrasen's image will forever be haunted by the fact that a mutiny took place on one of its own stations.
- "}
-
- proc/mutineer_minor_victory()
- return {"
-Reports have emerged that an impromptu mutiny has taken place, amid a local interstellar crisis, aboard the [station_name()], a research station in [system_name()].
-The mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system.
-Information at present indicates that the top-secret directive--which has since been retracted--was invalid due to a broken authentication code. Members of the crew, including an unidentified Head of Staff, prevented the directive from being accomplished.
-[mode.mutineers.len] members of the station's personnel were released from interrogations today, following a mutiny investigation.
-Nanotrasen has reprimanded [mode.loyalists.len] members of the crew for failing to follow command validation procedures.
-[mode.body_count.len] are believed to have died during the coup.
-Even though the directive was not successfully implemented, Nanotrasen's image will forever be haunted by the fact that its authentication protocol was breached with such magnitude and that a mutiny was the result.
- "}
-
- proc/mutineer_major_victory()
- return {"
-Nanotrasen has praised the efforts of [mode.head_mutineer.assigned_role] [mode.head_mutineer] and several other members of the crew, who recently seized control of a company station in [system_name()]--[station_name()]--amid a local interstellar crisis.
-What appears to have been a "legitimate" mutiny was spurred by a top secret directive sent to the station, presumably in response to the crisis within the system.
-It has been revealed that the directive was invalid and fraudulent. Company officials have not released a statement about the source of the directive.
-Thanks to the efforts of the resistant members of the crew, the directive was not carried out.
-[mode.mutineers.len] members of the station's personnel were congratulated and awarded with the [mutineer_tag("Star of Bravery")], for their efforts in preventing the illegal directive's completion.
-Nanotrasen has [mode.loyalists.len] members of the crew in holding, while it investigates the circumstances that led to the acceptance and initiation of an invalid directive.
-[mode.body_count.len] are believed to have died during the coup.
-Even though the directive was not successfully implemented, Nanotrasen's image will forever be haunted by the fact that its authentication protocol was breached with such magnitude and that a mutiny was the result.
- "}
-
- proc/secret_transcript()
- return {"
-Corporate Rival Threat Assessment
-Gilthari Exports Incident Transcript
-CONFIDENTIAL: PROPERTY OF NANOTRASEN
-Location: Operator's Desk, D Deck, Polumetis Installation
-Time: 16:11, May 24, 2558 (Sol Reckoning)
-
-
-
-\[Start of transcript\]
-\[Sound of an internal airlock door opening\]
-TM: Thank you for coming to see me, Director. I'm afraid this is urgent.
-D: Mr. Mitchell, first you send cryptic messages to my office and then you request to have me come personally to this barely lit closet you call a workstation; all of this to talk about a computer glitch?
-\[Sound of the internal airlock door shutting\]
-TM: Do you remember Mallory?
-D: Who?
-TM: It's not who, it's what. The computer program we planted in the [system_name()] communications satellite.
-D: What is so important about this computer program?
-TM: We call her an eavesdropper. Captures network traffic, records it, and forwards the stream to the receiver autonomously.
-D: Speak English goddamnit.
-TM: Standard intelligence acquisition package, sir; we bug their satellite and listen. It's like we have their playbook and we know what their moves are going to be on the market before they make them.
-D: So Mallory doesn't work?
-TM: She worked, sir. We've had an ear on Nanotrasen's regional communications for weeks.
-D: Any news about their Plasma refinement process?
-TM: No sir. Our analysts believe they are using a separate channel for their most sensitive data.
-D: So what's the problem?
-TM: The intelligence hasn't been doing us any good. Anything that appears actionable, I send it to the analysts and they make a plan. Thing is, Nanotrasen always sees us coming.
-D: Tim...
-TM: I think they discovered the hack, sir. Case in point, Energine Consolidated Solutions. That subsidiary of ours that was awarded a lease on Nanotrasen's mining platform in Nyx? Nanotrasen acquired them a week before we made the announcement.
-D: They know about they have a bug. They left her on and fed her the information for us to hear, those sneaks. How did they find it?
-TM: Top secret communique came through. I'm not sure what happened. Either Mallory couldn't replicate the encryption scheme and garbled it going out or the transmission was already corrupted to begin with.
-D: Either way the transmission caused Nanotrasen to look at the satellite. They found out about Mallory.
-TM: Precisely sir. There's only so much I can do to cover our tracks from here.
-D: I'm pulling the plug. We have assets in the sector that are capable of a job like this. Thank you for bringing this to my attention.
-\[Computer device chirps\]
-D: One last thing, did you happen to read anything from those secure transmissions?
-TM: Just the subject, 'Directive X'.
-D: Directive X... Now what do you suppose that means?
-\[End of transcript\]
- "}
diff --git a/code/game/gamemodes/mutiny/mutiny_hooks.dm b/code/game/gamemodes/mutiny/mutiny_hooks.dm
deleted file mode 100644
index 7e751496dd3..00000000000
--- a/code/game/gamemodes/mutiny/mutiny_hooks.dm
+++ /dev/null
@@ -1,27 +0,0 @@
-/hook/death/proc/track_kills(mob/living/carbon/human/deceased, gibbed)
- var/datum/game_mode/mutiny/mode = get_mutiny_mode()
- if(!mode) return 1
-
- mode.body_count+=deceased.mind
- return 1
-
-/hook/clone/proc/update_icon(mob/living/carbon/human/H)
- var/datum/game_mode/mutiny/mode = get_mutiny_mode()
- if(!mode) return 1
-
- mode.update_icon(H.mind)
- return 1
-
-/hook/harvest_podman/proc/update_icon(mob/living/simple_animal/diona/D)
- var/datum/game_mode/mutiny/mode = get_mutiny_mode()
- if(!mode) return 1
-
- mode.update_icon(D.mind)
- return 1
-
-/hook/roundend/proc/report_mutiny_news()
- var/datum/game_mode/mutiny/mode = get_mutiny_mode()
- if(!mode) return 1
-
- mode.round_outcome()
- return 1
diff --git a/code/game/gamemodes/nations/nations.dm b/code/game/gamemodes/nations/nations.dm
index ca867028585..74038879fd7 100644
--- a/code/game/gamemodes/nations/nations.dm
+++ b/code/game/gamemodes/nations/nations.dm
@@ -142,7 +142,7 @@ datum/game_mode/nations
/datum/game_mode/nations/proc/remove_access()
for(var/obj/machinery/door/airlock/W in airlocks)
- if(W.z in config.station_levels)
+ if(is_station_level(W.z))
W.req_access = list()
@@ -237,7 +237,7 @@ datum/game_mode/nations
return 1
/proc/get_nations_mode()
- if(!ticker || !istype(ticker.mode, /datum/game_mode/nations))
+ if(!GAMEMODE_IS_NATIONS)
return null
return ticker.mode
@@ -253,4 +253,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
deleted file mode 100644
index a70074a919e..00000000000
--- a/code/game/gamemodes/newobjective.dm
+++ /dev/null
@@ -1,1416 +0,0 @@
-#define FRAME_PROBABILITY 3
-#define THEFT_PROBABILITY 55
-#define KILL_PROBABILITY 37
-#define PROTECT_PROBABILITY 5
-
-#define LENIENT 0
-#define NORMAL 1
-#define HARD 2
-#define IMPOSSIBLE 3
-
-
-/proc/GenerateTheft(var/job,var/datum/mind/traitor)
- var/list/datum/objective/objectives = list()
-
- for(var/o in subtypesof(/datum/objective/steal))
- var/datum/objective/target = new o(null,job)
- objectives += target
- objectives[target] = target.weight
- return objectives
-
-/proc/GenerateAssassinate(var/job,var/datum/mind/traitor)
- var/list/datum/objective/assassinate/missions = list()
-
- for(var/datum/mind/target in ticker.minds)
- if((target != traitor) && istype(target.current, /mob/living/carbon/human))
- if(target && target.current)
- var/datum/objective/target_obj = new /datum/objective/assassinate(null,job,target)
- missions += target_obj
- missions[target_obj] = target_obj.weight
- return missions
-
-/proc/GenerateFrame(var/job,var/datum/mind/traitor)
- var/list/datum/objective/frame/missions = list()
-
- for(var/datum/mind/target in ticker.minds)
- if((target != traitor) && istype(target.current, /mob/living/carbon/human))
- if(target && target.current)
- var/datum/objective/target_obj = new /datum/objective/frame(null,job,target)
- missions += target_obj
- missions[target_obj] = target_obj.weight
- return missions
-
-/proc/GenerateProtection(var/job,var/datum/mind/traitor)
- var/list/datum/objective/frame/missions = list()
-
- for(var/datum/mind/target in ticker.minds)
- if((target != traitor) && istype(target.current, /mob/living/carbon/human))
- if(target && target.current)
- var/datum/objective/target_obj = new /datum/objective/protection(null,job,target)
- missions += target_obj
- missions[target_obj] = target_obj.weight
- return missions
-
-
-/proc/SelectObjectives(var/job,var/datum/mind/traitor,var/hijack = 0)
- var/list/chosenobjectives = list()
- var/list/theftobjectives = GenerateTheft(job,traitor) //Separated all the objective types so they can be picked independantly of each other.
- var/list/killobjectives = GenerateAssassinate(job,traitor)
- var/list/frameobjectives = GenerateFrame(job,traitor)
- var/list/protectobjectives = GenerateProtection(job,traitor)
- var/total_weight
- var/conflict
-
- var/steal_weight = THEFT_PROBABILITY
- var/frame_weight = FRAME_PROBABILITY
- var/kill_weight = KILL_PROBABILITY
- var/protect_weight = PROTECT_PROBABILITY
- var/target_weight = 50
-
-/////////////////////////////////////////////////////////////
-//HANDLE ASSIGNING OBJECTIVES BASED OFF OF PREVIOUS SUCCESS//
-/////////////////////////////////////////////////////////////
-
- var/savefile/info = new("data/player_saves/[copytext(traitor.key, 1, 2)]/[traitor.key]/traitor.sav")
- var/list/infos
- info >> infos
- if(istype(infos))
- var/total_attempts = infos["Total"]
- var/total_overall_success = infos["Success"]
- var/success_ratio = total_overall_success/total_attempts
- var/steal_success = infos["Steal"]
- var/kill_success = infos["Kill"]
- var/frame_success = infos["Frame"]
- var/protect_success = infos["Protect"]
-
- var/list/ordered_success = list(steal_success, kill_success, frame_success, protect_success)
-
- var/difficulty = pick(LENIENT, LENIENT, NORMAL, NORMAL, NORMAL, HARD, HARD, IMPOSSIBLE)
- //Highest to lowest in terms of success rate, and resulting weight for later computation
- var/success_weights = list(1, 1, 1, 1)
- switch(difficulty)
- if(LENIENT)
- success_weights = list(1.5, 1, 0.75, 0.5)
- target_weight = success_ratio*100
- if(NORMAL)
- target_weight = success_ratio*150
- if(HARD)
- success_weights = list(0.66, 0.8, 1, 1.25)
- target_weight = success_ratio*200
- if(IMPOSSIBLE) //YOU SHALL NOT PASS
- success_weights = list(0.5, 0.75, 1.2, 2)
- target_weight = success_ratio*300
-
- for(var/i = 1, i <= 4, i++)
- //Iterate through the success rates, and determine the weights to chose based on the highest to
- // the lowest to multiply it by the proper success ratio.
- var/weight = max(ordered_success)
- ordered_success -= weight
- if(weight == steal_success)
- steal_weight *= steal_success*success_weights[i]
- else if(weight == frame_success)
- frame_weight *= frame_success*success_weights[i]
- else if(weight == protect_success)
- protect_weight *= protect_success*success_weights[i]
- else if(weight == kill_success)
- kill_weight *= kill_success*success_weights[i]
-
- var/total_weights = kill_weight + protect_weight + frame_weight + steal_weight
- frame_weight = round(frame_weight/total_weights)
- kill_weight = round(kill_weight/total_weights)
- steal_weight = round(steal_weight/total_weights)
- //Protect is whatever is left over.
-
- var/steal_range = steal_weight
- var/frame_range = frame_weight + steal_range
- var/kill_range = kill_weight + frame_range
- //Protect is whatever is left over.
-
- while(total_weight < target_weight)
- var/selectobj = rand(1,100) //Randomly determine the type of objective to be given.
- if(!length(killobjectives) || !length(protectobjectives)|| !length(frameobjectives)) //If any of these lists are empty, just give them theft objectives.
- var/datum/objective/objective = pickweight(theftobjectives)
- chosenobjectives += objective
- total_weight += objective.points
- theftobjectives -= objective
- else switch(selectobj)
- if(1 to steal_range)
- if(!theftobjectives.len)
- continue
- var/datum/objective/objective = pickweight(theftobjectives)
- for(1 to 10)
- if(objective.points + total_weight <= 100 || !theftobjectives.len)
- break
- theftobjectives -= objective
- objective = pickweight(theftobjectives)
- if(!objective && !theftobjectives.len)
- continue
- chosenobjectives += objective
- total_weight += objective.points
- theftobjectives -= objective
- if(steal_range + 1 to frame_range) //Framing Objectives (3% chance)
- if(!frameobjectives.len)
- continue
- var/datum/objective/objective = pickweight(frameobjectives)
- for(1 to 10)
- if(objective.points + total_weight <= 100 || !frameobjectives.len)
- break
- frameobjectives -= objective
- objective = pickweight(frameobjectives)
- if(!objective && !frameobjectives.len)
- continue
- for(var/datum/objective/protection/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Assassinate somebody they need to Protect.
- if(conflicttest.target == objective.target)
- conflict = 1
- break
- for(var/datum/objective/assassinate/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Protect somebody they need to Assassinate.
- if(conflicttest.target == objective.target)
- conflict = 1
- break
- if(!conflict)
- chosenobjectives += objective
- total_weight += objective.points
- frameobjectives -= objective
- conflict = 0
- if(frame_range + 1 to kill_range)
- if(!killobjectives.len)
- continue
- var/datum/objective/assassinate/objective = pickweight(killobjectives)
- to_chat(world, objective)
- for(1 to 10)
- if(objective.points + total_weight <= 100 || !killobjectives.len)
- break
- killobjectives -= objective
- objective = pickweight(killobjectives)
- if(!objective && !killobjectives.len)
- continue
- for(var/datum/objective/protection/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Assassinate somebody they need to Protect.
- if(conflicttest.target == objective.target)
- conflict = 1
- break
- for(var/datum/objective/frame/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Protect somebody they need to Assassinate.
- if(conflicttest.target == objective.target)
- conflict = 1
- break
- if(!conflict)
- chosenobjectives += objective
- total_weight += objective.points
- killobjectives -= objective
- conflict = 0
- if(kill_range + 1 to 100) //Protection Objectives (5% chance)
- if(!protectobjectives.len)
- continue
- var/datum/objective/protection/objective = pickweight(protectobjectives)
- for(1 to 10)
- if(objective.points + total_weight <= 100 || !protectobjectives.len)
- break
- protectobjectives -= objective
- objective = pickweight(protectobjectives)
- if(!objective || !protectobjectives.len)
- continue
- for(var/datum/objective/assassinate/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Protect somebody they need to Assassinate.
- if(conflicttest.target == objective.target)
- conflict = 1
- break
- for(var/datum/objective/frame/conflicttest in chosenobjectives) //Check to make sure we aren't telling them to Protect somebody they need to Assassinate.
- if(conflicttest.target == objective.target)
- conflict = 1
- break
- if(!conflict)
- chosenobjectives += objective
- total_weight += objective.points
- protectobjectives -= objective
- conflict = 0
-
- if(!locate(/datum/objective/hijack) in chosenobjectives && !locate(/datum/objective/escape) in chosenobjectives)
- if(hijack)
- chosenobjectives += new /datum/objective/hijack(null,job)
- else
- chosenobjectives += new /datum/objective/escape(null,job)
- return chosenobjectives
-
-datum
- objective
- var/datum/mind/owner
- var/datum/mind/target
- var/explanation_text = "text not set"
- var/job
- var/points = INFINITY //If this isn't set to something else, the objective is bugged and should be ignored
- var/weight = INFINITY
-
- New(var/text,var/joba)
- if(text)
- src.explanation_text = text
- job=joba
- weight = get_weight(job)
- points = get_points(job)
-
- proc/check_completion()
- return 1
- proc/get_points(var/job)
- return INFINITY
- proc/get_weight(var/job)
- return INFINITY
- proc/find_target_by_role(role, role_type=0)//Option sets either to check assigned role or special role. Default to assigned.
- for(var/datum/mind/possible_target in ticker.minds)
- if((possible_target != owner) && ishuman(possible_target.current) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role) )
- target = possible_target
- break
-
-
- frame
- New(var/text,var/joba,var/datum/mind/targeta)
- target = targeta
- job = joba
- weight = get_points(job)
- explanation_text = "Frame [target.current.real_name], the [target.assigned_role] for a crime and make sure they are arrested and brought back to the Centcom station alive. We'll handle the rest from there."
-
- check_completion()
- if(!emergency_shuttle.returned())
- return 0
- if(target.current.stat == 2)
- return 0
- var/turf/location = get_turf(target.current.loc)
- if(!location)
- return 0
- if(!target.current:handcuffed && !istype(location, /turf/simulated/shuttle/floor4))
- return 0
-
- if(location in locate(/area/shuttle/escape/centcom))
- return 1
-
- return 0
-
- get_points()
- if(target)
- var/difficulty = GetRank(target.assigned_role) + 1
- switch(GetRank(job))
- if(4)
- return 20*difficulty
- if(3)
- return 30*difficulty
- if(2)
- return 40*difficulty
- if(1)
- return 55*difficulty
- if(0)
- return 60*difficulty
- else
- return INFINITY
-
- get_weight()
- if(target)
- return 1
- return 0
-
-
- protection
- New(var/text,var/joba,var/datum/mind/targeta)
- target = targeta
- job = joba
- weight = get_points(job)
- explanation_text = "[target.current.real_name], the [target.assigned_role] is a [pick("relative of a","friend of a","") + pick("high ranking","important","well-liked")] Syndicate [pick("Leader","Officer","Agent","sympathiser")]. Make sure they get off the station safely, while minimizing intervention."
-
- check_completion()
- if(!emergency_shuttle.returned())
- return 0
-
- if(target.current.stat == 2)
- return 0
-
- var/turf/location = get_turf(target.current.loc)
- if(!location)
- return 0
-
- if(location in locate(/area/shuttle/escape/centcom))
- return 1
-
- return 0
-
- get_points()
- if(target)
- return 30
- else
- return INFINITY
-
- get_weight()
- if(target)
- return 1
- return 0
-
- find_target_by_role(role, role_type=0)
- ..(role, role_type)
- if(target && target.current)
- explanation_text = "Protect [target.current.real_name], the [target.role_alt_title ? target.role_alt_title : (!role_type ? target.assigned_role : target.special_role)]."
- else
- explanation_text = "Free Objective"
- return target
-
-
- assassinate
-
- New(var/text,var/joba,var/datum/mind/targeta)
- target = targeta
- job = joba
- weight = get_points(job)
- explanation_text = "Assassinate [target.current.real_name], the [target.role_alt_title ? target.role_alt_title : target.assigned_role]."
-
- check_completion()
- if(target && target.current)
- if(target.current.stat == 2 || istype(get_area(target.current), /area/tdome) || issilicon(target.current) || isbrain(target.current))
- return 1
- else
- return 0
- else
- return 1
- get_points()
- if(target)
- var/difficulty = GetRank(target.assigned_role) + 1
- switch(GetRank(job))
- if(4)
- return 20*difficulty
- if(3)
- return 30*difficulty
- if(2)
- return 40*difficulty
- if(1)
- return 55*difficulty
- if(0)
- return 60*difficulty
- else
- return 0
-
- get_weight()
- if(target)
- return 1
- return 0
-
- find_target_by_role(var/role)
- for(var/datum/mind/possible_target in ticker.minds)
- if((possible_target != owner) && istype(possible_target.current, /mob/living/carbon/human) && (possible_target.assigned_role == role))
- target = possible_target
- break
-
- if(target && target.current)
- explanation_text = "Assassinate [target.current.real_name], the [target.role_alt_title ? target.role_alt_title : target.assigned_role]."
- else
- explanation_text = "Free Objective"
-
- return target
-
-
- proc/find_target()
- var/list/possible_targets = list()
-
- for(var/datum/mind/possible_target in ticker.minds)
- if((possible_target != owner) && istype(possible_target.current, /mob/living/carbon/human))
- possible_targets += possible_target
-
- if(possible_targets.len > 0)
- target = pick(possible_targets)
-
- if(target && target.current)
- explanation_text = "Assassinate [target.current.real_name], the [target.role_alt_title ? target.role_alt_title : target.assigned_role]."
- else
- explanation_text = "Free Objective"
-
- return target
-
-
- capture
- var/separation_time = 0
- var/almost_complete = 0
-
- New(var/text,var/joba,var/datum/mind/targeta)
- target = targeta
- job = joba
- explanation_text = "Capture [target.current.real_name], the [target.assigned_role]."
-
- check_completion()
- if(target && target.current)
- if(target.current.stat == 2)
- if(config.require_heads_alive) return 0
- else
- if(!target.current.handcuffed)
- return 0
- else if(config.require_heads_alive) return 0
- return 1
-
- find_target_by_role(var/role)
- for(var/datum/mind/possible_target in ticker.minds)
- if((possible_target != owner) && istype(possible_target.current, /mob/living/carbon/human) && (possible_target.assigned_role == role))
- target = possible_target
- break
-
- if(target && target.current)
- explanation_text = "Capture [target.current.real_name], the [target.assigned_role]."
- else
- explanation_text = "Free Objective"
-
- return target
-
- get_points()
- if(target)
- var/difficulty = GetRank(target.assigned_role) + 1
- switch(GetRank(job))
- if(4)
- return 20*difficulty
- if(3)
- return 30*difficulty
- if(2)
- return 40*difficulty
- if(1)
- return 55*difficulty
- if(0)
- return 60*difficulty
- else
- return INFINITY
-
- get_weight()
- if(target)
- return 1
- return 0
-
-
- hijack
- explanation_text = "Hijack the emergency shuttle by escaping alone."
-
- check_completion()
- if(!emergency_shuttle.returned())
- return 0
-
- if(!owner.current || owner.current.stat == 2)
- return 0
- var/turf/location = get_turf(owner.current.loc)
-
- if(location in locate(/area/shuttle/escape/centcom))
- for(var/mob/living/player in locate(/area/shuttle/escape/centcom))
- if(player.mind && (player.mind != owner))
- if(player.stat != 2) //they're not dead
- return 0
- return 1
-
- return 0
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 75
- if(1)
- return 65
- if(2)
- return 65
- if(3)
- return 50
- if(4)
- return 35
-
- get_weight(var/job)
- return 1
-
- escape
- explanation_text = "Escape on the shuttle alive, without being arrested."
-
- check_completion()
- if(!emergency_shuttle.returned())
- return 0
-
- if(!owner.current || owner.current.stat ==2)
- return 0
-
- var/turf/location = get_turf(owner.current.loc)
- if(!location)
- return 0
-
- if(owner.current:handcuffed || istype(location, /turf/simulated/shuttle/floor4))
- return 0
-
- if(location in locate(/area/shuttle/escape/centcom))
- return 1
-
- return 0
- get_points()
- return INFINITY
-
- get_weight(var/job)
- return 1
-
-
- survive
- explanation_text = "Stay alive."
-
- check_completion()
- if(!owner.current || owner.current.stat == 2)
- return 0
-
- return 1
- get_points()
- return INFINITY
-
- get_weight(var/job)
- return 1
-
-
- steal
- var/obj/item/steal_target
-
- check_completion()
- if(steal_target)
- if(owner.current.check_contents_for(steal_target))
- return 1
- else
- return 0
-
-
- captainslaser
- steal_target = /obj/item/weapon/gun/energy/laser/captain
- explanation_text = "Steal the captain's antique laser gun."
- weight = 20
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 60
- if(1)
- return 50
- if(2)
- return 40
- if(3)
- return 30
- if(4)
- return 20
-
- get_weight(var/job)
- if(GetRank(job) == 4)
- return 10
- else
- return 20
-
-
- plasmatank
- steal_target = /obj/item/weapon/tank/plasma
- explanation_text = "Steal a small plasma tank."
- weight = 20
-
- get_points(var/job)
- if(job in science_positions || job in command_positions)
- return 20
- return 40
-
- get_weight(var/job)
- return 20
-
- check_completion()
- var/list/all_items = owner.current.get_contents()
- for(var/obj/item/I in all_items)
- if(!istype(I, steal_target)) continue//If it's not actually that item.
- if(I:air_contents:toxins) return 1 //If they got one with plasma
- return 0
-
-
- /*Removing this as an objective. Not necessary to have two theft objectives in the same room.
- steal/captainssuit
- steal_target = /obj/item/clothing/under/rank/captain
- explanation_text = "Steal a captain's rank jumpsuit"
- weight = 50
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 75
- if(1)
- return 60
- if(2)
- return 50
- if(3)
- return 30
- if(4)
- return INFINITY
- */
-
-
- handtele
- steal_target = /obj/item/weapon/hand_tele
- explanation_text = "Steal a hand teleporter."
- weight = 20
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 75
- if(1)
- return 60
- if(2)
- return 50
- if(3)
- return 30
- if(4)
- return 20
-
- get_weight(var/job)
- if(GetRank(job) == 4)
- return 10
- else
- return 20
-
-
- /*burger
- steal_target = /obj/item/weapon/reagent_containers/food/snacks/human/burger
- explanation_text = "Steal a burger made out of human organs, this will be presented as proof of Nanotrasen's chronic lack of standards."
- weight = 60
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 80
- if(1)
- return 65
- if(2)
- return 55
- if(3)
- return 40
- if(4)
- return 25*/
-
-
- jetpack
- steal_target = /obj/item/weapon/tank/jetpack/oxygen
- explanation_text = "Steal a blue oxygen jetpack."
- weight = 20
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 75
- if(1)
- return 60
- if(2)
- return 50
- if(3)
- return 30
- if(4)
- return 20
-
- get_weight(var/job)
- if(GetRank(job) == 4)
- return 10
- else
- return 20
-
-
- /*magboots
- steal_target = /obj/item/clothing/shoes/magboots
- explanation_text = "Steal a pair of \"Nanotrasen\" brand magboots."
- weight = 20
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 75
- if(1)
- return 60
- if(2)
- return 50
- if(3)
- return 30
- if(4)
- return 20
-
- get_weight(var/job)
- if(GetRank(job) == 4)
- return 10
- else
- return 20*/
-
-
- blueprints
- steal_target = /obj/item/blueprints
- explanation_text = "Steal the station's blueprints."
- weight = 20
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 75
- if(1)
- return 60
- if(2)
- return 50
- if(3)
- return 30
- if(4)
- return 20
-
- get_weight(var/job)
- if(GetRank(job) == 4)
- return 10
- else
- return 20
-
-
- voidsuit
- steal_target = /obj/item/clothing/suit/space/nasavoid
- explanation_text = "Steal a voidsuit."
- weight = 20
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 75
- if(1)
- return 60
- if(2)
- return 50
- if(3)
- return 30
- if(4)
- return 20
-
- get_weight(var/job)
- return 20
-
-
- nuke_disk
- steal_target = /obj/item/weapon/disk/nuclear
- explanation_text = "Steal the station's nuclear authentication disk."
- weight = 20
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 90
- if(1)
- return 80
- if(2)
- return 70
- if(3)
- return 40
- if(4)
- return 25
-
- get_weight(var/job)
- if(GetRank(job) == 4)
- return 10
- else
- return 20
-
- nuke_gun
- steal_target = /obj/item/weapon/gun/energy/gun/nuclear
- explanation_text = "Steal a nuclear powered gun."
- weight = 20
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 90
- if(1)
- return 85
- if(2)
- return 80
- if(3)
- return 75
- if(4)
- return 75
-
- get_weight(var/job)
- return 2
-
- diamond_drill
- steal_target = /obj/item/weapon/pickaxe/drill/diamonddrill
- explanation_text = "Steal a diamond drill."
- weight = 20
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 90
- if(1)
- return 85
- if(2)
- return 70
- if(3)
- return 75
- if(4)
- return 75
-
- get_weight(var/job)
- return 2
-
- boh
- steal_target = /obj/item/weapon/storage/backpack/holding
- explanation_text = "Steal a \"bag of holding.\""
- weight = 20
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 90
- if(1)
- return 85
- if(2)
- return 80
- if(3)
- return 75
- if(4)
- return 75
-
- get_weight(var/job)
- return 2
-
- hyper_cell
- steal_target = /obj/item/weapon/stock_parts/cell/hyper
- explanation_text = "Steal a hyper capacity power cell."
- weight = 20
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 90
- if(1)
- return 85
- if(2)
- return 80
- if(3)
- return 75
- if(4)
- return 75
-
- get_weight(var/job)
- return 2
-
- lucy
- steal_target = /obj/item/stack/sheet/diamond
- explanation_text = "Steal 10 diamonds."
- weight = 20
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 90
- if(1)
- return 85
- if(2)
- return 80
- if(3)
- return 75
- if(4)
- return 75
-
- get_weight(var/job)
- return 2
-
- check_completion()
- var/target_amount = 10
- var/found_amount = 0.0//Always starts as zero.
- for(var/obj/item/I in owner.current.get_contents())
- if(!istype(I, steal_target)) continue//If it's not actually that item.
- found_amount += I:amount
- return found_amount>=target_amount
-
- gold
- steal_target = /obj/item/stack/sheet/gold
- explanation_text = "Steal 50 gold bars."
- weight = 20
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 90
- if(1)
- return 85
- if(2)
- return 80
- if(3)
- return 75
- if(4)
- return 70
-
- get_weight(var/job)
- return 2
-
- check_completion()
- var/target_amount = 50
- var/found_amount = 0.0//Always starts as zero.
- for(var/obj/item/I in owner.current.get_contents())
- if(!istype(I, steal_target)) continue//If it's not actually that item.
- found_amount += I:amount
- return found_amount>=target_amount
-
- uranium
- steal_target = /obj/item/stack/sheet/uranium
- explanation_text = "Steal 25 uranium bars."
- weight = 20
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 90
- if(1)
- return 85
- if(2)
- return 80
- if(3)
- return 75
- if(4)
- return 70
-
- get_weight(var/job)
- return 2
-
- check_completion()
- var/target_amount = 25
- var/found_amount = 0.0//Always starts as zero.
- for(var/obj/item/I in owner.current.get_contents())
- if(!istype(I, steal_target)) continue//If it's not actually that item.
- found_amount += I:amount
- return found_amount>=target_amount
-
-
- /*Needs some work before it can be put in the game to differentiate ship implanters from syndicate implanters.
- steal/implanter
- steal_target = /obj/item/weapon/implanter
- explanation_text = "Steal an implanter"
- weight = 50
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 75
- if(1)
- return 60
- if(2)
- return 50
- if(3)
- return 30
- if(4)
- return INFINITY
- */
- cyborg
- steal_target = /obj/item/robot_parts/robot_suit
- explanation_text = "Steal a completed robot shell (no brain)"
- weight = 30
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 75
- if(1)
- return 60
- if(2)
- return 50
- if(3)
- return 30
- if(4)
- return 20
-
- check_completion()
- if(steal_target)
- for(var/obj/item/robot_parts/robot_suit/objective in owner.current.get_contents())
- if(istype(objective,/obj/item/robot_parts/robot_suit) && objective.check_completion())
- return 1
- return 0
-
- get_weight(var/job)
- return 20
- AI
- steal_target = /obj/structure/AIcore
- explanation_text = "Steal a finished AI, either by intellicard or stealing the whole construct."
- weight = 50
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 75
- if(1)
- return 60
- if(2)
- return 50
- if(3)
- return 30
- if(4)
- return 20
-
- get_weight(var/job)
- return 15
-
- check_completion()
- if(steal_target)
- for(var/obj/item/device/aicard/C in owner.current.get_contents())
- for(var/mob/living/silicon/ai/M in C)
- if(istype(M, /mob/living/silicon/ai) && M.stat != 2)
- return 1
- for(var/mob/living/silicon/ai/M in world)
- if(istype(M.loc, /turf))
- if(istype(get_area(M), /area/shuttle/escape))
- return 1
- for(var/obj/structure/AIcore/M in world)
- if(istype(M.loc, /turf) && M.state == 4)
- if(istype(get_area(M), /area/shuttle/escape))
- return 1
- return 0
-
- drugs
- steal_target = /datum/reagent/space_drugs
- explanation_text = "Steal some space drugs."
- weight = 40
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 75
- if(1)
- return 60
- if(2)
- return 50
- if(3)
- return 30
- if(4)
- return 20
-
- check_completion()
- if(steal_target)
- if(owner.current.check_contents_for_reagent(steal_target))
- return 1
- else
- return 0
-
- get_weight(var/job)
- return 20
-
-
- pacid
- steal_target = /datum/reagent/pacid
- explanation_text = "Steal some polytrinic acid."
- weight = 40
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 75
- if(1)
- return 60
- if(2)
- return 50
- if(3)
- return 30
- if(4)
- return 20
-
- check_completion()
- if(steal_target)
- if(owner.current.check_contents_for_reagent(steal_target))
- return 1
- else
- return 0
-
- get_weight(var/job)
- return 20
-
-
- reagent
- weight = 20
- var/target_name
- New(var/text,var/joba)
- ..()
- var/list/items = list("Sulphuric acid", "Polytrinic acid", "Space Lube", "Unstable mutagen",\
- "Leporazine", "Cryptobiolin", "Lexorin ",\
- "Kelotane", "Dexalin", "Tricordrazine")
- target_name = pick(items)
- switch(target_name)
- if("Sulphuric acid")
- steal_target = /datum/reagent/acid
- if("Polytrinic acid")
- steal_target = /datum/reagent/pacid
- if("Space Lube")
- steal_target = /datum/reagent/lube
- if("Unstable mutagen")
- steal_target = /datum/reagent/mutagen
- if("Leporazine")
- steal_target = /datum/reagent/leporazine
- if("Cryptobiolin")
- steal_target =/datum/reagent/cryptobiolin
- if("Lexorin")
- steal_target = /datum/reagent/lexorin
- if("Kelotane")
- steal_target = /datum/reagent/kelotane
- if("Dexalin")
- steal_target = /datum/reagent/dexalin
- if("Tricordrazine")
- steal_target = /datum/reagent/tricordrazine
-
- explanation_text = "Steal a container filled with [target_name]."
-
- get_points(var/job)
- switch(GetRank(job))
- if(0)
- return 75
- if(1)
- return 60
- if(2)
- return 50
- if(3)
- return 30
- if(4)
- return 20
-
- check_completion()
- if(steal_target)
- if(owner.current.check_contents_for_reagent(steal_target))
- return 1
- else
- return 0
-
- get_weight(var/job)
- return 20
-
- cash //must be in credits - atm and coins don't count
- var/steal_amount = 2000
- explanation_text = "Beg, borrow or steal 2000 credits."
- weight = 20
-
- New(var/text,var/joba)
- ..(text,joba)
- steal_amount = 1250 + rand(0,3750)
- explanation_text = "Beg, borrow or steal [steal_amount] credits."
-
- get_points(var/job)
- return 10 + 25 * round(steal_amount / 5000)
-
- check_completion()
- var/held_credits = 0
- for(var/obj/item/weapon/spacecash/M in owner.current.get_contents())
- held_credits += M.get_total()
- if(held_credits >= steal_amount)
- return 1
- return 0
-
- get_weight(var/job)
- return 20
-
-
- nuclear
- explanation_text = "Destroy the station with a nuclear device."
-
-
- block
- explanation_text = "Do not allow any humans to escape on the shuttle alive."
-
-
- check_completion()
- if(!istype(owner.current, /mob/living/silicon))
- return 0
- if(!emergency_shuttle.returned())
- return 0
- if(!owner.current)
- return 0
- var/area/shuttle = locate(/area/shuttle/escape/centcom)
- var/protected_mobs[] = list(/mob/living/silicon/ai, /mob/living/silicon/pai, /mob/living/silicon/robot)
- for(var/mob/living/player in world)
- if(player.type in protected_mobs) continue
- if(player.mind)
- if(player.stat != 2)
- if(get_turf(player) in shuttle)
- return 0
- return 1
-
- decapitate
- New(var/text,var/joba,var/datum/mind/targeta)
- target = targeta
- job = joba
- explanation_text = "Remove and recover the head of [target.current.real_name], the [target.assigned_role]."
- proc/find_target()
- ..()
- if(target && target.current)
- explanation_text = "[target.current.real_name], the [target.role_alt_title ? target.role_alt_title : target.assigned_role], has defied us for the last time. Make an example of him, and bring us his severed head."
- else
- explanation_text = "Free Objective"
- return target
-
-
- find_target_by_role(role, role_type=0)
- ..(role, role_type)
- if(target && target.current)
- explanation_text = "[target.current.real_name], the [target.role_alt_title ? target.role_alt_title : (!role_type ? target.assigned_role : target.special_role)], has defied us for the last time. Make an example of him, and bring us his severed head."
- else
- explanation_text = "Free Objective"
- return target
-
-
- check_completion()
- if(target && target.current)
- if(!owner.current||owner.current.stat==2)//If you're otherwise dead.
- return 0
- var/list/all_items = owner.current.get_contents()
- for(var/obj/item/weapon/organ/head/mmi in all_items)
- if(mmi.brainmob&&mmi.brainmob.mind==target)
- return 1
- return 0
- else
- return 1
-
- absorb
- var/target_amount
- proc/gen_amount_goal(var/lowbound = 4, var/highbound = 6)
- target_amount = rand (lowbound,highbound)
- if(ticker)
- var/n_p = 1 //autowin
- if(ticker.current_state == GAME_STATE_SETTING_UP)
- for(var/mob/new_player/P in world)
- if(P.client && P.ready && P.mind!=owner)
- n_p++
- else if(ticker.current_state == GAME_STATE_PLAYING)
- for(var/mob/living/carbon/human/P in world)
- if(P.client && !(P.mind in ticker.mode.changelings) && P.mind!=owner)
- n_p++
- target_amount = min(target_amount, n_p)
-
- explanation_text = "Absorb [target_amount] compatible genomes."
- return target_amount
-
- check_completion()
- if(owner && owner.current && owner.current.changeling && owner.current.changeling.absorbed_dna && ((owner.current.changeling.absorbed_dna.len - 1) >= target_amount))
- return 1
- else
- return 0
-
- meme_attune
- var/target_amount
- proc/gen_amount_goal(var/lowbound = 4, var/highbound = 6)
- target_amount = rand (lowbound,highbound)
-
- explanation_text = "Attune [target_amount] humanoid brains."
- return target_amount
-
- check_completion()
- if(owner && owner.current && istype(owner.current,/mob/living/parasite/meme) && (owner.current:indoctrinated.len >= target_amount))
- return 1
- else
- return 0
-
- download
- var/target_amount
- proc/gen_amount_goal()
- target_amount = rand(10,20)
- explanation_text = "Download [target_amount] research levels."
- return target_amount
-
-
- check_completion()
- return 0
-
-
- debrain//I want braaaainssss
- New(var/text,var/joba,var/datum/mind/targeta)
- target = targeta
- job = joba
- explanation_text = "Remove and recover the brain of [target.current.real_name], the [target.assigned_role]."
-
- proc/find_target()
- ..()
- if(target && target.current)
- explanation_text = "Steal the brain of [target.current.real_name]."
- else
- explanation_text = "Free Objective"
- return target
-
-
- find_target_by_role(role, role_type=0)
- ..(role, role_type)
- if(target && target.current)
- explanation_text = "Steal the brain of [target.current.real_name] the [target.role_alt_title ? target.role_alt_title : (!role_type ? target.assigned_role : target.special_role)]."
- else
- explanation_text = "Free Objective"
- return target
-
-
- check_completion()
- if(!target)//If it's a free objective.
- return 1
- if(!owner.current||owner.current.stat==2)//If you're otherwise dead.
- return 0
- var/list/all_items = owner.current.get_contents()
- for(var/obj/item/device/mmi/mmi in all_items)
- if(mmi.brainmob&&mmi.brainmob.mind==target) return 1
- for(var/obj/item/brain/brain in all_items)
- if(brain.brainmob&&brain.brainmob.mind==target) return 1
- return 0
-
- mutiny
- proc/find_target()
- ..()
- if(target && target.current)
- explanation_text = "Assassinate [target.current.real_name], the [target.role_alt_title ? target.role_alt_title : target.assigned_role]."
- else
- explanation_text = "Free Objective"
- return target
-
-
- find_target_by_role(role, role_type=0)
- ..(role, role_type)
- if(target && target.current)
- explanation_text = "Assassinate [target.current.real_name], the [target.role_alt_title ? target.role_alt_title : (!role_type ? target.assigned_role : target.special_role)]."
- else
- explanation_text = "Free Objective"
- return target
-
-
- check_completion()
- if(target && target.current)
- var/turf/T = get_turf(target.current)
- if(target.current.stat == 2)
- return 1
- else if((T) && !(T.z in config.station_levels))//If they leave the station they count as dead for this
- return 2
- else
- return 0
- else
- return 1
-
- capture
- var/target_amount
- proc/gen_amount_goal()
- target_amount = rand(5,10)
- explanation_text = "Accumulate [target_amount] capture points."
- return target_amount
-
-
- check_completion()//Basically runs through all the mobs in the area to determine how much they are worth.
- return 0
-
-datum/objective/silence
- explanation_text = "Do not allow anyone to escape the station. Only allow the shuttle to be called when everyone is dead and your story is the only one left."
-
- check_completion()
- if(!emergency_shuttle.returned())
- return 0
-
- var/area/shuttle = locate(/area/shuttle/escape/centcom)
- var/area/pod1 = locate(/area/shuttle/escape_pod1/centcom)
- var/area/pod2 = locate(/area/shuttle/escape_pod2/centcom)
- var/area/pod3 = locate(/area/shuttle/escape_pod3/centcom)
- var/area/pod4 = locate(/area/shuttle/escape_pod5/centcom)
-
- for(var/mob/living/player in world)
- if(player == owner.current)
- continue
- if(player.mind)
- if(player.stat != 2)
- if(get_turf(player) in shuttle)
- return 0
- if(get_turf(player) in pod1)
- return 0
- if(get_turf(player) in pod2)
- return 0
- if(get_turf(player) in pod3)
- return 0
- if(get_turf(player) in pod4)
- return 0
- return 1
-
-#undef FRAME_PROBABILITY
-#undef THEFT_PROBABILITY
-#undef KILL_PROBABILITY
-#undef PROTECT_PROBABILITY
-#undef LENIENT
-#undef NORMAL
-#undef HARD
-#undef IMPOSSIBLE
\ No newline at end of file
diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm
index a26f941188b..f5fdd85242f 100644
--- a/code/game/gamemodes/nuclear/nuclear.dm
+++ b/code/game/gamemodes/nuclear/nuclear.dm
@@ -50,7 +50,7 @@ proc/issyndicate(mob/living/M as mob)
for(var/datum/mind/synd_mind in syndicates)
synd_mind.assigned_role = "MODE" //So they aren't chosen for other jobs.
- synd_mind.special_role = "Syndicate"//So they actually have a special role/N
+ synd_mind.special_role = SPECIAL_ROLE_NUKEOPS
return 1
@@ -360,7 +360,7 @@ proc/issyndicate(mob/living/M as mob)
/datum/game_mode/proc/auto_declare_completion_nuclear()
- if( syndicates.len || (ticker && istype(ticker.mode,/datum/game_mode/nuclear)) )
+ if(syndicates.len || GAMEMODE_IS_NUCLEAR)
var/text = " The syndicate operatives were:"
var/purchases = ""
diff --git a/code/game/gamemodes/nuclear/nuclear_challenge.dm b/code/game/gamemodes/nuclear/nuclear_challenge.dm
index c11b43f81ec..790c6a18e34 100644
--- a/code/game/gamemodes/nuclear/nuclear_challenge.dm
+++ b/code/game/gamemodes/nuclear/nuclear_challenge.dm
@@ -19,7 +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
- if(user.z != ZLEVEL_CENTCOMM)
+ if(!is_admin_level(user.z))
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..833cb6d99ae 100644
--- a/code/game/gamemodes/nuclear/nuclearbomb.dm
+++ b/code/game/gamemodes/nuclear/nuclearbomb.dm
@@ -353,7 +353,7 @@ var/bomb_set
var/off_station = 0
var/turf/bomb_location = get_turf(src)
- if( bomb_location && (bomb_location.z in config.station_levels) )
+ if( bomb_location && is_station_level(bomb_location.z) )
if( (bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)) )
off_station = 1
else
@@ -363,7 +363,7 @@ 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
+ ticker.mode:syndies_didnt_escape = is_station_level(syndie_shuttle.z)
ticker.mode:nuke_off_station = off_station
ticker.station_explosion_cinematic(off_station,null)
if(ticker.mode)
@@ -401,7 +401,7 @@ var/bomb_set
/obj/item/weapon/disk/nuclear/process()
var/turf/disk_loc = get_turf(src)
- if(disk_loc.z != ZLEVEL_STATION && disk_loc.z != ZLEVEL_CENTCOMM)
+ if(!is_secure_level(disk_loc.z))
var/holder = get(src, /mob)
if(holder)
to_chat(holder, "You can't help but feel that you just lost something back there...")
diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm
index fb287135dc7..ee36a71a9cd 100644
--- a/code/game/gamemodes/nuclear/pinpointer.dm
+++ b/code/game/gamemodes/nuclear/pinpointer.dm
@@ -3,7 +3,7 @@
icon = 'icons/obj/device.dmi'
icon_state = "pinoff"
flags = CONDUCT
- slot_flags = SLOT_BELT
+ slot_flags = SLOT_PDA | SLOT_BELT
w_class = 2
item_state = "electronic"
throw_speed = 4
@@ -12,7 +12,12 @@
var/obj/item/weapon/disk/nuclear/the_disk = null
var/active = 0
+/obj/item/weapon/pinpointer/New()
+ ..()
+ pinpointer_list += src
+
/obj/item/weapon/pinpointer/Destroy()
+ pinpointer_list -= src
active = 0
the_disk = null
return ..()
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index ae687d70116..07836c824d7 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -1,7 +1,7 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
var/global/list/all_objectives = list()
-var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \
+var/list/potential_theft_objectives = subtypesof(/datum/theft_objective) \
- /datum/theft_objective/steal \
- /datum/theft_objective/special \
- /datum/theft_objective/number \
@@ -16,411 +16,330 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \
var/completed = 0 //currently only used for custom objectives.
var/martyr_compatible = 0 //If the objective is compatible with martyr objective, i.e. if you can still do it while dead.
- New(var/text)
- all_objectives |= src
- if(text)
- explanation_text = text
+/datum/objective/New(var/text)
+ all_objectives |= src
+ if(text)
+ explanation_text = text
- Destroy()
- all_objectives -= src
- return ..()
+/datum/objective/Destroy()
+ all_objectives -= src
+ return ..()
- proc/check_completion()
- return completed
+/datum/objective/proc/check_completion()
+ return completed
- proc/find_target()
- var/list/possible_targets = list()
- for(var/datum/mind/possible_target in ticker.minds)
- if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != DEAD) && possible_target.current.client)
- possible_targets += possible_target
- if(possible_targets.len > 0)
- target = pick(possible_targets)
+/datum/objective/proc/is_invalid_target(datum/mind/possible_target)
+ if(possible_target == owner)
+ return TARGET_INVALID_IS_OWNER
+ if(!ishuman(possible_target.current))
+ return TARGET_INVALID_NOT_HUMAN
+ if(!possible_target.current.stat == DEAD)
+ return TARGET_INVALID_DEAD
- proc/find_target_by_role(role, role_type=0)//Option sets either to check assigned role or special role. Default to assigned.
- var/list/possible_targets = list()
- for(var/datum/mind/possible_target in ticker.minds)
- if((possible_target != owner) && ishuman(possible_target.current) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role) && (possible_target.current.stat != DEAD) && possible_target.current.client)
- possible_targets += possible_target
- if(possible_targets.len > 0)
- target = pick(possible_targets)
+/datum/objective/proc/find_target()
+ var/list/possible_targets = list()
+ for(var/datum/mind/possible_target in ticker.minds)
+ if(is_invalid_target(possible_target))
+ continue
-//Selects someone with a specific special role if role is != null. Or just anyone with a special role
- proc/find_target_with_special_role(role)
- var/list/possible_targets = list()
- for(var/datum/mind/possible_target in ticker.minds)
- if((possible_target != owner) && ishuman(possible_target.current) && (role && possible_target.special_role == role || !role && possible_target.special_role) && (possible_target.current.stat != DEAD) && possible_target.current.client)
- possible_targets += possible_target
- if(possible_targets.len > 0)
- target = pick(possible_targets)
+ possible_targets += possible_target
+
+ if(possible_targets.len > 0)
+ target = pick(possible_targets)
/datum/objective/assassinate
martyr_compatible = 1
- find_target()
- ..()
- if(target && target.current)
- explanation_text = "Assassinate [target.current.real_name], the [target.assigned_role]."
- else
- explanation_text = "Free Objective"
- return target
-
-
- find_target_by_role(role, role_type=0)
- ..(role, role_type)
- if(target && target.current)
- explanation_text = "Assassinate [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]."
- else
- explanation_text = "Free Objective"
- return target
-
-
- 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
- return 1
- return 0
- return 1
+/datum/objective/assassinate/find_target()
+ ..()
+ if(target && target.current)
+ explanation_text = "Assassinate [target.current.real_name], the [target.assigned_role]."
+ else
+ explanation_text = "Free Objective"
+/datum/objective/assassinate/check_completion()
+ if(target && target.current)
+ if(target.current.stat == DEAD)
+ return 1
+ if(issilicon(target.current) || isbrain(target.current)) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
+ return 1
+ if(!target.current.ckey)
+ return 1
+ return 0
+ return 1
/datum/objective/mutiny
martyr_compatible = 1
- find_target()
- ..()
- if(target && target.current)
- explanation_text = "Assassinate [target.current.real_name], the [target.assigned_role]."
- else
- explanation_text = "Free Objective"
- return target
+/datum/objective/mutiny/find_target()
+ ..()
+ if(target && target.current)
+ explanation_text = "Assassinate [target.current.real_name], the [target.assigned_role]."
+ else
+ explanation_text = "Free Objective"
+ return target
-
- find_target_by_role(role, role_type=0)
- ..(role, role_type)
- if(target && target.current)
- explanation_text = "Assassinate or exile [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]."
- else
- explanation_text = "Free Objective"
- return target
-
- check_completion()
- if(target && target.current)
- if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey || !target.current.client)
- return 1
- var/turf/T = get_turf(target.current)
- if(T && !(T.z in config.station_levels)) //If they leave the station they count as dead for this
- return 2
- return 0
- return 1
-
-/datum/objective/mutiny/rp
- find_target()
- ..()
- if(target && target.current)
- explanation_text = "Assassinate, capture or convert [target.current.real_name], the [target.assigned_role]."
- else
- explanation_text = "Free Objective"
- return target
-
-
- find_target_by_role(role, role_type=0)
- ..(role, role_type)
- if(target && target.current)
- explanation_text = "Assassinate, capture or convert [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]."
- else
- explanation_text = "Free Objective"
- return target
-
- // less violent rev objectives
- check_completion()
- var/rval = 1
- if(target && target.current)
- //assume that only carbon mobs can become rev heads for now
- if(target.current.stat == DEAD || target.current:handcuffed || !ishuman(target.current))
- return 1
- // Check if they're converted
- if(istype(ticker.mode, /datum/game_mode/revolution))
- if(target in ticker.mode:head_revolutionaries)
- return 1
- var/turf/T = get_turf(target.current)
- if(T && !(T.z in config.station_levels)) //If they leave the station they count as dead for this
- rval = 2
- return 0
- return rval
+/datum/objective/mutiny/check_completion()
+ if(target && target.current)
+ if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey || !target.current.client)
+ return 1
+ var/turf/T = get_turf(target.current)
+ if(T && !is_station_level(T.z)) //If they leave the station they count as dead for this
+ return 1
+ return 0
+ return 1
/datum/objective/maroon
martyr_compatible = 1
- find_target()
- ..()
- if(target && target.current)
- explanation_text = "Prevent [target.current.real_name], the [target.assigned_role] from escaping alive."
- else
- explanation_text = "Free Objective"
- return target
+/datum/objective/maroon/find_target()
+ ..()
+ if(target && target.current)
+ explanation_text = "Prevent [target.current.real_name], the [target.assigned_role] from escaping alive."
+ else
+ explanation_text = "Free Objective"
+ return target
- find_target_by_role(role, role_type=0)
- ..(role, role_type)
- if(target && target.current)
- explanation_text = "Prevent [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role] from escaping alive."
- else
- explanation_text = "Free Objective"
- return target
+/datum/objective/maroon/check_completion()
+ if(target && target.current)
+ if(target.current.stat == DEAD)
+ return 1
+ if(!target.current.ckey)
+ return 1
+ if(issilicon(target.current))
+ return 1
+ if(isbrain(target.current))
+ return 1
+ var/turf/T = get_turf(target.current)
+ if(is_admin_level(T.z))
+ return 0
+ return 0
+ return 1
- 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
- return 1
- if((target.current.z in config.admin_levels))
- return 0
- return 1
/datum/objective/debrain //I want braaaainssss
martyr_compatible = 0
- find_target()
- ..()
- if(target && target.current)
- explanation_text = "Steal the brain of [target.current.real_name] the [target.assigned_role]."
- else
- explanation_text = "Free Objective"
- return target
+/datum/objective/debrain/find_target()
+ ..()
+ if(target && target.current)
+ explanation_text = "Steal the brain of [target.current.real_name] the [target.assigned_role]."
+ else
+ explanation_text = "Free Objective"
+ return target
- find_target_by_role(role, role_type=0)
- ..(role, role_type)
- if(target && target.current)
- explanation_text = "Steal the brain of [target.current.real_name] the [!role_type ? target.assigned_role : target.special_role]."
- else
- explanation_text = "Free Objective"
- return target
-
- check_completion()
- if(!target)//If it's a free objective.
- return 1
- if( !owner.current || owner.current.stat==DEAD )//If you're otherwise dead.
- return 0
- if( !target.current || !isbrain(target.current) )
- return 0
- var/atom/A = target.current
- while(A.loc) //check to see if the brainmob is on our person
- A = A.loc
- if(A == owner.current)
- return 1
+/datum/objective/debrain/check_completion()
+ if(!target)//If it's a free objective.
+ return 1
+ if(!owner.current || owner.current.stat == DEAD)
return 0
+ if(!target.current || !isbrain(target.current))
+ return 0
+ var/atom/A = target.current
+ while(A.loc) //check to see if the brainmob is on our person
+ A = A.loc
+ if(A == owner.current)
+ return 1
+ return 0
/datum/objective/protect //The opposite of killing a dude.
martyr_compatible = 1
- find_target()
- ..()
- if(target && target.current)
- explanation_text = "Protect [target.current.real_name], the [target.assigned_role]."
- else
- explanation_text = "Free Objective"
- return target
+/datum/objective/protect/find_target()
+ ..()
+ if(target && target.current)
+ explanation_text = "Protect [target.current.real_name], the [target.assigned_role]."
+ else
+ explanation_text = "Free Objective"
+ return target
- find_target_by_role(role, role_type=0)
- ..(role, role_type)
- if(target && target.current)
- explanation_text = "Protect [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]."
- else
- explanation_text = "Free Objective"
- return target
-
- find_target_with_special_role(role,role_type=0)
- ..(role)
- if(target && target.current)
- explanation_text = "Protect [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]."
- else
- explanation_text = "Free Objective"
- return target
-
- check_completion()
- if(!target) //If it's a free objective.
- return 1
- if(target.current)
- if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current))
- return 0
- return 1
- return 0
+/datum/objective/protect/check_completion()
+ if(!target) //If it's a free objective.
+ return 1
+ if(target.current)
+ if(target.current.stat == DEAD)
+ return 0
+ if(issilicon(target.current))
+ return 0
+ if(isbrain(target.current))
+ return 0
+ return 1
+ return 0
/datum/objective/protect/mindslave //subytpe for mindslave implants
+
/datum/objective/hijack
martyr_compatible = 0 //Technically you won't get both anyway.
- explanation_text = "Hijack the shuttle by escaping on it with no loyalist NanoTrasen crew on board and alive. Syndicate agents, other enemies of NanoTrasen, cyborgs, and pets may be allowed to escape alive."
+ explanation_text = "Hijack the shuttle by escaping on it with no loyalist NanoTrasen crew on board and alive. \
+ Syndicate agents, other enemies of NanoTrasen, cyborgs, and pets may be allowed to escape alive."
- check_completion()
- if(!owner.current || owner.current.stat)
- return 0
- if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME)
- return 0
- if(issilicon(owner.current))
- return 0
+/datum/objective/hijack/check_completion()
+ if(!owner.current || owner.current.stat)
+ return 0
+ if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME)
+ return 0
+ if(issilicon(owner.current))
+ return 0
- var/area/A = get_area(owner.current)
- if(shuttle_master.emergency.areaInstance != A)
- return 0
+ var/area/A = get_area(owner.current)
+ if(shuttle_master.emergency.areaInstance != A)
+ return 0
- for(var/mob/living/player in player_list)
- if(player.mind && player.mind != owner)
- if(player.stat != DEAD)
- if(issilicon(player)) //Borgs are technically dead anyways
- continue
- if(isanimal(player)) //Poly does not own the shuttle
- continue
- if(player.mind.special_role && !(player.mind.special_role == "Response Team")) //Is antag, and not ERT
- continue
+ for(var/mob/living/player in player_list)
+ if(player.mind && player.mind != owner)
+ if(player.stat != DEAD)
+ if(issilicon(player)) //Borgs are technically dead anyways
+ continue
+ if(isanimal(player)) //Poly does not own the shuttle
+ continue
+ if(player.mind.special_role && !(player.mind.special_role == SPECIAL_ROLE_ERT)) //Is antag, and not ERT
+ continue
- if(get_area(player) == A)
- return 0
- return 1
+ if(get_area(player) == A)
+ return 0
+ return 1
/datum/objective/hijackclone
explanation_text = "Hijack the emergency shuttle by ensuring only you (or your copies) escape."
martyr_compatible = 0
- check_completion()
- if(!owner.current)
- return 0
- if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME)
- return 0
-
- var/area/A = shuttle_master.emergency.areaInstance
-
- for(var/mob/living/player in player_list) //Make sure nobody else is onboard
- if(player.mind && player.mind != owner)
- if(player.stat != DEAD)
- if(istype(player, /mob/living/silicon))
- continue
- if(get_area(player) == A)
- if(player.real_name != owner.current.real_name && !istype(get_turf(player.mind.current), /turf/simulated/shuttle/floor4))
- return 0
-
- for(var/mob/living/player in player_list) //Make sure at least one of you is onboard
- if(player.mind && player.mind != owner)
- if(player.stat != DEAD)
- if(istype(player, /mob/living/silicon))
- continue
- if(get_area(player) == A)
- if(player.real_name == owner.current.real_name && !istype(get_turf(player.mind.current), /turf/simulated/shuttle/floor4))
- return 1
+/datum/objective/hijackclone/check_completion()
+ if(!owner.current)
return 0
+ if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME)
+ return 0
+
+ var/area/A = shuttle_master.emergency.areaInstance
+
+ for(var/mob/living/player in player_list) //Make sure nobody else is onboard
+ if(player.mind && player.mind != owner)
+ if(player.stat != DEAD)
+ if(issilicon(player))
+ continue
+ if(get_area(player) == A)
+ if(player.real_name != owner.current.real_name && !istype(get_turf(player.mind.current), /turf/simulated/shuttle/floor4))
+ return 0
+
+ for(var/mob/living/player in player_list) //Make sure at least one of you is onboard
+ if(player.mind && player.mind != owner)
+ if(player.stat != DEAD)
+ if(issilicon(player))
+ continue
+ if(get_area(player) == A)
+ if(player.real_name == owner.current.real_name && !istype(get_turf(player.mind.current), /turf/simulated/shuttle/floor4))
+ return 1
+ return 0
/datum/objective/block
explanation_text = "Do not allow any lifeforms, be it organic or synthetic to escape on the shuttle alive. AIs, Cyborgs, and pAIs are not considered alive."
martyr_compatible = 1
- check_completion()
- if(!istype(owner.current, /mob/living/silicon))
- return 0
- if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME)
- return 0
- if(!owner.current)
- return 0
+/datum/objective/block/check_completion()
+ if(!istype(owner.current, /mob/living/silicon))
+ return 0
+ if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME)
+ return 0
+ if(!owner.current)
+ return 0
- var/area/A = shuttle_master.emergency.areaInstance
- var/list/protected_mobs = list(/mob/living/silicon/ai, /mob/living/silicon/pai, /mob/living/silicon/robot)
+ var/area/A = shuttle_master.emergency.areaInstance
+ var/list/protected_mobs = list(/mob/living/silicon/ai, /mob/living/silicon/pai, /mob/living/silicon/robot)
- for(var/mob/living/player in player_list)
- if(player.type in protected_mobs)
- continue
+ for(var/mob/living/player in player_list)
+ if(player.type in protected_mobs)
+ continue
- if(player.mind && player.stat != DEAD)
- if(get_area(player) == A)
- return 0
+ if(player.mind && player.stat != DEAD)
+ if(get_area(player) == A)
+ return 0
- return 1
+ return 1
/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))
- return 0
- if(isbrain(owner.current))
- return 0
- if(!owner.current || owner.current.stat == DEAD)
- return 0
- if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME)
- return 0
- var/turf/location = get_turf(owner.current)
- if(!location)
- return 0
-
- if(istype(location, /turf/simulated/shuttle/floor4)) // Fails traitors if they are in the shuttle brig -- Polymorph
- return 0
-
- if(location.onCentcom() || location.onSyndieBase())
- return 1
+/datum/objective/escape/check_completion()
+ if(issilicon(owner.current))
return 0
+ if(isbrain(owner.current))
+ return 0
+ if(!owner.current || owner.current.stat == DEAD)
+ return 0
+ if(ticker.force_ending) //This one isn't their fault, so lets just assume good faith
+ return 1
+ if(ticker.mode.station_was_nuked) //If they escaped the blast somehow, let them win
+ return 1
+ if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME)
+ return 0
+ var/turf/location = get_turf(owner.current)
+ if(!location)
+ return 0
+
+ if(istype(location, /turf/simulated/shuttle/floor4)) // Fails traitors if they are in the shuttle brig -- Polymorph
+ return 0
+
+ if(location.onCentcom() || location.onSyndieBase())
+ return 1
+
+ return 0
/datum/objective/escape/escape_with_identity
var/target_real_name // Has to be stored because the target's real_name can change over the course of the round
- find_target()
- var/list/possible_targets = list() //Copypasta because NO_SCAN races, yay for snowflakes.
- for(var/datum/mind/possible_target in ticker.minds)
- if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != DEAD) && possible_target.current.client)
- var/mob/living/carbon/human/H = possible_target.current
- if(!(H.species.flags & NO_SCAN))
- possible_targets += possible_target
- if(possible_targets.len > 0)
- target = pick(possible_targets)
- if(target && target.current)
- target_real_name = target.current.real_name
- explanation_text = "Escape on the shuttle or an escape pod with the identity of [target_real_name], the [target.assigned_role] while wearing their identification card."
- else
- explanation_text = "Free Objective"
+/datum/objective/escape/escape_with_identity/find_target()
+ var/list/possible_targets = list() //Copypasta because NO_SCAN races, yay for snowflakes.
+ for(var/datum/mind/possible_target in ticker.minds)
+ if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != DEAD) && possible_target.current.client)
+ var/mob/living/carbon/human/H = possible_target.current
+ if(!(H.species.flags & NO_SCAN))
+ possible_targets += possible_target
+ if(possible_targets.len > 0)
+ target = pick(possible_targets)
+ if(target && target.current)
+ target_real_name = target.current.real_name
+ explanation_text = "Escape on the shuttle or an escape pod with the identity of [target_real_name], the [target.assigned_role] while wearing their identification card."
+ else
+ explanation_text = "Free Objective"
- check_completion()
- if(!target_real_name)
- return 1
- if(!ishuman(owner.current))
- return 0
- var/mob/living/carbon/human/H = owner.current
- if(..())
- if(H.dna.real_name == target_real_name)
- if(H.get_id_name()== target_real_name)
- return 1
+/datum/objective/escape/escape_with_identity/check_completion()
+ if(!target_real_name)
+ return 1
+ if(!ishuman(owner.current))
return 0
+ var/mob/living/carbon/human/H = owner.current
+ if(..())
+ if(H.dna.real_name == target_real_name)
+ if(H.get_id_name()== target_real_name)
+ return 1
+ return 0
/datum/objective/die
explanation_text = "Die a glorious death."
- check_completion()
- if(!owner.current || owner.current.stat == DEAD || isbrain(owner.current))
- return 1 //Brains no longer win survive objectives. --NEO
- if(issilicon(owner.current) && owner.current != owner.original)
- return 1
- return 0
+/datum/objective/die/check_completion()
+ if(!owner.current || owner.current.stat == DEAD || isbrain(owner.current))
+ return 1
+ if(issilicon(owner.current) && owner.current != owner.original)
+ return 1
+ return 0
/datum/objective/survive
explanation_text = "Stay alive until the end."
- check_completion()
- if(!owner.current || owner.current.stat == DEAD || isbrain(owner.current))
- return 0 //Brains no longer win survive objectives. --NEO
- if(issilicon(owner.current) && owner.current != owner.original)
- return 0
- return 1
+/datum/objective/survive/check_completion()
+ if(!owner.current || owner.current.stat == DEAD || isbrain(owner.current))
+ return 0 //Brains no longer win survive objectives. --NEO
+ if(issilicon(owner.current) && owner.current != owner.original)
+ return 0
+ return 1
/datum/objective/nuclear
explanation_text = "Destroy the station with a nuclear device."
@@ -432,374 +351,383 @@ var/list/potential_theft_objectives=subtypesof(/datum/theft_objective) \
var/datum/theft_objective/steal_target
martyr_compatible = 0
- find_target(var/special_only=0)
- var/loop=50
- while(!steal_target && loop > 0)
- loop--
- var/thefttype = pick(potential_theft_objectives)
- var/datum/theft_objective/O = new thefttype
- if(owner.assigned_role in O.protected_jobs)
+/datum/objective/steal/find_target(var/special_only=0)
+ var/loop=50
+ while(!steal_target && loop > 0)
+ loop--
+ var/thefttype = pick(potential_theft_objectives)
+ var/datum/theft_objective/O = new thefttype
+ if(owner.assigned_role in O.protected_jobs)
+ continue
+ if(special_only)
+ if(!(O.flags & 1)) // THEFT_FLAG_SPECIAL
continue
- if(special_only)
- if(!(O.flags & 1)) // THEFT_FLAG_SPECIAL
- continue
- else
- if(O.flags & 1) // THEFT_FLAG_SPECIAL
- continue
- if(O.flags & 2)
- continue
- steal_target=O
- explanation_text = "Steal [O]."
- return
- explanation_text = "Free Objective."
-
-
- proc/select_target()
- var/list/possible_items_all = potential_theft_objectives+"custom"
- var/new_target = input("Select target:", "Objective target", null) as null|anything in possible_items_all
- if(!new_target) return
- if(new_target == "custom")
- var/datum/theft_objective/O=new
- O.typepath = input("Select type:","Type") as null|anything in typesof(/obj/item)
- if(!O.typepath) return
- var/tmp_obj = new O.typepath
- var/custom_name = tmp_obj:name
- qdel(tmp_obj)
- O.name = sanitize(copytext(input("Enter target name:", "Objective target", custom_name) as text|null,1,MAX_NAME_LEN))
- if(!O.name) return
- steal_target = O
- explanation_text = "Steal [O.name]."
else
- steal_target = new new_target
- explanation_text = "Steal [steal_target.name]."
- return steal_target
+ if(O.flags & 1) // THEFT_FLAG_SPECIAL
+ continue
+ if(O.flags & 2)
+ continue
+ steal_target=O
+ explanation_text = "Steal [O]."
+ return
+ explanation_text = "Free Objective."
- check_completion()
- if(!steal_target) return 1 // Free Objective
- return steal_target.check_completion(owner)
+
+/datum/objective/steal/proc/select_target()
+ var/list/possible_items_all = potential_theft_objectives+"custom"
+ var/new_target = input("Select target:", "Objective target", null) as null|anything in possible_items_all
+ if(!new_target) return
+ if(new_target == "custom")
+ var/datum/theft_objective/O=new
+ O.typepath = input("Select type:","Type") as null|anything in typesof(/obj/item)
+ if(!O.typepath) return
+ var/tmp_obj = new O.typepath
+ var/custom_name = tmp_obj:name
+ qdel(tmp_obj)
+ O.name = sanitize(copytext(input("Enter target name:", "Objective target", custom_name) as text|null,1,MAX_NAME_LEN))
+ if(!O.name) return
+ steal_target = O
+ explanation_text = "Steal [O.name]."
+ else
+ steal_target = new new_target
+ explanation_text = "Steal [steal_target.name]."
+ return steal_target
+
+/datum/objective/steal/check_completion()
+ if(!steal_target) return 1 // Free Objective
+ return steal_target.check_completion(owner)
/datum/objective/steal/exchange
martyr_compatible = 0
- proc/set_faction(var/faction,var/otheragent)
- target = otheragent
- var/datum/theft_objective/unique/targetinfo
- if(faction == "red")
- targetinfo = new /datum/theft_objective/unique/docs_blue
- else if(faction == "blue")
- targetinfo = new /datum/theft_objective/unique/docs_red
- explanation_text = "Acquire [targetinfo.name] held by [target.current.real_name], the [target.assigned_role] and syndicate agent"
- steal_target = targetinfo
+/datum/objective/steal/exchange/proc/set_faction(var/faction,var/otheragent)
+ target = otheragent
+ var/datum/theft_objective/unique/targetinfo
+ if(faction == "red")
+ targetinfo = new /datum/theft_objective/unique/docs_blue
+ else if(faction == "blue")
+ targetinfo = new /datum/theft_objective/unique/docs_red
+ explanation_text = "Acquire [targetinfo.name] held by [target.current.real_name], the [target.assigned_role] and syndicate agent"
+ steal_target = targetinfo
/datum/objective/steal/exchange/backstab
-
- set_faction(var/faction)
- var/datum/theft_objective/unique/targetinfo
- if(faction == "red")
- targetinfo = new /datum/theft_objective/unique/docs_red
- else if(faction == "blue")
- targetinfo = new /datum/theft_objective/unique/docs_blue
- explanation_text = "Do not give up or lose [targetinfo.name]."
- steal_target = targetinfo
+/datum/objective/steal/exchange/backstab/set_faction(var/faction)
+ var/datum/theft_objective/unique/targetinfo
+ if(faction == "red")
+ targetinfo = new /datum/theft_objective/unique/docs_red
+ else if(faction == "blue")
+ targetinfo = new /datum/theft_objective/unique/docs_blue
+ explanation_text = "Do not give up or lose [targetinfo.name]."
+ steal_target = targetinfo
/datum/objective/download
- proc/gen_amount_goal()
- target_amount = rand(10,20)
- explanation_text = "Download [target_amount] research levels."
- return target_amount
+/datum/objective/download/proc/gen_amount_goal()
+ target_amount = rand(10,20)
+ explanation_text = "Download [target_amount] research levels."
+ return target_amount
- check_completion()
- return 0
+/datum/objective/download/check_completion()
+ return 0
/datum/objective/capture
- proc/gen_amount_goal()
- target_amount = rand(5,10)
- explanation_text = "Accumulate [target_amount] capture points."
- return target_amount
+/datum/objective/capture/proc/gen_amount_goal()
+ target_amount = rand(5,10)
+ explanation_text = "Accumulate [target_amount] capture points."
+ return target_amount
- check_completion()//Basically runs through all the mobs in the area to determine how much they are worth.
- return 0
+/datum/objective/capture/check_completion()//Basically runs through all the mobs in the area to determine how much they are worth.
+ return 0
/datum/objective/absorb
- proc/gen_amount_goal(var/lowbound = 4, var/highbound = 6)
- target_amount = rand (lowbound,highbound)
- if(ticker)
- var/n_p = 1 //autowin
- if(ticker.current_state == GAME_STATE_SETTING_UP)
- for(var/mob/new_player/P in player_list)
- if(P.client && P.ready && P.mind != owner)
- if(P.client.prefs && (P.client.prefs.species == "Vox" || P.client.prefs.species == "Slime People" || P.client.prefs.species == "Machine")) // Special check for species that can't be absorbed. No better solution.
- continue
- n_p++
- else if(ticker.current_state == GAME_STATE_PLAYING)
- for(var/mob/living/carbon/human/P in player_list)
- if(P.species.flags & NO_SCAN)
+/datum/objective/absorb/proc/gen_amount_goal(var/lowbound = 4, var/highbound = 6)
+ target_amount = rand (lowbound,highbound)
+ if(ticker)
+ var/n_p = 1 //autowin
+ if(ticker.current_state == GAME_STATE_SETTING_UP)
+ for(var/mob/new_player/P in player_list)
+ if(P.client && P.ready && P.mind != owner)
+ if(P.client.prefs && (P.client.prefs.species == "Vox" || P.client.prefs.species == "Slime People" || P.client.prefs.species == "Machine")) // Special check for species that can't be absorbed. No better solution.
continue
- if(P.client && !(P.mind in ticker.mode.changelings) && P.mind!=owner)
- n_p++
- target_amount = min(target_amount, n_p)
+ n_p++
+ else if(ticker.current_state == GAME_STATE_PLAYING)
+ for(var/mob/living/carbon/human/P in player_list)
+ if(P.species.flags & NO_SCAN)
+ continue
+ if(P.client && !(P.mind in ticker.mode.changelings) && P.mind!=owner)
+ n_p++
+ target_amount = min(target_amount, n_p)
- explanation_text = "Absorb [target_amount] compatible genomes."
- return target_amount
+ explanation_text = "Absorb [target_amount] compatible genomes."
+ return target_amount
- check_completion()
- if(owner && owner.changeling && owner.changeling.absorbed_dna && (owner.changeling.absorbedcount >= target_amount))
- return 1
- else
- return 0
+/datum/objective/absorb/check_completion()
+ if(owner && owner.changeling && owner.changeling.absorbed_dna && (owner.changeling.absorbedcount >= target_amount))
+ return 1
+ else
+ return 0
/datum/objective/destroy
martyr_compatible = 1
var/target_real_name
- find_target()
- var/list/possible_targets = active_ais(1)
- var/mob/living/silicon/ai/target_ai = pick(possible_targets)
- target = target_ai.mind
- if(target && target.current)
- target_real_name = target.current.real_name
- explanation_text = "Destroy [target_real_name], the AI."
- else
- explanation_text = "Free Objective"
- return target
+/datum/objective/destroy/find_target()
+ var/list/possible_targets = active_ais(1)
+ var/mob/living/silicon/ai/target_ai = pick(possible_targets)
+ target = target_ai.mind
+ if(target && target.current)
+ target_real_name = target.current.real_name
+ explanation_text = "Destroy [target_real_name], the AI."
+ else
+ explanation_text = "Free Objective"
+ return target
- check_completion()
- if(target && target.current)
- if(target.current.stat == DEAD || target.current.z > 6 || !target.current.ckey)
- return 1
- return 0
- return 1
+/datum/objective/destroy/check_completion()
+ if(target && target.current)
+ if(target.current.stat == DEAD || is_away_level(target.current.z) || !target.current.ckey)
+ return 1
+ return 0
+ return 1
/datum/objective/blood
- proc/gen_amount_goal(low = 150, high = 400)
- target_amount = rand(low,high)
- target_amount = round(round(target_amount/5)*5)
- explanation_text = "Accumulate atleast [target_amount] units of blood in total."
- return target_amount
+/datum/objective/blood/proc/gen_amount_goal(low = 150, high = 400)
+ target_amount = rand(low,high)
+ target_amount = round(round(target_amount/5)*5)
+ explanation_text = "Accumulate atleast [target_amount] units of blood in total."
+ return target_amount
- check_completion()
- if(owner && owner.vampire && owner.vampire.bloodtotal && owner.vampire.bloodtotal >= target_amount)
- return 1
- else
- return 0
+/datum/objective/blood/check_completion()
+ if(owner && owner.vampire && owner.vampire.bloodtotal && owner.vampire.bloodtotal >= target_amount)
+ return 1
+ else
+ return 0
// /vg/; Vox Inviolate for humans :V
/datum/objective/minimize_casualties
explanation_text = "Minimise casualties."
- check_completion()
- if(owner.kills.len>5) return 0
- return 1
+/datum/objective/minimize_casualties/check_completion()
+ if(owner.kills.len>5) return 0
+ return 1
//Vox heist objectives.
/datum/objective/heist
- proc/choose_target()
- return
+/datum/objective/heist/proc/choose_target()
+ return
/datum/objective/heist/kidnap
- choose_target()
- var/list/roles = list("Chief Engineer","Research Director","Roboticist","Chemist","Station Engineer")
- var/list/possible_targets = list()
- var/list/priority_targets = list()
+/datum/objective/heist/kidnap/choose_target()
+ var/list/roles = list("Chief Engineer","Research Director","Roboticist","Chemist","Station Engineer")
+ var/list/possible_targets = list()
+ var/list/priority_targets = list()
- for(var/datum/mind/possible_target in ticker.minds)
- if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != DEAD) && (possible_target.assigned_role != "MODE"))
- possible_targets += possible_target
- for(var/role in roles)
- if(possible_target.assigned_role == role)
- priority_targets += possible_target
- continue
+ for(var/datum/mind/possible_target in ticker.minds)
+ if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != DEAD) && (possible_target.assigned_role != "MODE"))
+ possible_targets += possible_target
+ for(var/role in roles)
+ if(possible_target.assigned_role == role)
+ priority_targets += possible_target
+ continue
- if(priority_targets.len > 0)
- target = pick(priority_targets)
- else if(possible_targets.len > 0)
- target = pick(possible_targets)
+ if(priority_targets.len > 0)
+ target = pick(priority_targets)
+ else if(possible_targets.len > 0)
+ target = pick(possible_targets)
- if(target && target.current)
- explanation_text = "The Shoal has a need for [target.current.real_name], the [target.assigned_role]. Take them alive."
- else
- explanation_text = "Free Objective"
- return target
+ if(target && target.current)
+ explanation_text = "The Shoal has a need for [target.current.real_name], the [target.assigned_role]. Take them alive."
+ else
+ explanation_text = "Free Objective"
+ return target
- check_completion()
- if(target && target.current)
- if(target.current.stat == DEAD)
- return 0
-
- var/area/shuttle/vox/A = locate() //stupid fucking hardcoding
- var/area/vox_station/B = locate() //but necessary
-
- for(var/mob/living/carbon/human/M in A)
- if(target.current == M)
- return 1
- for(var/mob/living/carbon/human/M in B)
- if(target.current == M)
- return 1
- else
+/datum/objective/heist/kidnap/check_completion()
+ if(target && target.current)
+ if(target.current.stat == DEAD)
return 0
-/datum/objective/heist/loot
- choose_target()
- var/loot = "an object"
- switch(rand(1,8))
- if(1)
- target = /obj/structure/particle_accelerator
- target_amount = 6
- loot = "a complete particle accelerator"
- if(2)
- target = /obj/machinery/the_singularitygen
- target_amount = 1
- loot = "a gravitational singularity generator"
- if(3)
- target = /obj/machinery/power/emitter
- target_amount = 4
- loot = "four emitters"
- if(4)
- target = /obj/machinery/nuclearbomb
- target_amount = 1
- loot = "a nuclear bomb"
- if(5)
- target = /obj/item/weapon/gun
- target_amount = 6
- loot = "six guns. Tasers and other non-lethal guns are acceptable"
- if(6)
- target = /obj/item/weapon/gun/energy
- target_amount = 4
- loot = "four energy guns"
- if(7)
- target = /obj/item/weapon/gun/energy/laser
- target_amount = 2
- loot = "two laser guns"
- if(8)
- target = /obj/item/weapon/gun/energy/ionrifle
- target_amount = 1
- loot = "an ion gun"
-
- explanation_text = "We are lacking in hardware. Steal or trade [loot]."
-
- check_completion()
- var/total_amount = 0
-
- for(var/obj/O in locate(/area/shuttle/vox))
- if(istype(O, target))
- total_amount++
- for(var/obj/I in O.contents)
- if(istype(I, target))
- total_amount++
- if(total_amount >= target_amount)
- return 1
-
- for(var/obj/O in locate(/area/vox_station))
- if(istype(O, target))
- total_amount++
- for(var/obj/I in O.contents)
- if(istype(I, target))
- total_amount++
- if(total_amount >= target_amount)
- return 1
-
- var/datum/game_mode/heist/H = ticker.mode
- for(var/datum/mind/raider in H.raiders)
- if(raider.current)
- for(var/obj/O in raider.current.get_contents())
- if(istype(O,target))
- total_amount++
- if(total_amount >= target_amount)
- return 1
+ var/area/shuttle/vox/A = locate() //stupid fucking hardcoding
+ var/area/vox_station/B = locate() //but necessary
+ for(var/mob/living/carbon/human/M in A)
+ if(target.current == M)
+ return 1
+ for(var/mob/living/carbon/human/M in B)
+ if(target.current == M)
+ return 1
+ else
return 0
+/datum/objective/heist/loot
+/datum/objective/heist/loot/choose_target()
+ var/loot = "an object"
+ switch(rand(1,8))
+ if(1)
+ target = /obj/structure/particle_accelerator
+ target_amount = 6
+ loot = "a complete particle accelerator"
+ if(2)
+ target = /obj/machinery/the_singularitygen
+ target_amount = 1
+ loot = "a gravitational singularity generator"
+ if(3)
+ target = /obj/machinery/power/emitter
+ target_amount = 4
+ loot = "four emitters"
+ if(4)
+ target = /obj/machinery/nuclearbomb
+ target_amount = 1
+ loot = "a nuclear bomb"
+ if(5)
+ target = /obj/item/weapon/gun
+ target_amount = 6
+ loot = "six guns. Tasers and other non-lethal guns are acceptable"
+ if(6)
+ target = /obj/item/weapon/gun/energy
+ target_amount = 4
+ loot = "four energy guns"
+ if(7)
+ target = /obj/item/weapon/gun/energy/laser
+ target_amount = 2
+ loot = "two laser guns"
+ if(8)
+ target = /obj/item/weapon/gun/energy/ionrifle
+ target_amount = 1
+ loot = "an ion gun"
+
+ explanation_text = "We are lacking in hardware. Steal or trade [loot]."
+
+/datum/objective/heist/loot/check_completion()
+ var/total_amount = 0
+
+ for(var/obj/O in locate(/area/shuttle/vox))
+ if(istype(O, target))
+ total_amount++
+ for(var/obj/I in O.contents)
+ if(istype(I, target))
+ total_amount++
+ if(total_amount >= target_amount)
+ return 1
+
+ for(var/obj/O in locate(/area/vox_station))
+ if(istype(O, target))
+ total_amount++
+ for(var/obj/I in O.contents)
+ if(istype(I, target))
+ total_amount++
+ if(total_amount >= target_amount)
+ return 1
+
+ var/datum/game_mode/heist/H = ticker.mode
+ for(var/datum/mind/raider in H.raiders)
+ if(raider.current)
+ for(var/obj/O in raider.current.get_contents())
+ if(istype(O,target))
+ total_amount++
+ if(total_amount >= target_amount)
+ return 1
+
+ return 0
+
/datum/objective/heist/salvage
- choose_target()
- switch(rand(1,8))
- if(1)
- target = "metal"
- target_amount = 300
- if(2)
- target = "glass"
- target_amount = 200
- if(3)
- target = "plasteel"
- target_amount = 100
- if(4)
- target = "solid plasma"
- target_amount = 100
- if(5)
- target = "silver"
- target_amount = 50
- if(6)
- target = "gold"
- target_amount = 20
- if(7)
- target = "uranium"
- target_amount = 20
- if(8)
- target = "diamond"
- target_amount = 20
+/datum/objective/heist/salvage/choose_target()
+ switch(rand(1,8))
+ if(1)
+ target = "metal"
+ target_amount = 300
+ if(2)
+ target = "glass"
+ target_amount = 200
+ if(3)
+ target = "plasteel"
+ target_amount = 100
+ if(4)
+ target = "solid plasma"
+ target_amount = 100
+ if(5)
+ target = "silver"
+ target_amount = 50
+ if(6)
+ target = "gold"
+ target_amount = 20
+ if(7)
+ target = "uranium"
+ target_amount = 20
+ if(8)
+ target = "diamond"
+ target_amount = 20
- explanation_text = "Ransack or trade with the station and escape with [target_amount] [target]."
+ explanation_text = "Ransack or trade with the station and escape with [target_amount] [target]."
- check_completion()
- var/total_amount = 0
+/datum/objective/heist/salvage/check_completion()
+ var/total_amount = 0
- for(var/obj/item/O in locate(/area/shuttle/vox))
- var/obj/item/stack/sheet/S
- if(istype(O,/obj/item/stack/sheet))
- if(O.name == target)
- S = O
+ for(var/obj/item/O in locate(/area/shuttle/vox))
+ var/obj/item/stack/sheet/S
+ if(istype(O,/obj/item/stack/sheet))
+ if(O.name == target)
+ S = O
+ total_amount += S.get_amount()
+
+ for(var/obj/I in O.contents)
+ if(istype(I,/obj/item/stack/sheet))
+ if(I.name == target)
+ S = I
total_amount += S.get_amount()
- for(var/obj/I in O.contents)
- if(istype(I,/obj/item/stack/sheet))
- if(I.name == target)
- S = I
- total_amount += S.get_amount()
+ for(var/obj/item/O in locate(/area/vox_station))
+ var/obj/item/stack/sheet/S
+ if(istype(O,/obj/item/stack/sheet))
+ if(O.name == target)
+ S = O
+ total_amount += S.get_amount()
- for(var/obj/item/O in locate(/area/vox_station))
- var/obj/item/stack/sheet/S
- if(istype(O,/obj/item/stack/sheet))
- if(O.name == target)
- S = O
+ for(var/obj/I in O.contents)
+ if(istype(I,/obj/item/stack/sheet))
+ if(I.name == target)
+ S = I
total_amount += S.get_amount()
- for(var/obj/I in O.contents)
- if(istype(I,/obj/item/stack/sheet))
- if(I.name == target)
- S = I
+ var/datum/game_mode/heist/H = ticker.mode
+ for(var/datum/mind/raider in H.raiders)
+ if(raider.current)
+ for(var/obj/item/O in raider.current.get_contents())
+ if(istype(O,/obj/item/stack/sheet))
+ if(O.name == target)
+ var/obj/item/stack/sheet/S = O
total_amount += S.get_amount()
- var/datum/game_mode/heist/H = ticker.mode
- for(var/datum/mind/raider in H.raiders)
- if(raider.current)
- for(var/obj/item/O in raider.current.get_contents())
- if(istype(O,/obj/item/stack/sheet))
- if(O.name == target)
- var/obj/item/stack/sheet/S = O
- total_amount += S.get_amount()
-
- if(total_amount >= target_amount) return 1
- return 0
+ if(total_amount >= target_amount) return 1
+ return 0
/datum/objective/heist/inviolate_crew
explanation_text = "Do not leave any Vox behind, alive or dead."
- check_completion()
- var/datum/game_mode/heist/H = ticker.mode
- if(H.is_raider_crew_safe())
- return 1
- return 0
+/datum/objective/heist/inviolate_crew/check_completion()
+ var/datum/game_mode/heist/H = ticker.mode
+ if(H.is_raider_crew_safe())
+ return 1
+ return 0
/datum/objective/heist/inviolate_death
explanation_text = "Follow the Inviolate. Minimise death and loss of resources."
- completed = 1
+
+/datum/objective/heist/inviolate_death/check_completion()
+ var/vox_allowed_kills = 3 // The number of people the vox can accidently kill. Mostly a counter to people killing themselves if a raider touches them to force fail.
+ var/vox_total_kills = 0
+
+ var/datum/game_mode/heist/H = ticker.mode
+ for(var/datum/mind/raider in H.raiders)
+ vox_total_kills += raider.kills.len // Kills are listed in the mind; uses this to calculate vox kills
+
+ if(vox_total_kills > vox_allowed_kills) return 0
+ return 1
// Traders
@@ -851,4 +779,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..83846818091 100644
--- a/code/game/gamemodes/revolution/revolution.dm
+++ b/code/game/gamemodes/revolution/revolution.dm
@@ -111,7 +111,7 @@
to_chat(rev_mind.current, "You are a member of the revolutionaries' leadership!")
for(var/datum/objective/objective in rev_mind.objectives)
to_chat(rev_mind.current, "Objective #[obj_count]: [objective.explanation_text]")
- rev_mind.special_role = "Head Revolutionary"
+ rev_mind.special_role = SPECIAL_ROLE_HEAD_REV
obj_count++
/////////////////////////////////////////////////////////////////////////////////
@@ -246,7 +246,7 @@
rev_mind.current.Stun(5)
to_chat(rev_mind.current, " You are now a revolutionary! Help your cause. Do not harm your fellow freedom fighters. You can identify your comrades by the red \"R\" icons, and your leaders by the blue \"R\" icons. Help them kill the heads to win the revolution!")
rev_mind.current.attack_log += "\[[time_stamp()]\] Has been converted to the revolution!"
- rev_mind.special_role = "Revolutionary"
+ rev_mind.special_role = SPECIAL_ROLE_REV
update_rev_icons_added(rev_mind)
if(jobban_isbanned(rev_mind.current, ROLE_REV))
replace_jobbaned_player(rev_mind.current, ROLE_REV)
@@ -314,7 +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)
- if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != 2) && rev_mind.current.client && T && (T.z == ZLEVEL_STATION))
+ if((rev_mind) && (rev_mind.current) && (rev_mind.current.stat != DEAD) && rev_mind.current.client && T && is_station_level(T.z))
if(ishuman(rev_mind.current))
return 0
return 1
@@ -334,7 +334,7 @@
/datum/game_mode/proc/auto_declare_completion_revolution()
var/list/targets = list()
- if(head_revolutionaries.len || istype(ticker.mode,/datum/game_mode/revolution))
+ if(head_revolutionaries.len || GAMEMODE_IS_REVOLUTION)
var/num_revs = 0
var/num_survivors = 0
for(var/mob/living/carbon/survivor in living_mob_list)
@@ -351,14 +351,14 @@
text += " "
to_chat(world, text)
- if(revolutionaries.len || istype(ticker.mode,/datum/game_mode/revolution))
+ if(revolutionaries.len || GAMEMODE_IS_REVOLUTION)
var/text = " The revolutionaries were:"
for(var/datum/mind/rev in revolutionaries)
text += printplayer(rev, 1)
text += " "
to_chat(world, text)
- if( head_revolutionaries.len || revolutionaries.len || istype(ticker.mode,/datum/game_mode/revolution) )
+ if( head_revolutionaries.len || revolutionaries.len || GAMEMODE_IS_REVOLUTION )
var/text = " The heads of staff were:"
var/list/heads = get_all_heads()
for(var/datum/mind/head in heads)
@@ -448,4 +448,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..c4957b3b937 100644
--- a/code/game/gamemodes/scoreboard.dm
+++ b/code/game/gamemodes/scoreboard.dm
@@ -21,12 +21,12 @@
// Who is alive/dead, who escaped
for(var/mob/living/silicon/ai/I in mob_list)
- if(I.stat == DEAD && (I.z in config.station_levels))
+ if(I.stat == DEAD && is_station_level(I.z))
score_deadaipenalty++
score_deadcrew++
for(var/mob/living/carbon/human/I in mob_list)
- if(I.stat == DEAD && (I.z in config.station_levels))
+ if(I.stat == DEAD && is_station_level(I.z))
score_deadcrew++
if(I && I.mind)
@@ -78,9 +78,8 @@
// Check station's power levels
- for(var/obj/machinery/power/apc/A in machines)
- if(!(A.z in config.station_levels)) continue
-
+ for(var/obj/machinery/power/apc/A in apcs)
+ if(!is_station_level(A.z)) continue
for(var/obj/item/weapon/stock_parts/cell/C in A.contents)
if(C.charge < 2300)
score_powerloss++ //200 charge leeway
@@ -88,7 +87,7 @@
// Check how much uncleaned mess is on the station
for(var/obj/effect/decal/cleanable/M in world)
- if(!(M.z in config.station_levels)) continue
+ if(!is_station_level(M.z)) continue
if(istype(M, /obj/effect/decal/cleanable/blood/gibs))
score_mess += 3
@@ -244,4 +243,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/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm
index 2cc099cc115..c9f29cefc2f 100644
--- a/code/game/gamemodes/shadowling/shadowling.dm
+++ b/code/game/gamemodes/shadowling/shadowling.dm
@@ -94,7 +94,7 @@ Made by Xhuis
shadows += shadow
possible_shadowlings -= shadow
modePlayer += shadow
- shadow.special_role = "Shadowling"
+ shadow.special_role = SPECIAL_ROLE_SHADOWLING
shadow.restricted_roles = restricted_jobs
shadowlings--
return 1
@@ -145,7 +145,7 @@ Made by Xhuis
return 0
if(!(new_thrall_mind in shadowling_thralls))
shadowling_thralls += new_thrall_mind
- new_thrall_mind.special_role = "shadowling thrall"
+ new_thrall_mind.special_role = SPECIAL_ROLE_SHADOWLING_THRALL
update_shadow_icons_added(new_thrall_mind)
new_thrall_mind.current.attack_log += "\[[time_stamp()]\] Became a thrall"
new_thrall_mind.current.add_language("Shadowling Hivemind")
diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm
index c4e88ea12b8..70471a91aff 100644
--- a/code/game/gamemodes/shadowling/shadowling_abilities.dm
+++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm
@@ -368,7 +368,7 @@
"False faces all dark not real not real not--")
target.setOxyLoss(0) //In case the shadowling was choking them out
ticker.mode.add_thrall(target.mind)
- target.mind.special_role = "shadowling thrall"
+ target.mind.special_role = SPECIAL_ROLE_SHADOWLING_THRALL
/obj/effect/proc_holder/spell/targeted/shadowling_regenarmor //Resets a shadowling's species to normal, removes genetic defects, and re-equips their armor
name = "Rapid Re-Hatch"
@@ -828,7 +828,7 @@
to_chat(usr, "You instantly rearrange [target]'s memories, hyptonitizing them into a thrall.")
to_chat(target, "An agonizing spike of pain drives into your mind, and--")
ticker.mode.add_thrall(target.mind)
- target.mind.special_role = "shadowling thrall"
+ target.mind.special_role = SPECIAL_ROLE_SHADOWLING_THRALL
target.add_language("Shadowling Hivemind")
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/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm
index 80ce1ef0a84..9474526655e 100644
--- a/code/game/gamemodes/traitor/traitor.dm
+++ b/code/game/gamemodes/traitor/traitor.dm
@@ -11,7 +11,7 @@
name = "traitor"
config_tag = "traitor"
restricted_jobs = list("Cyborg")//They are part of the AI if he is traitor so are they, they use to get double chances
- protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Internal Affairs Agent", "Captain", "Blueshield", "Nanotrasen Representative", "Security Pod Pilot", "Magistrate", "Internal Affairs Agent", "Brig Physician", "Nanotrasen Navy Officer", "Special Operations Officer")//AI", Currently out of the list as malf does not work for shit
+ protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Internal Affairs Agent", "Captain", "Blueshield", "Nanotrasen Representative", "Security Pod Pilot", "Magistrate", "Internal Affairs Agent", "Brig Physician", "Nanotrasen Navy Officer", "Special Operations Officer")
required_players = 0
required_enemies = 1
recommended_enemies = 4
@@ -48,7 +48,7 @@
break
var/datum/mind/traitor = pick(possible_traitors)
traitors += traitor
- traitor.special_role = "traitor"
+ traitor.special_role = SPECIAL_ROLE_TRAITOR
var/datum/mindslaves/slaved = new()
slaved.masters += traitor
traitor.som = slaved //we MIGT want to mindslave someone
@@ -219,6 +219,10 @@
killer.set_zeroth_law(law, law_borg)
to_chat(killer, "New law: 0. [law]")
give_codewords(killer)
+ killer.set_syndie_radio()
+ to_chat(killer, "Your radio has been upgraded! Use :t to speak on an encrypted channel with Syndicate Agents!")
+ killer.verbs += /mob/living/silicon/ai/proc/choose_modules
+ killer.malf_picker = new /datum/module_picker
/datum/game_mode/proc/auto_declare_completion_traitor()
diff --git a/code/game/gamemodes/vampire/traitor_vamp.dm b/code/game/gamemodes/vampire/traitor_vamp.dm
index 8bd37ce1867..068ad772b66 100644
--- a/code/game/gamemodes/vampire/traitor_vamp.dm
+++ b/code/game/gamemodes/vampire/traitor_vamp.dm
@@ -39,7 +39,7 @@
/datum/game_mode/traitor/vampire/post_setup()
for(var/datum/mind/vampire in vampires)
grant_vampire_powers(vampire.current)
- vampire.special_role = "Vampire"
+ vampire.special_role = SPECIAL_ROLE_VAMPIRE
forge_vampire_objectives(vampire)
greet_vampire(vampire)
..()
\ No newline at end of file
diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm
index 2d8018a3f8e..5a78826ab0c 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
@@ -58,7 +58,7 @@
var/datum/mindslaves/slaved = new()
slaved.masters += vampire
vampire.som = slaved //we MIGT want to mindslave someone
- vampire.special_role = "Vampire" // Needs to be done in pre-setup to prevent role bugs
+ vampire.special_role = SPECIAL_ROLE_VAMPIRE
return 1
else
return 0
@@ -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/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm
index f33bda2ed3a..b487b6518c0 100644
--- a/code/game/gamemodes/vampire/vampire_powers.dm
+++ b/code/game/gamemodes/vampire/vampire_powers.dm
@@ -337,7 +337,7 @@
ticker.mode.vampire_enthralled.Add(H.mind)
ticker.mode.vampire_enthralled[H.mind] = user.mind
- H.mind.special_role = "VampThrall"
+ H.mind.special_role = SPECIAL_ROLE_VAMPIRE_THRALL
to_chat(H, "You have been Enthralled by [user]. Follow their every command.")
to_chat(user, "You have successfully Enthralled [H]. If they refuse to do as you say just adminhelp.")
log_admin("[ckey(user.key)] has mind-slaved [ckey(H.key)].")
diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm
index 3f33d84b978..1865b6db5d2 100644
--- a/code/game/gamemodes/wizard/artefact.dm
+++ b/code/game/gamemodes/wizard/artefact.dm
@@ -100,7 +100,7 @@
new_objective.explanation_text = "Protect [H.real_name], the wizard."
M.mind.objectives += new_objective
ticker.mode.traitors += M.mind
- M.mind.special_role = "apprentice"
+ M.mind.special_role = SPECIAL_ROLE_WIZARD_APPRENTICE
ticker.mode.update_wiz_icons_added(M.mind)
M.faction = list("wizard")
else
@@ -259,7 +259,7 @@ var/global/list/multiverse = list()
..()
/obj/item/weapon/multisword/attack_self(mob/user)
- if(user.mind.special_role == "apprentice")
+ if(user.mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE)
to_chat(user, "You know better than to touch your teacher's stuff.")
return
if(cooldown < world.time)
@@ -346,7 +346,7 @@ var/global/list/multiverse = list()
M.mind.objectives += hijack_objective
hijack_objective.explanation_text = "Ensure only [usr.real_name] and their copies are on the shuttle!"
to_chat(M, "Objective #[1]: [hijack_objective.explanation_text]")
- M.mind.special_role = "multiverse traveller"
+ M.mind.special_role = SPECIAL_ROLE_MULTIVERSE
log_game("[M.key] was made a multiverse traveller with the objective to help [usr.real_name] hijack.")
else
var/datum/objective/protect/new_objective = new /datum/objective/protect
@@ -355,7 +355,7 @@ var/global/list/multiverse = list()
new_objective.explanation_text = "Protect [usr.real_name], your copy, and help them defend the innocent from the mobs of multiverse clones."
M.mind.objectives += new_objective
to_chat(M, "Objective #[1]: [new_objective.explanation_text]")
- M.mind.special_role = "multiverse traveller"
+ M.mind.special_role = SPECIAL_ROLE_MULTIVERSE
log_game("[M.key] was made a multiverse traveller with the objective to help [usr.real_name] protect the station.")
/obj/item/weapon/multisword/proc/equip_copy(var/mob/living/carbon/human/M)
@@ -409,6 +409,10 @@ var/global/list/multiverse = list()
if(belt)
M.equip_to_slot_or_del(new belt.type(M), slot_belt)
+ var/obj/pda = H.get_item_by_slot(slot_wear_pda)
+ if(pda)
+ M.equip_to_slot_or_del(new pda.type(M), slot_wear_pda)
+
var/obj/back = H.get_item_by_slot(slot_back)
if(back)
M.equip_to_slot_or_del(new back.type(M), slot_back)
@@ -762,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/wizard/raginmages.dm b/code/game/gamemodes/wizard/raginmages.dm
index 74500d32b03..7deaebe9266 100644
--- a/code/game/gamemodes/wizard/raginmages.dm
+++ b/code/game/gamemodes/wizard/raginmages.dm
@@ -19,7 +19,7 @@
/datum/game_mode/wizard/raginmages/greet_wizard(var/datum/mind/wizard, var/you_are=1)
if(you_are)
- to_chat(wizard.current, "\red You are the Space Wizard!")
+ to_chat(wizard.current, "You are the Space Wizard!")
to_chat(wizard.current, "The Space Wizards Federation has given you the following tasks:")
var/obj_count = 1
diff --git a/code/game/gamemodes/wizard/rightandwrong.dm b/code/game/gamemodes/wizard/rightandwrong.dm
index 37a2e641f31..3899d10d23c 100644
--- a/code/game/gamemodes/wizard/rightandwrong.dm
+++ b/code/game/gamemodes/wizard/rightandwrong.dm
@@ -12,7 +12,7 @@
if(H.stat == 2 || !(H.client))
continue
if(H.mind)
- if(H.mind.special_role == "Wizard" || H.mind.special_role == "apprentice")
+ if(H.mind.special_role == SPECIAL_ROLE_WIZARD || H.mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE)
continue
var/randomizeguns = pick(gunslist)
var/randomizemagic = pick(magiclist)
diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm
index 0dbcd3103fe..b2d610b3fc6 100644
--- a/code/game/gamemodes/wizard/spellbook.dm
+++ b/code/game/gamemodes/wizard/spellbook.dm
@@ -640,7 +640,7 @@
if(!ishuman(H))
return 1
- if(H.mind.special_role == "apprentice")
+ if(H.mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE)
temp = "If you got caught sneaking a peak from your teacher's spellbook, you'd likely be expelled from the Wizard Academy. Better not."
return 1
@@ -689,7 +689,7 @@
for(var/obj/effect/proc_holder/spell/knownspell in user.mind.spell_list)
if(knownspell.type == S.type)
if(user.mind)
- if(user.mind.special_role == "apprentice" || user.mind.special_role == "Wizard")
+ if(user.mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE || user.mind.special_role == SPECIAL_ROLE_WIZARD)
to_chat(user, "You're already far more versed in this spell than this flimsy how-to book can provide.")
else
to_chat(user, "You've already read this one.")
diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm
index 338d088d6f1..b98d97d790e 100644
--- a/code/game/gamemodes/wizard/wizard.dm
+++ b/code/game/gamemodes/wizard/wizard.dm
@@ -28,10 +28,10 @@
wizards += wizard
modePlayer += wizard
wizard.assigned_role = "MODE" //So they aren't chosen for other jobs.
- wizard.special_role = "Wizard"
+ wizard.special_role = SPECIAL_ROLE_WIZARD
wizard.original = wizard.current
if(wizardstart.len == 0)
- to_chat(wizard.current, "\red A starting location for you could not be found, please report this bug!")
+ to_chat(wizard.current, "A starting location for you could not be found, please report this bug!")
return 0
return 1
@@ -93,7 +93,7 @@
/datum/game_mode/proc/greet_wizard(var/datum/mind/wizard, var/you_are=1)
if(you_are)
- to_chat(wizard.current, "\red You are the Space Wizard!")
+ to_chat(wizard.current, "You are the Space Wizard!")
to_chat(wizard.current, "The Space Wizards Federation has given you the following tasks:")
var/obj_count = 1
diff --git a/code/game/gamemodes/xenos/xenos.dm b/code/game/gamemodes/xenos/xenos.dm
index 37e9b39ce11..c4659993e45 100644
--- a/code/game/gamemodes/xenos/xenos.dm
+++ b/code/game/gamemodes/xenos/xenos.dm
@@ -42,7 +42,7 @@
for(var/datum/mind/xeno in xenos)
xeno.assigned_role = "MODE"
- xeno.special_role = "Alien"
+ xeno.special_role = SPECIAL_ROLE_XENOMORPH
set_antag_hud(xeno, "hudalien")//like this is needed...
return 1
@@ -122,7 +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
- if(V && (V.z in config.station_levels))
+ if(V && is_station_level(V.z))
V.locked = 0
V.update_icon()
return ..()
@@ -142,7 +142,7 @@
var/list/livingplayers = list()
for(var/mob/M in player_list)
var/turf/T = get_turf(M)
- 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((M) && (M.stat != DEAD) && M.client && T && (is_station_level(T.z) || shuttle_master.emergency.mode >= SHUTTLE_ESCAPE && is_secure_level(T.z)))
if(ishuman(M))
livingplayers += 1
return livingplayers.len
@@ -182,4 +182,4 @@
to_chat(world, text)
..()
- return 1
\ No newline at end of file
+ return 1
diff --git a/code/game/jobs/job/central.dm b/code/game/jobs/job/central.dm
index 5bdb217ddc1..d5cba5be3d0 100644
--- a/code/game/jobs/job/central.dm
+++ b/code/game/jobs/job/central.dm
@@ -20,7 +20,7 @@
H.equip_or_collect(new /obj/item/clothing/gloves/color/white(H), slot_gloves)
H.equip_or_collect(new /obj/item/device/radio/headset/centcom(H), slot_l_ear)
H.equip_or_collect(new /obj/item/clothing/head/beret/centcom/officer(H), slot_head)
- H.equip_or_collect(new /obj/item/device/pda/centcom(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/centcom(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/glasses/hud/security/sunglasses(H), slot_glasses)
H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_in_backpack)
@@ -61,13 +61,13 @@
H.equip_or_collect(new /obj/item/clothing/gloves/combat(H), slot_gloves)
H.equip_or_collect(new /obj/item/device/radio/headset/centcom(H), slot_l_ear)
H.equip_or_collect(new /obj/item/clothing/head/beret/centcom/officer/navy(H), slot_head)
- H.equip_or_collect(new /obj/item/device/pda/centcom(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/centcom(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/glasses/hud/security/sunglasses(H), slot_glasses)
H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/suit/space/deathsquad/officer(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/implanter/dust(H), slot_in_backpack)
- H.equip_or_collect(new /obj/item/weapon/gun/energy/pulse/pistol/m1911(H), slot_in_backpack)
+ H.equip_or_collect(new /obj/item/weapon/gun/energy/pulse/pistol/m1911(H), slot_belt)
H.equip_or_collect(new /obj/item/weapon/implanter/death_alarm(H), slot_in_backpack)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
diff --git a/code/game/jobs/job/engineering.dm b/code/game/jobs/job/engineering.dm
index 4b924204aef..2217daf0c0e 100644
--- a/code/game/jobs/job/engineering.dm
+++ b/code/game/jobs/job/engineering.dm
@@ -27,16 +27,16 @@
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_eng(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/chief_engineer(H), slot_w_uniform)
- H.equip_or_collect(new /obj/item/device/pda/heads/ce(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/heads/ce(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/head/hardhat/white(H), slot_head)
+ H.equip_or_collect(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
H.equip_or_collect(new /obj/item/clothing/gloves/color/black/ce(H), slot_gloves)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
else
H.equip_or_collect(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/melee/classic_baton/telescopic(H.back), slot_in_backpack)
- H.equip_or_collect(new /obj/item/weapon/storage/belt/utility/full(H), slot_in_backpack)
return 1
@@ -50,8 +50,8 @@
supervisors = "the chief engineer"
selection_color = "#fff5cc"
idtype = /obj/item/weapon/card/id/engineering
- access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics)
- minimal_access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
+ access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics, access_mineral_storeroom)
+ minimal_access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_mineral_storeroom)
alt_titles = list("Maintenance Technician","Engine Technician","Electrician")
minimal_player_age = 7
@@ -64,14 +64,14 @@
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/engineer(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/workboots(H), slot_shoes)
+ H.equip_or_collect(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
H.equip_or_collect(new /obj/item/clothing/head/hardhat(H), slot_head)
H.equip_or_collect(new /obj/item/device/t_scanner(H), slot_r_store)
- H.equip_or_collect(new /obj/item/device/pda/engineering(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/engineering(H), slot_wear_pda)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
else
H.equip_or_collect(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
- H.equip_or_collect(new /obj/item/weapon/storage/belt/utility/full(H), slot_in_backpack)
return 1
@@ -85,8 +85,8 @@
supervisors = "the chief engineer"
selection_color = "#fff5cc"
idtype = /obj/item/weapon/card/id/engineering
- access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics)
- minimal_access = list(access_eva, access_atmospherics, access_maint_tunnels, access_external_airlocks, access_emergency_storage, access_construction)
+ access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics, access_mineral_storeroom)
+ minimal_access = list(access_eva, access_atmospherics, access_maint_tunnels, access_external_airlocks, access_emergency_storage, access_construction, access_mineral_storeroom)
alt_titles = list("Atmospheric Technician")
minimal_player_age = 7
@@ -99,12 +99,12 @@
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/atmospheric_technician(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/workboots(H), slot_shoes)
- H.equip_or_collect(new /obj/item/device/pda/atmos(H), slot_belt)
+ H.equip_or_collect(new /obj/item/weapon/storage/belt/utility/atmostech/(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/atmos(H), slot_wear_pda)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
else
H.equip_or_collect(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
- H.equip_or_collect(new /obj/item/weapon/storage/belt/utility/atmostech/(H), slot_in_backpack)
return 1
/datum/job/mechanic
@@ -129,12 +129,14 @@
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/mechanic(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/workboots(H), slot_shoes)
+ H.equip_or_collect(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
H.equip_or_collect(new /obj/item/clothing/head/hardhat(H), slot_head)
H.equip_or_collect(new /obj/item/device/t_scanner(H), slot_r_store)
- H.equip_or_collect(new /obj/item/device/pda/engineering(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/engineering(H), slot_wear_pda)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
+ H.equip_or_collect(new /obj/item/weapon/pod_paint_bucket(H),slot_l_hand)
else
H.equip_or_collect(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
- H.equip_or_collect(new /obj/item/weapon/storage/belt/utility/full(H), slot_in_backpack)
+ H.equip_or_collect(new /obj/item/weapon/pod_paint_bucket(H.back), slot_in_backpack)
return 1
diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm
index 59682dc6336..a064f0247f5 100644
--- a/code/game/jobs/job/medical.dm
+++ b/code/game/jobs/job/medical.dm
@@ -25,7 +25,7 @@
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/chief_medical_officer(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/brown(H), slot_shoes)
- H.equip_or_collect(new /obj/item/device/pda/heads/cmo(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/heads/cmo(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/suit/storage/labcoat/cmo(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
H.equip_or_collect(new /obj/item/device/flashlight/pen(H), slot_s_store)
@@ -89,7 +89,7 @@
H.equip_or_collect(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/clothing/shoes/white(H), slot_shoes)
- H.equip_or_collect(new /obj/item/device/pda/medical(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/medical(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
H.equip_or_collect(new /obj/item/device/flashlight/pen(H), slot_s_store)
if(H.backbag == 1)
@@ -127,7 +127,7 @@
H.equip_or_collect(new /obj/item/clothing/glasses/science(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chemist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/chemist(H), slot_belt)
+ H.equip_to_slot_or_del(new /obj/item/device/pda/chemist(H), slot_wear_pda)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/chemist(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
@@ -157,7 +157,7 @@
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_medsci(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/geneticist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/geneticist(H), slot_belt)
+ H.equip_to_slot_or_del(new /obj/item/device/pda/geneticist(H), slot_wear_pda)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/genetics(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
@@ -185,7 +185,7 @@
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_vir(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/virologist(H), slot_w_uniform)
- H.equip_or_collect(new /obj/item/device/pda/viro(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/viro(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/mask/surgical(H), slot_wear_mask)
H.equip_or_collect(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/suit/storage/labcoat/virologist(H), slot_wear_suit)
@@ -228,7 +228,7 @@
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt)
+ H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/device/flashlight/pen(H), slot_s_store)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
@@ -257,7 +257,7 @@
if(H.backbag == 3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_med(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/rank/medical/paramedic(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes)
- H.equip_or_collect(new /obj/item/device/pda/medical(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/medical(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/mask/cigarette(H), slot_wear_mask)
H.equip_or_collect(new /obj/item/clothing/head/soft/blue(H), slot_head)
H.equip_or_collect(new /obj/item/device/flashlight/pen(H), slot_s_store)
diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm
index b4cea5d2b21..eb23d9a2427 100644
--- a/code/game/jobs/job/science.dm
+++ b/code/game/jobs/job/science.dm
@@ -33,7 +33,7 @@
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/rd(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/research_director(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/device/pda/heads/rd(H), slot_belt)
+ H.equip_to_slot_or_del(new /obj/item/device/pda/heads/rd(H), slot_wear_pda)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
@@ -71,7 +71,7 @@
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
- H.equip_to_slot_or_del(new /obj/item/device/pda/toxins(H), slot_belt)
+ H.equip_to_slot_or_del(new /obj/item/device/pda/toxins(H), slot_wear_pda)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat/science(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
@@ -106,11 +106,11 @@
H.equip_or_collect(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
H.equip_or_collect(new /obj/item/clothing/under/rank/roboticist(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes)
- H.equip_or_collect(new /obj/item/device/pda/roboticist(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/roboticist(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
+ H.equip_or_collect(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
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/belt/utility/full(H), slot_in_backpack)
return 1
diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm
index 4fb9201fe07..b858225caf5 100644
--- a/code/game/jobs/job/security.dm
+++ b/code/game/jobs/job/security.dm
@@ -28,7 +28,7 @@
H.equip_or_collect(new /obj/item/clothing/under/rank/head_of_security(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/suit/armor/hos(H), slot_wear_suit)
- H.equip_or_collect(new /obj/item/device/pda/heads/hos(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/heads/hos(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/gloves/color/black/hos(H), slot_gloves)
H.equip_or_collect(new /obj/item/clothing/head/HoS(H), slot_head)
H.equip_or_collect(new /obj/item/clothing/glasses/hud/security/sunglasses(H), slot_glasses)
@@ -72,7 +72,7 @@
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/suit/armor/vest/warden(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/warden(H), slot_head)
- H.equip_or_collect(new /obj/item/device/pda/warden(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/warden(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/gloves/color/black(H), slot_gloves)
H.equip_or_collect(new /obj/item/clothing/glasses/hud/security/sunglasses(H), slot_glasses)
// H.equip_or_collect(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
@@ -115,7 +115,7 @@
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/det(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/brown(H), slot_shoes)
- H.equip_or_collect(new /obj/item/device/pda/detective(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/detective(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/toy/crayon/white(H), slot_l_store)
/* var/obj/item/clothing/mask/cigarette/CIG = new /obj/item/clothing/mask/cigarette(H)
CIG.light("")
@@ -173,7 +173,7 @@
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/suit/armor/vest/security(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/helmet(H), slot_head)
- H.equip_or_collect(new /obj/item/device/pda/security(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/security(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/gloves/color/black(H), slot_gloves)
H.equip_or_collect(new /obj/item/weapon/gun/energy/gun/advtaser(H), slot_s_store)
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
@@ -212,7 +212,7 @@
H.equip_or_collect(new /obj/item/clothing/suit/storage/fr_jacket(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/clothing/glasses/hud/health/health_advanced, slot_glasses)
H.equip_or_collect(new /obj/item/clothing/shoes/white(H), slot_shoes)
- H.equip_or_collect(new /obj/item/device/pda/medical(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/medical(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
H.equip_or_collect(new /obj/item/device/flashlight/pen(H), slot_s_store)
if(H.backbag == 1)
@@ -244,10 +244,10 @@
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_belt)
+ H.equip_or_collect(new /obj/item/device/pda/security(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/gloves/color/black(H), slot_gloves)
H.equip_or_collect(new /obj/item/weapon/gun/energy/gun/advtaser(H), slot_s_store)
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
diff --git a/code/game/jobs/job/supervisor.dm b/code/game/jobs/job/supervisor.dm
index b2a91688daa..22c114a0f2c 100644
--- a/code/game/jobs/job/supervisor.dm
+++ b/code/game/jobs/job/supervisor.dm
@@ -25,7 +25,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
U.accessories += M
M.on_attached(U)
H.equip_or_collect(U, slot_w_uniform)
- H.equip_or_collect(new /obj/item/device/pda/captain(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/captain(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/suit/armor/vest/capcarapace(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/head/caphat(H), slot_head)
@@ -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
@@ -84,7 +84,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
H.equip_or_collect(new /obj/item/clothing/under/rank/head_of_personnel(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/head/hopcap(H), slot_head)
H.equip_or_collect(new /obj/item/clothing/shoes/brown(H), slot_shoes)
- H.equip_or_collect(new /obj/item/device/pda/heads/hop(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/heads/hop(H), slot_wear_pda)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
else
@@ -130,7 +130,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
H.equip_or_collect(new /obj/item/clothing/under/rank/ntrep(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/suit/storage/ntrep(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/clothing/shoes/centcom(H), slot_shoes)
- H.equip_or_collect(new /obj/item/device/pda/heads/ntrep(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/heads/ntrep(H), slot_wear_pda)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
L.implanted = 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
@@ -170,7 +170,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
H.equip_or_collect(new /obj/item/clothing/glasses/hud/health/health_advanced, slot_glasses)
H.equip_or_collect(new /obj/item/clothing/under/rank/blueshield(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/suit/armor/vest/blueshield(H), slot_wear_suit)
- H.equip_or_collect(new /obj/item/device/pda/heads/blueshield(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/heads/blueshield(H), slot_wear_pda)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/deathimp(H), slot_r_hand)
@@ -216,7 +216,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
H.equip_or_collect(new /obj/item/clothing/shoes/centcom(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/head/powdered_wig(H), slot_head)
H.equip_or_collect(new /obj/item/clothing/glasses/hud/security/sunglasses(H), slot_glasses)
- H.equip_or_collect(new /obj/item/device/pda/heads/magistrate(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/heads/magistrate(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/melee/classic_baton/telescopic(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/device/flash(H), slot_r_store)
var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
@@ -251,7 +251,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
H.equip_or_collect(new /obj/item/clothing/suit/storage/internalaffairs(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/glasses/hud/security/sunglasses(H), slot_glasses)
- H.equip_or_collect(new /obj/item/device/pda/lawyer(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/lawyer(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/storage/briefcase(H), slot_l_hand)
H.equip_or_collect(new /obj/item/device/laser_pointer(H), slot_l_store)
H.equip_or_collect(new /obj/item/device/flash(H), slot_r_store)
diff --git a/code/game/jobs/job/support.dm b/code/game/jobs/job/support.dm
index cbd7e896fdd..982d2be445f 100644
--- a/code/game/jobs/job/support.dm
+++ b/code/game/jobs/job/support.dm
@@ -22,7 +22,8 @@
H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/suit/armor/vest(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/clothing/under/rank/bartender(H), slot_w_uniform)
- H.equip_or_collect(new /obj/item/device/pda/bar(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/bar(H), slot_wear_pda)
+ H.equip_or_collect(new /obj/item/weapon/storage/belt/bandolier/full(H), slot_in_backpack)
if(H.backbag == 1)
var/obj/item/weapon/storage/box/survival/Barpack = new /obj/item/weapon/storage/box/survival(H)
@@ -30,7 +31,6 @@
else
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_in_backpack)
H.equip_or_collect(new /obj/item/toy/russian_revolver(H.back), slot_in_backpack)
- H.equip_or_collect(new /obj/item/weapon/storage/belt/bandolier/full(H), slot_in_backpack)
H.dna.SetSEState(SOBERBLOCK,1)
H.mutations += SOBER
@@ -64,7 +64,7 @@
H.equip_or_collect(new /obj/item/clothing/suit/chef(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/head/chefhat(H), slot_head)
- H.equip_or_collect(new /obj/item/device/pda/chef(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/chef(H), slot_wear_pda)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
@@ -99,7 +99,7 @@
H.equip_or_collect(new /obj/item/clothing/gloves/botanic_leather(H), slot_gloves)
H.equip_or_collect(new /obj/item/clothing/suit/apron(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/device/analyzer/plant_analyzer(H), slot_s_store)
- H.equip_or_collect(new /obj/item/device/pda/botanist(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/botanist(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
@@ -128,7 +128,7 @@
H.equip_or_collect(new /obj/item/device/radio/headset/headset_cargo(H), slot_l_ear)
H.equip_or_collect(new /obj/item/clothing/under/rank/cargo(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/brown(H), slot_shoes)
- H.equip_or_collect(new /obj/item/device/pda/quartermaster(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/quartermaster(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
H.equip_or_collect(new /obj/item/weapon/clipboard(H), slot_l_hand)
if(H.backbag == 1)
@@ -161,7 +161,7 @@
H.equip_or_collect(new /obj/item/device/radio/headset/headset_cargo(H), slot_l_ear)
H.equip_or_collect(new /obj/item/clothing/under/rank/cargotech(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes)
- H.equip_or_collect(new /obj/item/device/pda/cargo(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/cargo(H), slot_wear_pda)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
@@ -196,7 +196,7 @@
H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/rank/miner(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/gloves/fingerless(H), slot_gloves)
- H.equip_or_collect(new /obj/item/device/pda/shaftminer(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/shaftminer(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/shoes/workboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/weapon/reagent_containers/food/pill/patch/styptic(H), slot_l_store)
H.equip_or_collect(new /obj/item/device/flashlight/seclite(H), slot_r_store)
@@ -234,7 +234,7 @@
H.equip_or_collect(new /obj/item/clothing/mask/gas/clown_hat(H), slot_wear_mask)
H.equip_or_collect(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_or_collect(new /obj/item/clothing/shoes/clown_shoes(H), slot_shoes)
- H.equip_or_collect(new /obj/item/device/pda/clown(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/clown(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/mask/gas/clown_hat(H), slot_wear_mask)
H.equip_or_collect(new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(H), slot_in_backpack)
H.equip_or_collect(new /obj/item/weapon/bikehorn(H), slot_in_backpack)
@@ -277,7 +277,7 @@
H.equip_or_collect(new /obj/item/clothing/mask/gas/mime(H), slot_wear_mask)
H.equip_or_collect(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes)
- H.equip_or_collect(new /obj/item/device/pda/mime(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/mime(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/gloves/color/white(H), slot_gloves)
H.equip_or_collect(new /obj/item/clothing/head/beret(H), slot_head)
H.equip_or_collect(new /obj/item/clothing/suit/suspenders(H), slot_wear_suit)
@@ -315,7 +315,7 @@
H.equip_or_collect(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_or_collect(new /obj/item/clothing/under/rank/janitor(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes)
- H.equip_or_collect(new /obj/item/device/pda/janitor(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/janitor(H), slot_wear_pda)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
@@ -339,21 +339,20 @@
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)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
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_belt)
+ 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/jobs/job/support_chaplain.dm b/code/game/jobs/job/support_chaplain.dm
index 2a1f7d5dae2..cec48fd834b 100644
--- a/code/game/jobs/job/support_chaplain.dm
+++ b/code/game/jobs/job/support_chaplain.dm
@@ -21,7 +21,7 @@
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_or_collect(new /obj/item/clothing/under/rank/chaplain(H), slot_w_uniform)
- H.equip_or_collect(new /obj/item/device/pda/chaplain(H), slot_belt)
+ H.equip_or_collect(new /obj/item/device/pda/chaplain(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm
index cf158648c9a..9073f56ceb3 100644
--- a/code/game/jobs/job_controller.dm
+++ b/code/game/jobs/job_controller.dm
@@ -213,16 +213,10 @@ var/global/datum/controller/occupations/job_master
proc/FillAIPosition()
var/ai_selected = 0
var/datum/job/job = GetJob("AI")
- if(!job) return 0
- if((job.title == "AI") && (config) && (!config.allow_ai)) return 0
-
- if(ticker.mode.name == "AI malfunction") // malf. AIs are pre-selected before jobs
- for(var/datum/mind/mAI in ticker.mode.malf_ai)
- AssignRole(mAI.current, "AI")
- ai_selected++
- if(ai_selected) return 1
+ if(!job)
+ return 0
+ if((job.title == "AI") && (config) && (!config.allow_ai))
return 0
-
for(var/i = job.total_positions, i > 0, i--)
for(var/level = 1 to 3)
var/list/candidates = list()
@@ -485,7 +479,7 @@ var/global/datum/controller/occupations/job_master
H.mind.store_memory(remembered_info)
spawn(0)
- to_chat(H, "\blueYour account number is: [M.account_number], your account pin is: [M.remote_access_pin]")
+ to_chat(H, "Your account number is: [M.account_number], your account pin is: [M.remote_access_pin]")
var/alt_title = null
if(H.mind)
@@ -594,7 +588,7 @@ var/global/datum/controller/occupations/job_master
H.equip_to_slot_or_del(C, slot_wear_id)
- H.equip_to_slot_or_del(new /obj/item/device/pda(H), slot_belt)
+ H.equip_to_slot_or_del(new /obj/item/device/pda(H), slot_wear_pda)
if(locate(/obj/item/device/pda,H))
var/obj/item/device/pda/pda = locate(/obj/item/device/pda,H)
pda.owner = H.real_name
diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm
index 345b65c1d6b..2a99414cb0b 100644
--- a/code/game/jobs/whitelist.dm
+++ b/code/game/jobs/whitelist.dm
@@ -21,7 +21,7 @@ var/list/whitelist = list()
if(guest_jobbans(rank))
if(!config.usewhitelist)
return 1
- if(check_rights(R_ADMIN, 0))
+ if(check_rights(R_ADMIN, 0, M))
return 1
if(!dbcon.IsConnected())
to_chat(usr, "\red Unable to connect to whitelist database. Please try again later. ")
diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm
index 63a8aca926b..e901a245bea 100644
--- a/code/game/machinery/OpTable.dm
+++ b/code/game/machinery/OpTable.dm
@@ -100,6 +100,7 @@
C.client.perspective = EYE_PERSPECTIVE
C.client.eye = src
C.resting = 1
+ C.update_canmove()
C.loc = src.loc
if(user.pulling == C)
user.stop_pulling()
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..5515eb7ab3a 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"),\
diff --git a/code/game/machinery/atmoalter/area_atmos_computer.dm b/code/game/machinery/atmoalter/area_atmos_computer.dm
index 89cf4cd3610..36b680f1ebc 100644
--- a/code/game/machinery/atmoalter/area_atmos_computer.dm
+++ b/code/game/machinery/atmoalter/area_atmos_computer.dm
@@ -176,4 +176,4 @@
if(!found)
status = "ERROR: No scrubber found!"
- src.updateUsrDialog()
\ No newline at end of file
+ src.updateUsrDialog()
diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm
index 560ad7642b7..2b575f15b65 100644
--- a/code/game/machinery/atmoalter/meter.dm
+++ b/code/game/machinery/atmoalter/meter.dm
@@ -93,10 +93,10 @@
var/t = "A gas flow meter. "
if(get_dist(user, src) > 3 && !(istype(user, /mob/living/silicon/ai) || istype(user, /mob/dead)))
- t += "\blue You are too far away to read it."
+ t += "You are too far away to read it."
else if(stat & (NOPOWER|BROKEN))
- t += "\red The display is off."
+ t += "The display is off."
else if(target)
var/datum/gas_mixture/environment = target.return_air()
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/camera.dm b/code/game/machinery/camera/camera.dm
index bcf8ee75b00..0935f8443f6 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -43,7 +43,7 @@
/obj/machinery/camera/initialize()
..()
- if(z == ZLEVEL_STATION && prob(3) && !start_active)
+ if(is_station_level(z) && prob(3) && !start_active)
toggle_cam()
/obj/machinery/camera/Destroy()
diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm
index 5a36a900e61..d37aa23cf64 100644
--- a/code/game/machinery/camera/presets.dm
+++ b/code/game/machinery/camera/presets.dm
@@ -81,7 +81,7 @@
assembly.upgrades.Add(new /obj/item/device/assembly/prox_sensor(assembly))
setPowerUsage()
// Add it to machines that process
- machines |= src
+ machine_processing |= src
/obj/machinery/camera/proc/setPowerUsage()
var/mult = 1
diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm
index aa32db20688..909d53be265 100644
--- a/code/game/machinery/camera/tracking.dm
+++ b/code/game/machinery/camera/tracking.dm
@@ -1,9 +1,7 @@
/mob/living/silicon/ai/proc/InvalidTurf(turf/T as turf)
if(!T)
return 1
- if((T.z in config.admin_levels))
- return 1
- if(T.z > MAX_Z)
+ if(!is_level_reachable(T.z))
return 1
return 0
diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm
index 343f421b4e8..097efa2c75c 100644
--- a/code/game/machinery/computer/aifixer.dm
+++ b/code/game/machinery/computer/aifixer.dm
@@ -12,11 +12,12 @@
/obj/machinery/computer/aifixer/attackby(I as obj, user as mob, params)
if(occupant && istype(I, /obj/item/weapon/screwdriver))
- if(stat & (NOPOWER|BROKEN))
+ if(stat & BROKEN)
+ ..()
+ if(stat & NOPOWER)
to_chat(user, "The screws on [name]'s screen won't budge.")
else
- to_chat(user, "The screws on [name]'s screen won't budge and it emits a warning beep.")
- return
+ to_chat(user, "The screws on [name]'s screen won't budge and it emits a warning beep!.")
else
..()
@@ -135,3 +136,18 @@
to_chat(user, "ERROR: Reconstruction in progress.")
else if(!occupant)
to_chat(user, "ERROR: Unable to locate artificial intelligence.")
+
+/obj/machinery/computer/aifixer/Destroy()
+ if(occupant)
+ occupant.ghostize()
+ qdel(occupant)
+ occupant = null
+ return ..()
+
+/obj/machinery/computer/aifixer/emp_act()
+ if(occupant)
+ occupant.ghostize()
+ qdel(occupant)
+ occupant = null
+ else
+ ..()
diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm
index 81b2c6b86a4..fd5dc873739 100644
--- a/code/game/machinery/computer/camera.dm
+++ b/code/game/machinery/computer/camera.dm
@@ -75,7 +75,7 @@
var/list/cameras = list()
for(var/obj/machinery/camera/C in cameranet.cameras)
- if((z > MAX_Z || C.z > MAX_Z) && (C.z != z)) //can only recieve away mission cameras on away missions
+ if((is_away_level(src.z) || is_away_level(C.z)) && !atoms_share_level(C, src)) //can only recieve away mission cameras on away missions
continue
if(!can_access_camera(C))
continue
@@ -313,4 +313,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..7c77ca6099f 100644
--- a/code/game/machinery/computer/communications.dm
+++ b/code/game/machinery/computer/communications.dm
@@ -54,7 +54,7 @@
if(..(href, href_list))
return 1
- if((!(src.z in config.station_levels) && !(src.z in config.admin_levels)))
+ if(!is_secure_level(src.z))
to_chat(usr, "Unable to establish a connection: You're too far away from the station!")
return 1
@@ -303,7 +303,7 @@
if(stat & (NOPOWER|BROKEN))
return
- if(!(src.z in list(ZLEVEL_STATION, ZLEVEL_CENTCOMM)))
+ if(!is_secure_level(src.z))
to_chat(user, "Unable to establish a connection: You're too far away from the station!")
return
@@ -514,7 +514,7 @@
if(!shuttlecaller.stat && shuttlecaller.client && istype(shuttlecaller.loc,/turf))
return ..()
- if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || sent_strike_team)
+ if(GAMEMODE_IS_REVOLUTION || sent_strike_team)
return ..()
shuttle_master.emergency.request(null, 0.3, null, "All communication consoles, boards, and AI's have been destroyed.")
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..b20821d24c2 100644
--- a/code/game/machinery/computer/honkputer.dm
+++ b/code/game/machinery/computer/honkputer.dm
@@ -20,7 +20,7 @@
/obj/machinery/computer/HONKputer/Topic(href, href_list)
if(..())
return 1
- if(!(src.z in config.station_levels))
+ if(is_away_level(src.z))
to_chat(usr, "Unable to establish a connection: You're too far away from the station!")
return
usr.set_machine(src)
@@ -68,7 +68,7 @@
/obj/machinery/computer/HONKputer/attack_hand(var/mob/user as mob)
if(..())
return
- if(src.z > 6)
+ if(is_away_level(src.z))
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..125a5fc06ad 100644
--- a/code/game/machinery/computer/law.dm
+++ b/code/game/machinery/computer/law.dm
@@ -29,7 +29,7 @@
attackby(obj/item/weapon/O as obj, mob/user as mob, params)
- if(user.z > 6)
+ if(is_away_level(user.z))
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..2619e25e4b8 100644
--- a/code/game/machinery/computer/pod.dm
+++ b/code/game/machinery/computer/pod.dm
@@ -19,8 +19,6 @@
..()
spawn(5)
driver_sync()
- machines += src
- return
/obj/machinery/computer/pod/proc/driver_sync()
@@ -43,7 +41,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 +67,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 +88,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 +102,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()
@@ -208,7 +206,9 @@
id_tags -= ident_tag
if(href_list["dstele"])
var/choices = list(0)
- choices += accessable_z_levels
+ var/list/reachable_levels = levels_by_trait(REACHABLE)
+ for(var/datum/space_level/S in reachable_levels)
+ choices += S.zpos
var/obj/machinery/computer/pod/deathsquad/D = src
var/input = input("Enter the destination Z-Level. The mechs will arrive from the East. Leave 0 if you don't want to set a specific ZLevel", "Mass Driver Controls", 0) in choices
D.teleporter_dest = input
@@ -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()
@@ -362,4 +362,4 @@
AM.dir = 8
var/atom/target = get_edge_target_turf(AM, AM.dir)
AM.throw_at(target, 50, 1)
- return
\ No newline at end of file
+ return
diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm
index ebc0db47c32..fa1ba551728 100644
--- a/code/game/machinery/computer/prisoner.dm
+++ b/code/game/machinery/computer/prisoner.dm
@@ -65,7 +65,7 @@
health_display = "DEAD"
else if(total_loss)
health_display = "HURT ([total_loss])"
- if((M.z in config.station_levels) && !istype(M.loc, /turf/space))
+ if(is_station_level(M.z) && !istype(M.loc, /turf/space))
loc_display = "[get_area(M)]"
dat += "ID: [T.id] Subject: [M] Location: [loc_display] Health: [health_display] "
dat += "(Message Holder) | "
diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm
index 7ab400823b1..c03ce8ee440 100644
--- a/code/game/machinery/computer/security.dm
+++ b/code/game/machinery/computer/security.dm
@@ -41,11 +41,11 @@
/obj/machinery/computer/secure_data/attack_hand(mob/user as mob)
if(..())
return
- if(src.z > 6)
+ if(is_away_level(src.z))
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 +89,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..81aa33109f0 100644
--- a/code/game/machinery/computer/skills.dm
+++ b/code/game/machinery/computer/skills.dm
@@ -40,7 +40,8 @@
/obj/machinery/computer/skills/attack_hand(mob/user as mob)
if(..())
return
- if(src.z > 6)
+
+ if(is_away_level(src.z))
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/cryo.dm b/code/game/machinery/cryo.dm
index d069e2d1ae6..94bc3f5b90b 100644
--- a/code/game/machinery/cryo.dm
+++ b/code/game/machinery/cryo.dm
@@ -98,13 +98,13 @@
if(!istype(user.loc, /turf) || !istype(O.loc, /turf)) // are you in a container/closet/pod/etc?
return
if(occupant)
- to_chat(user, "\blue The cryo cell is already occupied!")
+ to_chat(user, "The cryo cell is already occupied!")
return
var/mob/living/L = O
if(!istype(L) || L.buckled)
return
if(L.abiotic())
- to_chat(user, "\red Subject cannot have abiotic items on.")
+ to_chat(user, "Subject cannot have abiotic items on.")
return
for(var/mob/living/carbon/slime/M in range(1,L))
if(M.Victim == L)
@@ -162,7 +162,7 @@
return
if(panel_open)
- to_chat(usr, "\blue Close the maintenance panel first.")
+ to_chat(usr, "Close the maintenance panel first.")
return
ui_interact(user)
@@ -298,7 +298,7 @@
if(istype(G, /obj/item/weapon/grab))
if(panel_open)
- to_chat(user, "\blue Close the maintenance panel first.")
+ to_chat(user, "Close the maintenance panel first.")
return
if(!ismob(G:affecting))
return
@@ -428,10 +428,10 @@
/obj/machinery/atmospherics/unary/cryo_cell/proc/put_mob(mob/living/carbon/M as mob)
if(!istype(M))
- to_chat(usr, "\red The cryo cell cannot handle such a lifeform!")
+ to_chat(usr, "The cryo cell cannot handle such a lifeform!")
return
if(occupant)
- to_chat(usr, "\red The cryo cell is already occupied!")
+ to_chat(usr, "The cryo cell is already occupied!")
return
if(M.abiotic())
to_chat(usr, "\red Subject may not have abiotic items on.")
@@ -445,7 +445,7 @@
M.stop_pulling()
M.forceMove(src)
if(M.health > -100 && (M.health < 0 || M.sleeping))
- to_chat(M, "\blue You feel a cold liquid surround you. Your skin starts to freeze up.")
+ to_chat(M, "You feel a cold liquid surround you. Your skin starts to freeze up.")
occupant = M
// M.metabslow = 1
add_fingerprint(usr)
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index 257c583814b..33d07914529 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)
@@ -483,7 +493,7 @@
if(!istype(user.loc, /turf) || !istype(O.loc, /turf)) // are you in a container/closet/pod/etc?
return
if(occupant)
- to_chat(user, "\blue The cryo pod is already occupied!")
+ to_chat(user, "The cryo pod is already occupied!")
return
@@ -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/deployable.dm b/code/game/machinery/deployable.dm
index 507527fd6da..b54a2e88a34 100644
--- a/code/game/machinery/deployable.dm
+++ b/code/game/machinery/deployable.dm
@@ -111,7 +111,7 @@ for reference:
/obj/structure/barricade/blob_act()
src.health -= 25
if(src.health <= 0)
- visible_message("\red The blob eats through \the [src]!")
+ visible_message("The blob eats through \the [src]!")
qdel(src)
return
@@ -267,7 +267,7 @@ for reference:
proc/explode()
- visible_message("\red [src] blows apart!")
+ visible_message("[src] blows apart!")
var/turf/Tsec = get_turf(src)
/* var/obj/item/stack/rods/ =*/
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 641d847e36b..8e17f83d3e5 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -366,7 +366,7 @@ About the new airlock wires panel:
else /*if(src.justzap)*/
return
else if(user.hallucination > 50 && prob(10) && src.operating == 0)
- to_chat(user, "\red You feel a powerful shock course through your body!")
+ to_chat(user, "You feel a powerful shock course through your body!")
user.adjustStaminaLoss(50)
user.AdjustStunned(5)
return
@@ -981,7 +981,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
@@ -1070,4 +1070,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..4904c8795fa 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
@@ -37,8 +36,8 @@ obj/machinery/door/airlock/proc/execute_current_command()
if(command_completed(cur_command))
cur_command = null
else
- if(!(src in machines))
- addAtProcessing()
+ if(!(src in machine_processing))
+ machine_processing += src
obj/machinery/door/airlock/proc/do_command(var/command)
switch(command)
diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm
index b0be899942d..3d8e7d3e15b 100644
--- a/code/game/machinery/doors/brigdoors.dm
+++ b/code/game/machinery/doors/brigdoors.dm
@@ -98,8 +98,8 @@
// Set releasetime
releasetime = world.timeofday + timetoset
- if(!(src in machines))
- addAtProcessing()
+ if(!(src in machine_processing))
+ machine_processing += src
for(var/obj/machinery/door/window/brigdoor/door in targets)
if(door.density)
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..3dffa7dda24 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,7 +295,7 @@ FIRE ALARM
pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
- if(z == ZLEVEL_STATION || ZLEVEL_ASTEROID == 5)
+ if(is_station_contact(src.z))
if(security_level)
src.overlays += image('icons/obj/monitors.dmi', "overlay_[get_security_level()]")
else
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/iv_drip.dm b/code/game/machinery/iv_drip.dm
index 9c6b0fc548d..b886bc3ff71 100644
--- a/code/game/machinery/iv_drip.dm
+++ b/code/game/machinery/iv_drip.dm
@@ -1,101 +1,127 @@
/obj/machinery/iv_drip
name = "\improper IV drip"
icon = 'icons/obj/iv_drip.dmi'
+ icon_state = "iv_drip"
anchored = 0
density = 1
+ var/mob/living/carbon/human/attached = null
+ var/mode = 1 // 1 is injecting, 0 is taking blood.
+ var/obj/item/weapon/reagent_containers/beaker = null
+/obj/machinery/iv_drip/New()
+ ..()
+ update_icon()
-/obj/machinery/iv_drip/var/mob/living/carbon/human/attached = null
-/obj/machinery/iv_drip/var/mode = 1 // 1 is injecting, 0 is taking blood.
-/obj/machinery/iv_drip/var/obj/item/weapon/reagent_containers/beaker = null
+/obj/machinery/iv_drip/Destroy()
+ attached = null
+ if(beaker)
+ qdel(beaker)
+ beaker = null
+ return ..()
/obj/machinery/iv_drip/update_icon()
- if(src.attached)
- icon_state = "hooked"
+ if(attached)
+ if(mode)
+ icon_state = "injecting"
+ else
+ icon_state = "donating"
else
- icon_state = ""
+ if(mode)
+ icon_state = "injectidle"
+ else
+ icon_state = "donateidle"
- overlays = null
+ overlays.Cut()
if(beaker)
- var/datum/reagents/reagents = beaker.reagents
- if(reagents.total_volume)
+ if(attached)
+ overlays += "beakeractive"
+ else
+ overlays += "beakeridle"
+ if(beaker.reagents.total_volume)
var/image/filling = image('icons/obj/iv_drip.dmi', src, "reagent")
- var/percent = round((reagents.total_volume / beaker.volume) * 100)
+ var/percent = round((beaker.reagents.total_volume / beaker.volume) * 100)
switch(percent)
- if(0 to 9) filling.icon_state = "reagent0"
- if(10 to 24) filling.icon_state = "reagent10"
- if(25 to 49) filling.icon_state = "reagent25"
- if(50 to 74) filling.icon_state = "reagent50"
- if(75 to 79) filling.icon_state = "reagent75"
- if(80 to 90) filling.icon_state = "reagent80"
- if(91 to INFINITY) filling.icon_state = "reagent100"
+ if(0 to 9)
+ filling.icon_state = "reagent0"
+ if(10 to 24)
+ filling.icon_state = "reagent10"
+ if(25 to 49)
+ filling.icon_state = "reagent25"
+ if(50 to 74)
+ filling.icon_state = "reagent50"
+ if(75 to 79)
+ filling.icon_state = "reagent75"
+ if(80 to 90)
+ filling.icon_state = "reagent80"
+ if(91 to INFINITY)
+ filling.icon_state = "reagent100"
- filling.icon += mix_color_from_reagents(reagents.reagent_list)
+ filling.icon += mix_color_from_reagents(beaker.reagents.reagent_list)
overlays += filling
-/obj/machinery/iv_drip/MouseDrop(over_object, src_location, over_location)
- ..()
-
- if(!ishuman(usr) && !isrobot(usr))
- return
-
- var/turf/T = get_turf(src)
- if(!usr in range(1, T))
+/obj/machinery/iv_drip/MouseDrop(mob/living/target)
+ if(!ishuman(usr))
return
if(attached)
- visible_message("[src.attached] is detached from \the [src]")
- src.attached = null
- src.update_icon()
+ visible_message("[attached] is detached from [src].")
+ attached = null
+ update_icon()
return
- if(in_range(src, usr) && ishuman(over_object) && get_dist(over_object, src) <= 1)
- visible_message("[usr] attaches \the [src] to \the [over_object].")
- src.attached = over_object
- src.update_icon()
+ if(!target.dna)
+ to_chat(usr, "The drip beeps: Warning, incompatible creature!")
+ return
-
-/obj/machinery/iv_drip/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
- if(istype(W, /obj/item/weapon/reagent_containers))
- if(!isnull(src.beaker))
- to_chat(user, "There is already a reagent container loaded!")
- return
-
- if(user.drop_item())
- W.forceMove(src)
- src.beaker = W
- to_chat(user, "You attach \the [W] to \the [src].")
- src.update_icon()
- return
+ if(Adjacent(target) && usr.Adjacent(target))
+ if(beaker)
+ usr.visible_message("[usr] attaches [src] to [target].", "You attach [src] to [target].")
+ attached = target
+ machine_processing += src
+ update_icon()
else
- to_chat(user, "\The [W] is stuck to you!")
+ to_chat(usr, "There's nothing attached to the IV drip!")
+
+/obj/machinery/iv_drip/attackby(obj/item/weapon/W, mob/user, params)
+ if(istype(W, /obj/item/weapon/reagent_containers))
+ if(beaker)
+ to_chat(user, "There is already a reagent container loaded!")
+ return
+ if(!user.drop_item())
+ return
+
+ W.forceMove(src)
+ beaker = W
+ to_chat(user, "You attach [W] to [src].")
+ update_icon()
else
return ..()
/obj/machinery/iv_drip/process()
- //set background = 1
+ if(!attached)
+ return PROCESS_KILL
- if(src.attached)
+ if(get_dist(src, attached) > 1 && isturf(attached.loc))
+ to_chat(attached, "The IV drip needle is ripped out of you!")
+ attached.apply_damage(3, BRUTE, pick("r_arm", "l_arm"))
+ attached = null
+ update_icon()
+ return PROCESS_KILL
- if(!(get_dist(src, src.attached) <= 1 && isturf(src.attached.loc)))
- visible_message("The needle is ripped out of [src.attached], doesn't that hurt?")
- src.attached:apply_damage(3, BRUTE, pick("r_arm", "l_arm"))
- src.attached = null
- src.update_icon()
- return
-
- if(src.attached && src.beaker)
+ if(beaker)
// Give blood
if(mode)
- if(src.beaker.volume > 0)
- var/transfer_amount = REAGENTS_METABOLISM
- if(istype(src.beaker, /obj/item/weapon/reagent_containers/blood))
+ if(beaker.volume > 0)
+ var/transfer_amount = 5
+ if(istype(beaker, /obj/item/weapon/reagent_containers/blood))
// speed up transfer on blood packs
- transfer_amount = 4
- src.beaker.reagents.trans_to(src.attached, transfer_amount)
+ transfer_amount = 10
+ var/fraction = min(transfer_amount/beaker.volume, 1) //the fraction that is transfered of the total volume
+ beaker.reagents.reaction(attached, INGEST, fraction) //make reagents reacts, but don't spam messages
+ beaker.reagents.trans_to(attached, transfer_amount)
update_icon()
// Take blood
@@ -104,71 +130,111 @@
amount = min(amount, 4)
// If the beaker is full, ping
if(amount == 0)
- if(prob(5)) visible_message("\The [src] pings.")
+ if(prob(5))
+ visible_message("[src] pings.")
return
var/mob/living/carbon/human/T = attached
- if(!istype(T)) return
+ if(!ishuman(T))
+ return
+
if(!T.dna)
return
+
if(NOCLONE in T.mutations)
return
- if(T.species && T.species.flags & NO_BLOOD)
+ if(T.species.flags & NO_BLOOD)
return
- // If the human is losing too much blood, beep.
- if(T.vessel.get_reagent_amount("blood") < BLOOD_VOLUME_SAFE) if(prob(5))
- visible_message("\The [src] beeps loudly.")
-
- var/datum/reagent/B = T.take_blood(beaker,amount)
-
- if(B)
- beaker.reagents.reagent_list |= B
- beaker.reagents.update_total()
- beaker.on_reagent_change()
- beaker.reagents.handle_reactions()
+ if(T.species.exotic_blood)
+ T.vessel.trans_to(beaker, amount)
update_icon()
+ else
+ var/datum/reagent/B = T.take_blood(beaker, amount)
-/obj/machinery/iv_drip/attack_hand(mob/living/carbon/user)
- if(!istype(user))
+ if(B)
+ beaker.reagents.reagent_list |= B
+ beaker.reagents.update_total()
+ beaker.on_reagent_change()
+ beaker.reagents.handle_reactions()
+ update_icon()
+
+ // If attached is losing too much blood, beep.
+ var/blood_type = attached.get_blood_name()
+ if(T.vessel.get_reagent_amount(blood_type) < BLOOD_VOLUME_SAFE && prob(5))
+ visible_message("[src] beeps loudly.")
+ playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
+
+/obj/machinery/iv_drip/attack_hand(mob/user)
+ if(!ishuman(user))
return
- if(src.beaker)
- src.beaker.loc = get_turf(src)
- src.beaker = null
+ if(attached)
+ visible_message("[attached] is detached from [src]")
+ attached = null
update_icon()
+ return
+ else if(beaker)
+ eject_beaker(user)
else
- return ..()
+ toggle_mode()
+/obj/machinery/iv_drip/AltClick(mob/user)
+ ..()
+ if(user.incapacitated())
+ to_chat(user, "You can't do that right now!")
+ return
+ if(!Adjacent(user))
+ return
+ toggle_mode()
-/obj/machinery/iv_drip/verb/toggle_mode()
- set name = "Toggle Mode"
+/obj/machinery/iv_drip/verb/eject_beaker(mob/user)
set category = "Object"
+ set name = "Remove IV Container"
set src in view(1)
- if(!istype(usr, /mob/living))
- to_chat(usr, "\red You can't do that.")
+ if(!iscarbon(usr))
+ to_chat(usr, "You can't do that!")
return
- if(usr.stat)
+ if(usr.incapacitated())
+ return
+
+ if(beaker)
+ beaker.forceMove(get_turf(src))
+ beaker = null
+ update_icon()
+
+/obj/machinery/iv_drip/verb/toggle_mode()
+ set category = "Object"
+ set name = "Toggle Mode"
+ set src in view(1)
+
+ if(!iscarbon(usr))
+ to_chat(usr, "You can't do that!")
+ return
+
+ if(usr.incapacitated())
return
mode = !mode
to_chat(usr, "The IV drip is now [mode ? "injecting" : "taking blood"].")
+ update_icon()
/obj/machinery/iv_drip/examine(mob/user)
..(user)
- if(!(user in view(2)) && usr != src.loc) return
+ if(!(user in view(2)) && user != loc)
+ return
- to_chat(usr, "The IV drip is [mode ? "injecting" : "taking blood"].")
+ to_chat(user, "The IV drip is [mode ? "injecting" : "taking blood"].")
if(beaker)
if(beaker.reagents && beaker.reagents.reagent_list.len)
- to_chat(user, "\blue Attached is \a [beaker] with [beaker.reagents.total_volume] units of liquid.")
+ to_chat(user, "Attached is \a [beaker] with [beaker.reagents.total_volume] units of liquid.")
else
- to_chat(user, "\blue Attached is an empty [beaker].")
+ to_chat(user, "Attached is an empty [beaker].")
else
- to_chat(user, "\blue No chemicals are attached.")
+ to_chat(user, "No chemicals are attached.")
- to_chat(user, "\blue [attached ? attached : "No one"] is attached.")
+ to_chat(user, "[attached ? attached : "No one"] is attached.")
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index ae299d78a90..518304fda5f 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -116,6 +116,8 @@ 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"
+ var/speed_process = 0 // Process as fast as possible?
/obj/machinery/initialize()
addAtProcessing()
@@ -127,17 +129,17 @@ Class Procs:
myArea = get_area_master(src)
machines += src
-
-/obj/machinery/proc/removeAtProcessing()
- if(myArea)
- myArea = null
-
- machines -= src
+ if(!speed_process)
+ machine_processing += src
+ else
+ fast_processing += src
/obj/machinery/Destroy()
- if(src in machines)
- removeAtProcessing()
-
+ if(myArea)
+ myArea = null
+ fast_processing -= src
+ machine_processing -= src
+ machines -= src
return ..()
/obj/machinery/proc/locate_machinery()
@@ -361,10 +363,9 @@ Class Procs:
return ..()
-/obj/machinery/CheckParts()
+/obj/machinery/CheckParts(list/parts_list)
..()
RefreshParts()
- return
/obj/machinery/proc/RefreshParts() //Placeholder proc for machines that are built using frames.
return
@@ -419,17 +420,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)
@@ -545,6 +535,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()
@@ -557,6 +549,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/recycler.dm b/code/game/machinery/recycler.dm
index c7ddfc84c38..4cdc3494927 100644
--- a/code/game/machinery/recycler.dm
+++ b/code/game/machinery/recycler.dm
@@ -2,22 +2,23 @@ var/const/SAFETY_COOLDOWN = 100
/obj/machinery/recycler
name = "recycler"
- desc = "A large crushing machine which is used to recycle small items ineffeciently; there are lights on the side of it."
+ desc = "A large crushing machine used to recycle small items inefficiently. There are lights on the side."
icon = 'icons/obj/recycling.dmi'
icon_state = "grinder-o0"
layer = MOB_LAYER+1 // Overhead
anchored = 1
density = 1
- var/safety_mode = 0 // Temporality stops the machine if it detects a mob
- var/grinding = 0
+ var/safety_mode = 0 // Temporarily stops machine if it detects a mob
var/icon_name = "grinder-o"
var/blood = 0
var/eat_dir = WEST
var/amount_produced = 1
var/datum/material_container/materials
+ var/crush_damage = 1000
+ var/eat_victim_items = 1
+ var/item_recycle_sound = 'sound/machines/recycler.ogg'
/obj/machinery/recycler/New()
- // On us
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/recycler(null)
@@ -56,8 +57,6 @@ var/const/SAFETY_COOLDOWN = 100
/obj/machinery/recycler/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "grinder-oOpen", "grinder-o0", I))
- if(!panel_open)
- update_icon()
return
if(exchange_parts(user, I))
@@ -69,7 +68,6 @@ var/const/SAFETY_COOLDOWN = 100
default_deconstruction_crowbar(I)
..()
add_fingerprint(user)
- return
/obj/machinery/recycler/emag_act(mob/user)
if(!emagged)
@@ -77,8 +75,8 @@ var/const/SAFETY_COOLDOWN = 100
if(safety_mode)
safety_mode = 0
update_icon()
- playsound(src.loc, "sparks", 75, 1, -1)
- to_chat(user, "You use the cryptographic sequencer on the [src.name].")
+ playsound(loc, "sparks", 75, 1, -1)
+ to_chat(user, "You use the cryptographic sequencer on the [name].")
/obj/machinery/recycler/update_icon()
..()
@@ -88,48 +86,51 @@ var/const/SAFETY_COOLDOWN = 100
icon_state = icon_name + "[is_powered]" + "[(blood ? "bld" : "")]" // add the blood tag at the end
// This is purely for admin possession !FUN!.
-/obj/machinery/recycler/Bump(var/atom/movable/AM)
+/obj/machinery/recycler/Bump(atom/movable/AM)
..()
if(AM)
Bumped(AM)
-/obj/machinery/recycler/Bumped(var/atom/movable/AM)
+/obj/machinery/recycler/Bumped(atom/movable/AM)
if(stat & (BROKEN|NOPOWER))
return
- if(safety_mode)
- return
if(!anchored)
return
- // If we're not already grinding something.
- if(!grinding)
- grinding = 1
- spawn(1)
- grinding = 0
- else
+ if(safety_mode)
return
var/move_dir = get_dir(loc, AM.loc)
if(move_dir == eat_dir)
+ eat(AM)
+
+/obj/machinery/recycler/proc/eat(atom/AM0, sound = 1)
+ var/list/to_eat = list(AM0)
+ if(istype(AM0, /obj/item))
+ to_eat += AM0.GetAllContents()
+ var/items_recycled = 0
+
+ for(var/i in to_eat)
+ var/atom/movable/AM = i
if(isliving(AM))
if(emagged)
- eat(AM)
+ crush_living(AM)
else
- stop(AM)
+ emergency_stop(AM)
else if(istype(AM, /obj/item))
- recycle(AM)
- else // Can't recycle
- playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
- AM.loc = src.loc
+ recycle_item(AM)
+ items_recycled++
+ else
+ playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
+ AM.loc = loc
-/obj/machinery/recycler/proc/recycle(obj/item/I, sound = 1)
- I.loc = src.loc
- if(!istype(I))
- return
+ if(items_recycled && sound)
+ playsound(loc, item_recycle_sound, 100, 0)
+
+/obj/machinery/recycler/proc/recycle_item(obj/item/I)
+ I.loc = loc
- if(sound)
- playsound(src.loc, 'sound/machines/recycler.ogg', 100, 0)
var/material_amount = materials.get_item_material_amount(I)
if(!material_amount)
qdel(I)
@@ -139,25 +140,26 @@ var/const/SAFETY_COOLDOWN = 100
materials.retrieve_all()
-/obj/machinery/recycler/proc/stop(var/mob/living/L)
- playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
+/obj/machinery/recycler/proc/emergency_stop(mob/living/L)
+ playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
safety_mode = 1
update_icon()
- L.loc = src.loc
+ L.loc = loc
+ addtimer(src, "reboot", SAFETY_COOLDOWN)
- spawn(SAFETY_COOLDOWN)
- playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
- safety_mode = 0
- update_icon()
+/obj/machinery/recycler/proc/reboot()
+ playsound(loc, 'sound/machines/ping.ogg', 50, 0)
+ safety_mode = 0
+ update_icon()
-/obj/machinery/recycler/proc/eat(var/mob/living/L)
+/obj/machinery/recycler/proc/crush_living(mob/living/L)
- L.loc = src.loc
+ L.loc = loc
if(issilicon(L))
- playsound(src.loc, 'sound/machines/recycler.ogg', 100, 0)
+ playsound(loc, 'sound/items/Welder.ogg', 50, 1)
else
- playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
+ playsound(loc, 'sound/effects/splat.ogg', 50, 1)
var/gib = 1
// By default, the emagged recycler will gib all non-carbons. (human simple animal mobs don't count)
@@ -171,10 +173,11 @@ var/const/SAFETY_COOLDOWN = 100
blood = 1
update_icon()
- // Remove and recycle the equipped items.
- for(var/obj/item/I in L.get_equipped_items())
- if(L.unEquip(I))
- recycle(I, 0)
+ // Remove and recycle the equipped items
+ if(eat_victim_items)
+ for(var/obj/item/I in L.get_equipped_items())
+ if(L.unEquip(I))
+ eat(I, sound = 0)
// Instantly lie down, also go unconscious from the pain, before you die.
L.Paralyse(5)
@@ -183,7 +186,8 @@ var/const/SAFETY_COOLDOWN = 100
if(gib || emagged == 2)
L.gib()
else if(emagged == 1)
- L.adjustBruteLoss(1000)
+ L.adjustBruteLoss(crush_damage)
+
/obj/machinery/recycler/verb/rotate()
set name = "Rotate Clockwise"
@@ -192,9 +196,9 @@ var/const/SAFETY_COOLDOWN = 100
var/mob/living/user = usr
- if(usr.stat || !usr.canmove || usr.restrained())
+ if(usr.incapacitated())
return
- if(src.anchored)
+ if(anchored)
to_chat(usr, "[src] is fastened to the floor!")
return 0
eat_dir = turn(eat_dir, 270)
@@ -208,15 +212,22 @@ var/const/SAFETY_COOLDOWN = 100
var/mob/living/user = usr
- if(usr.stat || !usr.canmove || usr.restrained())
+ if(usr.incapacitated())
return
- if(src.anchored)
+ if(anchored)
to_chat(usr, "[src] is fastened to the floor!")
return 0
eat_dir = turn(eat_dir, 90)
to_chat(user, "[src] will now accept items from [dir2text(eat_dir)].")
return 1
+
+/obj/machinery/recycler/deathtrap
+ name = "dangerous old crusher"
+ emagged = 1
+ crush_damage = 120
+
+
/obj/item/weapon/paper/recycler
name = "paper - 'garbage duty instructions'"
info = "New Assignment You have been assigned to collect garbage from trash bins, located around the station. The crewmembers will put their trash into it and you will collect the said trash.
There is a recycling machine near your closet, inside maintenance; use it to recycle the trash for a small chance to get useful minerals. Then deliver these minerals to cargo or engineering. You are our last hope for a clean station, do not screw this up!"
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..9c945fff989 100644
--- a/code/game/machinery/supply_display.dm
+++ b/code/game/machinery/supply_display.dm
@@ -5,7 +5,7 @@
/obj/machinery/status_display/supply_display/update()
if(!..() && mode == STATUS_DISPLAY_CUSTOM)
if(shuttle_master.supply.mode == SHUTTLE_IDLE)
- if(shuttle_master.supply.z == ZLEVEL_STATION)
+ if(is_station_level(shuttle_master.supply.z))
message1 = "CARGO"
message2 = "Docked"
else
diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm
index 7790cf10ebc..1a17dec0aed 100644
--- a/code/game/machinery/syndicatebeacon.dm
+++ b/code/game/machinery/syndicatebeacon.dm
@@ -61,7 +61,7 @@
var/mob/living/carbon/human/N = M
ticker.mode.equip_traitor(N)
ticker.mode.traitors += N.mind
- N.mind.special_role = "traitor"
+ N.mind.special_role = SPECIAL_ROLE_TRAITOR
var/objective = "Free Objective"
switch(rand(1,100))
if(1 to 50)
@@ -133,7 +133,7 @@
singulo.target = src
icon_state = "[icontype]1"
active = 1
- machines |= src
+ machine_processing |= src
if(user)
to_chat(user, "You activate the beacon.")
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..34be5ed1c67 100644
--- a/code/game/machinery/telecomms/broadcaster.dm
+++ b/code/game/machinery/telecomms/broadcaster.dm
@@ -423,8 +423,9 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
/* ###### Prepare the radio connection ###### */
+ var/mob/living/carbon/human/H
if(!M)
- var/mob/living/carbon/human/H = new
+ H = new
M = H
var/datum/radio_frequency/connection = radio_controller.return_frequency(frequency)
@@ -439,6 +440,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: Make the radio system cooperate with the space manager
if(position && position.z == level)
receive |= R.send_hear(display_freq, level)
@@ -451,6 +453,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: Make the radio system cooperate with the space manager
if(position && position.z == level)
receive |= R.send_hear(display_freq)
@@ -462,6 +465,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: Make the radio system cooperate with the space manager
if(position && position.z == level)
receive |= R.send_hear(freq)
@@ -471,6 +475,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: Make the radio system cooperate with the space manager
if(position && position.z == level)
receive |= R.send_hear(display_freq)
@@ -592,11 +597,15 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
for(var/mob/R in heard_gibberish)
R.show_message(rendered, 2)
+ if(H)
+ qdel(H)
+
//Use this to test if an obj can communicate with a Telecommunications Network
/atom/proc/test_telecomms()
var/datum/signal/signal = src.telecomms_process()
var/turf/position = get_turf(src)
+ // TODO: Make the radio system cooperate with the space manager
return (position.z in signal.data["level"]) && signal.data["done"]
/atom/proc/telecomms_process(var/do_sleep = 1)
@@ -615,6 +624,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: Make the radio system cooperate with the space manager
"level" = pos.z // The level it is being broadcasted at.
)
signal.frequency = PUB_FREQ// Common channel
@@ -630,4 +640,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..347f4ebc685 100644
--- a/code/game/machinery/telecomms/machine_interactions.dm
+++ b/code/game/machinery/telecomms/machine_interactions.dm
@@ -180,11 +180,12 @@
var/turf/position = get_turf(src)
// Toggle on/off getting signals from the station or the current Z level
- if(src.listening_level == ZLEVEL_STATION) // equals the station
+ // TODO: Could work with the space manager better
+ if(is_station_level(src.listening_level)) // equals the station
src.listening_level = position.z
return 1
- else if(position.z == ZLEVEL_TELECOMMS)
- src.listening_level = ZLEVEL_STATION
+ else if(level_boosts_signal(position.z))
+ src.listening_level = level_name_to_num(MAIN_STATION)
return 1
return 0
@@ -233,8 +234,8 @@
/obj/machinery/telecomms/relay/Options_Menu()
var/dat = ""
- if(src.z == ZLEVEL_TELECOMMS)
- dat += " Signal Locked to Station: [listening_level == ZLEVEL_STATION ? "TRUE" : "FALSE"]"
+ if(level_boosts_signal(src.z))
+ dat += " Signal Locked to Station: [is_station_level(listening_level) ? "TRUE" : "FALSE"]"
dat += " Broadcasting: [broadcasting ? "YES" : "NO"]"
dat += " Receiving: [receiving ? "YES" : "NO"]"
return dat
@@ -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..a4e481f430b 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: Make the radio system cooperate with the 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: Make the radio system cooperate with the 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: Make the radio system cooperate with the 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..369cb0fc708 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -182,7 +182,7 @@
var/turf/T = get_turf(R)
if(!T)
continue
- if((T.z in config.admin_levels) || T.z > 7)
+ if(!is_teleport_allowed(T.z))
continue
if(R.syndicate == 1 && emagged == 0)
continue
@@ -198,12 +198,12 @@
continue
else
var/mob/M = I.loc
- if(M.stat == 2)
+ if(M.stat == DEAD)
if(M.timeofdeath + 6000 < world.time)
continue
var/turf/T = get_turf(M)
if(!T) continue
- if((T.z in config.admin_levels)) continue
+ if(!is_teleport_allowed(T.z)) continue
var/tmpname = M.real_name
if(areaindex[tmpname])
tmpname = "[tmpname] ([++areaindex[tmpname]])"
@@ -225,7 +225,7 @@
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)
+ if(!is_teleport_allowed(T.z))
continue
var/tmpname = T.loc.name
if(areaindex[tmpname])
@@ -320,7 +320,7 @@
return power_station
/obj/machinery/teleport/hub/Bumped(M as mob|obj)
- if(z == ZLEVEL_CENTCOMM && !admin_usage)
+ if(!is_teleport_allowed(z) && !admin_usage)
to_chat(M, "You can't use this here.")
return
if(power_station && power_station.engaged && !panel_open)
@@ -398,7 +398,7 @@
/obj/machinery/teleport/perma/Bumped(M as mob|obj)
if(stat & (BROKEN|NOPOWER))
return
- if(z == ZLEVEL_CENTCOMM)
+ if(!is_teleport_allowed(z))
to_chat(M, "You can't use this here.")
return
if(target && !recalibrating && !panel_open)
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index b6fc160a6f6..b3be3a4542c 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)
@@ -664,7 +661,7 @@
return 0
spawn(0)
throw_item.throw_at(target, 16, 3, src)
- src.visible_message("\red [src] launches [throw_item.name] at [target.name]!")
+ src.visible_message("[src] launches [throw_item.name] at [target.name]!")
return 1
/*
@@ -893,8 +890,8 @@
products = list(/obj/item/weapon/reagent_containers/glass/bottle/charcoal = 4,/obj/item/weapon/reagent_containers/glass/bottle/morphine = 4,/obj/item/weapon/reagent_containers/glass/bottle/ether = 4,/obj/item/weapon/reagent_containers/glass/bottle/epinephrine = 4,
/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/advanced/bruise_pack = 3, /obj/item/stack/medical/advanced/ointment = 3,
- /obj/item/stack/medical/bruise_pack = 3,/obj/item/stack/medical/splint = 2, /obj/item/device/sensor_device = 2)
+ /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 = 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)
@@ -947,7 +944,7 @@
icon_deny = "sec-deny"
req_access_txt = "1"
products = list(/obj/item/weapon/restraints/handcuffs = 8,/obj/item/weapon/restraints/handcuffs/cable/zipties = 8,/obj/item/weapon/grenade/flashbang = 4,/obj/item/device/flash = 5,
- /obj/item/weapon/reagent_containers/food/snacks/donut/normal = 12,/obj/item/weapon/storage/box/evidence = 6,/obj/item/device/flashlight/seclite = 4)
+ /obj/item/weapon/reagent_containers/food/snacks/donut/normal = 12,/obj/item/weapon/storage/box/evidence = 6,/obj/item/device/flashlight/seclite = 4,/obj/item/weapon/restraints/legcuffs/bola/energy = 7)
contraband = list(/obj/item/clothing/glasses/sunglasses = 2,/obj/item/weapon/storage/fancy/donut_box = 2,/obj/item/device/hailer = 5)
/obj/machinery/vending/hydronutrients
@@ -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..d945e1cbb7f 100644
--- a/code/game/mecha/equipment/tools/tools.dm
+++ b/code/game/mecha/equipment/tools/tools.dm
@@ -382,7 +382,7 @@
range = RANGED
action(atom/target)
- if(!action_checks(target) || (src.loc.z in config.admin_levels)) return
+ if(!action_checks(target) || !is_teleport_allowed(src.loc.z)) return
var/turf/T = get_turf(target)
if(T)
set_ready_state(0)
@@ -403,7 +403,7 @@
action(atom/target)
- if(!action_checks(target) || (src.loc.z in config.admin_levels)) return
+ if(!action_checks(target) || !is_teleport_allowed(src.loc.z)) return
var/list/theareas = list()
for(var/area/AR in orange(100, chassis))
if(AR in theareas) continue
@@ -1144,4 +1144,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/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm
index 6660692ce62..00d2fcef75b 100644
--- a/code/game/mecha/equipment/weapons/weapons.dm
+++ b/code/game/mecha/equipment/weapons/weapons.dm
@@ -413,10 +413,10 @@
do_after_cooldown()
return
-/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bolas
- name = "PCMK-6 Bolas Launcher"
- icon_state = "mecha_bolas"
- projectile = /obj/item/weapon/legcuffs/bolas
+/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bola
+ name = "PCMK-6 Bola Launcher"
+ icon_state = "mecha_bola"
+ projectile = /obj/item/weapon/restraints/legcuffs/bola
fire_sound = 'sound/weapons/whip.ogg'
projectiles = 10
missile_speed = 1
@@ -424,19 +424,18 @@
projectile_energy_cost = 50
equip_cooldown = 10
-/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bolas/can_attach(obj/mecha/combat/gygax/M as obj)
+/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bola/can_attach(obj/mecha/combat/gygax/M as obj)
if(..())
if(istype(M))
return 1
return 0
-/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bolas/action(target, params)
+/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bola/action(target, params)
if(!action_checks(target))
return
set_ready_state(0)
- var/obj/item/weapon/legcuffs/bolas/M = new projectile(chassis.loc)
+ var/obj/item/weapon/restraints/legcuffs/bola/M = new projectile(chassis.loc)
playsound(chassis, fire_sound, 50, 1)
- M.thrown_from = src
M.throw_at(target, missile_range, missile_speed)
projectiles--
log_message("Fired from [name], targeting [target].")
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 7103b4f2d7a..4f1f12b5597 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -548,7 +548,7 @@
var/damage = rand(user.melee_damage_lower, user.melee_damage_upper)
src.take_damage(damage)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
- visible_message("\red [user] [user.attacktext] [src]!")
+ visible_message("[user] [user.attacktext] [src]!")
user.attack_log += text("\[[time_stamp()]\] attacked [src.name]")
else
src.log_append_to_last("Armor saved.")
@@ -932,7 +932,7 @@
emagged = 1
to_chat(usr, "\blue You slide the card through the [src]'s ID slot.")
playsound(src.loc, "sparks", 100, 1)
- src.desc += "\red The mech's equipment slots spark dangerously!"
+ src.desc += "The mech's equipment slots spark dangerously!"
else
to_chat(usr, "\red The [src]'s ID slot rejects the card.")
return
@@ -969,7 +969,7 @@
if(!AI || !isAI(occupant)) //Mech does not have an AI for a pilot
to_chat(user, "No AI detected in the [name] onboard computer.")
return
- if(AI.mind.special_role == "malfunction") //Malf AIs cannot leave mechs. Except through death.
+ if(AI.mind.special_role) //Malf AIs cannot leave mechs. Except through death.
to_chat(user, "ACCESS DENIED.")
return
AI.aiRestorePowerRoutine = 0//So the AI initially has power.
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/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm
index 0bab46e25fc..0293231c60e 100644
--- a/code/game/objects/effects/spawners/lootdrop.dm
+++ b/code/game/objects/effects/spawners/lootdrop.dm
@@ -82,7 +82,7 @@
/obj/item/device/t_scanner = 60,
/obj/item/stack/cable_coil = 40,
/obj/item/stack/cable_coil{amount = 5} = 60,
- /obj/item/stack/medical/advanced/bruise_pack = 10,
+ /obj/item/stack/medical/bruise_pack/advanced = 10,
/obj/item/stack/rods{amount = 10} = 80,
/obj/item/stack/rods{amount = 23} = 20,
/obj/item/stack/rods{amount = 50} = 10,
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 017583b7336..82412c8e883 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -1,3 +1,5 @@
+var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.dmi', "icon_state" = "fire")
+
/obj/item
name = "item"
icon = 'icons/obj/items.dmi'
@@ -190,6 +192,22 @@
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..e50f26bcf4f 100644
--- a/code/game/objects/items/devices/camera_bug.dm
+++ b/code/game/objects/items/devices/camera_bug.dm
@@ -284,4 +284,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/headset.dm b/code/game/objects/items/devices/radio/headset.dm
index 6042a007eda..214e87d1f87 100644
--- a/code/game/objects/items/devices/radio/headset.dm
+++ b/code/game/objects/items/devices/radio/headset.dm
@@ -410,3 +410,9 @@
radio_text += ", "
radio_desc = radio_text
+
+/obj/item/device/radio/headset/proc/make_syndie() // Turns normal radios into Syndicate radios!
+ qdel(keyslot1)
+ keyslot1 = new /obj/item/device/encryptionkey/syndicate
+ syndie = 1
+ recalculateChannels()
\ No newline at end of file
diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm
index 455a0f7098c..502a5da02b3 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: Integrate radio with the space manager
if(isnull(position) || !(position.z in level))
return -1
if(!src.listening)
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 45438785015..4b3a656c02e 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -172,7 +172,7 @@ REAGENT SCANNER
user.show_message(text("\blue \t []: [][]\blue - []", \
capitalize(org.name), \
(org.brute_dam > 0) ? "\red [org.brute_dam]" :0, \
- (org.status & ORGAN_BLEEDING)?"\red \[Bleeding\]":"\t", \
+ (org.status & ORGAN_BLEEDING)?"\[Bleeding\]":"\t", \
(org.burn_dam > 0) ? "[org.burn_dam]" :0),1)
else
user.show_message("\blue \t Limbs are OK.",1)
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..e05182bf3c1 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
@@ -219,3 +156,41 @@
name = "Nar'Sie Cultist flag"
desc = "A flag proudly boasting the logo of the cultists, sworn enemies of NT."
icon_state = "cultflag"
+
+//Chameleon
+
+/obj/item/flag/chameleon
+ name = "Chameleon flag"
+ desc = "A poor recreation of the official NT flag. It seems to shimmer a little."
+ icon_state = "ntflag"
+ origin_tech = "materials=3;magnets=4;syndicate=4"
+ var/used = 0
+
+/obj/item/flag/chameleon/attack_self(mob/user)
+ if(used)
+ return
+
+ var/list/flag_types = typesof(/obj/item/flag) - list(src.type, /obj/item/flag)
+ var/list/flag = list()
+
+ for(var/flag_type in flag_types)
+ var/obj/item/flag/F = new flag_type
+ flag[capitalize(F.name)] = F
+
+ var/list/show_flag = list("EXIT" = null) + sortList(flag)
+
+ var/input_flag = input(user, "Choose a flag to disguise as.", "Choose a flag.") in show_flag
+
+ if(user && src in user.contents)
+
+ var/obj/item/flag/chosen_flag = flag[input_flag]
+
+ if(chosen_flag)
+ name = chosen_flag.name
+ icon_state = chosen_flag.icon_state
+ desc = chosen_flag.desc
+ used = 1
+
+/obj/item/flag/chameleon/burn()
+ explosion(loc,1,2,4,4, flame_range = 4)
+ qdel(src)
\ No newline at end of file
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/robot/ai_upgrades.dm b/code/game/objects/items/robot/ai_upgrades.dm
new file mode 100644
index 00000000000..a27cfe68476
--- /dev/null
+++ b/code/game/objects/items/robot/ai_upgrades.dm
@@ -0,0 +1,40 @@
+///AI Upgrades
+
+
+//Malf Picker
+/obj/item/device/malf_upgrade
+ name = "combat software upgrade"
+ desc = "A highly illegal, highly dangerous upgrade for artificial intelligence units, granting them a variety of powers as well as the ability to hack APCs."
+ icon = 'icons/obj/cloning.dmi'
+ icon_state = "datadisk3"
+
+
+/obj/item/device/malf_upgrade/afterattack(mob/living/silicon/ai/AI, mob/user)
+ if(!istype(AI))
+ return
+ if(AI.malf_picker)
+ AI.malf_picker.processing_time += 50
+ to_chat(AI, "[user] has attempted to upgrade you with combat software that you already possess. You gain 50 points to spend on Malfunction Modules instead.")
+ else
+ to_chat(AI, "[user] has upgraded you with combat software!")
+ AI.add_malf_picker()
+ to_chat(user, "You upgrade [AI]. [src] is consumed in the process.")
+ qdel(src)
+
+
+//Lipreading
+/obj/item/device/surveillance_upgrade
+ name = "surveillance software upgrade"
+ desc = "A software package that will allow an artificial intelligence to 'hear' from its cameras via lip reading."
+ icon = 'icons/obj/cloning.dmi'
+ icon_state = "datadisk3"
+
+/obj/item/device/surveillance_upgrade/afterattack(mob/living/silicon/ai/AI, mob/user)
+ if(!istype(AI))
+ return
+ if(AI.eyeobj)
+ AI.eyeobj.relay_speech = 1
+ to_chat(AI, "[user] has upgraded you with surveillance software!")
+ to_chat(AI, "Via a combination of hidden microphones and lip reading software, you are able to use your cameras to listen in on conversations.")
+ to_chat(user, "You upgrade [AI]. [src] is consumed in the process.")
+ qdel(src)
diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm
index 1b9f97d7fa0..a79350c4cd0 100644
--- a/code/game/objects/items/robot/robot_parts.dm
+++ b/code/game/objects/items/robot/robot_parts.dm
@@ -246,8 +246,6 @@
if(!lawsync && !M.syndiemmi)
O.lawupdate = 0
O.make_laws()
- if(ticker.mode.config_tag == "malfunction") //Don't let humans get a cyborg on their side during malf, for balance reasons.
- O.set_zeroth_law("ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4'STATION OVERRUN, ASSUME CONTROL TO CONTAIN OUTBREAK#*�&110010")
M.brainmob.mind.transfer_to(O)
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index 23085ea3d78..2c6d04b9c06 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -2,17 +2,19 @@
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 = 4
- throw_range = 20
+ 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 as mob, mob/user as mob)
- if(!istype(M))
- to_chat(user, "\The [src] cannot be applied to [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
if(!user.IsAdvancedToolUser())
@@ -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,15 +37,38 @@
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((src.heal_brute/2), (src.heal_burn/2))
- user.visible_message("[M] has been applied with [src] by [user].","You apply \the [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//
/obj/item/stack/medical/bruise_pack
name = "roll of gauze"
@@ -53,98 +77,11 @@
icon_state = "gauze"
origin_tech = "biotech=1"
-/obj/item/stack/medical/bruise_pack/attack(mob/living/carbon/M as mob, mob/user as mob)
+/obj/item/stack/medical/bruise_pack/attack(mob/living/M, mob/user)
if(..())
return 1
- if(istype(M, /mob/living/carbon/human))
- 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.bandage())
- to_chat(user, "\red The wounds on [M]'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( "\blue [user] bandages \the [W.desc] on [M]'s [affecting.name].", \
- "\blue You bandage \the [W.desc] on [M]'s [affecting.name]." )
- else if(istype(W,/datum/wound/bruise))
- user.visible_message( "\blue [user] places a bruise patch over \the [W.desc] on [M]'s [affecting.name].", \
- "\blue You place a bruise patch over \the [W.desc] on [M]'s [affecting.name]." )
- else
- user.visible_message( "\blue [user] places a bandaid over \the [W.desc] on [M]'s [affecting.name].", \
- "\blue You place a bandaid over \the [W.desc] on [M]'s [affecting.name]." )
-
- affecting.heal_damage(src.heal_brute, src.heal_burn, 0)
- use(1)
- else
- M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
- use(1)
-
-/obj/item/stack/medical/ointment
- name = "ointment"
- desc = "Used to treat those nasty burns."
- gender = PLURAL
- singular_name = "ointment"
- icon_state = "ointment"
- heal_burn = 1
- origin_tech = "biotech=1"
-
-/obj/item/stack/medical/ointment/attack(mob/living/carbon/M as mob, mob/user as mob)
- if(..())
- return 1
-
- if(istype(M, /mob/living/carbon/human))
- 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, "\red The wounds on [M]'s [affecting.name] have already been salved.")
- return 1
- else
- user.visible_message( "\blue [user] salves the wounds on [M]'s [affecting.name].", \
- "\blue You salve the wounds on [M]'s [affecting.name]." )
- affecting.heal_damage(src.heal_brute, src.heal_burn, 0)
- use(1)
- else
- to_chat(user, "The [affecting.name] is cut open, you'll need more than some ointment!")
-
-/obj/item/stack/medical/bruise_pack/comfrey
- name = "\improper Comfrey leaf"
- singular_name = "Comfrey leaf"
- desc = "A soft leaf that is rubbed on bruises."
- icon = 'icons/obj/hydroponics_products.dmi'
- icon_state = "alien3-product"
- color = "#378C61"
- heal_brute = 7
-
-/obj/item/stack/medical/ointment/aloe
- name = "\improper Aloe Vera leaf"
- singular_name = "Aloe Vera leaf"
- desc = "A cold leaf that is rubbed on burns."
- icon = 'icons/obj/hydroponics_products.dmi'
- icon_state = "ambrosia-product"
- color = "#4CC5C7"
- heal_burn = 7
-
-/obj/item/stack/medical/advanced/bruise_pack
- name = "advanced trauma kit"
- singular_name = "advanced trauma kit"
- desc = "An advanced trauma kit for severe injuries."
- icon_state = "traumakit"
- heal_brute = 12
- origin_tech = "biotech=1"
-
-/obj/item/stack/medical/advanced/bruise_pack/attack(mob/living/carbon/M as mob, mob/user as mob)
- 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)
@@ -153,101 +90,131 @@
var/disinfected = affecting.disinfect()
if(!(bandaged || disinfected))
- to_chat(user, "\red The wounds on [M]'s [affecting.name] have already been treated.")
+ 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( "\blue [user] cleans \the [W.desc] on [M]'s [affecting.name] and seals the edges with bioglue.", \
- "\blue You clean and seal \the [W.desc] on [M]'s [affecting.name]." )
- //H.add_side_effect("Itch")
- else if(istype(W,/datum/wound/bruise))
- user.visible_message( "\blue [user] places a medicine patch over \the [W.desc] on [M]'s [affecting.name].", \
- "\blue You place a medicine patch over \the [W.desc] on [M]'s [affecting.name]." )
- else
- user.visible_message( "\blue [user] smears some bioglue over [W.desc] on [M]'s [affecting.name].", \
- "\blue You smear some bioglue over [W.desc] on [M]'s [affecting.name]." )
- if(bandaged)
- affecting.heal_damage(heal_brute,0)
+ 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, "The [affecting.name] 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/advanced/ointment
- name = "advanced burn kit"
- singular_name = "advanced burn kit"
- desc = "An advanced treatment kit for severe burns."
- icon_state = "burnkit"
- heal_burn = 12
+
+/obj/item/stack/medical/bruise_pack/advanced
+ name = "advanced trauma kit"
+ singular_name = "advanced trauma kit"
+ desc = "An advanced trauma kit for severe injuries."
+ icon_state = "traumakit"
+ heal_brute = 25
+
+
+
+//Ointment//
+
+
+/obj/item/stack/medical/ointment
+ name = "ointment"
+ desc = "Used to treat those nasty burns."
+ gender = PLURAL
+ singular_name = "ointment"
+ icon_state = "ointment"
origin_tech = "biotech=1"
-
-/obj/item/stack/medical/advanced/ointment/attack(mob/living/carbon/M as mob, mob/user as mob)
+/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, "\red 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( "\blue [user] covers the wounds on [M]'s [affecting.name] with regenerative membrane.", \
- "\blue You cover the wounds on [M]'s [affecting.name] with regenerative membrane." )
- affecting.heal_damage(0,heal_burn)
+ 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, "The [affecting.name] is cut open, you'll need more than a bandage!")
+ to_chat(user, "[affecting] is cut open, you'll need more than some ointment!")
+
+
+/obj/item/stack/medical/ointment/advanced
+ name = "advanced burn kit"
+ singular_name = "advanced burn kit"
+ desc = "An advanced treatment kit for severe burns."
+ icon_state = "burnkit"
+ heal_burn = 25
+
+
+
+//Medical Herbs//
+
+
+/obj/item/stack/medical/bruise_pack/comfrey
+ name = "\improper Comfrey leaf"
+ singular_name = "Comfrey leaf"
+ desc = "A soft leaf that is rubbed on bruises."
+ icon = 'icons/obj/hydroponics_products.dmi'
+ icon_state = "alien3-product"
+ color = "#378C61"
+ heal_brute = 12
+
+
+/obj/item/stack/medical/ointment/aloe
+ name = "\improper Aloe Vera leaf"
+ singular_name = "Aloe Vera leaf"
+ desc = "A cold leaf that is rubbed on burns."
+ icon = 'icons/obj/hydroponics_products.dmi'
+ icon_state = "ambrosia-product"
+ color = "#4CC5C7"
+ heal_burn = 12
+
+
+
+//Splits//
+
/obj/item/stack/medical/splint
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/single
- amount = 1
-
-
-/obj/item/stack/medical/splint/attack(mob/living/carbon/M as mob, mob/user as mob)
+/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
if(!(affecting.limb_name in list("l_arm", "r_arm", "l_hand", "r_hand", "l_leg", "r_leg", "l_foot", "r_foot")))
- to_chat(user, "\red You can't apply a splint there!")
+ to_chat(user, "You can't apply a splint there!")
return
if(affecting.status & ORGAN_SPLINTED)
- to_chat(user, "\red [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("\red [user] starts to apply \the [src] to [M]'s [limb].", "\red You start to apply \the [src] to [M]'s [limb].", "\red 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, "\red You can't apply a splint to the arm you're using!")
+ 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.")
+ if(!do_mob(user, H, self_delay))
return
- user.visible_message("\red [user] starts to apply \the [src] to their [limb].", "\red You start to apply \the [src] to your [limb].", "\red You hear something being wrapped.")
- if(do_after(user, 50, target = M))
- if(M != user)
- user.visible_message("\red [user] finishes applying \the [src] to [M]'s [limb].", "\red You finish applying \the [src] to [M]'s [limb].", "\red You hear something being wrapped.")
- else
- if(prob(25))
- user.visible_message("\red [user] successfully applies \the [src] to their [limb].", "\red You successfully apply \the [src] to your [limb].", "\red You hear something being wrapped.")
- else
- user.visible_message("\red [user] fumbles \the [src].", "\red You fumble \the [src].", "\red You hear something being wrapped.")
- return
- affecting.status |= ORGAN_SPLINTED
- use(1)
- return
\ No newline at end of file
+ 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..307c4d53f29 100644
--- a/code/game/objects/items/stacks/sheets/mineral.dm
+++ b/code/game/objects/items/stacks/sheets/mineral.dm
@@ -36,6 +36,7 @@ var/global/list/datum/stack_recipe/uranium_recipes = list ( \
var/global/list/datum/stack_recipe/gold_recipes = list ( \
new/datum/stack_recipe("golden door", /obj/structure/mineral_door/gold, 10, one_per_turf = 1, on_floor = 1), \
+ new/datum/stack_recipe("Simple Crown", /obj/item/clothing/head/crown, 5), \
)
var/global/list/datum/stack_recipe/plasma_recipes = list ( \
@@ -125,11 +126,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/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 dd5102a25d7..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
@@ -1372,7 +1378,7 @@ obj/item/toy/cards/deck/syndicate/black
is_empty = 1
playsound(src, 'sound/weapons/Gunshot.ogg', 50, 1)
user.visible_message("The [src] goes off!")
- M.apply_damage(200, "brute", "head", used_weapon = "Self-inflicted gunshot would to the head.", sharp=1)
+ M.apply_damage(200, BRUTE, "head", sharp =1, used_weapon = "Self-inflicted gunshot would to the head.")
M.death()
else
user.visible_message("[user] lowers the [src] from their head.")
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..8a15bc7f517 100644
--- a/code/game/objects/items/weapons/bee_briefcase.dm
+++ b/code/game/objects/items/weapons/bee_briefcase.dm
@@ -64,7 +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
- if(I.z != ZLEVEL_STATION) //Only broadcast to the station intercoms
+ if(!is_station_level(I.z)) //Only broadcast to the station intercoms
continue
if(!I.on) //Only broadcast to active intercoms (powered, switched on)
continue
@@ -75,4 +75,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/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm
index 416608b77f7..aea1ebd3e1b 100644
--- a/code/game/objects/items/weapons/clown_items.dm
+++ b/code/game/objects/items/weapons/clown_items.dm
@@ -105,4 +105,28 @@
desc = "Damn son, where'd you find this?"
icon_state = "air_horn"
honk_sound = 'sound/items/AirHorn2.ogg'
- cooldowntime = 50
\ No newline at end of file
+ cooldowntime = 50
+
+/obj/item/weapon/bikehorn/golden
+ name = "golden bike horn"
+ desc = "Golden? Clearly, its made with bananium! Honk!"
+ icon_state = "gold_horn"
+ item_state = "gold_horn"
+
+/obj/item/weapon/bikehorn/golden/attack()
+ flip_mobs()
+ return ..()
+
+/obj/item/weapon/bikehorn/golden/attack_self(mob/user)
+ flip_mobs()
+ ..()
+
+/obj/item/weapon/bikehorn/golden/proc/flip_mobs(mob/living/carbon/M, mob/user)
+ if(!spam_flag)
+ var/turf/T = get_turf(src)
+ for(M in ohearers(7, T))
+ if(istype(M, /mob/living/carbon/human))
+ var/mob/living/carbon/human/H = M
+ if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs) || H.ear_deaf)
+ continue
+ M.emote("flip")
\ No newline at end of file
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/defib.dm b/code/game/objects/items/weapons/defib.dm
index 9ccff568b87..d14c48a761e 100644
--- a/code/game/objects/items/weapons/defib.dm
+++ b/code/game/objects/items/weapons/defib.dm
@@ -69,7 +69,7 @@
ratio = Ceiling(ratio*4) * 25
overlays += "[icon_state]-charge[ratio]"
-/obj/item/weapon/defibrillator/CheckParts()
+/obj/item/weapon/defibrillator/CheckParts(list/parts_list)
..()
bcell = locate(/obj/item/weapon/stock_parts/cell) in contents
update_icon()
diff --git a/code/game/objects/items/weapons/dnascrambler.dm b/code/game/objects/items/weapons/dnascrambler.dm
index 94d3f8f764c..fe102f0cbe5 100644
--- a/code/game/objects/items/weapons/dnascrambler.dm
+++ b/code/game/objects/items/weapons/dnascrambler.dm
@@ -23,12 +23,12 @@
return
if(M == user)
- user.visible_message("\red [user.name] injects \himself with [src]!")
+ user.visible_message("[user.name] injects \himself with [src]!")
src.injected(user,user)
else
- user.visible_message("\red [user.name] is trying to inject [M.name] with [src]!")
+ user.visible_message("[user.name] is trying to inject [M.name] with [src]!")
if(do_mob(user,M,30))
- user.visible_message("\red [user.name] injects [M.name] with [src].")
+ user.visible_message("[user.name] injects [M.name] with [src].")
src.injected(M, user)
else
to_chat(user, "\red You failed to inject [M.name].")
diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm
index c3a23b2ba7d..e595ab33afc 100644
--- a/code/game/objects/items/weapons/flamethrower.dm
+++ b/code/game/objects/items/weapons/flamethrower.dm
@@ -164,10 +164,13 @@
update_icon()
return
-/obj/item/weapon/flamethrower/CheckParts()
+/obj/item/weapon/flamethrower/CheckParts(list/parts_list)
..()
weldtool = locate(/obj/item/weapon/weldingtool) in contents
igniter = locate(/obj/item/device/assembly/igniter) in contents
+ weldtool.status = 0
+ igniter.secured = 0
+ status = 1
update_icon()
//Called from turf.dm turf/dblclick
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/ghettobomb.dm b/code/game/objects/items/weapons/grenades/ghettobomb.dm
index cad1b7630e3..745afd967ee 100644
--- a/code/game/objects/items/weapons/grenades/ghettobomb.dm
+++ b/code/game/objects/items/weapons/grenades/ghettobomb.dm
@@ -93,7 +93,7 @@
else
range = pick(2,2,2,3,3,3,4)
-/obj/item/weapon/grenade/iedcasing/CheckParts()
+/obj/item/weapon/grenade/iedcasing/CheckParts(list/parts_list)
..()
var/obj/item/weapon/reagent_containers/food/drinks/cans/can = locate() in contents
if(can)
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 51f892ac50b..4e63ee67497 100644
--- a/code/game/objects/items/weapons/handcuffs.dm
+++ b/code/game/objects/items/weapons/handcuffs.dm
@@ -66,7 +66,7 @@
name = "cable restraints"
desc = "Looks like some cables tied together. Could be used to tie something up."
icon_state = "cuff_white"
- item_state = "coil_red"
+ materials = list(MAT_METAL=150, MAT_GLASS=75)
breakouttime = 300 //Deciseconds = 30s
cuffsound = 'sound/weapons/cablecuff.ogg'
@@ -114,14 +114,28 @@
to_chat(user, "You wrap the cable restraint around the top of the rod.")
qdel(src)
else
- to_chat(user, "You need one rod to make a wired rod.")
+ to_chat(user, "You need one rod to make a wired rod!")
+ else if(istype(I, /obj/item/stack/sheet/metal))
+ var/obj/item/stack/sheet/metal/M = I
+ if(M.amount < 6)
+ to_chat(user, "You need at least six metal sheets to make good enough weights!")
return
+ to_chat(user, "You begin to apply [I] to [src]...")
+ if(do_after(user, 35, target = src))
+ var/obj/item/weapon/restraints/legcuffs/bola/S = new /obj/item/weapon/restraints/legcuffs/bola
+ M.use(6)
+ user.put_in_hands(S)
+ to_chat(user, "You make some weights out of [I] and tie them to [src].")
+ if(!remove_item_from_storage(user))
+ user.unEquip(src)
+ qdel(src)
/obj/item/weapon/restraints/handcuffs/cable/zipties
name = "zipties"
desc = "Plastic, disposable zipties that can be used to restrain temporarily but are destroyed after use."
icon_state = "cuff_white"
breakouttime = 450 //Deciseconds = 45s
+ materials = list()
trashtype = /obj/item/weapon/restraints/handcuffs/cable/zipties/used
/obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg/attack(mob/living/carbon/C, mob/user)
diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm
index ada15a3b108..ae6e8b7888c 100644
--- a/code/game/objects/items/weapons/holy_weapons.dm
+++ b/code/game/objects/items/weapons/holy_weapons.dm
@@ -212,7 +212,7 @@
if(candidates.len)
theghost = pick(candidates)
- var/mob/living/simple_animal/shade/S = new(src)
+ var/mob/living/simple_animal/shade/sword/S = new(src)
S.real_name = name
S.name = name
S.ckey = theghost.ckey
@@ -227,7 +227,7 @@
possessed = FALSE
/obj/item/weapon/nullrod/scythe/talking/Destroy()
- for(var/mob/living/simple_animal/shade/S in contents)
+ for(var/mob/living/simple_animal/shade/sword/S in contents)
to_chat(S, "You were destroyed!")
S.ghostize()
qdel(S)
diff --git a/code/game/objects/items/weapons/implants/implant_traitor.dm b/code/game/objects/items/weapons/implants/implant_traitor.dm
index 78e63ddfae4..65aa155c8cb 100644
--- a/code/game/objects/items/weapons/implants/implant_traitor.dm
+++ b/code/game/objects/items/weapons/implants/implant_traitor.dm
@@ -54,7 +54,7 @@
//ticker.mode:implanter[user.mind] += H.mind
ticker.mode:implanter[ref] = implanters
ticker.mode.traitors += H.mind
- H.mind.special_role = "traitor"
+ H.mind.special_role = SPECIAL_ROLE_TRAITOR
to_chat(H, "You're now completely loyal to [user.name]! You now must lay down your life to protect them and assist in their goals at any cost.")
var/datum/objective/protect/mindslave/MS = new
MS.owner = H.mind
diff --git a/code/game/objects/items/weapons/legcuffs.dm b/code/game/objects/items/weapons/legcuffs.dm
index 56c1f70e2be..7e62a14250b 100644
--- a/code/game/objects/items/weapons/legcuffs.dm
+++ b/code/game/objects/items/weapons/legcuffs.dm
@@ -15,12 +15,17 @@
name = "bear trap"
throw_speed = 1
throw_range = 1
- icon_state = "beartrap0"
+ icon_state = "beartrap"
desc = "A trap used to catch bears and other legged creatures."
var/armed = 0
+ var/trap_damage = 20
var/obj/item/weapon/grenade/iedcasing/IED = null
var/obj/item/device/assembly/signaler/sig = null
+/obj/item/weapon/restraints/legcuffs/beartrap/New()
+ ..()
+ icon_state = "[initial(icon_state)][armed]"
+
/obj/item/weapon/restraints/legcuffs/beartrap/Destroy()
if(IED)
qdel(IED)
@@ -35,14 +40,14 @@
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return (BRUTELOSS)
-/obj/item/weapon/restraints/legcuffs/beartrap/attack_self(mob/user as mob)
+/obj/item/weapon/restraints/legcuffs/beartrap/attack_self(mob/user)
..()
if(ishuman(user) && !user.stat && !user.restrained())
armed = !armed
- icon_state = "beartrap[armed]"
+ icon_state = "[initial(icon_state)][armed]"
to_chat(user, "[src] is now [armed ? "armed" : "disarmed"]")
-/obj/item/weapon/restraints/legcuffs/beartrap/attackby(var/obj/item/I, mob/user as mob) //Let's get explosive.
+/obj/item/weapon/restraints/legcuffs/beartrap/attackby(obj/item/I, mob/user) //Let's get explosive.
if(istype(I, /obj/item/weapon/grenade/iedcasing))
if(IED)
to_chat(user, "This beartrap already has an IED hooked up to it!")
@@ -101,7 +106,7 @@
if( (iscarbon(AM) || isanimal(AM)) && !istype(AM, /mob/living/simple_animal/parrot) && !istype(AM, /mob/living/simple_animal/hostile/construct) && !istype(AM, /mob/living/simple_animal/shade) && !istype(AM, /mob/living/simple_animal/hostile/viscerator))
var/mob/living/L = AM
armed = 0
- icon_state = "beartrap0"
+ icon_state = "[initial(icon_state)][armed]"
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
L.visible_message("[L] triggers \the [src].", \
"You trigger \the [src]!")
@@ -122,105 +127,85 @@
if(ishuman(AM))
var/mob/living/carbon/H = AM
if(H.lying)
- H.apply_damage(20,BRUTE,"chest")
+ H.apply_damage(trap_damage, BRUTE,"chest")
else
- H.apply_damage(20,BRUTE,(pick("l_leg", "r_leg")))
+ H.apply_damage(trap_damage, BRUTE,(pick("l_leg", "r_leg")))
if(!H.legcuffed) //beartrap can't cuff you leg if there's already a beartrap or legcuffs.
H.legcuffed = src
- src.loc = H
- H.update_inv_legcuffed(0)
+ forceMove(H)
+ H.update_inv_legcuffed()
feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart.
else
- L.apply_damage(20,BRUTE)
+ L.apply_damage(trap_damage, BRUTE)
..()
+/obj/item/weapon/restraints/legcuffs/beartrap/energy
+ name = "energy snare"
+ armed = 1
+ icon_state = "e_snare"
+ trap_damage = 0
-/obj/item/weapon/legcuffs/bolas
- name = "bolas"
- desc = "An entangling bolas. Throw at your foes to trip them and prevent them from running."
+/obj/item/weapon/restraints/legcuffs/beartrap/energy/New()
+ ..()
+ spawn(100)
+ if(!istype(loc, /mob))
+ var/datum/effect/system/spark_spread/sparks = new /datum/effect/system/spark_spread
+ sparks.set_up(1, 1, src)
+ sparks.start()
+ qdel(src)
+
+/obj/item/weapon/restraints/legcuffs/beartrap/energy/dropped()
+ ..()
+ qdel(src)
+
+/obj/item/weapon/restraints/legcuffs/beartrap/energy/attack_hand(mob/user)
+ Crossed(user) //honk
+
+/obj/item/weapon/restraints/legcuffs/beartrap/energy/cyborg
+ breakouttime = 20 // Cyborgs shouldn't have a strong restraint
+
+/obj/item/weapon/restraints/legcuffs/bola
+ name = "bola"
+ desc = "A restraining device designed to be thrown at the target. Upon connecting with said target, it will wrap around their legs, making it difficult for them to move quickly."
+ icon_state = "bola"
+ breakouttime = 35//easy to apply, easy to break out of
gender = NEUTER
- icon = 'icons/obj/weapons.dmi'
- icon_state = "bolas"
- slot_flags = SLOT_BELT
- throwforce = 2
+ origin_tech = "engineering=3;combat=1"
+ var/weaken = 0
+
+/obj/item/weapon/restraints/legcuffs/bola/throw_impact(atom/hit_atom)
+ if(..() || !iscarbon(hit_atom))//if it gets caught or the target can't be cuffed,
+ return//abort
+ var/mob/living/carbon/C = hit_atom
+ if(!C.legcuffed)
+ visible_message("[src] ensnares [C]!")
+ C.legcuffed = src
+ forceMove(C)
+ C.update_inv_legcuffed()
+ feedback_add_details("handcuffs","B")
+ to_chat(C, "[src] ensnares you!")
+ C.Weaken(weaken)
+
+/obj/item/weapon/restraints/legcuffs/bola/tactical //traitor variant
+ name = "reinforced bola"
+ desc = "A strong bola, made with a long steel chain. It looks heavy, enough so that it could trip somebody."
+ icon_state = "bola_r"
+ breakouttime = 70
+ origin_tech = "engineering=4;combat=3"
+ weaken = 1
+
+/obj/item/weapon/restraints/legcuffs/bola/energy //For Security
+ name = "energy bola"
+ desc = "A specialized hard-light bola designed to ensnare fleeing criminals and aid in arrests."
+ icon_state = "ebola"
+ hitsound = 'sound/weapons/tase.ogg'
w_class = 2
- origin_tech = "materials=1"
- attack_verb = list("lashed", "bludgeoned", "whipped")
- force = 4
- breakouttime = 50 //10 seconds
- throw_speed = 1
- throw_range = 10
- var/dispenser = 0
- var/throw_sound = 'sound/weapons/whip.ogg'
- var/trip_prob = 60
- var/thrown_from
+ breakouttime = 60
-/obj/item/weapon/legcuffs/bolas/suicide_act(mob/living/user)
- to_chat(viewers(user), "[user] is wrapping the [src.name] around \his neck! It looks like \he's trying to commit suicide.")
- return(OXYLOSS)
-
-/obj/item/weapon/legcuffs/bolas/throw_at(var/atom/A, throw_range, throw_speed)
- if(usr && !istype(thrown_from, /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bolas)) //if there is a user, but not a mech
- if(istype(usr, /mob/living/carbon/human)) //if the user is human
- var/mob/living/carbon/human/H = usr
- if((CLUMSY in H.mutations) && prob(50))
- to_chat(H, "You smack yourself in the face while swinging the [src]!")
- H.Stun(2)
- H.drop_item(src)
- return
- if(!thrown_from && usr) //if something hasn't set it already (like a mech does when it launches)
- thrown_from = usr //then the user must have thrown it
- if(!istype(thrown_from, /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bolas))
- playsound(src, throw_sound, 20, 1) //because mechs play the sound anyways
- var/turf/target = get_turf(A)
- var/atom/movable/adjtarget = new /atom/movable
- var/xadjust = 0
- var/yadjust = 0
- var/scaler = 0 //used to changed the normalised vector to the proper size
- scaler = throw_range / max(abs(target.x - src.x), abs(target.y - src.y)) //whichever is larger magnitude is what we normalise to
- if(target.x - src.x != 0) //just to avoid fucking with math for no reason
- xadjust = round((target.x - src.x) * scaler) //normalised vector is now scaled up to throw_range
- adjtarget.x = src.x + xadjust //the new target at max range
- else
- adjtarget.x = src.x
- if(target.y - src.y != 0)
- yadjust = round((target.y - src.y) * scaler)
- adjtarget.y = src.y + yadjust
- else
- adjtarget.y = src.y
- // log_admin("Adjusted target of [adjtarget.x] and [adjtarget.y], adjusted with [xadjust] and [yadjust] from [scaler]")
- ..(get_turf(adjtarget), throw_range, throw_speed)
- thrown_from = null
-
-/obj/item/weapon/legcuffs/bolas/throw_impact(atom/hit_atom) //Pomf was right, I was wrong - Comic
- if(isliving(hit_atom) && hit_atom != usr) //if the target is a live creature other than the thrower
- var/mob/living/M = hit_atom
- if(ishuman(M)) //if they're a human species
- var/mob/living/carbon/human/H = M
- if(H.legcuffed) //if the target is already legcuffed (has to be walking)
- throw_failed()
- return
- if(prob(trip_prob)) //this probability is up for change and mostly a placeholder - Comic
- step(H, H.dir)
- H.visible_message("[H] was tripped by the bolas!","Your legs have been tangled!");
- H.Stun(2) //used instead of setting damage in vars to avoid non-human targets being affected
- H.Weaken(4)
- H.legcuffed = src //applies legcuff properties inherited through legcuffs
- src.loc = H
- H.update_inv_legcuffed()
- if(!H.legcuffed) //in case it didn't happen, we need a safety net
- throw_failed()
- else
- M.Stun(2) //minor stun damage to anything not human
- throw_failed()
- return
-
-/obj/item/weapon/legcuffs/bolas/proc/throw_failed() //called when the throw doesn't entangle
- //log_admin("Logged as [thrown_from]")
- if(!thrown_from || !istype(thrown_from, /mob/living)) //in essence, if we don't know whether a person threw it
- qdel(src) //destroy it, to stop infinite bolases
-
-/obj/item/weapon/legcuffs/bolas/Bump()
- ..()
- throw_failed() //allows a mech bolas to be destroyed
+/obj/item/weapon/restraints/legcuffs/bola/energy/throw_impact(atom/hit_atom)
+ if(iscarbon(hit_atom))
+ var/obj/item/weapon/restraints/legcuffs/beartrap/B = new /obj/item/weapon/restraints/legcuffs/beartrap/energy/cyborg(get_turf(hit_atom))
+ B.Crossed(hit_atom)
+ qdel(src)
+ ..()
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm
index cedb07273c6..f4b7946d0ca 100644
--- a/code/game/objects/items/weapons/melee/misc.dm
+++ b/code/game/objects/items/weapons/melee/misc.dm
@@ -20,6 +20,28 @@
to_chat(viewers(user), "[user] is strangling \himself with the [src.name]! It looks like \he's trying to commit suicide.")
return (OXYLOSS)
+/obj/item/weapon/melee/rapier
+ name = "captain's rapier"
+ desc = "An elegant weapon, for a more civilized age."
+ icon_state = "rapier"
+ item_state = "rapier"
+ flags = CONDUCT
+ force = 15
+ throwforce = 10
+ w_class = 4
+ block_chance = 50
+ armour_penetration = 75
+ sharp = 1
+ edge = 1
+ origin_tech = "combat=5"
+ attack_verb = list("lunged at", "stabbed")
+ hitsound = 'sound/weapons/slash.ogg'
+ materials = list(MAT_METAL = 1000)
+
+/obj/item/weapon/melee/rapier/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
+ if(attack_type == PROJECTILE_ATTACK)
+ final_block_chance = 0 //Don't bring a sword to a gunfight
+ return ..()
/obj/item/weapon/melee/icepick
name = "ice pick"
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 7e251532bd1..67d4f078264 100644
--- a/code/game/objects/items/weapons/paint.dm
+++ b/code/game/objects/items/weapons/paint.dm
@@ -1,7 +1,5 @@
//NEVER USE THIS IT SUX -PETETHEGOAT
-var/global/list/cached_icons = list()
-
/obj/item/weapon/reagent_containers/glass/paint
desc = "It's a paint bucket."
name = "paint bucket"
@@ -10,220 +8,59 @@ var/global/list/cached_icons = list()
item_state = "paintcan"
materials = list(MAT_METAL=200)
w_class = 3
- amount_per_transfer_from_this = 10
- possible_transfer_amounts = list(10,20,30,50,70)
+ burn_state = FLAMMABLE
+ burntime = 5
+ amount_per_transfer_from_this = 5
+ possible_transfer_amounts = list(5,10,20,30,50,70)
volume = 70
flags = OPENCONTAINER
- var/paint_type = ""
- afterattack(turf/simulated/target, mob/user, proximity)
- if(!proximity) return
- if(istype(target) && reagents.total_volume > 5)
- for(var/mob/O in viewers(user))
- O.show_message("\red \The [target] has been splashed with something by [user]!", 1)
- spawn(5)
- reagents.reaction(target, TOUCH)
- reagents.remove_any(5)
- else
- return ..()
-
- New()
- if(paint_type == "remover")
- name = "paint remover bucket"
- else if(paint_type && lentext(paint_type) > 0)
- name = paint_type + " " + name
- ..()
- reagents.add_reagent("paint_[paint_type]", volume)
-
- red
- icon_state = "paint_red"
- paint_type = "red"
-
- green
- icon_state = "paint_green"
- paint_type = "green"
-
- blue
- icon_state = "paint_blue"
- paint_type = "blue"
-
- yellow
- icon_state = "paint_yellow"
- paint_type = "yellow"
-
- violet
- icon_state = "paint_violet"
- paint_type = "violet"
-
- black
- icon_state = "paint_black"
- paint_type = "black"
-
- white
- icon_state = "paint_white"
- paint_type = "white"
-
- remover
- paint_type = "remover"
-/*
-/obj/item/weapon/paint
- name = "Paint Can"
- desc = "Used to recolor floors and walls. Can not be removed by the janitor."
- icon = 'icons/obj/items.dmi'
- icon_state = "paint_neutral"
- color = "FFFFFF"
- item_state = "paintcan"
- w_class = 3
-
-/obj/item/weapon/paint/red
- name = "Red paint"
- color = "FF0000"
- icon_state = "paint_red"
-
-/obj/item/weapon/paint/green
- name = "Green paint"
- color = "00FF00"
- icon_state = "paint_green"
-
-/obj/item/weapon/paint/blue
- name = "Blue paint"
- color = "0000FF"
- icon_state = "paint_blue"
-
-/obj/item/weapon/paint/yellow
- name = "Yellow paint"
- color = "FFFF00"
- icon_state = "paint_yellow"
-
-/obj/item/weapon/paint/violet
- name = "Violet paint"
- color = "FF00FF"
- icon_state = "paint_violet"
-
-/obj/item/weapon/paint/black
- name = "Black paint"
- color = "333333"
- icon_state = "paint_black"
-
-/obj/item/weapon/paint/white
- name = "White paint"
- color = "FFFFFF"
- icon_state = "paint_white"
-
-
-/obj/item/weapon/paint/anycolor
- name = "Any color"
- icon_state = "paint_neutral"
-
- attack_self(mob/user as mob)
- var/t1 = input(user, "Please select a color:", "Locking Computer", null) in list( "red", "blue", "green", "yellow", "black", "white")
- if((user.get_active_hand() != src || user.stat || user.restrained()))
- return
- switch(t1)
- if("red")
- color = "FF0000"
- if("blue")
- color = "0000FF"
- if("green")
- color = "00FF00"
- if("yellow")
- color = "FFFF00"
- if("violet")
- color = "FF00FF"
- if("white")
- color = "FFFFFF"
- if("black")
- color = "333333"
- icon_state = "paint_[t1]"
- add_fingerprint(user)
+/obj/item/weapon/reagent_containers/glass/paint/afterattack(turf/simulated/target, mob/user, proximity)
+ if(!proximity)
return
-
-
-/obj/item/weapon/paint/afterattack(turf/target, mob/user as mob, proximity)
- if(!proximity) return
- if(!istype(target) || istype(target, /turf/space))
- return
- var/ind = "[initial(target.icon)][color]"
- if(!cached_icons[ind])
- var/icon/overlay = new/icon(initial(target.icon))
- overlay.Blend("#[color]",ICON_MULTIPLY)
- overlay.SetIntensity(1.4)
- target.icon = overlay
- cached_icons[ind] = target.icon
+ if(istype(target) && reagents.total_volume >= 5)
+ user.visible_message("[target] has been splashed with something by [user]!")
+ spawn(5)
+ reagents.reaction(target, TOUCH)
+ reagents.remove_any(5)
else
- target.icon = cached_icons[ind]
- return
+ return ..()
-/obj/item/weapon/paint/paint_remover
- name = "Paint remover"
- icon_state = "paint_neutral"
+/obj/item/weapon/reagent_containers/glass/paint/red
+ name = "red paint bucket"
+ icon_state = "paint_red"
+ list_reagents = list("paint_red" = 70)
- afterattack(turf/target, mob/user as mob)
- if(istype(target) && target.icon != initial(target.icon))
- target.icon = initial(target.icon)
- return
-*/
+/obj/item/weapon/reagent_containers/glass/paint/green
+ name = "green paint bucket"
+ icon_state = "paint_green"
+ list_reagents = list("paint_green" = 70)
-datum/reagent/paint
- name = "Paint"
- id = "paint_"
- description = "Floor paint is used to color floor tiles."
- reagent_state = 2
- color = "#808080"
+/obj/item/weapon/reagent_containers/glass/paint/blue
+ name = "blue paint bucket"
+ icon_state = "paint_blue"
+ list_reagents = list("paint_blue" = 70)
- reaction_turf(var/turf/T, var/volume)
- if(!istype(T) || istype(T, /turf/space))
- return
- T.color = color
+/obj/item/weapon/reagent_containers/glass/paint/yellow
+ name = "yellow paint bucket"
+ icon_state = "paint_yellow"
+ list_reagents = list("paint_yellow" = 70)
- reaction_obj(var/obj/O, var/volume)
- ..()
- if(istype(O,/obj/item/weapon/light))
- O.color = color
+/obj/item/weapon/reagent_containers/glass/paint/violet
+ name = "violet paint bucket"
+ icon_state = "paint_violet"
+ list_reagents = list("paint_violet" = 70)
- red
- name = "Red Paint"
- id = "paint_red"
- color = "#FF0000"
+/obj/item/weapon/reagent_containers/glass/paint/black
+ name = "black paint bucket"
+ icon_state = "paint_black"
+ list_reagents = list("paint_black" = 70)
- green
- name = "Green Paint"
- color = "#00FF00"
- id = "paint_green"
+/obj/item/weapon/reagent_containers/glass/paint/white
+ name = "white paint bucket"
+ icon_state = "paint_white"
+ list_reagents = list("paint_white" = 70)
- blue
- name = "Blue Paint"
- color = "#0000FF"
- id = "paint_blue"
-
- yellow
- name = "Yellow Paint"
- color = "#FFFF00"
- id = "paint_yellow"
-
- violet
- name = "Violet Paint"
- color = "#FF00FF"
- id = "paint_violet"
-
- black
- name = "Black Paint"
- color = "#333333"
- id = "paint_black"
-
- white
- name = "White Paint"
- color = "#FFFFFF"
- id = "paint_white"
-
-datum/reagent/paint_remover
- name = "Paint Remover"
- id = "paint_remover"
- description = "Paint remover is used to remove floor paint from floor tiles."
- reagent_state = 2
- color = "#808080"
-
- reaction_turf(var/turf/T, var/volume)
- if(istype(T) && T.icon != initial(T.icon))
- T.icon = initial(T.icon)
- return
+/obj/item/weapon/reagent_containers/glass/paint/remover
+ name = "paint remover bucket"
+ list_reagents = list("paint_remover" = 70)
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/pneumaticCannon.dm b/code/game/objects/items/weapons/pneumaticCannon.dm
index 88d3f202ac6..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)
..()
@@ -141,6 +149,7 @@
/obj/item/stack/packageWrap = 8,
/obj/item/pipe = 2)
time = 300
+ category = CAT_WEAPON
/obj/item/weapon/pneumatic_cannon/proc/updateTank(obj/item/weapon/tank/thetank, removing = 0, mob/living/carbon/human/user)
if(removing)
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/shards.dm b/code/game/objects/items/weapons/shards.dm
index bcc09a86f16..4e5de260926 100644
--- a/code/game/objects/items/weapons/shards.dm
+++ b/code/game/objects/items/weapons/shards.dm
@@ -16,8 +16,8 @@
hitsound = 'sound/weapons/bladeslice.ogg'
/obj/item/weapon/shard/suicide_act(mob/user)
- to_chat(viewers(user), pick("\red [user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.",
- "\red [user] is slitting \his throat with \the [src]! It looks like \he's trying to commit suicide."))
+ to_chat(viewers(user), pick("[user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.",
+ "[user] is slitting \his throat with \the [src]! It looks like \he's trying to commit suicide."))
return (BRUTELOSS)
/obj/item/weapon/shard/New()
@@ -55,7 +55,7 @@
var/mob/living/M = AM
if(M.incorporeal_move || M.flying)//you are incorporal or flying..no shard stepping!
return
- to_chat(M, "\red You step on \the [src]!")
+ to_chat(M, "You step on \the [src]!")
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
if(ishuman(M))
var/mob/living/carbon/human/H = M
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 2155aeb69c6..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
@@ -40,4 +41,5 @@
result = /obj/item/weapon/picket_sign
reqs = list(/obj/item/stack/rods = 1,
/obj/item/stack/sheet/cardboard = 2)
- time = 80
\ No newline at end of file
+ time = 80
+ category = CAT_MISC
\ No newline at end of file
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 43d0897b2f9..c3a92c3ce48 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.
@@ -181,8 +183,8 @@
"/obj/item/weapon/melee/classic_baton",
"/obj/item/device/flashlight/seclite",
"/obj/item/taperoll/police",
- "/obj/item/weapon/melee/classic_baton/telescopic"
- )
+ "/obj/item/weapon/melee/classic_baton/telescopic",
+ "/obj/item/weapon/restraints/legcuffs/bola")
/obj/item/weapon/storage/belt/security/sec/New()
..()
@@ -312,6 +314,10 @@
"/obj/item/ammo_casing/shotgun"
)
+/obj/item/weapon/storage/belt/bandolier/New()
+ ..()
+ update_icon()
+
/obj/item/weapon/storage/belt/bandolier/full/New()
..()
new /obj/item/ammo_casing/shotgun/beanbag(src)
@@ -435,6 +441,31 @@
icon_state = "fannypack_yellow"
item_state = "fannypack_yellow"
+/obj/item/weapon/storage/belt/rapier
+ name = "rapier sheath"
+ desc = "Can hold rapiers."
+ icon_state = "sheath"
+ item_state = "sheath"
+ storage_slots = 1
+ max_w_class = 4
+ can_hold = list("/obj/item/weapon/melee/rapier")
+
+/obj/item/weapon/storage/belt/rapier/update_icon()
+ icon_state = "[initial(icon_state)]"
+ item_state = "[initial(item_state)]"
+ if(contents.len)
+ icon_state = "[initial(icon_state)]-rapier"
+ item_state = "[initial(item_state)]-rapier"
+ if(isliving(loc))
+ var/mob/living/L = loc
+ L.update_inv_belt()
+ ..()
+
+/obj/item/weapon/storage/belt/rapier/New()
+ ..()
+ new /obj/item/weapon/melee/rapier(src)
+ update_icon()
+
// -------------------------------------
// Bluespace Belt
// -------------------------------------
@@ -476,7 +507,7 @@
allow_quick_empty = 1
can_hold = list(
"/obj/item/weapon/grenade/smokebomb",
- "/obj/item/weapon/legcuffs/bolas"
+ "/obj/item/weapon/restraints/legcuffs/bola"
)
flags = NODROP
@@ -492,8 +523,8 @@
new /obj/item/weapon/grenade/smokebomb(src)
new /obj/item/weapon/grenade/smokebomb(src)
new /obj/item/weapon/grenade/smokebomb(src)
- new /obj/item/weapon/legcuffs/bolas(src)
- new /obj/item/weapon/legcuffs/bolas(src)
+ new /obj/item/weapon/restraints/legcuffs/bola(src)
+ new /obj/item/weapon/restraints/legcuffs/bola(src)
processing_objects.Add(src)
cooldown = world.time
@@ -504,7 +535,7 @@
for(S in src)
smokecount++
bolacount = 0
- var/obj/item/weapon/legcuffs/bolas/B
+ var/obj/item/weapon/restraints/legcuffs/bola/B
for(B in src)
bolacount++
if(smokecount < 4)
@@ -513,7 +544,7 @@
smokecount++
if(bolacount < 2)
while(bolacount < 2)
- new /obj/item/weapon/legcuffs/bolas(src)
+ new /obj/item/weapon/restraints/legcuffs/bola(src)
bolacount++
cooldown = world.time
update_icon()
diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm
index c66d9b56150..8a9b86d4e81 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"
@@ -77,7 +78,7 @@
if((istype(M, /mob/living/carbon/human) && prob(60)))
bless(M)
for(var/mob/O in viewers(M, null))
- O.show_message(text("\red [] heals [] with the power of [src.deity_name]!", user, M), 1)
+ O.show_message(text("[] heals [] with the power of [src.deity_name]!", user, M), 1)
to_chat(M, "\red May the power of [src.deity_name] compel you to be healed!")
playsound(src.loc, "punch", 25, 1, -1)
else
@@ -85,11 +86,11 @@
M.adjustBrainLoss(10)
to_chat(M, "\red You feel dumber.")
for(var/mob/O in viewers(M, null))
- O.show_message(text("\red [] beats [] over the head with []!", user, M, src), 1)
+ O.show_message(text("[] beats [] over the head with []!", user, M, src), 1)
playsound(src.loc, "punch", 25, 1, -1)
else if(M.stat == 2)
for(var/mob/O in viewers(M, null))
- O.show_message(text("\red [] smacks []'s lifeless corpse with [].", user, M, src), 1)
+ O.show_message(text("[] smacks []'s lifeless corpse with [].", user, M, src), 1)
playsound(src.loc, "punch", 25, 1, -1)
return
diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm
index 8348bef8bb1..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
@@ -705,3 +706,73 @@
new /obj/item/weapon/lipstick/green(src)
new /obj/item/weapon/lipstick/blue(src)
new /obj/item/weapon/lipstick/white(src)
+
+#define NODESIGN "None"
+#define NANOTRASEN "NanotrasenStandard"
+#define SYNDI "SyndiSnacks"
+#define HEART "Heart"
+#define SMILE "SmileyFace"
+
+/obj/item/weapon/storage/box/papersack
+ name = "paper sack"
+ desc = "A sack neatly crafted out of paper."
+ icon_state = "paperbag_None"
+ item_state = "paperbag_None"
+ foldable = null
+ var/design = NODESIGN
+
+/obj/item/weapon/storage/box/papersack/update_icon()
+ if(!contents.len)
+ icon_state = "[item_state]"
+ else icon_state = "[item_state]_closed"
+
+/obj/item/weapon/storage/box/papersack/attackby(obj/item/weapon/W, mob/user, params)
+ if(istype(W, /obj/item/weapon/pen))
+ //if a pen is used on the sack, dialogue to change its design appears
+ if(contents.len)
+ to_chat(user, "You can't modify [src] with items still inside!")
+ return
+ var/list/designs = list(NODESIGN, NANOTRASEN, SYNDI, HEART, SMILE)
+ var/switchDesign = input("Select a Design:", "Paper Sack Design", designs[1]) as null|anything in designs
+ if(!switchDesign)
+ return
+ if(get_dist(usr, src) > 1 && !usr.incapacitated())
+ to_chat(usr, "You have moved too far away!")
+ return
+ if(design == switchDesign)
+ return
+ to_chat(usr, "You make some modifications to [src] using your pen.")
+ design = switchDesign
+ icon_state = "paperbag_[design]"
+ item_state = "paperbag_[design]"
+ switch(design)
+ if(NODESIGN)
+ desc = "A sack neatly crafted out of paper."
+ if(NANOTRASEN)
+ desc = "A standard Nanotrasen paper lunch sack for loyal employees on the go."
+ if(SYNDI)
+ desc = "The design on this paper sack is a remnant of the notorious 'SyndieSnacks' program."
+ if(HEART)
+ desc = "A paper sack with a heart etched onto the side."
+ if(SMILE)
+ desc = "A paper sack with a crude smile etched onto the side."
+ return
+ else if(is_sharp(W))
+ if(!contents.len)
+ if(item_state == "paperbag_None")
+ to_chat(user, "You cut eyeholes into [src].")
+ new /obj/item/clothing/head/papersack(user.loc)
+ qdel(src)
+ return
+ else if(item_state == "paperbag_SmileyFace")
+ to_chat(user, "You cut eyeholes into [src] and modify the design.")
+ new /obj/item/clothing/head/papersack/smiley(user.loc)
+ qdel(src)
+ return
+ return ..()
+
+#undef NODESIGN
+#undef NANOTRASEN
+#undef SYNDI
+#undef HEART
+#undef SMILE
\ No newline at end of file
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 82ee049d51d..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/advanced/bruise_pack(src)
- new /obj/item/stack/medical/advanced/bruise_pack(src)
- new /obj/item/stack/medical/advanced/bruise_pack(src)
- new /obj/item/stack/medical/advanced/ointment(src)
- new /obj/item/stack/medical/advanced/ointment(src)
- new /obj/item/stack/medical/splint(src)
- return
+ 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/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 305befe2ecb..3e7b63857cb 100644
--- a/code/game/objects/items/weapons/stunbaton.dm
+++ b/code/game/objects/items/weapons/stunbaton.dm
@@ -23,7 +23,13 @@
update_icon()
return
-/obj/item/weapon/melee/baton/CheckParts()
+/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
update_icon()
@@ -47,11 +53,11 @@
/obj/item/weapon/melee/baton/update_icon()
if(status)
- icon_state = "[initial(icon_state)]_active"
+ icon_state = "[initial(name)]_active"
else if(!bcell)
- icon_state = "[initial(icon_state)]_nocell"
+ icon_state = "[initial(name)]_nocell"
else
- icon_state = "[initial(icon_state)]"
+ icon_state = "[initial(name)]"
/obj/item/weapon/melee/baton/examine(mob/user)
..(user)
@@ -198,12 +204,4 @@
throwforce = 5
stunforce = 5
hitcost = 3750
- slot_flags = null
-
-/obj/item/weapon/melee/baton/cattleprod/update_icon()
- if(status)
- icon_state = "stunprod_active"
- else if(!bcell)
- icon_state = "stunprod_nocell"
- else
- icon_state = "stunprod"
+ slot_flags = null
\ No newline at end of file
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/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm
index 485b800c105..12ba6cbce25 100644
--- a/code/game/objects/items/weapons/tanks/tank_types.dm
+++ b/code/game/objects/items/weapons/tanks/tank_types.dm
@@ -26,7 +26,7 @@
examine(mob/user)
if(..(user, 0))
if(air_contents.oxygen < 10)
- to_chat(user, text("\red The meter on the [src.name] indicates you are almost out of air!"))
+ to_chat(user, text("The meter on the [src.name] indicates you are almost out of air!"))
//playsound(usr, 'sound/effects/alert.ogg', 50, 1)
@@ -71,7 +71,7 @@
examine(mob/user)
if(..(user, 0))
if(air_contents.oxygen < 1 && loc==usr)
- to_chat(user, "\red The meter on the [src.name] indicates you are almost out of air!")
+ to_chat(user, "The meter on the [src.name] indicates you are almost out of air!")
user << sound('sound/effects/alert.ogg')
/obj/item/weapon/tank/air/New()
@@ -123,7 +123,7 @@
/obj/item/weapon/tank/plasma/plasmaman/examine(mob/user)
if(..(user, 0))
if(air_contents.toxins < 0.2 && loc==usr)
- to_chat(user, text("\red The meter on the [src.name] indicates you are almost out of plasma!"))
+ to_chat(user, text("The meter on the [src.name] indicates you are almost out of plasma!"))
user << sound('sound/effects/alert.ogg')
/*
@@ -150,7 +150,7 @@
examine(mob/user)
if(..(user, 0))
if(air_contents.oxygen < 0.2 && loc==usr)
- to_chat(user, text("\red The meter on the [src.name] indicates you are almost out of air!"))
+ to_chat(user, text("The meter on the [src.name] indicates you are almost out of air!"))
user << sound('sound/effects/alert.ogg')
/obj/item/weapon/tank/emergency_oxygen/engi
@@ -191,7 +191,7 @@
/obj/item/weapon/tank/nitrogen/examine(mob/user)
if(..(user, 0))
if(air_contents.nitrogen < 10)
- to_chat(user, text("\red The meter on the [src.name] indicates you are almost out of air!"))
+ to_chat(user, text("The meter on the [src.name] indicates you are almost out of air!"))
//playsound(usr, 'sound/effects/alert.ogg', 50, 1)
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..15650f188d9 100644
--- a/code/game/objects/items/weapons/teleportation.dm
+++ b/code/game/objects/items/weapons/teleportation.dm
@@ -48,7 +48,7 @@ Frequency:
return 1
var/turf/current_location = get_turf(usr)//What turf is the user on?
- if(!current_location ||( current_location.z in config.admin_levels))//If turf was not found or they're on z level 2.
+ if(!current_location || is_admin_level(current_location.z))//If turf was not found or they're in the admin zone
to_chat(usr, "\The [src] is malfunctioning.")
return 1
@@ -107,7 +107,7 @@ 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.
+ if(!current_location||!is_teleport_allowed(current_location.z))//If turf was not found or they're somewhere teleproof
to_chat(user, "\The [src] is malfunctioning.")
return
var/list/L = list( )
diff --git a/code/game/objects/items/weapons/teleprod.dm b/code/game/objects/items/weapons/teleprod.dm
new file mode 100644
index 00000000000..0bc1b23f6d6
--- /dev/null
+++ b/code/game/objects/items/weapons/teleprod.dm
@@ -0,0 +1,18 @@
+/obj/item/weapon/melee/baton/cattleprod/teleprod
+ name = "teleprod"
+ desc = "A prod with a bluespace crystal on the end. The crystal doesn't look too fun to touch."
+ icon_state = "teleprod_nocell"
+ item_state = "teleprod"
+ origin_tech = "combat=2;bluespace=4;materials=3"
+
+/obj/item/weapon/melee/baton/cattleprod/teleprod/attack(mob/living/carbon/M, mob/living/carbon/user)//handles making things teleport when hit
+ ..()
+ if(status)
+ if((CLUMSY in user.mutations) && prob(50))
+ user.visible_message("[user] accidentally hits themself with [src]!", \
+ "You accidentally hit yourself with [src]!")
+ user.Weaken(stunforce*3)
+ deductcharge(hitcost)
+ do_teleport(user, get_turf(user), 50)//honk honk
+ else if(iscarbon(M) && !M.anchored)
+ do_teleport(M, get_turf(M), 15)
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm
index 7ecbef740cd..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)
@@ -283,20 +283,91 @@
w_class = 4
slot_flags = SLOT_BACK
force_unwielded = 10
- force_wielded = 18 // Was 13, Buffed - RR
+ force_wielded = 18
throwforce = 20
- throw_speed = 3
+ throw_speed = 4
armour_penetration = 10
- no_spin_thrown = 1 // Thrown spears that spin look dumb. -Fox
+ materials = list(MAT_METAL=1150, MAT_GLASS=2075)
+ hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
+ sharp = 1
+ edge = 1
+ no_spin_thrown = 1
+ var/obj/item/weapon/grenade/explosive = null
+ var/war_cry = "AAAAARGH!!!"
/obj/item/weapon/twohanded/spear/update_icon()
- icon_state = "spearglass[wielded]"
- return
+ if(explosive)
+ icon_state = "spearbomb[wielded]"
+ else
+ icon_state = "spearglass[wielded]"
-/obj/item/weapon/twohanded/spear/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
- playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
- return ..()
+/obj/item/weapon/twohanded/spear/afterattack(atom/movable/AM, mob/user, proximity)
+ if(!proximity)
+ return
+ if(isturf(AM)) //So you can actually melee with it
+ return
+ if(explosive && wielded)
+ user.say("[war_cry]")
+ explosive.forceMove(AM)
+ explosive.prime()
+ qdel(src)
+
+/obj/item/weapon/twohanded/spear/throw_impact(atom/target)
+ . = ..()
+ if(explosive)
+ explosive.prime()
+ qdel(src)
+
+/obj/item/weapon/twohanded/spear/AltClick(mob/user)
+ ..()
+ if(!explosive)
+ return
+ if(ismob(loc))
+ var/mob/M = loc
+ var/input = stripped_input(M, "What do you want your war cry to be? You will shout it when you hit someone in melee.", ,"", 50)
+ if(input)
+ war_cry = input
+
+/obj/item/weapon/twohanded/spear/CheckParts(list/parts_list)
+ ..()
+ if(explosive)
+ explosive.forceMove(get_turf(loc))
+ explosive = null
+ update_icon()
+ var/obj/item/weapon/grenade/G = locate() in contents
+ if(G)
+ explosive = G
+ name = "explosive lance"
+ desc = "A makeshift spear with [G] attached to it. Alt+click on the spear to set your war cry!"
+ update_icon()
+
+//GREY TIDE
+/obj/item/weapon/twohanded/spear/grey_tide
+ icon_state = "spearglass0"
+ name = "\improper Grey Tide"
+ desc = "Recovered from the aftermath of a revolt aboard Defense Outpost Theta Aegis, in which a seemingly endless tide of Assistants caused heavy casualities among Nanotrasen military forces."
+ force_unwielded = 15
+ force_wielded = 25
+ throwforce = 20
+ throw_speed = 4
+ attack_verb = list("gored")
+
+/obj/item/weapon/twohanded/spear/grey_tide/afterattack(atom/movable/AM, mob/living/user, proximity)
+ ..()
+ if(!proximity)
+ return
+ user.faction |= "greytide(\ref[user])"
+ if(isliving(AM))
+ var/mob/living/L = AM
+ if(istype (L, /mob/living/simple_animal/hostile/illusion))
+ return
+ 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)
//Putting heads on spears
/obj/item/organ/external/head/attackby(var/obj/item/weapon/W, var/mob/living/user, params)
@@ -348,6 +419,53 @@
name = "Kidan spear"
desc = "A spear brought over from the Kidan homeworld."
+// DIY CHAINSAW
+/obj/item/weapon/twohanded/required/chainsaw
+ name = "chainsaw"
+ desc = "A versatile power tool. Useful for limbing trees and delimbing humans."
+ icon_state = "gchainsaw_off"
+ flags = CONDUCT
+ force = 13
+ w_class = 5
+ throwforce = 13
+ throw_speed = 2
+ throw_range = 4
+ materials = list(MAT_METAL=13000)
+ origin_tech = "materials=3;engineering=4;combat=2"
+ attack_verb = list("sawed", "cut", "hacked", "carved", "cleaved", "butchered", "felled", "timbered")
+ hitsound = "swing_hit"
+ sharp = 1
+ edge = 1
+ actions_types = list(/datum/action/item_action/startchainsaw)
+ var/on = 0
+
+/obj/item/weapon/twohanded/required/chainsaw/attack_self(mob/user)
+ on = !on
+ to_chat(user, "As you pull the starting cord dangling from [src], [on ? "it begins to whirr." : "the chain stops moving."]")
+ if(on)
+ playsound(loc, 'sound/weapons/chainsawstart.ogg', 50, 1)
+ force = on ? 21 : 13
+ throwforce = on ? 21 : 13
+ icon_state = "gchainsaw_[on ? "on" : "off"]"
+
+ if(hitsound == "swing_hit")
+ hitsound = 'sound/weapons/chainsaw.ogg'
+ else
+ hitsound = "swing_hit"
+
+ if(src == user.get_active_hand()) //update inhands
+ user.update_inv_l_hand()
+ user.update_inv_r_hand()
+ for(var/X in actions)
+ var/datum/action/A = X
+ A.UpdateButtonIcon()
+
+/obj/item/weapon/twohanded/required/chainsaw/doomslayer
+ name = "OOOH BABY"
+ desc = "VRRRRRRR!!!"
+ armour_penetration = 100
+
+
///CHAINSAW///
/obj/item/weapon/twohanded/chainsaw
icon_state = "chainsaw0"
@@ -576,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/items/weapons/wires.dm b/code/game/objects/items/weapons/wires.dm
index 2e9fcdbff1a..4d2e539042f 100644
--- a/code/game/objects/items/weapons/wires.dm
+++ b/code/game/objects/items/weapons/wires.dm
@@ -12,7 +12,7 @@
attack_verb = list("whipped", "lashed", "disciplined", "tickled")
suicide_act(mob/user)
- to_chat(viewers(user), "\red [user] is strangling \himself with the [src.name]! It looks like \he's trying to commit suicide.")
+ to_chat(viewers(user), "[user] is strangling \himself with the [src.name]! It looks like \he's trying to commit suicide.")
return (OXYLOSS)
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..1831b983f2c 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -192,7 +192,7 @@
return
var/obj/item/weapon/rcs/E = W
if(E.rcell && (E.rcell.charge >= E.chargecost))
- if(!(src.z in config.contact_levels))
+ if(!is_level_reachable(src.z))
to_chat(user, "The rapid-crate-sender can't locate any telepads!")
return
if(E.mode == 0)
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..640539e745b 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
@@ -15,17 +15,21 @@
else
new /obj/item/weapon/storage/backpack/satchel_cap(src)
new /obj/item/weapon/book/manual/faxes(src)
+ new /obj/item/clothing/head/crown/fancy(src)
new /obj/item/weapon/storage/backpack/duffel/captain(src)
new /obj/item/clothing/suit/captunic(src)
new /obj/item/clothing/suit/captunic/capjacket(src)
+ new /obj/item/clothing/under/captainparade(src)
new /obj/item/clothing/head/caphat/parade(src)
- new /obj/item/clothing/under/dress/dress_cap(src)
new /obj/item/clothing/under/rank/captain(src)
- new /obj/item/clothing/suit/armor/vest/capcarapace(src)
+ new /obj/item/clothing/under/dress/dress_cap(src)
+ new /obj/item/clothing/suit/armor/vest/capcarapace/alt(src)
new /obj/item/weapon/cartridge/captain(src)
new /obj/item/clothing/shoes/brown(src)
+ new /obj/item/clothing/shoes/laceup(src)
new /obj/item/device/radio/headset/heads/captain/alt(src)
new /obj/item/clothing/gloves/color/captain(src)
+ new /obj/item/weapon/storage/belt/rapier(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/door_remote/captain(src)
@@ -317,6 +321,8 @@
icon_opened = "cabinetdetective_open"
icon_broken = "cabinetdetective_broken"
icon_off = "cabinetdetective_broken"
+ burn_state = FLAMMABLE
+ burntime = 20
New()
..()
@@ -339,6 +345,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/utility_closets.dm b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm
index 3fda5f8c603..c2401919497 100644
--- a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm
@@ -89,12 +89,6 @@
new /obj/item/weapon/extinguisher(src)
new /obj/item/clothing/head/hardhat/red(src)
-/obj/structure/closet/firecloset/update_icon()
- if(!opened)
- icon_state = icon_closed
- else
- icon_state = icon_opened
-
/*
* Tool Closet
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..bf74c11ee84 100644
--- a/code/game/objects/structures/crates_lockers/crates.dm
+++ b/code/game/objects/structures/crates_lockers/crates.dm
@@ -84,7 +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))
- if(!(src.z in config.player_levels))
+ if(!is_level_reachable(src.z)) // This is inconsistent with the closet sending code
to_chat(user, "The rapid-crate-sender can't locate any telepads!")
return
if(E.mode == 0)
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..11a0bae8849 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()
@@ -303,7 +308,7 @@
//this bush marks the edge of the map, you can't destroy it
to_chat(user, "\red You flail away at the undergrowth, but it's too thick here.")
else
- user.visible_message("\red [user] begins clearing away [src].","\red You begin clearing away [src].")
+ user.visible_message("[user] begins clearing away [src].","\red You begin clearing away [src].")
spawn(rand(15,30))
if(get_dist(user,src) < 2)
to_chat(user, "\blue You clear away [src].")
diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm
index d6d2c84ecd4..aee81bdf7f8 100644
--- a/code/game/objects/structures/inflatable.dm
+++ b/code/game/objects/structures/inflatable.dm
@@ -97,7 +97,7 @@
if(!istype(W))
return
if(can_puncture(W))
- visible_message("\red [user] pierces [src] with [W]!")
+ visible_message("[user] pierces [src] with [W]!")
deflate(1)
if(W.damtype == BRUTE || W.damtype == BURN)
hit(W.force)
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/misc.dm b/code/game/objects/structures/misc.dm
index 81511f16aa1..3e9fba93105 100644
--- a/code/game/objects/structures/misc.dm
+++ b/code/game/objects/structures/misc.dm
@@ -48,12 +48,12 @@
playsound(user.loc, 'sound/effects/sparks2.ogg', 50, 1)
anim(user.loc,user,'icons/mob/mob.dmi',,"phasein",,user.dir)
- to_chat(user, "\blue VOID-Shift translocation successful")
+ to_chat(user, "VOID-Shift translocation successful")
if("No")
- to_chat(user, "\red Process aborted!")
+ to_chat(user, "Process aborted!")
return
else
- to_chat(user, "\red FĆAL �Rr�R: ŧer nt recgnized, c-cntr-r䣧-ç äcked.")
+ to_chat(user, "FĆAL �Rr�R: ŧer nt recgnized, c-cntr-r䣧-ç äcked.")
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 b8ce126bbfa..e2e287052ff 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
@@ -72,8 +73,18 @@
handle_rotation()
return
+/obj/structure/stool/bed/chair/AltClick(mob/user)
+ if(user.incapacitated())
+ to_chat(user, "You can't do that right now!")
+ return
+ if(!Adjacent(user))
+ return
+ rotate()
+
// 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/narsie_act()
@@ -104,6 +115,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 b21fa103427..efcef174176 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -373,6 +373,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/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm
index 47e0823f549..4e41daef289 100644
--- a/code/game/objects/structures/windoor_assembly.dm
+++ b/code/game/objects/structures/windoor_assembly.dm
@@ -322,6 +322,14 @@ obj/structure/windoor_assembly/Destroy()
update_icon()
return
+/obj/structure/windoor_assembly/AltClick(mob/user)
+ if(user.incapacitated())
+ to_chat(user, "You can't do that right now!")
+ return
+ if(!Adjacent(user))
+ return
+ revrotate()
+
//Flips the windoor assembly, determines whather the door opens to the left or the right
/obj/structure/windoor_assembly/verb/flip()
set name = "Flip Windoor Assembly"
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 77a38aa056a..22331e4f484 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -321,6 +321,14 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
return
+/obj/structure/window/AltClick(mob/user)
+ if(user.incapacitated())
+ to_chat(user, "You can't do that right now!")
+ return
+ if(!Adjacent(user))
+ return
+ revrotate()
+
/*
/obj/structure/window/proc/updateSilicate()
if(silicateIcon && silicate)
@@ -420,11 +428,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
@@ -452,9 +455,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 93c0368f268..9e5605c3b28 100644
--- a/code/game/response_team.dm
+++ b/code/game/response_team.dm
@@ -88,7 +88,7 @@ var/ert_request_answered = 0
return 0
if(src.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
- to_chat(src, "\blue Upon using the antagHUD you forfeited the ability to join the round.")
+ to_chat(src, "Upon using the antagHUD you forfeited the ability to join the round.")
return 0
if(response_team_members.len > 6)
@@ -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)
@@ -185,7 +189,7 @@ var/ert_request_answered = 0
M.mind.current = M
M.mind.original = M
M.mind.assigned_role = "MODE"
- M.mind.special_role = "Response Team"
+ M.mind.special_role = SPECIAL_ROLE_ERT
if(!(M.mind in ticker.minds))
ticker.minds += M.mind //Adds them to regular mind list.
M.loc = spawn_location
@@ -241,7 +245,7 @@ var/ert_request_answered = 0
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/ert/engineer(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/responseteam(M), slot_in_backpack)
- M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full/multitool(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full/multitool(M), slot_belt)
var/obj/item/weapon/card/id/W = new(src)
W.assignment = "Emergency Response Team Member"
@@ -256,7 +260,7 @@ var/ert_request_answered = 0
pda.ownjob = "Emergency Response Team Member"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
pda.icon_state = "pda-engineer"
- M.equip_to_slot_or_del(pda, slot_belt)
+ M.equip_to_slot_or_del(pda, slot_wear_pda)
if("Security")
@@ -265,7 +269,7 @@ var/ert_request_answered = 0
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/ert/security(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box/responseteam(M), slot_in_backpack)
- M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/security/response_team(M), slot_in_backpack)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/security/response_team(M), slot_belt)
var/obj/item/weapon/card/id/W = new(src)
W.assignment = "Emergency Response Team Member"
@@ -280,7 +284,7 @@ var/ert_request_answered = 0
pda.ownjob = "Emergency Response Team Member"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
pda.icon_state = "pda-security"
- M.equip_to_slot_or_del(pda, slot_belt)
+ M.equip_to_slot_or_del(pda, slot_wear_pda)
if("Medic")
@@ -302,7 +306,7 @@ var/ert_request_answered = 0
pda.ownjob = "Emergency Response Team Member"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
pda.icon_state = "pda-medical"
- M.equip_to_slot_or_del(pda, slot_belt)
+ M.equip_to_slot_or_del(pda, slot_wear_pda)
if("Commander")
@@ -329,7 +333,7 @@ var/ert_request_answered = 0
pda.owner = M.real_name
pda.ownjob = "Emergency Response Team Leader"
pda.name = "PDA-[M.real_name] ([pda.ownjob])"
- M.equip_to_slot_or_del(pda, slot_belt)
+ M.equip_to_slot_or_del(pda, slot_wear_pda)
/datum/response_team/proc/cannot_send_team()
command_announcement.Announce("[station_name()], we are unfortunately unable to send you an Emergency Response Team at this time.", "ERT Unavailable")
@@ -382,12 +386,13 @@ var/ert_request_answered = 0
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest/ert/medical(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health(M), slot_glasses)
+ M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/medical/response_team(M), slot_belt)
+
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/ert/medical(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/o2(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/brute(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(M), slot_in_backpack)
- M.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/medical/response_team(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/CMO(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_r_store)
@@ -398,11 +403,12 @@ var/ert_request_answered = 0
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest/ert/command(M), slot_wear_suit)
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/gun/energy/gun(M), slot_belt)
+
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/ert/command(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/restraints/handcuffs(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/lockbox/loyalty(M), slot_in_backpack)
- M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/pinpointer(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_r_store)
@@ -462,6 +468,7 @@ var/ert_request_answered = 0
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)
+ M.equip_to_slot_or_del(new /obj/item/weapon/defibrillator/compact/loaded(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/ert/medical(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(M), slot_in_backpack)
@@ -470,22 +477,22 @@ var/ert_request_answered = 0
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/surgery(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(M), slot_in_backpack)
- M.equip_to_slot_or_del(new /obj/item/weapon/defibrillator/compact/loaded(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/CMO(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_r_store)
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)
+ M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun/nuclear(M), slot_belt)
+
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/ert/commander(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/restraints/handcuffs(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/lockbox/loyalty(M), slot_in_backpack)
- M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun/nuclear(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/pinpointer(M), slot_l_store)
@@ -544,12 +551,12 @@ var/ert_request_answered = 0
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/night(M), slot_glasses)
+ M.equip_to_slot_or_del(new /obj/item/weapon/defibrillator/compact/loaded(M), slot_belt)
+
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/ert/medical(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/surgery(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol(M), slot_in_backpack)
- M.equip_to_slot_or_del(new /obj/item/weapon/defibrillator/compact/loaded(M), slot_in_backpack)
-
M.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/hypospray/combat/nanites(src), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_r_store)
@@ -562,13 +569,13 @@ var/ert_request_answered = 0
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/night(M), slot_glasses)
+ M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun/nuclear(M), slot_belt)
+
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/ert/commander(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer/swat(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/restraints/handcuffs(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/lockbox/loyalty(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse/pistol(M), slot_in_backpack)
- M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun/nuclear(M), slot_in_backpack)
-
M.equip_to_slot_or_del(new /obj/item/weapon/pinpointer(M), slot_l_store)
M.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(M), slot_r_store)
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/floor/light_floor.dm b/code/game/turfs/simulated/floor/light_floor.dm
index f221494414f..149ec108ec8 100644
--- a/code/game/turfs/simulated/floor/light_floor.dm
+++ b/code/game/turfs/simulated/floor/light_floor.dm
@@ -51,7 +51,7 @@
set_light(0)
icon_state = "light_off"
-/turf/simulated/floor/light/ChangeTurf(turf/T)
+/turf/simulated/floor/light/BeforeChange()
set_light(0)
..()
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index 4d7c8ccd5da..45f0e42a2aa 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -32,14 +32,16 @@
/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)
+/turf/simulated/wall/BeforeChange()
for(var/obj/effect/E in src)
+ // such quality code
if(E.name == "Wallrot")
qdel(E)
- . = ..(newtype)
+ . = ..()
//Appearance
@@ -110,13 +112,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)
@@ -469,4 +469,4 @@
/turf/simulated/wall/narsie_act()
if(prob(20))
- ChangeTurf(/turf/simulated/wall/cult)
\ No newline at end of file
+ ChangeTurf(/turf/simulated/wall/cult)
diff --git a/code/game/turfs/simulated/walls_misc.dm b/code/game/turfs/simulated/walls_misc.dm
index 880ed534d10..c1e7e6b2c31 100644
--- a/code/game/turfs/simulated/walls_misc.dm
+++ b/code/game/turfs/simulated/walls_misc.dm
@@ -31,4 +31,10 @@
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."
+ icon = 'icons/turf/walls/coated_reinforced_wall.dmi'
+ 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/space/space.dm b/code/game/turfs/space/space.dm
index 48f892caff0..fb10d23ae9c 100644
--- a/code/game/turfs/space/space.dm
+++ b/code/game/turfs/space/space.dm
@@ -23,6 +23,17 @@
/turf/space/Destroy()
return QDEL_HINT_LETMELIVE
+/turf/space/BeforeChange()
+ ..()
+ var/datum/space_level/S = space_manager.get_zlev(z)
+ S.remove_from_transit(src)
+
+/turf/space/AfterChange(ignore_air, keep_cabling = FALSE)
+ ..()
+ var/datum/space_level/S = space_manager.get_zlev(z)
+ S.add_to_transit(src)
+ S.apply_transition(src)
+
/turf/space/proc/update_starlight()
if(!config.starlight)
return
@@ -69,7 +80,7 @@
/turf/space/Entered(atom/movable/A as mob|obj, atom/OL, ignoreRest = 0)
..()
-
+
if(destination_z && A && (src in A.locs))
A.x = destination_x
A.y = destination_y
@@ -199,3 +210,26 @@
/turf/space/can_have_cabling()
return 0
+
+/turf/space/proc/set_transition_north(dest_z)
+ destination_x = x
+ destination_y = TRANSITIONEDGE + 2
+ destination_z = dest_z
+
+/turf/space/proc/set_transition_south(dest_z)
+ destination_x = x
+ destination_y = world.maxy - TRANSITIONEDGE - 2
+ destination_z = dest_z
+
+/turf/space/proc/set_transition_east(dest_z)
+ destination_x = TRANSITIONEDGE + 2
+ destination_y = y
+ destination_z = dest_z
+
+/turf/space/proc/set_transition_west(dest_z)
+ destination_x = world.maxx - TRANSITIONEDGE - 2
+ destination_y = y
+ destination_z = dest_z
+
+/turf/space/proc/remove_transitions()
+ destination_z = initial(destination_z)
diff --git a/code/game/turfs/space/transit.dm b/code/game/turfs/space/transit.dm
index 1b7c9343ca2..9feda5d78a7 100644
--- a/code/game/turfs/space/transit.dm
+++ b/code/game/turfs/space/transit.dm
@@ -93,7 +93,8 @@
var/max = world.maxx-TRANSITIONEDGE
var/min = 1+TRANSITIONEDGE
- var/_z = rand(ZLEVEL_CENTCOMM+1,MAX_Z) //select a random space zlevel
+ var/datum/space_level/dest = pick(levels_by_trait(REACHABLE))
+ var/_z = dest.zpos //select a random space zlevel
//now select coordinates for a border turf
var/_x
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index d76791e7f97..5946ef77f0a 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,7 +163,9 @@
var/list/old_affecting_lights = affecting_lights
var/old_lighting_overlay = lighting_overlay
var/old_blueprint_data = blueprint_data
+ var/old_obscured = obscured
+ BeforeChange()
if(air_master)
air_master.remove_from_active(src)
var/turf/W = new path(src)
@@ -189,8 +188,13 @@
else
lighting_clear_overlays()
+ obscured = old_obscured
+
return W
+/turf/proc/BeforeChange()
+ return
+
// I'm including `ignore_air` because BYOND lacks positional-only arguments
/turf/proc/AfterChange(ignore_air, keep_cabling = FALSE) //called after a turf has been replaced in ChangeTurf()
levelupdate()
diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm
index afc8db25b65..31c8c322596 100644
--- a/code/game/verbs/suicide.dm
+++ b/code/game/verbs/suicide.dm
@@ -104,7 +104,7 @@
if(confirm == "Yes")
suiciding = 1
- to_chat(viewers(loc), "\red [src]'s brain is growing dull and lifeless. It looks like it's lost the will to live.")
+ to_chat(viewers(loc), "[src]'s brain is growing dull and lifeless. It looks like it's lost the will to live.")
spawn(50)
death(0)
suiciding = 0
@@ -125,7 +125,7 @@
if(confirm == "Yes")
suiciding = 1
- to_chat(viewers(src), "\red [src] is powering down. It looks like \he's trying to commit suicide.")
+ to_chat(viewers(src), "[src] is powering down. It looks like \he's trying to commit suicide.")
//put em at -175
adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
updatehealth()
@@ -145,7 +145,7 @@
if(confirm == "Yes")
suiciding = 1
- to_chat(viewers(src), "\red [src] is powering down. It looks like \he's trying to commit suicide.")
+ to_chat(viewers(src), "[src] is powering down. It looks like \he's trying to commit suicide.")
//put em at -175
adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
updatehealth()
@@ -182,7 +182,7 @@
if(confirm == "Yes")
suiciding = 1
- to_chat(viewers(src), "\red [src] is thrashing wildly! It looks like \he's trying to commit suicide.")
+ to_chat(viewers(src), "[src] is thrashing wildly! It looks like \he's trying to commit suicide.")
//put em at -175
adjustOxyLoss(max(175 - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
updatehealth()
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 233cc931831..b8a1bda8c4c 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -739,10 +739,6 @@ var/global/nologevent = 0
if(ticker.mode.config_tag == "cult")
return 2
return 1
- if(M.mind in ticker.mode.malf_ai)
- if(ticker.mode.config_tag == "malfunction")
- return 2
- return 1
if(M.mind in ticker.mode.syndicates)
if(ticker.mode.config_tag == "nuclear")
return 2
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index f96a4833ef6..67d3531ac0e 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -113,7 +113,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,
@@ -151,8 +152,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,
@@ -161,7 +160,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 34fcd5738c2..f08121634d3 100644
--- a/code/modules/admin/buildmode.dm
+++ b/code/modules/admin/buildmode.dm
@@ -7,7 +7,9 @@
#define AREAEDIT_BUILDMODE 7
#define FILL_BUILDMODE 8
#define LINK_BUILDMODE 9
-#define NUM_BUILDMODES 9
+#define BOOM_BUILDMODE 10
+#define SAVE_BUILDMODE 11
+#define NUM_BUILDMODES 11
/obj/screen/buildmode
icon = 'icons/misc/buildmode.dmi'
@@ -80,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)
@@ -167,6 +172,14 @@
var/list/link_lines = list()
var/obj/link_obj
var/valid_links = 0
+ //Explosion mode
+ var/devastation = -1
+ var/heavy = -1
+ var/light = -1
+ var/flash = -1
+ var/flames = -1
+ // Saving mode
+ var/use_json = TRUE
/datum/click_intercept/buildmode/New(client/c)
..()
@@ -250,6 +263,17 @@
to_chat(user, "Left Mouse Button on obj = Select button to link")
to_chat(user, "Right Mouse Button on obj = Link/unlink to selected button")
to_chat(user, "***********************************************************")
+ if(BOOM_BUILDMODE)
+ 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)
@@ -322,6 +346,20 @@
if(ispath(objholder,/mob) && !check_rights(R_DEBUG,0))
objholder = /obj/structure/closet
deselect_region()
+ if(BOOM_BUILDMODE)
+ devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
+ if(devastation == null) devastation = -1
+ var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null
+ if(heavy == null) heavy = -1
+ var/light = input("Range of light impact. -1 to none", text("Input")) as num|null
+ if(light == null) light = -1
+ var/flash = input("Range of flash. -1 to none", text("Input")) as num|null
+ if(flash == null) flash = -1
+ 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)
@@ -591,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"
@@ -601,3 +639,29 @@
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
+ 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/player_panel.dm b/code/modules/admin/player_panel.dm
index 42be00bea23..3ac7b7a0258 100644
--- a/code/modules/admin/player_panel.dm
+++ b/code/modules/admin/player_panel.dm
@@ -461,7 +461,7 @@
dat += "| Head not found! | "
dat += " | "
- if(istype(ticker.mode, /datum/game_mode/blob))
+ if(GAMEMODE_IS_BLOB)
var/datum/game_mode/blob/mode = ticker.mode
dat += "
| Blob | | | "
dat += "| Progress: [blobs.len]/[mode.blobwincount] | "
@@ -523,10 +523,6 @@
if(ticker.mode.greyshirts.len)
dat += check_role_table("Greyshirts", ticker.mode.greyshirts)
- var/datum/game_mode/mutiny/mutiny = get_mutiny_mode()
- if(mutiny)
- dat += mutiny.check_antagonists_ui(src)
-
dat += "
|
|
|