Merge remote-tracking branch 'upstream/master' into HolidayDatums

Conflicts:
	code/__DEFINES/misc.dm
This commit is contained in:
Tigercat2000
2015-05-16 18:40:54 -07:00
177 changed files with 4385 additions and 2397 deletions
@@ -5,13 +5,15 @@
//node2 is output port
//node1 is input port
req_one_access_txt = "24;10"
name = "Dual Port Air Vent"
desc = "Has a valve and pump attached to it. There are two ports."
level = 1
connect_types = list(1,2,3) //connects to regular, supply and scrubbers pipes
connect_types = list(1,2,3) //connects to regular, supply and scrubbers pipes
var/on = 0
var/pump_direction = 1 //0 = siphoning, 1 = releasing
@@ -19,17 +21,49 @@
var/input_pressure_min = 0
var/output_pressure_max = 0
var/frequency = 0
var/id = null
var/frequency = 1439
var/id_tag = null
var/datum/radio_frequency/radio_connection
var/advcontrol = 0//does this device listen to the AAC
settagwhitelist = list("id_tag")
var/pressure_checks = 1
//1: Do not pass external_pressure_bound
//2: Do not pass input_pressure_min
//4: Do not pass output_pressure_max
/obj/machinery/atmospherics/binary/volume_pump/update_underlays()
if(..())
underlays.Cut()
var/turf/T = get_turf(src)
if(!istype(T))
return
add_underlay(T, node1, turn(dir, -180))
add_underlay(T, node2, dir)
/obj/machinery/atmospherics/binary/dp_vent_pump/multitool_menu(var/mob/user,var/obj/item/device/multitool/P)
return {"
<ul>
<li><b>Frequency:</b> <a href="?src=\ref[src];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=\ref[src];set_freq=[1439]">Reset</a>)</li>
<li><b>ID Tag:</b> <a href="?src=\ref[src];set_id=1">[id_tag]</a></li>
<li><b>AAC Acces:</b> <a href="?src=\ref[src];toggleadvcontrol=1">[advcontrol ? "Allowed" : "Blocked"]</a></li>
</ul>
"}
/obj/machinery/atmospherics/binary/dp_vent_pump/multitool_topic(var/mob/user, var/list/href_list, var/obj/O)
. = ..()
if(.)
return .
if("toggleadvcontrol" in href_list)
advcontrol = !advcontrol
return MT_UPDATE
/obj/machinery/atmospherics/binary/dp_vent_pump/New()
..()
if (!id_tag)
assign_uid()
id_tag = num2text(uid)
icon = null
/obj/machinery/atmospherics/binary/dp_vent_pump/high_volume
@@ -45,7 +79,7 @@
return
overlays.Cut()
var/vent_icon = "vent"
var/turf/T = get_turf(src)
@@ -54,7 +88,7 @@
if(T.intact && node1 && node2 && node1.level == 1 && node2.level == 1 && istype(node1, /obj/machinery/atmospherics/pipe) && istype(node2, /obj/machinery/atmospherics/pipe))
vent_icon += "h"
if(!powered())
vent_icon += "off"
else
@@ -111,6 +145,8 @@
if(network1)
network1.update = 1
air_update_turf()
else //external -> output
var/pressure_delta = 10000
@@ -130,6 +166,8 @@
if(network2)
network2.update = 1
air_update_turf()
return 1
@@ -150,7 +188,7 @@
signal.source = src
signal.data = list(
"tag" = id,
"tag" = id_tag,
"device" = "ADVP",
"power" = on,
"direction" = pump_direction?("release"):("siphon"),
@@ -170,43 +208,43 @@
set_frequency(frequency)
/obj/machinery/atmospherics/binary/dp_vent_pump/receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command") || (signal.data["advcontrol"] && !advcontrol))
return 0
if(signal.data["power"])
if(signal.data["power"] != null)
on = text2num(signal.data["power"])
if(signal.data["power_toggle"])
if(signal.data["power_toggle"] != null)
on = !on
if(signal.data["direction"])
if(signal.data["direction"] != null)
pump_direction = text2num(signal.data["direction"])
if(signal.data["checks"])
if(signal.data["checks"] != null)
pressure_checks = text2num(signal.data["checks"])
if(signal.data["purge"])
pressure_checks &= ~1
pump_direction = 0
if(signal.data["stabalize"])
if(signal.data["stabilize"])//the fact that this was "stabalize" shows how many fucks people give about these wonders, none
pressure_checks |= 1
pump_direction = 1
if(signal.data["set_input_pressure"])
if(signal.data["set_input_pressure"] != null)
input_pressure_min = between(
0,
text2num(signal.data["set_input_pressure"]),
ONE_ATMOSPHERE*50
)
if(signal.data["set_output_pressure"])
if(signal.data["set_output_pressure"] != null)
output_pressure_max = between(
0,
text2num(signal.data["set_output_pressure"]),
ONE_ATMOSPHERE*50
)
if(signal.data["set_external_pressure"])
if(signal.data["set_external_pressure"] != null)
external_pressure_bound = between(
0,
text2num(signal.data["set_external_pressure"]),
@@ -220,4 +258,54 @@
spawn(2)
broadcast_status()
update_icon()
update_icon()
/obj/machinery/atmospherics/binary/dp_vent_pump/attackby(var/obj/item/W as obj, var/mob/user as mob)
/*
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
user << "\blue Now welding the vent."
if(do_after(user, 20))
if(!src || !WT.isOn()) return
playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1)
if(!welded)
user.visible_message("[user] welds the vent shut.", "You weld the vent shut.", "You hear welding.")
welded = 1
update_icon()
else
user.visible_message("[user] unwelds the vent.", "You unweld the vent.", "You hear welding.")
welded = 0
update_icon()
else
user << "\blue The welding tool needs to be on to start this task."
else
user << "\blue You need more welding fuel to complete this task."
return 1*/
if(istype(W, /obj/item/device/multitool))
update_multitool_menu(user)
return 1
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
user << "\red You cannot unwrench this [src], turn it off first."
return 1
var/turf/T = src.loc
if (level==1 && isturf(T) && T.intact)
user << "\red You must remove the plating first."
return 1
var/datum/gas_mixture/int_air = return_air()
var/datum/gas_mixture/env_air = loc.return_air()
if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
user << "\red You cannot unwrench this [src], it too exerted due to internal pressure."
add_fingerprint(user)
return 1
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to unfasten \the [src]..."
if (do_after(user, 40))
user.visible_message( \
"[user] unfastens \the [src].", \
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
del(src)
@@ -7,17 +7,27 @@
name = "Air Injector"
desc = "Has a valve and pump attached to it"
req_one_access_txt = "24;10"
var/on = 0
var/injecting = 0
var/volume_rate = 50
var/frequency = 0
var/id = null
var/id
var/id_tag = null
var/datum/radio_frequency/radio_connection
Mtoollink = 1
settagwhitelist = list("id_tag")
level = 1
/obj/machinery/atmospherics/unary/outlet_injector/New()
..()
if(id && !id_tag)//I'm not dealing with any more merge conflicts
id_tag = id
/obj/machinery/atmospherics/unary/outlet_injector/update_icon()
if(!powered())
icon_state = "off"
@@ -91,7 +101,7 @@
signal.source = src
signal.data = list(
"tag" = id,
"tag" = id_tag,
"device" = "AO",
"power" = on,
"volume_rate" = volume_rate,
@@ -104,24 +114,23 @@
/obj/machinery/atmospherics/unary/outlet_injector/initialize()
..()
set_frequency(frequency)
/obj/machinery/atmospherics/unary/outlet_injector/receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"] != "command"))
return 0
if(signal.data["power"])
if(signal.data["power"] != null)
on = text2num(signal.data["power"])
if(signal.data["power_toggle"])
if(signal.data["power_toggle"] != null)
on = !on
if(signal.data["inject"])
if(signal.data["inject"] != null)
spawn inject()
return
if(signal.data["set_volume_rate"])
if(signal.data["set_volume_rate"] != null)
var/number = text2num(signal.data["set_volume_rate"])
volume_rate = between(0, number, air_contents.volume)
@@ -136,5 +145,57 @@
broadcast_status()
update_icon()
/*hide(var/i) //to make the little pipe section invisible, the icon changes.
if(node)
if(on)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]on"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
else
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]exposed"
on = 0
return*/
/obj/machinery/atmospherics/unary/outlet_injector/multitool_menu(var/mob/user,var/obj/item/device/multitool/P)
return {"
<ul>
<li><b>Frequency:</b> <a href="?src=\ref[src];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=\ref[src];set_freq=[1439]">Reset</a>)</li>
<li>[format_tag("ID Tag","id_tag","set_id")]</a></li>
</ul>
"}
/obj/machinery/atmospherics/unary/outlet_injector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if(istype(W, /obj/item/device/multitool))
interact(user)
return 1
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
user << "\red You cannot unwrench this [src], turn it off first."
return 1
var/turf/T = src.loc
if (level==1 && isturf(T) && T.intact)
user << "\red You must remove the plating first."
return 1
var/datum/gas_mixture/int_air = return_air()
var/datum/gas_mixture/env_air = loc.return_air()
if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
user << "\red You cannot unwrench this [src], it too exerted due to internal pressure."
add_fingerprint(user)
return 1
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to unfasten \the [src]..."
if (do_after(user, 40))
user.visible_message( \
"[user] unfastens \the [src].", \
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
del(src)
/obj/machinery/atmospherics/unary/outlet_injector/interact(mob/user as mob)
update_multitool_menu(user)
/obj/machinery/atmospherics/unary/outlet_injector/hide(var/i)
update_underlays()
update_underlays()
+60 -12
View File
@@ -16,6 +16,8 @@
var/area_uid
var/id_tag = null
req_one_access_txt = "24;10"
var/on = 0
var/pump_direction = 1 //0 = siphoning, 1 = releasing
@@ -36,6 +38,8 @@
var/frequency = 1439
var/datum/radio_frequency/radio_connection
Mtoollink = 1
var/advcontrol = 0//does this device listen to the AAC
var/radio_filter_out
var/radio_filter_in
@@ -181,6 +185,12 @@
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency,radio_filter_in)
if(frequency != 1439)
initial_loc.air_vent_info -= id_tag
initial_loc.air_vent_names -= id_tag
name = "Vent Pump"
else
broadcast_status()
/obj/machinery/atmospherics/unary/vent_pump/proc/broadcast_status()
if(!radio_connection)
@@ -202,12 +212,12 @@
"timestamp" = world.time,
"sigtype" = "status"
)
if(!initial_loc.air_vent_names[id_tag])
var/new_name = "[initial_loc.name] Vent Pump #[initial_loc.air_vent_names.len+1]"
initial_loc.air_vent_names[id_tag] = new_name
src.name = new_name
initial_loc.air_vent_info[id_tag] = signal.data
if(frequency == 1439)//We're on the frequency the air alarms and stuff use
if(!initial_loc.air_vent_names[id_tag])
var/new_name = "[initial_loc.name] Vent Pump #[initial_loc.air_vent_names.len+1]"
initial_loc.air_vent_names[id_tag] = new_name
src.name = new_name
initial_loc.air_vent_info[id_tag] = signal.data
radio_connection.post_signal(src, signal, radio_filter_out)
@@ -227,14 +237,14 @@
if(stat & (NOPOWER|BROKEN))
return
//log_admin("DEBUG \[[world.timeofday]\]: /obj/machinery/atmospherics/unary/vent_pump/receive_signal([signal.debug_print()])")
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command") || (signal.data["advcontrol"] && !advcontrol))
return 0
if(signal.data["purge"] != null)
pressure_checks &= ~1
pump_direction = 0
if(signal.data["stabalize"] != null)
if(signal.data["stabilize"] != null)
pressure_checks |= 1
pump_direction = 1
@@ -327,10 +337,14 @@
welded = 0
update_icon()
else
user << "\blue The welding tool needs to be on to start this task."
else
user << "\blue You need more welding fuel to complete this task."
return 1
else if(istype(W, /obj/item/device/multitool))
update_multitool_menu(user)
return 1
else
..()
@@ -346,7 +360,42 @@
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/unary/vent_pump/interact(mob/user as mob)
update_multitool_menu(user)
/obj/machinery/atmospherics/unary/vent_pump/multitool_menu(var/mob/user,var/obj/item/device/multitool/P)
return {"
<ul>
<li><b>Frequency:</b> <a href="?src=\ref[src];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=\ref[src];set_freq=[1439]">Reset</a>)</li>
<li>[format_tag("ID Tag","id_tag","set_id")]</li>
<li><b>AAC Acces:</b> <a href="?src=\ref[src];toggleadvcontrol=1">[advcontrol ? "Allowed" : "Blocked"]</a>
</ul>
"}
/obj/machinery/atmospherics/unary/vent_pump/multitool_topic(var/mob/user, var/list/href_list, var/obj/O)
if("toggleadvcontrol" in href_list)
advcontrol = !advcontrol
return MT_UPDATE
if("set_id" in href_list)
var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID tag for this machine", src, src.id_tag) as null|text), 1, MAX_MESSAGE_LEN)
if(!newid)
return
if(frequency == 1439)
initial_loc.air_vent_info -= id_tag
initial_loc.air_vent_names -= id_tag
id_tag = newid
broadcast_status()
return MT_UPDATE
return ..()
/obj/machinery/atmospherics/unary/vent_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (istype(W, /obj/item/device/multitool))
update_multitool_menu(user)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
@@ -370,11 +419,10 @@
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
del(src)
qdel(src)
/obj/machinery/atmospherics/unary/vent_pump/Del()
/obj/machinery/atmospherics/unary/vent_pump/Destroy()
if(initial_loc)
initial_loc.air_vent_info -= id_tag
initial_loc.air_vent_names -= id_tag
..()
return
return ..()
@@ -2,6 +2,8 @@
icon = 'icons/atmos/vent_scrubber.dmi'
icon_state = "map_scrubber"
req_one_access_txt = "24;10"
name = "Air Scrubber"
desc = "Has a valve and pump attached to it"
use_power = 1
@@ -12,6 +14,7 @@
var/id_tag = null
var/frequency = 1439
var/datum/radio_frequency/radio_connection
var/advcontrol = 0//does this device listen to the AAC?
var/on = 0
var/scrubbing = 1 //0 = siphoning, 1 = scrubbing
@@ -83,6 +86,12 @@
radio_controller.remove_object(src, frequency)
frequency = new_frequency
radio_connection = radio_controller.add_object(src, frequency, radio_filter_in)
if(frequency != 1439)
initial_loc.air_scrub_info -= id_tag
initial_loc.air_scrub_names -= id_tag
name = "air Scrubber"
else
broadcast_status()
/obj/machinery/atmospherics/unary/vent_scrubber/proc/broadcast_status()
if(!radio_connection)
@@ -106,11 +115,12 @@
"filter_n2o" = scrub_N2O,
"sigtype" = "status"
)
if(!initial_loc.air_scrub_names[id_tag])
var/new_name = "[initial_loc.name] Air Scrubber #[initial_loc.air_scrub_names.len+1]"
initial_loc.air_scrub_names[id_tag] = new_name
src.name = new_name
initial_loc.air_scrub_info[id_tag] = signal.data
if(frequency == 1439)//We're on the frequency the air alarms and stuff use
if(!initial_loc.air_scrub_names[id_tag])
var/new_name = "[initial_loc.name] Air Scrubber #[initial_loc.air_scrub_names.len+1]"
initial_loc.air_scrub_names[id_tag] = new_name
src.name = new_name
initial_loc.air_scrub_info[id_tag] = signal.data
radio_connection.post_signal(src, signal, radio_filter_out)
return 1
@@ -119,7 +129,7 @@
..()
radio_filter_in = frequency==initial(frequency)?(RADIO_FROM_AIRALARM):null
radio_filter_out = frequency==initial(frequency)?(RADIO_TO_AIRALARM):null
if (frequency)
if(frequency)
set_frequency(frequency)
/obj/machinery/atmospherics/unary/vent_scrubber/process()
@@ -203,7 +213,7 @@
/obj/machinery/atmospherics/unary/vent_scrubber/receive_signal(datum/signal/signal)
if(stat & (NOPOWER|BROKEN))
return
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command") || (signal.data["advcontrol"] && !advcontrol))
return 0
if(signal.data["power"] != null)
@@ -281,8 +291,35 @@
if(old_stat != stat)
update_icon()
/obj/machinery/atmospherics/unary/vent_scrubber/can_crawl_through()
return !welded
/obj/machinery/atmospherics/unary/vent_scrubber/multitool_menu(var/mob/user,var/obj/item/device/multitool/P)
return {"
<ul>
<li><b>Frequency:</b> <a href="?src=\ref[src];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=\ref[src];set_freq=[1439]">Reset</a>)</li>
<li>[format_tag("ID Tag","id_tag", "set_id")]</li>
<li><b>AAC Acces:</b> <a href="?src=\ref[src];toggleadvcontrol=1">[advcontrol ? "Allowed" : "Blocked"]</a>
</ul>
"}
/obj/machinery/atmospherics/unary/vent_scrubber/multitool_topic(var/mob/user, var/list/href_list, var/obj/O)
if("toggleadvcontrol" in href_list)
advcontrol = !advcontrol
return MT_UPDATE
if("set_id" in href_list)
var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID tag for this machine", src, src:id_tag) as null|text),1,MAX_MESSAGE_LEN)
if(!newid)
return
if(frequency == 1439)
initial_loc.air_scrub_info -= id_tag
initial_loc.air_scrub_names -= id_tag
id_tag = newid
broadcast_status()
return MT_UPDATE
return ..()
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if(istype(W, /obj/item/weapon/weldingtool))
@@ -305,6 +342,9 @@
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return 1
if(istype(W, /obj/item/device/multitool))
update_multitool_menu(user)
return 1
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
@@ -328,11 +368,10 @@
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
del(src)
qdel(src)
/obj/machinery/atmospherics/unary/vent_scrubber/Del()
if(initial_loc)
/obj/machinery/atmospherics/unary/vent_scrubber/Destroy()
if(initial_loc && frequency == 1439)
initial_loc.air_scrub_info -= id_tag
initial_loc.air_scrub_names -= id_tag
..()
return
return ..()
+31 -9
View File
@@ -18,6 +18,8 @@
var/datum/pipe_network/network_node1
var/datum/pipe_network/network_node2
req_one_access_txt = "24;10"
/obj/machinery/atmospherics/valve/open
open = 1
icon_state = "map_valve1"
@@ -179,7 +181,7 @@
break
build_network()
update_icon()
update_underlays()
@@ -238,10 +240,11 @@
name = "digital valve"
desc = "A digitally controlled valve."
icon = 'icons/atmos/digital_valve.dmi'
var/frequency = 0
var/id = null
var/frequency = 1439
var/id_tag = null
var/datum/radio_frequency/radio_connection
settagwhitelist = list("id_tag")
/obj/machinery/atmospherics/valve/digital/attack_ai(mob/user as mob)
return src.attack_hand(user)
@@ -281,7 +284,7 @@
set_frequency(frequency)
/obj/machinery/atmospherics/valve/digital/receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id))
if(!signal.data["tag"] || (signal.data["tag"] != id_tag))
return 0
switch(signal.data["command"])
@@ -298,13 +301,24 @@
close()
else
open()
if("valve_set")
if(signal.data["valve_set"] == 1)
if(!open)
open()
else
if(open)
close()
/obj/machinery/atmospherics/valve/digital/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if(istype(W, /obj/item/device/multitool))
update_multitool_menu(user)
return 1
..()
/obj/machinery/atmospherics/valve/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (istype(src, /obj/machinery/atmospherics/valve/digital) && src:frequency)
user << "\red You cannot unwrench this [src], it's too complicated."
return 1
var/datum/gas_mixture/int_air = return_air()
var/datum/gas_mixture/env_air = loc.return_air()
if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
@@ -319,4 +333,12 @@
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(loc, make_from=src)
del(src)
del(src)
/obj/machinery/atmospherics/valve/digital/multitool_menu(var/mob/user,var/obj/item/device/multitool/P)
return {"
<ul>
<li><b>Frequency:</b> <a href="?src=\ref[src];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=\ref[src];set_freq=[1439]">Reset</a>)</li>
<li>[format_tag("ID Tag","id_tag","set_id")]</a></li>
</ul>
"}
+20
View File
@@ -1428,3 +1428,23 @@
dir = get_dir(src, node1)
else
icon_state = "exposed"
/obj/machinery/atmospherics/pipe/vent/attackby(var/obj/item/weapon/W, var/mob/user)
if (!istype(W, /obj/item/weapon/wrench))
return ..()
var/turf/T = get_turf(src)
var/datum/gas_mixture/int_air = return_air()
var/datum/gas_mixture/env_air = T.return_air()
if ((int_air.return_pressure()-env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
user << "\red You cannot unwrench this [src], it too exerted due to internal pressure."
add_fingerprint(user)
return 1
playsound(T, 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to unfasten \the [src]..."
if (do_after(user, 40))
user.visible_message( \
"[user] unfastens \the [src].", \
"\blue You have unfastened \the [src].", \
"You hear ratchet.")
new /obj/item/pipe(T, make_from=src)
del(src)
+6 -1
View File
@@ -24,4 +24,9 @@
#define HYDRO_SPEED_MULTIPLIER 1
#define NANO_IGNORE_DISTANCE 1
#define NANO_IGNORE_DISTANCE 1
// multitool_topic() shit
#define MT_ERROR -1
#define MT_UPDATE 1
#define MT_REINIT 2
+25 -1
View File
@@ -103,4 +103,28 @@
#define EASTER "Easter"
#define HALLOWEEN "Halloween"
#define CHRISTMAS "Christmas"
#define FRIDAY_13TH "Friday the 13th"
#define FRIDAY_13TH "Friday the 13th"
//Light color defs, for light-emitting things
//Some defs may be pure color- this is for neatness, and configurability. Changing #define COLOR_ is a bad idea.
#define LIGHT_COLOR_CYAN "#7BF9FF"
#define LIGHT_COLOR_PURE_CYAN "#00FFFF"
#define LIGHT_COLOR_RED "#B40000"
#define LIGHT_COLOR_ORANGE "#FF9933"
#define LIGHT_COLOR_DARKRED "#A91515"
#define LIGHT_COLOR_PURE_RED "#FF0000"
#define LIGHT_COLOR_GREEN "#00CC00"
#define LIGHT_COLOR_DARKGREEN "#50AB00"
#define LIGHT_COLOR_PURE_GREEN "#00FF00"
#define LIGHT_COLOR_LIGHTBLUE "#0099FF"
#define LIGHT_COLOR_DARKBLUE "#315AB4"
#define LIGHT_COLOR_PURE_BLUE "#0000FF"
#define LIGHT_COLOR_FADEDPURPLE "#A97FAA"
#define LIGHT_COLOR_PURPLE "#CD00CD"
#define LIGHT_COLOR_PINK "#FF33CC"
#define LIGHT_COLOR_WHITE "#FFFFFF"
+7 -1
View File
@@ -6,7 +6,13 @@ var/datum/nanomanager/nanomanager = new()
// event manager, the manager for events
var/datum/event_manager/event_manager = new()
// Announcer intercom, because too much stuff creates an intercom for one message then hard del()s it.
var/global/obj/item/device/radio/intercom/global_announcer = new(null)
var/global/obj/item/device/radio/intercom/global_announcer = create_global_announcer()
// Load order issues means this can't be new'd until other code runs
// This is probably not the way I should be doing this, but I don't know how to do it right!
proc/create_global_announcer()
spawn(0)
global_announcer = new(null)
return
var/list/paper_tag_whitelist = list("center","p","div","span","h1","h2","h3","h4","h5","h6","hr","pre", \
"big","small","font","i","u","b","s","sub","sup","tt","br","hr","ol","ul","li","caption","col", \
-17
View File
@@ -79,23 +79,6 @@
return loc.Adjacent(neighbor,recurse - 1)
return 0
return ..()
/*
Special case: This allows you to reach a door when it is visally on top of,
but technically behind, a fire door
You could try to rewrite this to be faster, but I'm not sure anything would be.
This can be safely removed if border firedoors are ever moved to be on top of doors
so they can be interacted with without opening the door.
*/
/obj/machinery/door/Adjacent(var/atom/neighbor)
var/obj/machinery/door/firedoor/border_only/BOD = locate() in loc
if(BOD)
BOD.throwpass = 1 // allow click to pass
. = ..()
BOD.throwpass = 0
return .
return ..()
/*
This checks if you there is uninterrupted airspace between that turf and this one.
+4
View File
@@ -119,3 +119,7 @@
*/
/mob/new_player/ClickOn()
return
// pAIs are not intended to interact with anything in the world
/mob/living/silicon/pai/UnarmedAttack(var/atom/A)
return
+1 -1
View File
@@ -30,7 +30,7 @@ var/global/datum/controller/mob_system/mob_master
var/starttime
/datum/controller/mob_system/proc/Setup()
world << "\red Mob ticker starting up."
world << "\red \b Mob ticker starting up."
starttime = world.timeofday
/datum/controller/mob_system/proc/process()
+4 -4
View File
@@ -25,7 +25,7 @@
return
/datum/martial_art/proc/basic_hit(var/mob/living/carbon/human/A,var/mob/living/carbon/human/D)
add_logs(A, D, "punched")
add_logs(D, A, "punched")
A.do_attack_animation(D)
var/damage = rand(0,9)
@@ -85,7 +85,7 @@
return 1
/datum/martial_art/boxing/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
add_logs(A, D, "punched")
add_logs(D, A, "punched")
A.do_attack_animation(D)
var/atk_verb = pick("left hook","right hook","straight punch")
@@ -136,7 +136,7 @@
return 1
/datum/martial_art/drunk_brawling/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
add_logs(A, D, "punched")
add_logs(D, A, "punched")
A.do_attack_animation(D)
var/atk_verb = pick("jab","uppercut","overhand punch","drunken right hook","drunken left hook")
@@ -197,7 +197,7 @@
/datum/martial_art/wrestling/proc/Suplex(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
add_logs(A, D, "suplexed")
add_logs(D, A, "suplexed")
D.visible_message("<span class='danger'>[A] suplexes [D]!</span>", \
"<span class='userdanger'>[A] suplexes [D]!</span>")
D.forceMove(A.loc)
+1 -1
View File
@@ -71,7 +71,7 @@
var/obj/item/brain/B = new /obj/item/brain(user.loc)
B.transfer_identity(C)
C.death()
add_logs(user, C, "magically debrained", addition="INTENT: [uppertext(user.a_intent)]")*/
add_logs(C, user, "magically debrained", addition="INTENT: [uppertext(user.a_intent)]")*/
if(C.stomach_contents && item_to_retrive in C.stomach_contents)
C.stomach_contents -= item_to_retrive
+35 -1
View File
@@ -1217,7 +1217,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
/datum/supply_packs/misc/wizard
name = "Wizard Costume Crate"
contains = list(/obj/item/weapon/staff,
contains = list(/obj/item/weapon/twohanded/staff,
/obj/item/clothing/suit/wizrobe/fake,
/obj/item/clothing/shoes/sandal,
/obj/item/clothing/head/wizard/fake)
@@ -1312,3 +1312,37 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
/obj/item/weapon/lipstick/random)
cost = 30 //Lots of very expensive items. You gotta pay up to look good!
containername = "formal-wear crate"
/datum/supply_packs/misc/teamcolors //For team sports like space polo
name = "Team Jerseys Crate"
// 4 red jerseys, 4 blue jerseys, and 1 beach ball
contains = list(/obj/item/clothing/under/color/red/jersey,
/obj/item/clothing/under/color/red/jersey,
/obj/item/clothing/under/color/red/jersey,
/obj/item/clothing/under/color/red/jersey,
/obj/item/clothing/under/color/blue/jersey,
/obj/item/clothing/under/color/blue/jersey,
/obj/item/clothing/under/color/blue/jersey,
/obj/item/clothing/under/color/blue/jersey,
/obj/item/weapon/beach_ball)
cost = 15
containername = "team jerseys crate"
/datum/supply_packs/misc/polo //For space polo! Or horsehead Quiditch
name = "Polo Supply Crate"
// 6 brooms, 6 horse masks for the brooms, and 1 beach ball
contains = list(/obj/item/weapon/twohanded/staff/broom,
/obj/item/weapon/twohanded/staff/broom,
/obj/item/weapon/twohanded/staff/broom,
/obj/item/weapon/twohanded/staff/broom,
/obj/item/weapon/twohanded/staff/broom,
/obj/item/weapon/twohanded/staff/broom,
/obj/item/clothing/mask/horsehead,
/obj/item/clothing/mask/horsehead,
/obj/item/clothing/mask/horsehead,
/obj/item/clothing/mask/horsehead,
/obj/item/clothing/mask/horsehead,
/obj/item/clothing/mask/horsehead,
/obj/item/weapon/beach_ball)
cost = 20
containername = "polo supply crate"
+16
View File
@@ -265,6 +265,14 @@ var/list/uplink_items = list()
excludefrom = list("nuclear emergency")
surplus = 50
/datum/uplink_item/dangerous/flamethrower
name = "Flamethrower"
desc = "A flamethrower, fueled by a portion of highly flammable biotoxins stolen previously from Nanotrasen stations. Make a statement by roasting the filth in their own greed. Use with caution."
item = /obj/item/weapon/flamethrower/full/tank
cost = 11
gamemodes = list("nuclear emergency")
surplus = 40
/datum/uplink_item/dangerous/sword
name = "Energy Sword"
desc = "The esword is an edged weapon with a blade of pure energy. The sword is small enough to be pocketed when inactive. Activating it produces a loud, distinctive noise."
@@ -587,6 +595,14 @@ var/list/uplink_items = list()
item = /obj/item/weapon/aiModule/syndicate
cost = 14
/datum/uplink_item/device_tools/magboots
name = "Blood-Red Magboots"
desc = "A pair of magnetic boots with a Syndicate paintjob that assist with freer movement in space or on-station during gravitational generator failures. \
These reverse-engineered knockoffs of Nanotrasen's 'Advanced Magboots' slow you down in simulated-gravity environments much like the standard issue variety."
item = /obj/item/clothing/shoes/magboots/syndie
cost = 5
gamemodes = list("nuclear emergency")
/datum/uplink_item/device_tools/plastic_explosives
name = "Composition C-4"
desc = "C-4 is plastic explosive of the common variety Composition C. You can use it to breach walls or connect a signaler to its wiring to make it remotely detonable. It has a modifiable timer with a minimum setting of 10 seconds."
@@ -20,11 +20,6 @@
var/list/datum/mind/possible_changelings = get_players_for_role(BE_CHANGELING)
for(var/datum/mind/player in possible_changelings)
for(var/job in restricted_jobs)//Removing robots from the list
if(player.assigned_role == job)
possible_changelings -= player
for(var/mob/new_player/player in player_list)
if((player.mind in possible_changelings) && (player.client.prefs.species in protected_species_changeling))
possible_changelings -= player.mind
@@ -34,6 +29,7 @@
//possible_changelings-=changeling
changelings += changeling
modePlayer += changelings
changeling.restricted_roles = restricted_jobs
return ..()
else
return 0
+4 -2
View File
@@ -98,9 +98,11 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
switch(H.backbag)
if(2) H.equip_or_collect(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
if(H.backbag == 2) H.equip_or_collect(new /obj/item/weapon/storage/backpack(H), slot_back)
if(H.backbag == 3) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/rank/roboticist(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_or_collect(new /obj/item/device/pda/roboticist(H), slot_wear_pda)
+1 -1
View File
@@ -222,7 +222,7 @@
idle_power_usage = 1250
active_power_usage = 2500
light_color = "#7BF9FF"
light_color = LIGHT_COLOR_CYAN
power_change()
..()
+284 -102
View File
@@ -2,12 +2,16 @@ obj/machinery/air_sensor
icon = 'icons/obj/stationobjs.dmi'
icon_state = "gsensor1"
name = "Gas Sensor"
req_one_access_txt = "24;10"
anchored = 1
var/state = 0
var/bolts = 1
var/id_tag
var/frequency = 1439
Mtoollink = 1
settagwhitelist = list("id_tag")
var/on = 1
var/output = 3
@@ -25,6 +29,62 @@ obj/machinery/air_sensor
update_icon()
icon_state = "gsensor[on]"
multitool_menu(var/mob/user, var/obj/item/device/multitool/P)
return {"
<b>Main</b>
<ul>
<li><b>Frequency:</b> <a href="?src=\ref[src];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=\ref[src];set_freq=[initial(frequency)]">Reset</a>)</li>
<li>[format_tag("ID Tag","id_tag")]</li>
<li>Floor Bolts: <a href="?src=\ref[src];toggle_bolts=1">[bolts ? "Enabled" : "Disabled"]</a>
<li>Monitor Pressure: <a href="?src=\ref[src];toggle_out_flag=1">[output&1 ? "Yes" : "No"]</a>
<li>Monitor Temperature: <a href="?src=\ref[src];toggle_out_flag=2">[output&2 ? "Yes" : "No"]</a>
<li>Monitor Oxygen Concentration: <a href="?src=\ref[src];toggle_out_flag=4">[output&4 ? "Yes" : "No"]</a>
<li>Monitor Plasma Concentration: <a href="?src=\ref[src];toggle_out_flag=8">[output&8 ? "Yes" : "No"]</a>
<li>Monitor Nitrogen Concentration: <a href="?src=\ref[src];toggle_out_flag=16">[output&16 ? "Yes" : "No"]</a>
<li>Monitor Carbon Dioxide Concentration: <a href="?src=\ref[src];toggle_out_flag=32">[output&32 ? "Yes" : "No"]</a>
</ul>"}
multitool_topic(var/mob/user, var/list/href_list, var/obj/O)
. = ..()
if(.)
return .
if("toggle_out_flag" in href_list)
var/bitflag_value = text2num(href_list["toggle_out_flag"])//this is a string normally
if(!(bitflag_value in list(1, 2, 4, 8, 16, 32))) //Here to prevent breaking the sensors with HREF exploits
return 0
if(output&bitflag_value)//the bitflag is on ATM
output &= ~bitflag_value
else//can't not be off
output |= bitflag_value
return MT_UPDATE
if("toggle_bolts" in href_list)
bolts = !bolts
if(bolts)
visible_message("You hear a quite click as the [src] bolts to the floor", "You hear a quite click")
else
visible_message("You hear a quite click as the [src]'s floor bolts raise", "You hear a quite click")
return MT_UPDATE
attackby(var/obj/item/W as obj, var/mob/user as mob)
if(istype(W, /obj/item/device/multitool))
update_multitool_menu(user)
return 1
if(istype(W, /obj/item/weapon/wrench))
if(bolts)
usr << "The [src] is bolted to the floor! You can't detach it like this."
return 1
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to unfasten \the [src]..."
if(do_after(user, 40))
user.visible_message("[user] unfastens \the [src].", "\blue You have unfastened \the [src].", "You hear ratchet.")
new /obj/item/pipe_gsensor(src.loc)
del(src)
return 1
if(..())
return 1
process()
if(on)
var/datum/signal/signal = new
@@ -77,11 +137,15 @@ obj/machinery/air_sensor
/obj/machinery/computer/general_air_control
icon = 'icons/obj/computer.dmi'
icon_state = "tank"
circuit = "/obj/item/weapon/circuitboard/air_management"
req_one_access_txt = "24;10"
name = "Computer"
var/frequency = 1439
var/show_sensors=1
var/list/sensors = list()
Mtoollink = 1
var/list/sensor_information = list()
var/datum/radio_frequency/radio_connection
@@ -97,42 +161,16 @@ obj/machinery/air_sensor
process()
..()
if(!sensors)
warning("[src.type] at [x],[y],[z] has null sensors. Please fix.")
//warning("[src.type] at [x],[y],[z] has null sensors. Please fix.")//commenting this line out because the admins will get a warning like this every time somebody builds another GAC
sensors = list()
src.updateUsrDialog()
attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/weapon/circuitboard/air_management/M = new /obj/item/weapon/circuitboard/air_management( A )
for (var/obj/C in src)
C.loc = src.loc
M.frequency = src.frequency
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/air_management/M = new /obj/item/weapon/circuitboard/air_management( A )
for (var/obj/C in src)
C.loc = src.loc
M.frequency = src.frequency
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
else
src.attack_hand(user)
return
if(istype(I, /obj/item/device/multitool))
update_multitool_menu(user)
if(..())
return 1
receive_signal(datum/signal/signal)
if(!signal || signal.encryption) return
@@ -144,38 +182,39 @@ obj/machinery/air_sensor
proc/return_text()
var/sensor_data
if(sensors.len)
for(var/id_tag in sensors)
var/long_name = sensors[id_tag]
var/list/data = sensor_information[id_tag]
var/sensor_part = "<fieldset><legend>[long_name]</legend>"
if(show_sensors)
if(sensors.len)
for(var/id_tag in sensors)
var/long_name = sensors[id_tag]
var/list/data = sensor_information[id_tag]
var/sensor_part = "<fieldset><legend>[long_name]</legend>"
if(data)
sensor_part += "<table>"
if(data["pressure"])
sensor_part += "<tr><th>Pressure:</th><td>[data["pressure"]] kPa</td></tr>"
if(data["temperature"])
sensor_part += "<tr><th>Temperature:</th><td>[data["temperature"]] K</td></tr>"
if(data["oxygen"]||data["toxins"]||data["nitrogen"]||data["carbon_dioxide"])
sensor_part += "<tr><th>Gas Composition :</th><td><ul>"
if(data["oxygen"])
sensor_part += "<li>[data["oxygen"]]% O<sub>2</sub></li>"
if(data["nitrogen"])
sensor_part += "<li>[data["nitrogen"]]% N</li>"
if(data["carbon_dioxide"])
sensor_part += "<li>[data["carbon_dioxide"]]% CO<sub>2</sub></li>"
if(data["toxins"])
sensor_part += "<li>[data["toxins"]]% Plasma</li>"
sensor_part += "</ul></td></tr>"
sensor_part += "</table>"
if(data)
sensor_part += "<table>"
if(data["pressure"])
sensor_part += "<tr><th>Pressure:</th><td>[data["pressure"]] kPa</td></tr>"
if(data["temperature"])
sensor_part += "<tr><th>Temperature:</th><td>[data["temperature"]] K</td></tr>"
if(data["oxygen"]||data["toxins"]||data["nitrogen"]||data["carbon_dioxide"])
sensor_part += "<tr><th>Gas Composition :</th><td><ul>"
if(data["oxygen"])
sensor_part += "<li>[data["oxygen"]]% O<sub>2</sub></li>"
if(data["nitrogen"])
sensor_part += "<li>[data["nitrogen"]]% N</li>"
if(data["carbon_dioxide"])
sensor_part += "<li>[data["carbon_dioxide"]]% CO<sub>2</sub></li>"
if(data["toxins"])
sensor_part += "<li>[data["toxins"]]% Plasma</li>"
sensor_part += "</ul></td></tr>"
sensor_part += "</table>"
else
sensor_part += "<FONT color='red'>[long_name] can not be found!</FONT><BR>"
sensor_part += "</fieldset>"
sensor_data += sensor_part
else
sensor_part += "<FONT color='red'>[long_name] can not be found!</FONT><BR>"
sensor_part += "</fieldset>"
sensor_data += sensor_part
else
sensor_data = "<em>No sensors connected.</em>"
else
sensor_data = "<em>No sensors connected.</em>"
var/output = {"<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@@ -217,8 +256,8 @@ legend {
</head>
<body>
<h1>[name]</h1>
<h2>Sensor Data:</h2>
[sensor_data]"}
[show_sensors ? "<h2>Sensor Data:</h2>" + sensor_data : ""]
"}
return output
@@ -231,9 +270,96 @@ legend {
initialize()
set_frequency(frequency)
multitool_menu(var/mob/user, var/obj/item/device/multitool/P)
var/dat= {"
<b>Main</b>
<ul>
<li><b>Frequency:</b> <a href="?src=\ref[src];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=\ref[src];set_freq=[initial(frequency)]">Reset</a>)</li>
</ul>
<b>Sensors:</b>
<ul>"}
for(var/id_tag in sensors)
dat += {"<li><a href="?src=\ref[src];edit_sensor=[id_tag]">[sensors[id_tag]]</a></li>"}
dat += {"<li><a href="?src=\ref[src];add_sensor=1">\[+\]</a></li></ul>"}
return dat
multitool_topic(var/mob/user,var/list/href_list,var/obj/O)
. = ..()
if(.) return .
if("add_sensor" in href_list)
// Make a list of all available sensors on the same frequency
var/list/sensor_list = list()
for(var/obj/machinery/air_sensor/G in machines)
if(!isnull(G.id_tag) && G.frequency == frequency)
sensor_list|=G.id_tag
if(!sensor_list.len)
user << "<span class=\"warning\">No sensors on this frequency.</span>"
return MT_ERROR
// Have the user pick one of them and name its label
var/sensor = input(user, "Select a sensor:", "Sensor Data") as null|anything in sensor_list
if(!sensor)
return MT_ERROR
var/label = reject_bad_name( input(user, "Choose a sensor label:", "Sensor Label") as text|null, allow_numbers=1)
if(!label)
return MT_ERROR
// Add the sensor's information to general_air_controler
sensors[sensor] = label
return MT_UPDATE
if("edit_sensor" in href_list)
var/list/sensor_list = list()
for(var/obj/machinery/air_sensor/G in machines)
if(!isnull(G.id_tag) && G.frequency == frequency)
sensor_list|=G.id_tag
if(!sensor_list.len)
user << "<span class=\"warning\">No sensors on this frequency.</span>"
return MT_ERROR
var/label = sensors[href_list["edit_sensor"]]
var/sensor = input(user, "Select a sensor:", "Sensor Data", href_list["edit_sensor"]) as null|anything in sensor_list
if(!sensor)
return MT_ERROR
sensors.Remove(href_list["edit_sensor"])
sensors[sensor] = label
return MT_UPDATE
unlinkFrom(var/mob/user, var/obj/O)
..()
if("id_tag" in O.vars && (istype(O,/obj/machinery/air_sensor) || istype(O, /obj/machinery/meter)))
sensors.Remove(O:id_tag)
return 1
return 0
linkMenu(var/obj/O)
if(isLinkedWith(O))
return
var/dat=""
if(istype(O,/obj/machinery/air_sensor) || istype(O, /obj/machinery/meter))
dat += " <a href='?src=\ref[src];link=1'>\[New Sensor\]</a> "
return dat
canLink(var/obj/O, var/list/context)
if(istype(O,/obj/machinery/air_sensor) || istype(O, /obj/machinery/meter))
return O:id_tag
isLinkedWith(var/obj/O)
if(istype(O,/obj/machinery/air_sensor) || istype(O, /obj/machinery/meter))
return O:id_tag in sensors
linkWith(var/mob/user, var/obj/O, var/link/context)
sensors[O:id_tag] = reject_bad_name(input(user, "Choose a sensor label:", "Sensor Label") as text|null, allow_numbers=1)
return 1
large_tank_control
icon = 'icons/obj/computer.dmi'
icon_state = "tank"
circuit = "/obj/item/weapon/circuitboard/large_tank_control"
req_one_access_txt = "24;10"
settagwhitelist = list("input_tag", "output_tag")
var/input_tag
var/output_tag
@@ -241,8 +367,90 @@ legend {
var/list/input_info
var/list/output_info
var/list/input_linkable=list(
/obj/machinery/atmospherics/unary/outlet_injector,
/obj/machinery/atmospherics/unary/vent_pump
)
var/list/output_linkable=list(
/obj/machinery/atmospherics/unary/vent_pump
)
var/pressure_setting = ONE_ATMOSPHERE * 45
attackby(I as obj, user as mob)
if(istype(I, /obj/item/device/multitool))
update_multitool_menu(user)
if(..())
return 1
multitool_menu(var/mob/user, var/obj/item/device/multitool/P)
var/dat= {"
<ul>
<li><b>Frequency:</b> <a href="?src=\ref[src];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=\ref[src];set_freq=[initial(frequency)]">Reset</a>)</li>
<li>[format_tag("Input","input_tag")]</li>
<li>[format_tag("Output","output_tag")]</li>
</ul>
<b>Sensors:</b>
<ul>"}
for(var/id_tag in sensors)
dat += {"<li><a href="?src=\ref[src];edit_sensor=[id_tag]">[sensors[id_tag]]</a></li>"}
dat += {"<li><a href="?src=\ref[src];add_sensor=1">\[+\]</a></li></ul>"}
return dat
linkWith(var/mob/user, var/obj/O, var/list/context)
if(context["slot"]=="input" && is_type_in_list(O,input_linkable))
input_tag = O:id_tag
input_info = null
if(istype(O,/obj/machinery/atmospherics/unary/vent_pump))
send_signal(list("tag"=input_tag,
"direction"=1, // Release
"checks" =0 // No pressure checks.
))
return 1
if(context["slot"]=="output" && is_type_in_list(O,output_linkable))
output_tag = O:id_tag
output_info = null
if(istype(O,/obj/machinery/atmospherics/unary/vent_pump))
send_signal(list("tag"=output_tag,
"direction"=0, // Siphon
"checks" =2 // Internal pressure checks.
))
return 1
unlinkFrom(var/mob/user, var/obj/O)
if("id_tag" in O.vars)
if(O:id_tag == input_tag)
input_tag=null
input_info=null
return 1
if(O:id_tag == output_tag)
output_tag=null
output_info=null
return 1
return 0
linkMenu(var/obj/O)
var/dat=""
if(canLink(O,list("slot"="input")))
dat += " <a href='?src=\ref[src];link=1;slot=input'>\[Link @ Input\]</a> "
if(canLink(O,list("slot"="output")))
dat += " <a href='?src=\ref[src];link=1;slot=output'>\[Link @ Output\]</a> "
return dat
canLink(var/obj/O, var/list/context)
return (context["slot"]=="input" && is_type_in_list(O,input_linkable)) || (context["slot"]=="output" && is_type_in_list(O,output_linkable))
isLinkedWith(var/obj/O)
if(O:id_tag == input_tag)
return 1
if(O:id_tag == output_tag)
return 1
return 0
process()
..()
if(!input_info && input_tag)
@@ -329,7 +537,7 @@ legend {
Topic(href, href_list)
if(..())
return
return 1
add_fingerprint(usr)
@@ -345,34 +553,35 @@ legend {
signal.source = src
if(href_list["in_refresh_status"])
input_info = null
signal.data = list ("tag" = input_tag, "status")
signal.data = list ("tag" = input_tag, "status" = 1)
else if(href_list["in_toggle_injector"])
input_info = null
signal.data = list ("tag" = input_tag, "power_toggle")
signal.data = list ("tag" = input_tag, "power_toggle" = 1)
else if(href_list["out_refresh_status"])
output_info = null
signal.data = list ("tag" = output_tag, "status")
signal.data = list ("tag" = output_tag, "status" = 1)
else if(href_list["out_toggle_power"])
output_info = null
signal.data = list ("tag" = output_tag, "power_toggle")
signal.data = list ("tag" = output_tag, "power_toggle" = 1)
else if(href_list["out_set_pressure"])
output_info = null
signal.data = list ("tag" = output_tag, "set_internal_pressure" = "[pressure_setting]")
else
/*else
testing("Bad Topic() to GAC \"[src.name]\": [href]")
return // NOPE.
return*/ // NOPE. // disabling because it spams when multitool menus are used
signal.data["sigtype"]="command"
signal.data["sigtype"] = "command"
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
src.updateUsrDialog()
fuel_injection
icon = 'icons/obj/computer.dmi'
icon_state = "atmos"
circuit = "/obj/item/weapon/circuitboard/injector_control"
var/device_tag
var/list/device_info
@@ -383,37 +592,10 @@ legend {
var/on_temperature = 1200
attackby(I as obj, user as mob, params)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
getFromPool(/obj/item/weapon/shard, loc)
var/obj/item/weapon/circuitboard/injector_control/M = new /obj/item/weapon/circuitboard/injector_control( A )
for (var/obj/C in src)
C.loc = src.loc
M.frequency = src.frequency
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
del(src)
else
user << "\blue You disconnect the monitor."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/injector_control/M = new /obj/item/weapon/circuitboard/injector_control( A )
for (var/obj/C in src)
C.loc = src.loc
M.frequency = src.frequency
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
del(src)
else
src.attack_hand(user)
return
if(istype(I, /obj/item/device/multitool))
update_multitool_menu(user)
if(..())
return 1
process()
if(automation)
@@ -9,7 +9,7 @@
var/range = 25
light_color = "#7BF9FF"
light_color = LIGHT_COLOR_CYAN
//Simple variable to prevent me from doing attack_hand in both this and the child computer
var/zone = "This computer is working on a wireless range, the range is currently limited to 25 meters."
+20 -2
View File
@@ -8,13 +8,19 @@
power_channel = ENVIRON
var/frequency = 0
var/id
var/id_tag
use_power = 1
idle_power_usage = 2
active_power_usage = 5
req_one_access_txt = "24;10"
Mtoollink = 1
settagwhitelist = list("id_tag")
/obj/machinery/meter/New()
..()
src.target = locate(/obj/machinery/atmospherics/pipe) in loc
if(id && !id_tag)//i'm not dealing with further merge conflicts, fuck it
id_tag = id
return 1
/obj/machinery/meter/initialize()
@@ -59,7 +65,7 @@
signal.source = src
signal.transmission_method = 1
signal.data = list(
"tag" = id,
"tag" = id_tag,
"device" = "AM",
"pressure" = round(env_pressure),
"sigtype" = "status"
@@ -106,6 +112,10 @@
return ..()
/obj/machinery/meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if(istype(W, /obj/item/device/multitool))
update_multitool_menu(user)
return 1
if (!istype(W, /obj/item/weapon/wrench))
return ..()
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
@@ -131,4 +141,12 @@
src.target = loc
/obj/machinery/meter/turf/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
return
return
/obj/machinery/meter/multitool_menu(var/mob/user, var/obj/item/device/multitool/P)
return {"
<b>Main</b>
<ul>
<li><b>Frequency:</b> <a href="?src=\ref[src];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=\ref[src];set_freq=[initial(frequency)]">Reset</a>)</li>
<li>[format_tag("ID Tag","id_tag")]</li>
</ul>"}
+2 -1
View File
@@ -134,7 +134,8 @@
dat += "<div class='statusDisplay'>Error: No growns inside.<BR>Please put growns into reactor.</div>"
menustat = "menu"
if("nobeakerspace")
dat += "<div class='statusDisplay'>Not enough space left in container. Unable to create product.</div>"
// dat += "<div class='statusDisplay'>Not enough space left in container. Unable to create product.</div>"
user << "<span class='warning'>Not enough space left in container. Unable to create product. Please empty container.</span>"
menustat = "menu"
if(beaker)
dat += "<div class='statusDisplay'>Biomass: [points] units.</div><BR>"
+6 -6
View File
@@ -3,7 +3,7 @@
desc = "A little security robot. He looks less than thrilled."
icon = 'icons/obj/aibots.dmi'
icon_state = "secbot0"
light_color = "#FF0000"
light_color = LIGHT_COLOR_PURE_RED
layer = 5.0
density = 0
anchored = 0
@@ -414,12 +414,12 @@ Auto Patrol: []"},
/obj/machinery/bot/secbot/proc/flashing_lights()
if(mode == BOT_HUNT)
switch(light_color)
if("#FF0000")
light_color = "#0000FF"
if("#0000FF")
light_color = "#FF0000"
if(LIGHT_COLOR_PURE_RED)
light_color = LIGHT_COLOR_PURE_BLUE
if(LIGHT_COLOR_PURE_BLUE)
light_color = LIGHT_COLOR_PURE_RED
else
light_color = "#FF0000"
light_color = LIGHT_COLOR_PURE_RED
//Secbot Construction
+1 -1
View File
@@ -24,7 +24,7 @@
var/speed_coeff
var/efficiency
light_color = "#00FF00"
light_color = LIGHT_COLOR_PURE_GREEN
power_change()
..()
if(!(stat & (BROKEN|NOPOWER)))
@@ -9,7 +9,7 @@
var/damaged = 0
var/last_change = 0
light_color = "#7BF9FF"
light_color = LIGHT_COLOR_CYAN
attack_ai(var/mob/user as mob)
+1 -1
View File
@@ -9,7 +9,7 @@
var/mob/living/carbon/human/victim = null
var/obj/machinery/optable/table = null
light_color = "#0000FF"
light_color = LIGHT_COLOR_PURE_BLUE
/obj/machinery/computer/operating/New()
..()
+1 -1
View File
@@ -7,7 +7,7 @@
var/mob/living/silicon/ai/occupant = null
var/active = 0
light_color = "#CD00CD"
light_color = LIGHT_COLOR_PURPLE
/obj/machinery/computer/aifixer/New()
src.overlays += image('icons/obj/computer.dmi', "ai-fixer-empty")
+1 -1
View File
@@ -11,7 +11,7 @@
var/receive_frequency = 1437
var/datum/radio_frequency/radio_connection
light_color = "#7BF9FF"
light_color = LIGHT_COLOR_CYAN
/obj/machinery/computer/atmos_alert/initialize()
@@ -232,6 +232,13 @@
build_path = "/obj/machinery/computer/telescience"
origin_tech = "programming=3;bluespace=2"
/obj/item/weapon/circuitboard/atmos_automation
name = "Circuit board (Atmospherics Automation)"
build_path = "/obj/machinery/computer/general_air_control/atmos_automation"
/obj/item/weapon/circuitboard/large_tank_control
name = "Circuit board (Atmospheric Tank Control)"
build_path = "/obj/machinery/computer/general_air_control/large_tank_control"
/obj/item/weapon/circuitboard/HONKputer
name = "Circuit board (HONKputer)"
build_path = "/obj/machinery/computer/HONKputer"
+1 -1
View File
@@ -11,7 +11,7 @@ var/camera_cache_id = 1
var/obj/machinery/camera/current = null
var/list/network = list("")
var/last_pic = 1.0
light_color = "#B40000"
light_color = LIGHT_COLOR_RED
var/mapping = 0
var/cache_id = 0
var/list/networks[0]
+1 -1
View File
@@ -11,7 +11,7 @@
var/mode = 0.0
var/printing = null
light_color = "#0099FF"
light_color = LIGHT_COLOR_LIGHTBLUE
proc/is_centcom()
return istype(src, /obj/machinery/computer/card/centcom)
+1 -1
View File
@@ -16,7 +16,7 @@
var/autoprocess = 0
var/data[0]
light_color = "#315AB4"
light_color = LIGHT_COLOR_DARKBLUE
/obj/machinery/computer/cloning/New()
..()
@@ -58,7 +58,7 @@ var/shuttle_call/shuttle_calls[0]
var/datum/announcement/priority/crew_announcement = new
light_color = "#0099FF"
light_color = LIGHT_COLOR_LIGHTBLUE
/obj/machinery/computer/communications/New()
..()
+1 -1
View File
@@ -5,7 +5,7 @@
use_power = 1
idle_power_usage = 250
active_power_usage = 500
light_color = "#315AB4"
light_color = LIGHT_COLOR_DARKBLUE
circuit = "/obj/item/weapon/circuitboard/crew"
var/obj/nano_module/crew_monitor/crew_monitor
+1 -1
View File
@@ -3,7 +3,7 @@
desc = "A yellow computer used in case of critically low levels of HONK."
icon = 'icons/obj/machines/HONKputer.dmi'
icon_state = "honk"
light_color = "#FF33CC"
light_color = LIGHT_COLOR_PINK
req_access = list(access_clown)
circuit = "/obj/item/weapon/circuitboard/HONKputer"
var/authenticated = 0
+2 -2
View File
@@ -8,8 +8,8 @@
var/mob/living/silicon/ai/current = null
var/opened = 0
light_color = "#FFFFFF"
light_range_on = "2"
light_color = LIGHT_COLOR_WHITE
light_range_on = 2
verb/AccessInternals()
+1 -1
View File
@@ -16,7 +16,7 @@
var/temp = null
var/printing = null
light_color = "#315AB4"
light_color = LIGHT_COLOR_DARKBLUE
/obj/machinery/computer/med_data/attack_ai(user as mob)
return src.attack_hand(user)
+2 -2
View File
@@ -8,7 +8,7 @@
name = "Message Monitor Console"
desc = "Used to Monitor the crew's messages, that are sent via PDA. Can also be used to view Request Console messages."
icon_state = "comm_logs"
light_color = "#00b000"
light_color = LIGHT_COLOR_GREEN
var/hack_icon = "comm_logsc"
var/normal_icon = "comm_logs"
circuit = "/obj/item/weapon/circuitboard/message_monitor"
@@ -34,7 +34,7 @@
var/customjob = "Admin"
var/custommessage = "This is a test, please ignore."
light_color = "#50AB00"
light_color = LIGHT_COLOR_DARKGREEN
/obj/machinery/computer/message_monitor/attackby(obj/item/weapon/O as obj, mob/living/user as mob, params)
+1 -1
View File
@@ -4,7 +4,7 @@
name = "Pod Launch Control"
desc = "A controll for launching pods. Some people prefer firing Mechas."
icon_state = "computer_generic"
light_color = "#00B000"
light_color = LIGHT_COLOR_GREEN
circuit = /obj/item/weapon/circuitboard/pod
var/id = 1.0
var/obj/machinery/mass_driver/connected = null
@@ -2,7 +2,7 @@
name = "Pod Tracking Console"
icon = 'icons/obj/computer.dmi'
icon_state = "podtracking"
light_color = "#C860C8"
light_color = LIGHT_COLOR_PURPLE
req_access = list(access_robotics)
circuit = "/obj/item/weapon/circuitboard/pod_locater"
+1 -1
View File
@@ -11,7 +11,7 @@
idle_power_usage = 20
active_power_usage = 80
light_color = "#FF9933"
light_color = LIGHT_COLOR_ORANGE
//fix for issue 521, by QualityVan.
//someone should really look into why circuits have a powernet var, it's several kinds of retarded.
+1 -1
View File
@@ -14,7 +14,7 @@
var/screen = 0 // 0 - No Access Denied, 1 - Access allowed
var/obj/item/weapon/card/id/prisoner/inserted_id
light_color = "#A91515"
light_color = LIGHT_COLOR_DARKRED
attack_ai(var/mob/user as mob)
@@ -14,7 +14,7 @@ var/prison_shuttle_timeleft = 0
name = "Prison Shuttle Console"
icon = 'icons/obj/computer.dmi'
icon_state = "shuttle"
light_color = "#00ffff"
light_color = LIGHT_COLOR_PURE_CYAN
req_access = list(access_security)
circuit = "/obj/item/weapon/circuitboard/prison_shuttle"
var/temp = null
+1 -1
View File
@@ -10,7 +10,7 @@
circuit = /obj/item/weapon/circuitboard/robotics
var/temp = null
light_color = "#CD00CD"
light_color = LIGHT_COLOR_PURPLE
/obj/machinery/computer/robotics/proc/can_control(var/mob/user, var/mob/living/silicon/robot/R)
if(!istype(R))
+1 -1
View File
@@ -22,7 +22,7 @@
var/sortBy = "name"
var/order = 1 // -1 = Descending - 1 = Ascending
light_color = "#B40000"
light_color = LIGHT_COLOR_RED
/obj/machinery/computer/secure_data/attackby(obj/item/O as obj, user as mob, params)
+1 -1
View File
@@ -5,7 +5,7 @@
var/auth_need = 3.0
var/list/authorized = list( )
light_color = "#7BF9FF"
light_color = LIGHT_COLOR_CYAN
attackby(var/obj/item/weapon/card/W as obj, var/mob/user as mob, params)
+1 -1
View File
@@ -4,7 +4,7 @@
name = "Employment Records"
desc = "Used to view personnel's employment records"
icon_state = "medlaptop"
light_color = "#00b000"
light_color = LIGHT_COLOR_GREEN
req_one_access = list(access_heads)
circuit = "/obj/item/weapon/circuitboard/skills"
var/obj/item/weapon/card/id/scan = null
@@ -15,7 +15,7 @@ var/specops_shuttle_timeleft = 0
name = "Spec. Ops. Shuttle Console"
icon = 'icons/obj/computer.dmi'
icon_state = "shuttle"
light_color = "#00ffff"
light_color = LIGHT_COLOR_PURE_CYAN
req_access = list(access_cent_specops)
// req_access = list(ACCESS_CENT_SPECOPS)
var/temp = null
@@ -6,7 +6,7 @@
circuit = "/obj/item/weapon/circuitboard/stationalert"
var/alarms = list("Fire"=list(), "Atmosphere"=list(), "Power"=list())
light_color = "#7BF9FF"
light_color = LIGHT_COLOR_CYAN
attack_ai(mob/user)
+1 -1
View File
@@ -4,7 +4,7 @@
icon_state = "comm_logs"
circuit = "/obj/item/weapon/circuitboard/merch"
light_color = "#00CC00"
light_color = LIGHT_COLOR_GREEN
/obj/item/weapon/circuitboard/merch
name = "\improper Merchandise Computer Circuitboard"
@@ -14,7 +14,7 @@ var/syndicate_elite_shuttle_timeleft = 0
name = "Elite Syndicate Squad Shuttle Console"
icon = 'icons/obj/computer.dmi'
icon_state = "syndishuttle"
light_color = "#00ffff"
light_color = LIGHT_COLOR_PURE_CYAN
req_access = list(access_syndicate)
var/temp = null
var/hacked = 0
+1 -1
View File
@@ -17,7 +17,7 @@
var/current_heat_capacity = 50
var/efficiency
light_color = "#FFFFFF"
light_color = LIGHT_COLOR_WHITE
power_change()
..()
if(!(stat & (BROKEN|NOPOWER)))
+7
View File
@@ -307,6 +307,13 @@
W.loc = src
if(W.contents.len) //Make sure we catch anything not handled by del() on the items.
var/preserve = null
for(var/T in preserve_items)
if(istype(W,T))
preserve = 1
break
if(preserve) // Don't remove the contents of things that need preservation
continue
for(var/obj/item/O in W.contents)
if(istype(O,/obj/item/weapon/tank)) //Stop eating pockets, you fuck!
continue
+2 -2
View File
@@ -239,7 +239,7 @@
sleep(5)
src.density = 0
sleep(5)
src.layer = 2.7
src.layer = open_layer
update_icon()
set_opacity(0)
operating = 0
@@ -263,7 +263,7 @@
operating = 1
do_animate("closing")
src.layer = 3.1
src.layer = closed_layer
sleep(5)
src.density = 1
sleep(5)
+1
View File
@@ -18,6 +18,7 @@
var/nextstate = null
var/logged_users
closed_layer = 3.11
/obj/machinery/door/firedoor/New()
. = ..()
+42 -35
View File
@@ -19,6 +19,10 @@
name = "Large Pod Door"
icon = 'icons/obj/doors/1x3blast_vert.dmi'
/obj/machinery/door/poddoor/two_tile_ver/
name = "Large Pod Door"
icon = 'icons/obj/doors/1x2blast_vert.dmi'
/obj/machinery/door/poddoor/Bumped(atom/AM)
if(!density)
return ..()
@@ -105,7 +109,7 @@
src.operating = 0
return
/*
/
/obj/machinery/door/poddoor/two_tile_hor/open()
if (src.operating == 1) //doors can still open when emag-disabled
return
@@ -115,16 +119,17 @@
src.operating = 1
flick("pdoorc0", src)
src.icon_state = "pdoor0"
src.set_opacity(0)
f1.set_opacity(0)
f2.set_opacity(0)
sleep(10)
src.density = 0
f1.density = 0
f2.density = 0
src.set_opacity(0)
update_nearby_tiles()
f1.density = 0
f1.set_opacity(0)
f2.density = 0
f2.set_opacity(0)
air_update_turf(1)
update_freelok_sight()
if(operating == 1) //emag again
src.operating = 0
@@ -139,21 +144,22 @@
src.operating = 1
flick("pdoorc1", src)
src.icon_state = "pdoor1"
src.density = 1
f1.density = 1
f1.set_opacity(1)
f2.density = 1
f2.set_opacity(1)
if (src.visible)
src.set_opacity(1)
air_update_turf(1)
update_freelok_sight()
sleep(10)
src.set_opacity(initial(opacity))
f1.set_opacity(initial(opacity))
f2.set_opacity(initial(opacity))
update_nearby_tiles()
src.operating = 0
return
*/
/obj/machinery/door/poddoor/three_tile_hor/open()
if (src.operating == 1) //doors can still open when emag-disabled
return
@@ -265,7 +271,9 @@
sleep(10)
src.operating = 0
return
/*
/obj/machinery/door/poddoor/two_tile_ver/open()
if (src.operating == 1) //doors can still open when emag-disabled
return
@@ -277,14 +285,15 @@
src.icon_state = "pdoor0"
sleep(10)
src.density = 0
src.sd_set_opacity(0)
src.set_opacity(0)
f1.density = 0
f1.sd_set_opacity(0)
f1.set_opacity(0)
f2.density = 0
f2.sd_set_opacity(0)
f2.set_opacity(0)
update_nearby_tiles()
air_update_turf(1)
update_freelok_sight()
if(operating == 1) //emag again
src.operating = 0
@@ -302,18 +311,18 @@
src.density = 1
f1.density = 1
f1.sd_set_opacity(1)
f1.set_opacity(1)
f2.density = 1
f2.sd_set_opacity(1)
f2.set_opacity(1)
if (src.visible)
src.sd_set_opacity(1)
update_nearby_tiles()
src.set_opacity(1)
air_update_turf(1)
update_freelok_sight()
sleep(10)
src.operating = 0
return
*/
/obj/machinery/door/poddoor/three_tile_ver/open()
if (src.operating == 1) //doors can still open when emag-disabled
@@ -428,8 +437,6 @@
return
/*
/obj/machinery/door/poddoor/two_tile_hor
var/obj/machinery/door/poddoor/filler_object/f1
var/obj/machinery/door/poddoor/filler_object/f2
@@ -438,11 +445,11 @@
New()
..()
f1 = new/obj/machinery/door/poddoor/filler_object (src.loc)
f2 = new/obj/machinery/door/poddoor/filler_object (get_step(src,EAST))
f2 = new/obj/machinery/door/poddoor/filler_object (get_step(f1,EAST))
f1.density = density
f2.density = density
f1.sd_set_opacity(opacity)
f2.sd_set_opacity(opacity)
f1.set_opacity(opacity)
f2.set_opacity(opacity)
Destroy()
del f1
@@ -457,17 +464,17 @@
New()
..()
f1 = new/obj/machinery/door/poddoor/filler_object (src.loc)
f2 = new/obj/machinery/door/poddoor/filler_object (get_step(src,NORTH))
f2 = new/obj/machinery/door/poddoor/filler_object (get_step(f1,NORTH))
f1.density = density
f2.density = density
f1.sd_set_opacity(opacity)
f2.sd_set_opacity(opacity)
f1.set_opacity(opacity)
f2.set_opacity(opacity)
Destroy()
del f1
del f2
..()
*/
/obj/machinery/door/poddoor/three_tile_hor
var/obj/machinery/door/poddoor/filler_object/f1
var/obj/machinery/door/poddoor/filler_object/f2
+2 -2
View File
@@ -233,11 +233,11 @@
user << "<span class='danger'>Subject may not have abiotic items on.</span>"
return
user.visible_message("\red [user] starts to put [victim] into the gibber!")
user.visible_message("<span class='danger'>[user] starts to put [victim] into the gibber!</span>")
src.add_fingerprint(user)
if(do_after(user, 30) && user.Adjacent(src) && victim.Adjacent(user) && !occupant)
user.visible_message("\red [user] stuffs [victim] into the gibber!")
user.visible_message("<span class='danger'>[user] stuffs [victim] into the gibber!</span>")
if(victim.client)
victim.client.perspective = EYE_PERSPECTIVE
+5 -1
View File
@@ -33,7 +33,11 @@
if (!available_recipes)
available_recipes = new
for (var/type in (typesof(/datum/recipe/microwave)-/datum/recipe/microwave))
available_recipes+= new type
var/datum/recipe/recipe = new type
if(recipe.result) // Ignore recipe subtypes that lack a result
available_recipes += recipe
else
del(recipe)
acceptable_items = new
acceptable_reagents = new
for (var/datum/recipe/microwave/recipe in available_recipes)
+117 -3
View File
@@ -114,6 +114,7 @@ Class Procs:
var/area/myArea
var/interact_offline = 0 // Can the machine be interacted with while de-powered.
var/use_log = list()
var/list/settagwhitelist = list()//WHITELIST OF VARIABLES THAT THE set_tag HREF CAN MODIFY, DON'T PUT SHIT YOU DON'T NEED ON HERE, AND IF YOU'RE GONNA USE set_tag (format_tag() proc), ADD TO THIS LIST.
/obj/machinery/New()
addAtProcessing()
@@ -184,6 +185,119 @@ Class Procs:
use_power(active_power_usage,power_channel, 1)
return 1
/obj/machinery/proc/multitool_topic(var/mob/user,var/list/href_list,var/obj/O)
if("set_id" in href_list)
if(!("id_tag" in vars))
warning("set_id: [type] has no id_tag var.")
var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID tag for this machine", src, src:id_tag) as null|text),1,MAX_MESSAGE_LEN)
if(newid)
src:id_tag = newid
return MT_UPDATE|MT_REINIT
if("set_freq" in href_list)
if(!("frequency" in vars))
warning("set_freq: [type] has no frequency var.")
return 0
var/newfreq=src:frequency
if(href_list["set_freq"]!="-1")
newfreq=text2num(href_list["set_freq"])
else
newfreq = input(usr, "Specify a new frequency (GHz). Decimals assigned automatically.", src, src:frequency) as null|num
if(newfreq)
if(findtext(num2text(newfreq), "."))
newfreq *= 10 // shift the decimal one place
if(newfreq < 10000)
src:frequency = newfreq
return MT_UPDATE|MT_REINIT
return 0
/obj/machinery/proc/handle_multitool_topic(var/href, var/list/href_list, var/mob/user)
if(!allowed(user))//no, not even HREF exploits
return 0
var/obj/item/device/multitool/P = get_multitool(usr)
if(P && istype(P))
var/update_mt_menu=0
var/re_init=0
if("set_tag" in href_list)
if(!(href_list["set_tag"] in settagwhitelist))//I see you're trying Href exploits, I see you're failing, I SEE ADMIN WARNING. (seriously though, this is a powerfull HREF, I originally found this loophole, I'm not leaving it in on my PR)
message_admins("set_tag HREF (var attempted to edit: [href_list["set_tag"]]) exploit attempted by [key_name(user, user.client)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) on [src] ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
return 1
if(!(href_list["set_tag"] in vars))
usr << "<span class='warning'>Something went wrong: Unable to find [href_list["set_tag"]] in vars!</span>"
return 1
var/current_tag = src.vars[href_list["set_tag"]]
var/newid = copytext(reject_bad_text(input(usr, "Specify the new value", src, current_tag) as null|text),1,MAX_MESSAGE_LEN)
if(newid)
vars[href_list["set_tag"]] = newid
re_init=1
if("unlink" in href_list)
var/idx = text2num(href_list["unlink"])
if (!idx)
return 1
var/obj/O = getLink(idx)
if(!O)
return 1
if(!canLink(O))
usr << "\red You can't link with that device."
return 1
if(unlinkFrom(usr, O))
usr << "\blue A green light flashes on \the [P], confirming the link was removed."
else
usr << "\red A red light flashes on \the [P]. It appears something went wrong when unlinking the two devices."
update_mt_menu=1
if("link" in href_list)
var/obj/O = P.buffer
if(!O)
return 1
if(!canLink(O,href_list))
usr << "\red You can't link with that device."
return 1
if (isLinkedWith(O))
usr << "\red A red light flashes on \the [P]. The two devices are already linked."
return 1
if(linkWith(usr, O, href_list))
usr << "\blue A green light flashes on \the [P], confirming the link was added."
else
usr << "\red A red light flashes on \the [P]. It appears something went wrong when linking the two devices."
update_mt_menu=1
if("buffer" in href_list)
P.buffer = src
usr << "\blue A green light flashes, and the device appears in the multitool buffer."
update_mt_menu=1
if("flush" in href_list)
usr << "\blue A green light flashes, and the device disappears from the multitool buffer."
P.buffer = null
update_mt_menu=1
var/ret = multitool_topic(usr,href_list,P.buffer)
if(ret == MT_ERROR)
return 1
if(ret & MT_UPDATE)
update_mt_menu=1
if(ret & MT_REINIT)
re_init=1
if(re_init)
initialize()
if(update_mt_menu)
//usr.set_machine(src)
update_multitool_menu(usr)
return 1
/obj/machinery/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/custom_state = default_state)
if(..())
return 1
handle_multitool_topic(href,href_list,usr)
add_fingerprint(usr)
return 0
/obj/machinery/CanUseTopic(var/mob/user, var/be_close)
if(!interact_offline && (stat & (NOPOWER|BROKEN)))
return STATUS_CLOSE
@@ -197,8 +311,8 @@ Class Procs:
/obj/machinery/CouldNotUseTopic(var/mob/user)
usr.unset_machine()
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
/obj/machinery/attack_ai(var/mob/user as mob)
if(isrobot(user))
// For some reason attack_robot doesn't work
@@ -354,7 +468,7 @@ Class Procs:
I.loc = loc
del(src)
return 1
/obj/machinery/proc/on_assess_perp(mob/living/carbon/human/perp)
return 0
+125 -13
View File
@@ -45,6 +45,12 @@ Buildable meters
#define PIPE_SUPPLY_CAP 37
#define PIPE_SCRUBBERS_CAP 38
///// /vg/ ported stuff
#define PIPE_INJECTOR 39
#define PIPE_DVALVE 40
#define PIPE_DP_VENT 41
#define PIPE_PASV_VENT 42
/obj/item/pipe
name = "pipe"
desc = "A pipe"
@@ -103,6 +109,8 @@ Buildable meters
src.pipe_type = PIPE_MANIFOLD
else if(istype(make_from, /obj/machinery/atmospherics/unary/vent_pump))
src.pipe_type = PIPE_UVENT
else if(istype(make_from, /obj/machinery/atmospherics/valve/digital))
src.pipe_type = PIPE_DVALVE
else if(istype(make_from, /obj/machinery/atmospherics/valve))
src.pipe_type = PIPE_MVALVE
else if(istype(make_from, /obj/machinery/atmospherics/binary/pump))
@@ -147,6 +155,15 @@ Buildable meters
src.color = PIPE_COLOR_RED
else if(istype(make_from, /obj/machinery/atmospherics/pipe/cap))
src.pipe_type = PIPE_CAP
else if(istype(make_from, /obj/machinery/atmospherics/unary/outlet_injector))
src.pipe_type = PIPE_INJECTOR
else if(istype(make_from, /obj/machinery/atmospherics/binary/dp_vent_pump))
src.pipe_type = PIPE_DP_VENT
else if(istype(make_from, /obj/machinery/atmospherics/pipe/vent))
src.pipe_type = PIPE_PASV_VENT
else if(istype(make_from, /obj/machinery/atmospherics/omni/mixer))
src.pipe_type = PIPE_OMNI_MIXER
else if(istype(make_from, /obj/machinery/atmospherics/omni/filter))
@@ -157,6 +174,7 @@ Buildable meters
else if(istype(make_from, /obj/machinery/atmospherics/pipe/zpipe/down))
src.pipe_type = PIPE_DOWN*/
///// Z-Level stuff
else
src.pipe_type = pipe_type
src.dir = dir
@@ -219,6 +237,11 @@ Buildable meters
"scrubbers 4-way manifold", \
"supply pipe cap", \
"scrubbers pipe cap", \
// /vg/ ported stuff
"air injector", \
"Digital Valve", \
"dual-port vent", \
"passive vent", \
)
name = nlist[pipe_type+1] + " fitting"
var/list/islist = list( \
@@ -264,11 +287,12 @@ Buildable meters
"manifold4w", \
"cap", \
"cap", \
"cap", \
"cap", \
"cap", \
"cap", \
)
// /vg/ ported stuff
"injector", \
"dvalve", \
"dual-port vent", \
"passive vent", \
)
icon_state = islist[pipe_type + 1]
//called when a turf is attacked with a pipe item
@@ -286,7 +310,7 @@ Buildable meters
src.dir = turn(src.dir, -90)
if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE))
if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE, PIPE_DVALVE))
if(dir==2)
dir = 1
else if(dir==8)
@@ -301,7 +325,7 @@ Buildable meters
if ((pipe_type in list (PIPE_SIMPLE_BENT, PIPE_SUPPLY_BENT, PIPE_SCRUBBERS_BENT, PIPE_HE_BENT, PIPE_INSULATED_BENT)) \
&& (src.dir in cardinal))
src.dir = src.dir|turn(src.dir, 90)
else if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE))
else if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE, PIPE_DVALVE))
if(dir==2)
dir = 1
else if(dir==8)
@@ -325,6 +349,9 @@ Buildable meters
PIPE_PUMP ,\
PIPE_VOLUME_PUMP ,\
PIPE_PASSIVE_GATE ,\
PIPE_MVALVE, \
PIPE_DVALVE, \
PIPE_DP_VENT, \
PIPE_MVALVE ,\
PIPE_SUPPLY_STRAIGHT, \
PIPE_SCRUBBERS_STRAIGHT, \
@@ -333,7 +360,7 @@ Buildable meters
return dir|flip
if(PIPE_SIMPLE_BENT, PIPE_INSULATED_BENT, PIPE_HE_BENT, PIPE_SUPPLY_BENT, PIPE_SCRUBBERS_BENT)
return dir //dir|acw
if(PIPE_CONNECTOR,PIPE_UVENT,PIPE_SCRUBBER,PIPE_HEAT_EXCHANGE)
if(PIPE_CONNECTOR,PIPE_UVENT,PIPE_PASV_VENT,PIPE_SCRUBBER,PIPE_HEAT_EXCHANGE, PIPE_INJECTOR)
return dir
if(PIPE_MANIFOLD4W, PIPE_SUPPLY_MANIFOLD4W, PIPE_SCRUBBERS_MANIFOLD4W, PIPE_OMNI_MIXER, PIPE_OMNI_FILTER)
return dir|flip|cw|acw
@@ -395,7 +422,7 @@ Buildable meters
return ..()
if (!isturf(src.loc))
return 1
if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE))
if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE, PIPE_DVALVE))
if(dir==2)
dir = 1
else if(dir==8)
@@ -1003,6 +1030,74 @@ Buildable meters
C.node.build_network()
machineReference = C
if(PIPE_INJECTOR) // air injector
var/obj/machinery/atmospherics/unary/outlet_injector/P = new( src.loc )
P.dir = dir
P.initialize_directions = get_pipe_dir()
if (pipename)
name = pipename
var/turf/T = loc
P.level = T.intact ? 2 : 1
P.initialize()
P.build_network()
if (P.node)
P.node.initialize()
P.node.build_network()
machineReference = P
if(PIPE_DVALVE)
var/obj/machinery/atmospherics/valve/digital/V = new( src.loc )
V.dir = dir
V.initialize_directions = pipe_dir
if (pipename)
V.name = pipename
var/turf/T = V.loc
V.level = T.intact ? 2 : 1
V.initialize()
V.build_network()
if (V.node1)
// world << "[V.node1.name] is connected to valve, forcing it to update its nodes."
V.node1.initialize()
V.node1.build_network()
if (V.node2)
// world << "[V.node2.name] is connected to valve, forcing it to update its nodes."
V.node2.initialize()
V.node2.build_network()
machineReference = V
if(PIPE_DP_VENT)
var/obj/machinery/atmospherics/binary/dp_vent_pump/P = new(src.loc)
P.dir = dir
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
P.build_network()
if (P.node1)
P.node1.initialize()
P.node1.build_network()
if (P.node2)
P.node2.initialize()
P.node2.build_network()
machineReference = P
if(PIPE_PASV_VENT)
var/obj/machinery/atmospherics/pipe/vent/P = new(src.loc)
P.dir = dir
P.initialize_directions = get_pipe_dir()
if (pipename)
name = pipename
var/turf/T = loc
level = T.intact ? 2 : 1
initialize()
P.build_network()
if (P.node1)
P.node1.initialize()
P.node1.build_network()
machineReference = P
///// Z-Level stuff
/* if(PIPE_UP)
var/obj/machinery/atmospherics/pipe/zpipe/up/P = new(src.loc)
@@ -1029,10 +1124,6 @@ Buildable meters
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
P.build_network()
if (P.node1)
P.node1.initialize()
P.node1.build_network()
if (P.node2)
P.node2.initialize()
P.node2.build_network()*/
@@ -1090,6 +1181,23 @@ Buildable meters
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You have fastened the meter to the pipe"
del(src)
/obj/item/pipe_gsensor
name = "gas sensor"
desc = "A sensor that can be hooked to a computer"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "gsensor0"
item_state = "buildpipe"
w_class = 4
/obj/item/pipe_gsensor/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
..()
if (!istype(W, /obj/item/weapon/wrench))
return ..()
new/obj/machinery/air_sensor( src.loc )
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You have fastened the gas sensor"
del(src)
//not sure why these are necessary
#undef PIPE_SIMPLE_STRAIGHT
#undef PIPE_SIMPLE_BENT
@@ -1120,4 +1228,8 @@ Buildable meters
#undef PIPE_SUPPLY_MANIFOLD
#undef PIPE_SCRUBBERS_MANIFOLD
#undef PIPE_UNIVERSAL
#undef PIPE_INJECTOR
#undef PIPE_DVALVE
#undef PIPE_DP_VENT
#undef PIPE_PASV_VENT
//#undef PIPE_MANIFOLD4W
@@ -19,6 +19,7 @@
<A href='?src=\ref[src];make=1;dir=5'>Bent Pipe</A><BR>
<A href='?src=\ref[src];make=5;dir=1'>Manifold</A><BR>
<A href='?src=\ref[src];make=8;dir=1'>Manual Valve</A><BR>
<A href='?src=\ref[src];make=40;dir=1'>Digital Valve</A><BR>
<A href='?src=\ref[src];make=20;dir=1'>Pipe Cap</A><BR>
<A href='?src=\ref[src];make=19;dir=1'>4-Way Manifold</A><BR>
<A href='?src=\ref[src];make=18;dir=1'>Manual T-Valve</A><BR>
@@ -43,8 +44,12 @@
<A href='?src=\ref[src];make=16;dir=1'>Volume Pump</A><BR>
<A href='?src=\ref[src];make=10;dir=1'>Scrubber</A><BR>
<A href='?src=\ref[src];makemeter=1'>Meter</A><BR>
<A href='?src=\ref[src];makegsensor=1'>Gas Sensor</A><BR>
<A href='?src=\ref[src];make=13;dir=1'>Gas Filter</A><BR>
<A href='?src=\ref[src];make=14;dir=1'>Gas Mixer</A><BR>
<A href='?src=\ref[src];make=39;dir=1'>Air Injector</A><BR>
<A href='?src=\ref[src];make=41;dir=1'>Dual-Port Vent Pump</A><BR>
<A href='?src=\ref[src];make=42;dir=1'>Passive Vent</A><BR>
<b>Heat exchange:</b><BR>
<A href='?src=\ref[src];make=2;dir=1'>Pipe</A><BR>
<A href='?src=\ref[src];make=3;dir=5'>Bent Pipe</A><BR>
@@ -56,6 +61,7 @@
"}
//What number the make points to is in the define # at the top of construction.dm in same folder
//which for some reason couldn't just be left defined, so it could be used here, top kek
user << browse("<HEAD><TITLE>[src]</TITLE></HEAD><TT>[dat]</TT>", "window=pipedispenser")
onclose(user, "pipedispenser")
@@ -85,6 +91,12 @@
wait = 1
spawn(15)
wait = 0
if(href_list["makegsensor"])
if(!wait)
new /obj/item/pipe_gsensor(/*usr.loc*/ src.loc)
wait = 1
spawn(15)
wait = 0
return
/obj/machinery/pipedispenser/attackby(var/obj/item/W as obj, var/mob/user as mob, params)
+1 -1
View File
@@ -1,7 +1,7 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/obj/machinery/computer/telecomms
light_color = "#50AB00"
light_color = LIGHT_COLOR_DARKGREEN
/obj/machinery/computer/telecomms/server
name = "Telecommunications Server Monitor"
@@ -105,12 +105,19 @@
F.loc = src.loc
del(src)
/obj/machinery/telecomms/proc/formatInput(var/label,var/varname, var/input)
var/value = vars[varname]
if(!value || value=="")
value="-----"
return "<b>[label]:</b> <a href=\"?src=\ref[src];input=[varname]\">[value]</a>"
/obj/machinery/telecomms/attack_ai(var/mob/user as mob)
attack_hand(user)
/obj/machinery/telecomms/attack_hand(var/mob/user as mob)
update_multitool_menu(user)
/obj/machinery/telecomms/multitool_menu(var/mob/user,var/obj/item/device/multitool/P)
// You need a multitool to use this, or be silicon
if(!issilicon(user))
// istype returns false if the value is null
@@ -120,62 +127,62 @@
if(stat & (BROKEN|NOPOWER))
return
var/obj/item/device/multitool/P = get_multitool(user)
user.set_machine(src)
var/dat
dat = "<font face = \"Courier\"><HEAD><TITLE>[src.name]</TITLE></HEAD><center><H3>[src.name] Access</H3></center>"
dat += "<br>[temp]<br>"
dat += "<br>Power Status: <a href='?src=\ref[src];input=toggle'>[src.toggled ? "On" : "Off"]</a>"
dat = {"
<p>[temp]</p>
<p><b>Power Status:</b> <a href='?src=\ref[src];input=toggle'>[src.toggled ? "On" : "Off"]</a></p>"}
if(on && toggled)
if(id != "" && id)
dat += "<br>Identification String: <a href='?src=\ref[src];input=id'>[id]</a>"
else
dat += "<br>Identification String: <a href='?src=\ref[src];input=id'>NULL</a>"
dat += "<br>Network: <a href='?src=\ref[src];input=network'>[network]</a>"
dat += "<br>Prefabrication: [autolinkers.len ? "TRUE" : "FALSE"]"
if(hide) dat += "<br>Shadow Link: ACTIVE</a>"
dat += {"
<p>[formatInput("Identification String","id","id")]</p>
<p>[formatInput("Network","network","network")]</p>
<p><b>Prefabrication:</b> [autolinkers.len ? "TRUE" : "FALSE"]</p>
"}
if(hide)
dat += "<p>Shadow Link: ACTIVE</p>"
//Show additional options for certain machines.
dat += Options_Menu()
dat += "<br>Linked Network Entities: <ol>"
dat += {"<h2>Linked Network Entities:</h2> <ol>"}
var/i = 0
for(var/obj/machinery/telecomms/T in links)
i++
if(T.hide && !src.hide)
continue
dat += "<li>\ref[T] [T.name] ([T.id]) <a href='?src=\ref[src];unlink=[i]'>\[X\]</a></li>"
dat += "</ol>"
dat += "<br>Filtering Frequencies: "
// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\game\machinery\telecomms\machine_interactions.dm:140: dat += "</ol>"
dat += {"</ol>
<h2>Filtering Frequencies:</h2>"}
// END AUTOFIX
i = 0
if(length(freq_listening))
dat += "<ul>"
for(var/x in freq_listening)
i++
if(i < length(freq_listening))
dat += "[format_frequency(x)] GHz<a href='?src=\ref[src];delete=[x]'>\[X\]</a>; "
else
dat += "[format_frequency(x)] GHz<a href='?src=\ref[src];delete=[x]'>\[X\]</a>"
dat += "<li>[format_frequency(x)] GHz<a href='?src=\ref[src];delete=[x]'>\[X\]</a></li>"
dat += "</ul>"
else
dat += "NONE"
dat += "<li>NONE</li>"
dat += "<br> <a href='?src=\ref[src];input=freq'>\[Add Filter\]</a>"
dat += "<hr>"
if(P)
if(P.buffer)
dat += "<br><br>MULTITOOL BUFFER: [P.buffer] ([P.buffer.id]) <a href='?src=\ref[src];link=1'>\[Link\]</a> <a href='?src=\ref[src];flush=1'>\[Flush\]"
else
dat += "<br><br>MULTITOOL BUFFER: <a href='?src=\ref[src];buffer=1'>\[Add Machine\]</a>"
// AUTOFIXED BY fix_string_idiocy.py
// C:\Users\Rob\Documents\Projects\vgstation13\code\game\machinery\telecomms\machine_interactions.dm:155: dat += "<br> <a href='?src=\ref[src];input=freq'>\[Add Filter\]</a>"
dat += {"<p><a href='?src=\ref[src];input=freq'>\[Add Filter\]</a></p>
<hr />"}
// END AUTOFIX
dat += "</font>"
temp = ""
user << browse(dat, "window=tcommachine;size=520x500;can_resize=0")
onclose(user, "dormitory")
return dat
/obj/machinery/telecomms/canLink(var/obj/O)
return istype(O,/obj/machinery/telecomms)
/obj/machinery/telecomms/isLinkedWith(var/obj/O)
return O != null && O in links
/obj/machinery/telecomms/getLink(var/idx)
return (idx >= 1 && idx <= links.len) ? links[idx] : null
// Off-Site Relays
//
@@ -368,8 +375,8 @@
if(P)
if(P.buffer && P.buffer != src)
if(!(src in P.buffer.links))
P.buffer.links.Add(src)
if(!(src in P.buffer:links))
P.buffer:links.Add(src)
if(!(P.buffer in src.links))
src.links.Add(P.buffer)
@@ -36,7 +36,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
var/circuitboard = null // string pointing to a circuitboard type
var/hide = 0 // Is it a hidden machine?
var/listening_level = 0 // 0 = auto set in New() - this is the z level that the machine is listening to.
Mtoollink = 1
/obj/machinery/telecomms/proc/relay_information(datum/signal/signal, filter, copysig, amount = 20)
// relay signal to all linked machinery that are of type [filter]. If signal has been sent [amount] times, stop sending
+1 -1
View File
@@ -20,7 +20,7 @@
var/temp = "" // temporary feedback messages
circuit = "/obj/item/weapon/circuitboard/comm_monitor"
light_color = "#50AB00"
light_color = LIGHT_COLOR_DARKGREEN
attack_hand(mob/user as mob)
if(stat & (BROKEN|NOPOWER))
@@ -14,7 +14,7 @@
var/storedcode = "" // code stored
light_color = "#50AB00"
light_color = LIGHT_COLOR_DARKGREEN
req_access = list(access_tcomsat)
circuit = "/obj/item/weapon/circuitboard/comm_traffic"
+5 -7
View File
@@ -168,9 +168,7 @@
/obj/machinery/vending/RefreshParts() //Better would be to make constructable child
if(component_parts)
build_inventory(products, start_empty = 1)
build_inventory(contraband, 1, 1)
build_inventory(premium, 0, 1, 1)
build_inventory()
for(var/obj/item/weapon/vending_refill/VR in component_parts)
refill_inventory(VR, product_records)
@@ -1017,7 +1015,7 @@
vend_delay = 15
vend_reply = "Have an enchanted evening!"
product_ads = "FJKLFJSD;AJKFLBJAKL;1234 LOONIES LOL!;>MFW;Kill them fuckers!;GET DAT FUKKEN DISK;HONK!;EI NATH;Destroy the station!;Admin conspiracies since forever!;Space-time bending hardware!"
products = list(/obj/item/clothing/head/wizard = 1,/obj/item/clothing/suit/wizrobe = 1,/obj/item/clothing/head/wizard/red = 1,/obj/item/clothing/suit/wizrobe/red = 1,/obj/item/clothing/shoes/sandal = 1,/obj/item/weapon/staff = 2)
products = list(/obj/item/clothing/head/wizard = 1,/obj/item/clothing/suit/wizrobe = 1,/obj/item/clothing/head/wizard/red = 1,/obj/item/clothing/suit/wizrobe/red = 1,/obj/item/clothing/shoes/sandal = 1,/obj/item/weapon/twohanded/staff = 2)
/obj/machinery/vending/autodrobe
name = "\improper AutoDrobe"
@@ -1038,13 +1036,13 @@
/obj/item/clothing/under/pirate = 1,/obj/item/clothing/suit/pirate_brown = 1,/obj/item/clothing/suit/pirate_black =1,/obj/item/clothing/under/pirate_rags =1,/obj/item/clothing/head/pirate = 1,/obj/item/clothing/head/bandana = 1,
/obj/item/clothing/head/bandana = 1,/obj/item/clothing/under/soviet = 1,/obj/item/clothing/head/ushanka = 1,/obj/item/clothing/suit/imperium_monk = 1,
/obj/item/clothing/mask/gas/cyborg = 1,/obj/item/clothing/suit/holidaypriest = 1,/obj/item/clothing/head/wizard/marisa/fake = 1,
/obj/item/clothing/suit/wizrobe/marisa/fake = 1,/obj/item/clothing/under/sundress = 1,/obj/item/clothing/head/witchwig = 1,/obj/item/weapon/staff/broom = 1,
/obj/item/clothing/suit/wizrobe/fake = 1,/obj/item/clothing/head/wizard/fake = 1,/obj/item/weapon/staff = 3,/obj/item/clothing/mask/gas/sexyclown = 1,
/obj/item/clothing/suit/wizrobe/marisa/fake = 1,/obj/item/clothing/under/sundress = 1,/obj/item/clothing/head/witchwig = 1,/obj/item/weapon/twohanded/staff/broom = 1,
/obj/item/clothing/suit/wizrobe/fake = 1,/obj/item/clothing/head/wizard/fake = 1,/obj/item/weapon/twohanded/staff = 3,/obj/item/clothing/mask/gas/sexyclown = 1,
/obj/item/clothing/under/sexyclown = 1,/obj/item/clothing/mask/gas/sexymime = 1,/obj/item/clothing/under/sexymime = 1,/obj/item/clothing/suit/apron/overalls = 1,
/obj/item/clothing/head/rabbitears =1, /obj/item/clothing/head/sombrero = 1, /obj/item/clothing/suit/poncho = 1,
/obj/item/clothing/suit/poncho/green = 1, /obj/item/clothing/suit/poncho/red = 1, /obj/item/clothing/accessory/blue = 1, /obj/item/clothing/accessory/red = 1, /obj/item/clothing/accessory/black = 1, /obj/item/clothing/accessory/horrible = 1,
/obj/item/clothing/under/maid = 1, /obj/item/clothing/under/janimaid = 1, /obj/item/clothing/under/pants/camo = 1, /obj/item/clothing/mask/bandana = 1, /obj/item/clothing/mask/bandana/black = 1)
contraband = list(/obj/item/clothing/suit/judgerobe = 1,/obj/item/clothing/head/powdered_wig = 1,/obj/item/weapon/gun/magic/wand = 1, /obj/item/clothing/mask/balaclava=1)
contraband = list(/obj/item/clothing/suit/judgerobe = 1,/obj/item/clothing/head/powdered_wig = 1,/obj/item/weapon/gun/magic/wand = 1, /obj/item/clothing/mask/balaclava=1, /obj/item/clothing/mask/horsehead = 2)
premium = list(/obj/item/clothing/suit/hgpirate = 1, /obj/item/clothing/head/hgpiratecap = 1, /obj/item/clothing/head/helmet/roman = 1, /obj/item/clothing/head/helmet/roman/legionaire = 1, /obj/item/clothing/under/roman = 1, /obj/item/clothing/shoes/roman = 1)
refill_canister = /obj/item/weapon/vending_refill/autodrobe
+1 -13
View File
@@ -1080,16 +1080,4 @@
set_ready_state(0)
chassis.use_power(energy_drain)
do_after_cooldown()
return 1
/obj/item/weapon/paintkit //Please don't use this for anything, it's a base type for custom mech paintjobs.
name = "mecha customisation kit"
desc = "A generic kit containing all the needed tools and parts to turn a mech into another mech."
icon = 'icons/obj/custom_items.dmi'
icon_state = "royce_kit"
var/new_name = "mech" //What is the variant called?
var/new_desc = "A mech." //How is the new mech described?
var/new_icon = "ripley" //What base icon will the new mech use?
var/removable = null //Can the kit be removed?
var/list/allowed_types = list() //Types of mech that the kit will work on.
return 1
+1 -1
View File
@@ -99,7 +99,7 @@
anchored = 1
icon = 'icons/obj/computer.dmi'
icon_state = "recharge_comp"
light_color = "#a97faa"
light_color = LIGHT_COLOR_FADEDPURPLE
circuit = /obj/item/weapon/circuitboard/mech_bay_power_console
var/obj/machinery/mech_bay_recharge_port/recharge_port
+1 -1
View File
@@ -2,7 +2,7 @@
name = "Exosuit Control"
icon = 'icons/obj/computer.dmi'
icon_state = "mecha"
light_color = "#a97faa"
light_color = LIGHT_COLOR_FADEDPURPLE
req_access = list(access_robotics)
circuit = "/obj/item/weapon/circuitboard/mecha_control"
var/list/located = list()
+33
View File
@@ -0,0 +1,33 @@
/obj/item/weapon/paintkit //Please don't use this for anything, it's a base type for custom mech paintjobs.
name = "mecha customisation kit"
desc = "A generic kit containing all the needed tools and parts to turn a mech into another mech."
icon = 'icons/obj/custom_items.dmi'
icon_state = "royce_kit"
var/new_name = "mech" //What is the variant called?
var/new_desc = "A mech." //How is the new mech described?
var/new_icon = "ripley" //What base icon will the new mech use?
var/removable = null //Can the kit be removed?
var/list/allowed_types = list() //Types of mech that the kit will work on.
/obj/item/weapon/paintkit/titansfist
name = "Ripley customisation kit"
desc = "A kit containing all the needed tools and parts to turn an APLU Ripley into a Titan's Fist worker mech."
icon = 'icons/obj/custom_items.dmi'
icon_state = "royce_kit"
new_name = "APLU \"Titan's Fist\""
new_desc = "This ordinary mining Ripley has been customized to look like a unit of the Titans Fist."
new_icon = "titan"
allowed_types = list("ripley","firefighter")
/obj/item/weapon/paintkit/mercenary
name = "Mercenary APLU kit"
desc = "A kit containing all the needed tools and parts to turn an APLU Ripley into an old Mercenaries APLU."
icon = 'icons/obj/custom_items.dmi'
icon_state = "sven_kit"
new_name = "APLU \"Strike the Earth!\""
new_desc = "Looks like an over worked, under maintained Ripley with some horrific damage."
new_icon = "earth"
allowed_types = list("ripley","firefighter")
+5 -5
View File
@@ -39,7 +39,7 @@
if("JoinLate")
latejoin += loc
del(src)
if("JoinLateGateway")
latejoin_gateway += loc
del(src)
@@ -47,7 +47,7 @@
if("JoinLateCryo")
latejoin_cryo += loc
del(src)
if("JoinLateCyborg")
latejoin_cyborg += loc
del(src)
@@ -90,7 +90,7 @@
if("carpspawn")
carplist += loc
if("voxstart")
raider_spawn += loc
@@ -252,13 +252,13 @@
/obj/effect/landmark/costume/cutewitch/New()
new /obj/item/clothing/under/sundress(src.loc)
new /obj/item/clothing/head/witchwig(src.loc)
new /obj/item/weapon/staff/broom(src.loc)
new /obj/item/weapon/twohanded/staff/broom(src.loc)
del(src)
/obj/effect/landmark/costume/fakewizard/New()
new /obj/item/clothing/suit/wizrobe/fake(src.loc)
new /obj/item/clothing/head/wizard/fake(src.loc)
new /obj/item/weapon/staff/(src.loc)
new /obj/item/weapon/twohanded/staff/(src.loc)
del(src)
/obj/effect/landmark/costume/sexyclown/New()
+179
View File
@@ -0,0 +1,179 @@
//separate dm since hydro is getting bloated already
/obj/effect/supermatter_crystal
name = "supermatter growth"
anchored = 1
opacity = 0
density = 0
icon = 'icons/obj/lighting.dmi'
icon_state = "supermatter_crystalf"
layer = 2.1
light_color = "#8A8A00"
var/endurance = 100
var/delay = 1200
var/floor = 0
var/spreadChance = 10
var/spreadIntoAdjacentChance = 10
var/lastTick = 0
var/spreaded = 1
var/deleted = 0
/obj/effect/supermatter_crystal/single
spreadChance = 0
/obj/effect/supermatter_crystal/New()
..()
light_color = "#8A8A00"
dir = CalcDir()
if(!floor)
switch(dir) //offset to make it be on the wall rather than on the floor
if(NORTH)
pixel_y = 32
if(SOUTH)
pixel_y = -32
if(EAST)
pixel_x = 32
if(WEST)
pixel_x = -32
icon_state = "supermatter_crystal"
else
if( prob( 10 )) // Only 10% of all floor crystals survive, so there's not a forest of 'em
icon_state = "supermatter_crystalf"
name = "supermatter crystal"
density = 1
else
deleted = 1
del( src )
processing_objects += src
set_light(3)
lastTick = world.timeofday
/obj/effect/supermatter_crystal/Del()
if( !deleted )
visible_message("\red <B>\The [src] shatters!</B>")
new /obj/item/weapon/shard/supermatter( src.loc )
processing_objects -= src
..()
/obj/effect/supermatter_crystal/process()
if(!spreaded)
return
if(((world.timeofday - lastTick) > delay) || ((world.timeofday - lastTick) < 0))
lastTick = world.timeofday
spreaded = 0
for(var/mob/living/l in range( src, 2 ))
var/rads = 5
l.apply_effect(rads, IRRADIATE)
for(var/i=1,i<=3,i++)
if(prob(spreadChance))
var/list/possibleLocs = list()
var/spreadsIntoAdjacent = 0
if(prob(spreadIntoAdjacentChance))
spreadsIntoAdjacent = 1
for(var/turf/simulated/floor/floor in view(3,src))
if(spreadsIntoAdjacent || !locate(/obj/effect/supermatter_crystal) in view(1,floor))
possibleLocs += floor
if(!possibleLocs.len)
break
var/turf/newLoc = pick(possibleLocs)
var/crystalCount = 0 //hacky
var/placeCount = 1
for(var/obj/effect/supermatter_crystal/shroom in newLoc)
crystalCount++
for(var/wallDir in cardinal)
var/turf/isWall = get_step(newLoc,wallDir)
if(isWall.density)
placeCount++
if(crystalCount >= placeCount)
continue
var/obj/effect/supermatter_crystal/child = new /obj/effect/supermatter_crystal(newLoc)
if( child )
child.delay = delay
child.endurance = endurance
spreaded++
/obj/effect/supermatter_crystal/proc/CalcDir(turf/location = loc)
for(var/wallDir in cardinal)
var/turf/newTurf = get_step(location,wallDir)
if(newTurf.density)
return wallDir
/*
var/direction = 16
for(var/wallDir in cardinal)
var/turf/newTurf = get_step(location,wallDir)
if(newTurf.density)
direction |= wallDir
for(var/obj/effect/supermatter_crystal/crystal in location)
if(crystal == src)
continue
if(crystal.floor) //special
direction &= ~16
else
direction &= ~crystal.dir
var/list/dirList = list()
for(var/i=1,i<=16,i <<= 1)
if(direction & i)
dirList += i
if(dirList.len)
var/newDir = pick(dirList)
if(newDir == 16)
floor = 1
newDir = 1
return newDir
*/
floor = 1
return 1
/obj/effect/supermatter_crystal/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
endurance -= W.force
CheckEndurance()
/obj/effect/supermatter_crystal/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if (prob(50))
del(src)
return
if(3.0)
if (prob(5))
del(src)
return
else
return
/obj/effect/supermatter_crystal/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
endurance -= 5
CheckEndurance()
/obj/effect/supermatter_crystal/proc/CheckEndurance()
if(endurance <= 0)
del(src)
+1 -1
View File
@@ -634,7 +634,7 @@
eyes.take_damage(rand(3,4), 1)
if(eyes.damage >= eyes.min_bruised_damage)
if(M.stat != 2)
if(!(eyes & ORGAN_ROBOT) || !(eyes & ORGAN_ASSISTED)) //robot eyes bleeding might be a bit silly
if(!(eyes.status & ORGAN_ROBOT) || !(eyes.status & ORGAN_ASSISTED)) //robot eyes bleeding might be a bit silly
M << "\red Your eyes start to bleed profusely!"
if(prob(50))
if(M.stat != 2)
@@ -116,8 +116,8 @@
name = "flare"
desc = "A red Nanotrasen issued flare. There are instructions on the side, it reads 'pull cord, make light'."
w_class = 2.0
brightness_on = 7 // Pretty bright.
light_color = "#e58775"
brightness_on = 8 // Made it brighter (from 7 to 8).
light_color = "#ff0000" // changed colour to a more brighter red.
icon_state = "flare"
item_state = "flare"
var/fuel = 0
@@ -223,7 +223,7 @@
"<span class='userdanger'>[user] blinks \the [src] at \the [A].")
if(ismob(A))
var/mob/M = A
add_logs(user, M, "attacked", object="EMP-light")
add_logs(M, user, "attacked", object="EMP-light")
user << "\The [src] now has [emp_cur_charges] charge\s."
A.emp_act(1)
else
+6 -1
View File
@@ -18,7 +18,12 @@
m_amt = 50
g_amt = 20
origin_tech = "magnets=1;engineering=1"
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
var/obj/machinery/buffer // simple machine buffer for device linkage
/obj/item/device/multitool/proc/IsBufferA(var/typepath)
if(!buffer)
return 0
return istype(buffer,typepath)
// Syndicate device disguised as a multitool; it will turn red when an AI camera is nearby.
@@ -227,6 +227,8 @@ REAGENT SCANNER
for(var/name in H.organs_by_name)
var/obj/item/organ/external/e = H.organs_by_name[name]
if(!e)
continue
if(e.status & ORGAN_BROKEN)
user.show_message(text("\red Bone fractures detected. Advanced scanner required for location."), 1)
break
+1 -1
View File
@@ -126,7 +126,7 @@
if (R.one_per_turf && (locate(R.result_type) in usr.loc))
usr << "\red There is another [R.title] here!"
return
if (R.on_floor && !istype(usr.loc, /turf/simulated/floor))
if (R.on_floor && !istype(usr.loc, /turf/simulated))
usr << "\red \The [R.title] must be constructed on the floor!"
return
if (R.time)
@@ -166,14 +166,6 @@
/obj/item/weapon/card/id/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if(istype(W,/obj/item/weapon/id_wallet))
user << "You slip [src] into [W]."
src.name = "[src.registered_name]'s [W.name] ([src.assignment])"
src.desc = W.desc
src.icon = W.icon
src.icon_state = W.icon_state
del(W)
return
if(istype(W, /obj/item/weapon/id_decal/))
var/obj/item/weapon/id_decal/decal = W
@@ -2,52 +2,14 @@
/*
CONTAINS:
MATCHES
CIGARETTES
CIGARS
SMOKING PIPES
CHEAP LIGHTERS
ZIPPO
CIGARETTE PACKETS ARE IN FANCY.DM
LIGHTERS ARE IN LIGHTERS.DM
*/
///////////
//MATCHES//
///////////
/obj/item/weapon/match
name = "match"
desc = "A simple match stick, used for lighting fine smokables."
icon = 'icons/obj/cigarettes.dmi'
icon_state = "match_unlit"
var/lit = 0
var/smoketime = 5
w_class = 1.0
origin_tech = "materials=1"
attack_verb = list("burnt", "singed")
/obj/item/weapon/match/process()
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
icon_state = "match_burnt"
lit = -1
processing_objects.Remove(src)
return
if(location)
location.hotspot_expose(700, 5)
return
/obj/item/weapon/match/dropped(mob/user as mob)
if(lit == 1)
lit = -1
damtype = "brute"
icon_state = "match_burnt"
item_state = "cigoff"
name = "burnt match"
desc = "A match. This one has seen better days."
return ..()
//////////////////
//FINE SMOKABLES//
//////////////////
@@ -391,105 +353,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
smoketime = 800
chem_volume = 40
/////////
//ZIPPO//
/////////
/obj/item/weapon/lighter
name = "cheap lighter"
desc = "A cheap-as-free lighter."
icon = 'icons/obj/items.dmi'
icon_state = "lighter-g"
item_state = "lighter-g"
var/icon_on = "lighter-g-on"
var/icon_off = "lighter-g"
w_class = 1
throwforce = 4
flags = CONDUCT
slot_flags = SLOT_BELT
attack_verb = list("burnt", "singed")
var/lit = 0
/obj/item/weapon/lighter/zippo
name = "Zippo lighter"
desc = "The zippo."
icon_state = "zippo"
item_state = "zippo"
icon_on = "zippoon"
icon_off = "zippo"
/obj/item/weapon/lighter/random
New()
var/color = pick("r","c","y","g")
icon_on = "lighter-[color]-on"
icon_off = "lighter-[color]"
icon_state = icon_off
/obj/item/weapon/lighter/attack_self(mob/living/user)
if(user.r_hand == src || user.l_hand == src || isrobot(user))
if(!lit)
lit = 1
w_class = 4
icon_state = icon_on
item_state = icon_on
if(istype(src, /obj/item/weapon/lighter/zippo) )
user.visible_message("<span class='rose'>Without even breaking stride, [user] flips open and lights [src] in one smooth movement.</span>")
playsound(src.loc, 'sound/items/ZippoLight.ogg', 25, 1)
else
if(prob(75))
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src].</span>")
else
user << "<span class='warning'>You burn yourself while lighting the lighter.</span>"
user.adjustFireLoss(5)
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src], they however burn their finger in the process.</span>")
set_light(2)
processing_objects.Add(src)
else
lit = 0
w_class = 1
icon_state = icon_off
item_state = icon_off
if(istype(src, /obj/item/weapon/lighter/zippo) )
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing. Wow.")
playsound(src.loc, 'sound/items/ZippoClose.ogg', 25, 1)
else
user.visible_message("<span class='notice'>[user] quietly shuts off the [src].")
set_light(0)
processing_objects.Remove(src)
else
return ..()
return
/obj/item/weapon/lighter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!isliving(M))
return
M.IgniteMob()
if(!istype(M, /mob))
return
if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_sel.selecting == "mouth" && lit)
var/obj/item/clothing/mask/cigarette/cig = M.wear_mask
if(M == user)
cig.attackby(src, user)
else
if(istype(src, /obj/item/weapon/lighter/zippo))
cig.light("<span class='rose'>[user] whips the [name] out and holds it for [M]. Their arm is as steady as the unflickering flame they light \the [cig] with.</span>")
else
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights the [cig.name].</span>")
else
..()
/obj/item/weapon/lighter/process()
var/turf/location = get_turf(src)
if(location)
location.hotspot_expose(700, 5)
return
///////////
//ROLLING//
///////////
@@ -27,6 +27,8 @@
return
if(istype(M, /mob/living/carbon/human) && M:species.bodyflags & FEET_NOSLIP)
return
if(M.flying)
return
M.stop_pulling()
M << "\blue You slipped on the [name]!"
@@ -42,6 +44,8 @@
var/mob/M = AM
if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP) || M.buckled)
return
if(M.flying)
return
M.stop_pulling()
M << "\blue You slipped on the [name]!"
@@ -57,7 +61,7 @@
user << "<span class='notice'>You need to take that [target.name] off before cleaning it.</span>"
else if(istype(target,/obj/effect/decal/cleanable))
user.visible_message("<span class='warning'>[user] begins to scrub \the [target.name] out with [src].</span>")
if(do_after(user, src.cleanspeed))
if(do_after(user, src.cleanspeed) && target)
user << "<span class='notice'>You scrub \the [target.name] out.</span>"
del(target)
else
+4 -4
View File
@@ -325,7 +325,7 @@
H.updatehealth() //forces health update before next life tick
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
H.emote("gasp")
add_logs(user, M, "stunned", object="defibrillator")
add_logs(M, user, "stunned", object="defibrillator")
defib.deductcharge(revivecost)
cooldown = 1
busy = 0
@@ -379,7 +379,7 @@
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
defib.deductcharge(revivecost)
add_logs(user, M, "revived", object="defibrillator")
add_logs(M, user, "revived", object="defibrillator")
else
if(tplus > tlimit)
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
@@ -440,7 +440,7 @@
H.updatehealth() //forces health update before next life tick
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
H.emote("gasp")
add_logs(user, M, "stunned", object="defibrillator")
add_logs(M, user, "stunned", object="defibrillator")
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
@@ -490,7 +490,7 @@
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
add_logs(user, M, "revived", object="defibrillator")
add_logs(M, user, "revived", object="defibrillator")
else
if(tplus > tlimit)
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
@@ -76,7 +76,7 @@
loc = null
if (ismob(target))
add_logs(user, target, "planted [name] on")
add_logs(target, user, "planted [name] on")
user.visible_message("\red [user.name] finished planting an explosive on [target.name]!")
message_admins("[key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) planted C4 on [key_name(target)](<A HREF='?_src_=holder;adminmoreinfo=\ref[target]'>?</A>) with [timer] second fuse",0,1)
log_game("[key_name(user)] planted C4 on [key_name(target)] with [timer] second fuse")
+23 -15
View File
@@ -24,13 +24,12 @@
/obj/item/weapon/flamethrower/Destroy()
if(weldtool)
del(weldtool)
qdel(weldtool)
if(igniter)
del(igniter)
qdel(igniter)
if(ptank)
del(ptank)
qdel(ptank)
..()
return
/obj/item/weapon/flamethrower/process()
@@ -60,8 +59,8 @@
item_state = "flamethrower_0"
return
/obj/item/weapon/flamethrower/afterattack(atom/target, mob/user, proximity)
if(!proximity) return
/obj/item/weapon/flamethrower/afterattack(atom/target, mob/user, flag)
if(flag) return // too close
// Make sure our user is still holding us
if(user && user.get_active_hand() == src)
var/turf/target_turf = get_turf(target)
@@ -83,7 +82,7 @@
ptank.loc = T
ptank = null
new /obj/item/stack/rods(T)
del(src)
qdel(src)
return
if(isscrewdriver(W) && igniter && !lit)
@@ -163,7 +162,6 @@
usr.set_machine(src)
if(href_list["light"])
if(!ptank) return
if(ptank.air_contents.toxins < 1) return
if(!status) return
lit = !lit
if(lit)
@@ -184,22 +182,26 @@
update_icon()
return
/obj/item/weapon/flamethrower/CheckParts()
weldtool = locate(/obj/item/weapon/weldingtool) in contents
igniter = locate(/obj/item/device/assembly/igniter) in contents
update_icon()
//Called from turf.dm turf/dblclick
/obj/item/weapon/flamethrower/proc/flame_turf(turflist)
if(!lit || operating) return
operating = 1
var/turf/previousturf = get_turf(src)
for(var/turf/simulated/T in turflist)
if(!T.air)
break
if(!previousturf && length(turflist)>1)
previousturf = get_turf(src)
if(T == previousturf)
continue //so we don't burn the tile we be standin on
if(previousturf && LinkBlocked(previousturf, T))
if(!T.CanAtmosPass(previousturf))
break
ignite_turf(T)
sleep(1)
previousturf = null
previousturf = T
operating = 0
for(var/mob/M in viewers(1, loc))
if((M.client && M.machine == src))
@@ -222,10 +224,16 @@
/obj/item/weapon/flamethrower/full/New(var/loc)
..()
weldtool = new /obj/item/weapon/weldingtool(src)
if(!weldtool)
weldtool = new /obj/item/weapon/weldingtool(src)
weldtool.status = 0
igniter = new /obj/item/device/assembly/igniter(src)
if(!igniter)
igniter = new /obj/item/device/assembly/igniter(src)
igniter.secured = 0
status = 1
update_icon()
return
/obj/item/weapon/flamethrower/full/tank/New(var/loc)
..()
ptank = new /obj/item/weapon/tank/plasma/full(src)
update_icon()
+1 -1
View File
@@ -34,7 +34,7 @@
else
feedback_add_details("handcuffs","H")
add_logs(user, C, "handcuffed")
add_logs(C, user, "handcuffed", src)
else
user << "<span class='warning'>You fail to handcuff [C].</span>"
+196
View File
@@ -0,0 +1,196 @@
/////////
//ZIPPO//
/////////
/obj/item/weapon/lighter
name = "cheap lighter"
desc = "A cheap-as-free lighter."
icon = 'icons/obj/items.dmi'
icon_state = "lighter-g"
item_state = "lighter-g"
var/icon_on = "lighter-g-on"
var/icon_off = "lighter-g"
w_class = 1
throwforce = 4
flags = CONDUCT
slot_flags = SLOT_BELT
attack_verb = list("burnt", "singed")
var/lit = 0
/obj/item/weapon/lighter/zippo
name = "Zippo lighter"
desc = "The zippo."
icon_state = "zippo"
item_state = "zippo"
icon_on = "zippoon"
icon_off = "zippo"
/obj/item/weapon/lighter/random
New()
var/color = pick("r","c","y","g")
icon_on = "lighter-[color]-on"
icon_off = "lighter-[color]"
icon_state = icon_off
/obj/item/weapon/lighter/attack_self(mob/living/user)
if(user.r_hand == src || user.l_hand == src || isrobot(user))
if(!lit)
lit = 1
w_class = 4
icon_state = icon_on
item_state = icon_on
if(istype(src, /obj/item/weapon/lighter/zippo) )
user.visible_message("<span class='rose'>Without even breaking stride, [user] flips open and lights [src] in one smooth movement.</span>")
playsound(src.loc, 'sound/items/ZippoLight.ogg', 25, 1)
else
if(prob(75))
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src].</span>")
else
user << "<span class='warning'>You burn yourself while lighting the lighter.</span>"
user.adjustFireLoss(5)
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src], they however burn their finger in the process.</span>")
set_light(2)
processing_objects.Add(src)
else
lit = 0
w_class = 1
icon_state = icon_off
item_state = icon_off
if(istype(src, /obj/item/weapon/lighter/zippo) )
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing. Wow.")
playsound(src.loc, 'sound/items/ZippoClose.ogg', 25, 1)
else
user.visible_message("<span class='notice'>[user] quietly shuts off the [src].")
set_light(0)
processing_objects.Remove(src)
else
return ..()
return
/obj/item/weapon/lighter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!isliving(M))
return
M.IgniteMob()
if(!istype(M, /mob))
return
if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_sel.selecting == "mouth" && lit)
var/obj/item/clothing/mask/cigarette/cig = M.wear_mask
if(M == user)
cig.attackby(src, user)
else
if(istype(src, /obj/item/weapon/lighter/zippo))
cig.light("<span class='rose'>[user] whips the [name] out and holds it for [M]. Their arm is as steady as the unflickering flame they light \the [cig] with.</span>")
else
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights the [cig.name].</span>")
else
..()
/obj/item/weapon/lighter/process()
var/turf/location = get_turf(src)
if(location)
location.hotspot_expose(700, 5)
return
//EXTRA LIGHTERS
/obj/item/weapon/lighter/zippo/fluff/li_matsuda_1 //mangled: Li Matsuda
name = "blue zippo lighter"
desc = "A zippo lighter made of some blue metal."
icon = 'icons/obj/custom_items.dmi'
icon_state = "bluezippo"
icon_on = "bluezippoon"
icon_off = "bluezippo"
/obj/item/weapon/lighter/zippo/fluff/michael_guess_1 //Dragor23: Michael Guess
name = "engraved lighter"
desc = "A golden lighter, engraved with some ornaments and a G."
icon = 'icons/obj/custom_items.dmi'
icon_state = "guessip"
icon_on = "guessipon"
icon_off = "guessip"
/obj/item/weapon/lighter/zippo/fluff/riley_rohtin_1 //rawrtaicho: Riley Rohtin
name = "Riley's black zippo"
desc = "A black zippo lighter, which holds some form of sentimental value."
icon = 'icons/obj/custom_items.dmi'
icon_state = "blackzippo"
icon_on = "blackzippoon"
icon_off = "blackzippo"
/obj/item/weapon/lighter/zippo/fluff/fay_sullivan_1 //furohman: Fay Sullivan
name = "Graduation Lighter"
desc = "A silver engraved lighter with 41 on one side and Tharsis University on the other. The lid reads Fay Sullivan, Cybernetic Engineering, 2541"
icon = 'icons/obj/custom_items.dmi'
icon_state = "gradzippo"
icon_on = "gradzippoon"
icon_off = "gradzippo"
/obj/item/weapon/lighter/zippo/fluff/executivekill_1 //executivekill: Hunter Duke
name = "Gonzo Fist zippo"
desc = "A Zippo lighter with the iconic Gonzo Fist on a matte black finish."
icon = 'icons/obj/custom_items.dmi'
icon_state = "gonzozippo"
icon_on = "gonzozippoon"
icon_off = "gonzozippo"
/obj/item/weapon/lighter/zippo/fluff/naples_1 //naples: Russell Vierson
name = "Engraved zippo"
desc = "A intricately engraved Zippo lighter."
icon = 'icons/obj/custom_items.dmi'
icon_state = "engravedzippo"
icon_on = "engravedzippoon"
icon_off = "engravedzippo"
/obj/item/weapon/lighter/zippo/fluff/nt_rep
name = "gold engraved zippo"
desc = "An engraved golden Zippo lighter with the letters NT on it."
icon = 'icons/obj/custom_items.dmi'
icon_state = "zippo_nt_off"
icon_on = "zippo_nt_on"
icon_off = "zippo_nt_off"
/obj/item/weapon/lighter/zippo/fluff/purple
name = "purple engraved zippo"
desc = "All craftsspacemanship is of the highest quality. It is encrusted with refined plasma sheets. On the item is an image of a dwarf and the words 'Strike the Earth!' etched onto the side."
icon = 'icons/obj/custom_items.dmi'
icon_state = "purple_zippo_off"
icon_on = "purple_zippo_on"
icon_off = "purple_zippo_off"
///////////
//MATCHES//
///////////
/obj/item/weapon/match
name = "match"
desc = "A simple match stick, used for lighting fine smokables."
icon = 'icons/obj/cigarettes.dmi'
icon_state = "match_unlit"
var/lit = 0
var/smoketime = 5
w_class = 1.0
origin_tech = "materials=1"
attack_verb = list("burnt", "singed")
/obj/item/weapon/match/process()
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
icon_state = "match_burnt"
lit = -1
processing_objects.Remove(src)
return
if(location)
location.hotspot_expose(700, 5)
return
/obj/item/weapon/match/dropped(mob/user as mob)
if(lit == 1)
lit = -1
damtype = "brute"
icon_state = "match_burnt"
item_state = "cigoff"
name = "burnt match"
desc = "A match. This one has seen better days."
return ..()
+103
View File
@@ -0,0 +1,103 @@
/obj/item/weapon/shard/supermatter
name = "supermatter shard"
desc = "A shard of supermatter. Incredibly dangerous, though not large enough to go critical."
force = 10.0
throwforce = 20.0
icon_state = "supermatter"
sharp = 1
edge = 1
w_class = 2
flags = CONDUCT
light_color = "#8A8A00"
var/brightness = 2
/obj/item/weapon/shard/supermatter/New()
src.icon_state = pick("supermatter")
switch(src.icon_state)
if("supermattersmall")
src.pixel_x = rand(-12, 12)
src.pixel_y = rand(-12, 12)
if("supermattermedium")
src.pixel_x = rand(-8, 8)
src.pixel_y = rand(-8, 8)
if("supermatterlarge")
src.pixel_x = rand(-5, 5)
src.pixel_y = rand(-5, 5)
else
set_light(brightness)
/obj/item/weapon/shard/supermatter/attackby(obj/item/weapon/W as obj, mob/user as mob)
if( istype( W, /obj/item/weapon/tongs ))
var/obj/item/weapon/tongs/T = W
T.pick_up( src )
T.icon_state = "tongs_supermatter"
return
..()
/obj/item/weapon/shard/supermatter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/obj/item/weapon/shard/supermatter/Crossed(AM as mob|obj)
if(ismob(AM))
var/mob/M = AM
M << "\red <B>You step on \the [src]!</B>"
playsound(src.loc, 'sound/effects/glass_step_sm.ogg', 70, 1) // not sure how to handle metal shards with sounds
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species.flags & IS_SYNTHETIC) //Thick skin.
return
if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
var/obj/item/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
if(affecting.status & ORGAN_ROBOT)
return
if(affecting.take_damage(5, 20))
H.UpdateDamageIcon()
H.updatehealth()
if(!(H.species && (H.species.flags & NO_PAIN)))
H.Weaken(3)
..()
/obj/item/weapon/shard/supermatter/attack_hand(var/mob/user)
if(!istype(user,/mob/living/carbon/human/nucleation))
user << pick( "\red You think twice before touching that without protection.",
"\red You don't want to touch that without some protection.",
"\red You probably should get something else to pick that up.",
"\red You aren't sure that's a good idea.",
"\red You aren't in the mood to get vaporized today.",
"\red You really don't feel like frying your hand off.",
"\red You assume that's a bad idea." )
return
..()
/obj/item/weapon/tongs
name = "tongs"
desc = "Tungsten-alloy tongs used for handling dangerous materials."
force = 7.0
throwforce = 12.0
icon = 'icons/obj/weapons.dmi'
icon_state = "tongs"
edge = 1
w_class = 2
flags = CONDUCT
var/obj/item/held = null // The item currently being held
/obj/item/weapon/tongs/proc/pick_up( var/obj/item/I )
held = I
I.loc = src
playsound(loc, 'sound/effects/tong_pickup.ogg', 50, 1, -1)
/obj/item/weapon/tongs/attack_self(var/mob/user as mob)
if( held )
var/turf/T = get_turf(user.loc)
held.loc = T
held = null
icon_state = initial(icon_state)
..()
+50 -3
View File
@@ -1,4 +1,4 @@
/obj/item/weapon/staff
/obj/item/weapon/twohanded/staff
name = "wizards staff"
desc = "Apparently a staff used by the wizard."
icon = 'icons/obj/wizard.dmi'
@@ -11,13 +11,60 @@
flags = NOSHIELD
attack_verb = list("bludgeoned", "whacked", "disciplined")
/obj/item/weapon/staff/broom
/obj/item/weapon/twohanded/staff/broom
name = "broom"
desc = "Used for sweeping, and flying into the night while cackling. Black cat not included."
icon = 'icons/obj/wizard.dmi'
icon_state = "broom"
item_state = "broom0"
icon_override = 'icons/mob/in-hand/staff.dmi'
/obj/item/weapon/staff/stick
/obj/item/weapon/twohanded/staff/broom/attack_self(mob/user as mob)
..()
item_state = "broom[wielded ? 1 : 0]"
force = wielded ? 5 : 3
attack_verb = wielded ? list("rammed into", "charged at") : list("bludgeoned", "whacked", "cleaned")
if(user)
user.update_inv_l_hand()
user.update_inv_r_hand()
if(user.mind in ticker.mode.wizards)
user.flying = wielded ? 1 : 0
if(wielded)
user << "<span class='notice'>You hold \the [src] between your legs.</span>"
user.say("QUID 'ITCH")
animate(user, pixel_y = pixel_y + 10 , time = 10, loop = 1, easing = SINE_EASING)
else
animate(user, pixel_y = pixel_y + 10 , time = 1, loop = 1)
animate(user, pixel_y = pixel_y, time = 10, loop = 1, easing = SINE_EASING)
animate(user)
if(user.lying)//aka. if they have just been stunned
user.pixel_y -= 6
else
if(wielded)
user << "<span class='notice'>You hold \the [src] between your legs.</span>"
/obj/item/weapon/twohanded/staff/broom/attackby(var/obj/O, mob/user)
if(istype(O, /obj/item/clothing/mask/horsehead))
new/obj/item/weapon/twohanded/staff/broom/horsebroom(get_turf(src))
user.unEquip(O)
qdel(O)
qdel(src)
return
..()
/obj/item/weapon/twohanded/staff/broom/horsebroom
name = "broomstick horse"
desc = "Saddle up!"
icon = 'icons/obj/wizard.dmi'
icon_state = "horsebroom"
item_state = "horsebroom0"
icon_override = 'icons/mob/in-hand/staff.dmi'
/obj/item/weapon/twohanded/staff/broom/horsebroom/attack_self(mob/user as mob)
..()
item_state = "horsebroom[wielded ? 1 : 0]"
/obj/item/weapon/twohanded/staff/stick
name = "stick"
desc = "A great tool to drag someone else's drinks across the bar."
icon = 'icons/obj/weapons.dmi'
@@ -1,827 +0,0 @@
/* Surgery Tools
* Contains:
* Retractor
* Hemostat
* Cautery
* Surgical Drill
* Scalpel
* Circular Saw
*/
/*
* Retractor
*/
/obj/item/weapon/retractor
name = "retractor"
desc = "Retracts stuff."
icon = 'icons/obj/surgery.dmi'
icon_state = "retractor"
m_amt = 6000
g_amt = 3000
flags = CONDUCT
w_class = 2.0
origin_tech = "materials=1;biotech=1"
/*HAHA, SUCK IT, 2000 LINES OF SPAGHETTI CODE!
NOW YOUR JOB IOS DONE BY ONLY 500 LINES OF SPAGHETTI CODE!
LOOK FOR SURGERY.DM*/
/*
/obj/item/weapon/retractor/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return
var/mob/living/carbon/human/H = M
if(istype(H) && ( \
(H.head && H.head.flags & HEADCOVERSEYES) || \
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
))
user << "\red You're going to need to remove that mask/helmet/glasses first."
return
var/mob/living/carbon/monkey/Mo = M
if(istype(Mo) && ( \
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
))
user << "\red You're going to need to remove that mask/helmet/glasses first."
return
if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/slime))//Aliens don't have eyes./N
user << "\red You cannot locate any eyes on this creature!"
return
switch(M.eye_op_stage)
if(1.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is having his eyes retracted by [user].", 1)
M << "\red [user] begins to seperate your eyes with [src]!"
user << "\red You seperate [M]'s eyes with [src]!"
else
user.visible_message( \
"\red [user] begins to have his eyes retracted.", \
"\red You begin to pry open your eyes with [src]!" \
)
if(M == user && prob(25))
user << "\red You mess up!"
if(istype(M, /mob/living/carbon/human))
var/obj/item/organ/external/affecting = M:get_organ("head")
if(affecting.take_damage(15))
M:UpdateDamageIcon()
M.updatehealth()
else
M.take_organ_damage(15)
M:eye_op_stage = 2.0
else if(user.zone_sel.selecting == "chest")
switch(M:alien_op_stage)
if(3.0)
var/mob/living/carbon/human/H = M
if(!istype(H))
return ..()
if(H.wear_suit || H.w_uniform)
user << "\red You're going to need to remove that suit/jumpsuit first."
return
var/obj/item/alien_embryo/A = locate() in M.contents
if(!A)
return ..()
user.visible_message("\red [user] begins to pull something out of [M]'s chest.", "\red You begin to pull the alien organism out of [M]'s chest.")
spawn(20 + rand(0,50))
if(!A || A.loc != M)
return
if(M == user && prob(25))
user << "\red You mess up!"
if(istype(M, /mob/living/carbon/human))
var/obj/item/organ/external/affecting = M:get_organ("chest")
if(affecting.take_damage(30))
M:UpdateDamageIcon()
else
M.take_organ_damage(30)
if(A.stage > 3)
var/chance = 15 + max(0, A.stage - 3) * 10
if(prob(chance))
A.AttemptGrow(0)
M:alien_op_stage = 4.0
if(M)
user.visible_message("\red [user] pulls an alien organism out of [M]'s chest.", "\red You pull the alien organism out of [M]'s chest.")
A.loc = M.loc //alien embryo handles cleanup
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
return ..()
return
*/
/*
* Hemostat
*/
/obj/item/weapon/hemostat
name = "hemostat"
desc = "You think you have seen this before."
icon = 'icons/obj/surgery.dmi'
icon_state = "hemostat"
m_amt = 5000
g_amt = 2500
flags = CONDUCT
w_class = 2.0
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "pinched")
/*
/obj/item/weapon/hemostat/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
return ..()
if(user.zone_sel.selecting == "groin")
if(istype(M, /mob/living/carbon/human))
switch(M:appendix_op_stage)
if(1.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [user] is beginning to clamp bleeders in [M]'s abdomen cut open with [src].", 1)
M << "\red [user] begins to clamp bleeders in your abdomen with [src]!"
user << "\red You clamp bleeders in [M]'s abdomen with [src]!"
M:appendix_op_stage = 2.0
if(4.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [user] is removing [M]'s appendix with [src].", 1)
M << "\red [user] begins to remove your appendix with [src]!"
user << "\red You remove [M]'s appendix with [src]!"
for(var/datum/disease/D in M.viruses)
if(istype(D, /datum/disease/appendicitis))
new /obj/item/weapon/reagent_containers/food/snacks/appendix/inflamed(get_turf(M))
M:appendix_op_stage = 5.0
return
new /obj/item/weapon/reagent_containers/food/snacks/appendix(get_turf(M))
M:appendix_op_stage = 5.0
return
if (user.zone_sel.selecting == "eyes")
var/mob/living/carbon/human/H = M
if(istype(H) && ( \
(H.head && H.head.flags & HEADCOVERSEYES) || \
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
))
user << "\red You're going to need to remove that mask/helmet/glasses first."
return
var/mob/living/carbon/monkey/Mo = M
if(istype(Mo) && ( \
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
))
user << "\red You're going to need to remove that mask/helmet/glasses first."
return
if(istype(M, /mob/living/carbon/alien))//Aliens don't have eyes./N
user << "\red You cannot locate any eyes on this creature!"
return
switch(M.eye_op_stage)
if(2.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is having his eyes mended by [user].", 1)
M << "\red [user] begins to mend your eyes with [src]!"
user << "\red You mend [M]'s eyes with [src]!"
else
user.visible_message( \
"\red [user] begins to have his eyes mended.", \
"\red You begin to mend your eyes with [src]!" \
)
if(M == user && prob(25))
user << "\red You mess up!"
if(istype(M, /mob/living/carbon/human))
var/obj/item/organ/external/affecting = M:get_organ("head")
if(affecting.take_damage(15))
M:UpdateDamageIcon()
M.updatehealth()
else
M.take_organ_damage(15)
M:eye_op_stage = 3.0
else if(user.zone_sel.selecting == "chest")
if(M:alien_op_stage == 2.0 || M:alien_op_stage == 3.0)
var/mob/living/carbon/human/H = M
if(!istype(H))
return ..()
if(H.wear_suit || H.w_uniform)
user << "\red You're going to need to remove that suit/jumpsuit first."
return
user.visible_message("\red [user] begins to dig around in [M]'s chest.", "\red You begin to dig around in [M]'s chest.")
spawn(20 + (M:alien_op_stage == 3 ? 0 : rand(0,50)))
if(M == user && prob(25))
user << "\red You mess up!"
if(istype(M, /mob/living/carbon/human))
var/obj/item/organ/external/affecting = M:get_organ("chest")
if(affecting.take_damage(30))
M:UpdateDamageIcon()
else
M.take_organ_damage(30)
var/obj/item/alien_embryo/A = locate() in M.contents
if(A)
var/dat = "\blue You found an unknown alien organism in [M]'s chest!"
if(A.stage < 4)
dat += " It's small and weak, barely the size of a foetus."
if(A.stage > 3)
dat += " It's grown quite large, and writhes slightly as you look at it."
if(prob(10))
A.AttemptGrow()
user << dat
M:alien_op_stage = 3.0
else
user << "\blue You find nothing of interest."
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
return ..()
return
*/
/*
* Cautery
*/
/obj/item/weapon/cautery
name = "cautery"
desc = "This stops bleeding."
icon = 'icons/obj/surgery.dmi'
icon_state = "cautery"
m_amt = 2500
g_amt = 750
flags = CONDUCT
w_class = 2.0
origin_tech = "materials=1;biotech=1"
attack_verb = list("burnt")
/*
/obj/item/weapon/cautery/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
return ..()
if(user.zone_sel.selecting == "groin")
if(istype(M, /mob/living/carbon/human))
switch(M:appendix_op_stage)
if(5.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [user] is beginning to cauterize the incision in [M]'s abdomen with [src].", 1)
M << "\red [user] begins to cauterize the incision in your abdomen with [src]!"
user << "\red You cauterize the incision in [M]'s abdomen with [src]!"
M:appendix_op_stage = 6.0
for(var/datum/disease/appendicitis in M.viruses)
appendicitis.cure()
return
if (user.zone_sel.selecting == "eyes")
var/mob/living/carbon/human/H = M
if(istype(H) && ( \
(H.head && H.head.flags & HEADCOVERSEYES) || \
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
))
user << "\red You're going to need to remove that mask/helmet/glasses first."
return
var/mob/living/carbon/monkey/Mo = M
if(istype(Mo) && ( \
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
))
user << "\red You're going to need to remove that mask/helmet/glasses first."
return
if(istype(M, /mob/living/carbon/alien))//Aliens don't have eyes./N
user << "\red You cannot locate any eyes on this creature!"
return
switch(M.eye_op_stage)
if(3.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is having his eyes cauterized by [user].", 1)
M << "\red [user] begins to cauterize your eyes!"
user << "\red You cauterize [M]'s eyes with [src]!"
else
user.visible_message( \
"\red [user] begins to have his eyes cauterized.", \
"\red You begin to cauterize your eyes!" \
)
if(M == user && prob(25))
user << "\red You mess up!"
if(istype(M, /mob/living/carbon/human))
var/obj/item/organ/external/affecting = M:get_organ("head")
if(affecting.take_damage(15))
M:UpdateDamageIcon()
M.updatehealth()
else
M.take_organ_damage(15)
M.sdisabilities &= ~BLIND
M.eye_stat = 0
M:eye_op_stage = 0.0
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
return ..()
return
*/
/*
* Surgical Drill
*/
/obj/item/weapon/surgicaldrill
name = "surgical drill"
desc = "You can drill using this item. You dig?"
icon = 'icons/obj/surgery.dmi'
icon_state = "drill"
hitsound = 'sound/weapons/circsawhit.ogg'
m_amt = 10000
g_amt = 6000
flags = CONDUCT
force = 15.0
w_class = 2.0
origin_tech = "materials=1;biotech=1"
attack_verb = list("drilled")
suicide_act(mob/user)
viewers(user) << pick("\red <b>[user] is pressing the [src.name] to \his temple and activating it! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is pressing [src.name] to \his chest and activating it! It looks like \he's trying to commit suicide.</b>")
return (BRUTELOSS)
/*
* Scalpel
*/
/obj/item/weapon/scalpel
name = "scalpel"
desc = "Cut, cut, and once more cut."
icon = 'icons/obj/surgery.dmi'
icon_state = "scalpel"
flags = CONDUCT
force = 10.0
sharp = 1
edge = 1
w_class = 2.0
throwforce = 5.0
throw_speed = 3
throw_range = 5
m_amt = 4000
g_amt = 1000
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
suicide_act(mob/user)
viewers(user) << pick("\red <b>[user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his throat with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</b>")
return (BRUTELOSS)
/*
/obj/item/weapon/scalpel/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
//if(M.mutations & HUSK) return ..()
if((CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
return ..()
src.add_fingerprint(user)
if(user.zone_sel.selecting == "groin")
if(istype(M, /mob/living/carbon/human))
switch(M:appendix_op_stage)
if(0.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is beginning to have his abdomen cut open with [src] by [user].", 1)
M << "\red [user] begins to cut open your abdomen with [src]!"
user << "\red You cut [M]'s abdomen open with [src]!"
M:appendix_op_stage = 1.0
if(3.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is beginning to have his appendix seperated with [src] by [user].", 1)
M << "\red [user] begins to seperate your appendix with [src]!"
user << "\red You seperate [M]'s appendix with [src]!"
M:appendix_op_stage = 4.0
return
if(user.zone_sel.selecting == "head" || istype(M, /mob/living/carbon/slime))
var/mob/living/carbon/human/H = M
if(istype(H) && ( \
(H.head && H.head.flags & HEADCOVERSEYES) || \
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
))
user << "\red You're going to need to remove that mask/helmet/glasses first."
return
var/mob/living/carbon/monkey/Mo = M
if(istype(Mo) && ( \
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
))
user << "\red You're going to need to remove that mask/helmet/glasses first."
return
switch(M:brain_op_stage)
if(0.0)
if(istype(M, /mob/living/carbon/slime))
if(M.stat == 2)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M.name] is beginning to have its flesh cut open with [src] by [user].", 1)
M << "\red [user] begins to cut open your flesh with [src]!"
user << "\red You cut [M]'s flesh open with [src]!"
M:brain_op_stage = 1.0
return
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is beginning to have his head cut open with [src] by [user].", 1)
M << "\red [user] begins to cut open your head with [src]!"
user << "\red You cut [M]'s head open with [src]!"
else
user.visible_message( \
"\red [user] begins to cut open his skull with [src]!", \
"\red You begin to cut open your head with [src]!" \
)
if(M == user && prob(25))
user << "\red You mess up!"
if(istype(M, /mob/living/carbon/human))
var/obj/item/organ/external/affecting = M:get_organ("head")
if(affecting.take_damage(15))
M:UpdateDamageIcon()
else
M.take_organ_damage(15)
if(istype(M, /mob/living/carbon/human))
var/obj/item/organ/external/affecting = M:get_organ("head")
affecting.take_damage(7)
else
M.take_organ_damage(7)
M.updatehealth()
M:brain_op_stage = 1.0
if(1)
if(istype(M, /mob/living/carbon/slime))
if(M.stat == 2)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M.name] is having its silky innards cut apart with [src] by [user].", 1)
M << "\red [user] begins to cut apart your innards with [src]!"
user << "\red You cut [M]'s silky innards apart with [src]!"
M:brain_op_stage = 2.0
return
if(2.0)
if(istype(M, /mob/living/carbon/slime))
if(M.stat == 2)
var/mob/living/carbon/slime/slime = M
if(slime.cores > 0)
if(istype(M, /mob/living/carbon/slime))
user << "\red You attempt to remove [M]'s core, but [src] is ineffective!"
return
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is having his connections to the brain delicately severed with [src] by [user].", 1)
M << "\red [user] begins to cut open your head with [src]!"
user << "\red You cut [M]'s head open with [src]!"
else
user.visible_message( \
"\red [user] begin to delicately remove the connections to his brain with [src]!", \
"\red You begin to cut open your head with [src]!" \
)
if(M == user && prob(25))
user << "\red You nick an artery!"
if(istype(M, /mob/living/carbon/human))
var/obj/item/organ/external/affecting = M:get_organ("head")
if(affecting.take_damage(75))
M:UpdateDamageIcon()
else
M.take_organ_damage(75)
if(istype(M, /mob/living/carbon/human))
var/obj/item/organ/external/affecting = M:get_organ("head")
affecting.take_damage(7)
else
M.take_organ_damage(7)
M.updatehealth()
M:brain_op_stage = 3.0
else
..()
return
else if(user.zone_sel.selecting == "eyes")
user << "\blue So far so good."
var/mob/living/carbon/human/H = M
if(istype(H) && ( \
(H.head && H.head.flags & HEADCOVERSEYES) || \
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
))
user << "\red You're going to need to remove that mask/helmet/glasses first."
return
var/mob/living/carbon/monkey/Mo = M
if(istype(Mo) && ( \
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
))
user << "\red You're going to need to remove that mask/helmet/glasses first."
return
if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/slime))//Aliens don't have eyes./N
user << "\red You cannot locate any eyes on this creature!"
return
switch(M:eye_op_stage)
if(0.0)
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] is beginning to have his eyes incised with [src] by [user].", 1)
M << "\red [user] begins to cut open your eyes with [src]!"
user << "\red You make an incision around [M]'s eyes with [src]!"
else
user.visible_message( \
"\red [user] begins to cut around his eyes with [src]!", \
"\red You begin to cut open your eyes with [src]!" \
)
if(M == user && prob(25))
user << "\red You mess up!"
if(istype(M, /mob/living/carbon/human))
var/obj/item/organ/external/affecting = M:get_organ("head")
if(affecting.take_damage(15))
M:UpdateDamageIcon()
else
M.take_organ_damage(15)
user << "\blue So far so good before."
M.updatehealth()
M:eye_op_stage = 1.0
user << "\blue So far so good after."
else if(user.zone_sel.selecting == "chest")
switch(M:alien_op_stage)
if(0.0)
var/mob/living/carbon/human/H = M
if(!istype(H))
return ..()
if(H.wear_suit || H.w_uniform)
user << "\red You're going to need to remove that suit/jumpsuit first."
return
user.visible_message("\red [user] begins to slice open [M]'s chest.", "\red You begin to slice open [M]'s chest.")
spawn(rand(20,50))
if(M == user && prob(25))
user << "\red You mess up!"
if(istype(M, /mob/living/carbon/human))
var/obj/item/organ/external/affecting = M:get_organ("chest")
if(affecting.take_damage(15))
M:UpdateDamageIcon()
else
M.take_organ_damage(15)
M:alien_op_stage = 1.0
user << "\blue So far so good."
else
return ..()
/* wat
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
return ..()*/
return
*/
/*
* Circular Saw
*/
/obj/item/weapon/circular_saw
name = "circular saw"
desc = "For heavy duty cutting."
icon = 'icons/obj/surgery.dmi'
icon_state = "saw3"
hitsound = 'sound/weapons/circsawhit.ogg'
flags = CONDUCT
force = 15.0
w_class = 2.0
throwforce = 9.0
throw_speed = 3
throw_range = 5
m_amt = 10000
g_amt = 6000
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "slashed", "sawed", "cut")
sharp = 1
edge = 1
/*
/obj/item/weapon/circular_saw/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
if((CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/table/, M.loc) && M.lying && prob(50))))
return ..()
src.add_fingerprint(user)
if(user.zone_sel.selecting == "head" || istype(M, /mob/living/carbon/slime))
var/mob/living/carbon/human/H = M
if(istype(H) && ( \
(H.head && H.head.flags & HEADCOVERSEYES) || \
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
))
user << "\red You're going to need to remove that mask/helmet/glasses first."
return
var/mob/living/carbon/monkey/Mo = M
if(istype(Mo) && ( \
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
))
user << "\red You're going to need to remove that mask/helmet/glasses first."
return
switch(M:brain_op_stage)
if(1.0)
if(istype(M, /mob/living/carbon/slime))
return
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] has his skull sawed open with [src] by [user].", 1)
M << "\red [user] begins to saw open your head with [src]!"
user << "\red You saw [M]'s head open with [src]!"
else
user.visible_message( \
"\red [user] saws open his skull with [src]!", \
"\red You begin to saw open your head with [src]!" \
)
if(M == user && prob(25))
user << "\red You mess up!"
if(istype(M, /mob/living/carbon/human))
var/obj/item/organ/external/affecting = M:get_organ("head")
if(affecting.take_damage(40))
M:UpdateDamageIcon()
M.updatehealth()
else
M.take_organ_damage(40)
if(istype(M, /mob/living/carbon/human))
var/obj/item/organ/external/affecting = M:get_organ("head")
affecting.take_damage(7)
else
M.take_organ_damage(7)
M.updatehealth()
M:brain_op_stage = 2.0
if(2.0)
if(istype(M, /mob/living/carbon/slime))
if(M.stat == 2)
var/mob/living/carbon/slime/slime = M
if(slime.cores > 0)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M.name] is having one of its cores sawed out with [src] by [user].", 1)
slime.cores--
M << "\red [user] begins to remove one of your cores with [src]! ([slime.cores] cores remaining)"
user << "\red You cut one of [M]'s cores out with [src]! ([slime.cores] cores remaining)"
new slime.coretype(M.loc)
if(slime.cores <= 0)
M.icon_state = "[slime.colour] baby slime dead-nocore"
return
if(3.0)
/*if(M.mind && M.mind.changeling)
user << "\red The neural tissue regrows before your eyes as you cut it."
return*/
if(M != user)
for(var/mob/O in (viewers(M) - user - M))
O.show_message("\red [M] has his spine's connection to the brain severed with [src] by [user].", 1)
M << "\red [user] severs your brain's connection to the spine with [src]!"
user << "\red You sever [M]'s brain's connection to the spine with [src]!"
else
user.visible_message( \
"\red [user] severs his brain's connection to the spine with [src]!", \
"\red You sever your brain's connection to the spine with [src]!" \
)
user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
log_attack("<font color='red'>[user.name] ([user.ckey]) debrained [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
var/obj/item/brain/B = new()
M.put_in_hands(B)
B.transfer_identity(M)
M:brain_op_stage = 4.0
M.death()//You want them to die after the brain was transferred, so not to trigger client death() twice.
else
..()
return
else if(user.zone_sel.selecting == "chest")
switch(M:alien_op_stage)
if(1.0)
var/mob/living/carbon/human/H = M
if(!istype(H))
return ..()
if(H.wear_suit || H.w_uniform)
user << "\red You're going to need to remove that suit/jumpsuit first."
return
user.visible_message("\red [user] begins to slice through the bone of [M]'s chest.", "\red You begin to slice through the bone of [M]'s chest.")
spawn(20 + rand(0,50))
if(M == user && prob(25))
user << "\red You mess up!"
if(istype(M, /mob/living/carbon/human))
var/obj/item/organ/external/affecting = M:get_organ("chest")
if(affecting.take_damage(15))
M:UpdateDamageIcon()
else
M.take_organ_damage(15)
M:alien_op_stage = 2.0
user << "\blue So far so good."
else
return ..()
/*
else if((!(user.zone_sel.selecting == "head")) || (!(user.zone_sel.selecting == "groin")) || (!(istype(M, /mob/living/carbon/human))))
return ..()
*/
return
*/
//misc, formerly from code/defines/weapons.dm
/obj/item/weapon/bonegel
name = "bone gel"
icon = 'icons/obj/surgery.dmi'
icon_state = "bone-gel"
force = 0
w_class = 2.0
throwforce = 1.0
/obj/item/weapon/FixOVein
name = "FixOVein"
icon = 'icons/obj/surgery.dmi'
icon_state = "fixovein"
force = 0
throwforce = 1.0
origin_tech = "materials=1;biotech=3"
w_class = 2.0
var/usage_amount = 10
/obj/item/weapon/bonesetter
name = "bone setter"
icon = 'icons/obj/surgery.dmi'
icon_state = "bone setter"
force = 8.0
throwforce = 9.0
throw_speed = 3
throw_range = 5
w_class = 2.0
attack_verb = list("attacked", "hit", "bludgeoned")
@@ -95,7 +95,6 @@
/obj/item/weapon/tank/plasma/New()
..()
src.air_contents.toxins = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -110,6 +109,12 @@
F.ptank = src
user.unEquip(src)
src.loc = F
F.update_icon()
return
/obj/item/weapon/tank/plasma/full/New()
..()
src.air_contents.toxins = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/weapon/tank/plasma/plasmaman
+9 -8
View File
@@ -117,14 +117,15 @@
icon_state = "cutters-y"
item_state = "cutters_yellow"
/obj/item/weapon/wirecutters/attack(mob/living/carbon/C as mob, mob/user as mob)
if((C.handcuffed) && (istype(C.handcuffed, /obj/item/weapon/restraints/handcuffs/cable)))
usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\
"You cut \the [C]'s restraints with \the [src]!",\
"You hear cable being cut.")
C.handcuffed = null
C.update_inv_handcuffed()
return
/obj/item/weapon/wirecutters/attack(mob/living/carbon/human/C as mob, mob/user as mob)
if(C.handcuffed)
if(istype(C.handcuffed, /obj/item/weapon/restraints/handcuffs/cable))
usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\
"You cut \the [C]'s restraints with \the [src]!",\
"You hear cable being cut.")
C.handcuffed = null
C.update_inv_handcuffed()
return
else
..()
+85 -1
View File
@@ -17,10 +17,12 @@
var/damtype = "brute"
var/force = 0
var/Mtoollink = 0 // variable to decide if an object should show the multitool menu linking menu, not all objects use it
// What reagents should be logged when transferred TO this object?
// Reagent ID => friendly name
var/list/reagents_to_log=list()
/obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/custom_state = default_state)
// Calling Topic without a corresponding window open causes runtime errors
if(!nowindow && ..())
@@ -161,3 +163,85 @@
mo.show_message(rendered, 2)
*/
return
/obj/proc/multitool_menu(var/mob/user,var/obj/item/device/multitool/P)
return "<b>NO MULTITOOL_MENU!</b>"
/obj/proc/linkWith(var/mob/user, var/obj/buffer, var/link/context)
return 0
/obj/proc/unlinkFrom(var/mob/user, var/obj/buffer)
return 0
/obj/proc/canLink(var/obj/O, var/link/context)
return 0
/obj/proc/isLinkedWith(var/obj/O)
return 0
/obj/proc/getLink(var/idx)
return null
/obj/proc/linkMenu(var/obj/O)
var/dat=""
if(canLink(O, list()))
dat += " <a href='?src=\ref[src];link=1'>\[Link\]</a> "
return dat
/obj/proc/format_tag(var/label,var/varname, var/act="set_tag")
var/value = vars[varname]
if(!value || value=="")
value="-----"
return "<b>[label]:</b> <a href=\"?src=\ref[src];[act]=[varname]\">[value]</a>"
/obj/proc/update_multitool_menu(mob/user as mob)
var/obj/item/device/multitool/P = get_multitool(user)
if(!istype(P))
return 0
var/dat = {"<html>
<head>
<title>[name] Configuration</title>
<style type="text/css">
html,body {
font-family:courier;
background:#999999;
color:#333333;
}
a {
color:#000000;
text-decoration:none;
border-bottom:1px solid black;
}
</style>
</head>
<body>
<h3>[name]</h3>
"}
if(allowed(user))//no, assistants, you're not ruining all vents on the station with just a multitool
dat += multitool_menu(user,P)
if(Mtoollink)
if(P)
if(P.buffer)
var/id = null
if(istype(P.buffer, /obj/machinery/telecomms))
id=P.buffer:id
else if("id_tag" in P.buffer.vars)
id=P.buffer:id_tag
dat += "<p><b>MULTITOOL BUFFER:</b> [P.buffer] [id ? "([id])" : ""]"
dat += linkMenu(P.buffer)
if(P.buffer)
dat += "<a href='?src=\ref[src];flush=1'>\[Flush\]</a>"
dat += "</p>"
else
dat += "<p><b>MULTITOOL BUFFER:</b> <a href='?src=\ref[src];buffer=1'>\[Add Machine\]</a></p>"
else
dat += "<b>ACCESS DENIED</a>"
dat += "</body></html>"
user << browse(dat, "window=mtcomputer")
user.set_machine(src)
onclose(user, "mtcomputer")
@@ -29,7 +29,6 @@
new /obj/item/clothing/mask/gas/syndicate(src)
new /obj/item/clothing/suit/space/rig/syndi(src)
new /obj/item/weapon/tank/jetpack/oxygen/harness(src)
new /obj/item/clothing/shoes/magboots/syndie(src)
/obj/structure/closet/syndicate/nuclear
desc = "It's a storage unit for a Syndicate boarding party.."
@@ -334,6 +334,10 @@
if(air_group || (height==0)) return 1
if(istype(mover,/obj/item/projectile))
return (check_cover(mover,target))
if(ismob(mover))
var/mob/M = mover
if(M.flying)
return 1
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
if(locate(/obj/structure/table) in get_turf(mover))
+6
View File
@@ -114,6 +114,12 @@
shroom.icon_state = "glowshroomf"
shroom.pixel_x = 0
shroom.pixel_y = 0
for(var/obj/effect/supermatter_crystal/crystal in get_step(src,direction))
if(!crystal.floor) //crystals drop to the floor
crystal.floor = 1
crystal.icon_state = "supermatter_crystalf"
crystal.pixel_x = 0
crystal.pixel_y = 0
..()
/turf/simulated/wall/relativewall()
+2
View File
@@ -78,6 +78,8 @@
else
playsound(src, "jackboot", 20, 1)
if(M.flying)
return ..()
// Tracking blood
var/list/bloodDNA = null
+3 -3
View File
@@ -1037,7 +1037,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
@@ -1049,7 +1049,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/red(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
@@ -1061,7 +1061,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/marisa(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
+451
View File
@@ -0,0 +1,451 @@
/obj/machinery/computer/general_air_control/atmos_automation
icon = 'icons/obj/computer.dmi'
icon_state = "aac"
circuit = "/obj/item/weapon/circuitboard/atmos_automation"
req_one_access_txt = "24;10"
Mtoollink = 1
show_sensors = 0
var/on = 0
name = "Atmospherics Automations Console"
var/list/datum/automation/automations = list()
receive_signal(datum/signal/signal)
if(!signal || signal.encryption) return
var/id_tag = signal.data["tag"]
if(!id_tag)
return
sensor_information[id_tag] = signal.data
process()
if(on)
for(var/datum/automation/A in automations)
A.process()
update_icon()
icon_state = initial(icon_state)
// Broken
if(stat & BROKEN)
icon_state += "b"
// Powered
else if(stat & NOPOWER)
icon_state = initial(icon_state)
icon_state += "0"
else if(on)
icon_state += "_active"
proc/request_device_refresh(var/device)
send_signal(list("tag"=device, "status"))
proc/send_signal(var/list/data, var/filter = RADIO_ATMOSIA)//filter's here so the AAC can cross communicate to things like vents, which have a different filter
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
signal.data=data
signal.data["sigtype"]="command"
signal.data["advcontrol"]=1//AAC balancing, you need to manually get up to the machine to make it listen to this
radio_connection.post_signal(src, signal, range = 8, filter = filter)
proc/selectValidChildFor(var/datum/automation/parent, var/mob/user, var/list/valid_returntypes)
var/list/choices=list()
for(var/childtype in automation_types)
var/datum/automation/A = new childtype(src)
if(A.returntype == null)
continue
if(!(A.returntype in valid_returntypes))
continue
choices[A.name]=A
if (choices.len==0)
testing("Unable to find automations with returntype in [english_list(valid_returntypes)]!")
return 0
var/label=input(user, "Select new automation:", "Automations", "Cancel") as null|anything in choices
if(!label)
return 0
return choices[label]
return_text()
var/out=..()
if(on)
out += "<a href=\"?src=\ref[src];on=1\" style=\"font-size:large;font-weight:bold;color:red;\">RUNNING</a>"
else
out += "<a href=\"?src=\ref[src];on=1\" style=\"font-size:large;font-weight:bold;color:green;\">STOPPED</a>"
out += {"
<h2>Automations</h2>
<p>\[
<a href="?src=\ref[src];add=1">
Add
</a>
|
<a href="?src=\ref[src];reset=*">
Reset All
</a>
|
<a href="?src=\ref[src];remove=*">
Clear
</a>
\]</p>
<p>\[
<a href="?src=\ref[src];dump=1">
Export
</a>
|
<a href="?src=\ref[src];read=1">
Import
</a>
\]</p>"}
if(automations.len==0)
out += "<i>No automations present.</i>"
else
for(var/datum/automation/A in automations)
out += {"
<fieldset>
<legend>
<a href="?src=\ref[src];label=\ref[A]">[A.label]</a>
(<a href="?src=\ref[src];reset=\ref[A]">Reset</a> |
<a href="?src=\ref[src];remove=\ref[A]">&times;</a>)
</legend>
[A.GetText()]
</fieldset>
"}
return out
Topic(href,href_list)
if(..())
return 1
if(href_list["on"])
on = !on
updateUsrDialog()
update_icon()
return 1
if(href_list["add"])
var/new_child=selectValidChildFor(null,usr,list(0))
if(!new_child)
return 1
automations += new_child
updateUsrDialog()
return 1
if(href_list["label"])
var/datum/automation/A=locate(href_list["label"])
if(!A) return 1
var/nl=input(usr, "Please enter a label for this automation task.") as text|null
if(!nl) return 1
nl = copytext(sanitize(nl), 1, 50)
A.label=nl
updateUsrDialog()
return 1
if(href_list["reset"])
if(href_list["reset"]=="*")
for(var/datum/automation/A in automations)
if(!A) continue
A.OnReset()
else
var/datum/automation/A=locate(href_list["reset"])
if(!A) return 1
A.OnReset()
updateUsrDialog()
return 1
if(href_list["remove"])
if(href_list["remove"]=="*")
var/confirm=alert("Are you sure you want to remove ALL automations?","Automations","Yes","No")
if(confirm == "No") return 0
for(var/datum/automation/A in automations)
if(!A) continue
A.OnRemove()
automations.Remove(A)
else
var/datum/automation/A=locate(href_list["remove"])
if(!A) return 1
A.OnRemove()
automations.Remove(A)
updateUsrDialog()
return 1
if(href_list["read"])
var/code = input("Input exported AAC code.","Automations","") as message|null
if(!code) return 0
ReadCode(code)
updateUsrDialog()
return 1
if(href_list["dump"])
input("Exported AAC code:","Automations",DumpCode()) as message|null
return 0
proc/MakeCompare(var/datum/automation/a, var/datum/automation/b, var/comparetype)
var/datum/automation/compare/compare=new(src)
compare.comparator = comparetype
compare.children[1] = a
compare.children[2] = b
return compare
proc/MakeNumber(var/value)
var/datum/automation/static_value/val = new(src)
val.value=value
return val
proc/MakeGetSensorData(var/sns_tag,var/field)
var/datum/automation/get_sensor_data/sensor=new(src)
sensor.sensor=sns_tag
sensor.field=field
return sensor
proc/DumpCode()
var/list/json[0]
for(var/datum/automation/A in automations)
json += list(A.Export())
return list2json(json)
proc/ReadCode(var/jsonStr)
automations.Cut()
var/list/json=json2list(jsonStr)
if(json.len>0)
for(var/list/cData in json)
if(isnull(cData) || !("type" in cData))
testing("AAC: Null cData in root JS array.")
continue
var/Atype=text2path(cData["type"])
if(!(Atype in automation_types))
testing("AAC: Unrecognized Atype [Atype].")
continue
var/datum/automation/A = new Atype(src)
A.Import(cData)
automations += A
/obj/machinery/computer/general_air_control/atmos_automation/burnchamber
var/injector_tag="inc_in"
var/output_tag="inc_out"
var/sensor_tag="inc_sensor"
frequency=1449
var/temperature=1000
New()
..()
// On State
// Pretty much this:
/*
if(get_sensor("inc_sensor","temperature") < 200)
set_injector_state("inc_in",1)
set_vent_pump_power("inc_out",0)
else
set_vent_pump_power("inc_out",1
*/
var/datum/automation/get_sensor_data/sensor=new(src)
sensor.sensor=sensor_tag
sensor.field="temperature"
var/datum/automation/static_value/val = new(src)
val.value=temperature - 800
var/datum/automation/compare/compare=new(src)
compare.comparator = "Less Than"
compare.children[1] = sensor
compare.children[2] = val
var/datum/automation/set_injector_power/inj_on=new(src)
inj_on.injector=injector_tag
inj_on.state=1
var/datum/automation/set_vent_pump_power/vp_on=new(src)
vp_on.vent_pump=output_tag
vp_on.state=1
var/datum/automation/set_vent_pump_power/vp_off=new(src)
vp_off.vent_pump=output_tag
vp_off.state=0
var/datum/automation/if_statement/i = new (src)
i.label = "Fuel Injector On"
i.condition = compare
i.children_then.Add(inj_on)
i.children_then.Add(vp_off)
i.children_else.Add(vp_on)
automations += i
// Off state
/*
if(get_sensor("inc_sensor","temperature") > 1000)
set_injector_state("inc_in",0)
*/
sensor=new(src)
sensor.sensor=sensor_tag
sensor.field="temperature"
val = new(src)
val.value=temperature
compare=new(src)
compare.comparator = "Greater Than"
compare.children[1] = sensor
compare.children[2] = val
var/datum/automation/set_injector_power/inj_off=new(src)
inj_off.injector=injector_tag
inj_off.state=0
i = new (src)
i.label = "Fuel Injector Off"
i.condition = compare
i.children_then.Add(inj_off)
automations += i
/obj/machinery/computer/general_air_control/atmos_automation/air_mixing
var/n2_injector_tag="air_n2_in"
var/o2_injector_tag="air_o2_in"
var/output_tag="air_out"
var/sensor_tag="air_sensor"
frequency=1443
var/temperature=1000
New()
..()
buildO2()
buildN2()
buildOutletVent()
proc/buildO2()
///////////////////////////////////////////////////////////////
// Oxygen Injection
///////////////////////////////////////////////////////////////
var/datum/automation/set_injector_power/inj_on=new(src)
inj_on.injector=o2_injector_tag
inj_on.state=1
var/datum/automation/set_injector_power/inj_off=new(src)
inj_off.injector=o2_injector_tag
inj_off.state=0
var/datum/automation/if_statement/i = new (src)
i.label = "Oxygen Injection"
i.condition = MakeCompare(
MakeGetSensorData(sensor_tag,"oxygen"),
MakeNumber(20),
"Less Than or Equal to"
)
i.children_then.Add(inj_on)
i.children_else.Add(inj_off)
automations += i
proc/buildN2()
///////////////////////////////////////////////////////////////
// Nitrogen Injection
///////////////////////////////////////////////////////////////
/*
if(get_sensor_data("pressure") < 100)
injector_on()
else
if(get_sensor_data("pressure") > 5000)
injector_off()
*/
var/datum/automation/set_injector_power/inj_on=new(src)
inj_on.injector=n2_injector_tag
inj_on.state=1
var/datum/automation/set_injector_power/inj_off=new(src)
inj_off.injector=n2_injector_tag
inj_off.state=0
var/datum/automation/if_statement/if_on = new (src)
if_on.label = "Nitrogen Injection"
if_on.condition = MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(100),
"Less Than"
)
if_on.children_then.Add(inj_on)
var/datum/automation/if_statement/if_off=new(src)
if_off.condition=MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(5000),
"Greater Than"
)
if_off.children_then.Add(inj_off)
if_on.children_else.Add(if_off)
automations += if_on
proc/buildOutletVent()
///////////////////////////////////////////////////////////////
// Outlet Management
///////////////////////////////////////////////////////////////
/*
if(get_sensor_data("pressure") >= 5000 && get_sensor_data("oxygen") >= 20)
vent_on()
else
if(get_sensor_data("oxygen") < 20 || get_sensor_data("pressure") < 100)
vent_off()
*/
var/datum/automation/set_vent_pump_power/vp_on=new(src)
vp_on.vent_pump=output_tag
vp_on.state=1
var/datum/automation/set_vent_pump_power/vp_off=new(src)
vp_off.vent_pump=output_tag
vp_off.state=0
var/datum/automation/if_statement/if_on=new(src)
if_on.label="Air Output"
var/datum/automation/and/and_on=new(src)
and_on.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(5000),
"Greater Than or Equal to"
)
)
and_on.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"oxygen"),
MakeNumber(20),
"Greater Than or Equal to"
)
)
if_on.condition=and_on
if_on.children_then.Add(vp_on)
//////////////////////////////
var/datum/automation/if_statement/if_off=new(src)
var/datum/automation/or/or_off=new(src)
or_off.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(100),
"Less Than"
)
)
or_off.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"oxygen"),
MakeNumber(20),
"Less Than"
)
)
if_off.condition=or_off
if_off.children_then.Add(vp_off)
if_on.children_else.Add(if_off)
automations += if_on
@@ -0,0 +1,44 @@
/datum/automation/set_valve_state
name = "Digital Valve: Set Open/Closed"
var/valve=null
var/state=0
Export()
var/list/json = ..()
json["valve"]=valve
json["state"]=state
return json
Import(var/list/json)
..(json)
valve = json["valve"]
state = text2num(json["state"])
process()
if(valve)
parent.send_signal(list ("tag" = valve, "command"="valve_set","valve_set"=state))
return 0
GetText()
return "Set digital valve <a href=\"?src=\ref[src];set_subject=1\">[fmtString(valve)]</a> to <a href=\"?src=\ref[src];set_state=1\">[state?"open":"closed"]</a>."
Topic(href,href_list)
if(..())
return 1
if(href_list["set_state"])
state=!state
parent.updateUsrDialog()
return 1
if(href_list["set_subject"])
var/list/valves=list()
for(var/obj/machinery/atmospherics/valve/digital/V in world)
if(!isnull(V.id_tag) && V.frequency == parent.frequency)
valves|=V.id_tag
if(valves.len==0)
usr << "<span class='warning'>Unable to find any digital valves on this frequency.</span>"
return
valve = input("Select a valve:", "Sensor Data", valve) as null|anything in valves
parent.updateUsrDialog()
return 1

Some files were not shown because too many files have changed in this diff Show More