diff --git a/baystation12.dme b/baystation12.dme
index 9423cef1e0..a0495f8487 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -886,6 +886,7 @@
#include "code\modules\mining\satchel_ore_boxdm.dm"
#include "code\modules\mining\drilling\distribution.dm"
#include "code\modules\mining\drilling\drill.dm"
+#include "code\modules\mining\drilling\scanner.dm"
#include "code\modules\mob\abilities.dm"
#include "code\modules\mob\death.dm"
#include "code\modules\mob\emote.dm"
@@ -954,6 +955,7 @@
#include "code\modules\mob\living\carbon\brain\death.dm"
#include "code\modules\mob\living\carbon\brain\emote.dm"
#include "code\modules\mob\living\carbon\brain\life.dm"
+#include "code\modules\mob\living\carbon\brain\login.dm"
#include "code\modules\mob\living\carbon\brain\MMI.dm"
#include "code\modules\mob\living\carbon\brain\posibrain.dm"
#include "code\modules\mob\living\carbon\brain\say.dm"
@@ -982,6 +984,7 @@
#include "code\modules\mob\living\carbon\metroid\login.dm"
#include "code\modules\mob\living\carbon\metroid\metroid.dm"
#include "code\modules\mob\living\carbon\metroid\powers.dm"
+#include "code\modules\mob\living\carbon\metroid\say.dm"
#include "code\modules\mob\living\carbon\metroid\subtypes.dm"
#include "code\modules\mob\living\carbon\metroid\update_icons.dm"
#include "code\modules\mob\living\carbon\monkey\death.dm"
diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm
index 78c9336e8c..f6746f3dab 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm
@@ -173,7 +173,7 @@ Thus, the two variables affect pump operation are set in New():
return 1
-/obj/machinery/atmospherics/binary/pump/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/atmospherics/binary/pump/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(stat & (BROKEN|NOPOWER))
return
@@ -190,7 +190,7 @@ Thus, the two variables affect pump operation are set in New():
)
// update the ui if it exists, returns null if no ui is passed/found
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
diff --git a/code/ATMOSPHERICS/components/omni_devices/filter.dm b/code/ATMOSPHERICS/components/omni_devices/filter.dm
index d52090b0c7..1d1d335cb8 100644
--- a/code/ATMOSPHERICS/components/omni_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/filter.dm
@@ -112,14 +112,14 @@
return
-/obj/machinery/atmospherics/omni/filter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/atmospherics/omni/filter/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
usr.set_machine(src)
var/list/data = new()
data = build_uidata()
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "omni_filter.tmpl", "Omni Filter Control", 330, 330)
diff --git a/code/ATMOSPHERICS/components/omni_devices/mixer.dm b/code/ATMOSPHERICS/components/omni_devices/mixer.dm
index 64af4057b0..3b5dd1780f 100644
--- a/code/ATMOSPHERICS/components/omni_devices/mixer.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/mixer.dm
@@ -137,14 +137,14 @@
return 1
-/obj/machinery/atmospherics/omni/mixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/atmospherics/omni/mixer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
usr.set_machine(src)
var/list/data = new()
data = build_uidata()
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "omni_mixer.tmpl", "Omni Mixer Control", 360, 330)
diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm
index 9b99b80f27..34f746b8a6 100644
--- a/code/ATMOSPHERICS/components/unary/heat_source.dm
+++ b/code/ATMOSPHERICS/components/unary/heat_source.dm
@@ -77,7 +77,7 @@
/obj/machinery/atmospherics/unary/heater/attack_hand(mob/user as mob)
src.ui_interact(user)
-/obj/machinery/atmospherics/unary/heater/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/atmospherics/unary/heater/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// this is the data which will be sent to the ui
var/data[0]
data["on"] = on ? 1 : 0
@@ -93,7 +93,7 @@
data["gasTemperatureClass"] = temp_class
// update the ui if it exists, returns null if no ui is passed/found
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
diff --git a/code/WorkInProgress/Chinsky/overmap/ships/computers/engine_control.dm b/code/WorkInProgress/Chinsky/overmap/ships/computers/engine_control.dm
index 07d6a4579b..41f2c4cdf9 100644
--- a/code/WorkInProgress/Chinsky/overmap/ships/computers/engine_control.dm
+++ b/code/WorkInProgress/Chinsky/overmap/ships/computers/engine_control.dm
@@ -30,7 +30,7 @@
ui_interact(user)
-/obj/machinery/computer/engines/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/computer/engines/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(!linked)
return
@@ -50,7 +50,7 @@
data["engines_info"] = enginfo
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "engines_control.tmpl", "[linked.name] Engines Control", 380, 530)
ui.set_initial_data(data)
diff --git a/code/WorkInProgress/Chinsky/overmap/ships/computers/helm.dm b/code/WorkInProgress/Chinsky/overmap/ships/computers/helm.dm
index f81e569abc..d78934f574 100644
--- a/code/WorkInProgress/Chinsky/overmap/ships/computers/helm.dm
+++ b/code/WorkInProgress/Chinsky/overmap/ships/computers/helm.dm
@@ -70,7 +70,7 @@
ui_interact(user)
-/obj/machinery/computer/helm/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/computer/helm/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(!linked)
return
@@ -101,7 +101,7 @@
data["locations"] = locations
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "helm.tmpl", "[linked.name] Helm Control", 380, 530)
ui.set_initial_data(data)
diff --git a/code/WorkInProgress/Chinsky/overmap/ships/computers/shuttle.dm b/code/WorkInProgress/Chinsky/overmap/ships/computers/shuttle.dm
index c63ad2d763..4ebc9469da 100644
--- a/code/WorkInProgress/Chinsky/overmap/ships/computers/shuttle.dm
+++ b/code/WorkInProgress/Chinsky/overmap/ships/computers/shuttle.dm
@@ -44,7 +44,7 @@
var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag]
return shuttle && destination && get_dist(home, destination) <= shuttle.range
-/obj/machinery/computer/shuttle_control/explore/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/computer/shuttle_control/explore/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag]
if (!istype(shuttle))
@@ -103,7 +103,7 @@
"can_force" = can_go && shuttle.can_force(),
)
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "shuttle_control_console_exploration.tmpl", "[shuttle_tag] Shuttle Control", 470, 310)
diff --git a/code/WorkInProgress/Sigyn/Department Sec/jobs.dm b/code/WorkInProgress/Sigyn/Department Sec/jobs.dm
index 66e14b040c..7f98a7b6ec 100644
--- a/code/WorkInProgress/Sigyn/Department Sec/jobs.dm
+++ b/code/WorkInProgress/Sigyn/Department Sec/jobs.dm
@@ -83,9 +83,9 @@ proc/assign_sec_to_department(var/mob/living/carbon/human/H)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
- var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
- L.imp_in = H
- L.implanted = 1
+
+ implant_loyalty(H)
+
return 1
/obj/item/device/radio/headset/headset_sec/department/New()
diff --git a/code/WorkInProgress/Sigyn/Softcurity/jobs.dm b/code/WorkInProgress/Sigyn/Softcurity/jobs.dm
index a214626d1c..243dc47c75 100644
--- a/code/WorkInProgress/Sigyn/Softcurity/jobs.dm
+++ b/code/WorkInProgress/Sigyn/Softcurity/jobs.dm
@@ -23,9 +23,9 @@
H.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/taser(H), slot_s_store)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
- var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
- L.imp_in = H
- L.implanted = 1
+
+ H.implant_loyalty(src) // Will not do so if config is set to disallow.
+
return 1
@@ -52,9 +52,9 @@
H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
- var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
- L.imp_in = H
- L.implanted = 1
+
+ H.implant_loyalty(src) // // Will not do so if config is set to disallow.
+
return 1
@@ -89,9 +89,7 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_in_backpack)
- var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
- L.imp_in = H
- L.implanted = 1
+ H.implant_loyalty(src) // Will not do so if config is set to disallow.
return 1
@@ -118,9 +116,9 @@
H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
- var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
- L.imp_in = H
- L.implanted = 1
+
+ H.implant_loyalty(src) // Will not do so if config is set to disallow.
+
return 1
/datum/job/hop
diff --git a/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm b/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm
index 88f06f98e7..e74c6fce6c 100644
--- a/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm
+++ b/code/WorkInProgress/Sigyn/Softcurity/secure_closet.dm
@@ -70,7 +70,7 @@
new /obj/item/weapon/storage/backpack/satchel_sec(src)
new /obj/item/weapon/cartridge/hos(src)
new /obj/item/device/radio/headset/heads/hos(src)
- new /obj/item/weapon/storage/lockbox/loyalty(src)
+ if (config.use_loyalty_implants) new /obj/item/weapon/storage/lockbox/loyalty(src)
new /obj/item/weapon/storage/flashbang_kit(src)
new /obj/item/weapon/storage/belt/security(src)
new /obj/item/device/flash(src)
diff --git a/code/WorkInProgress/computer3/computer.dm b/code/WorkInProgress/computer3/computer.dm
index 95824e555e..093f7b5ed7 100644
--- a/code/WorkInProgress/computer3/computer.dm
+++ b/code/WorkInProgress/computer3/computer.dm
@@ -75,6 +75,15 @@
set name = "Reset Computer"
set category = "Object"
set src in view(1)
+
+ if(usr.stat || usr.restrained() || usr.lying || !istype(usr, /mob/living))
+ usr << "\red You can't do that."
+ return
+
+ if(!Adjacent(usr))
+ usr << "You can't reach it."
+ return
+
Reset()
New(var/L, var/built = 0)
@@ -446,4 +455,4 @@
icon_state = "wallframe"
density = 0
pixel_y = -3
- show_keyboard = 0
\ No newline at end of file
+ show_keyboard = 0
diff --git a/code/WorkInProgress/computer3/computers/law.dm b/code/WorkInProgress/computer3/computers/law.dm
index 8f7a639ae2..409552cc79 100644
--- a/code/WorkInProgress/computer3/computers/law.dm
+++ b/code/WorkInProgress/computer3/computers/law.dm
@@ -13,7 +13,7 @@
set category = "Object"
set name = "Access Computer's Internals"
set src in oview(1)
- if(get_dist(src, usr) > 1 || usr.restrained() || usr.lying || usr.stat || istype(usr, /mob/living/silicon))
+ if(!Adjacent(usr) || usr.restrained() || usr.lying || usr.stat || istype(usr, /mob/living/silicon) || !istype(usr, /mob/living))
return
opened = !opened
diff --git a/code/WorkInProgress/computer3/laptop.dm b/code/WorkInProgress/computer3/laptop.dm
index 1868f82c83..b88f782c2c 100644
--- a/code/WorkInProgress/computer3/laptop.dm
+++ b/code/WorkInProgress/computer3/laptop.dm
@@ -30,10 +30,18 @@
var/obj/machinery/computer3/laptop/stored_computer = null
verb/open_computer()
- set name = "open laptop"
+ set name = "Open Laptop"
set category = "Object"
set src in view(1)
+ if(usr.stat || usr.restrained() || usr.lying || !istype(usr, /mob/living))
+ usr << "\red You can't do that."
+ return
+
+ if(!Adjacent(usr))
+ usr << "You can't reach it."
+ return
+
if(!istype(loc,/turf))
usr << "[src] is too bulky! You'll have to set it down."
return
@@ -58,11 +66,45 @@
del src
AltClick()
- open_computer()
+ if(Adjacent(usr))
+ open_computer()
+
+//Quickfix until Snapshot works out how he wants to redo power. ~Z
+/obj/item/device/laptop/verb/eject_id()
+ set category = "Object"
+ set name = "Eject ID Card"
+ set src in oview(1)
+
+ if(stored_computer)
+ stored_computer.eject_id()
+
+/obj/machinery/computer3/laptop/verb/eject_id()
+ set category = "Object"
+ set name = "Eject ID Card"
+ set src in oview(1)
+
+ var/obj/item/part/computer/cardslot/C = locate() in src.contents
+
+ if(!C)
+ usr << "There is no card port on the laptop."
+ return
+
+ var/obj/item/weapon/card/id/card
+ if(C.reader)
+ card = C.reader
+ else if(C.writer)
+ card = C.writer
+ else
+ usr << "There is nothing to remove from the laptop card port."
+ return
+
+ usr << "You remove [card] from the laptop."
+ C.remove(card)
+
/obj/machinery/computer3/laptop
name = "Laptop Computer"
- desc = "A clamshell portable computer. It is open."
+ desc = "A clamshell portable computer. It is open."
icon_state = "laptop"
density = 0
@@ -82,6 +124,14 @@
set category = "Object"
set src in view(1)
+ if(usr.stat || usr.restrained() || usr.lying || !istype(usr, /mob/living))
+ usr << "\red You can't do that."
+ return
+
+ if(!Adjacent(usr))
+ usr << "You can't reach it."
+ return
+
if(istype(loc,/obj/item/device/laptop))
testing("Close closed computer")
return
@@ -133,5 +183,5 @@
AltClick()
- close_computer()
-
+ if(Adjacent(usr))
+ close_computer()
diff --git a/code/WorkInProgress/kilakk/responseteam.dm b/code/WorkInProgress/kilakk/responseteam.dm
index 6faafad342..8e0cdbc638 100644
--- a/code/WorkInProgress/kilakk/responseteam.dm
+++ b/code/WorkInProgress/kilakk/responseteam.dm
@@ -231,9 +231,7 @@ var/global/admin_emergency_team = 0 // Used for admin-spawned response teams
// equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(src), slot_in_backpack) // Regular medkit
// Loyalty implants
- var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(src)
- L.imp_in = src
- L.implanted = 1
+ implant_loyalty(src)
// ID cards
var/obj/item/weapon/card/id/E = new(src)
diff --git a/code/ZAS/Phoron.dm b/code/ZAS/Phoron.dm
index 1e3df5292a..f96e47c188 100644
--- a/code/ZAS/Phoron.dm
+++ b/code/ZAS/Phoron.dm
@@ -118,7 +118,7 @@ obj/var/contaminated = 0
/mob/living/carbon/human/proc/burn_eyes()
//The proc that handles eye burning.
if(prob(20)) src << "\red Your eyes burn!"
- var/datum/organ/internal/eyes/E = internal_organs["eyes"]
+ var/datum/organ/internal/eyes/E = internal_organs_by_name["eyes"]
E.damage += 2.5
eye_blurry = min(eye_blurry+1.5,50)
if (prob(max(0,E.damage - 15) + 1) &&!eye_blind)
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index 90a68b02b6..22c8a11300 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -63,7 +63,7 @@
slime.Discipline = 0
if(power >= 3)
- if(istype(slime, /mob/living/carbon/slime/adult))
+ if(slime.is_adult)
if(prob(5 + round(power/2)))
if(slime.Victim)
diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm
index 0abb637cce..3f74cbd0ea 100644
--- a/code/_onclick/telekinesis.dm
+++ b/code/_onclick/telekinesis.dm
@@ -141,7 +141,7 @@ var/const/tk_maxrange = 15
else
apply_focus_overlay()
- focus.throw_at(target, 10, 1)
+ focus.throw_at(target, 10, 1, user)
last_throw = world.time
return
diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
index f9d825d896..66747abbb5 100644
--- a/code/controllers/configuration.dm
+++ b/code/controllers/configuration.dm
@@ -112,6 +112,8 @@
var/revival_cloning = 1
var/revival_brain_life = -1
+ var/use_loyalty_implants = 0
+
//Used for modifying movement speed for mobs.
//Unversal modifiers
var/run_speed = 0
@@ -521,10 +523,21 @@
config.revival_cloning = value
if("revival_brain_life")
config.revival_brain_life = value
+ if("organ_health_multiplier")
+ config.organ_health_multiplier = value / 100
+ if("organ_regeneration_multiplier")
+ config.organ_regeneration_multiplier = value / 100
+ if("bones_can_break")
+ config.bones_can_break = value
+ if("limbs_can_break")
+ config.limbs_can_break = value
+
+
if("run_speed")
config.run_speed = value
if("walk_speed")
config.walk_speed = value
+
if("human_delay")
config.human_delay = value
if("robot_delay")
@@ -537,14 +550,11 @@
config.slime_delay = value
if("animal_delay")
config.animal_delay = value
- if("organ_health_multiplier")
- config.organ_health_multiplier = value / 100
- if("organ_regeneration_multiplier")
- config.organ_regeneration_multiplier = value / 100
- if("bones_can_break")
- config.bones_can_break = value
- if("limbs_can_break")
- config.limbs_can_break = value
+
+
+ if("use_loyalty_implants")
+ config.use_loyalty_implants = 1
+
else
log_misc("Unknown setting in configuration: '[name]'")
diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm
index 2ae5d1db1e..0b314a2531 100644
--- a/code/controllers/master_controller.dm
+++ b/code/controllers/master_controller.dm
@@ -33,7 +33,9 @@ datum/controller/game_controller
var/mob/list/expensive_mobs = list()
var/rebuild_active_areas = 0
- var/list/shuttle_list //for debugging and VV
+ var/list/shuttle_list // For debugging and VV
+ var/datum/ore_distribution/asteroid_ore_map // For debugging and VV.
+
datum/controller/game_controller/New()
//There can be only one master_controller. Out with the old and in with the new.
@@ -108,9 +110,9 @@ datum/controller/game_controller/proc/setup_objects()
T.broadcast_status()
//Create the mining ore distribution map.
- world << "Generating resource distribution map."
- var/datum/ore_distribution/O = new()
- O.populate_distribution_map()
+ //Create the mining ore distribution map.
+ asteroid_ore_map = new /datum/ore_distribution()
+ asteroid_ore_map.populate_distribution_map()
//Set up spawn points.
populate_spawn_points()
diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm
index e8785482a9..a331dab556 100644
--- a/code/controllers/verbs.dm
+++ b/code/controllers/verbs.dm
@@ -1,6 +1,27 @@
//TODO: rewrite and standardise all controller datums to the datum/controller type
//TODO: allow all controllers to be deleted for clean restarts (see WIP master controller stuff) - MC done - lighting done
+/client/proc/show_distribution_map()
+ set category = "Debug"
+ set name = "Show Distribution Map"
+ set desc = "Print the asteroid ore distribution map to the world."
+
+ if(!holder) return
+
+ if(master_controller && master_controller.asteroid_ore_map)
+ master_controller.asteroid_ore_map.print_distribution_map()
+
+/client/proc/remake_distribution_map()
+ set category = "Debug"
+ set name = "Remake Distribution Map"
+ set desc = "Rebuild the asteroid ore distribution map."
+
+ if(!holder) return
+
+ if(master_controller && master_controller.asteroid_ore_map)
+ master_controller.asteroid_ore_map = new /datum/ore_distribution()
+ master_controller.asteroid_ore_map.populate_distribution_map()
+
/client/proc/restart_controller(controller in list("Master","Failsafe","Lighting","Supply"))
set category = "Debug"
set name = "Restart Controller"
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 936eea26d1..b749bfb07e 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -510,14 +510,9 @@ datum/mind
I.Del()
break
H << "\blue Your loyalty implant has been deactivated."
- if("add")
- var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
- L.imp_in = H
- L.implanted = 1
- var/datum/organ/external/affected = H.organs_by_name["head"]
- affected.implants += L
- L.part = affected
+ if("add")
+ H.implant_loyalty(H, override = TRUE)
H << "\red You somehow have become the recepient of a loyalty transplant, and it just activated!"
if(src in ticker.mode.revolutionaries)
special_role = null
@@ -541,6 +536,8 @@ datum/mind
special_role = null
current << "\red The nanobots in the loyalty implant remove all thoughts about being a traitor to Nanotrasen. Have a nice day!"
log_admin("[key_name_admin(usr)] has de-traitor'ed [current].")
+ else
+
else if (href_list["revolution"])
current.hud_updateflag |= (1 << SPECIALROLE_HUD)
diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm
index 7990329aa1..abca12f25e 100755
--- a/code/datums/supplypacks.dm
+++ b/code/datums/supplypacks.dm
@@ -681,14 +681,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
access = access_armory
group = "Security"
-/datum/supply_packs/loyalty
- name = "Loyalty implant crate"
- contains = list (/obj/item/weapon/storage/lockbox/loyalty)
- cost = 60
- containertype = /obj/structure/closet/crate/secure
- containername = "Loyalty implant crate"
- access = access_armory
- group = "Security"
/datum/supply_packs/ballistic
name = "Ballistic gear crate"
@@ -725,6 +717,17 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
access = access_armory
group = "Security"
+/*
+/datum/supply_packs/loyalty
+ name = "Loyalty implant crate"
+ contains = list (/obj/item/weapon/storage/lockbox/loyalty)
+ cost = 60
+ containertype = /obj/structure/closet/crate/secure
+ containername = "Loyalty implant crate"
+ access = access_armory
+ group = "Security"
+*/
+
/datum/supply_packs/expenergy
name = "Experimental energy gear crate"
contains = list(/obj/item/clothing/suit/armor/laserproof,
diff --git a/code/defines/obj.dm b/code/defines/obj.dm
index 25a5242c07..c7e3df319d 100644
--- a/code/defines/obj.dm
+++ b/code/defines/obj.dm
@@ -303,9 +303,10 @@ var/global/list/PDA_Manifest = list()
throw_speed = 1
throw_range = 20
flags = FPRINT | TABLEPASS | CONDUCT
+
afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
user.drop_item()
- src.throw_at(target, throw_range, throw_speed)
+ src.throw_at(target, throw_range, throw_speed, user)
/obj/effect/stop
var/victim = null
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index 31f3f0cb97..3d40b556f6 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -87,8 +87,6 @@
for(var/area/RA in related)
for(var/obj/machinery/camera/C in RA)
C.network.Remove("Atmosphere Alarms")
- for (var/obj/machinery/alarm/AA in RA)
- AA.update_icon()
for(var/mob/living/silicon/aiPlayer in player_list)
aiPlayer.cancelAlarm("Atmosphere", src, src)
for(var/obj/machinery/computer/station_alert/a in machines)
@@ -101,8 +99,6 @@
for(var/obj/machinery/camera/C in RA)
cameras += C
C.network.Add("Atmosphere Alarms")
- for (var/obj/machinery/alarm/AA in RA)
- AA.update_icon()
for(var/mob/living/silicon/aiPlayer in player_list)
aiPlayer.triggerAlarm("Atmosphere", src, cameras, src)
for(var/obj/machinery/computer/station_alert/a in machines)
@@ -110,6 +106,10 @@
air_doors_close()
atmosalm = danger_level
+ for(var/area/RA in related)
+ for (var/obj/machinery/alarm/AA in RA)
+ AA.update_icon()
+
return 1
return 0
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 3253f272d0..05a52137cc 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -22,27 +22,6 @@
//Detective Work, used for the duplicate data points kept in the scanners
var/list/original_atom
-/atom/proc/throw_impact(atom/hit_atom, var/speed)
- if(istype(hit_atom,/mob/living))
- var/mob/living/M = hit_atom
- M.hitby(src,speed)
-
- else if(isobj(hit_atom))
- var/obj/O = hit_atom
- if(!O.anchored)
- step(O, src.dir)
- O.hitby(src,speed)
-
- else if(isturf(hit_atom))
- var/turf/T = hit_atom
- if(T.density)
- spawn(2)
- step(src, turn(src.dir, 180))
- if(istype(src,/mob/living))
- var/mob/living/M = src
- M.take_organ_damage(20)
-
-
/atom/proc/assume_air(datum/gas_mixture/giver)
return null
@@ -237,6 +216,8 @@ its easier to just keep the beam vertical.
return
/atom/proc/hitby(atom/movable/AM as mob|obj)
+ if (density)
+ AM.throwing = 0
return
/atom/proc/add_hiddenprint(mob/living/M as mob)
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 41da5ea7c8..de6b84d655 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -7,6 +7,8 @@
var/l_move_time = 1
var/m_flag = 1
var/throwing = 0
+ var/thrower
+ var/turf/throw_source = null
var/throw_speed = 2
var/throw_range = 7
var/moved_recently = 0
@@ -25,7 +27,6 @@
/atom/movable/Bump(var/atom/A as mob|obj|turf|area, yes)
if(src.throwing)
src.throw_impact(A)
- src.throwing = 0
spawn( 0 )
if ((A && yes))
@@ -44,6 +45,29 @@
return 1
return 0
+//called when src is thrown into hit_atom
+/atom/movable/proc/throw_impact(atom/hit_atom, var/speed)
+ if(istype(hit_atom,/mob/living))
+ var/mob/living/M = hit_atom
+ M.hitby(src,speed)
+
+ else if(isobj(hit_atom))
+ var/obj/O = hit_atom
+ if(!O.anchored)
+ step(O, src.dir)
+ O.hitby(src,speed)
+
+ else if(isturf(hit_atom))
+ src.throwing = 0
+ var/turf/T = hit_atom
+ if(T.density)
+ spawn(2)
+ step(src, turn(src.dir, 180))
+ if(istype(src,/mob/living))
+ var/mob/living/M = src
+ M.turf_collision(T, speed)
+
+//decided whether a movable atom being thrown can pass through the turf it is in.
/atom/movable/proc/hit_check(var/speed)
if(src.throwing)
for(var/atom/A in get_turf(src))
@@ -51,18 +75,17 @@
if(istype(A,/mob/living))
if(A:lying) continue
src.throw_impact(A,speed)
- if(src.throwing == 1)
- src.throwing = 0
if(isobj(A))
if(A.density && !A.throwpass) // **TODO: Better behaviour for windows which are dense, but shouldn't always stop movement
src.throw_impact(A,speed)
- src.throwing = 0
-/atom/movable/proc/throw_at(atom/target, range, speed)
+/atom/movable/proc/throw_at(atom/target, range, speed, thrower)
if(!target || !src) return 0
//use a modified version of Bresenham's algorithm to get from the atom's current position to that of the target
src.throwing = 1
+ src.thrower = thrower
+ src.throw_source = get_turf(src) //store the origin turf
if(usr)
if(HULK in usr.mutations)
@@ -149,8 +172,10 @@
a = get_area(src.loc)
//done throwing, either because it hit something or it finished moving
- src.throwing = 0
if(isobj(src)) src.throw_impact(get_turf(src),speed)
+ src.throwing = 0
+ src.thrower = null
+ src.throw_source = null
//Overlays
diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm
index 235156d3d3..af1fe64a9f 100644
--- a/code/game/dna/dna_modifier.dm
+++ b/code/game/dna/dna_modifier.dm
@@ -345,7 +345,7 @@
*
* @return nothing
*/
-/obj/machinery/computer/scan_consolenew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/computer/scan_consolenew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(user == connected.occupant || user.stat)
return
@@ -425,7 +425,7 @@
data["beakerVolume"] += R.volume
// update the ui if it exists, returns null if no ui is passed/found
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
diff --git a/code/game/gamemodes/epidemic/epidemic.dm b/code/game/gamemodes/epidemic/epidemic.dm
index d0db2d66b9..4a0712c712 100644
--- a/code/game/gamemodes/epidemic/epidemic.dm
+++ b/code/game/gamemodes/epidemic/epidemic.dm
@@ -71,7 +71,7 @@
world << sound('sound/AI/commandreport.ogg')
// add an extra law to the AI to make sure it cooperates with the heads
- var/extra_law = "Crew authorized to know of pathogen [virus_name]'s existence are: Heads of command, any crew member with loyalty implant. Do not allow unauthorized personnel to gain knowledge of [virus_name]. Aid authorized personnel in quarantining and neutrlizing the outbreak. This law overrides all other laws."
+ var/extra_law = "Crew authorized to know of pathogen [virus_name]'s existence are: Heads of command. Do not allow unauthorized personnel to gain knowledge of [virus_name]. Aid authorized personnel in quarantining and neutrlizing the outbreak. This law overrides all other laws."
for(var/mob/living/silicon/ai/M in world)
M.add_ion_law(extra_law)
M << "\red " + extra_law
diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm
index acc7c3e853..3f141f2156 100644
--- a/code/game/jobs/job/captain.dm
+++ b/code/game/jobs/job/captain.dm
@@ -5,7 +5,7 @@
faction = "Station"
total_positions = 1
spawn_positions = 1
- supervisors = "Nanotrasen officials and Space law"
+ supervisors = "Nanotrasen officials and Corporate Regulations"
selection_color = "#ccccff"
idtype = /obj/item/weapon/card/id/gold
req_admin_notify = 1
@@ -32,13 +32,10 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
- var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
- L.imp_in = H
- L.implanted = 1
world << "[H.real_name] is the captain!"
- var/datum/organ/external/affected = H.organs_by_name["head"]
- affected.implants += L
- L.part = affected
+
+ H.implant_loyalty(src)
+
return 1
get_access()
diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm
index 0576e5b823..57350f087a 100644
--- a/code/game/jobs/job/civilian.dm
+++ b/code/game/jobs/job/civilian.dm
@@ -357,10 +357,8 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
- var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
- L.imp_in = H
- L.implanted = 1
- var/datum/organ/external/affected = H.organs_by_name["head"]
- affected.implants += L
- L.part = affected
+
+ H.implant_loyalty(H)
+
+
return 1
diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm
index 69e9babb0a..c83c0c0ea2 100644
--- a/code/game/jobs/job/security.dm
+++ b/code/game/jobs/job/security.dm
@@ -39,12 +39,7 @@
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
- var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
- L.imp_in = H
- L.implanted = 1
- var/datum/organ/external/affected = H.organs_by_name["head"]
- affected.implants += L
- L.part = affected
+ H.implant_loyalty(H)
return 1
@@ -165,4 +160,4 @@
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
- return 1
+ return 1
diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm
index c8be3a2351..d0600b4cca 100644
--- a/code/game/jobs/job_controller.dm
+++ b/code/game/jobs/job_controller.dm
@@ -377,6 +377,8 @@ var/global/datum/controller/occupations/job_master
if(G.slot)
H.equip_to_slot_or_del(new G.path(H), G.slot)
+ H << "\blue Equipping you with [thing]!"
+
else
spawn_in_storage += thing
@@ -462,15 +464,19 @@ var/global/datum/controller/occupations/job_master
H.equip_to_slot_or_del(BPK, slot_back,1)
//Deferred item spawning.
- var/obj/item/weapon/storage/B = locate(/obj/item/weapon/storage/backpack) in H.contents
+ if(spawn_in_storage && spawn_in_storage.len)
+ var/obj/item/weapon/storage/B
+ for(var/obj/item/weapon/storage/S in H.contents)
+ B = S
+ break
- if(isnull(B) || istype(B))
- B = locate(/obj/item/weapon/storage/box) in H.contents
-
- if(!isnull(B))
- for(var/thing in spawn_in_storage)
- var/datum/gear/G = gear_datums[thing]
- new G.path(B)
+ if(!isnull(B))
+ for(var/thing in spawn_in_storage)
+ H << "\blue Placing [thing] in your [B]!"
+ var/datum/gear/G = gear_datums[thing]
+ new G.path(B)
+ else
+ H << "\red Failed to locate a storage object on your mob, either you spawned with no arms and no backpack or this is a bug."
//TODO: Generalize this by-species
if(H.species)
diff --git a/code/game/machinery/Freezer.dm b/code/game/machinery/Freezer.dm
index 1551ebac4f..85367d9d87 100644
--- a/code/game/machinery/Freezer.dm
+++ b/code/game/machinery/Freezer.dm
@@ -44,7 +44,7 @@
/obj/machinery/atmospherics/unary/cold_sink/freezer/attack_hand(mob/user as mob)
src.ui_interact(user)
-/obj/machinery/atmospherics/unary/cold_sink/freezer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/atmospherics/unary/cold_sink/freezer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// this is the data which will be sent to the ui
var/data[0]
data["on"] = on ? 1 : 0
@@ -62,7 +62,7 @@
data["gasTemperatureClass"] = temp_class
// update the ui if it exists, returns null if no ui is passed/found
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
@@ -90,4 +90,3 @@
/obj/machinery/atmospherics/unary/cold_sink/freezer/process()
..()
-
diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm
index ec5529c80c..dac4bf7b00 100644
--- a/code/game/machinery/adv_med.dm
+++ b/code/game/machinery/adv_med.dm
@@ -332,8 +332,7 @@
else
dat += "
[e.display_name] | - | - | Not Found | "
dat += ""
- for(var/organ_name in occupant.internal_organs)
- var/datum/organ/internal/i = occupant.internal_organs[organ_name]
+ for(var/datum/organ/internal/i in occupant.internal_organs)
var/mech = ""
if(i.robotic == 1)
mech = "Assisted:"
diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm
index 8f0751dc63..d4ac8e186f 100644
--- a/code/game/machinery/alarm.dm
+++ b/code/game/machinery/alarm.dm
@@ -104,7 +104,7 @@
var/phoron_dangerlevel = 0
var/temperature_dangerlevel = 0
var/other_dangerlevel = 0
-
+
var/alarm_sound_cooldown = 200
var/last_sound_time = 0
@@ -173,7 +173,6 @@
if(!istype(location)) return//returns if loc is not simulated
if ((alarm_area.fire || alarm_area.atmosalm >= 2) && world.time > last_sound_time + alarm_sound_cooldown)
- playsound(src.loc, 'sound/machines/airalarm.ogg', 40, 0, 5)
last_sound_time = world.time
var/datum/gas_mixture/environment = location.return_air()
@@ -332,11 +331,11 @@
if((stat & (NOPOWER|BROKEN)) || shorted)
icon_state = "alarmp"
return
-
+
var/icon_level = danger_level
if (alarm_area.atmosalm)
icon_level = max(icon_level, 1) //if there's an atmos alarm but everything is okay locally, no need to go past yellow
-
+
switch(icon_level)
if (0)
icon_state = "alarm0"
@@ -420,6 +419,12 @@
return 1
/obj/machinery/alarm/proc/apply_mode()
+ //propagate mode to other air alarms in the area
+ //TODO: make it so that players can choose between applying the new mode to the room they are in (related area) vs the entire alarm area
+ for (var/area/RA in alarm_area.related)
+ for (var/obj/machinery/alarm/AA in RA)
+ AA.mode = mode
+
switch(mode)
if(AALARM_MODE_SCRUBBING)
for(var/device_id in alarm_area.air_scrub_names)
@@ -736,7 +741,7 @@ Toxins: [phoron_percent]%
output += "Fire alarm in area"
else
output += "No alerts"
-
+
return output
/obj/machinery/alarm/proc/rcon_text()
diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index 3557f1f655..96152823ca 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -241,7 +241,7 @@ update_flag
/obj/machinery/portable_atmospherics/canister/attack_hand(var/mob/user as mob)
return src.ui_interact(user)
-/obj/machinery/portable_atmospherics/canister/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/portable_atmospherics/canister/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if (src.destroyed)
return
@@ -261,7 +261,7 @@ update_flag
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure()))
// update the ui if it exists, returns null if no ui is passed/found
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
diff --git a/code/game/machinery/bots/farmbot.dm b/code/game/machinery/bots/farmbot.dm
index 228b525049..1c0bd0875f 100644
--- a/code/game/machinery/bots/farmbot.dm
+++ b/code/game/machinery/bots/farmbot.dm
@@ -394,7 +394,7 @@
if ( emagged ) // Warning, hungry humans detected: throw fertilizer at them
spawn(0)
fert.loc = src.loc
- fert.throw_at(target, 16, 3)
+ fert.throw_at(target, 16, 3, src)
src.visible_message("\red [src] launches [fert.name] at [target.name]!")
flick("farmbot_broke", src)
spawn (FARMBOT_EMAG_DELAY)
diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm
index fd11787363..b40f511a3b 100644
--- a/code/game/machinery/computer/card.dm
+++ b/code/game/machinery/computer/card.dm
@@ -80,7 +80,7 @@
if(stat & (NOPOWER|BROKEN)) return
ui_interact(user)
-/obj/machinery/computer/card/ui_interact(mob/user, ui_key="main", datum/nanoui/ui=null)
+/obj/machinery/computer/card/ui_interact(mob/user, ui_key="main", var/datum/nanoui/ui = null, var/force_open = 1)
user.set_machine(src)
var/data[0]
@@ -133,7 +133,7 @@
data["regions"] = regions
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "identification_computer.tmpl", src.name, 600, 700)
ui.set_initial_data(data)
diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm
index 528815ad07..d7595e1a29 100644
--- a/code/game/machinery/computer/crew.dm
+++ b/code/game/machinery/computer/crew.dm
@@ -57,7 +57,7 @@
/obj/machinery/computer/crew/interact(mob/user)
ui_interact(user)
-/obj/machinery/computer/crew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/computer/crew/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(stat & (BROKEN|NOPOWER))
return
user.set_machine(src)
@@ -97,7 +97,7 @@
data["crewmembers"] = crewmembers
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "crew_monitor.tmpl", "Crew Monitoring Computer", 900, 600)
ui.set_initial_data(data)
diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm
index 2949498ae3..3898593172 100644
--- a/code/game/machinery/computer/medical.dm
+++ b/code/game/machinery/computer/medical.dm
@@ -253,7 +253,7 @@
switch(href_list["field"])
if("fingerprint")
if (istype(src.active1, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
src.active1.fields["fingerprint"] = t1
@@ -271,55 +271,55 @@
src.active1.fields["age"] = t1
if("mi_dis")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis"] = t1
if("mi_dis_d")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis_d"] = t1
if("ma_dis")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis"] = t1
if("ma_dis_d")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis_d"] = t1
if("alg")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg"] = t1
if("alg_d")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg_d"] = t1
if("cdi")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi"] = t1
if("cdi_d")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi_d"] = t1
if("notes")
if (istype(src.active2, /datum/data/record))
- var/t1 = copytext(html_encode(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(html_encode(trim(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["notes"] = t1
@@ -334,21 +334,21 @@
src.temp = text("Blood Type:
\n\tA- A+
\n\tB- B+
\n\tAB- AB+
\n\tO- O+
", src, src, src, src, src, src, src, src)
if("b_dna")
if (istype(src.active1, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please input DNA hash:", "Med. records", src.active1.fields["dna"], null) as text),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please input DNA hash:", "Med. records", src.active1.fields["dna"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
src.active1.fields["dna"] = t1
if("vir_name")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
- var/t1 = copytext(sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["name"] = t1
if("vir_desc")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
- var/t1 = copytext(sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["description"] = t1
@@ -451,7 +451,7 @@
if (!( istype(src.active2, /datum/data/record) ))
return
var/a2 = src.active2
- var/t1 = copytext(sanitize(input("Add Comment:", "Med. records", null, null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Add Comment:", "Med. records", null, null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
var/counter = 1
diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm
index 58a77c950d..e7060f7577 100644
--- a/code/game/machinery/computer/security.dm
+++ b/code/game/machinery/computer/security.dm
@@ -387,7 +387,7 @@ What a mess.*/
if (!( istype(active2, /datum/data/record) ))
return
var/a2 = active2
- var/t1 = copytext(sanitize(input("Add Comment:", "Secure. records", null, null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Add Comment:", "Secure. records", null, null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
var/counter = 1
@@ -450,19 +450,19 @@ What a mess.*/
switch(href_list["field"])
if("name")
if (istype(active1, /datum/data/record))
- var/t1 = input("Please input name:", "Secure. records", active1.fields["name"], null) as text
+ var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon)))) || active1 != a1)
return
active1.fields["name"] = t1
if("id")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["id"] = t1
if("fingerprint")
if (istype(active1, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["fingerprint"] = t1
@@ -480,31 +480,31 @@ What a mess.*/
active1.fields["age"] = t1
if("mi_crim")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["mi_crim"] = t1
if("mi_crim_d")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["mi_crim_d"] = t1
if("ma_crim")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["ma_crim"] = t1
if("ma_crim_d")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["ma_crim_d"] = t1
if("notes")
if (istype(active2, /datum/data/record))
- var/t1 = copytext(html_encode(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(html_encode(trim(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["notes"] = t1
@@ -531,7 +531,7 @@ What a mess.*/
alert(usr, "You do not have the required rank to do this!")
if("species")
if (istype(active1, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["species"] = t1
diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm
index 27360e963e..bc4d977dad 100644
--- a/code/game/machinery/computer/skills.dm
+++ b/code/game/machinery/computer/skills.dm
@@ -325,19 +325,19 @@ What a mess.*/
switch(href_list["field"])
if("name")
if (istype(active1, /datum/data/record))
- var/t1 = input("Please input name:", "Secure. records", active1.fields["name"], null) as text
+ var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon)))) || active1 != a1)
return
active1.fields["name"] = t1
if("id")
if (istype(active1, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["id"] = t1
if("fingerprint")
if (istype(active1, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["fingerprint"] = t1
@@ -366,7 +366,7 @@ What a mess.*/
alert(usr, "You do not have the required rank to do this!")
if("species")
if (istype(active1, /datum/data/record))
- var/t1 = copytext(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message),1,MAX_MESSAGE_LEN)
+ var/t1 = copytext(trim(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)),1,MAX_MESSAGE_LEN)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["species"] = t1
diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm
index b909404a1c..a82828311c 100644
--- a/code/game/machinery/cryo.dm
+++ b/code/game/machinery/cryo.dm
@@ -73,7 +73,7 @@
*
* @return nothing
*/
-/obj/machinery/atmospherics/unary/cryo_cell/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/atmospherics/unary/cryo_cell/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(user == occupant || user.stat)
return
@@ -121,7 +121,7 @@
data["beakerVolume"] += R.volume
// update the ui if it exists, returns null if no ui is passed/found
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 36007f171d..05f7447283 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -77,6 +77,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
icon_state = "door_closed"
power_channel = ENVIRON
+ explosion_resistance = 15
var/aiControlDisabled = 0 //If 1, AI control is disabled until the AI hacks back in and disables the lock. If 2, the AI has bypassed the lock. If -1, the control is enabled but the AI had bypassed it earlier, so if it is disabled again the AI would have no trouble getting back in.
var/hackProof = 0 // if 1, this door can't be hacked by the AI
var/secondsMainPowerLost = 0 //The number of seconds until power is restored.
diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm
index 59ed905a0a..afd2f72529 100644
--- a/code/game/machinery/doors/airlock_control.dm
+++ b/code/game/machinery/doors/airlock_control.dm
@@ -6,13 +6,16 @@ obj/machinery/door/airlock
var/frequency
var/shockedby = list()
var/datum/radio_frequency/radio_connection
- explosion_resistance = 15
+ var/cur_command = null //the command the door is currently attempting to complete
obj/machinery/door/airlock/proc/can_radio()
if( !arePowerSystemsOn() || (stat & NOPOWER) || isWireCut(AIRLOCK_WIRE_AI_CONTROL) )
return 0
return 1
+obj/machinery/door/airlock/process()
+ ..()
+ execute_current_command()
obj/machinery/door/airlock/receive_signal(datum/signal/signal)
if (!can_radio()) return
@@ -21,7 +24,19 @@ obj/machinery/door/airlock/receive_signal(datum/signal/signal)
if(id_tag != signal.data["tag"] || !signal.data["command"]) return
- switch(signal.data["command"])
+ cur_command = signal.data["command"]
+ execute_current_command()
+
+obj/machinery/door/airlock/proc/execute_current_command()
+ if (!cur_command)
+ return
+
+ do_command(cur_command)
+ if (command_completed(cur_command))
+ cur_command = null
+
+obj/machinery/door/airlock/proc/do_command(var/command)
+ switch(command)
if("open")
open()
@@ -48,9 +63,30 @@ obj/machinery/door/airlock/receive_signal(datum/signal/signal)
lock()
sleep(2)
-
+
send_status()
+obj/machinery/door/airlock/proc/command_completed(var/command)
+ switch(command)
+ if("open")
+ return (!density)
+
+ if("close")
+ return density
+
+ if("unlock")
+ return !locked
+
+ if("lock")
+ return locked
+
+ if("secure_open")
+ return (locked && !density)
+
+ if("secure_close")
+ return (locked && density)
+
+ return 1 //Unknown command. Just assume it's completed.
obj/machinery/door/airlock/proc/send_status()
if(radio_connection)
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 61d26340a5..44d374b85c 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -173,7 +173,7 @@
return src.attack_hand(user)
/obj/machinery/door/window/attack_paw(mob/user as mob)
- if(istype(user, /mob/living/carbon/alien/humanoid) || istype(user, /mob/living/carbon/slime/adult))
+ if(istype(user, /mob/living/carbon/alien/humanoid))
if(src.operating)
return
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
@@ -346,4 +346,4 @@
/obj/machinery/door/window/brigdoor/southright
dir = SOUTH
icon_state = "rightsecure"
- base_state = "rightsecure"
+ base_state = "rightsecure"
diff --git a/code/game/machinery/embedded_controller/airlock_controllers.dm b/code/game/machinery/embedded_controller/airlock_controllers.dm
index 4a48558f87..96177f9a9d 100644
--- a/code/game/machinery/embedded_controller/airlock_controllers.dm
+++ b/code/game/machinery/embedded_controller/airlock_controllers.dm
@@ -17,7 +17,7 @@
/obj/machinery/embedded_controller/radio/airlock/advanced_airlock_controller
name = "Advanced Airlock Controller"
-/obj/machinery/embedded_controller/radio/airlock/advanced_airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/embedded_controller/radio/airlock/advanced_airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
data = list(
@@ -29,7 +29,7 @@
"secure" = program.memory["secure"]
)
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "advanced_airlock_console.tmpl", name, 470, 290)
@@ -75,7 +75,7 @@
name = "Airlock Controller"
tag_secure = 1
-/obj/machinery/embedded_controller/radio/airlock/airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/embedded_controller/radio/airlock/airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
data = list(
@@ -85,7 +85,7 @@
"processing" = program.memory["processing"],
)
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "simple_airlock_console.tmpl", name, 470, 290)
@@ -140,7 +140,7 @@
else
icon_state = "access_control_off"
-/obj/machinery/embedded_controller/radio/airlock/access_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/embedded_controller/radio/airlock/access_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
data = list(
@@ -149,7 +149,7 @@
"processing" = program.memory["processing"]
)
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "door_access_console.tmpl", name, 330, 220)
diff --git a/code/game/machinery/embedded_controller/airlock_docking_controller.dm b/code/game/machinery/embedded_controller/airlock_docking_controller.dm
index 0e9877d797..cb69c4d5bf 100644
--- a/code/game/machinery/embedded_controller/airlock_docking_controller.dm
+++ b/code/game/machinery/embedded_controller/airlock_docking_controller.dm
@@ -11,7 +11,7 @@
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)
+/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(
@@ -24,7 +24,7 @@
"override_enabled" = docking_program.override_enabled,
)
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ 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)
diff --git a/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm b/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm
index 99c7bf5784..d03bffcbae 100644
--- a/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm
+++ b/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm
@@ -22,7 +22,7 @@
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)
+/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]
@@ -35,7 +35,7 @@
"airlocks" = airlocks,
)
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ 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)
@@ -60,7 +60,7 @@
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)
+/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(
@@ -73,7 +73,7 @@
"override_enabled" = airlock_program.override_enabled,
)
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ 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)
diff --git a/code/game/machinery/embedded_controller/escape_pod_docking_controller.dm b/code/game/machinery/embedded_controller/escape_pod_docking_controller.dm
index f84fbf0b32..7a14c9edc2 100644
--- a/code/game/machinery/embedded_controller/escape_pod_docking_controller.dm
+++ b/code/game/machinery/embedded_controller/escape_pod_docking_controller.dm
@@ -2,7 +2,7 @@
/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod
var/datum/shuttle/ferry/escape_pod/pod
-/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
data = list(
@@ -14,7 +14,7 @@
"is_armed" = pod.arming_controller.armed,
)
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "escape_pod_console.tmpl", name, 470, 290)
@@ -44,7 +44,7 @@
docking_program = new/datum/computer/file/embedded_program/docking/simple/escape_pod(src)
program = docking_program
-/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod_berth/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod_berth/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/data[0]
var/armed = null
@@ -58,7 +58,7 @@
"armed" = armed,
)
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "escape_pod_berth_console.tmpl", name, 470, 290)
diff --git a/code/game/machinery/embedded_controller/simple_docking_controller.dm b/code/game/machinery/embedded_controller/simple_docking_controller.dm
index 877247799b..9eee569ae6 100644
--- a/code/game/machinery/embedded_controller/simple_docking_controller.dm
+++ b/code/game/machinery/embedded_controller/simple_docking_controller.dm
@@ -9,7 +9,7 @@
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)
+/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(
@@ -19,7 +19,7 @@
"door_lock" = docking_program.memory["door_status"]["lock"],
)
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ 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)
diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm
index 303e814ef1..eff51fc697 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -81,7 +81,7 @@
O.Weaken(strength)
if (istype(O, /mob/living/carbon/human))
var/mob/living/carbon/human/H = O
- var/datum/organ/internal/eyes/E = H.internal_organs["eyes"]
+ var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"]
if ((E.damage > E.min_bruised_damage && prob(E.damage + 50)))
flick("e_flash", O:flash)
E.damage += rand(1, 5)
diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm
index 4b2fce70cd..b74d3a587a 100644
--- a/code/game/machinery/kitchen/gibber.dm
+++ b/code/game/machinery/kitchen/gibber.dm
@@ -217,7 +217,7 @@
var/obj/item/meatslab = allmeat[i]
var/turf/Tx = locate(src.x - i, src.y, src.z)
meatslab.loc = src.loc
- meatslab.throw_at(Tx,i,3)
+ meatslab.throw_at(Tx,i,3,src)
if (!Tx.density)
new /obj/effect/decal/cleanable/blood/gibs(Tx,i)
src.operating = 0
diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm
index 6242626bc7..b3d3552565 100644
--- a/code/game/machinery/kitchen/smartfridge.dm
+++ b/code/game/machinery/kitchen/smartfridge.dm
@@ -225,7 +225,7 @@
* SmartFridge Menu
********************/
-/obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
user.set_machine(src)
var/is_secure = istype(src,/obj/machinery/smartfridge/secure)
@@ -269,7 +269,7 @@
if (vendor_wires.len > 0)
data["wires"] = vendor_wires
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "smartfridge.tmpl", src.name, 400, 500)
ui.set_initial_data(data)
@@ -403,7 +403,7 @@
if(!throw_item)
return 0
spawn(0)
- throw_item.throw_at(target,16,3)
+ throw_item.throw_at(target,16,3,src)
src.visible_message("\red [src] launches [throw_item.name] at [target.name]!")
return 1
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index 58da1b1d9e..7e6f1e3f7e 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -575,7 +575,7 @@
/obj/machinery/suit_cycler
name = "suit cycler"
- desc = "An industrial machine for repairing, painting and equipping hardsuits."
+ desc = "An industrial machine for painting and refitting hardsuits."
anchored = 1
density = 1
@@ -591,6 +591,7 @@
var/model_text = "" // Some flavour text for the topic box.
var/locked = 1 // If locked, nothing can be taken from or added to the cycler.
var/panel_open = 0 // Hacking!
+ var/can_repair // If set, the cycler can repair hardsuits.
// Wiring bollocks.
var/wires = 15
@@ -604,26 +605,54 @@
//Species that the suits can be configured to fit.
var/list/species = list("Human","Skrell","Unathi","Tajaran")
- var/target_department = "Engineering"
- var/target_species = "Human"
+ var/target_department
+ var/target_species
var/mob/living/carbon/human/occupant = null
var/obj/item/clothing/suit/space/rig/suit = null
var/obj/item/clothing/head/helmet/space/helmet = null
+/obj/machinery/suit_cycler/New()
+ ..()
+ target_department = departments[1]
+ target_species = species[1]
+ if(!target_department || !target_species) del(src)
+
/obj/machinery/suit_cycler/engineering
name = "Engineering suit cycler"
model_text = "Engineering"
req_access = list(access_construction)
departments = list("Engineering","Atmos")
- species = list("Human","Unathi","Tajaran")
+ species = list("Human","Tajaran") //Add Unathi when sprites exist for their suits.
/obj/machinery/suit_cycler/mining
name = "Mining suit cycler"
model_text = "Mining"
req_access = list(access_mining)
departments = list("Mining")
- species = list("Human","Unathi","Tajaran")
+ species = list("Human","Tajaran")
+
+/obj/machinery/suit_cycler/security
+ name = "Security suit cycler"
+ model_text = "Security"
+ req_access = list(access_security)
+ departments = list("Security")
+ species = list("Human","Tajaran")
+
+/obj/machinery/suit_cycler/medical
+ name = "Medical suit cycler"
+ model_text = "Medical"
+ req_access = list(access_medical)
+ departments = list("Medical")
+ species = list("Human","Tajaran")
+
+/obj/machinery/suit_cycler/syndicate
+ name = "Nonstandard suit cycler"
+ model_text = "Nonstandard"
+ req_access = list(access_syndicate)
+ departments = list("Mercenary")
+ species = list("Human","Tajaran","Unathi","Skrell")
+ can_repair = 1
/obj/machinery/suit_cycler/attack_ai(mob/user as mob)
return src.attack_hand(user)
@@ -780,7 +809,7 @@
dat += "Helmet: [helmet ? "\the [helmet]" : "no helmet stored" ]. \[eject\]
"
dat += "Suit: [suit ? "\the [suit]" : "no suit stored" ]. \[eject\]"
- if(suit && istype(suit))
+ if(can_repair && suit && istype(suit))
dat += "[(suit.damage ? " \[repair\]" : "")]"
dat += "
UV decontamination systems: SYSTEM ERROR" : "green'>READY"]
"
@@ -839,7 +868,7 @@
radiation_level = input("Please select the desired radiation level.","Suit cycler",null) as null|anything in choices
else if(href_list["repair_suit"])
- if(!suit) return
+ if(!suit || !can_repair) return
active = 1
spawn(100)
repair_suit()
@@ -943,7 +972,7 @@
/obj/machinery/suit_cycler/proc/finished_job()
var/turf/T = get_turf(src)
- T.visible_message("\The [src] pings loudly.")
+ T.visible_message("\icon[src] \blue The [src] pings loudly.")
icon_state = initial(icon_state)
active = 0
src.updateUsrDialog()
@@ -1036,8 +1065,11 @@
return
switch(target_species)
- if("Human" || "Skrell")
- if(helmet) helmet.species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox")
+ if("Skrell")
+ if(helmet) helmet.species_restricted = list("Skrell")
+ if(suit) suit.species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox")
+ if("Human")
+ if(helmet) helmet.species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox","Skrell")
if(suit) suit.species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox")
if("Unathi")
if(helmet) helmet.species_restricted = list("Unathi")
@@ -1097,7 +1129,7 @@
suit.name = "atmospherics hardsuit"
suit.icon_state = "rig-atmos"
suit.item_state = "atmos_hardsuit"
- if("^%###^%$")
+ if("^%###^%$" || "Mercenary")
if(helmet)
helmet.name = "blood-red hardsuit helmet"
helmet.icon_state = "rig0-syndie"
@@ -1106,4 +1138,7 @@
if(suit)
suit.name = "blood-red hardsuit"
suit.item_state = "syndie_hardsuit"
- suit.icon_state = "rig-syndie"
\ No newline at end of file
+ suit.icon_state = "rig-syndie"
+
+ if(helmet) helmet.name = "refitted [helmet.name]"
+ if(suit) suit.name = "refitted [suit.name]"
\ No newline at end of file
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 5dd31a036e..e69a2b36de 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -552,7 +552,7 @@
if (!throw_item)
return 0
spawn(0)
- throw_item.throw_at(target, 16, 3)
+ throw_item.throw_at(target, 16, 3, src)
src.visible_message("\red [src] launches [throw_item.name] at [target.name]!")
return 1
diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm
index 08cc9a65d0..629e3b9d7d 100644
--- a/code/game/mecha/equipment/tools/tools.dm
+++ b/code/game/mecha/equipment/tools/tools.dm
@@ -464,7 +464,7 @@
return
else if(target!=locked)
if(locked in view(chassis))
- locked.throw_at(target, 14, 1.5)
+ locked.throw_at(target, 14, 1.5, chassis)
locked = null
send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info())
set_ready_state(0)
diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm
index e8a9dc072f..fb1174814d 100644
--- a/code/game/mecha/equipment/weapons/weapons.dm
+++ b/code/game/mecha/equipment/weapons/weapons.dm
@@ -231,7 +231,7 @@
var/missile_range = 30
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/Fire(atom/movable/AM, atom/target, turf/aimloc)
- AM.throw_at(target,missile_range, missile_speed)
+ AM.throw_at(target,missile_range, missile_speed, chassis)
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive
name = "SRM-8 Missile Rack"
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index e3465c3b7c..0cb89ee683 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -469,6 +469,7 @@
return
/obj/mecha/hitby(atom/movable/A as mob|obj) //wrapper
+ ..()
src.log_message("Hit by [A].",1)
call((proc_res["dynhitby"]||src), "dynhitby")(A)
return
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index b0897829e2..6beb98c40c 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -539,7 +539,7 @@
"\red You stab yourself in the eyes with [src]!" \
)
if(istype(M, /mob/living/carbon/human))
- var/datum/organ/internal/eyes/eyes = H.internal_organs["eyes"]
+ var/datum/organ/internal/eyes/eyes = H.internal_organs_by_name["eyes"]
eyes.damage += rand(3,4)
if(eyes.damage >= eyes.min_bruised_damage)
if(M.stat != 2)
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index bc402a7a39..d4879eff36 100755
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -328,7 +328,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
return
-/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
ui_tick++
var/datum/nanoui/old_ui = nanomanager.get_open_ui(user, src, "main")
var/auto_update = 1
@@ -462,7 +462,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
data["aircontents"] = list("reading" = 0)
// update the ui if it exists, returns null if no ui is passed/found
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
@@ -1214,8 +1214,54 @@ var/global/list/obj/item/device/pda/PDAs = list()
user << "\blue Tank is empty!"
if (!scanmode && istype(A, /obj/item/weapon/paper) && owner)
- note = A:info
- user << "\blue Paper scanned." //concept of scanning paper copyright brainoblivion 2009
+ // JMO 20140705: Makes scanned document show up properly in the notes. Not pretty for formatted documents,
+ // as this will clobber the HTML, but at least it lets you scan a document. You can restore the original
+ // notes by editing the note again. (Was going to allow you to edit, but scanned documents are too long.)
+ var/raw_scan = (A:info)
+ var/formatted_scan = ""
+ // Scrub out the tags (replacing a few formatting ones along the way)
+
+ // Find the beginning and end of the first tag.
+ var/tag_start = findtext(raw_scan,"<")
+ var/tag_stop = findtext(raw_scan,">")
+
+ // Until we run out of complete tags...
+ while(tag_start&&tag_stop)
+ var/pre = copytext(raw_scan,1,tag_start) // Get the stuff that comes before the tag
+ var/tag = lowertext(copytext(raw_scan,tag_start+1,tag_stop)) // Get the tag so we can do intellegent replacement
+ var/tagend = findtext(tag," ") // Find the first space in the tag if there is one.
+
+ // Anything that's before the tag can just be added as is.
+ formatted_scan = formatted_scan+pre
+
+ // If we have a space after the tag (and presumably attributes) just crop that off.
+ if (tagend)
+ tag=copytext(tag,1,tagend)
+
+ if (tag=="p"||tag=="/p"||tag=="br") // Check if it's I vertical space tag.
+ formatted_scan=formatted_scan+"
" // If so, add some padding in.
+
+ raw_scan = copytext(raw_scan,tag_stop+1) // continue on with the stuff after the tag
+
+ // Look for the next tag in what's left
+ tag_start = findtext(raw_scan,"<")
+ tag_stop = findtext(raw_scan,">")
+
+ // Anything that is left in the page. just tack it on to the end as is
+ formatted_scan=formatted_scan+raw_scan
+
+ // If there is something in there already, pad it out.
+ if (length(note)>0)
+ note = note + "
"
+
+ // Store the scanned document to the notes
+ note = "Scanned Document. Edit to restore previous notes/delete scan.
----------
" + formatted_scan + "
"
+ // notehtml ISN'T set to allow user to get their old notes back. A better implementation would add a "scanned documents"
+ // feature to the PDA, which would better convey the availability of the feature, but this will work for now.
+
+ // Inform the user
+ user << "\blue Paper scanned and OCRed to notekeeper." //concept of scanning paper copyright brainoblivion 2009
+
/obj/item/device/pda/proc/explode() //This needs tuning. //Sure did.
diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm
index 43daf35b32..204b94cc3d 100644
--- a/code/game/objects/items/devices/aicard.dm
+++ b/code/game/objects/items/devices/aicard.dm
@@ -71,6 +71,10 @@
dat += "
"
dat += {"[A.control_disabled ? "Enable" : "Disable"] Wireless Activity"}
dat += "
"
+ dat += "Subspace Transceiver is: [A.aiRadio.disabledAi ? "Disabled" : "Enabled"]"
+ dat += "
"
+ dat += {"[A.aiRadio.disabledAi ? "Enable" : "Disable"] Subspace Transceiver"}
+ dat += "
"
dat += {" Close"}
user << browse(dat, "window=aicard")
onclose(user, "aicard")
@@ -92,6 +96,12 @@
U.unset_machine()
return
+ if ("Radio")
+ for(var/mob/living/silicon/ai/A in src)
+ A.aiRadio.disabledAi = !A.aiRadio.disabledAi
+ A << "Your Subspace Transceiver has been: [A.aiRadio.disabledAi ? "disabled" : "enabled"]"
+ U << "You [A.aiRadio.disabledAi ? "Disable" : "Enable"] the AI's Subspace Transceiver"
+
if ("Wipe")
var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No")
if(confirm == "Yes")
diff --git a/code/game/objects/items/devices/radio/encryptionkey.dm b/code/game/objects/items/devices/radio/encryptionkey.dm
index d2d5417d6c..287e827249 100644
--- a/code/game/objects/items/devices/radio/encryptionkey.dm
+++ b/code/game/objects/items/devices/radio/encryptionkey.dm
@@ -74,6 +74,12 @@
icon_state = "cap_cypherkey"
channels = list("Command" = 1, "Security" = 1, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0)
+/obj/item/device/encryptionkey/heads/ai_integrated
+ name = "AI Integrated Encryption Key"
+ desc = "Integrated encryption key"
+ icon_state = "cap_cypherkey"
+ channels = list("Command" = 1, "Security" = 1, "Engineering" = 1, "Science" = 1, "Medical" = 1, "Supply" = 1)
+
/obj/item/device/encryptionkey/heads/rd
name = "Research Director's Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm
index ed59e43989..ab376e4825 100644
--- a/code/game/objects/items/devices/radio/headset.dm
+++ b/code/game/objects/items/devices/radio/headset.dm
@@ -19,7 +19,9 @@
keyslot1 = new /obj/item/device/encryptionkey/
recalculateChannels()
-/obj/item/device/radio/headset/receive_range(freq, level)
+/obj/item/device/radio/headset/receive_range(freq, level, aiOverride = 0)
+ if (aiOverride)
+ return ..(freq, level)
if(ishuman(src.loc))
var/mob/living/carbon/human/H = src.loc
if(H.l_ear == src || H.r_ear == src)
@@ -99,6 +101,20 @@
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/captain
+/obj/item/device/radio/headset/heads/ai_integrated //No need to care about icons, it should be hidden inside the AI anyway.
+ name = "AI Subspace Transceiver"
+ desc = "Integrated AI radio transceiver."
+ icon_state = "ai_radio"
+ item_state = "headset"
+ keyslot2 = new /obj/item/device/encryptionkey/heads/ai_integrated
+ var/myAi = null // Atlantis: Reference back to the AI which has this radio.
+ var/disabledAi = 0 // Atlantis: Used to manually disable AI's integrated radio via intellicard menu.
+
+/obj/item/device/radio/headset/heads/ai_integrated/receive_range(freq, level)
+ if (disabledAi)
+ return -1 //Transciever Disabled.
+ return ..(freq, level, 1)
+
/obj/item/device/radio/headset/heads/rd
name = "Research Director's headset"
desc = "Headset of the researching God. To access the science channel, use :n. For command, use :c."
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index c1cf3aa8f0..5cde8bc5bd 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -427,4 +427,47 @@ REAGENT SCANNER
name = "advanced reagent scanner"
icon_state = "adv_spectrometer"
details = 1
- origin_tech = "magnets=4;biotech=2"
\ No newline at end of file
+ origin_tech = "magnets=4;biotech=2"
+
+/obj/item/device/slime_scanner
+ name = "slime scanner"
+ icon_state = "adv_spectrometer"
+ item_state = "analyzer"
+ origin_tech = "biotech=1"
+ w_class = 2.0
+ flags = CONDUCT
+ throwforce = 0
+ throw_speed = 3
+ throw_range = 7
+ matter = list("metal" = 30,"glass" = 20)
+
+/obj/item/device/slime_scanner/attack(mob/living/M as mob, mob/living/user as mob)
+ if (!isslime(M))
+ user << "This device can only scan slimes!"
+ return
+ var/mob/living/carbon/slime/T = M
+ user.show_message("Slime scan results:")
+ user.show_message(text("[T.colour] [] slime", T.is_adult ? "adult" : "baby"))
+ user.show_message(text("Nutrition: [T.nutrition]/[]", T.get_max_nutrition()))
+ if (T.nutrition < T.get_starve_nutrition())
+ user.show_message("Warning: slime is starving!")
+ else if (T.nutrition < T.get_hunger_nutrition())
+ user.show_message("Warning: slime is hungry")
+ user.show_message("Electric change strength: [T.powerlevel]")
+ user.show_message("Health: [T.health]")
+ if (T.slime_mutation[4] == T.colour)
+ user.show_message("This slime does not evolve any further")
+ else
+ if (T.slime_mutation[3] == T.slime_mutation[4])
+ if (T.slime_mutation[2] == T.slime_mutation[1])
+ user.show_message(text("Possible mutation: []", T.slime_mutation[3]))
+ user.show_message("Genetic destability: [T.mutation_chance/2]% chance of mutation on splitting")
+ else
+ user.show_message(text("Possible mutations: [], [], [] (x2)", T.slime_mutation[1], T.slime_mutation[2], T.slime_mutation[3]))
+ user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting")
+ else
+ user.show_message(text("Possible mutations: [], [], [], []", T.slime_mutation[1], T.slime_mutation[2], T.slime_mutation[3], T.slime_mutation[4]))
+ user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting")
+ if (T.cores > 1)
+ user.show_message("Anomalious slime core amount detected")
+ user.show_message("Growth progress: [T.amount_grown]/10")
diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm
index 2fa75536ec..1e7c459756 100644
--- a/code/game/objects/items/devices/transfer_valve.dm
+++ b/code/game/objects/items/devices/transfer_valve.dm
@@ -67,7 +67,7 @@
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
ui_interact(user)
-/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
// this is the data which will be sent to the ui
var/data[0]
@@ -77,7 +77,7 @@
data["valveOpen"] = valve_open ? 1 : 0
// update the ui if it exists, returns null if no ui is passed/found
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
diff --git a/code/game/objects/items/devices/uplinks.dm b/code/game/objects/items/devices/uplinks.dm
index 41ae746739..aa01d0454d 100644
--- a/code/game/objects/items/devices/uplinks.dm
+++ b/code/game/objects/items/devices/uplinks.dm
@@ -340,7 +340,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
/*
NANO UI FOR UPLINK WOOP WOOP
*/
-/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
+/obj/item/device/uplink/hidden/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/title = "Syndicate Uplink"
var/data[0]
@@ -349,7 +349,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
data["welcome"] = welcome
// update the ui if it exists, returns null if no ui is passed/found
- ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm
index 219843e68b..652e51e95c 100644
--- a/code/game/objects/items/weapons/extinguisher.dm
+++ b/code/game/objects/items/weapons/extinguisher.dm
@@ -82,16 +82,19 @@
C = usr.buckled
var/obj/B = usr.buckled
var/movementdirection = turn(direction,180)
- if(C) C.propelled = 1
- B.Move(get_step(usr,movementdirection), movementdirection)
- sleep(1)
+ if(C) C.propelled = 4
B.Move(get_step(usr,movementdirection), movementdirection)
sleep(1)
B.Move(get_step(usr,movementdirection), movementdirection)
+ if(C) C.propelled = 3
+ sleep(1)
+ B.Move(get_step(usr,movementdirection), movementdirection)
sleep(1)
B.Move(get_step(usr,movementdirection), movementdirection)
+ if(C) C.propelled = 2
sleep(2)
B.Move(get_step(usr,movementdirection), movementdirection)
+ if(C) C.propelled = 1
sleep(2)
B.Move(get_step(usr,movementdirection), movementdirection)
if(C) C.propelled = 0
diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm
index 2716719fda..dd60f16645 100644
--- a/code/game/objects/items/weapons/grenades/flashbang.dm
+++ b/code/game/objects/items/weapons/grenades/flashbang.dm
@@ -83,7 +83,7 @@
//This really should be in mob not every check
if(ishuman(M))
var/mob/living/carbon/human/H = M
- var/datum/organ/internal/eyes/E = H.internal_organs["eyes"]
+ var/datum/organ/internal/eyes/E = H.internal_organs_by_name["eyes"]
if (E.damage >= E.min_bruised_damage)
M << "\red Your eyes start to burn badly!"
if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang)))
diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm
index f8c46134c1..c474650f9a 100644
--- a/code/game/objects/items/weapons/implants/implant.dm
+++ b/code/game/objects/items/weapons/implants/implant.dm
@@ -1,5 +1,7 @@
#define MALFUNCTION_TEMPORARY 1
#define MALFUNCTION_PERMANENT 2
+
+
/obj/item/weapon/implant
name = "implant"
icon = 'icons/obj/device.dmi'
diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm
index f1f5d8521e..f92f5b759c 100644
--- a/code/game/objects/items/weapons/implants/implanter.dm
+++ b/code/game/objects/items/weapons/implants/implanter.dm
@@ -65,8 +65,6 @@
update()
return
-
-
/obj/item/weapon/implanter/explosive
name = "implanter (E)"
diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm
index 7244d45520..12af48f6c8 100644
--- a/code/game/objects/items/weapons/kitchen.dm
+++ b/code/game/objects/items/weapons/kitchen.dm
@@ -66,7 +66,6 @@
name = "fork"
desc = "It's a fork. Sure is pointy."
icon_state = "fork"
- sharp = 1
/obj/item/weapon/kitchen/utensil/pfork
name = "plastic fork"
@@ -456,4 +455,4 @@
for(var/i = 1, i <= rand(1,2), i++)
if(I)
step(I, pick(NORTH,SOUTH,EAST,WEST))
- sleep(rand(2,4))
+ sleep(rand(2,4))
diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm
index 319486d6a3..b301a77e76 100644
--- a/code/game/objects/items/weapons/manuals.dm
+++ b/code/game/objects/items/weapons/manuals.dm
@@ -737,11 +737,11 @@
/obj/item/weapon/book/manual/security_space_law
- name = "Space Law"
+ name = "Corporate Regulations"
desc = "A set of NanoTrasen guidelines for keeping law and order on their space stations."
icon_state = "bookSpaceLaw"
author = "NanoTrasen"
- title = "Space Law"
+ title = "Corporate Regulations"
dat = {"
@@ -749,7 +749,7 @@
-
+