Merge pull request #2698 from Citadel-Station-13/upstream-merge-30583
[MIRROR] Fixes initialize hints for a fair number of mobs and items
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
name = "motion-sensitive security camera"
|
||||
|
||||
/obj/machinery/camera/motion/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
upgradeMotion()
|
||||
|
||||
// ALL UPGRADES
|
||||
|
||||
@@ -1,86 +1,86 @@
|
||||
/obj/machinery/computer/atmos_alert
|
||||
name = "atmospheric alert console"
|
||||
desc = "Used to monitor the station's air alarms."
|
||||
circuit = /obj/item/circuitboard/computer/atmos_alert
|
||||
icon_screen = "alert:0"
|
||||
icon_keyboard = "atmos_key"
|
||||
var/list/priority_alarms = list()
|
||||
var/list/minor_alarms = list()
|
||||
var/receive_frequency = 1437
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/machinery/computer/atmos_alert/Initialize()
|
||||
..()
|
||||
set_frequency(receive_frequency)
|
||||
|
||||
/obj/machinery/computer/atmos_alert/Destroy()
|
||||
/obj/machinery/computer/atmos_alert
|
||||
name = "atmospheric alert console"
|
||||
desc = "Used to monitor the station's air alarms."
|
||||
circuit = /obj/item/circuitboard/computer/atmos_alert
|
||||
icon_screen = "alert:0"
|
||||
icon_keyboard = "atmos_key"
|
||||
var/list/priority_alarms = list()
|
||||
var/list/minor_alarms = list()
|
||||
var/receive_frequency = 1437
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/machinery/computer/atmos_alert/Initialize()
|
||||
. = ..()
|
||||
set_frequency(receive_frequency)
|
||||
|
||||
/obj/machinery/computer/atmos_alert/Destroy()
|
||||
SSradio.remove_object(src, receive_frequency)
|
||||
return ..()
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/atmos_alert/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_alert", name, 350, 300, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/atmos_alert/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
data["priority"] = list()
|
||||
for(var/zone in priority_alarms)
|
||||
data["priority"] += zone
|
||||
data["minor"] = list()
|
||||
for(var/zone in minor_alarms)
|
||||
data["minor"] += zone
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/atmos_alert/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("clear")
|
||||
var/zone = params["zone"]
|
||||
if(zone in priority_alarms)
|
||||
to_chat(usr, "Priority alarm for [zone] cleared.")
|
||||
priority_alarms -= zone
|
||||
. = TRUE
|
||||
if(zone in minor_alarms)
|
||||
to_chat(usr, "Minor alarm for [zone] cleared.")
|
||||
minor_alarms -= zone
|
||||
. = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/atmos_alert/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, receive_frequency)
|
||||
receive_frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, receive_frequency, GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/computer/atmos_alert/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption) return
|
||||
|
||||
var/zone = signal.data["zone"]
|
||||
var/severity = signal.data["alert"]
|
||||
|
||||
if(!zone || !severity) return
|
||||
|
||||
minor_alarms -= zone
|
||||
priority_alarms -= zone
|
||||
if(severity == "severe")
|
||||
priority_alarms += zone
|
||||
else if (severity == "minor")
|
||||
minor_alarms += zone
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/atmos_alert/update_icon()
|
||||
..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(priority_alarms.len)
|
||||
add_overlay("alert:2")
|
||||
else if(minor_alarms.len)
|
||||
add_overlay("alert:1")
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_alert", name, 350, 300, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/atmos_alert/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
data["priority"] = list()
|
||||
for(var/zone in priority_alarms)
|
||||
data["priority"] += zone
|
||||
data["minor"] = list()
|
||||
for(var/zone in minor_alarms)
|
||||
data["minor"] += zone
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/atmos_alert/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("clear")
|
||||
var/zone = params["zone"]
|
||||
if(zone in priority_alarms)
|
||||
to_chat(usr, "Priority alarm for [zone] cleared.")
|
||||
priority_alarms -= zone
|
||||
. = TRUE
|
||||
if(zone in minor_alarms)
|
||||
to_chat(usr, "Minor alarm for [zone] cleared.")
|
||||
minor_alarms -= zone
|
||||
. = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/atmos_alert/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, receive_frequency)
|
||||
receive_frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, receive_frequency, GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/computer/atmos_alert/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption) return
|
||||
|
||||
var/zone = signal.data["zone"]
|
||||
var/severity = signal.data["alert"]
|
||||
|
||||
if(!zone || !severity) return
|
||||
|
||||
minor_alarms -= zone
|
||||
priority_alarms -= zone
|
||||
if(severity == "severe")
|
||||
priority_alarms += zone
|
||||
else if (severity == "minor")
|
||||
minor_alarms += zone
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/atmos_alert/update_icon()
|
||||
..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(priority_alarms.len)
|
||||
add_overlay("alert:2")
|
||||
else if(minor_alarms.len)
|
||||
add_overlay("alert:1")
|
||||
|
||||
@@ -1,230 +1,230 @@
|
||||
/////////////////////////////////////////////////////////////
|
||||
// AIR SENSOR (found in gas tanks)
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/machinery/air_sensor
|
||||
name = "gas sensor"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "gsensor1"
|
||||
/////////////////////////////////////////////////////////////
|
||||
// AIR SENSOR (found in gas tanks)
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/machinery/air_sensor
|
||||
name = "gas sensor"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "gsensor1"
|
||||
anchored = TRUE
|
||||
|
||||
var/on = TRUE
|
||||
|
||||
var/id_tag
|
||||
var/frequency = 1441
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/machinery/air_sensor/update_icon()
|
||||
icon_state = "gsensor[on]"
|
||||
|
||||
/obj/machinery/air_sensor/process_atmos()
|
||||
if(on)
|
||||
var/datum/signal/signal = new
|
||||
var/datum/gas_mixture/air_sample = return_air()
|
||||
|
||||
signal.transmission_method = 1 //radio signal
|
||||
signal.data = list(
|
||||
"sigtype" = "status",
|
||||
"id_tag" = id_tag,
|
||||
"timestamp" = world.time,
|
||||
"pressure" = air_sample.return_pressure(),
|
||||
"temperature" = air_sample.temperature,
|
||||
"gases" = list()
|
||||
)
|
||||
var/total_moles = air_sample.total_moles()
|
||||
if(total_moles)
|
||||
for(var/gas_id in air_sample.gases)
|
||||
var/gas_name = air_sample.gases[gas_id][GAS_META][META_GAS_NAME]
|
||||
signal.data["gases"][gas_name] = air_sample.gases[gas_id][MOLES] / total_moles * 100
|
||||
|
||||
radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
|
||||
/obj/machinery/air_sensor/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/air_sensor/Initialize()
|
||||
..()
|
||||
SSair.atmos_machinery += src
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/air_sensor/Destroy()
|
||||
SSair.atmos_machinery -= src
|
||||
|
||||
var/on = TRUE
|
||||
|
||||
var/id_tag
|
||||
var/frequency = 1441
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/machinery/air_sensor/update_icon()
|
||||
icon_state = "gsensor[on]"
|
||||
|
||||
/obj/machinery/air_sensor/process_atmos()
|
||||
if(on)
|
||||
var/datum/signal/signal = new
|
||||
var/datum/gas_mixture/air_sample = return_air()
|
||||
|
||||
signal.transmission_method = 1 //radio signal
|
||||
signal.data = list(
|
||||
"sigtype" = "status",
|
||||
"id_tag" = id_tag,
|
||||
"timestamp" = world.time,
|
||||
"pressure" = air_sample.return_pressure(),
|
||||
"temperature" = air_sample.temperature,
|
||||
"gases" = list()
|
||||
)
|
||||
var/total_moles = air_sample.total_moles()
|
||||
if(total_moles)
|
||||
for(var/gas_id in air_sample.gases)
|
||||
var/gas_name = air_sample.gases[gas_id][GAS_META][META_GAS_NAME]
|
||||
signal.data["gases"][gas_name] = air_sample.gases[gas_id][MOLES] / total_moles * 100
|
||||
|
||||
radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
|
||||
/obj/machinery/air_sensor/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
return ..()
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
// GENERAL AIR CONTROL (a.k.a atmos computer)
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/machinery/computer/atmos_control
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/air_sensor/Initialize()
|
||||
. = ..()
|
||||
SSair.atmos_machinery += src
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/air_sensor/Destroy()
|
||||
SSair.atmos_machinery -= src
|
||||
SSradio.remove_object(src, frequency)
|
||||
return ..()
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
// GENERAL AIR CONTROL (a.k.a atmos computer)
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/machinery/computer/atmos_control
|
||||
name = "atmospherics monitoring"
|
||||
desc = "Used to monitor the station's atmospherics sensors."
|
||||
icon_screen = "tank"
|
||||
icon_keyboard = "atmos_key"
|
||||
circuit = /obj/item/circuitboard/computer/atmos_control
|
||||
|
||||
var/frequency = 1441
|
||||
var/list/sensors = list(
|
||||
"n2_sensor" = "Nitrogen Tank",
|
||||
"o2_sensor" = "Oxygen Tank",
|
||||
"co2_sensor" = "Carbon Dioxide Tank",
|
||||
"tox_sensor" = "Plasma Tank",
|
||||
"n2o_sensor" = "Nitrous Oxide Tank",
|
||||
"air_sensor" = "Mixed Air Tank",
|
||||
"mix_sensor" = "Mix Tank",
|
||||
"distro_meter" = "Distribution Loop",
|
||||
"waste_meter" = "Waste Loop",
|
||||
)
|
||||
var/list/sensor_information = list()
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/machinery/computer/atmos_control/Initialize()
|
||||
..()
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/computer/atmos_control/Destroy()
|
||||
desc = "Used to monitor the station's atmospherics sensors."
|
||||
icon_screen = "tank"
|
||||
icon_keyboard = "atmos_key"
|
||||
circuit = /obj/item/circuitboard/computer/atmos_control
|
||||
|
||||
var/frequency = 1441
|
||||
var/list/sensors = list(
|
||||
"n2_sensor" = "Nitrogen Tank",
|
||||
"o2_sensor" = "Oxygen Tank",
|
||||
"co2_sensor" = "Carbon Dioxide Tank",
|
||||
"tox_sensor" = "Plasma Tank",
|
||||
"n2o_sensor" = "Nitrous Oxide Tank",
|
||||
"air_sensor" = "Mixed Air Tank",
|
||||
"mix_sensor" = "Mix Tank",
|
||||
"distro_meter" = "Distribution Loop",
|
||||
"waste_meter" = "Waste Loop",
|
||||
)
|
||||
var/list/sensor_information = list()
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/machinery/computer/atmos_control/Initialize()
|
||||
..()
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/computer/atmos_control/Destroy()
|
||||
SSradio.remove_object(src, frequency)
|
||||
return ..()
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/atmos_control/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_control", name, 400, 925, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/atmos_control/ui_data(mob/user)
|
||||
var/data = list()
|
||||
|
||||
data["sensors"] = list()
|
||||
for(var/id_tag in sensors)
|
||||
var/long_name = sensors[id_tag]
|
||||
var/list/info = sensor_information[id_tag]
|
||||
if(!info)
|
||||
continue
|
||||
data["sensors"] += list(list(
|
||||
"id_tag" = id_tag,
|
||||
"long_name" = sanitize(long_name),
|
||||
"pressure" = info["pressure"],
|
||||
"temperature" = info["temperature"],
|
||||
"gases" = info["gases"]
|
||||
))
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/atmos_control/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption)
|
||||
return
|
||||
|
||||
var/id_tag = signal.data["id_tag"]
|
||||
if(!id_tag || !sensors.Find(id_tag))
|
||||
return
|
||||
|
||||
sensor_information[id_tag] = signal.data
|
||||
|
||||
/obj/machinery/computer/atmos_control/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
// LARGE TANK CONTROL
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/machinery/computer/atmos_control/tank
|
||||
var/input_tag
|
||||
var/output_tag
|
||||
frequency = 1441
|
||||
circuit = /obj/item/circuitboard/computer/atmos_control/tank
|
||||
|
||||
var/list/input_info
|
||||
var/list/output_info
|
||||
|
||||
// This hacky madness is the evidence of the fact that a lot of machines were never meant to be constructable, im so sorry you had to see this
|
||||
/obj/machinery/computer/atmos_control/tank/proc/reconnect(mob/user)
|
||||
var/list/IO = list()
|
||||
var/datum/radio_frequency/freq = SSradio.return_frequency(1441)
|
||||
var/list/devices = freq.devices["_default"]
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/U in devices)
|
||||
var/list/text = splittext(U.id_tag, "_")
|
||||
IO |= text[1]
|
||||
for(var/obj/machinery/atmospherics/components/unary/outlet_injector/U in devices)
|
||||
var/list/text = splittext(U.id, "_")
|
||||
IO |= text[1]
|
||||
if(!IO.len)
|
||||
to_chat(user, "<span class='alert'>No machinery detected.</span>")
|
||||
var/S = input("Select the device set: ", "Selection", IO[1]) as anything in IO
|
||||
if(src)
|
||||
src.input_tag = "[S]_in"
|
||||
src.output_tag = "[S]_out"
|
||||
name = "[uppertext(S)] Supply Control"
|
||||
var/list/new_devices = freq.devices["4"]
|
||||
for(var/obj/machinery/air_sensor/U in new_devices)
|
||||
var/list/text = splittext(U.id_tag, "_")
|
||||
if(text[1] == S)
|
||||
sensors = list("[S]_sensor" = "Tank")
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/components/unary/outlet_injector/U in devices)
|
||||
U.broadcast_status()
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/U in devices)
|
||||
U.broadcast_status()
|
||||
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_control", name, 400, 925, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/atmos_control/ui_data(mob/user)
|
||||
var/data = list()
|
||||
|
||||
data["sensors"] = list()
|
||||
for(var/id_tag in sensors)
|
||||
var/long_name = sensors[id_tag]
|
||||
var/list/info = sensor_information[id_tag]
|
||||
if(!info)
|
||||
continue
|
||||
data["sensors"] += list(list(
|
||||
"id_tag" = id_tag,
|
||||
"long_name" = sanitize(long_name),
|
||||
"pressure" = info["pressure"],
|
||||
"temperature" = info["temperature"],
|
||||
"gases" = info["gases"]
|
||||
))
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/atmos_control/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption)
|
||||
return
|
||||
|
||||
var/id_tag = signal.data["id_tag"]
|
||||
if(!id_tag || !sensors.Find(id_tag))
|
||||
return
|
||||
|
||||
sensor_information[id_tag] = signal.data
|
||||
|
||||
/obj/machinery/computer/atmos_control/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
// LARGE TANK CONTROL
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
/obj/machinery/computer/atmos_control/tank
|
||||
var/input_tag
|
||||
var/output_tag
|
||||
frequency = 1441
|
||||
circuit = /obj/item/circuitboard/computer/atmos_control/tank
|
||||
|
||||
var/list/input_info
|
||||
var/list/output_info
|
||||
|
||||
// This hacky madness is the evidence of the fact that a lot of machines were never meant to be constructable, im so sorry you had to see this
|
||||
/obj/machinery/computer/atmos_control/tank/proc/reconnect(mob/user)
|
||||
var/list/IO = list()
|
||||
var/datum/radio_frequency/freq = SSradio.return_frequency(1441)
|
||||
var/list/devices = freq.devices["_default"]
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/U in devices)
|
||||
var/list/text = splittext(U.id_tag, "_")
|
||||
IO |= text[1]
|
||||
for(var/obj/machinery/atmospherics/components/unary/outlet_injector/U in devices)
|
||||
var/list/text = splittext(U.id, "_")
|
||||
IO |= text[1]
|
||||
if(!IO.len)
|
||||
to_chat(user, "<span class='alert'>No machinery detected.</span>")
|
||||
var/S = input("Select the device set: ", "Selection", IO[1]) as anything in IO
|
||||
if(src)
|
||||
src.input_tag = "[S]_in"
|
||||
src.output_tag = "[S]_out"
|
||||
name = "[uppertext(S)] Supply Control"
|
||||
var/list/new_devices = freq.devices["4"]
|
||||
for(var/obj/machinery/air_sensor/U in new_devices)
|
||||
var/list/text = splittext(U.id_tag, "_")
|
||||
if(text[1] == S)
|
||||
sensors = list("[S]_sensor" = "Tank")
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/components/unary/outlet_injector/U in devices)
|
||||
U.broadcast_status()
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/U in devices)
|
||||
U.broadcast_status()
|
||||
|
||||
/obj/machinery/computer/atmos_control/tank/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_control", name, 500, 305, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/atmos_control/tank/ui_data(mob/user)
|
||||
var/list/data = ..()
|
||||
data["tank"] = TRUE
|
||||
data["inputting"] = input_info ? input_info["power"] : FALSE
|
||||
data["inputRate"] = input_info ? input_info["volume_rate"] : 0
|
||||
data["outputting"] = output_info ? output_info["power"] : FALSE
|
||||
data["outputPressure"] = output_info ? output_info["internal"] : 0
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/atmos_control/tank/ui_act(action, params)
|
||||
if(..() || !radio_connection)
|
||||
return
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1
|
||||
signal.source = src
|
||||
signal.data = list("sigtype" = "command")
|
||||
switch(action)
|
||||
if("reconnect")
|
||||
reconnect(usr)
|
||||
. = TRUE
|
||||
if("input")
|
||||
signal.data += list("tag" = input_tag, "power_toggle" = TRUE)
|
||||
. = TRUE
|
||||
if("output")
|
||||
signal.data += list("tag" = output_tag, "power_toggle" = TRUE)
|
||||
. = TRUE
|
||||
if("pressure")
|
||||
var/target = input("New target pressure:", name, output_info ? output_info["internal"] : 0) as num|null
|
||||
if(!isnull(target) && !..())
|
||||
target = Clamp(target, 0, 50 * ONE_ATMOSPHERE)
|
||||
signal.data += list("tag" = output_tag, "set_internal_pressure" = target)
|
||||
. = TRUE
|
||||
radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/computer/atmos_control/tank/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption)
|
||||
return
|
||||
|
||||
var/id_tag = signal.data["tag"]
|
||||
|
||||
if(input_tag == id_tag)
|
||||
input_info = signal.data
|
||||
else if(output_tag == id_tag)
|
||||
output_info = signal.data
|
||||
else
|
||||
..(signal)
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "atmos_control", name, 500, 305, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/atmos_control/tank/ui_data(mob/user)
|
||||
var/list/data = ..()
|
||||
data["tank"] = TRUE
|
||||
data["inputting"] = input_info ? input_info["power"] : FALSE
|
||||
data["inputRate"] = input_info ? input_info["volume_rate"] : 0
|
||||
data["outputting"] = output_info ? output_info["power"] : FALSE
|
||||
data["outputPressure"] = output_info ? output_info["internal"] : 0
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/atmos_control/tank/ui_act(action, params)
|
||||
if(..() || !radio_connection)
|
||||
return
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1
|
||||
signal.source = src
|
||||
signal.data = list("sigtype" = "command")
|
||||
switch(action)
|
||||
if("reconnect")
|
||||
reconnect(usr)
|
||||
. = TRUE
|
||||
if("input")
|
||||
signal.data += list("tag" = input_tag, "power_toggle" = TRUE)
|
||||
. = TRUE
|
||||
if("output")
|
||||
signal.data += list("tag" = output_tag, "power_toggle" = TRUE)
|
||||
. = TRUE
|
||||
if("pressure")
|
||||
var/target = input("New target pressure:", name, output_info ? output_info["internal"] : 0) as num|null
|
||||
if(!isnull(target) && !..())
|
||||
target = Clamp(target, 0, 50 * ONE_ATMOSPHERE)
|
||||
signal.data += list("tag" = output_tag, "set_internal_pressure" = target)
|
||||
. = TRUE
|
||||
radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/computer/atmos_control/tank/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption)
|
||||
return
|
||||
|
||||
var/id_tag = signal.data["tag"]
|
||||
|
||||
if(input_tag == id_tag)
|
||||
input_info = signal.data
|
||||
else if(output_tag == id_tag)
|
||||
output_info = signal.data
|
||||
else
|
||||
..(signal)
|
||||
|
||||
@@ -121,7 +121,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
return (TOXLOSS|OXYLOSS)
|
||||
|
||||
/obj/item/clothing/mask/cigarette/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
create_reagents(chem_volume)
|
||||
reagents.set_reacting(FALSE) // so it doesn't react until you light it
|
||||
if(list_reagents)
|
||||
@@ -378,7 +378,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/packeditem = 0
|
||||
|
||||
/obj/item/clothing/mask/cigarette/pipe/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
name = "empty [initial(name)]"
|
||||
|
||||
/obj/item/clothing/mask/cigarette/pipe/Destroy()
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
access = CART_REAGENT_SCANNER | CART_ATMOS
|
||||
|
||||
/obj/item/cartridge/signal/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
bot_access_flags = FLOOR_BOT | CLEAN_BOT | MED_BOT
|
||||
|
||||
/obj/item/cartridge/rd/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
radio = new /obj/item/radio/integrated/signal(src)
|
||||
|
||||
/obj/item/cartridge/captain
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/integrated/signal/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if (src.frequency < 1200 || src.frequency > 1600)
|
||||
src.frequency = sanitize_frequency(src.frequency)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
var/flashlight_power = 1 //strength of the light when on
|
||||
|
||||
/obj/item/device/flashlight/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
update_brightness()
|
||||
|
||||
/obj/item/device/flashlight/proc/update_brightness(mob/user = null)
|
||||
@@ -409,7 +409,7 @@
|
||||
/obj/item/device/flashlight/glowstick/Initialize()
|
||||
fuel = rand(1600, 2000)
|
||||
light_color = color
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
@@ -17,7 +17,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
|
||||
|
||||
/obj/item/device/gps/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
GLOB.GPS_list += src
|
||||
name = "global positioning system ([gpstag])"
|
||||
add_overlay("working")
|
||||
|
||||
@@ -555,7 +555,7 @@
|
||||
flags_2 = NO_EMP_WIRES_2
|
||||
|
||||
/obj/item/device/radio/borg/Initialize(mapload)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/device/radio/borg/syndicate
|
||||
syndie = 1
|
||||
|
||||
@@ -1,294 +1,294 @@
|
||||
/obj/item/device/taperecorder
|
||||
name = "universal recorder"
|
||||
desc = "A device that can record to cassette tapes, and play them. It automatically translates the content in playback."
|
||||
icon_state = "taperecorder_empty"
|
||||
item_state = "analyzer"
|
||||
/obj/item/device/taperecorder
|
||||
name = "universal recorder"
|
||||
desc = "A device that can record to cassette tapes, and play them. It automatically translates the content in playback."
|
||||
icon_state = "taperecorder_empty"
|
||||
item_state = "analyzer"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags_1 = HEAR_1
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list(MAT_METAL=60, MAT_GLASS=30)
|
||||
force = 2
|
||||
throwforce = 0
|
||||
var/recording = 0
|
||||
var/playing = 0
|
||||
var/playsleepseconds = 0
|
||||
var/obj/item/device/tape/mytape
|
||||
var/starting_tape_type = /obj/item/device/tape/random
|
||||
var/open_panel = 0
|
||||
var/canprint = 1
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/Initialize(mapload)
|
||||
..()
|
||||
if(starting_tape_type)
|
||||
mytape = new starting_tape_type(src)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "The wire panel is [open_panel ? "opened" : "closed"].")
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attackby(obj/item/I, mob/user, params)
|
||||
if(!mytape && istype(I, /obj/item/device/tape))
|
||||
if(!user.transferItemToLoc(I,src))
|
||||
return
|
||||
mytape = I
|
||||
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/proc/eject(mob/user)
|
||||
if(mytape)
|
||||
to_chat(user, "<span class='notice'>You remove [mytape] from [src].</span>")
|
||||
stop()
|
||||
user.put_in_hands(mytape)
|
||||
mytape = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/taperecorder/fire_act(exposed_temperature, exposed_volume)
|
||||
mytape.ruin() //Fires destroy the tape
|
||||
..()
|
||||
|
||||
/obj/item/device/taperecorder/attack_hand(mob/user)
|
||||
if(loc == user)
|
||||
if(mytape)
|
||||
if(!user.is_holding(src))
|
||||
..()
|
||||
return
|
||||
eject(user)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/proc/can_use(mob/user)
|
||||
if(user && ismob(user))
|
||||
if(!user.incapacitated())
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/ejectverb()
|
||||
set name = "Eject Tape"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape)
|
||||
return
|
||||
|
||||
eject(usr)
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/update_icon()
|
||||
if(!mytape)
|
||||
icon_state = "taperecorder_empty"
|
||||
else if(recording)
|
||||
icon_state = "taperecorder_recording"
|
||||
else if(playing)
|
||||
icon_state = "taperecorder_playing"
|
||||
else
|
||||
icon_state = "taperecorder_idle"
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, spans, message_mode)
|
||||
if(mytape && recording)
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [message]"
|
||||
|
||||
/obj/item/device/taperecorder/verb/record()
|
||||
set name = "Start Recording"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
return
|
||||
if(playing)
|
||||
return
|
||||
|
||||
if(mytape.used_capacity < mytape.max_capacity)
|
||||
to_chat(usr, "<span class='notice'>Recording started.</span>")
|
||||
recording = 1
|
||||
update_icon()
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording started."
|
||||
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
|
||||
var/max = mytape.max_capacity
|
||||
for(used, used < max)
|
||||
if(recording == 0)
|
||||
break
|
||||
mytape.used_capacity++
|
||||
used++
|
||||
sleep(10)
|
||||
recording = 0
|
||||
update_icon()
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>The tape is full.</span>")
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/stop()
|
||||
set name = "Stop"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
|
||||
if(recording)
|
||||
recording = 0
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording stopped."
|
||||
to_chat(usr, "<span class='notice'>Recording stopped.</span>")
|
||||
return
|
||||
else if(playing)
|
||||
playing = 0
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Playback stopped.</font>")
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/play()
|
||||
set name = "Play Tape"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
return
|
||||
if(playing)
|
||||
return
|
||||
|
||||
playing = 1
|
||||
update_icon()
|
||||
to_chat(usr, "<span class='notice'>Playing started.</span>")
|
||||
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
|
||||
var/max = mytape.max_capacity
|
||||
for(var/i = 1, used < max, sleep(10 * playsleepseconds))
|
||||
if(!mytape)
|
||||
break
|
||||
if(playing == 0)
|
||||
break
|
||||
if(mytape.storedinfo.len < i)
|
||||
break
|
||||
say(mytape.storedinfo[i])
|
||||
if(mytape.storedinfo.len < i + 1)
|
||||
playsleepseconds = 1
|
||||
sleep(10)
|
||||
say("End of recording.")
|
||||
else
|
||||
playsleepseconds = mytape.timestamp[i + 1] - mytape.timestamp[i]
|
||||
if(playsleepseconds > 14)
|
||||
sleep(10)
|
||||
say("Skipping [playsleepseconds] seconds of silence")
|
||||
playsleepseconds = 1
|
||||
i++
|
||||
|
||||
playing = 0
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attack_self(mob/user)
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
stop()
|
||||
else
|
||||
record()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/print_transcript()
|
||||
set name = "Print Transcript"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape)
|
||||
return
|
||||
if(!canprint)
|
||||
to_chat(usr, "<span class='notice'>The recorder can't print that fast!</span>")
|
||||
return
|
||||
if(recording || playing)
|
||||
return
|
||||
|
||||
to_chat(usr, "<span class='notice'>Transcript printed.</span>")
|
||||
var/obj/item/paper/P = new /obj/item/paper(get_turf(src))
|
||||
var/t1 = "<B>Transcript:</B><BR><BR>"
|
||||
for(var/i = 1, mytape.storedinfo.len >= i, i++)
|
||||
t1 += "[mytape.storedinfo[i]]<BR>"
|
||||
P.info = t1
|
||||
P.name = "paper- 'Transcript'"
|
||||
usr.put_in_hands(P)
|
||||
canprint = 0
|
||||
sleep(300)
|
||||
canprint = 1
|
||||
|
||||
|
||||
//empty tape recorders
|
||||
/obj/item/device/taperecorder/empty
|
||||
starting_tape_type = null
|
||||
|
||||
|
||||
/obj/item/device/tape
|
||||
name = "tape"
|
||||
desc = "A magnetic tape that can hold up to ten minutes of content."
|
||||
icon_state = "tape_white"
|
||||
item_state = "analyzer"
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list(MAT_METAL=60, MAT_GLASS=30)
|
||||
force = 2
|
||||
throwforce = 0
|
||||
var/recording = 0
|
||||
var/playing = 0
|
||||
var/playsleepseconds = 0
|
||||
var/obj/item/device/tape/mytape
|
||||
var/starting_tape_type = /obj/item/device/tape/random
|
||||
var/open_panel = 0
|
||||
var/canprint = 1
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/Initialize(mapload)
|
||||
. = ..()
|
||||
if(starting_tape_type)
|
||||
mytape = new starting_tape_type(src)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "The wire panel is [open_panel ? "opened" : "closed"].")
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attackby(obj/item/I, mob/user, params)
|
||||
if(!mytape && istype(I, /obj/item/device/tape))
|
||||
if(!user.transferItemToLoc(I,src))
|
||||
return
|
||||
mytape = I
|
||||
to_chat(user, "<span class='notice'>You insert [I] into [src].</span>")
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/proc/eject(mob/user)
|
||||
if(mytape)
|
||||
to_chat(user, "<span class='notice'>You remove [mytape] from [src].</span>")
|
||||
stop()
|
||||
user.put_in_hands(mytape)
|
||||
mytape = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/taperecorder/fire_act(exposed_temperature, exposed_volume)
|
||||
mytape.ruin() //Fires destroy the tape
|
||||
..()
|
||||
|
||||
/obj/item/device/taperecorder/attack_hand(mob/user)
|
||||
if(loc == user)
|
||||
if(mytape)
|
||||
if(!user.is_holding(src))
|
||||
..()
|
||||
return
|
||||
eject(user)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/proc/can_use(mob/user)
|
||||
if(user && ismob(user))
|
||||
if(!user.incapacitated())
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/ejectverb()
|
||||
set name = "Eject Tape"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape)
|
||||
return
|
||||
|
||||
eject(usr)
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/update_icon()
|
||||
if(!mytape)
|
||||
icon_state = "taperecorder_empty"
|
||||
else if(recording)
|
||||
icon_state = "taperecorder_recording"
|
||||
else if(playing)
|
||||
icon_state = "taperecorder_playing"
|
||||
else
|
||||
icon_state = "taperecorder_idle"
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq, spans, message_mode)
|
||||
if(mytape && recording)
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] [message]"
|
||||
|
||||
/obj/item/device/taperecorder/verb/record()
|
||||
set name = "Start Recording"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
return
|
||||
if(playing)
|
||||
return
|
||||
|
||||
if(mytape.used_capacity < mytape.max_capacity)
|
||||
to_chat(usr, "<span class='notice'>Recording started.</span>")
|
||||
recording = 1
|
||||
update_icon()
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording started."
|
||||
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
|
||||
var/max = mytape.max_capacity
|
||||
for(used, used < max)
|
||||
if(recording == 0)
|
||||
break
|
||||
mytape.used_capacity++
|
||||
used++
|
||||
sleep(10)
|
||||
recording = 0
|
||||
update_icon()
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>The tape is full.</span>")
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/stop()
|
||||
set name = "Stop"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
|
||||
if(recording)
|
||||
recording = 0
|
||||
mytape.timestamp += mytape.used_capacity
|
||||
mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording stopped."
|
||||
to_chat(usr, "<span class='notice'>Recording stopped.</span>")
|
||||
return
|
||||
else if(playing)
|
||||
playing = 0
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Playback stopped.</font>")
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/play()
|
||||
set name = "Play Tape"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
return
|
||||
if(playing)
|
||||
return
|
||||
|
||||
playing = 1
|
||||
update_icon()
|
||||
to_chat(usr, "<span class='notice'>Playing started.</span>")
|
||||
var/used = mytape.used_capacity //to stop runtimes when you eject the tape
|
||||
var/max = mytape.max_capacity
|
||||
for(var/i = 1, used < max, sleep(10 * playsleepseconds))
|
||||
if(!mytape)
|
||||
break
|
||||
if(playing == 0)
|
||||
break
|
||||
if(mytape.storedinfo.len < i)
|
||||
break
|
||||
say(mytape.storedinfo[i])
|
||||
if(mytape.storedinfo.len < i + 1)
|
||||
playsleepseconds = 1
|
||||
sleep(10)
|
||||
say("End of recording.")
|
||||
else
|
||||
playsleepseconds = mytape.timestamp[i + 1] - mytape.timestamp[i]
|
||||
if(playsleepseconds > 14)
|
||||
sleep(10)
|
||||
say("Skipping [playsleepseconds] seconds of silence")
|
||||
playsleepseconds = 1
|
||||
i++
|
||||
|
||||
playing = 0
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/attack_self(mob/user)
|
||||
if(!mytape || mytape.ruined)
|
||||
return
|
||||
if(recording)
|
||||
stop()
|
||||
else
|
||||
record()
|
||||
|
||||
|
||||
/obj/item/device/taperecorder/verb/print_transcript()
|
||||
set name = "Print Transcript"
|
||||
set category = "Object"
|
||||
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!mytape)
|
||||
return
|
||||
if(!canprint)
|
||||
to_chat(usr, "<span class='notice'>The recorder can't print that fast!</span>")
|
||||
return
|
||||
if(recording || playing)
|
||||
return
|
||||
|
||||
to_chat(usr, "<span class='notice'>Transcript printed.</span>")
|
||||
var/obj/item/paper/P = new /obj/item/paper(get_turf(src))
|
||||
var/t1 = "<B>Transcript:</B><BR><BR>"
|
||||
for(var/i = 1, mytape.storedinfo.len >= i, i++)
|
||||
t1 += "[mytape.storedinfo[i]]<BR>"
|
||||
P.info = t1
|
||||
P.name = "paper- 'Transcript'"
|
||||
usr.put_in_hands(P)
|
||||
canprint = 0
|
||||
sleep(300)
|
||||
canprint = 1
|
||||
|
||||
|
||||
//empty tape recorders
|
||||
/obj/item/device/taperecorder/empty
|
||||
starting_tape_type = null
|
||||
|
||||
|
||||
/obj/item/device/tape
|
||||
name = "tape"
|
||||
desc = "A magnetic tape that can hold up to ten minutes of content."
|
||||
icon_state = "tape_white"
|
||||
item_state = "analyzer"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_METAL=20, MAT_GLASS=5)
|
||||
force = 1
|
||||
throwforce = 0
|
||||
var/max_capacity = 600
|
||||
var/used_capacity = 0
|
||||
var/list/storedinfo = list()
|
||||
var/list/timestamp = list()
|
||||
var/ruined = 0
|
||||
|
||||
/obj/item/device/tape/fire_act(exposed_temperature, exposed_volume)
|
||||
ruin()
|
||||
..()
|
||||
|
||||
/obj/item/device/tape/attack_self(mob/user)
|
||||
if(!ruined)
|
||||
to_chat(user, "<span class='notice'>You pull out all the tape!</span>")
|
||||
ruin()
|
||||
|
||||
|
||||
/obj/item/device/tape/proc/ruin()
|
||||
//Lets not add infinite amounts of overlays when our fireact is called
|
||||
//repeatedly
|
||||
if(!ruined)
|
||||
add_overlay("ribbonoverlay")
|
||||
ruined = 1
|
||||
|
||||
|
||||
/obj/item/device/tape/proc/fix()
|
||||
cut_overlay("ribbonoverlay")
|
||||
ruined = 0
|
||||
|
||||
|
||||
/obj/item/device/tape/attackby(obj/item/I, mob/user, params)
|
||||
if(ruined)
|
||||
var/delay = -1
|
||||
if (istype(I, /obj/item/screwdriver))
|
||||
delay = 120*I.toolspeed
|
||||
else if(istype(I, /obj/item/pen))
|
||||
delay = 120*1.5
|
||||
if (delay != -1)
|
||||
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
|
||||
if(do_after(user, delay, target = src))
|
||||
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
|
||||
fix()
|
||||
|
||||
//Random colour tapes
|
||||
/obj/item/device/tape/random/New()
|
||||
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
|
||||
..()
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_METAL=20, MAT_GLASS=5)
|
||||
force = 1
|
||||
throwforce = 0
|
||||
var/max_capacity = 600
|
||||
var/used_capacity = 0
|
||||
var/list/storedinfo = list()
|
||||
var/list/timestamp = list()
|
||||
var/ruined = 0
|
||||
|
||||
/obj/item/device/tape/fire_act(exposed_temperature, exposed_volume)
|
||||
ruin()
|
||||
..()
|
||||
|
||||
/obj/item/device/tape/attack_self(mob/user)
|
||||
if(!ruined)
|
||||
to_chat(user, "<span class='notice'>You pull out all the tape!</span>")
|
||||
ruin()
|
||||
|
||||
|
||||
/obj/item/device/tape/proc/ruin()
|
||||
//Lets not add infinite amounts of overlays when our fireact is called
|
||||
//repeatedly
|
||||
if(!ruined)
|
||||
add_overlay("ribbonoverlay")
|
||||
ruined = 1
|
||||
|
||||
|
||||
/obj/item/device/tape/proc/fix()
|
||||
cut_overlay("ribbonoverlay")
|
||||
ruined = 0
|
||||
|
||||
|
||||
/obj/item/device/tape/attackby(obj/item/I, mob/user, params)
|
||||
if(ruined)
|
||||
var/delay = -1
|
||||
if (istype(I, /obj/item/screwdriver))
|
||||
delay = 120*I.toolspeed
|
||||
else if(istype(I, /obj/item/pen))
|
||||
delay = 120*1.5
|
||||
if (delay != -1)
|
||||
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
|
||||
if(do_after(user, delay, target = src))
|
||||
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
|
||||
fix()
|
||||
|
||||
//Random colour tapes
|
||||
/obj/item/device/tape/random/New()
|
||||
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
|
||||
..()
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
/obj/structure/alien/weeds/Initialize()
|
||||
pixel_x = -4
|
||||
pixel_y = -4 //so the sprites line up right in the map editor
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
if(!blacklisted_turfs)
|
||||
blacklisted_turfs = typecacheof(list(
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
/obj/structure/alien/weeds/node/Initialize()
|
||||
icon = 'icons/obj/smooth_structures/alien/weednode.dmi'
|
||||
..()
|
||||
. = ..()
|
||||
set_light(lon_range)
|
||||
var/obj/structure/alien/weeds/W = locate(/obj/structure/alien/weeds) in loc
|
||||
if(W && W != src)
|
||||
@@ -223,7 +223,7 @@
|
||||
var/obj/item/clothing/mask/facehugger/child
|
||||
|
||||
/obj/structure/alien/egg/Initialize(mapload)
|
||||
..()
|
||||
. = ..()
|
||||
update_icon()
|
||||
if(status == GROWING || status == GROWN)
|
||||
child = new(src)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
layer = OBJ_LAYER
|
||||
|
||||
/obj/structure/chair/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(!anchored) //why would you put these on the shuttle?
|
||||
addtimer(CALLBACK(src, .proc/RemoveFromLatejoin), 0)
|
||||
|
||||
|
||||
@@ -1,202 +1,202 @@
|
||||
/*
|
||||
CONTAINS:
|
||||
SAFES
|
||||
FLOOR SAFES
|
||||
*/
|
||||
|
||||
//SAFES
|
||||
/obj/structure/safe
|
||||
name = "safe"
|
||||
desc = "A huge chunk of metal with a dial embedded in it. Fine print on the dial reads \"Scarborough Arms - 2 tumbler safe, guaranteed thermite resistant, explosion resistant, and assistant resistant.\""
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "safe"
|
||||
/*
|
||||
CONTAINS:
|
||||
SAFES
|
||||
FLOOR SAFES
|
||||
*/
|
||||
|
||||
//SAFES
|
||||
/obj/structure/safe
|
||||
name = "safe"
|
||||
desc = "A huge chunk of metal with a dial embedded in it. Fine print on the dial reads \"Scarborough Arms - 2 tumbler safe, guaranteed thermite resistant, explosion resistant, and assistant resistant.\""
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "safe"
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
var/open = FALSE //is the safe open?
|
||||
var/tumbler_1_pos //the tumbler position- from 0 to 72
|
||||
var/tumbler_1_open //the tumbler position to open at- 0 to 72
|
||||
var/tumbler_2_pos
|
||||
var/tumbler_2_open
|
||||
var/dial = 0 //where is the dial pointing?
|
||||
var/space = 0 //the combined w_class of everything in the safe
|
||||
var/maxspace = 24 //the maximum combined w_class of stuff in the safe
|
||||
|
||||
|
||||
/obj/structure/safe/New()
|
||||
..()
|
||||
tumbler_1_pos = rand(0, 71)
|
||||
tumbler_1_open = rand(0, 71)
|
||||
|
||||
tumbler_2_pos = rand(0, 71)
|
||||
tumbler_2_open = rand(0, 71)
|
||||
|
||||
|
||||
/obj/structure/safe/Initialize(mapload)
|
||||
..()
|
||||
|
||||
if(!mapload)
|
||||
return
|
||||
|
||||
for(var/obj/item/I in loc)
|
||||
if(space >= maxspace)
|
||||
return
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
I.loc = src
|
||||
|
||||
|
||||
/obj/structure/safe/proc/check_unlocked(mob/user, canhear)
|
||||
if(user && canhear)
|
||||
if(tumbler_1_pos == tumbler_1_open)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("tonk", "krunk", "plunk")] from [src].</span>")
|
||||
if(tumbler_2_pos == tumbler_2_open)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("tink", "krink", "plink")] from [src].</span>")
|
||||
if(tumbler_1_pos == tumbler_1_open && tumbler_2_pos == tumbler_2_open)
|
||||
if(user) visible_message("<i><b>[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!</b></i>")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/structure/safe/proc/decrement(num)
|
||||
num -= 1
|
||||
if(num < 0)
|
||||
num = 71
|
||||
return num
|
||||
|
||||
|
||||
/obj/structure/safe/proc/increment(num)
|
||||
num += 1
|
||||
if(num > 71)
|
||||
num = 0
|
||||
return num
|
||||
|
||||
|
||||
/obj/structure/safe/update_icon()
|
||||
if(open)
|
||||
icon_state = "[initial(icon_state)]-open"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
|
||||
/obj/structure/safe/attack_hand(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat = "<center>"
|
||||
dat += "<a href='?src=\ref[src];open=1'>[open ? "Close" : "Open"] [src]</a> | <a href='?src=\ref[src];decrement=1'>-</a> [dial * 5] <a href='?src=\ref[src];increment=1'>+</a>"
|
||||
if(open)
|
||||
dat += "<table>"
|
||||
for(var/i = contents.len, i>=1, i--)
|
||||
var/obj/item/P = contents[i]
|
||||
dat += "<tr><td><a href='?src=\ref[src];retrieve=\ref[P]'>[P.name]</a></td></tr>"
|
||||
dat += "</table></center>"
|
||||
user << browse("<html><head><title>[name]</title></head><body>[dat]</body></html>", "window=safe;size=350x300")
|
||||
|
||||
|
||||
/obj/structure/safe/Topic(href, href_list)
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
var/mob/living/carbon/human/user = usr
|
||||
|
||||
var/canhear = 0
|
||||
if(user.is_holding_item_of_type(/obj/item/clothing/neck/stethoscope))
|
||||
canhear = 1
|
||||
|
||||
if(href_list["open"])
|
||||
if(check_unlocked())
|
||||
to_chat(user, "<span class='notice'>You [open ? "close" : "open"] [src].</span>")
|
||||
open = !open
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't [open ? "close" : "open"] [src], the lock is engaged!</span>")
|
||||
return
|
||||
|
||||
if(href_list["decrement"])
|
||||
dial = decrement(dial)
|
||||
if(dial == tumbler_1_pos + 1 || dial == tumbler_1_pos - 71)
|
||||
tumbler_1_pos = decrement(tumbler_1_pos)
|
||||
if(canhear)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("clack", "scrape", "clank")] from [src].</span>")
|
||||
if(tumbler_1_pos == tumbler_2_pos + 37 || tumbler_1_pos == tumbler_2_pos - 35)
|
||||
tumbler_2_pos = decrement(tumbler_2_pos)
|
||||
if(canhear)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("click", "chink", "clink")] from [src].</span>")
|
||||
check_unlocked(user, canhear)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(href_list["increment"])
|
||||
dial = increment(dial)
|
||||
if(dial == tumbler_1_pos - 1 || dial == tumbler_1_pos + 71)
|
||||
tumbler_1_pos = increment(tumbler_1_pos)
|
||||
if(canhear)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("clack", "scrape", "clank")] from [src].</span>")
|
||||
if(tumbler_1_pos == tumbler_2_pos - 37 || tumbler_1_pos == tumbler_2_pos + 35)
|
||||
tumbler_2_pos = increment(tumbler_2_pos)
|
||||
if(canhear)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("click", "chink", "clink")] from [src].</span>")
|
||||
check_unlocked(user, canhear)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(href_list["retrieve"])
|
||||
user << browse("", "window=safe") // Close the menu
|
||||
|
||||
var/obj/item/P = locate(href_list["retrieve"]) in src
|
||||
if(open)
|
||||
if(P && in_range(src, user))
|
||||
user.put_in_hands(P)
|
||||
space -= P.w_class
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/obj/structure/safe/attackby(obj/item/I, mob/user, params)
|
||||
if(open)
|
||||
. = 1 //no afterattack
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>\The [I] is stuck to your hand, you cannot put it in the safe!</span>")
|
||||
return
|
||||
I.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
updateUsrDialog()
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[I] won't fit in [src].</span>")
|
||||
return
|
||||
else if(istype(I, /obj/item/clothing/neck/stethoscope))
|
||||
to_chat(user, "<span class='warning'>Hold [I] in one of your hands while you manipulate the dial!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/safe/handle_atom_del(atom/A)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/structure/safe/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
/obj/structure/safe/ex_act(severity, target)
|
||||
return
|
||||
|
||||
|
||||
//FLOOR SAFES
|
||||
/obj/structure/safe/floor
|
||||
name = "floor safe"
|
||||
icon_state = "floorsafe"
|
||||
var/tumbler_1_pos //the tumbler position- from 0 to 72
|
||||
var/tumbler_1_open //the tumbler position to open at- 0 to 72
|
||||
var/tumbler_2_pos
|
||||
var/tumbler_2_open
|
||||
var/dial = 0 //where is the dial pointing?
|
||||
var/space = 0 //the combined w_class of everything in the safe
|
||||
var/maxspace = 24 //the maximum combined w_class of stuff in the safe
|
||||
|
||||
|
||||
/obj/structure/safe/New()
|
||||
..()
|
||||
tumbler_1_pos = rand(0, 71)
|
||||
tumbler_1_open = rand(0, 71)
|
||||
|
||||
tumbler_2_pos = rand(0, 71)
|
||||
tumbler_2_open = rand(0, 71)
|
||||
|
||||
|
||||
/obj/structure/safe/Initialize(mapload)
|
||||
..()
|
||||
|
||||
if(!mapload)
|
||||
return
|
||||
|
||||
for(var/obj/item/I in loc)
|
||||
if(space >= maxspace)
|
||||
return
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
I.loc = src
|
||||
|
||||
|
||||
/obj/structure/safe/proc/check_unlocked(mob/user, canhear)
|
||||
if(user && canhear)
|
||||
if(tumbler_1_pos == tumbler_1_open)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("tonk", "krunk", "plunk")] from [src].</span>")
|
||||
if(tumbler_2_pos == tumbler_2_open)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("tink", "krink", "plink")] from [src].</span>")
|
||||
if(tumbler_1_pos == tumbler_1_open && tumbler_2_pos == tumbler_2_open)
|
||||
if(user) visible_message("<i><b>[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!</b></i>")
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/obj/structure/safe/proc/decrement(num)
|
||||
num -= 1
|
||||
if(num < 0)
|
||||
num = 71
|
||||
return num
|
||||
|
||||
|
||||
/obj/structure/safe/proc/increment(num)
|
||||
num += 1
|
||||
if(num > 71)
|
||||
num = 0
|
||||
return num
|
||||
|
||||
|
||||
/obj/structure/safe/update_icon()
|
||||
if(open)
|
||||
icon_state = "[initial(icon_state)]-open"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
|
||||
/obj/structure/safe/attack_hand(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat = "<center>"
|
||||
dat += "<a href='?src=\ref[src];open=1'>[open ? "Close" : "Open"] [src]</a> | <a href='?src=\ref[src];decrement=1'>-</a> [dial * 5] <a href='?src=\ref[src];increment=1'>+</a>"
|
||||
if(open)
|
||||
dat += "<table>"
|
||||
for(var/i = contents.len, i>=1, i--)
|
||||
var/obj/item/P = contents[i]
|
||||
dat += "<tr><td><a href='?src=\ref[src];retrieve=\ref[P]'>[P.name]</a></td></tr>"
|
||||
dat += "</table></center>"
|
||||
user << browse("<html><head><title>[name]</title></head><body>[dat]</body></html>", "window=safe;size=350x300")
|
||||
|
||||
|
||||
/obj/structure/safe/Topic(href, href_list)
|
||||
if(!ishuman(usr))
|
||||
return
|
||||
var/mob/living/carbon/human/user = usr
|
||||
|
||||
var/canhear = 0
|
||||
if(user.is_holding_item_of_type(/obj/item/clothing/neck/stethoscope))
|
||||
canhear = 1
|
||||
|
||||
if(href_list["open"])
|
||||
if(check_unlocked())
|
||||
to_chat(user, "<span class='notice'>You [open ? "close" : "open"] [src].</span>")
|
||||
open = !open
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't [open ? "close" : "open"] [src], the lock is engaged!</span>")
|
||||
return
|
||||
|
||||
if(href_list["decrement"])
|
||||
dial = decrement(dial)
|
||||
if(dial == tumbler_1_pos + 1 || dial == tumbler_1_pos - 71)
|
||||
tumbler_1_pos = decrement(tumbler_1_pos)
|
||||
if(canhear)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("clack", "scrape", "clank")] from [src].</span>")
|
||||
if(tumbler_1_pos == tumbler_2_pos + 37 || tumbler_1_pos == tumbler_2_pos - 35)
|
||||
tumbler_2_pos = decrement(tumbler_2_pos)
|
||||
if(canhear)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("click", "chink", "clink")] from [src].</span>")
|
||||
check_unlocked(user, canhear)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(href_list["increment"])
|
||||
dial = increment(dial)
|
||||
if(dial == tumbler_1_pos - 1 || dial == tumbler_1_pos + 71)
|
||||
tumbler_1_pos = increment(tumbler_1_pos)
|
||||
if(canhear)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("clack", "scrape", "clank")] from [src].</span>")
|
||||
if(tumbler_1_pos == tumbler_2_pos - 37 || tumbler_1_pos == tumbler_2_pos + 35)
|
||||
tumbler_2_pos = increment(tumbler_2_pos)
|
||||
if(canhear)
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("click", "chink", "clink")] from [src].</span>")
|
||||
check_unlocked(user, canhear)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(href_list["retrieve"])
|
||||
user << browse("", "window=safe") // Close the menu
|
||||
|
||||
var/obj/item/P = locate(href_list["retrieve"]) in src
|
||||
if(open)
|
||||
if(P && in_range(src, user))
|
||||
user.put_in_hands(P)
|
||||
space -= P.w_class
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/obj/structure/safe/attackby(obj/item/I, mob/user, params)
|
||||
if(open)
|
||||
. = 1 //no afterattack
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>\The [I] is stuck to your hand, you cannot put it in the safe!</span>")
|
||||
return
|
||||
I.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
updateUsrDialog()
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[I] won't fit in [src].</span>")
|
||||
return
|
||||
else if(istype(I, /obj/item/clothing/neck/stethoscope))
|
||||
to_chat(user, "<span class='warning'>Hold [I] in one of your hands while you manipulate the dial!</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/safe/handle_atom_del(atom/A)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/structure/safe/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
/obj/structure/safe/ex_act(severity, target)
|
||||
return
|
||||
|
||||
|
||||
//FLOOR SAFES
|
||||
/obj/structure/safe/floor
|
||||
name = "floor safe"
|
||||
icon_state = "floorsafe"
|
||||
density = FALSE
|
||||
level = 1 //underfloor
|
||||
layer = LOW_OBJ_LAYER
|
||||
|
||||
|
||||
/obj/structure/safe/floor/Initialize(mapload)
|
||||
..()
|
||||
if(mapload)
|
||||
var/turf/T = loc
|
||||
hide(T.intact)
|
||||
|
||||
|
||||
/obj/structure/safe/floor/hide(var/intact)
|
||||
invisibility = intact ? INVISIBILITY_MAXIMUM : 0
|
||||
level = 1 //underfloor
|
||||
layer = LOW_OBJ_LAYER
|
||||
|
||||
|
||||
/obj/structure/safe/floor/Initialize(mapload)
|
||||
. = ..()
|
||||
if(mapload)
|
||||
var/turf/T = loc
|
||||
hide(T.intact)
|
||||
|
||||
|
||||
/obj/structure/safe/floor/hide(var/intact)
|
||||
invisibility = intact ? INVISIBILITY_MAXIMUM : 0
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
pda.owner = text("[]", src)
|
||||
pda.name = pda.owner + " (" + pda.ownjob + ")"
|
||||
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
var/datum/action/innate/pai/shell/AS = new /datum/action/innate/pai/shell
|
||||
var/datum/action/innate/pai/chassis/AC = new /datum/action/innate/pai/chassis
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -39,7 +39,7 @@
|
||||
#define TILE_EMAG 7
|
||||
|
||||
/mob/living/simple_animal/bot/floorbot/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
update_icon()
|
||||
var/datum/job/engineer/J = new/datum/job/engineer
|
||||
access_card.access += J.get_access()
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
var/bloodiness = 0
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
wires = new /datum/wires/mulebot(src)
|
||||
var/datum/job/cargo_tech/J = new/datum/job/cargo_tech
|
||||
access_card.access = J.get_access()
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
devourable = TRUE
|
||||
|
||||
/mob/living/simple_animal/pet/cat/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
verbs += /mob/living/proc/lay_down
|
||||
|
||||
/mob/living/simple_animal/pet/cat/update_canmove()
|
||||
@@ -92,7 +92,7 @@
|
||||
icon_living = "original"
|
||||
icon_dead = "original_dead"
|
||||
Read_Memory()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/pet/cat/Runtime/Life()
|
||||
if(!cats_deployed && SSticker.current_state >= GAME_STATE_SETTING_UP)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
flavortext = null
|
||||
|
||||
/mob/living/simple_animal/drone/syndrone/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
internal_storage.hidden_uplink.telecrystals = 10
|
||||
|
||||
/mob/living/simple_animal/drone/syndrone/Login()
|
||||
@@ -46,7 +46,7 @@
|
||||
default_storage = /obj/item/device/radio/uplink/nuclear
|
||||
|
||||
/mob/living/simple_animal/drone/syndrone/badass/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
internal_storage.hidden_uplink.telecrystals = 30
|
||||
var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(src)
|
||||
W.implant(src)
|
||||
@@ -55,7 +55,7 @@
|
||||
default_hatmask = /obj/item/clothing/head/chameleon/drone
|
||||
|
||||
/mob/living/simple_animal/drone/snowflake/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
desc += " This drone appears to have a complex holoprojector built on its 'head'."
|
||||
|
||||
/obj/item/drone_shell/syndrone
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
devourable = TRUE
|
||||
|
||||
/mob/living/simple_animal/mouse/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(!body_color)
|
||||
body_color = pick( list("brown","gray","white") )
|
||||
icon_state = "mouse_[body_color]"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/pet/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
if(pcollar)
|
||||
pcollar = new(src)
|
||||
regenerate_icons()
|
||||
|
||||
@@ -54,7 +54,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
|
||||
GLOB.parasites += src
|
||||
setthemename(theme)
|
||||
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/med_hud_set_health()
|
||||
if(!QDELETED(summoner))
|
||||
@@ -659,7 +659,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians
|
||||
name = "holoparasite injector kit"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/guardian/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
new /obj/item/guardiancreator/tech/choose/traitor(src)
|
||||
new /obj/item/paper/guides/antag/guardian(src)
|
||||
return
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/boss/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
atb = new()
|
||||
atb.point_regen_delay = point_regen_delay
|
||||
|
||||
@@ -896,7 +896,7 @@
|
||||
else
|
||||
speak += pick("...alive?", "This isn't parrot heaven!", "I live, I die, I live again!", "The void fades!")
|
||||
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/parrot/Poly/Life()
|
||||
if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
|
||||
|
||||
Reference in New Issue
Block a user