mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 12:08:28 +01:00
Merge remote-tracking branch 'upstream/dev' into Science!
This commit is contained in:
+26
-9
@@ -234,8 +234,6 @@
|
||||
#include "code\game\gamemodes\events\clang.dm"
|
||||
#include "code\game\gamemodes\events\dust.dm"
|
||||
#include "code\game\gamemodes\events\miniblob.dm"
|
||||
#include "code\game\gamemodes\events\ninja_abilities.dm"
|
||||
#include "code\game\gamemodes\events\ninja_equipment.dm"
|
||||
#include "code\game\gamemodes\events\power_failure.dm"
|
||||
#include "code\game\gamemodes\events\space_ninja.dm"
|
||||
#include "code\game\gamemodes\events\spacevines.dm"
|
||||
@@ -772,12 +770,12 @@
|
||||
#include "code\modules\client\preferences_spawnpoints.dm"
|
||||
#include "code\modules\client\preferences_toggles.dm"
|
||||
#include "code\modules\clothing\clothing.dm"
|
||||
#include "code\modules\clothing\ears\skrell.dm"
|
||||
#include "code\modules\clothing\glasses\glasses.dm"
|
||||
#include "code\modules\clothing\glasses\hud.dm"
|
||||
#include "code\modules\clothing\gloves\boxing.dm"
|
||||
#include "code\modules\clothing\gloves\color.dm"
|
||||
#include "code\modules\clothing\gloves\miscellaneous.dm"
|
||||
#include "code\modules\clothing\gloves\ninja.dm"
|
||||
#include "code\modules\clothing\head\collectable.dm"
|
||||
#include "code\modules\clothing\head\hardhat.dm"
|
||||
#include "code\modules\clothing\head\helmet.dm"
|
||||
@@ -789,19 +787,36 @@
|
||||
#include "code\modules\clothing\masks\breath.dm"
|
||||
#include "code\modules\clothing\masks\gasmask.dm"
|
||||
#include "code\modules\clothing\masks\miscellaneous.dm"
|
||||
#include "code\modules\clothing\masks\voice.dm"
|
||||
#include "code\modules\clothing\shoes\colour.dm"
|
||||
#include "code\modules\clothing\shoes\magboots.dm"
|
||||
#include "code\modules\clothing\shoes\miscellaneous.dm"
|
||||
#include "code\modules\clothing\spacesuits\alien.dm"
|
||||
#include "code\modules\clothing\spacesuits\breaches.dm"
|
||||
#include "code\modules\clothing\spacesuits\captain.dm"
|
||||
#include "code\modules\clothing\spacesuits\ert.dm"
|
||||
#include "code\modules\clothing\spacesuits\miscellaneous.dm"
|
||||
#include "code\modules\clothing\spacesuits\ninja.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig.dm"
|
||||
#include "code\modules\clothing\spacesuits\spacesuits.dm"
|
||||
#include "code\modules\clothing\spacesuits\syndi.dm"
|
||||
#include "code\modules\clothing\spacesuits\void.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig\rig.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig\rig_attackby.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig\rig_pieces.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig\rig_verbs.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig\rig_wiring.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig\modules\combat.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig\modules\computer.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig\modules\modules.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig\modules\ninja.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig\modules\utility.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig\modules\vision.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig\suits\alien.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig\suits\combat.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig\suits\ert.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig\suits\light.dm"
|
||||
#include "code\modules\clothing\spacesuits\rig\suits\station.dm"
|
||||
#include "code\modules\clothing\spacesuits\void\merc.dm"
|
||||
#include "code\modules\clothing\spacesuits\void\station.dm"
|
||||
#include "code\modules\clothing\spacesuits\void\void.dm"
|
||||
#include "code\modules\clothing\spacesuits\void\wizard.dm"
|
||||
#include "code\modules\clothing\suits\alien.dm"
|
||||
#include "code\modules\clothing\suits\armor.dm"
|
||||
#include "code\modules\clothing\suits\bio.dm"
|
||||
@@ -1132,6 +1147,7 @@
|
||||
#include "code\modules\organs\wound.dm"
|
||||
#include "code\modules\paperwork\carbonpaper.dm"
|
||||
#include "code\modules\paperwork\clipboard.dm"
|
||||
#include "code\modules\paperwork\faxmachine.dm"
|
||||
#include "code\modules\paperwork\filingcabinet.dm"
|
||||
#include "code\modules\paperwork\folders.dm"
|
||||
#include "code\modules\paperwork\handlabeler.dm"
|
||||
@@ -1157,7 +1173,6 @@
|
||||
#include "code\modules\power\lighting.dm"
|
||||
#include "code\modules\power\port_gen.dm"
|
||||
#include "code\modules\power\power.dm"
|
||||
#include "code\modules\power\power_monitor.dm"
|
||||
#include "code\modules\power\powernet.dm"
|
||||
#include "code\modules\power\smes.dm"
|
||||
#include "code\modules\power\smes_construction.dm"
|
||||
@@ -1168,6 +1183,8 @@
|
||||
#include "code\modules\power\antimatter\containment_jar.dm"
|
||||
#include "code\modules\power\antimatter\control.dm"
|
||||
#include "code\modules\power\antimatter\shielding.dm"
|
||||
#include "code\modules\power\sensors\powernet_sensor.dm"
|
||||
#include "code\modules\power\sensors\sensor_monitoring.dm"
|
||||
#include "code\modules\power\singularity\collector.dm"
|
||||
#include "code\modules\power\singularity\containment_field.dm"
|
||||
#include "code\modules\power\singularity\emitter.dm"
|
||||
@@ -1297,6 +1314,7 @@
|
||||
#include "code\modules\research\xenoarchaeology\artifact\effects\unknown_effect_teleport.dm"
|
||||
#include "code\modules\research\xenoarchaeology\finds\finds.dm"
|
||||
#include "code\modules\research\xenoarchaeology\finds\finds_defines.dm"
|
||||
#include "code\modules\research\xenoarchaeology\finds\finds_eguns.dm"
|
||||
#include "code\modules\research\xenoarchaeology\finds\finds_fossils.dm"
|
||||
#include "code\modules\research\xenoarchaeology\finds\finds_misc.dm"
|
||||
#include "code\modules\research\xenoarchaeology\finds\finds_special.dm"
|
||||
@@ -1469,7 +1487,6 @@
|
||||
#include "code\WorkInProgress\computer3\computers\robot.dm"
|
||||
#include "code\WorkInProgress\computer3\computers\security.dm"
|
||||
#include "code\WorkInProgress\computer3\computers\welcome.dm"
|
||||
#include "code\WorkInProgress\kilakk\fax.dm"
|
||||
#include "code\WorkInProgress\Mini\atmos_control.dm"
|
||||
#include "code\WorkInProgress\Ported\policetape.dm"
|
||||
#include "code\WorkInProgress\SkyMarshal\officer_stuff.dm"
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
var/dat = "<h3>[current.name]</h3><hr>"
|
||||
dat += current.return_status()
|
||||
if(current.remote_control || overridden)
|
||||
dat += "<hr>[return_controls()]"
|
||||
dat += "<hr>[current.return_controls(src)]"
|
||||
return dat
|
||||
|
||||
//a bunch of this is copied from atmos alarms
|
||||
@@ -90,289 +90,6 @@
|
||||
current = null
|
||||
if(href_list["alarm"])
|
||||
current = locate(href_list["alarm"])
|
||||
if(href_list["command"])
|
||||
var/device_id = href_list["id_tag"]
|
||||
switch(href_list["command"])
|
||||
if(
|
||||
"power",
|
||||
"adjust_external_pressure",
|
||||
"checks",
|
||||
"co2_scrub",
|
||||
"tox_scrub",
|
||||
"n2o_scrub",
|
||||
"panic_siphon",
|
||||
"scrubbing"
|
||||
)
|
||||
current.send_signal(device_id, list (href_list["command"] = text2num(href_list["val"])))
|
||||
spawn(3)
|
||||
src.updateUsrDialog()
|
||||
//if("adjust_threshold") //was a good idea but required very wide window
|
||||
if("set_threshold")
|
||||
var/env = href_list["env"]
|
||||
var/threshold = text2num(href_list["var"])
|
||||
var/list/selected = current.TLV[env]
|
||||
var/list/thresholds = list("lower bound", "low warning", "high warning", "upper bound")
|
||||
var/newval = input("Enter [thresholds[threshold]] for [env]", "Alarm triggers", selected[threshold]) as num|null
|
||||
if (isnull(newval) || ..() || (current.locked && issilicon(usr)))
|
||||
return
|
||||
if (newval<0)
|
||||
selected[threshold] = -1.0
|
||||
else if (env=="temperature" && newval>5000)
|
||||
selected[threshold] = 5000
|
||||
else if (env=="pressure" && newval>50*ONE_ATMOSPHERE)
|
||||
selected[threshold] = 50*ONE_ATMOSPHERE
|
||||
else if (env!="temperature" && env!="pressure" && newval>200)
|
||||
selected[threshold] = 200
|
||||
else
|
||||
newval = round(newval,0.01)
|
||||
selected[threshold] = newval
|
||||
if(threshold == 1)
|
||||
if(selected[1] > selected[2])
|
||||
selected[2] = selected[1]
|
||||
if(selected[1] > selected[3])
|
||||
selected[3] = selected[1]
|
||||
if(selected[1] > selected[4])
|
||||
selected[4] = selected[1]
|
||||
if(threshold == 2)
|
||||
if(selected[1] > selected[2])
|
||||
selected[1] = selected[2]
|
||||
if(selected[2] > selected[3])
|
||||
selected[3] = selected[2]
|
||||
if(selected[2] > selected[4])
|
||||
selected[4] = selected[2]
|
||||
if(threshold == 3)
|
||||
if(selected[1] > selected[3])
|
||||
selected[1] = selected[3]
|
||||
if(selected[2] > selected[3])
|
||||
selected[2] = selected[3]
|
||||
if(selected[3] > selected[4])
|
||||
selected[4] = selected[3]
|
||||
if(threshold == 4)
|
||||
if(selected[1] > selected[4])
|
||||
selected[1] = selected[4]
|
||||
if(selected[2] > selected[4])
|
||||
selected[2] = selected[4]
|
||||
if(selected[3] > selected[4])
|
||||
selected[3] = selected[4]
|
||||
|
||||
//Sets the temperature the built-in heater/cooler tries to maintain.
|
||||
if(env == "temperature")
|
||||
if(current.target_temperature < selected[2])
|
||||
current.target_temperature = selected[2]
|
||||
if(current.target_temperature > selected[3])
|
||||
current.target_temperature = selected[3]
|
||||
|
||||
spawn(1)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(href_list["screen"])
|
||||
current.screen = text2num(href_list["screen"])
|
||||
spawn(1)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
//commenting this out because it causes compile errors
|
||||
//I tried fixing it but wasn't sucessful.
|
||||
//if(href_list["atmos_unlock"])
|
||||
// switch(href_list["atmos_unlock"])
|
||||
// if("0")
|
||||
// current.alarm_area.air_doors_close()
|
||||
// if("1")
|
||||
// current.alarm_area.air_doors_open()
|
||||
|
||||
if(href_list["atmos_alarm"])
|
||||
if (current.alarm_area.atmosalert(2))
|
||||
current.apply_danger_level(2)
|
||||
spawn(1)
|
||||
src.updateUsrDialog()
|
||||
current.update_icon()
|
||||
return
|
||||
if(href_list["atmos_reset"])
|
||||
if (current.alarm_area.atmosalert(0))
|
||||
current.apply_danger_level(0)
|
||||
spawn(1)
|
||||
src.updateUsrDialog()
|
||||
current.update_icon()
|
||||
return
|
||||
|
||||
if(href_list["mode"])
|
||||
current.mode = text2num(href_list["mode"])
|
||||
current.apply_mode()
|
||||
spawn(5)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
updateUsrDialog()
|
||||
|
||||
//copypasta from alarm code, changed to work with this without derping hard
|
||||
//---START COPYPASTA----
|
||||
|
||||
/obj/machinery/computer/atmoscontrol/proc/return_controls()
|
||||
var/output = ""//"<B>[alarm_zone] Air [name]</B><HR>"
|
||||
|
||||
switch(current.screen)
|
||||
if (AALARM_SCREEN_MAIN)
|
||||
if(current.alarm_area.atmosalm)
|
||||
output += {"<a href='?src=\ref[src];alarm=\ref[current];atmos_reset=1'>Reset - Atmospheric Alarm</a><hr>"}
|
||||
else
|
||||
output += {"<a href='?src=\ref[src];alarm=\ref[current];atmos_alarm=1'>Activate - Atmospheric Alarm</a><hr>"}
|
||||
|
||||
output += {"
|
||||
<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_SCRUB]'>Scrubbers Control</a><br>
|
||||
<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_VENT]'>Vents Control</a><br>
|
||||
<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_MODE]'>Set environmental mode</a><br>
|
||||
<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_SENSORS]'>Sensor Control</a><br>
|
||||
<HR>
|
||||
"}
|
||||
if (current.mode==AALARM_MODE_PANIC)
|
||||
output += "<font color='red'><B>PANIC SYPHON ACTIVE</B></font><br><A href='?src=\ref[src];alarm=\ref[current];mode=[AALARM_MODE_SCRUBBING]'>turn syphoning off</A>"
|
||||
else
|
||||
output += "<A href='?src=\ref[src];alarm=\ref[current];mode=[AALARM_MODE_PANIC]'><font color='red'><B>ACTIVATE PANIC SYPHON IN AREA</B></font></A>"
|
||||
|
||||
output += "<br><br>Atmospheric Lockdown: <a href='?src=\ref[src];alarm=\ref[current];atmos_unlock=[current.alarm_area.air_doors_activated]'>[current.alarm_area.air_doors_activated ? "<b>ENABLED</b>" : "Disabled"]</a>"
|
||||
if (AALARM_SCREEN_VENT)
|
||||
var/sensor_data = ""
|
||||
if(current.alarm_area.air_vent_names.len)
|
||||
for(var/id_tag in current.alarm_area.air_vent_names)
|
||||
var/long_name = current.alarm_area.air_vent_names[id_tag]
|
||||
var/list/data = current.alarm_area.air_vent_info[id_tag]
|
||||
var/state = ""
|
||||
if(!data)
|
||||
state = "<font color='red'> can not be found!</font>"
|
||||
data = list("external" = 0) //for "0" instead of empty string
|
||||
else if (data["timestamp"]+AALARM_REPORT_TIMEOUT < world.time)
|
||||
state = "<font color='red'> not responding!</font>"
|
||||
sensor_data += {"
|
||||
<B>[long_name]</B>[state]<BR>
|
||||
<B>Operating:</B>
|
||||
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=power;val=[!data["power"]]'>[data["power"]?"on":"off"]</A>
|
||||
<BR>
|
||||
<B>Pressure checks:</B>
|
||||
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=checks;val=[data["checks"]^1]' [(data["checks"]&1)?"style='font-weight:bold;'":""]>external</A>
|
||||
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=checks;val=[data["checks"]^2]' [(data["checks"]&2)?"style='font-weight:bold;'":""]>internal</A>
|
||||
<BR>
|
||||
<B>External pressure bound:</B>
|
||||
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=adjust_external_pressure;val=-1000'>-</A>
|
||||
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=adjust_external_pressure;val=-100'>-</A>
|
||||
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=adjust_external_pressure;val=-10'>-</A>
|
||||
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=adjust_external_pressure;val=-1'>-</A>
|
||||
[data["external"]]
|
||||
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=adjust_external_pressure;val=+1'>+</A>
|
||||
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=adjust_external_pressure;val=+10'>+</A>
|
||||
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=adjust_external_pressure;val=+100'>+</A>
|
||||
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=adjust_external_pressure;val=+1000'>+</A>
|
||||
<BR>
|
||||
"}
|
||||
if (data["direction"] == "siphon")
|
||||
sensor_data += {"
|
||||
<B>Direction:</B>
|
||||
siphoning
|
||||
<BR>
|
||||
"}
|
||||
sensor_data += {"<HR>"}
|
||||
else
|
||||
sensor_data = "No vents connected.<BR>"
|
||||
output = {"<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>[sensor_data]"}
|
||||
if (AALARM_SCREEN_SCRUB)
|
||||
var/sensor_data = ""
|
||||
if(current.alarm_area.air_scrub_names.len)
|
||||
for(var/id_tag in current.alarm_area.air_scrub_names)
|
||||
var/long_name = current.alarm_area.air_scrub_names[id_tag]
|
||||
var/list/data = current.alarm_area.air_scrub_info[id_tag]
|
||||
var/state = ""
|
||||
if(!data)
|
||||
state = "<font color='red'> can not be found!</font>"
|
||||
data = list("external" = 0) //for "0" instead of empty string
|
||||
else if (data["timestamp"]+AALARM_REPORT_TIMEOUT < world.time)
|
||||
state = "<font color='red'> not responding!</font>"
|
||||
|
||||
sensor_data += {"
|
||||
<B>[long_name]</B>[state]<BR>
|
||||
<B>Operating:</B>
|
||||
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=power;val=[!data["power"]]'>[data["power"]?"on":"off"]</A><BR>
|
||||
<B>Type:</B>
|
||||
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=scrubbing;val=[!data["scrubbing"]]'>[data["scrubbing"]?"scrubbing":"syphoning"]</A><BR>
|
||||
"}
|
||||
|
||||
if(data["scrubbing"])
|
||||
sensor_data += {"
|
||||
<B>Filtering:</B>
|
||||
Carbon Dioxide
|
||||
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=co2_scrub;val=[!data["filter_co2"]]'>[data["filter_co2"]?"on":"off"]</A>;
|
||||
Toxins
|
||||
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=tox_scrub;val=[!data["filter_phoron"]]'>[data["filter_phoron"]?"on":"off"]</A>;
|
||||
Nitrous Oxide
|
||||
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=n2o_scrub;val=[!data["filter_n2o"]]'>[data["filter_n2o"]?"on":"off"]</A>
|
||||
<BR>
|
||||
"}
|
||||
sensor_data += {"
|
||||
<B>Panic syphon:</B> [data["panic"]?"<font color='red'><B>PANIC SYPHON ACTIVATED</B></font>":""]
|
||||
<A href='?src=\ref[src];alarm=\ref[current];id_tag=[id_tag];command=panic_siphon;val=[!data["panic"]]'><font color='[(data["panic"]?"blue'>Dea":"red'>A")]ctivate</font></A><BR>
|
||||
<HR>
|
||||
"}
|
||||
else
|
||||
sensor_data = "No scrubbers connected.<BR>"
|
||||
output = {"<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>[sensor_data]"}
|
||||
|
||||
if (AALARM_SCREEN_MODE)
|
||||
output += {"
|
||||
<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>
|
||||
<b>Air machinery mode for the area:</b><ul>"}
|
||||
var/list/modes = list(AALARM_MODE_SCRUBBING = "Filtering - Scrubs out contaminants",\
|
||||
AALARM_MODE_REPLACEMENT = "<font color='blue'>Replace Air - Siphons out air while replacing</font>",\
|
||||
AALARM_MODE_PANIC = "<font color='red'>Panic - Siphons air out of the room</font>",\
|
||||
AALARM_MODE_CYCLE = "<font color='red'>Cycle - Siphons air before replacing</font>",\
|
||||
AALARM_MODE_FILL = "<font color='green'>Fill - Shuts off scrubbers and opens vents</font>",\
|
||||
AALARM_MODE_OFF = "<font color='blue'>Off - Shuts off vents and scrubbers</font>",)
|
||||
for (var/m=1,m<=modes.len,m++)
|
||||
if (current.mode==m)
|
||||
output += {"<li><A href='?src=\ref[src];alarm=\ref[current];mode=[m]'><b>[modes[m]]</b></A> (selected)</li>"}
|
||||
else
|
||||
output += {"<li><A href='?src=\ref[src];alarm=\ref[current];mode=[m]'>[modes[m]]</A></li>"}
|
||||
output += "</ul>"
|
||||
if (AALARM_SCREEN_SENSORS)
|
||||
output += {"
|
||||
<a href='?src=\ref[src];alarm=\ref[current];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>
|
||||
<b>Alarm thresholds:</b><br>
|
||||
Partial pressure for gases
|
||||
<style>/* some CSS woodoo here. Does not work perfect in ie6 but who cares? */
|
||||
table td { border-left: 1px solid black; border-top: 1px solid black;}
|
||||
table tr:first-child th { border-left: 1px solid black;}
|
||||
table th:first-child { border-top: 1px solid black; font-weight: normal;}
|
||||
table tr:first-child th:first-child { border: none;}
|
||||
.dl0 { color: green; }
|
||||
.dl1 { color: orange; }
|
||||
.dl2 { color: red; font-weght: bold;}
|
||||
</style>
|
||||
<table cellspacing=0>
|
||||
<TR><th></th><th class=dl2>min2</th><th class=dl1>min1</th><th class=dl1>max1</th><th class=dl2>max2</th></TR>
|
||||
"}
|
||||
var/list/gases = list(
|
||||
"oxygen" = "O<sub>2</sub>",
|
||||
"carbon dioxide" = "CO<sub>2</sub>",
|
||||
"phoron" = "Toxin",
|
||||
"other" = "Other",
|
||||
)
|
||||
var/list/tlv
|
||||
for (var/g in gases)
|
||||
output += "<TR><th>[gases[g]]</th>"
|
||||
tlv = current.TLV[g]
|
||||
for (var/i = 1, i <= 4, i++)
|
||||
output += "<td><A href='?src=\ref[src];alarm=\ref[current];command=set_threshold;env=[g];var=[i]'>[tlv[i] >= 0?tlv[i]:"OFF"]</A></td>"
|
||||
output += "</TR>"
|
||||
|
||||
tlv = current.TLV["pressure"]
|
||||
output += "<TR><th>Pressure</th>"
|
||||
for (var/i = 1, i <= 4, i++)
|
||||
output += "<td><A href='?src=\ref[src];alarm=\ref[current];command=set_threshold;env=pressure;var=[i]'>[tlv[i]>= 0?tlv[i]:"OFF"]</A></td>"
|
||||
output += "</TR>"
|
||||
|
||||
tlv = current.TLV["temperature"]
|
||||
output += "<TR><th>Temperature</th>"
|
||||
for (var/i = 1, i <= 4, i++)
|
||||
output += "<td><A href='?src=\ref[src];alarm=\ref[current];command=set_threshold;env=temperature;var=[i]'>[tlv[i]>= 0?tlv[i]:"OFF"]</A></td>"
|
||||
output += "</TR>"
|
||||
output += "</table>"
|
||||
|
||||
return output
|
||||
//---END COPYPASTA----
|
||||
else if(current)
|
||||
current.Topic(href, href_list, 1, 1)
|
||||
interact(usr)
|
||||
|
||||
@@ -50,20 +50,25 @@
|
||||
var/mob/living/silicon/ai/occupant = null
|
||||
var/busy = 0
|
||||
|
||||
// Ninja gloves check
|
||||
attack_hand(mob/user as mob)
|
||||
if(ishuman(user) && istype(user:gloves, /obj/item/clothing/gloves/space_ninja) && user:gloves:candrain && !user:gloves:draining)
|
||||
if(user:wear_suit:s_control)
|
||||
user:wear_suit.transfer_ai("AIFIXER","NINJASUIT",src,user)
|
||||
else
|
||||
user << "\red <b>ERROR</b>: \black Remote access channel disabled."
|
||||
return
|
||||
..()
|
||||
|
||||
attackby(obj/I as obj,mob/user as mob)
|
||||
if(computer && !computer.stat)
|
||||
|
||||
if(istype(I, /obj/item/device/aicard))
|
||||
I:transfer_ai("AIFIXER","AICARD",src,user)
|
||||
|
||||
var/obj/item/device/aicard/card = I
|
||||
var/mob/living/silicon/ai/comp_ai = locate() in src
|
||||
var/mob/living/silicon/ai/card_ai = locate() in card
|
||||
|
||||
if(istype(comp_ai))
|
||||
if(busy)
|
||||
user << "\red <b>ERROR</b>: \black Reconstruction in progress."
|
||||
return
|
||||
card.grab_ai(comp_ai, user)
|
||||
if(!(locate(/mob/living/silicon/ai) in src)) occupant = null
|
||||
else if(istype(card_ai))
|
||||
load_ai(card_ai,card,user)
|
||||
occupant = locate(/mob/living/silicon/ai) in src
|
||||
|
||||
if(computer.program)
|
||||
computer.program.update_icon()
|
||||
computer.update_icon()
|
||||
@@ -71,6 +76,24 @@
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/part/computer/ai_holder/proc/load_ai(var/mob/living/silicon/ai/transfer, var/obj/item/device/aicard/card, var/mob/user)
|
||||
|
||||
if(!transfer)
|
||||
return
|
||||
|
||||
// Transfer over the AI.
|
||||
transfer << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here."
|
||||
user << "\blue <b>Transfer successful</b>: \black [transfer.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
|
||||
|
||||
transfer.loc = src
|
||||
transfer.cancel_camera()
|
||||
transfer.control_disabled = 1
|
||||
occupant = transfer
|
||||
|
||||
if(card)
|
||||
card.clear()
|
||||
|
||||
|
||||
/*
|
||||
ID computer cardslot - reading and writing slots
|
||||
*/
|
||||
|
||||
@@ -1,213 +0,0 @@
|
||||
var/list/obj/machinery/faxmachine/allfaxes = list()
|
||||
var/list/alldepartments = list("Central Command")
|
||||
|
||||
/obj/machinery/faxmachine
|
||||
name = "fax machine"
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "fax"
|
||||
req_one_access = list(access_lawyer, access_heads, access_armory) //Warden needs to be able to Fax solgov too.
|
||||
anchored = 1
|
||||
density = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 30
|
||||
active_power_usage = 200
|
||||
power_channel = EQUIP
|
||||
|
||||
var/obj/item/weapon/card/id/scan = null // identification
|
||||
var/authenticated = 0
|
||||
|
||||
var/obj/item/weapon/paper/tofax = null // what we're sending
|
||||
var/sendcooldown = 0 // to avoid spamming fax messages
|
||||
|
||||
var/department = "Unknown" // our department
|
||||
|
||||
var/dpt = "Central Command" // the department we're sending to
|
||||
|
||||
|
||||
/obj/machinery/faxmachine/New()
|
||||
..()
|
||||
allfaxes += src
|
||||
|
||||
if( !("[department]" in alldepartments) )
|
||||
alldepartments += department
|
||||
alldepartments += "Sol Government"
|
||||
|
||||
/obj/machinery/faxmachine/process()
|
||||
return 0
|
||||
|
||||
/obj/machinery/faxmachine/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/faxmachine/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = "Fax Machine<BR>"
|
||||
|
||||
var/scan_name
|
||||
if(scan)
|
||||
scan_name = scan.name
|
||||
else
|
||||
scan_name = "--------"
|
||||
|
||||
dat += "Confirm Identity: <a href='byond://?src=\ref[src];scan=1'>[scan_name]</a><br>"
|
||||
|
||||
if(authenticated)
|
||||
dat += "<a href='byond://?src=\ref[src];logout=1'>{Log Out}</a>"
|
||||
else
|
||||
dat += "<a href='byond://?src=\ref[src];auth=1'>{Log In}</a>"
|
||||
|
||||
dat += "<hr>"
|
||||
|
||||
if(authenticated)
|
||||
dat += "<b>Logged in to:</b> Central Command Quantum Entanglement Network<br><br>"
|
||||
|
||||
if(tofax)
|
||||
dat += "<a href='byond://?src=\ref[src];remove=1'>Remove Paper</a><br><br>"
|
||||
|
||||
if(sendcooldown)
|
||||
dat += "<b>Transmitter arrays realigning. Please stand by.</b><br>"
|
||||
|
||||
else
|
||||
dat += "<a href='byond://?src=\ref[src];send=1'>Send</a><br>"
|
||||
dat += "<b>Currently sending:</b> [tofax.name]<br>"
|
||||
dat += "<b>Sending to:</b> <a href='byond://?src=\ref[src];dept=1'>[dpt]</a><br>"
|
||||
|
||||
else
|
||||
if(sendcooldown)
|
||||
dat += "Please insert paper to send via secure connection.<br><br>"
|
||||
dat += "<b>Transmitter arrays realigning. Please stand by.</b><br>"
|
||||
else
|
||||
dat += "Please insert paper to send via secure connection.<br><br>"
|
||||
|
||||
else
|
||||
dat += "Proper authentication is required to use this device.<br><br>"
|
||||
|
||||
if(tofax)
|
||||
dat += "<a href ='byond://?src=\ref[src];remove=1'>Remove Paper</a><br>"
|
||||
|
||||
user << browse(dat, "window=copier")
|
||||
onclose(user, "copier")
|
||||
return
|
||||
|
||||
/obj/machinery/faxmachine/Topic(href, href_list)
|
||||
if(href_list["send"])
|
||||
if(tofax)
|
||||
|
||||
if(dpt == "Central Command")
|
||||
Centcomm_fax(src, tofax.info, tofax.name, usr)
|
||||
sendcooldown = 1800
|
||||
|
||||
else if(dpt == "Sol Government")
|
||||
Solgov_fax(src, tofax.info, tofax.name, usr)
|
||||
sendcooldown = 1800
|
||||
else
|
||||
SendFax(tofax.info, tofax.name, usr, dpt)
|
||||
sendcooldown = 600
|
||||
|
||||
usr << "Message transmitted successfully."
|
||||
|
||||
spawn(sendcooldown) // cooldown time
|
||||
sendcooldown = 0
|
||||
|
||||
if(href_list["remove"])
|
||||
if(tofax)
|
||||
if(!ishuman(usr))
|
||||
usr << "<span class='warning'>You can't do it.</span>"
|
||||
else
|
||||
tofax.loc = usr.loc
|
||||
usr.put_in_hands(tofax)
|
||||
usr << "<span class='notice'>You take the paper out of \the [src].</span>"
|
||||
tofax = null
|
||||
|
||||
if(href_list["scan"])
|
||||
if (scan)
|
||||
if(ishuman(usr))
|
||||
scan.loc = usr.loc
|
||||
if(!usr.get_active_hand())
|
||||
usr.put_in_hands(scan)
|
||||
scan = null
|
||||
else
|
||||
scan.loc = src.loc
|
||||
scan = null
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
scan = I
|
||||
authenticated = 0
|
||||
|
||||
if(href_list["dept"])
|
||||
var/lastdpt = dpt
|
||||
dpt = input(usr, "Which department?", "Choose a department", "") as null|anything in alldepartments
|
||||
if(!dpt) dpt = lastdpt
|
||||
|
||||
if(href_list["auth"])
|
||||
if ( (!( authenticated ) && (scan)) )
|
||||
if (check_access(scan))
|
||||
authenticated = 1
|
||||
|
||||
if(href_list["logout"])
|
||||
authenticated = 0
|
||||
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/faxmachine/attackby(obj/item/O as obj, mob/user as mob)
|
||||
|
||||
if(istype(O, /obj/item/weapon/paper))
|
||||
if(!tofax)
|
||||
user.drop_item()
|
||||
tofax = O
|
||||
O.loc = src
|
||||
user << "<span class='notice'>You insert the paper into \the [src].</span>"
|
||||
flick("faxsend", src)
|
||||
updateUsrDialog()
|
||||
else
|
||||
user << "<span class='notice'>There is already something in \the [src].</span>"
|
||||
|
||||
else if(istype(O, /obj/item/weapon/card/id))
|
||||
|
||||
var/obj/item/weapon/card/id/idcard = O
|
||||
if(!scan)
|
||||
usr.drop_item()
|
||||
idcard.loc = src
|
||||
scan = idcard
|
||||
|
||||
else if(istype(O, /obj/item/weapon/wrench))
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
anchored = !anchored
|
||||
user << "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>"
|
||||
return
|
||||
|
||||
/proc/Centcomm_fax(var/originfax, var/sent, var/sentname, var/mob/Sender)
|
||||
|
||||
var/msg = "\blue <b><font color='#006100'>CENTCOMM FAX: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<a href='?_src_=holder;CentcommFaxReply=\ref[Sender];originfax=\ref[originfax]'>RPLY</a>)</b>: Receiving '[sentname]' via secure connection ... <a href='?_src_=holder;CentcommFaxView=\ref[sent]'>view message</a>"
|
||||
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
C << msg
|
||||
|
||||
/proc/Solgov_fax(var/originfax, var/sent, var/sentname, var/mob/Sender)
|
||||
var/msg = "\blue <b><font color='#1F66A0'>SOL GOVERNMENT FAX: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[Sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<a href='?_src_=holder;SolGovFaxReply=\ref[Sender];originfax=\ref[originfax]'>RPLY</a>)</b>: Receiving '[sentname]' via secure connection ... <a href='?_src_=holder;CentcommFaxView=\ref[sent]'>view message</a>"
|
||||
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
C << msg
|
||||
|
||||
|
||||
proc/SendFax(var/sent, var/sentname, var/mob/Sender, var/dpt)
|
||||
|
||||
for(var/obj/machinery/faxmachine/F in allfaxes)
|
||||
if( F.department == dpt )
|
||||
if(! (F.stat & (BROKEN|NOPOWER) ) )
|
||||
|
||||
flick("faxreceive", F)
|
||||
|
||||
// give the sprite some time to flick
|
||||
spawn(20)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( F.loc )
|
||||
P.name = "[sentname]"
|
||||
P.info = "[sent]"
|
||||
P.update_icon()
|
||||
|
||||
playsound(F.loc, "sound/items/polaroid1.ogg", 50, 1)
|
||||
@@ -222,9 +222,22 @@
|
||||
*/
|
||||
/mob/proc/MiddleClickOn(var/atom/A)
|
||||
return
|
||||
|
||||
/mob/living/carbon/MiddleClickOn(var/atom/A)
|
||||
swap_hand()
|
||||
|
||||
/mob/living/carbon/human/MiddleClickOn(var/atom/A)
|
||||
|
||||
if(back)
|
||||
var/obj/item/weapon/rig/rig = back
|
||||
if(istype(rig) && rig.selected_module)
|
||||
if(world.time <= next_move) return
|
||||
next_move = world.time + 8
|
||||
rig.selected_module.engage(A)
|
||||
return
|
||||
|
||||
swap_hand()
|
||||
|
||||
// In case of use break glass
|
||||
/*
|
||||
/atom/proc/MiddleClick(var/mob/M as mob)
|
||||
|
||||
@@ -39,10 +39,11 @@
|
||||
#define ui_alien_head "4:12,1:5" //aliens
|
||||
#define ui_alien_oclothing "5:14,1:5" //aliens
|
||||
|
||||
#define ui_inv1 "6:16,1:5" //borgs
|
||||
#define ui_inv2 "7:16,1:5" //borgs
|
||||
#define ui_inv3 "8:16,1:5" //borgs
|
||||
#define ui_borg_store "9:16,1:5" //borgs
|
||||
#define ui_inv1 "7,1:5" //borgs
|
||||
#define ui_inv2 "8,1:5" //borgs
|
||||
#define ui_inv3 "9,1:5" //borgs
|
||||
#define ui_borg_store "10,1:5" //borgs
|
||||
#define ui_borg_inventory "6,1:5"//borgs
|
||||
|
||||
#define ui_monkey_mask "5:14,1:5" //monkey
|
||||
#define ui_monkey_back "6:14,1:5" //monkey
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
var/obj/screen/robot_inventory
|
||||
|
||||
|
||||
/datum/hud/proc/robot_hud()
|
||||
|
||||
src.adding = list()
|
||||
@@ -5,7 +8,6 @@
|
||||
|
||||
var/obj/screen/using
|
||||
|
||||
|
||||
//Radio
|
||||
using = new /obj/screen()
|
||||
using.name = "radio"
|
||||
@@ -98,6 +100,13 @@
|
||||
mymob.throw_icon.name = "store"
|
||||
mymob.throw_icon.screen_loc = ui_borg_store
|
||||
|
||||
//Inventory
|
||||
robot_inventory = new /obj/screen()
|
||||
robot_inventory.name = "inventory"
|
||||
robot_inventory.icon = 'icons/mob/screen1_robot.dmi'
|
||||
robot_inventory.icon_state = "inventory"
|
||||
robot_inventory.screen_loc = ui_borg_inventory
|
||||
|
||||
//Temp
|
||||
mymob.bodytemp = new /obj/screen()
|
||||
mymob.bodytemp.icon_state = "temp0"
|
||||
@@ -164,7 +173,81 @@
|
||||
|
||||
mymob.client.screen = null
|
||||
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon) //, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon, robot_inventory) //, mymob.rest, mymob.sleep, mymob.mach )
|
||||
mymob.client.screen += src.adding + src.other
|
||||
|
||||
return
|
||||
|
||||
|
||||
/datum/hud/proc/toggle_show_robot_modules()
|
||||
if(!isrobot(mymob))
|
||||
return
|
||||
|
||||
var/mob/living/silicon/robot/r = mymob
|
||||
|
||||
r.shown_robot_modules = !r.shown_robot_modules
|
||||
update_robot_modules_display()
|
||||
|
||||
|
||||
/datum/hud/proc/update_robot_modules_display()
|
||||
if(!isrobot(mymob))
|
||||
return
|
||||
|
||||
var/mob/living/silicon/robot/r = mymob
|
||||
|
||||
if(r.shown_robot_modules)
|
||||
//Modules display is shown
|
||||
//r.client.screen += robot_inventory //"store" icon
|
||||
|
||||
if(!r.module)
|
||||
usr << "<span class='danger'>No module selected</span>"
|
||||
return
|
||||
|
||||
if(!r.module.modules)
|
||||
usr << "<span class='danger'>Selected module has no modules to select</span>"
|
||||
return
|
||||
|
||||
if(!r.robot_modules_background)
|
||||
return
|
||||
|
||||
var/display_rows = round((r.module.modules.len) / 8) +1 //+1 because round() returns floor of number
|
||||
r.robot_modules_background.screen_loc = "CENTER-4:16,SOUTH+1:7 to CENTER+3:16,SOUTH+[display_rows]:7"
|
||||
r.client.screen += r.robot_modules_background
|
||||
|
||||
var/x = -4 //Start at CENTER-4,SOUTH+1
|
||||
var/y = 1
|
||||
|
||||
//Unfortunately adding the emag module to the list of modules has to be here. This is because a borg can
|
||||
//be emagged before they actually select a module. - or some situation can cause them to get a new module
|
||||
// - or some situation might cause them to get de-emagged or something.
|
||||
if(r.emagged)
|
||||
if(!(r.module.emag in r.module.modules))
|
||||
r.module.modules.Add(r.module.emag)
|
||||
else
|
||||
if(r.module.emag in r.module.modules)
|
||||
r.module.modules.Remove(r.module.emag)
|
||||
|
||||
for(var/atom/movable/A in r.module.modules)
|
||||
if( (A != r.module_state_1) && (A != r.module_state_2) && (A != r.module_state_3) )
|
||||
//Module is not currently active
|
||||
r.client.screen += A
|
||||
if(x < 0)
|
||||
A.screen_loc = "CENTER[x]:16,SOUTH+[y]:7"
|
||||
else
|
||||
A.screen_loc = "CENTER+[x]:16,SOUTH+[y]:7"
|
||||
A.layer = 20
|
||||
|
||||
x++
|
||||
if(x == 4)
|
||||
x = -4
|
||||
y++
|
||||
|
||||
else
|
||||
//Modules display is hidden
|
||||
//r.client.screen -= robot_inventory //"store" icon
|
||||
for(var/atom/A in r.module.modules)
|
||||
if( (A != r.module_state_1) && (A != r.module_state_2) && (A != r.module_state_3) )
|
||||
//Module is not currently active
|
||||
r.client.screen -= A
|
||||
r.shown_robot_modules = 0
|
||||
r.client.screen -= r.robot_modules_background
|
||||
|
||||
@@ -267,26 +267,40 @@
|
||||
if(C.internals)
|
||||
C.internals.icon_state = "internal0"
|
||||
else
|
||||
if(!istype(C.wear_mask, /obj/item/clothing/mask))
|
||||
C << "<span class='notice'>You are not wearing a mask.</span>"
|
||||
|
||||
var/no_mask
|
||||
if(!(C.wear_mask && C.wear_mask.flags & AIRTIGHT))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(!(H.head && H.head.flags & AIRTIGHT))
|
||||
no_mask = 1
|
||||
|
||||
if(no_mask)
|
||||
C << "<span class='notice'>You are not wearing a suitable mask or helmet.</span>"
|
||||
return 1
|
||||
else
|
||||
var/list/nicename = null
|
||||
var/list/tankcheck = null
|
||||
var/breathes = "oxygen" //default, we'll check later
|
||||
var/list/contents = list()
|
||||
var/from = "on"
|
||||
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
breathes = H.species.breath_type
|
||||
nicename = list ("suit", "back", "belt", "right hand", "left hand", "left pocket", "right pocket")
|
||||
tankcheck = list (H.s_store, C.back, H.belt, C.r_hand, C.l_hand, H.l_store, H.r_store)
|
||||
|
||||
else
|
||||
|
||||
nicename = list("Right Hand", "Left Hand", "Back")
|
||||
nicename = list("right hand", "left hand", "back")
|
||||
tankcheck = list(C.r_hand, C.l_hand, C.back)
|
||||
|
||||
// Rigs are a fucking pain since they keep an air tank in nullspace.
|
||||
if(istype(C.back,/obj/item/weapon/rig))
|
||||
var/obj/item/weapon/rig/rig = C.back
|
||||
if(rig.air_supply)
|
||||
from = "in"
|
||||
nicename |= "hardsuit"
|
||||
tankcheck |= rig.air_supply
|
||||
|
||||
for(var/i=1, i<tankcheck.len+1, ++i)
|
||||
if(istype(tankcheck[i], /obj/item/weapon/tank))
|
||||
var/obj/item/weapon/tank/t = tankcheck[i]
|
||||
@@ -335,7 +349,7 @@
|
||||
//We've determined the best container now we set it as our internals
|
||||
|
||||
if(best)
|
||||
C << "<span class='notice'>You are now running on internals from [tankcheck[best]] on your [nicename[best]].</span>"
|
||||
C << "<span class='notice'>You are now running on internals from [tankcheck[best]] [from] your [nicename[best]].</span>"
|
||||
C.internal = tankcheck[best]
|
||||
|
||||
|
||||
@@ -368,10 +382,21 @@
|
||||
usr.drop_item_v()
|
||||
|
||||
if("module")
|
||||
if(issilicon(usr))
|
||||
if(usr:module)
|
||||
if(isrobot(usr))
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
// if(R.module)
|
||||
// R.hud_used.toggle_show_robot_modules()
|
||||
// return 1
|
||||
R.pick_module()
|
||||
|
||||
if("inventory")
|
||||
if(isrobot(usr))
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
if(R.module)
|
||||
R.hud_used.toggle_show_robot_modules()
|
||||
return 1
|
||||
usr:pick_module()
|
||||
else
|
||||
R << "You haven't selected a module yet."
|
||||
|
||||
if("radio")
|
||||
if(issilicon(usr))
|
||||
@@ -381,8 +406,13 @@
|
||||
usr:installed_modules()
|
||||
|
||||
if("store")
|
||||
if(issilicon(usr))
|
||||
usr:uneq_active()
|
||||
if(isrobot(usr))
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
if(R.module)
|
||||
R.uneq_active()
|
||||
R.hud_used.update_robot_modules_display()
|
||||
else
|
||||
R << "You haven't selected a module yet."
|
||||
|
||||
if("module1")
|
||||
if(istype(usr, /mob/living/silicon/robot))
|
||||
|
||||
@@ -251,11 +251,11 @@ datum/controller/vote
|
||||
world << "<font color='purple'><b>[text]</b>\nType vote to place your votes.\nYou have [config.vote_period/10] seconds to vote.</font>"
|
||||
switch(vote_type)
|
||||
if("crew_transfer")
|
||||
world << sound('sound/ambience/alarm4.ogg', repeat = 0, wait = 0, volume = 50, channel = 1)
|
||||
world << sound('sound/ambience/alarm4.ogg', repeat = 0, wait = 0, volume = 50, channel = 3)
|
||||
if("gamemode")
|
||||
world << sound('sound/ambience/alarm4.ogg', repeat = 0, wait = 0, volume = 50, channel = 1)
|
||||
world << sound('sound/ambience/alarm4.ogg', repeat = 0, wait = 0, volume = 50, channel = 3)
|
||||
if("custom")
|
||||
world << sound('sound/ambience/alarm4.ogg', repeat = 0, wait = 0, volume = 50, channel = 1)
|
||||
world << sound('sound/ambience/alarm4.ogg', repeat = 0, wait = 0, volume = 50, channel = 3)
|
||||
if(mode == "gamemode" && going)
|
||||
going = 0
|
||||
world << "<font color='red'><b>Round start has been delayed.</b></font>"
|
||||
|
||||
@@ -182,7 +182,8 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
|
||||
|
||||
var/icon/eyes_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = H.species ? H.species.eyes : "eyes_s")
|
||||
|
||||
eyes_s.Blend(rgb(H.r_eyes, H.g_eyes, H.b_eyes), ICON_ADD)
|
||||
if (H.species.flags & HAS_EYE_COLOR)
|
||||
eyes_s.Blend(rgb(H.r_eyes, H.g_eyes, H.b_eyes), ICON_ADD)
|
||||
|
||||
var/datum/sprite_accessory/hair_style = hair_styles_list[H.h_style]
|
||||
if(hair_style)
|
||||
|
||||
@@ -73,13 +73,13 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
|
||||
if(!istype(usr, /mob/living/carbon/human))
|
||||
usr << "You aren't a human, Why are you trying to cast a human spell, silly non-human? Casting human spells is for humans."
|
||||
return 0
|
||||
if(!istype(usr:wear_suit, /obj/item/clothing/suit/wizrobe) && !istype(user:wear_suit, /obj/item/clothing/suit/space/rig/wizard))
|
||||
if(!istype(usr:wear_suit, /obj/item/clothing/suit/wizrobe) && !istype(user:wear_suit, /obj/item/clothing/suit/space/void/wizard))
|
||||
usr << "I don't feel strong enough without my robe."
|
||||
return 0
|
||||
if(!istype(usr:shoes, /obj/item/clothing/shoes/sandal))
|
||||
usr << "I don't feel strong enough without my sandals."
|
||||
return 0
|
||||
if(!istype(usr:head, /obj/item/clothing/head/wizard) && !istype(user:head, /obj/item/clothing/head/helmet/space/rig/wizard))
|
||||
if(!istype(usr:head, /obj/item/clothing/head/wizard) && !istype(user:head, /obj/item/clothing/head/helmet/space/void/wizard))
|
||||
usr << "I don't feel strong enough without my hat."
|
||||
return 0
|
||||
|
||||
|
||||
@@ -12,13 +12,8 @@ proc/process_med_hud(var/mob/M, var/local_scanner, var/mob/Alt)
|
||||
if(P.Mob.see_invisible < patient.invisibility)
|
||||
continue
|
||||
|
||||
if(!local_scanner)
|
||||
if(istype(patient.w_uniform, /obj/item/clothing/under))
|
||||
var/obj/item/clothing/under/U = patient.w_uniform
|
||||
if(U.sensor_mode < 2)
|
||||
continue
|
||||
else
|
||||
continue
|
||||
if(!(local_scanner || hassensorlevel(P, SUIT_SENSOR_VITAL)))
|
||||
continue
|
||||
|
||||
P.Client.images += patient.hud_list[HEALTH_HUD]
|
||||
if(local_scanner)
|
||||
|
||||
@@ -356,7 +356,6 @@
|
||||
if(player.current && !(istype(player.current,/mob/living/carbon/human))) return 0
|
||||
|
||||
//Ninja intro crawl goes here.
|
||||
|
||||
if(!config.objectives_disabled)
|
||||
player.objectives += new /datum/objective/ninja_highlander()
|
||||
player.objectives += new /datum/objective/survive()
|
||||
@@ -369,9 +368,6 @@
|
||||
var/mob/living/carbon/human/N = player.current
|
||||
N.internal = N.s_store
|
||||
N.internals.icon_state = "internal1"
|
||||
if(N.wear_suit && istype(N.wear_suit,/obj/item/clothing/suit/space/space_ninja))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = N.wear_suit
|
||||
S:randomize_param()
|
||||
|
||||
/datum/game_mode/calamity/proc/spawn_vox_raiders(var/list/candidates)
|
||||
|
||||
|
||||
@@ -1,404 +0,0 @@
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
+++++++++++++++++++++++++++++++++// //++++++++++++++++++++++++++++++++++
|
||||
==================================SPACE NINJA ABILITIES====================================
|
||||
___________________________________________________________________________________________
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
//=======//SAFETY CHECK//=======//
|
||||
/*
|
||||
X is optional, tells the proc to check for specific stuff. C is also optional.
|
||||
All the procs here assume that the character is wearing the ninja suit if they are using the procs.
|
||||
They should, as I have made every effort for that to be the case.
|
||||
In the case that they are not, I imagine the game will run-time error like crazy.
|
||||
s_cooldown ticks off each second based on the suit recharge proc, in seconds. Default of 1 seconds. Some abilities have no cool down.
|
||||
*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjacost(C = 0, X = 0)
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if( (U.stat||U.incorporeal_move)&&X!=3 )//Will not return if user is using an adrenaline booster since you can use them when stat==1.
|
||||
U << "\red You must be conscious and solid to do this."//It's not a problem of stat==2 since the ninja will explode anyway if they die.
|
||||
return 1
|
||||
else if(C&&cell.charge < C*10)
|
||||
U << "\red Not enough energy."
|
||||
return 1
|
||||
switch(X)
|
||||
if(1)
|
||||
cancel_stealth()//Get rid of it.
|
||||
if(2)
|
||||
if(s_bombs<=0)
|
||||
U << "\red There are no more smoke bombs remaining."
|
||||
return 1
|
||||
if(3)
|
||||
if(a_boost<=0)
|
||||
U << "\red You do not have any more adrenaline boosters."
|
||||
return 1
|
||||
if(s_coold)
|
||||
return s_coold
|
||||
cell.use(C*10)
|
||||
return 0
|
||||
|
||||
//=======//TELEPORT GRAB CHECK//=======//
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/handle_teleport_grab(turf/T, mob/living/U)
|
||||
if(istype(U.get_active_hand(),/obj/item/weapon/grab))//Handles grabbed persons.
|
||||
var/obj/item/weapon/grab/G = U.get_active_hand()
|
||||
G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position.
|
||||
if(istype(U.get_inactive_hand(),/obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = U.get_inactive_hand()
|
||||
G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position.
|
||||
return
|
||||
|
||||
//=======//SMOKE//=======//
|
||||
/*Summons smoke in radius of user.
|
||||
Not sure why this would be useful (it's not) but whatever. Ninjas need their smoke bombs.*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke()
|
||||
set name = "Smoke Bomb"
|
||||
set desc = "Blind your enemies momentarily with a well-placed smoke bomb."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0//Will not see it when right clicking.
|
||||
|
||||
if(!ninjacost(,2))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
U << "\blue There are <B>[s_bombs]</B> smoke bombs remaining."
|
||||
var/datum/effect/effect/system/smoke_spread/bad/smoke = new /datum/effect/effect/system/smoke_spread/bad()
|
||||
smoke.set_up(10, 0, U.loc)
|
||||
smoke.start()
|
||||
playsound(U.loc, 'sound/effects/bamf.ogg', 50, 2)
|
||||
s_bombs--
|
||||
s_coold = 1
|
||||
return
|
||||
|
||||
|
||||
//=======//PHASE SHIFT//=======//
|
||||
//Right click to teleport somewhere, almost exactly like admin jump to turf.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjashift(turf/T in oview())
|
||||
set name = "Phase Shift (400E)"
|
||||
set desc = "Utilizes the internal VOID-shift device to rapidly transit to a destination in view."
|
||||
set category = null//So it does not show up on the panel but can still be right-clicked.
|
||||
set src = usr.contents//Fixes verbs not attaching properly for objects. Praise the DM reference guide!
|
||||
|
||||
var/C = 40
|
||||
if(!ninjacost(C,1))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
|
||||
if((!T.density)&&istype(mobloc, /turf))
|
||||
spawn(0)
|
||||
playsound(U.loc, 'sound/effects/sparks4.ogg', 50, 1)
|
||||
anim(mobloc,src,'icons/mob/mob.dmi',,"phaseout",,U.dir)
|
||||
|
||||
handle_teleport_grab(T, U)
|
||||
U.loc = T
|
||||
s_coold = 1
|
||||
|
||||
spawn(0)
|
||||
spark_system.start()
|
||||
playsound(U.loc, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(U.loc, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
anim(U.loc,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
else
|
||||
U << "\red You cannot teleport into solid walls or from solid matter."
|
||||
return
|
||||
|
||||
//=======//PHASE JAUNT//=======//
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt()
|
||||
set name = "Phase Jaunt (250E)"
|
||||
set desc = "Utilizes the internal VOID-shift device to rapidly transit to a random destination straight ahead."
|
||||
set category = "Ninja Ability"
|
||||
|
||||
straight_phase()
|
||||
|
||||
//=======//EM PULSE//=======//
|
||||
//Disables nearby tech equipment.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse()
|
||||
set name = "EM Burst (2,000E)"
|
||||
set desc = "Disable any nearby technology with a electro-magnetic pulse."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 200
|
||||
if(!ninjacost(C,0)) // EMP's now cost 1,000Energy about 30%
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
playsound(U.loc, 'sound/effects/EMPulse.ogg', 60, 2)
|
||||
empulse(U, 2, 3) //Procs sure are nice. Slightly weaker than wizard's disable tch.
|
||||
s_coold = 2
|
||||
return
|
||||
|
||||
//=======//ENERGY BLADE//=======//
|
||||
//Summons a blade of energy in active hand.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjablade()
|
||||
set name = "Energy Blade (500E)"
|
||||
set desc = "Create a focused beam of energy in your active hand."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 50
|
||||
if(!ninjacost(C,0)) //Same spawn cost but higher upkeep cost
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if(!kamikaze)
|
||||
if(!U.get_active_hand()&&!istype(U.get_inactive_hand(), /obj/item/weapon/melee/energy/blade))
|
||||
var/obj/item/weapon/melee/energy/blade/W = new()
|
||||
spark_system.start()
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
U.put_in_hands(W)
|
||||
else
|
||||
U << "\red You can only summon one blade. Try dropping an item first."
|
||||
else//Else you can run around with TWO energy blades. I don't know why you'd want to but cool factor remains.
|
||||
if(!U.get_active_hand())
|
||||
var/obj/item/weapon/melee/energy/blade/W = new()
|
||||
U.put_in_hands(W)
|
||||
if(!U.get_inactive_hand())
|
||||
var/obj/item/weapon/melee/energy/blade/W = new()
|
||||
U.put_in_inactive_hand(W)
|
||||
spark_system.start()
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
s_coold = 1
|
||||
return
|
||||
|
||||
//=======//NINJA STARS//=======//
|
||||
/*Shoots ninja stars at random people.
|
||||
This could be a lot better but I'm too tired atm.*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjastar()
|
||||
set name = "Energy Star (800E)"
|
||||
set desc = "Launches an energy star at a random living target."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 80
|
||||
if(!ninjacost(C,1))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/targets[] = list()//So yo can shoot while yo throw dawg
|
||||
for(var/mob/living/M in oview(loc))
|
||||
if(M.stat) continue//Doesn't target corpses or paralyzed persons.
|
||||
targets.Add(M)
|
||||
if(targets.len)
|
||||
var/mob/living/target=pick(targets)//The point here is to pick a random, living mob in oview to shoot stuff at.
|
||||
|
||||
var/turf/curloc = U.loc
|
||||
var/atom/targloc = get_turf(target)
|
||||
if (!targloc || !istype(targloc, /turf) || !curloc)
|
||||
return
|
||||
if (targloc == curloc)
|
||||
return
|
||||
var/obj/item/projectile/energy/dart/A = new /obj/item/projectile/energy/dart(U.loc)
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
A.process()
|
||||
else
|
||||
U << "\red There are no targets in view."
|
||||
return
|
||||
|
||||
//=======//ENERGY NET//=======//
|
||||
/*Allows the ninja to capture people, I guess.
|
||||
Must right click on a mob to activate.*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjanet(mob/living/carbon/M in oview())//Only living carbon mobs.
|
||||
set name = "Energy Net (7,000E)"
|
||||
set desc = "Captures a fallen opponent in a net of energy. Will teleport them to a holding facility after 30 seconds."
|
||||
set category = null
|
||||
set src = usr.contents
|
||||
|
||||
var/C = 700
|
||||
if(!ninjacost(C,0)&&iscarbon(M))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if(M.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame.
|
||||
//if(M)//DEBUG
|
||||
if(!locate(/obj/effect/energy_net) in M.loc)//Check if they are already being affected by an energy net.
|
||||
for(var/turf/T in getline(U.loc, M.loc))
|
||||
if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy.
|
||||
U << "You may not use an energy net through solid obstacles!"
|
||||
return
|
||||
spawn(0)
|
||||
U.Beam(M,"n_beam",,15)
|
||||
M.captured = 1
|
||||
U.say("Get over here!")
|
||||
var/obj/effect/energy_net/E = new /obj/effect/energy_net(M.loc)
|
||||
E.layer = M.layer+1//To have it appear one layer above the mob.
|
||||
for(var/mob/O in viewers(U, 3))
|
||||
O.show_message(text("\red [] caught [] with an energy net!", U, M), 1)
|
||||
E.affecting = M
|
||||
E.master = U
|
||||
spawn(0)//Parallel processing.
|
||||
E.process(M)
|
||||
else
|
||||
U << "They are already trapped inside an energy net."
|
||||
else
|
||||
U << "They will bring no honor to your Clan!"
|
||||
return
|
||||
|
||||
//=======//ADRENALINE BOOST//=======//
|
||||
/*Wakes the user so they are able to do their thing. Also injects a decent dose of radium.
|
||||
Movement impairing would indicate drugs and the like.*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjaboost()
|
||||
set name = "Adrenaline Boost"
|
||||
set desc = "Inject a secret chemical that will counteract all movement-impairing effect."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
if(!ninjacost(,3))//Have to make sure stat is not counted for this ability.
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
//Wouldn't need to track adrenaline boosters if there was a miracle injection to get rid of paralysis and the like instantly.
|
||||
//For now, adrenaline boosters ARE the miracle injection. Well, radium, really.
|
||||
U.SetParalysis(0)
|
||||
U.SetWeakened(0)
|
||||
/*
|
||||
Due to lag, it was possible to adrenaline boost but remain helpless while life.dm resets player stat.
|
||||
This lead to me and others spamming adrenaline boosters because they failed to kick in on time.
|
||||
It's technically possible to come back from crit with this but it is very temporary.
|
||||
Life.dm will kick the player back into unconsciosness the next process loop.
|
||||
*/
|
||||
U.stat = 0//At least now you should be able to teleport away or shoot ninja stars.
|
||||
spawn(30)//Slight delay so the enemy does not immedietly know the ability was used. Due to lag, this often came before waking up.
|
||||
U.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!"))
|
||||
spawn(70)
|
||||
reagents.reaction(U, 2)
|
||||
reagents.trans_id_to(U, "radium", a_transfer)
|
||||
U << "\red You are beginning to feel the after-effect of the injection."
|
||||
a_boost--
|
||||
s_coold = 3
|
||||
return
|
||||
|
||||
/*
|
||||
===================================================================================
|
||||
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<KAMIKAZE MODE>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
===================================================================================
|
||||
Or otherwise known as anime mode. Which also happens to be ridiculously powerful.
|
||||
*/
|
||||
|
||||
//=======//NINJA MOVEMENT//=======//
|
||||
//Also makes you move like you're on crack.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjawalk()
|
||||
set name = "Shadow Walk"
|
||||
set desc = "Combines the VOID-shift and CLOAK-tech devices to freely move between solid matter. Toggle on or off."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if(!U.incorporeal_move)
|
||||
U.incorporeal_move = 2
|
||||
U << "\blue You will now phase through solid matter."
|
||||
else
|
||||
U.incorporeal_move = 0
|
||||
U << "\blue You will no-longer phase through solid matter."
|
||||
return
|
||||
|
||||
//=======//5 TILE TELEPORT/GIB//=======//
|
||||
//Allows to gib up to five squares in a straight line. Seriously.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer()
|
||||
set name = "Phase Slayer"
|
||||
set desc = "Utilizes the internal VOID-shift device to mutilate creatures in a straight line."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
if(straight_phase(1, 5, 5, 0))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
U.say("Ai Satsugai!")
|
||||
|
||||
//=======//TELEPORT BEHIND MOB//=======//
|
||||
/*Appear behind a randomly chosen mob while a few decoy teleports appear.
|
||||
This is so anime it hurts. But that's the point.*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjamirage()
|
||||
set name = "Spider Mirage"
|
||||
set desc = "Utilizes the internal VOID-shift device to create decoys and teleport behind a random target."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
if(!ninjacost())//Simply checks for stat.
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/targets[]
|
||||
targets = new()
|
||||
for(var/mob/living/M in oview(6))
|
||||
if(M.stat) continue//Doesn't target corpses or paralyzed people.
|
||||
targets.Add(M)
|
||||
if(targets.len)
|
||||
var/mob/living/target=pick(targets)
|
||||
var/locx
|
||||
var/locy
|
||||
var/turf/mobloc = get_turf(target.loc)
|
||||
var/safety = 0
|
||||
switch(target.dir)
|
||||
if(NORTH)
|
||||
locx = mobloc.x
|
||||
locy = (mobloc.y-1)
|
||||
if(locy<1)
|
||||
safety = 1
|
||||
if(SOUTH)
|
||||
locx = mobloc.x
|
||||
locy = (mobloc.y+1)
|
||||
if(locy>world.maxy)
|
||||
safety = 1
|
||||
if(EAST)
|
||||
locy = mobloc.y
|
||||
locx = (mobloc.x-1)
|
||||
if(locx<1)
|
||||
safety = 1
|
||||
if(WEST)
|
||||
locy = mobloc.y
|
||||
locx = (mobloc.x+1)
|
||||
if(locx>world.maxx)
|
||||
safety = 1
|
||||
else safety=1
|
||||
if(!safety&&istype(mobloc, /turf))
|
||||
U.say("Kumo no Shinkiro!")
|
||||
var/turf/picked = locate(locx,locy,mobloc.z)
|
||||
spawn(0)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(mobloc,U,'icons/mob/mob.dmi',,"phaseout",,U.dir)
|
||||
|
||||
spawn(0)
|
||||
var/limit = 4
|
||||
for(var/turf/T in oview(5))
|
||||
if(prob(20))
|
||||
spawn(0)
|
||||
anim(T,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
limit--
|
||||
if(limit<=0) break
|
||||
|
||||
handle_teleport_grab(picked, U)
|
||||
U.loc = picked
|
||||
U.dir = target.dir
|
||||
|
||||
spawn(0)
|
||||
spark_system.start()
|
||||
playsound(U.loc, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(U.loc,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
s_coold = 1
|
||||
else
|
||||
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
|
||||
else
|
||||
U << "\red There are no targets in view."
|
||||
return
|
||||
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/straight_phase(var/slay = 0, var/min_range=5, var/max_range = 9, var/cost = 25)
|
||||
if(!ninjacost(cost,1))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/turf/destination = get_teleport_loc(U.loc,U, rand(min_range, max_range))
|
||||
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
|
||||
if(destination && istype(mobloc, /turf))
|
||||
spawn(0)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(mobloc,U,'icons/mob/mob.dmi',,"phaseout",,U.dir)
|
||||
|
||||
if(slay)
|
||||
spawn(0)
|
||||
for(var/turf/T in getline(mobloc, destination))
|
||||
spawn(0)
|
||||
T.kill_creatures(U)
|
||||
if(T==mobloc||T==destination) continue
|
||||
spawn(0)
|
||||
anim(T,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
|
||||
handle_teleport_grab(destination, U)
|
||||
U.loc = destination
|
||||
s_coold = slay
|
||||
|
||||
spawn(0)
|
||||
spark_system.start()
|
||||
playsound(U.loc, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(U.loc,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
return 1
|
||||
else
|
||||
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
|
||||
return 0
|
||||
File diff suppressed because it is too large
Load Diff
@@ -208,7 +208,6 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
|
||||
//The ninja will be created on the right spawn point or at late join.
|
||||
var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(ninjastart.len ? ninjastart : latejoin))
|
||||
new_ninja.key = ninja_key
|
||||
new_ninja.wear_suit:randomize_param()//Give them a random set of suit parameters.
|
||||
new_ninja.internal = new_ninja.s_store //So the poor ninja has something to breath when they spawn in spess.
|
||||
new_ninja.internals.icon_state = "internal1"
|
||||
|
||||
@@ -446,14 +445,11 @@ As such, it's hard-coded for now. No reason for it not to be, really.
|
||||
if(confirm != "Yes") return
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
log_admin("[key_name(src)] turned [M.key] into a Space Ninja.")
|
||||
spawn(10)
|
||||
M:create_mind_space_ninja()
|
||||
M:equip_space_ninja(1)
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/space/space_ninja))
|
||||
M:wear_suit:randomize_param()
|
||||
spawn(0)
|
||||
M:wear_suit:ninitialize(10,M)
|
||||
H.create_mind_space_ninja()
|
||||
H.equip_space_ninja(1)
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
@@ -534,533 +530,9 @@ As such, it's hard-coded for now. No reason for it not to be, really.
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/color/blackf(src), slot_w_uniform)
|
||||
else
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/color/black(src), slot_w_uniform)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/space_ninja(src), slot_shoes)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/suit/space/space_ninja(src), slot_wear_suit)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/gloves/space_ninja(src), slot_gloves)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/space_ninja(src), slot_head)
|
||||
|
||||
equip_to_slot_or_del(new /obj/item/weapon/rig/light/ninja(src), slot_back)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/mask/gas/voice/space_ninja(src), slot_wear_mask)
|
||||
equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_belt)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/plastique(src), slot_r_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/plastique(src), slot_l_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/tank/oxygen(src), slot_s_store)
|
||||
return 1
|
||||
|
||||
//=======//HELPER PROCS//=======//
|
||||
|
||||
//Randomizes suit parameters.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/randomize_param()
|
||||
s_cost = rand(1,20)
|
||||
s_acost = rand(20,100)
|
||||
k_cost = rand(100,500)
|
||||
k_damage = rand(1,20)
|
||||
s_delay = rand(10,100)
|
||||
s_bombs = rand(5,20)
|
||||
a_boost = rand(1,7)
|
||||
|
||||
//This proc prevents the suit from being taken off.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/lock_suit(mob/living/carbon/U, X = 0)
|
||||
if(X)//If you want to check for icons.
|
||||
icon_state = U.gender==FEMALE ? "s-ninjanf" : "s-ninjan"
|
||||
U:gloves.icon_state = "s-ninjan"
|
||||
U:gloves.item_state = "s-ninjan"
|
||||
else
|
||||
if(U.mind.special_role!="Ninja")
|
||||
U << "\red <B>fÄTaL ÈÈRRoR</B>: 382200-*#00CÖDE <B>RED</B>\nUNAU†HORIZED USÈ DETÈC†††eD\nCoMMÈNCING SUB-R0U†IN3 13...\nTÈRMInATING U-U-USÈR..."
|
||||
U.gib()
|
||||
return 0
|
||||
if(!istype(U:head, /obj/item/clothing/head/helmet/space/space_ninja))
|
||||
U << "\red <B>ERROR</B>: 100113 \black UNABLE TO LOCATE HEAD GEAR\nABORTING..."
|
||||
return 0
|
||||
if(!istype(U:shoes, /obj/item/clothing/shoes/space_ninja))
|
||||
U << "\red <B>ERROR</B>: 122011 \black UNABLE TO LOCATE FOOT GEAR\nABORTING..."
|
||||
return 0
|
||||
if(!istype(U:gloves, /obj/item/clothing/gloves/space_ninja))
|
||||
U << "\red <B>ERROR</B>: 110223 \black UNABLE TO LOCATE HAND GEAR\nABORTING..."
|
||||
return 0
|
||||
|
||||
affecting = U
|
||||
canremove = 0
|
||||
slowdown = 0
|
||||
n_hood = U:head
|
||||
n_hood.canremove=0
|
||||
n_shoes = U:shoes
|
||||
n_shoes.canremove=0
|
||||
n_shoes.slowdown--
|
||||
n_gloves = U:gloves
|
||||
n_gloves.canremove=0
|
||||
|
||||
return 1
|
||||
|
||||
//This proc allows the suit to be taken off.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/unlock_suit()
|
||||
affecting = null
|
||||
canremove = 1
|
||||
slowdown = 1
|
||||
icon_state = "s-ninja"
|
||||
if(n_hood)//Should be attached, might not be attached.
|
||||
n_hood.canremove=1
|
||||
if(n_shoes)
|
||||
n_shoes.canremove=1
|
||||
n_shoes.slowdown++
|
||||
if(n_gloves)
|
||||
n_gloves.icon_state = "s-ninja"
|
||||
n_gloves.item_state = "s-ninja"
|
||||
n_gloves.canremove=1
|
||||
n_gloves.candrain=0
|
||||
n_gloves.draining=0
|
||||
|
||||
//Allows the mob to grab a stealth icon.
|
||||
/mob/proc/NinjaStealthActive(atom/A)//A is the atom which we are using as the overlay.
|
||||
invisibility = INVISIBILITY_LEVEL_TWO//Set ninja invis to 2.
|
||||
var/icon/opacity_icon = new(A.icon, A.icon_state)
|
||||
var/icon/alpha_mask = getIconMask(src)
|
||||
var/icon/alpha_mask_2 = new('icons/effects/effects.dmi', "at_shield1")
|
||||
alpha_mask.AddAlphaMask(alpha_mask_2)
|
||||
opacity_icon.AddAlphaMask(alpha_mask)
|
||||
for(var/i=0,i<5,i++)//And now we add it as overlays. It's faster than creating an icon and then merging it.
|
||||
var/image/I = image("icon" = opacity_icon, "icon_state" = A.icon_state, "layer" = layer+0.8)//So it's above other stuff but below weapons and the like.
|
||||
switch(i)//Now to determine offset so the result is somewhat blurred.
|
||||
if(1)
|
||||
I.pixel_x -= 1
|
||||
if(2)
|
||||
I.pixel_x += 1
|
||||
if(3)
|
||||
I.pixel_y -= 1
|
||||
if(4)
|
||||
I.pixel_y += 1
|
||||
|
||||
overlays += I//And finally add the overlay.
|
||||
overlays += image("icon"='icons/effects/effects.dmi',"icon_state" ="electricity","layer" = layer+0.9)
|
||||
|
||||
//When ninja steal malfunctions.
|
||||
/mob/proc/NinjaStealthMalf()
|
||||
invisibility = 0//Set ninja invis to 0.
|
||||
overlays += image("icon"='icons/effects/effects.dmi',"icon_state" ="electricity","layer" = layer+0.9)
|
||||
playsound(loc, 'sound/effects/stealthoff.ogg', 75, 1)
|
||||
|
||||
//=======//GENERIC VERB MODIFIERS//=======//
|
||||
var/list/ninja_verbs_default = list(
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjashift,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjaboost,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjablade,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjastar,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjanet,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt
|
||||
)
|
||||
|
||||
var/list/ninja_verbs_kamikaze = list(
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjaboost,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjablade,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjastar,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjawalk,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjamirage
|
||||
)
|
||||
|
||||
var/list/ninja_verbs_equip = list(
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/deinit,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/spideros,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/stealth
|
||||
)
|
||||
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/grant_equip_verbs()
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/init
|
||||
verbs |= ninja_verbs_equip
|
||||
|
||||
n_gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/toggled
|
||||
|
||||
s_initialized = 1
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/remove_equip_verbs()
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/init
|
||||
verbs -= ninja_verbs_equip
|
||||
|
||||
if(n_gloves)
|
||||
n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
|
||||
|
||||
s_initialized = 0
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/grant_ninja_verbs()
|
||||
verbs |= ninja_verbs_default
|
||||
|
||||
s_initialized=1
|
||||
slowdown=0
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/remove_ninja_verbs()
|
||||
verbs -= ninja_verbs_default
|
||||
|
||||
//=======//KAMIKAZE VERBS//=======//
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/grant_kamikaze(mob/living/carbon/U)
|
||||
verbs -= ninja_verbs_default
|
||||
verbs |= ninja_verbs_kamikaze
|
||||
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/stealth
|
||||
|
||||
kamikaze = 1
|
||||
|
||||
icon_state = U.gender==FEMALE ? "s-ninjakf" : "s-ninjak"
|
||||
if(n_gloves)
|
||||
n_gloves.icon_state = "s-ninjak"
|
||||
n_gloves.item_state = "s-ninjak"
|
||||
n_gloves.candrain = 0
|
||||
n_gloves.draining = 0
|
||||
n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
|
||||
|
||||
cancel_stealth()
|
||||
|
||||
U << browse(null, "window=spideros")
|
||||
U << "\red Do or Die, <b>LET'S ROCK!!</b>"
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/remove_kamikaze(mob/living/carbon/U)
|
||||
if(kamikaze)
|
||||
verbs -= ninja_verbs_kamikaze
|
||||
verbs += ninja_verbs_default
|
||||
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/stealth
|
||||
if(n_gloves)
|
||||
n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
|
||||
|
||||
U.incorporeal_move = 0
|
||||
kamikaze = 0
|
||||
k_unlock = 0
|
||||
U << "\blue Disengaging mode...\n\black<b>CODE NAME</b>: \red <b>KAMIKAZE</b>"
|
||||
|
||||
//=======//AI VERBS//=======//
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/grant_AI_verbs()
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_hack_ninja
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_return_control
|
||||
|
||||
s_busy = 0
|
||||
s_control = 0
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/remove_AI_verbs()
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_hack_ninja
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_return_control
|
||||
|
||||
s_control = 1
|
||||
|
||||
//=======//OLD & UNUSED//=======//
|
||||
|
||||
/*
|
||||
|
||||
Deprecated. get_dir() does the same thing. Still a nice proc.
|
||||
Returns direction that the mob or whomever should be facing in relation to the target.
|
||||
This proc does not grant absolute direction and is mostly useful for 8dir sprite positioning.
|
||||
I personally used it with getline() to great effect.
|
||||
/proc/get_dir_to(turf/start,turf/end)//N
|
||||
var/xdiff = start.x - end.x//The sign is important.
|
||||
var/ydiff = start.y - end.y
|
||||
|
||||
var/direction_x = xdiff<1 ? 4:8//East - west
|
||||
var/direction_y = ydiff<1 ? 1:2//North - south
|
||||
var/direction_xy = xdiff==0 ? -4:0//If x is the same, subtract 4.
|
||||
var/direction_yx = ydiff==0 ? -1:0//If y is the same, subtract 1.
|
||||
var/direction_f = direction_x+direction_y+direction_xy+direction_yx//Finally direction tally.
|
||||
direction_f = direction_f==0 ? 1:direction_f//If direction is 0(same spot), return north. Otherwise, direction.
|
||||
|
||||
return direction_f
|
||||
|
||||
Alternative and inferior method of calculating spideros.
|
||||
var/temp = num2text(spideros)
|
||||
var/return_to = copytext(temp, 1, (length(temp)))//length has to be to the length of the thing because by default it's length+1
|
||||
spideros = text2num(return_to)//Maximum length here is 6. Use (return_to, X) to specify larger strings if needed.
|
||||
|
||||
//Old way of draining from wire.
|
||||
/obj/item/clothing/gloves/space_ninja/proc/drain_wire()
|
||||
set name = "Drain From Wire"
|
||||
set desc = "Drain energy directly from an exposed wire."
|
||||
set category = "Ninja Equip"
|
||||
|
||||
var/obj/structure/cable/attached
|
||||
var/mob/living/carbon/human/U = loc
|
||||
if(candrain&&!draining)
|
||||
var/turf/T = U.loc
|
||||
if(isturf(T) && T.is_plating())
|
||||
attached = locate() in T
|
||||
if(!attached)
|
||||
U << "\red Warning: no exposed cable available."
|
||||
else
|
||||
U << "\blue Connecting to wire, stand still..."
|
||||
if(do_after(U,50)&&!isnull(attached))
|
||||
drain("WIRE",attached,U:wear_suit,src)
|
||||
else
|
||||
U << "\red Procedure interrupted. Protocol terminated."
|
||||
return
|
||||
|
||||
I've tried a lot of stuff but adding verbs to the AI while inside an object, inside another object, did not want to work properly.
|
||||
This was the best work-around I could come up with at the time. Uses objects to then display to panel, based on the object spell system.
|
||||
Can be added on to pretty easily.
|
||||
|
||||
BYOND fixed the verb bugs so this is no longer necessary. I prefer verb panels.
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/grant_AI_verbs()
|
||||
var/obj/effect/proc_holder/ai_return_control/A_C = new(AI)
|
||||
var/obj/effect/proc_holder/ai_hack_ninja/B_C = new(AI)
|
||||
var/obj/effect/proc_holder/ai_instruction/C_C = new(AI)
|
||||
new/obj/effect/proc_holder/ai_holo_clear(AI)
|
||||
AI.proc_holder_list += A_C
|
||||
AI.proc_holder_list += B_C
|
||||
AI.proc_holder_list += C_C
|
||||
|
||||
s_control = 0
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/remove_AI_verbs()
|
||||
var/obj/effect/proc_holder/ai_return_control/A_C = locate() in AI
|
||||
var/obj/effect/proc_holder/ai_hack_ninja/B_C = locate() in AI
|
||||
var/obj/effect/proc_holder/ai_instruction/C_C = locate() in AI
|
||||
var/obj/effect/proc_holder/ai_holo_clear/D_C = locate() in AI
|
||||
del(A_C)
|
||||
del(B_C)
|
||||
del(C_C)
|
||||
del(D_C)
|
||||
AI.proc_holder_list = list()
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/stealth
|
||||
|
||||
s_control = 1
|
||||
|
||||
//Workaround
|
||||
/obj/effect/proc_holder/ai_holo_clear
|
||||
name = "Clear Hologram"
|
||||
desc = "Stops projecting the current holographic image."
|
||||
panel = "AI Ninja Equip"
|
||||
density = 0
|
||||
opacity = 0
|
||||
|
||||
|
||||
/obj/effect/proc_holder/ai_holo_clear/Click()
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = loc.loc//This is so stupid but makes sure certain things work. AI.SUIT
|
||||
del(S.hologram.i_attached)
|
||||
del(S.hologram)
|
||||
var/obj/effect/proc_holder/ai_holo_clear/D_C = locate() in S.AI
|
||||
S.AI.proc_holder_list -= D_C
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/ai_instruction//Let's the AI know what they can do.
|
||||
name = "Instructions"
|
||||
desc = "Displays a list of helpful information."
|
||||
panel = "AI Ninja Equip"
|
||||
density = 0
|
||||
opacity = 0
|
||||
|
||||
/obj/effect/proc_holder/ai_instruction/Click()
|
||||
loc << "The menu you are seeing will contain other commands if they become available.\nRight click a nearby turf to display an AI Hologram. It will only be visible to you and your host. You can move it freely using normal movement keys--it will disappear if placed too far away."
|
||||
|
||||
/obj/effect/proc_holder/ai_hack_ninja//Generic proc holder to make sure the two verbs below work propely.
|
||||
name = "Hack SpiderOS"
|
||||
desc = "Hack directly into the Black Widow(tm) neuro-interface."
|
||||
panel = "AI Ninja Equip"
|
||||
density = 0
|
||||
opacity = 0
|
||||
|
||||
/obj/effect/proc_holder/ai_hack_ninja/Click()//When you click on it.
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = loc.loc
|
||||
S.hack_spideros()
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/ai_return_control
|
||||
name = "Relinquish Control"
|
||||
desc = "Return control to the user."
|
||||
panel = "AI Ninja Equip"
|
||||
density = 0
|
||||
opacity = 0
|
||||
|
||||
/obj/effect/proc_holder/ai_return_control/Click()
|
||||
var/mob/living/silicon/ai/A = loc
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = A.loc
|
||||
A << browse(null, "window=hack spideros")//Close window
|
||||
A << "You have seized your hacking attempt. [S.affecting] has regained control."
|
||||
S.affecting << "<b>UPDATE</b>: [A.real_name] has ceased hacking attempt. All systems clear."
|
||||
S.remove_AI_verbs()
|
||||
return
|
||||
*/
|
||||
|
||||
//=======//DEBUG//=======//
|
||||
/*
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/display_verb_procs()
|
||||
//DEBUG
|
||||
//Does nothing at the moment. I am trying to see if it's possible to mess around with verbs as variables.
|
||||
//for(var/P in verbs)
|
||||
// if(P.set.name)
|
||||
// usr << "[P.set.name], path: [P]"
|
||||
return
|
||||
|
||||
|
||||
Most of these are at various points of incomplete.
|
||||
|
||||
/mob/verb/grant_object_panel()
|
||||
set name = "Grant AI Ninja Verbs Debug"
|
||||
set category = "Ninja Debug"
|
||||
var/obj/effect/proc_holder/ai_return_control/A_C = new(src)
|
||||
var/obj/effect/proc_holder/ai_hack_ninja/B_C = new(src)
|
||||
usr:proc_holder_list += A_C
|
||||
usr:proc_holder_list += B_C
|
||||
|
||||
mob/verb/remove_object_panel()
|
||||
set name = "Remove AI Ninja Verbs Debug"
|
||||
set category = "Ninja Debug"
|
||||
var/obj/effect/proc_holder/ai_return_control/A = locate() in src
|
||||
var/obj/effect/proc_holder/ai_hack_ninja/B = locate() in src
|
||||
usr:proc_holder_list -= A
|
||||
usr:proc_holder_list -= B
|
||||
del(A)//First.
|
||||
del(B)//Second, to keep the proc going.
|
||||
return
|
||||
|
||||
/client/verb/grant_verb_ninja_debug1(var/mob/M in view())
|
||||
set name = "Grant AI Ninja Verbs Debug"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
M.verbs += /mob/living/silicon/ai/verb/ninja_return_control
|
||||
M.verbs += /mob/living/silicon/ai/verb/ninja_spideros
|
||||
return
|
||||
|
||||
/client/verb/grant_verb_ninja_debug2(var/mob/living/carbon/human/M in view())
|
||||
set name = "Grant Back Ninja Verbs"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
M.wear_suit.verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
|
||||
M.wear_suit.verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
|
||||
return
|
||||
|
||||
/obj/proc/grant_verb_ninja_debug3(var/mob/living/silicon/ai/A as mob)
|
||||
set name = "Grant AI Ninja Verbs"
|
||||
set category = "null"
|
||||
set hidden = 1
|
||||
A.verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit
|
||||
A.verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros
|
||||
return
|
||||
|
||||
/mob/verb/get_dir_to_target(var/mob/M in oview())
|
||||
set name = "Get Direction to Target"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
world << "DIR: [get_dir_to(src.loc,M.loc)]"
|
||||
return
|
||||
//
|
||||
/mob/verb/kill_self_debug()
|
||||
set name = "DEBUG Kill Self"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
src:death()
|
||||
|
||||
/client/verb/switch_client_debug()
|
||||
set name = "DEBUG Switch Client"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
mob = mob:loc:loc
|
||||
|
||||
/mob/verb/possess_mob(var/mob/M in oview())
|
||||
set name = "DEBUG Possess Mob"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
client.mob = M
|
||||
|
||||
/client/verb/switcharoo(var/mob/M in oview())
|
||||
set name = "DEBUG Switch to AI"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
var/mob/last_mob = mob
|
||||
mob = M
|
||||
last_mob:wear_suit:AI:key = key
|
||||
//
|
||||
/client/verb/ninjaget(var/mob/M in oview())
|
||||
set name = "DEBUG Ninja GET"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
mob = M
|
||||
M.gib()
|
||||
space_ninja()
|
||||
|
||||
/mob/verb/set_debug_ninja_target()
|
||||
set name = "Set Debug Target"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
ninja_debug_target = src//The target is you, brohime.
|
||||
world << "Target: [src]"
|
||||
|
||||
/mob/verb/hack_spideros_debug()
|
||||
set name = "Debug Hack Spider OS"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
var/mob/living/silicon/ai/A = loc:AI
|
||||
if(A)
|
||||
if(!A.key)
|
||||
A.client.mob = loc:affecting
|
||||
else
|
||||
loc:affecting:client:mob = A
|
||||
return
|
||||
|
||||
//Tests the net and what it does.
|
||||
/mob/verb/ninjanet_debug()
|
||||
set name = "Energy Net Debug"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
var/obj/effect/energy_net/E = new /obj/effect/energy_net(loc)
|
||||
E.layer = layer+1//To have it appear one layer above the mob.
|
||||
stunned = 10//So they are stunned initially but conscious.
|
||||
anchored = 1//Anchors them so they can't move.
|
||||
E.affecting = src
|
||||
spawn(0)//Parallel processing.
|
||||
E.process(src)
|
||||
return
|
||||
|
||||
I made this as a test for a possible ninja ability (or perhaps more) for a certain mob to see hallucinations.
|
||||
The thing here is that these guys have to be coded to do stuff as they are simply images that you can't even click on.
|
||||
That is why you attached them to objects.
|
||||
/mob/verb/TestNinjaShadow()
|
||||
set name = "Test Ninja Ability"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
if(client)
|
||||
var/safety = 4
|
||||
for(var/turf/T in oview(5))
|
||||
if(prob(20))
|
||||
var/current_clone = image('icons/mob/mob.dmi',T,"s-ninja")
|
||||
safety--
|
||||
spawn(0)
|
||||
src << current_clone
|
||||
spawn(300)
|
||||
del(current_clone)
|
||||
spawn while(!isnull(current_clone))
|
||||
step_to(current_clone,src,1)
|
||||
sleep(5)
|
||||
if(safety<=0) break
|
||||
return */
|
||||
|
||||
//Alternate ninja speech replacement.
|
||||
/*This text is hilarious but also absolutely retarded.
|
||||
message = replacetext(message, "l", "r")
|
||||
message = replacetext(message, "rr", "ru")
|
||||
message = replacetext(message, "v", "b")
|
||||
message = replacetext(message, "f", "hu")
|
||||
message = replacetext(message, "'t", "")
|
||||
message = replacetext(message, "t ", "to ")
|
||||
message = replacetext(message, " I ", " ai ")
|
||||
message = replacetext(message, "th", "z")
|
||||
message = replacetext(message, "ish", "isu")
|
||||
message = replacetext(message, "is", "izu")
|
||||
message = replacetext(message, "ziz", "zis")
|
||||
message = replacetext(message, "se", "su")
|
||||
message = replacetext(message, "br", "bur")
|
||||
message = replacetext(message, "ry", "ri")
|
||||
message = replacetext(message, "you", "yuu")
|
||||
message = replacetext(message, "ck", "cku")
|
||||
message = replacetext(message, "eu", "uu")
|
||||
message = replacetext(message, "ow", "au")
|
||||
message = replacetext(message, "are", "aa")
|
||||
message = replacetext(message, "ay", "ayu")
|
||||
message = replacetext(message, "ea", "ii")
|
||||
message = replacetext(message, "ch", "chi")
|
||||
message = replacetext(message, "than", "sen")
|
||||
message = replacetext(message, ".", "")
|
||||
message = lowertext(message)
|
||||
*/
|
||||
|
||||
@@ -151,7 +151,11 @@
|
||||
|
||||
var/list/area/escape_locations = list(/area/shuttle/escape/centcom, /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom)
|
||||
|
||||
var/pltext = "<font size=2><b>Player list:</b></font>"
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
if(M.mind)
|
||||
pltext += printplayer(M.mind)
|
||||
if(M.client)
|
||||
clients++
|
||||
if(ishuman(M))
|
||||
@@ -179,6 +183,15 @@
|
||||
if(isobserver(M))
|
||||
ghosts++
|
||||
|
||||
var/text = "A round of <b>[src.name]</b> has ended."
|
||||
if(surviving_total > 0)
|
||||
text += "<br>There [surviving_total>1 ? "were <b>[surviving_total] survivors</b>" : "was <b>one survivor</b>"]</b>"
|
||||
text += " (<b>[escaped_total>0 ? escaped_total : "none"] [emergency_shuttle.evac ? "escaped" : "transferred"]</b>) and <b>[ghosts] ghosts</b>.</b><br>"
|
||||
else
|
||||
text += "There were <b>no survivors</b> (<b>[ghosts] ghosts</b>).</b>"
|
||||
text += "<br>" + pltext //print player list after the general info
|
||||
world << text
|
||||
|
||||
if(clients > 0)
|
||||
feedback_set("round_end_clients",clients)
|
||||
if(ghosts > 0)
|
||||
@@ -515,7 +528,7 @@ proc/get_nt_opposed()
|
||||
|
||||
/datum/game_mode/proc/printplayer(var/datum/mind/ply)
|
||||
var/role = ply.assigned_role == "MODE" ? "\improper[ply.special_role]" : "\improper[ply.assigned_role]"
|
||||
var/text = "<br><b>[ply.name]</b>(<b>[ply.key]</b>) as \a <b>[role]</b> ("
|
||||
var/text = "<br><b>[ply.name]</b> (<b>[ply.key]</b>) as \a <b>[role]</b> ("
|
||||
if(ply.current)
|
||||
if(ply.current.stat == DEAD)
|
||||
text += "died"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
mode = M
|
||||
|
||||
proc/announce_directives()
|
||||
for (var/obj/machinery/faxmachine/fax in world)
|
||||
for (var/obj/machinery/photocopier/faxmachine/fax in world)
|
||||
if (fax.department == "Captain's Office")
|
||||
var/obj/item/weapon/paper/directive_x = new(fax.loc)
|
||||
directive_x.name = "emergency action message"
|
||||
|
||||
@@ -1331,11 +1331,13 @@ datum
|
||||
return 0
|
||||
if(!owner.current || owner.current.stat == 2)
|
||||
return 0
|
||||
if(!(istype(owner.current:wear_suit, /obj/item/clothing/suit/space/space_ninja)&&owner.current:wear_suit:s_initialized))
|
||||
return 0
|
||||
|
||||
var/current_amount
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = owner.current:wear_suit
|
||||
if(!S.stored_research.len)
|
||||
var/obj/item/weapon/rig/S
|
||||
if(istype(owner.current,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
S = H.back
|
||||
if(!S || !istype(S) || !S.stored_research.len)
|
||||
return 0
|
||||
else
|
||||
for(var/datum/tech/current_data in S.stored_research)
|
||||
|
||||
@@ -61,9 +61,7 @@
|
||||
var/mob/living/carbon/human/N = ninja.current
|
||||
N.internal = N.s_store
|
||||
N.internals.icon_state = "internal1"
|
||||
if(N.wear_suit && istype(N.wear_suit,/obj/item/clothing/suit/space/space_ninja))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = N.wear_suit
|
||||
S:randomize_param()
|
||||
|
||||
spawn (rand(waittime_l, waittime_h))
|
||||
send_intercept()
|
||||
return ..()
|
||||
|
||||
@@ -222,28 +222,6 @@ var/global/list/turf/synd_spawn = list()
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(synd_mob.back), slot_in_backpack)
|
||||
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/pill/cyanide(synd_mob), slot_in_backpack)
|
||||
|
||||
/* Commented; nukes now have a suit cycler for changing rig-suits, they don't need to spawn with them
|
||||
var/obj/item/clothing/suit/space/rig/syndi/new_suit = new(synd_mob)
|
||||
var/obj/item/clothing/head/helmet/space/rig/syndi/new_helmet = new(synd_mob)
|
||||
|
||||
if(synd_mob.species)
|
||||
|
||||
var/race = synd_mob.species.name
|
||||
|
||||
switch(race)
|
||||
if("Unathi")
|
||||
new_suit.species_restricted = list("Unathi")
|
||||
if("Tajara")
|
||||
new_suit.species_restricted = list("Tajara")
|
||||
if("Skrell")
|
||||
new_suit.species_restricted = list("Skrell")
|
||||
|
||||
synd_mob.equip_to_slot_or_del(new_suit, slot_in_backpack)
|
||||
synd_mob.equip_to_slot_or_del(new_helmet, slot_in_backpack)*/
|
||||
|
||||
// var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive(synd_mob)
|
||||
// E.imp_in = synd_mob
|
||||
// E.implanted = 1
|
||||
synd_mob.update_icons()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -488,7 +488,7 @@ datum/objective/steal
|
||||
"a functional AI" = /obj/item/device/aicard,
|
||||
"a pair of magboots" = /obj/item/clothing/shoes/magboots,
|
||||
"the station blueprints" = /obj/item/blueprints,
|
||||
"a nasa voidsuit" = /obj/item/clothing/suit/space/nasavoid,
|
||||
"a nasa voidsuit" = /obj/item/clothing/suit/space/void,
|
||||
"28 moles of phoron (full tank)" = /obj/item/weapon/tank,
|
||||
"a sample of slime extract" = /obj/item/slime_extract,
|
||||
"a piece of corgi meat" = /obj/item/weapon/reagent_containers/food/snacks/meat/corgi,
|
||||
@@ -571,16 +571,15 @@ datum/objective/steal
|
||||
return found_amount>=target
|
||||
|
||||
if("a functional AI")
|
||||
|
||||
for(var/obj/item/device/aicard/C in all_items) //Check for ai card
|
||||
for(var/mob/living/silicon/ai/M in C)
|
||||
if(istype(M, /mob/living/silicon/ai) && M.stat != 2) //See if any AI's are alive inside that card.
|
||||
return 1
|
||||
|
||||
for(var/obj/item/clothing/suit/space/space_ninja/S in all_items) //Let an AI downloaded into a space ninja suit count
|
||||
if(S.AI && S.AI.stat != 2)
|
||||
return 1
|
||||
for(var/mob/living/silicon/ai/ai in world)
|
||||
if(istype(ai.loc, /turf))
|
||||
var/turf/T = get_turf(ai)
|
||||
if(istype(T))
|
||||
var/area/check_area = get_area(ai)
|
||||
if(istype(check_area, /area/shuttle/escape/centcom))
|
||||
return 1
|
||||
@@ -613,19 +612,25 @@ datum/objective/download
|
||||
return 0
|
||||
if(!owner.current || owner.current.stat == 2)
|
||||
return 0
|
||||
if(!(istype(owner.current:wear_suit, /obj/item/clothing/suit/space/space_ninja)&&owner.current:wear_suit:s_initialized))
|
||||
return 0
|
||||
|
||||
var/current_amount
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = owner.current:wear_suit
|
||||
if(!S.stored_research.len)
|
||||
var/obj/item/weapon/rig/S
|
||||
if(istype(owner.current,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = owner.current
|
||||
S = H.back
|
||||
|
||||
if(!istype(S) || !S.installed_modules || !S.installed_modules.len)
|
||||
return 0
|
||||
else
|
||||
for(var/datum/tech/current_data in S.stored_research)
|
||||
if(current_data.level>1) current_amount+=(current_data.level-1)
|
||||
if(current_amount<target_amount) return 0
|
||||
return 1
|
||||
|
||||
var/obj/item/rig_module/datajack/stolen_data = locate() in S.installed_modules
|
||||
if(!istype(stolen_data))
|
||||
return 0
|
||||
|
||||
for(var/datum/tech/current_data in stolen_data.stored_research)
|
||||
if(current_data.level > 1)
|
||||
current_amount += (current_data.level-1)
|
||||
|
||||
return (current_amount<target_amount) ? 0 : 1
|
||||
|
||||
datum/objective/capture
|
||||
proc/gen_amount_goal()
|
||||
|
||||
@@ -181,8 +181,8 @@
|
||||
feedback_add_details("wizard_spell_learned","HS") //please do not change the abbreviation to keep data processing consistent. Add a unique id to any new spells
|
||||
new /obj/item/clothing/shoes/sandal(get_turf(H)) //In case they've lost them.
|
||||
new /obj/item/clothing/gloves/purple(get_turf(H))//To complete the outfit
|
||||
new /obj/item/clothing/suit/space/rig/wizard(get_turf(H))
|
||||
new /obj/item/clothing/head/helmet/space/rig/wizard(get_turf(H))
|
||||
new /obj/item/clothing/suit/space/void/wizard(get_turf(H))
|
||||
new /obj/item/clothing/head/helmet/space/void/wizard(get_turf(H))
|
||||
temp = "An artefact suit of armor that allows you to cast spells while providing more protection against attacks and the void of space."
|
||||
max_uses--
|
||||
if("staffanimation")
|
||||
|
||||
@@ -415,7 +415,17 @@
|
||||
return all_jobs
|
||||
|
||||
/proc/get_all_centcom_jobs()
|
||||
return list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer","BlackOps Commander","Supreme Commander")
|
||||
return list("VIP Guest",
|
||||
"Custodian",
|
||||
"Thunderdome Overseer",
|
||||
"Intel Officer",
|
||||
"Medical Officer",
|
||||
"Death Commando",
|
||||
"Research Officer",
|
||||
"BlackOps Commander",
|
||||
"Supreme Commander",
|
||||
"Emergency Response Team",
|
||||
"Emergency Response Team Leader")
|
||||
|
||||
proc/GetIdCard(var/mob/living/carbon/human/H)
|
||||
if(H.wear_id)
|
||||
|
||||
@@ -356,6 +356,8 @@ var/global/datum/controller/occupations/job_master
|
||||
if(job)
|
||||
|
||||
//Equip custom gear loadout.
|
||||
var/list/custom_equip_slots = list() //If more than one item takes the same slot, all after the first one spawn in storage.
|
||||
var/list/custom_equip_leftovers = list()
|
||||
if(H.client.prefs.gear && H.client.prefs.gear.len && job.title != "Cyborg" && job.title != "AI")
|
||||
|
||||
for(var/thing in H.client.prefs.gear)
|
||||
@@ -376,9 +378,12 @@ var/global/datum/controller/occupations/job_master
|
||||
H << "\red Your current job or whitelist status does not permit you to spawn with [thing]!"
|
||||
continue
|
||||
|
||||
if(G.slot)
|
||||
H.equip_to_slot_or_del(new G.path(H), G.slot)
|
||||
H << "\blue Equipping you with [thing]!"
|
||||
if(G.slot && !(G.slot in custom_equip_slots))
|
||||
if(H.equip_to_slot_or_del(new G.path(H), G.slot))
|
||||
H << "\blue Equipping you with [thing]!"
|
||||
custom_equip_slots.Add(G.slot)
|
||||
else
|
||||
custom_equip_leftovers.Add(thing)
|
||||
|
||||
else
|
||||
spawn_in_storage += thing
|
||||
@@ -387,6 +392,17 @@ var/global/datum/controller/occupations/job_master
|
||||
//Equip job items.
|
||||
job.equip(H)
|
||||
job.apply_fingerprints(H)
|
||||
//If some custom items could not be equipped before, try again now.
|
||||
for(var/thing in custom_equip_leftovers)
|
||||
var/datum/gear/G = gear_datums[thing]
|
||||
if(G.slot in custom_equip_slots)
|
||||
spawn_in_storage += thing
|
||||
else
|
||||
if(H.equip_to_slot_or_del(new G.path(H), G.slot))
|
||||
H << "\blue Equipping you with [thing]!"
|
||||
custom_equip_slots.Add(G.slot)
|
||||
else
|
||||
spawn_in_storage += thing
|
||||
else
|
||||
H << "Your job is [rank] and the game just can't handle it! Please report this bug to an administrator."
|
||||
|
||||
@@ -630,4 +646,4 @@ var/global/datum/controller/occupations/job_master
|
||||
else level4++ //not selected
|
||||
|
||||
tmp_str += "HIGH=[level1]|MEDIUM=[level2]|LOW=[level3]|NEVER=[level4]|BANNED=[level5]|YOUNG=[level6]|-"
|
||||
feedback_add_details("job_preferences",tmp_str)
|
||||
feedback_add_details("job_preferences",tmp_str)
|
||||
@@ -598,27 +598,27 @@ Toxins: <span class='dl[phoron_dangerlevel]'>[phoron_percent]</span>%<br>
|
||||
|
||||
return dat
|
||||
|
||||
/obj/machinery/alarm/proc/return_controls()
|
||||
/obj/machinery/alarm/proc/return_controls(var/source = src)
|
||||
var/output = ""//"<B>[alarm_zone] Air [name]</B><HR>"
|
||||
|
||||
switch(screen)
|
||||
if (AALARM_SCREEN_MAIN)
|
||||
if(alarm_area.atmosalm)
|
||||
output += "<a href='?src=\ref[src];atmos_reset=1'>Reset - Area Atmospheric Alarm</a><hr>"
|
||||
output += "<a href='?src=\ref[source];atmos_reset=1'>Reset - Area Atmospheric Alarm</a><hr>"
|
||||
else
|
||||
output += "<a href='?src=\ref[src];atmos_alarm=1'>Activate - Area Atmospheric Alarm</a><hr>"
|
||||
output += "<a href='?src=\ref[source];atmos_alarm=1'>Activate - Area Atmospheric Alarm</a><hr>"
|
||||
|
||||
output += {"
|
||||
<a href='?src=\ref[src];screen=[AALARM_SCREEN_SCRUB]'>Scrubbers Control</a><br>
|
||||
<a href='?src=\ref[src];screen=[AALARM_SCREEN_VENT]'>Vents Control</a><br>
|
||||
<a href='?src=\ref[src];screen=[AALARM_SCREEN_MODE]'>Set environmentals mode</a><br>
|
||||
<a href='?src=\ref[src];screen=[AALARM_SCREEN_SENSORS]'>Sensor Settings</a><br>
|
||||
<a href='?src=\ref[source];screen=[AALARM_SCREEN_SCRUB]'>Scrubbers Control</a><br>
|
||||
<a href='?src=\ref[source];screen=[AALARM_SCREEN_VENT]'>Vents Control</a><br>
|
||||
<a href='?src=\ref[source];screen=[AALARM_SCREEN_MODE]'>Set environmentals mode</a><br>
|
||||
<a href='?src=\ref[source];screen=[AALARM_SCREEN_SENSORS]'>Sensor Settings</a><br>
|
||||
<HR>
|
||||
"}
|
||||
if (mode==AALARM_MODE_PANIC)
|
||||
output += "<font color='red'><B>PANIC SYPHON ACTIVE</B></font><br><A href='?src=\ref[src];mode=[AALARM_MODE_SCRUBBING]'>Turn syphoning off</A>"
|
||||
output += "<font color='red'><B>PANIC SYPHON ACTIVE</B></font><br><A href='?src=\ref[source];mode=[AALARM_MODE_SCRUBBING]'>Turn syphoning off</A>"
|
||||
else
|
||||
output += "<A href='?src=\ref[src];mode=[AALARM_MODE_PANIC]'><font color='red'>ACTIVATE PANIC SYPHON IN AREA</font></A>"
|
||||
output += "<A href='?src=\ref[source];mode=[AALARM_MODE_PANIC]'><font color='red'>ACTIVATE PANIC SYPHON IN AREA</font></A>"
|
||||
|
||||
|
||||
if (AALARM_SCREEN_VENT)
|
||||
@@ -634,23 +634,23 @@ Toxins: <span class='dl[phoron_dangerlevel]'>[phoron_percent]</span>%<br>
|
||||
sensor_data += {"
|
||||
<B>[long_name]</B>[state]<BR>
|
||||
<B>Operating:</B>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=power;val=[!data["power"]]'>[data["power"]?"on":"off"]</A>
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=power;val=[!data["power"]]'>[data["power"]?"on":"off"]</A>
|
||||
<BR>
|
||||
<B>Pressure checks:</B>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=checks;val=[data["checks"]^1]' [(data["checks"]&1)?"style='font-weight:bold;'":""]>external</A>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=checks;val=[data["checks"]^2]' [(data["checks"]&2)?"style='font-weight:bold;'":""]>internal</A>
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=checks;val=[data["checks"]^1]' [(data["checks"]&1)?"style='font-weight:bold;'":""]>external</A>
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=checks;val=[data["checks"]^2]' [(data["checks"]&2)?"style='font-weight:bold;'":""]>internal</A>
|
||||
<BR>
|
||||
<B>External pressure bound:</B>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=-1000'>-</A>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=-100'>-</A>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=-10'>-</A>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=-1'>-</A>
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=-1000'>-</A>
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=-100'>-</A>
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=-10'>-</A>
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=-1'>-</A>
|
||||
[data["external"]]
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=+1'>+</A>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=+10'>+</A>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=+100'>+</A>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=adjust_external_pressure;val=+1000'>+</A>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=set_external_pressure;val=[ONE_ATMOSPHERE]'> (reset) </A>
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=+1'>+</A>
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=+10'>+</A>
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=+100'>+</A>
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=adjust_external_pressure;val=+1000'>+</A>
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=set_external_pressure;val=[ONE_ATMOSPHERE]'> (reset) </A>
|
||||
<BR>
|
||||
"}
|
||||
if (data["direction"] == "siphon")
|
||||
@@ -662,7 +662,7 @@ siphoning
|
||||
sensor_data += {"<HR>"}
|
||||
else
|
||||
sensor_data = "No vents connected.<BR>"
|
||||
output = {"<a href='?src=\ref[src];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>[sensor_data]"}
|
||||
output = {"<a href='?src=\ref[source];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>[sensor_data]"}
|
||||
if (AALARM_SCREEN_SCRUB)
|
||||
var/sensor_data = ""
|
||||
if(alarm_area.air_scrub_names.len)
|
||||
@@ -676,33 +676,33 @@ siphoning
|
||||
sensor_data += {"
|
||||
<B>[long_name]</B>[state]<BR>
|
||||
<B>Operating:</B>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=power;val=[!data["power"]]'>[data["power"]?"on":"off"]</A><BR>
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=power;val=[!data["power"]]'>[data["power"]?"on":"off"]</A><BR>
|
||||
<B>Type:</B>
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=scrubbing;val=[!data["scrubbing"]]'>[data["scrubbing"]?"scrubbing":"syphoning"]</A><BR>
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=scrubbing;val=[!data["scrubbing"]]'>[data["scrubbing"]?"scrubbing":"syphoning"]</A><BR>
|
||||
"}
|
||||
|
||||
if(data["scrubbing"])
|
||||
sensor_data += {"
|
||||
<B>Filtering:</B>
|
||||
Carbon Dioxide
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=co2_scrub;val=[!data["filter_co2"]]'>[data["filter_co2"]?"on":"off"]</A>;
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=co2_scrub;val=[!data["filter_co2"]]'>[data["filter_co2"]?"on":"off"]</A>;
|
||||
Toxins
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=tox_scrub;val=[!data["filter_phoron"]]'>[data["filter_phoron"]?"on":"off"]</A>;
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=tox_scrub;val=[!data["filter_phoron"]]'>[data["filter_phoron"]?"on":"off"]</A>;
|
||||
Nitrous Oxide
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=n2o_scrub;val=[!data["filter_n2o"]]'>[data["filter_n2o"]?"on":"off"]</A>
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=n2o_scrub;val=[!data["filter_n2o"]]'>[data["filter_n2o"]?"on":"off"]</A>
|
||||
<BR>
|
||||
"}
|
||||
sensor_data += {"
|
||||
<B>Panic syphon:</B> [data["panic"]?"<font color='red'><B>PANIC SYPHON ACTIVATED</B></font>":""]
|
||||
<A href='?src=\ref[src];id_tag=[id_tag];command=panic_siphon;val=[!data["panic"]]'><font color='[(data["panic"]?"blue'>Dea":"red'>A")]ctivate</font></A><BR>
|
||||
<A href='?src=\ref[source];id_tag=[id_tag];command=panic_siphon;val=[!data["panic"]]'><font color='[(data["panic"]?"blue'>Dea":"red'>A")]ctivate</font></A><BR>
|
||||
<HR>
|
||||
"}
|
||||
else
|
||||
sensor_data = "No scrubbers connected.<BR>"
|
||||
output = {"<a href='?src=\ref[src];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>[sensor_data]"}
|
||||
output = {"<a href='?src=\ref[source];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>[sensor_data]"}
|
||||
|
||||
if (AALARM_SCREEN_MODE)
|
||||
output += "<a href='?src=\ref[src];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br><b>Air machinery mode for the area:</b><ul>"
|
||||
output += "<a href='?src=\ref[source];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br><b>Air machinery mode for the area:</b><ul>"
|
||||
var/list/modes = list(AALARM_MODE_SCRUBBING = "Filtering - Scrubs out contaminants",\
|
||||
AALARM_MODE_REPLACEMENT = "<font color='blue'>Replace Air - Siphons out air while replacing</font>",\
|
||||
AALARM_MODE_PANIC = "<font color='red'>Panic - Siphons air out of the room</font>",\
|
||||
@@ -711,14 +711,14 @@ Nitrous Oxide
|
||||
AALARM_MODE_OFF = "<font color='blue'>Off - Shuts off vents and scrubbers</font>",)
|
||||
for (var/m=1,m<=modes.len,m++)
|
||||
if (mode==m)
|
||||
output += "<li><A href='?src=\ref[src];mode=[m]'><b>[modes[m]]</b></A> (selected)</li>"
|
||||
output += "<li><A href='?src=\ref[source];mode=[m]'><b>[modes[m]]</b></A> (selected)</li>"
|
||||
else
|
||||
output += "<li><A href='?src=\ref[src];mode=[m]'>[modes[m]]</A></li>"
|
||||
output += "<li><A href='?src=\ref[source];mode=[m]'>[modes[m]]</A></li>"
|
||||
output += "</ul>"
|
||||
|
||||
if (AALARM_SCREEN_SENSORS)
|
||||
output += {"
|
||||
<a href='?src=\ref[src];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>
|
||||
<a href='?src=\ref[source];screen=[AALARM_SCREEN_MAIN]'>Main menu</a><br>
|
||||
<b>Alarm thresholds:</b><br>
|
||||
Partial pressure for gases
|
||||
<style>/* some CSS woodoo here. Does not work perfect in ie6 but who cares? */
|
||||
@@ -744,25 +744,25 @@ table tr:first-child th:first-child { border: none;}
|
||||
output += "<TR><th>[gases[g]]</th>"
|
||||
selected = TLV[g]
|
||||
for(var/i = 1, i <= 4, i++)
|
||||
output += "<td><A href='?src=\ref[src];command=set_threshold;env=[g];var=[i]'>[selected[i] >= 0 ? selected[i] :"OFF"]</A></td>"
|
||||
output += "<td><A href='?src=\ref[source];command=set_threshold;env=[g];var=[i]'>[selected[i] >= 0 ? selected[i] :"OFF"]</A></td>"
|
||||
output += "</TR>"
|
||||
|
||||
selected = TLV["pressure"]
|
||||
output += " <TR><th>Pressure</th>"
|
||||
for(var/i = 1, i <= 4, i++)
|
||||
output += "<td><A href='?src=\ref[src];command=set_threshold;env=pressure;var=[i]'>[selected[i] >= 0 ? selected[i] :"OFF"]</A></td>"
|
||||
output += "<td><A href='?src=\ref[source];command=set_threshold;env=pressure;var=[i]'>[selected[i] >= 0 ? selected[i] :"OFF"]</A></td>"
|
||||
output += "</TR>"
|
||||
|
||||
selected = TLV["temperature"]
|
||||
output += "<TR><th>Temperature</th>"
|
||||
for(var/i = 1, i <= 4, i++)
|
||||
output += "<td><A href='?src=\ref[src];command=set_threshold;env=temperature;var=[i]'>[selected[i] >= 0 ? selected[i] :"OFF"]</A></td>"
|
||||
output += "<td><A href='?src=\ref[source];command=set_threshold;env=temperature;var=[i]'>[selected[i] >= 0 ? selected[i] :"OFF"]</A></td>"
|
||||
output += "</TR></table>"
|
||||
|
||||
return output
|
||||
|
||||
/obj/machinery/alarm/Topic(href, href_list)
|
||||
if(..() || !( Adjacent(usr) || istype(usr, /mob/living/silicon)) ) // dont forget calling super in machine Topics -walter0o
|
||||
/obj/machinery/alarm/Topic(href, href_list, var/nowindow = 0, var/remote = 0)
|
||||
if(..(href, href_list, nowindow, !remote) || !( Adjacent(usr) || nowindow || istype(usr, /mob/living/silicon)) ) // dont forget calling super in machine Topics -walter0o
|
||||
usr.machine = null
|
||||
usr << browse(null, "window=air_alarm")
|
||||
usr << browse(null, "window=AAlarmwires")
|
||||
@@ -796,7 +796,7 @@ table tr:first-child th:first-child { border: none;}
|
||||
target_temperature = input_temperature + T0C
|
||||
|
||||
// hrefs that need the AA unlocked -walter0o
|
||||
if(!locked || istype(usr, /mob/living/silicon))
|
||||
if(!locked || remote || istype(usr, /mob/living/silicon))
|
||||
|
||||
if(href_list["command"])
|
||||
var/device_id = href_list["id_tag"]
|
||||
@@ -819,7 +819,7 @@ table tr:first-child th:first-child { border: none;}
|
||||
var/list/selected = TLV[env]
|
||||
var/list/thresholds = list("lower bound", "low warning", "high warning", "upper bound")
|
||||
var/newval = input("Enter [thresholds[threshold]] for [env]", "Alarm triggers", selected[threshold]) as null|num
|
||||
if (isnull(newval) || ..() || (locked && issilicon(usr)))
|
||||
if (isnull(newval))
|
||||
return
|
||||
if (newval<0)
|
||||
selected[threshold] = -1.0
|
||||
@@ -887,18 +887,11 @@ table tr:first-child th:first-child { border: none;}
|
||||
mode = text2num(href_list["mode"])
|
||||
apply_mode()
|
||||
|
||||
updateUsrDialog()
|
||||
if(!nowindow)
|
||||
updateUsrDialog()
|
||||
|
||||
|
||||
/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob)
|
||||
/* if (istype(W, /obj/item/weapon/wirecutters))
|
||||
stat ^= BROKEN
|
||||
add_fingerprint(user)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\red [] has []activated []!", user, (stat&BROKEN) ? "de" : "re", src), 1)
|
||||
update_icon()
|
||||
return
|
||||
*/
|
||||
src.add_fingerprint(user)
|
||||
|
||||
switch(buildstage)
|
||||
|
||||
@@ -311,6 +311,7 @@ update_flag
|
||||
release_log += "Valve was <b>opened</b> by [usr] ([usr.ckey]), starting the transfer into the [holding]<br>"
|
||||
else
|
||||
release_log += "Valve was <b>opened</b> by [usr] ([usr.ckey]), starting the transfer into the <font color='red'><b>air</b></font><br>"
|
||||
log_open()
|
||||
valve_open = !valve_open
|
||||
|
||||
if (href_list["remove_tank"])
|
||||
|
||||
@@ -184,3 +184,16 @@
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/portable_atmospherics/proc/log_open()
|
||||
if(air_contents.gas.len == 0)
|
||||
return
|
||||
|
||||
var/gases = ""
|
||||
for(var/gas in air_contents.gas)
|
||||
if(gases)
|
||||
gases += ", [gas]"
|
||||
else
|
||||
gases = gas
|
||||
log_admin("[usr] ([usr.ckey]) opened '[src.name]' containing [gases].")
|
||||
message_admins("[usr] ([usr.ckey]) opened '[src.name]' containing [gases].")
|
||||
|
||||
@@ -136,8 +136,10 @@
|
||||
//Cameras can't track people wearing an agent card or a ninja hood.
|
||||
if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
|
||||
continue
|
||||
if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja))
|
||||
continue
|
||||
if(istype(H.head, /obj/item/clothing/head/helmet/space/rig))
|
||||
var/obj/item/clothing/head/helmet/space/rig/helmet = H.head
|
||||
if(helmet.prevent_track())
|
||||
continue
|
||||
|
||||
// Now, are they viewable by a camera? (This is last because it's the most intensive check)
|
||||
if(!near_camera(M))
|
||||
@@ -186,9 +188,6 @@
|
||||
var/mob/living/silicon/ai/U = usr
|
||||
|
||||
U.cameraFollow = target
|
||||
//U << text("Now tracking [] on camera.", target.name)
|
||||
//if (U.machine == null)
|
||||
// U.machine = U
|
||||
U << "Now tracking [target.name] on camera."
|
||||
|
||||
spawn (0)
|
||||
@@ -200,9 +199,11 @@
|
||||
if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate))
|
||||
U.ai_cancel_tracking(1)
|
||||
return
|
||||
if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja))
|
||||
U.ai_cancel_tracking(1)
|
||||
return
|
||||
if(istype(H.head, /obj/item/clothing/head/helmet/space/rig))
|
||||
var/obj/item/clothing/head/helmet/space/rig/helmet = H.head
|
||||
if(helmet.prevent_track())
|
||||
U.ai_cancel_tracking(1)
|
||||
return
|
||||
if(H.digitalcamo)
|
||||
U.ai_cancel_tracking(1)
|
||||
return
|
||||
@@ -211,7 +212,7 @@
|
||||
U.ai_cancel_tracking()
|
||||
return
|
||||
|
||||
if (!near_camera(target))
|
||||
if (!trackable(target))
|
||||
U << "Target is not near any active cameras."
|
||||
sleep(100)
|
||||
continue
|
||||
@@ -234,6 +235,9 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/proc/trackable(var/mob/living/M)
|
||||
return near_camera(M) || (M.loc.z in config.station_levels && hassensorlevel(M, SUIT_SENSOR_TRACKING))
|
||||
|
||||
/obj/machinery/camera/attack_ai(var/mob/living/silicon/ai/user as mob)
|
||||
if (!istype(user))
|
||||
return
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
|
||||
/obj/structure/AIcore/attackby(obj/item/P as obj, mob/user as mob)
|
||||
|
||||
switch(state)
|
||||
if(0)
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
@@ -117,7 +118,6 @@
|
||||
laws.clear_inherent_laws()
|
||||
usr << "Law module applied."
|
||||
|
||||
|
||||
if(istype(P, /obj/item/weapon/aiModule/freeform))
|
||||
var/obj/item/weapon/aiModule/freeform/M = P
|
||||
laws.add_inherent_law(M.newFreeFormLaw)
|
||||
@@ -180,212 +180,40 @@
|
||||
anchored = 1
|
||||
state = 20//So it doesn't interact based on the above. Not really necessary.
|
||||
|
||||
attackby(var/obj/item/device/aicard/A as obj, var/mob/user as mob)
|
||||
if(istype(A, /obj/item/device/aicard))//Is it?
|
||||
A.transfer_ai("INACTIVE","AICARD",src,user)
|
||||
/obj/structure/AIcore/deactivated/proc/load_ai(var/mob/living/silicon/ai/transfer, var/obj/item/device/aicard/card, var/mob/user)
|
||||
|
||||
if(!istype(transfer) || locate(/mob/living/silicon/ai) in src)
|
||||
return
|
||||
|
||||
/*
|
||||
This is a good place for AI-related object verbs so I'm sticking it here.
|
||||
If adding stuff to this, don't forget that an AI need to cancel_camera() whenever it physically moves to a different location.
|
||||
That prevents a few funky behaviors.
|
||||
*/
|
||||
//What operation to perform based on target, what ineraction to perform based on object used, target itself, user. The object used is src and calls this proc.
|
||||
/obj/item/proc/transfer_ai(var/choice as text, var/interaction as text, var/target, var/mob/U as mob)
|
||||
if(!src:flush)
|
||||
switch(choice)
|
||||
if("AICORE")//AI mob.
|
||||
var/mob/living/silicon/ai/T = target
|
||||
switch(interaction)
|
||||
if("AICARD")
|
||||
var/obj/item/device/aicard/C = src
|
||||
if(C.contents.len)//If there is an AI on card.
|
||||
U << "\red <b>Transfer failed</b>: \black Existing AI found on this terminal. Remove existing AI to install a new one."
|
||||
else
|
||||
if (ticker.mode.name == "AI malfunction")
|
||||
var/datum/game_mode/malfunction/malf = ticker.mode
|
||||
for (var/datum/mind/malfai in malf.malf_ai)
|
||||
if (T.mind == malfai)
|
||||
U << "\red <b>ERROR</b>: \black Remote transfer interface disabled."//Do ho ho ho~
|
||||
return
|
||||
new /obj/structure/AIcore/deactivated(T.loc)//Spawns a deactivated terminal at AI location.
|
||||
T.aiRestorePowerRoutine = 0//So the AI initially has power.
|
||||
T.control_disabled = 1//Can't control things remotely if you're stuck in a card!
|
||||
T.loc = C//Throw AI into the card.
|
||||
C.name = "inteliCard - [T.name]"
|
||||
if (T.stat == 2)
|
||||
C.icon_state = "aicard-404"
|
||||
else
|
||||
C.icon_state = "aicard-full"
|
||||
T.cancel_camera()
|
||||
T << "You have been downloaded to a mobile storage device. Remote device connection severed."
|
||||
U << "\blue <b>Transfer successful</b>: \black [T.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
||||
if("NINJASUIT")
|
||||
var/obj/item/clothing/suit/space/space_ninja/C = src
|
||||
if(C.AI)//If there is an AI on card.
|
||||
U << "\red <b>Transfer failed</b>: \black Existing AI found on this terminal. Remove existing AI to install a new one."
|
||||
else
|
||||
if (ticker.mode.name == "AI malfunction")
|
||||
var/datum/game_mode/malfunction/malf = ticker.mode
|
||||
for (var/datum/mind/malfai in malf.malf_ai)
|
||||
if (T.mind == malfai)
|
||||
U << "\red <b>ERROR</b>: \black Remote transfer interface disabled."
|
||||
return
|
||||
if(T.stat)//If the ai is dead/dying.
|
||||
U << "\red <b>ERROR</b>: \black [T.name] data core is corrupted. Unable to install."
|
||||
else
|
||||
new /obj/structure/AIcore/deactivated(T.loc)
|
||||
T.aiRestorePowerRoutine = 0
|
||||
T.control_disabled = 1
|
||||
T.aiRadio.disabledAi = 1
|
||||
T.loc = C
|
||||
C.AI = T
|
||||
T.cancel_camera()
|
||||
T << "You have been downloaded to a mobile storage device. Remote device connection severed."
|
||||
U << "\blue <b>Transfer successful</b>: \black [T.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
||||
transfer.aiRestorePowerRoutine = 0
|
||||
transfer.control_disabled = 0
|
||||
transfer.aiRadio.disabledAi = 0
|
||||
transfer.loc = get_turf(src)
|
||||
transfer.cancel_camera()
|
||||
user << "\blue <b>Transfer successful</b>: \black [transfer.name] ([rand(1000,9999)].exe) downloaded to host terminal. Local copy wiped."
|
||||
transfer << "You have been uploaded to a stationary terminal. Remote device connection restored."
|
||||
|
||||
if("INACTIVE")//Inactive AI object.
|
||||
var/obj/structure/AIcore/deactivated/T = target
|
||||
switch(interaction)
|
||||
if("AICARD")
|
||||
var/obj/item/device/aicard/C = src
|
||||
var/mob/living/silicon/ai/A = locate() in C//I love locate(). Best proc ever.
|
||||
if(A)//If AI exists on the card. Else nothing since both are empty.
|
||||
A.control_disabled = 0
|
||||
A.aiRadio.disabledAi = 0
|
||||
A.loc = T.loc//To replace the terminal.
|
||||
C.icon_state = "aicard"
|
||||
C.name = "inteliCard"
|
||||
C.overlays.Cut()
|
||||
A.cancel_camera()
|
||||
A << "You have been uploaded to a stationary terminal. Remote device connection restored."
|
||||
U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed."
|
||||
del(T)
|
||||
if("NINJASUIT")
|
||||
var/obj/item/clothing/suit/space/space_ninja/C = src
|
||||
var/mob/living/silicon/ai/A = C.AI
|
||||
if(A)
|
||||
A.control_disabled = 0
|
||||
C.AI = null
|
||||
A.loc = T.loc
|
||||
A.cancel_camera()
|
||||
A << "You have been uploaded to a stationary terminal. Remote device connection restored."
|
||||
U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
|
||||
del(T)
|
||||
if("AIFIXER")//AI Fixer terminal.
|
||||
var/obj/machinery/computer/aifixer/T = target
|
||||
switch(interaction)
|
||||
if("AICARD")
|
||||
var/obj/item/device/aicard/C = src
|
||||
if(!T.contents.len)
|
||||
if (!C.contents.len)
|
||||
U << "No AI to copy over!"//Well duh
|
||||
else for(var/mob/living/silicon/ai/A in C)
|
||||
C.icon_state = "aicard"
|
||||
C.name = "inteliCard"
|
||||
C.overlays.Cut()
|
||||
A.loc = T
|
||||
T.occupant = A
|
||||
A.control_disabled = 1
|
||||
if (A.stat == 2)
|
||||
T.overlays += image('icons/obj/computer.dmi', "ai-fixer-404")
|
||||
else
|
||||
T.overlays += image('icons/obj/computer.dmi', "ai-fixer-full")
|
||||
T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-empty")
|
||||
A.cancel_camera()
|
||||
A << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here."
|
||||
U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
|
||||
else
|
||||
if(!C.contents.len && T.occupant && !T.active)
|
||||
C.name = "inteliCard - [T.occupant.name]"
|
||||
T.overlays += image('icons/obj/computer.dmi', "ai-fixer-empty")
|
||||
if (T.occupant.stat == 2)
|
||||
C.icon_state = "aicard-404"
|
||||
T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-404")
|
||||
else
|
||||
C.icon_state = "aicard-full"
|
||||
T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-full")
|
||||
T.occupant << "You have been downloaded to a mobile storage device. Still no remote access."
|
||||
U << "\blue <b>Transfer successful</b>: \black [T.occupant.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
||||
T.occupant.loc = C
|
||||
T.occupant.cancel_camera()
|
||||
T.occupant = null
|
||||
else if (C.contents.len)
|
||||
U << "\red <b>ERROR</b>: \black Artificial intelligence detected on terminal."
|
||||
else if (T.active)
|
||||
U << "\red <b>ERROR</b>: \black Reconstruction in progress."
|
||||
else if (!T.occupant)
|
||||
U << "\red <b>ERROR</b>: \black Unable to locate artificial intelligence."
|
||||
if("NINJASUIT")
|
||||
var/obj/item/clothing/suit/space/space_ninja/C = src
|
||||
if(!T.contents.len)
|
||||
if (!C.AI)
|
||||
U << "No AI to copy over!"
|
||||
else
|
||||
var/mob/living/silicon/ai/A = C.AI
|
||||
A.loc = T
|
||||
T.occupant = A
|
||||
C.AI = null
|
||||
A.control_disabled = 1
|
||||
T.overlays += image('icons/obj/computer.dmi', "ai-fixer-full")
|
||||
T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-empty")
|
||||
A.cancel_camera()
|
||||
A << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here."
|
||||
U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
|
||||
else
|
||||
if(!C.AI && T.occupant && !T.active)
|
||||
if (T.occupant.stat)
|
||||
U << "\red <b>ERROR</b>: \black [T.occupant.name] data core is corrupted. Unable to install."
|
||||
else
|
||||
T.overlays += image('icons/obj/computer.dmi', "ai-fixer-empty")
|
||||
T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-full")
|
||||
T.occupant << "You have been downloaded to a mobile storage device. Still no remote access."
|
||||
U << "\blue <b>Transfer successful</b>: \black [T.occupant.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
||||
T.occupant.loc = C
|
||||
T.occupant.cancel_camera()
|
||||
T.occupant = null
|
||||
else if (C.AI)
|
||||
U << "\red <b>ERROR</b>: \black Artificial intelligence detected on terminal."
|
||||
else if (T.active)
|
||||
U << "\red <b>ERROR</b>: \black Reconstruction in progress."
|
||||
else if (!T.occupant)
|
||||
U << "\red <b>ERROR</b>: \black Unable to locate artificial intelligence."
|
||||
if("NINJASUIT")//Ninjasuit
|
||||
var/obj/item/clothing/suit/space/space_ninja/T = target
|
||||
switch(interaction)
|
||||
if("AICARD")
|
||||
var/obj/item/device/aicard/C = src
|
||||
if(T.s_initialized&&U==T.affecting)//If the suit is initialized and the actor is the user.
|
||||
if(card)
|
||||
card.clear()
|
||||
|
||||
var/mob/living/silicon/ai/A_T = locate() in C//Determine if there is an AI on target card. Saves time when checking later.
|
||||
var/mob/living/silicon/ai/A = T.AI//Deterine if there is an AI in suit.
|
||||
del(src)
|
||||
|
||||
if(A)//If the host AI card is not empty.
|
||||
if(A_T)//If there is an AI on the target card.
|
||||
U << "\red <b>ERROR</b>: \black [A_T.name] already installed. Remove [A_T.name] to install a new one."
|
||||
else
|
||||
A.loc = C//Throw them into the target card. Since they are already on a card, transfer is easy.
|
||||
C.name = "inteliCard - [A.name]"
|
||||
C.icon_state = "aicard-full"
|
||||
T.AI = null
|
||||
A.cancel_camera()
|
||||
A << "You have been uploaded to a mobile storage device."
|
||||
U << "\blue <b>SUCCESS</b>: \black [A.name] ([rand(1000,9999)].exe) removed from host and stored within local memory."
|
||||
else//If host AI is empty.
|
||||
if(C.flush)//If the other card is flushing.
|
||||
U << "\red <b>ERROR</b>: \black AI flush is in progress, cannot execute transfer protocol."
|
||||
else
|
||||
if(A_T&&!A_T.stat)//If there is an AI on the target card and it's not inactive.
|
||||
A_T.loc = T//Throw them into suit.
|
||||
C.icon_state = "aicard"
|
||||
C.name = "inteliCard"
|
||||
C.overlays.Cut()
|
||||
T.AI = A_T
|
||||
A_T.cancel_camera()
|
||||
A_T << "You have been uploaded to a mobile storage device."
|
||||
U << "\blue <b>SUCCESS</b>: \black [A_T.name] ([rand(1000,9999)].exe) removed from local memory and installed to host."
|
||||
else if(A_T)//If the target AI is dead. Else just go to return since nothing would happen if both are empty.
|
||||
U << "\red <b>ERROR</b>: \black [A_T.name] data core is corrupted. Unable to install."
|
||||
else
|
||||
U << "\red <b>ERROR</b>: \black AI flush is in progress, cannot execute transfer protocol."
|
||||
return
|
||||
/obj/structure/AIcore/deactivated/proc/check_malf(var/mob/living/silicon/ai/ai)
|
||||
if(!ai) return
|
||||
if (ticker.mode.name == "AI malfunction")
|
||||
var/datum/game_mode/malfunction/malf = ticker.mode
|
||||
for (var/datum/mind/malfai in malf.malf_ai)
|
||||
if (ai.mind == malfai)
|
||||
return 1
|
||||
|
||||
/obj/structure/AIcore/deactivated/attackby(var/obj/item/device/aicard/card, var/mob/user)
|
||||
|
||||
if(istype(card))
|
||||
var/mob/living/silicon/ai/transfer = locate() in card
|
||||
if(transfer)
|
||||
load_ai(transfer,card,user)
|
||||
else
|
||||
user << "\red <b>ERROR</b>: \black Unable to locate artificial intelligence."
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
@@ -8,16 +8,51 @@
|
||||
var/active = 0
|
||||
|
||||
/obj/machinery/computer/aifixer/New()
|
||||
src.overlays += image('icons/obj/computer.dmi', "ai-fixer-empty")
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/aifixer/proc/load_ai(var/mob/living/silicon/ai/transfer, var/obj/item/device/aicard/card, var/mob/user)
|
||||
|
||||
if(!transfer)
|
||||
return
|
||||
|
||||
// Transfer over the AI.
|
||||
transfer << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here."
|
||||
user << "\blue <b>Transfer successful</b>: \black [transfer.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
|
||||
|
||||
transfer.loc = src
|
||||
transfer.cancel_camera()
|
||||
transfer.control_disabled = 1
|
||||
occupant = transfer
|
||||
|
||||
if(card)
|
||||
card.clear()
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/aifixer/attackby(I as obj, user as mob)
|
||||
if(istype(I, /obj/item/device/aicard))
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
user << "This terminal isn't functioning right now, get it working!"
|
||||
return
|
||||
I:transfer_ai("AIFIXER","AICARD",src,user)
|
||||
|
||||
if(istype(I, /obj/item/device/aicard))
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
user << "This terminal isn't functioning right now."
|
||||
return
|
||||
|
||||
var/obj/item/device/aicard/card = I
|
||||
var/mob/living/silicon/ai/comp_ai = locate() in src
|
||||
var/mob/living/silicon/ai/card_ai = locate() in card
|
||||
|
||||
if(istype(comp_ai))
|
||||
if(active)
|
||||
user << "\red <b>ERROR</b>: \black Reconstruction in progress."
|
||||
return
|
||||
card.grab_ai(comp_ai, user)
|
||||
if(!(locate(/mob/living/silicon/ai) in src)) occupant = null
|
||||
else if(istype(card_ai))
|
||||
load_ai(card_ai,card,user)
|
||||
occupant = locate(/mob/living/silicon/ai) in src
|
||||
|
||||
update_icon()
|
||||
return
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -109,17 +144,16 @@
|
||||
|
||||
/obj/machinery/computer/aifixer/update_icon()
|
||||
..()
|
||||
// Broken / Unpowered
|
||||
if((stat & BROKEN) || (stat & NOPOWER))
|
||||
overlays.Cut()
|
||||
|
||||
// Working / Powered
|
||||
else
|
||||
if (occupant)
|
||||
switch (occupant.stat)
|
||||
if (0)
|
||||
overlays += image('icons/obj/computer.dmi', "ai-fixer-full")
|
||||
if (2)
|
||||
overlays += image('icons/obj/computer.dmi', "ai-fixer-404")
|
||||
overlays.Cut()
|
||||
|
||||
if((stat & BROKEN) || (stat & NOPOWER))
|
||||
return
|
||||
|
||||
if(occupant)
|
||||
if(occupant.stat)
|
||||
overlays += image('icons/obj/computer.dmi', "ai-fixer-404")
|
||||
else
|
||||
overlays += image('icons/obj/computer.dmi', "ai-fixer-empty")
|
||||
overlays += image('icons/obj/computer.dmi', "ai-fixer-full")
|
||||
else
|
||||
overlays += image('icons/obj/computer.dmi', "ai-fixer-empty")
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
origin_tech = "programming=2;powerstorage=2"
|
||||
/obj/item/weapon/circuitboard/powermonitor
|
||||
name = "Circuit board (Power Monitor)"
|
||||
build_path = /obj/machinery/power/monitor
|
||||
build_path = /obj/machinery/computer/power_monitor
|
||||
/obj/item/weapon/circuitboard/olddoor
|
||||
name = "Circuit board (DoorMex)"
|
||||
build_path = /obj/machinery/computer/pod/old
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
/obj/machinery/door/bullet_act(var/obj/item/projectile/Proj)
|
||||
..()
|
||||
|
||||
|
||||
//Tasers and the like should not damage doors.
|
||||
if(Proj.damage_type == HALLOSS)
|
||||
return
|
||||
@@ -191,7 +191,8 @@
|
||||
open()
|
||||
operating = -1
|
||||
return 1
|
||||
if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card))
|
||||
//psa to whoever coded this, there are plenty of objects that need to call attack() on doors without bludgeoning them.
|
||||
if(src.density && istype(I, /obj/item/weapon) && user.a_intent == "hurt" && !istype(I, /obj/item/weapon/card))
|
||||
var/obj/item/weapon/W = I
|
||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
||||
if(W.force < min_force)
|
||||
|
||||
@@ -111,6 +111,23 @@ Class Procs:
|
||||
var/manual = 0
|
||||
var/global/gl_uid = 1
|
||||
|
||||
/obj/machinery/drain_power(var/drain_check)
|
||||
|
||||
if(drain_check)
|
||||
return 1
|
||||
|
||||
if(!powered())
|
||||
return 0
|
||||
|
||||
var/area/area = get_area(src)
|
||||
if(!area)
|
||||
return 0
|
||||
|
||||
var/obj/machinery/power/apc/apc = area.get_apc()
|
||||
if(!apc)
|
||||
return 0
|
||||
return apc.drain_power()
|
||||
|
||||
/obj/machinery/New()
|
||||
..()
|
||||
if(!machinery_sort_required && ticker)
|
||||
@@ -180,7 +197,7 @@ Class Procs:
|
||||
/obj/machinery/proc/inoperable(var/additional_flags = 0)
|
||||
return (stat & (NOPOWER|BROKEN|additional_flags))
|
||||
|
||||
/obj/machinery/Topic(href, href_list)
|
||||
/obj/machinery/Topic(href, href_list, var/nowindow = 0, var/checkrange = 1)
|
||||
if(..())
|
||||
return 1
|
||||
if(inoperable())
|
||||
@@ -201,7 +218,7 @@ Class Procs:
|
||||
else if(istype(H.r_hand, /obj/item/tk_grab))
|
||||
norange = 1
|
||||
|
||||
if(!norange)
|
||||
if(checkrange && !norange)
|
||||
if ((!in_range(src, usr) || !istype(src.loc, /turf)) && !istype(usr, /mob/living/silicon))
|
||||
return 1
|
||||
|
||||
@@ -273,6 +290,12 @@ Class Procs:
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
if (electrocute_mob(user, get_area(src), src, 0.7))
|
||||
var/area/temp_area = get_area(src)
|
||||
if(temp_area && temp_area.master)
|
||||
var/obj/machinery/power/apc/temp_apc = temp_area.master.get_apc()
|
||||
|
||||
if(temp_apc && temp_apc.terminal && temp_apc.terminal.powernet)
|
||||
temp_apc.terminal.powernet.trigger_warning()
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -573,7 +573,7 @@
|
||||
/obj/machinery/suit_cycler
|
||||
|
||||
name = "suit cycler"
|
||||
desc = "An industrial machine for painting and refitting hardsuits."
|
||||
desc = "An industrial machine for painting and refitting voidsuits."
|
||||
anchored = 1
|
||||
density = 1
|
||||
|
||||
@@ -589,7 +589,7 @@
|
||||
var/model_text = "" // Some flavour text for the topic box.
|
||||
var/locked = 1 // If locked, nothing can be taken from or added to the cycler.
|
||||
var/panel_open = 0 // Hacking!
|
||||
var/can_repair // If set, the cycler can repair hardsuits.
|
||||
var/can_repair // If set, the cycler can repair voidsuits.
|
||||
var/electrified = 0
|
||||
|
||||
//Departments that the cycler can paint suits to look like.
|
||||
@@ -601,7 +601,7 @@
|
||||
var/target_species
|
||||
|
||||
var/mob/living/carbon/human/occupant = null
|
||||
var/obj/item/clothing/suit/space/rig/suit = null
|
||||
var/obj/item/clothing/suit/space/void/suit = null
|
||||
var/obj/item/clothing/head/helmet/space/helmet = null
|
||||
|
||||
var/datum/wires/suit_storage_unit/wires = null
|
||||
@@ -676,14 +676,14 @@
|
||||
return
|
||||
|
||||
if(locked)
|
||||
user << "\red The suit cycler is locked."
|
||||
user << "<span class='danger'>The suit cycler is locked.</span>"
|
||||
return
|
||||
|
||||
if(src.contents.len > 0)
|
||||
user << "\red There is no room inside the cycler for [G.affecting.name]."
|
||||
user << "<span class='danger'>There is no room inside the cycler for [G.affecting.name].</span>"
|
||||
return
|
||||
|
||||
visible_message("[user] starts putting [G.affecting.name] into the suit cycler.", 3)
|
||||
visible_message("[user] starts putting [G.affecting.name] into the suit cycler.</span>", 3)
|
||||
|
||||
if(do_after(user, 20))
|
||||
if(!G || !G.affecting) return
|
||||
@@ -710,7 +710,7 @@
|
||||
else if(istype(I,/obj/item/weapon/card/emag))
|
||||
|
||||
if(emagged)
|
||||
user << "\red The cycler has already been subverted."
|
||||
user << "<span class='danger'>The cycler has already been subverted.</span>"
|
||||
return
|
||||
|
||||
var/obj/item/weapon/card/emag/E = I
|
||||
@@ -718,21 +718,21 @@
|
||||
E.uses--
|
||||
|
||||
//Clear the access reqs, disable the safeties, and open up all paintjobs.
|
||||
user << "\red You run the sequencer across the interface, corrupting the operating protocols."
|
||||
user << "<span class='danger'>You run the sequencer across the interface, corrupting the operating protocols.</span>"
|
||||
departments = list("Engineering","Mining","Medical","Security","Atmos","^%###^%$")
|
||||
emagged = 1
|
||||
safeties = 0
|
||||
req_access = list()
|
||||
return
|
||||
|
||||
else if(istype(I,/obj/item/clothing/head/helmet/space))
|
||||
else if(istype(I,/obj/item/clothing/head/helmet/space) && !istype(I, /obj/item/clothing/head/helmet/space/rig))
|
||||
|
||||
if(locked)
|
||||
user << "\red The suit cycler is locked."
|
||||
user << "<span class='danger'>The suit cycler is locked.</span>"
|
||||
return
|
||||
|
||||
if(helmet)
|
||||
user << "The cycler already contains a helmet."
|
||||
user << "<span class='danger'>The cycler already contains a helmet.</span>"
|
||||
return
|
||||
|
||||
user << "You fit \the [I] into the suit cycler."
|
||||
@@ -744,24 +744,14 @@
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
else if(istype(I,/obj/item/clothing/suit/space/rig))
|
||||
else if(istype(I,/obj/item/clothing/suit/space/void))
|
||||
|
||||
if(locked)
|
||||
user << "\red The suit cycler is locked."
|
||||
user << "<span class='danger'>The suit cycler is locked.</span>"
|
||||
return
|
||||
|
||||
if(suit)
|
||||
user << "The cycler already contains a hardsuit."
|
||||
return
|
||||
|
||||
var/obj/item/clothing/suit/space/rig/S = I
|
||||
|
||||
if(S.helmet)
|
||||
user << "\The [S] will not fit into the cycler with a helmet attached."
|
||||
return
|
||||
|
||||
if(S.boots)
|
||||
user << "\The [S] will not fit into the cycler with boots attached."
|
||||
user << "<span class='danger'>The cycler already contains a voidsuit.</span>"
|
||||
return
|
||||
|
||||
user << "You fit \the [I] into the suit cycler."
|
||||
@@ -874,12 +864,12 @@
|
||||
locked = !locked
|
||||
usr << "You [locked ? "" : "un"]lock \the [src]."
|
||||
else
|
||||
usr << "\red Access denied."
|
||||
usr << "<span class='danger'>Access denied.</span>"
|
||||
|
||||
else if(href_list["begin_decontamination"])
|
||||
|
||||
if(safeties && occupant)
|
||||
usr << "\red The cycler has detected an occupant. Please remove the occupant before commencing the decontamination cycle."
|
||||
usr << "<span class='danger'>The cycler has detected an occupant. Please remove the occupant before commencing the decontamination cycle.</span>"
|
||||
return
|
||||
|
||||
active = 1
|
||||
@@ -993,63 +983,63 @@
|
||||
switch(target_department)
|
||||
if("Engineering")
|
||||
if(helmet)
|
||||
helmet.name = "engineering hardsuit helmet"
|
||||
helmet.name = "engineering voidsuit helmet"
|
||||
helmet.icon_state = "rig0-engineering"
|
||||
helmet.item_state = "eng_helm"
|
||||
helmet.item_color = "engineering"
|
||||
if(suit)
|
||||
suit.name = "engineering hardsuit"
|
||||
suit.name = "engineering voidsuit"
|
||||
suit.icon_state = "rig-engineering"
|
||||
suit.item_state = "eng_hardsuit"
|
||||
suit.item_state = "eng_voidsuit"
|
||||
if("Mining")
|
||||
if(helmet)
|
||||
helmet.name = "mining hardsuit helmet"
|
||||
helmet.name = "mining voidsuit helmet"
|
||||
helmet.icon_state = "rig0-mining"
|
||||
helmet.item_state = "mining_helm"
|
||||
helmet.item_color = "mining"
|
||||
if(suit)
|
||||
suit.name = "mining hardsuit"
|
||||
suit.name = "mining voidsuit"
|
||||
suit.icon_state = "rig-mining"
|
||||
suit.item_state = "mining_hardsuit"
|
||||
suit.item_state = "mining_voidsuit"
|
||||
if("Medical")
|
||||
if(helmet)
|
||||
helmet.name = "medical hardsuit helmet"
|
||||
helmet.name = "medical voidsuit helmet"
|
||||
helmet.icon_state = "rig0-medical"
|
||||
helmet.item_state = "medical_helm"
|
||||
helmet.item_color = "medical"
|
||||
if(suit)
|
||||
suit.name = "medical hardsuit"
|
||||
suit.name = "medical voidsuit"
|
||||
suit.icon_state = "rig-medical"
|
||||
suit.item_state = "medical_hardsuit"
|
||||
suit.item_state = "medical_voidsuit"
|
||||
if("Security")
|
||||
if(helmet)
|
||||
helmet.name = "security hardsuit helmet"
|
||||
helmet.name = "security voidsuit helmet"
|
||||
helmet.icon_state = "rig0-sec"
|
||||
helmet.item_state = "sec_helm"
|
||||
helmet.item_color = "sec"
|
||||
if(suit)
|
||||
suit.name = "security hardsuit"
|
||||
suit.name = "security voidsuit"
|
||||
suit.icon_state = "rig-sec"
|
||||
suit.item_state = "sec_hardsuit"
|
||||
suit.item_state = "sec_voidsuit"
|
||||
if("Atmos")
|
||||
if(helmet)
|
||||
helmet.name = "atmospherics hardsuit helmet"
|
||||
helmet.name = "atmospherics voidsuit helmet"
|
||||
helmet.icon_state = "rig0-atmos"
|
||||
helmet.item_state = "atmos_helm"
|
||||
helmet.item_color = "atmos"
|
||||
if(suit)
|
||||
suit.name = "atmospherics hardsuit"
|
||||
suit.name = "atmospherics voidsuit"
|
||||
suit.icon_state = "rig-atmos"
|
||||
suit.item_state = "atmos_hardsuit"
|
||||
suit.item_state = "atmos_voidsuit"
|
||||
if("^%###^%$" || "Mercenary")
|
||||
if(helmet)
|
||||
helmet.name = "blood-red hardsuit helmet"
|
||||
helmet.name = "blood-red voidsuit helmet"
|
||||
helmet.icon_state = "rig0-syndie"
|
||||
helmet.item_state = "syndie_helm"
|
||||
helmet.item_color = "syndie"
|
||||
if(suit)
|
||||
suit.name = "blood-red hardsuit"
|
||||
suit.item_state = "syndie_hardsuit"
|
||||
suit.name = "blood-red voidsuit"
|
||||
suit.item_state = "syndie_voidsuit"
|
||||
suit.icon_state = "rig-syndie"
|
||||
|
||||
if(helmet) helmet.name = "refitted [helmet.name]"
|
||||
|
||||
@@ -69,6 +69,16 @@
|
||||
var/max_equip = 3
|
||||
var/datum/events/events
|
||||
|
||||
/obj/mecha/drain_power(var/drain_check)
|
||||
|
||||
if(drain_check)
|
||||
return 1
|
||||
|
||||
if(!cell)
|
||||
return 0
|
||||
|
||||
return cell.drain_power(drain_check)
|
||||
|
||||
/obj/mecha/New()
|
||||
..()
|
||||
events = new
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
holder.icon_state = "hudhealth-100"
|
||||
C.images += holder
|
||||
else
|
||||
holder.icon_state = "hud[RoundHealth(patient.health)]"
|
||||
holder.icon_state = "hud[RoundHealth((patient.health-config.health_threshold_crit)/(patient.species.total_health-config.health_threshold_crit)*100)]"
|
||||
C.images += holder
|
||||
|
||||
holder = patient.hud_list[STATUS_HUD]
|
||||
|
||||
@@ -223,7 +223,13 @@ steam.start() -- spawns the effect
|
||||
/obj/effect/effect/smoke/proc/affect(var/mob/living/carbon/M)
|
||||
if (istype(M))
|
||||
return 0
|
||||
if (M.internal != null && M.wear_mask && (M.wear_mask.flags & MASKINTERNALS))
|
||||
if (M.internal != null)
|
||||
if(M.wear_mask && (M.wear_mask.flags & AIRTIGHT))
|
||||
return 0
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.head && (H.head.flags & AIRTIGHT))
|
||||
return 0
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -150,6 +150,16 @@
|
||||
user.put_in_active_hand(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/attack_ai(mob/user as mob)
|
||||
if (istype(src.loc, /obj/item/weapon/robot_module))
|
||||
//If the item is part of a cyborg module, equip it
|
||||
if(!isrobot(user))
|
||||
return
|
||||
var/mob/living/silicon/robot/R = user
|
||||
R.activate_module(src)
|
||||
R.hud_used.update_robot_modules_display()
|
||||
|
||||
// Due to storage type consolidation this should get used more now.
|
||||
// I have cleaned it up a little, but it could probably use more. -Sayu
|
||||
/obj/item/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -251,6 +261,9 @@
|
||||
if(slot_wear_mask)
|
||||
if(H.wear_mask)
|
||||
return 0
|
||||
if(H.head && !(H.head.canremove) && (H.head.flags & HEADCOVERSMOUTH))
|
||||
H << "\red \The [H.head] is in the way."
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_MASK) )
|
||||
return 0
|
||||
return 1
|
||||
@@ -291,6 +304,9 @@
|
||||
if(slot_glasses)
|
||||
if(H.glasses)
|
||||
return 0
|
||||
if(H.head && !(H.head.canremove) && (H.head.flags & HEADCOVERSEYES))
|
||||
H << "\red \The [H.head] is in the way."
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_EYES) )
|
||||
return 0
|
||||
return 1
|
||||
@@ -391,6 +407,19 @@
|
||||
if(B.contents.len < B.storage_slots && w_class <= B.max_w_class)
|
||||
return 1
|
||||
return 0
|
||||
if(slot_tie)
|
||||
if(!H.w_uniform && (slot_w_uniform in mob_equip))
|
||||
if(!disable_warning)
|
||||
H << "\red You need a jumpsuit before you can attach this [name]."
|
||||
return 0
|
||||
var/obj/item/clothing/under/uniform = H.w_uniform
|
||||
if(uniform.hastie)
|
||||
if (!disable_warning)
|
||||
H << "\red You already have [uniform.hastie] attached to your [uniform]."
|
||||
return 0
|
||||
if( !(slot_flags & SLOT_TIE) )
|
||||
return 0
|
||||
return 1
|
||||
return 0 //Unsupported slot
|
||||
//END HUMAN
|
||||
|
||||
|
||||
@@ -263,10 +263,11 @@
|
||||
|
||||
|
||||
/* Power Monitor (Mode: 43 / 433) */
|
||||
/*
|
||||
if(mode==43 || mode==433)
|
||||
var/pMonData[0]
|
||||
var/apcData[0]
|
||||
for(var/obj/machinery/power/monitor/pMon in world)
|
||||
for(var/obj/machinery/computer/power_monitor/pMon in world)
|
||||
if(!(pMon.stat & (NOPOWER|BROKEN)) )
|
||||
var/turf/monitorturf = locate(pMon.x,pMon.y,pMon.z)
|
||||
var/area/monitorarea = monitorturf.loc
|
||||
@@ -293,7 +294,7 @@
|
||||
values["apcs"] = apcData
|
||||
else
|
||||
values["powerconnected"] = 0
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -592,10 +593,12 @@
|
||||
updateSelfDialog()
|
||||
else
|
||||
post_status(href_list["statdisp"])
|
||||
/*
|
||||
if("Power Select")
|
||||
var/pref = href_list["target"]
|
||||
powmonitor = locate(pref)
|
||||
loc:mode = 433
|
||||
mode = 433
|
||||
´*/
|
||||
|
||||
return 1
|
||||
|
||||
@@ -9,124 +9,168 @@
|
||||
var/flush = null
|
||||
origin_tech = "programming=4;materials=4"
|
||||
|
||||
/obj/item/device/aicard/attack(mob/living/silicon/decoy/M as mob, mob/user as mob)
|
||||
if (!istype (M, /mob/living/silicon/decoy))
|
||||
return ..()
|
||||
else
|
||||
M.death()
|
||||
user << "<b>ERROR ERROR ERROR</b>"
|
||||
|
||||
attack(mob/living/silicon/ai/M as mob, mob/user as mob)
|
||||
if(!istype(M, /mob/living/silicon/ai))//If target is not an AI.
|
||||
return ..()
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been carded with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to card [M.name] ([M.ckey])</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to card [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
transfer_ai("AICORE", "AICARD", M, user)
|
||||
/obj/item/device/aicard/attack_self(mob/user)
|
||||
if (!in_range(src, user))
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat = "<TT><B>Intelicard</B><BR>"
|
||||
var/laws
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
dat += "Stored AI: [A.name]<br>System integrity: [A.system_integrity()]%<br>"
|
||||
|
||||
attack(mob/living/silicon/decoy/M as mob, mob/user as mob)
|
||||
if (!istype (M, /mob/living/silicon/decoy))
|
||||
return ..()
|
||||
for (var/law in A.laws.ion)
|
||||
if(law)
|
||||
laws += "[ionnum()]: [law]<BR>"
|
||||
|
||||
if (A.laws.zeroth)
|
||||
laws += "0: [A.laws.zeroth]<BR>"
|
||||
|
||||
var/number = 1
|
||||
for (var/index = 1, index <= A.laws.inherent.len, index++)
|
||||
var/law = A.laws.inherent[index]
|
||||
if (length(law) > 0)
|
||||
laws += "[number]: [law]<BR>"
|
||||
number++
|
||||
|
||||
for (var/index = 1, index <= A.laws.supplied.len, index++)
|
||||
var/law = A.laws.supplied[index]
|
||||
if (length(law) > 0)
|
||||
laws += "[number]: [law]<BR>"
|
||||
number++
|
||||
|
||||
dat += "Laws:<br>[laws]<br>"
|
||||
|
||||
if (A.stat == 2)
|
||||
dat += "<b>AI nonfunctional</b>"
|
||||
else
|
||||
M.death()
|
||||
user << "<b>ERROR ERROR ERROR</b>"
|
||||
|
||||
attack_self(mob/user)
|
||||
if (!in_range(src, user))
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat = "<TT><B>Intelicard</B><BR>"
|
||||
var/laws
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
dat += "Stored AI: [A.name]<br>System integrity: [A.system_integrity()]%<br>"
|
||||
|
||||
for (var/law in A.laws.ion)
|
||||
if(law)
|
||||
laws += "[ionnum()]: [law]<BR>"
|
||||
|
||||
if (A.laws.zeroth)
|
||||
laws += "0: [A.laws.zeroth]<BR>"
|
||||
|
||||
var/number = 1
|
||||
for (var/index = 1, index <= A.laws.inherent.len, index++)
|
||||
var/law = A.laws.inherent[index]
|
||||
if (length(law) > 0)
|
||||
laws += "[number]: [law]<BR>"
|
||||
number++
|
||||
|
||||
for (var/index = 1, index <= A.laws.supplied.len, index++)
|
||||
var/law = A.laws.supplied[index]
|
||||
if (length(law) > 0)
|
||||
laws += "[number]: [law]<BR>"
|
||||
number++
|
||||
|
||||
dat += "Laws:<br>[laws]<br>"
|
||||
|
||||
if (A.stat == 2)
|
||||
dat += "<b>AI nonfunctional</b>"
|
||||
if (!src.flush)
|
||||
dat += {"<A href='byond://?src=\ref[src];choice=Wipe'>Wipe AI</A>"}
|
||||
else
|
||||
if (!src.flush)
|
||||
dat += {"<A href='byond://?src=\ref[src];choice=Wipe'>Wipe AI</A>"}
|
||||
else
|
||||
dat += "<b>Wipe in progress</b>"
|
||||
dat += "<br>"
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Wireless'>[A.control_disabled ? "Enable" : "Disable"] Wireless Activity</a>"}
|
||||
dat += "<br>"
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Radio'>[A.aiRadio.disabledAi ? "Enable" : "Disable"] Subspace Transceiver</a>"}
|
||||
dat += "<br>"
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Close'> Close</a>"}
|
||||
user << browse(dat, "window=aicard")
|
||||
onclose(user, "aicard")
|
||||
dat += "<b>Wipe in progress</b>"
|
||||
dat += "<br>"
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Wireless'>[A.control_disabled ? "Enable" : "Disable"] Wireless Activity</a>"}
|
||||
dat += "<br>"
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Radio'>[A.aiRadio.disabledAi ? "Enable" : "Disable"] Subspace Transceiver</a>"}
|
||||
dat += "<br>"
|
||||
dat += {"<a href='byond://?src=\ref[src];choice=Close'> Close</a>"}
|
||||
user << browse(dat, "window=aicard")
|
||||
onclose(user, "aicard")
|
||||
return
|
||||
|
||||
/obj/item/device/aicard/Topic(href, href_list)
|
||||
|
||||
var/mob/U = usr
|
||||
if (!(get_turf(U) == get_turf(src)) || U.machine != src)//If they are not in range of 1 or less or their machine is not the card (ie, clicked on something else).
|
||||
U << browse(null, "window=aicard")
|
||||
U.unset_machine()
|
||||
return
|
||||
|
||||
Topic(href, href_list)
|
||||
var/mob/U = usr
|
||||
if (!in_range(src, U)||U.machine!=src)//If they are not in range of 1 or less or their machine is not the card (ie, clicked on something else).
|
||||
add_fingerprint(U)
|
||||
U.set_machine(src)
|
||||
|
||||
switch(href_list["choice"])//Now we switch based on choice.
|
||||
if ("Close")
|
||||
U << browse(null, "window=aicard")
|
||||
U.unset_machine()
|
||||
return
|
||||
|
||||
add_fingerprint(U)
|
||||
U.set_machine(src)
|
||||
if ("Radio")
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
A.aiRadio.disabledAi = !A.aiRadio.disabledAi
|
||||
A << "Your Subspace Transceiver has been: [A.aiRadio.disabledAi ? "disabled" : "enabled"]"
|
||||
U << "You [A.aiRadio.disabledAi ? "Disable" : "Enable"] the AI's Subspace Transceiver"
|
||||
|
||||
switch(href_list["choice"])//Now we switch based on choice.
|
||||
if ("Close")
|
||||
U << browse(null, "window=aicard")
|
||||
U.unset_machine()
|
||||
return
|
||||
if ("Wipe")
|
||||
var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No")
|
||||
if(confirm == "Yes")
|
||||
if(isnull(src)||!in_range(src, U)||U.machine!=src)
|
||||
U << browse(null, "window=aicard")
|
||||
U.unset_machine()
|
||||
return
|
||||
else
|
||||
flush = 1
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
A.suiciding = 1
|
||||
A << "Your core files are being wiped!"
|
||||
while (A.stat != 2)
|
||||
A.adjustOxyLoss(2)
|
||||
A.updatehealth()
|
||||
sleep(10)
|
||||
flush = 0
|
||||
|
||||
if ("Radio")
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
A.aiRadio.disabledAi = !A.aiRadio.disabledAi
|
||||
A << "Your Subspace Transceiver has been: [A.aiRadio.disabledAi ? "disabled" : "enabled"]"
|
||||
U << "You [A.aiRadio.disabledAi ? "Disable" : "Enable"] the AI's Subspace Transceiver"
|
||||
if ("Wireless")
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
A.control_disabled = !A.control_disabled
|
||||
A << "The intelicard's wireless port has been [A.control_disabled ? "disabled" : "enabled"]!"
|
||||
update_icon()
|
||||
attack_self(U)
|
||||
|
||||
if ("Wipe")
|
||||
var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No")
|
||||
if(confirm == "Yes")
|
||||
if(isnull(src)||!in_range(src, U)||U.machine!=src)
|
||||
U << browse(null, "window=aicard")
|
||||
U.unset_machine()
|
||||
return
|
||||
else
|
||||
flush = 1
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
A.suiciding = 1
|
||||
A << "Your core files are being wiped!"
|
||||
while (A.stat != 2)
|
||||
A.adjustOxyLoss(2)
|
||||
A.updatehealth()
|
||||
sleep(10)
|
||||
flush = 0
|
||||
/obj/item/device/aicard/update_icon()
|
||||
var/mob/living/silicon/ai/occupant = locate() in src
|
||||
overlays.Cut()
|
||||
if(occupant)
|
||||
if (occupant.control_disabled)
|
||||
overlays -= image('icons/obj/pda.dmi', "aicard-on")
|
||||
else
|
||||
overlays += image('icons/obj/pda.dmi', "aicard-on")
|
||||
if(occupant.stat)
|
||||
icon_state = "aicard-404"
|
||||
else
|
||||
icon_state = "aicard-full"
|
||||
else
|
||||
icon_state = "aicard"
|
||||
|
||||
if ("Wireless")
|
||||
for(var/mob/living/silicon/ai/A in src)
|
||||
A.control_disabled = !A.control_disabled
|
||||
A << "The intelicard's wireless port has been [A.control_disabled ? "disabled" : "enabled"]!"
|
||||
if (A.control_disabled)
|
||||
overlays -= image('icons/obj/pda.dmi', "aicard-on")
|
||||
else
|
||||
overlays += image('icons/obj/pda.dmi', "aicard-on")
|
||||
attack_self(U)
|
||||
/obj/item/device/aicard/proc/grab_ai(var/mob/living/silicon/ai/ai, var/mob/living/user)
|
||||
|
||||
if(!ai.client)
|
||||
user << "\red <b>ERROR</b>: \black [name] data core is offline. Unable to download."
|
||||
return 0
|
||||
|
||||
if(locate(/mob/living/silicon/ai) in src)
|
||||
user << "\red <b>Transfer failed</b>: \black Existing AI found on remote terminal. Remove existing AI to install a new one."
|
||||
return 0
|
||||
|
||||
if(ai.is_malf())
|
||||
user << "\red <b>ERROR</b>: \black Remote transfer interface disabled."
|
||||
return 0
|
||||
|
||||
if(istype(ai.loc, /turf/))
|
||||
new /obj/structure/AIcore/deactivated(get_turf(ai))
|
||||
|
||||
src.name = "inteliCard - [ai.name]"
|
||||
|
||||
ai.loc = src
|
||||
ai.cancel_camera()
|
||||
ai.control_disabled = 1
|
||||
ai.aiRestorePowerRoutine = 0
|
||||
ai.aiRadio.disabledAi = 1
|
||||
|
||||
ai.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been carded with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to card [ai.name] ([ai.ckey])</font>")
|
||||
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to card [ai.name] ([ai.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
if(ai.client)
|
||||
ai << "You have been downloaded to a mobile storage device. Remote access lost."
|
||||
if(user.client)
|
||||
user << "\blue <b>Transfer successful</b>: \black [ai.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
||||
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/item/device/aicard/proc/clear()
|
||||
name = "inteliCard"
|
||||
update_icon()
|
||||
/*
|
||||
/obj/item/device/aicard/relaymove(var/mob/user, var/direction)
|
||||
if(src.loc && istype(src.loc.loc, /obj/item/rig_module))
|
||||
var/obj/item/rig_module/module = src.loc.loc
|
||||
if(!module.holder || !direction)
|
||||
return
|
||||
module.holder.forced_move(direction)*/
|
||||
@@ -10,8 +10,8 @@
|
||||
var/target_species = "Human"
|
||||
|
||||
var/list/permitted_types = list(
|
||||
/obj/item/clothing/head/helmet/space/rig,
|
||||
/obj/item/clothing/suit/space/rig
|
||||
/obj/item/clothing/head/helmet/space/void,
|
||||
/obj/item/clothing/suit/space/void
|
||||
)
|
||||
|
||||
/obj/item/device/modkit/afterattack(obj/O, mob/user as mob, proximity)
|
||||
|
||||
@@ -11,6 +11,13 @@
|
||||
var/looking_for_personality = 0
|
||||
var/mob/living/silicon/pai/pai
|
||||
|
||||
/*/obj/item/device/paicard/relaymove(var/mob/user, var/direction)
|
||||
if(src.loc && istype(src.loc.loc, /obj/item/rig_module))
|
||||
var/obj/item/rig_module/module = src.loc.loc
|
||||
if(!module.holder || !direction)
|
||||
return
|
||||
module.holder.forced_move(direction)*/
|
||||
|
||||
/obj/item/device/paicard/New()
|
||||
..()
|
||||
overlays += "pai-off"
|
||||
|
||||
@@ -14,9 +14,10 @@
|
||||
matter = list("metal" = 750,"waste" = 750)
|
||||
|
||||
origin_tech = "powerstorage=3;syndicate=5"
|
||||
var/drain_rate = 600000 // amount of power to drain per tick
|
||||
var/drain_rate = 1000000 // amount of power to drain per tick
|
||||
var/dissipation_rate = 20000
|
||||
var/power_drained = 0 // has drained this much power
|
||||
var/max_power = 1e8 // maximum power that can be drained before exploding
|
||||
var/max_power = 5e9 // maximum power that can be drained before exploding
|
||||
var/mode = 0 // 0 = off, 1=clamped (off), 2=operating
|
||||
|
||||
|
||||
@@ -86,11 +87,12 @@
|
||||
processing_objects.Remove(src)
|
||||
|
||||
process()
|
||||
power_drained -= min(dissipation_rate, power_drained)
|
||||
if(attached)
|
||||
var/datum/powernet/PN = attached.get_powernet()
|
||||
if(PN)
|
||||
SetLuminosity(12)
|
||||
|
||||
PN.trigger_warning()
|
||||
// found a powernet, so drain up to max power from it
|
||||
var/drained = PN.draw_power(drain_rate)
|
||||
|
||||
@@ -101,8 +103,8 @@
|
||||
if(istype(T.master, /obj/machinery/power/apc))
|
||||
var/obj/machinery/power/apc/A = T.master
|
||||
if(A.operating && A.cell)
|
||||
A.cell.charge = max(0, A.cell.charge - 50)
|
||||
power_drained += 50
|
||||
A.cell.charge = max(0, A.cell.charge - (2000 * CELLRATE))
|
||||
power_drained += 2000
|
||||
|
||||
|
||||
if(power_drained > max_power * 0.95)
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/*
|
||||
CONTAINS:
|
||||
RCD
|
||||
*/
|
||||
//Contains the rapid construction device.
|
||||
/obj/item/weapon/rcd
|
||||
name = "rapid-construction-device (RCD)"
|
||||
desc = "A device used to rapidly build walls/floor."
|
||||
desc = "A device used to rapidly build walls and floors."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "rcd"
|
||||
opacity = 0
|
||||
@@ -24,167 +19,121 @@ RCD
|
||||
var/stored_matter = 0
|
||||
var/working = 0
|
||||
var/mode = 1
|
||||
var/list/modes = list("Floor & Walls","Airlock","Deconstruct")
|
||||
var/canRwall = 0
|
||||
var/disabled = 0
|
||||
|
||||
/obj/item/weapon/rcd/examine()
|
||||
..()
|
||||
if(src.type == /obj/item/weapon/rcd && loc == usr)
|
||||
usr << "It currently holds [stored_matter]/30 matter-units."
|
||||
|
||||
New()
|
||||
desc = "A RCD. It currently holds [stored_matter]/30 matter-units."
|
||||
src.spark_system = new /datum/effect/effect/system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
return
|
||||
/obj/item/weapon/rcd/New()
|
||||
..()
|
||||
src.spark_system = new /datum/effect/effect/system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user)
|
||||
|
||||
attackby(obj/item/weapon/W, mob/user)
|
||||
..()
|
||||
if(istype(W, /obj/item/weapon/rcd_ammo))
|
||||
if((stored_matter + 10) > 30)
|
||||
user << "<span class='notice'>The RCD cant hold any more matter-units.</span>"
|
||||
return
|
||||
user.drop_item()
|
||||
del(W)
|
||||
stored_matter += 10
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
user << "<span class='notice'>The RCD now holds [stored_matter]/30 matter-units.</span>"
|
||||
desc = "A RCD. It currently holds [stored_matter]/30 matter-units."
|
||||
if(istype(W, /obj/item/weapon/rcd_ammo))
|
||||
if((stored_matter + 10) > 30)
|
||||
user << "<span class='notice'>The RCD can't hold any more matter-units.</span>"
|
||||
return
|
||||
user.drop_from_inventory(W)
|
||||
del(W)
|
||||
stored_matter += 10
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
user << "<span class='notice'>The RCD now holds [stored_matter]/30 matter-units.</span>"
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/rcd/attack_self(mob/user)
|
||||
//Change the mode
|
||||
if(++mode > 3) mode = 1
|
||||
user << "<span class='notice'>Changed mode to '[modes[mode]]'</span>"
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
if(prob(20)) src.spark_system.start()
|
||||
|
||||
attack_self(mob/user)
|
||||
//Change the mode
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
switch(mode)
|
||||
if(1)
|
||||
mode = 2
|
||||
user << "<span class='notice'>Changed mode to 'Airlock'</span>"
|
||||
if(prob(20))
|
||||
src.spark_system.start()
|
||||
return
|
||||
if(2)
|
||||
mode = 3
|
||||
user << "<span class='notice'>Changed mode to 'Deconstruct'</span>"
|
||||
if(prob(20))
|
||||
src.spark_system.start()
|
||||
return
|
||||
if(3)
|
||||
mode = 1
|
||||
user << "<span class='notice'>Changed mode to 'Floor & Walls'</span>"
|
||||
if(prob(20))
|
||||
src.spark_system.start()
|
||||
return
|
||||
|
||||
proc/activate()
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
|
||||
|
||||
afterattack(atom/A, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
if(disabled && !isrobot(user))
|
||||
return 0
|
||||
if(istype(A,/area/shuttle)||istype(A,/turf/space/transit))
|
||||
return 0
|
||||
if(!(istype(A, /turf) || istype(A, /obj/machinery/door/airlock)))
|
||||
return 0
|
||||
|
||||
switch(mode)
|
||||
if(1)
|
||||
if(istype(A, /turf/space))
|
||||
if(useResource(1, user))
|
||||
user << "Building Floor..."
|
||||
activate()
|
||||
A:ChangeTurf(/turf/simulated/floor/plating/airless)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(istype(A, /turf/simulated/floor))
|
||||
if(checkResource(3, user))
|
||||
user << "Building Wall ..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
if(!useResource(3, user)) return 0
|
||||
activate()
|
||||
A:ChangeTurf(/turf/simulated/wall)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(2)
|
||||
if(istype(A, /turf/simulated/floor))
|
||||
if(checkResource(10, user))
|
||||
user << "Building Airlock..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if(!useResource(10, user)) return 0
|
||||
activate()
|
||||
var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock( A )
|
||||
T.autoclose = 1
|
||||
return 1
|
||||
return 0
|
||||
return 0
|
||||
|
||||
if(3)
|
||||
if(istype(A, /turf/simulated/wall))
|
||||
if(istype(A, /turf/simulated/wall/r_wall) && !canRwall)
|
||||
return 0
|
||||
if(checkResource(5, user))
|
||||
user << "Deconstructing Wall..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 40))
|
||||
if(!useResource(5, user)) return 0
|
||||
activate()
|
||||
A:ChangeTurf(/turf/simulated/floor/plating/airless)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(istype(A, /turf/simulated/floor))
|
||||
if(checkResource(5, user))
|
||||
user << "Deconstructing Floor..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if(!useResource(5, user)) return 0
|
||||
activate()
|
||||
A:ChangeTurf(/turf/space)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/machinery/door/airlock))
|
||||
if(checkResource(10, user))
|
||||
user << "Deconstructing Airlock..."
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if(!useResource(10, user)) return 0
|
||||
activate()
|
||||
del(A)
|
||||
return 1
|
||||
return 0
|
||||
return 0
|
||||
else
|
||||
user << "ERROR: RCD in MODE: [mode] attempted use by [user]. Send this text #coderbus or an admin."
|
||||
return 0
|
||||
/obj/item/weapon/rcd/afterattack(atom/A, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
if(disabled && !isrobot(user))
|
||||
return 0
|
||||
if(istype(A,/area/shuttle)||istype(A,/turf/space/transit))
|
||||
return 0
|
||||
return alter_turf(A,user,(mode == 3))
|
||||
|
||||
/obj/item/weapon/rcd/proc/useResource(var/amount, var/mob/user)
|
||||
if(stored_matter < amount)
|
||||
return 0
|
||||
stored_matter -= amount
|
||||
desc = "A RCD. It currently holds [stored_matter]/30 matter-units."
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/rcd/proc/checkResource(var/amount, var/mob/user)
|
||||
return stored_matter >= amount
|
||||
/obj/item/weapon/rcd/borg/useResource(var/amount, var/mob/user)
|
||||
if(!isrobot(user))
|
||||
return 0
|
||||
return user:cell:use(amount * 30)
|
||||
/obj/item/weapon/rcd/proc/alter_turf(var/turf/T,var/mob/user,var/deconstruct)
|
||||
|
||||
/obj/item/weapon/rcd/borg/checkResource(var/amount, var/mob/user)
|
||||
if(!isrobot(user))
|
||||
return 0
|
||||
return user:cell:charge >= (amount * 30)
|
||||
var/build_cost = 0
|
||||
var/build_type
|
||||
var/build_turf
|
||||
var/build_delay
|
||||
var/build_other
|
||||
|
||||
/obj/item/weapon/rcd/borg/New()
|
||||
..()
|
||||
desc = "A device used to rapidly build walls/floor."
|
||||
canRwall = 1
|
||||
if(working == 1)
|
||||
return 0
|
||||
|
||||
if(mode == 3 && istype(T,/obj/machinery/door/airlock))
|
||||
build_cost = 10
|
||||
build_delay = 50
|
||||
build_type = "airlock"
|
||||
else if(mode == 2 && !deconstruct && istype(T,/turf/simulated/floor))
|
||||
build_cost = 10
|
||||
build_delay = 50
|
||||
build_type = "airlock"
|
||||
build_other = /obj/machinery/door/airlock
|
||||
else if(!deconstruct && istype(T,/turf/space))
|
||||
build_cost = 1
|
||||
build_type = "floor"
|
||||
build_turf = /turf/simulated/floor/plating/airless
|
||||
else if(deconstruct && istype(T,/turf/simulated/wall))
|
||||
build_delay = deconstruct ? 50 : 40
|
||||
build_cost = 5
|
||||
build_type = (canRwall && istype(T,/turf/simulated/wall/r_wall)) ? "wall" : null
|
||||
build_turf = /turf/simulated/floor
|
||||
else if(istype(T,/turf/simulated/floor))
|
||||
build_delay = deconstruct ? 50 : 20
|
||||
build_cost = deconstruct ? 10 : 3
|
||||
build_type = deconstruct ? "floor" : "wall"
|
||||
build_turf = deconstruct ? /turf/space : /turf/simulated/wall
|
||||
else
|
||||
return 0
|
||||
|
||||
if(!build_type)
|
||||
working = 0
|
||||
return 0
|
||||
|
||||
if(!useResource(build_cost, user))
|
||||
user << "Insufficient resources."
|
||||
return 0
|
||||
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
|
||||
working = 1
|
||||
user << "[(deconstruct ? "Deconstructing" : "Building")] [build_type]..."
|
||||
|
||||
if(build_delay && !do_after(user, build_delay))
|
||||
working = 0
|
||||
return 0
|
||||
|
||||
working = 0
|
||||
|
||||
if(build_turf)
|
||||
T.ChangeTurf(build_turf)
|
||||
else if(build_other)
|
||||
new build_other(T)
|
||||
else
|
||||
del(T)
|
||||
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/rcd_ammo
|
||||
name = "compressed matter cartridge"
|
||||
@@ -196,4 +145,33 @@ RCD
|
||||
density = 0
|
||||
anchored = 0.0
|
||||
origin_tech = "materials=2"
|
||||
matter = list("metal" = 30000,"glass" = 15000)
|
||||
matter = list("metal" = 30000,"glass" = 15000)
|
||||
|
||||
/obj/item/weapon/rcd/borg
|
||||
canRwall = 1
|
||||
|
||||
/obj/item/weapon/rcd/borg/useResource(var/amount, var/mob/user)
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.cell)
|
||||
var/cost = amount*30
|
||||
if(R.cell.charge >= cost)
|
||||
R.cell.use(cost)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/rcd/borg/attackby()
|
||||
return
|
||||
|
||||
/obj/item/weapon/rcd/mounted/useResource(var/amount, var/mob/user)
|
||||
var/cost = amount*30
|
||||
if(istype(loc,/obj/item/rig_module))
|
||||
var/obj/item/rig_module/module = loc
|
||||
if(module.holder && module.holder.cell)
|
||||
if(module.holder.cell.charge >= cost)
|
||||
module.holder.cell.use(cost)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/rcd/mounted/attackby()
|
||||
return
|
||||
@@ -75,6 +75,7 @@
|
||||
/obj/item/weapon/storage/lockbox,
|
||||
/obj/item/weapon/storage/secure,
|
||||
/obj/item/weapon/circuitboard,
|
||||
/obj/item/weapon/rig,
|
||||
/obj/item/device/eftpos,
|
||||
/obj/item/device/lightreplacer,
|
||||
/obj/item/device/taperecorder,
|
||||
|
||||
@@ -164,15 +164,39 @@
|
||||
w_class = 4.0//So you can't hide it in your pocket or some such.
|
||||
flags = FPRINT | TABLEPASS | NOSHIELD | NOBLOODY
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
var/mob/living/creator
|
||||
var/datum/effect/effect/system/spark_spread/spark_system
|
||||
|
||||
/obj/item/weapon/melee/energy/blade/New()
|
||||
|
||||
spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
/obj/item/weapon/melee/energy/blade/dropped()
|
||||
del(src)
|
||||
processing_objects |= src
|
||||
|
||||
/obj/item/weapon/melee/energy/blade/proc/throw()
|
||||
del(src)
|
||||
/obj/item/weapon/melee/energy/blade/Del()
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
/obj/item/weapon/melee/energy/blade/attack_self(mob/user as mob)
|
||||
user.drop_from_inventory(src)
|
||||
spawn(1) if(src) del(src)
|
||||
|
||||
/obj/item/weapon/melee/energy/blade/dropped()
|
||||
spawn(1) if(src) del(src)
|
||||
|
||||
/obj/item/weapon/melee/energy/blade/process()
|
||||
if(!creator || loc != creator || (creator.l_hand != src && creator.r_hand != src))
|
||||
// Tidy up a bit.
|
||||
if(istype(loc,/mob/living))
|
||||
var/mob/living/carbon/human/host = loc
|
||||
if(istype(host))
|
||||
for(var/datum/organ/external/organ in host.organs)
|
||||
for(var/obj/item/O in organ.implants)
|
||||
if(O == src)
|
||||
organ.implants -= src
|
||||
host.pinned -= src
|
||||
host.embedded -= src
|
||||
host.drop_from_inventory(src)
|
||||
spawn(1) if(src) del(src)
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
var/use_sound = "rustle" //sound played when used. null for no sound.
|
||||
|
||||
/obj/item/weapon/storage/MouseDrop(obj/over_object as obj)
|
||||
|
||||
if(!canremove)
|
||||
return
|
||||
|
||||
if (ishuman(usr) || ismonkey(usr)) //so monkeys can take off their backpacks -- Urist
|
||||
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
@@ -36,12 +40,12 @@
|
||||
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
|
||||
|
||||
//makes sure that the storage is equipped, so that we can't drag it into our hand from miles away.
|
||||
//there's got to be a better way of doing this.
|
||||
if (!(src.loc == usr) || (src.loc && src.loc.loc == usr))
|
||||
return
|
||||
|
||||
|
||||
if (!( usr.restrained() ) && !( usr.stat ))
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
@@ -99,7 +103,7 @@
|
||||
/obj/item/weapon/storage/proc/open(mob/user as mob)
|
||||
if (src.use_sound)
|
||||
playsound(src.loc, src.use_sound, 50, 1, -5)
|
||||
|
||||
|
||||
orient2hud(user)
|
||||
if (user.s_active)
|
||||
user.s_active.close(user)
|
||||
@@ -352,7 +356,7 @@
|
||||
H.put_in_hands(src)
|
||||
H.r_store = null
|
||||
return
|
||||
|
||||
|
||||
if (src.loc == user)
|
||||
src.open(user)
|
||||
else
|
||||
@@ -459,33 +463,33 @@
|
||||
/atom/proc/storage_depth(atom/container)
|
||||
var/depth = 0
|
||||
var/atom/cur_atom = src
|
||||
|
||||
|
||||
while (cur_atom && !(cur_atom in container.contents))
|
||||
if (isarea(cur_atom))
|
||||
return -1
|
||||
if (istype(cur_atom.loc, /obj/item/weapon/storage))
|
||||
depth++
|
||||
cur_atom = cur_atom.loc
|
||||
|
||||
|
||||
if (!cur_atom)
|
||||
return -1 //inside something with a null loc.
|
||||
|
||||
|
||||
return depth
|
||||
|
||||
|
||||
//Like storage depth, but returns the depth to the nearest turf
|
||||
//Returns -1 if no top level turf (a loc was null somewhere, or a non-turf atom's loc was an area somehow).
|
||||
/atom/proc/storage_depth_turf()
|
||||
var/depth = 0
|
||||
var/atom/cur_atom = src
|
||||
|
||||
|
||||
while (cur_atom && !isturf(cur_atom))
|
||||
if (isarea(cur_atom))
|
||||
return -1
|
||||
if (istype(cur_atom.loc, /obj/item/weapon/storage))
|
||||
depth++
|
||||
cur_atom = cur_atom.loc
|
||||
|
||||
|
||||
if (!cur_atom)
|
||||
return -1 //inside something with a null loc.
|
||||
|
||||
return depth
|
||||
|
||||
return depth
|
||||
@@ -21,7 +21,7 @@
|
||||
/obj/item/weapon/tank/jetpack/examine(mob/user)
|
||||
if(!..(user, 0))
|
||||
return
|
||||
|
||||
|
||||
if(air_contents.gas["oxygen"] < 10)
|
||||
user << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
|
||||
playsound(user, 'sound/effects/alert.ogg', 50, 1)
|
||||
@@ -48,6 +48,8 @@
|
||||
var/mob/M = usr
|
||||
M.update_inv_back()
|
||||
|
||||
usr << "You toggle the thrusters [on? "on":"off"]."
|
||||
|
||||
/obj/item/weapon/tank/jetpack/proc/allow_thrust(num, mob/living/user as mob)
|
||||
if(!(src.on))
|
||||
return 0
|
||||
@@ -108,8 +110,38 @@
|
||||
/obj/item/weapon/tank/jetpack/carbondioxide/examine(mob/user)
|
||||
if(!..(0))
|
||||
return
|
||||
|
||||
|
||||
if(air_contents.gas["carbon_dioxide"] < 10)
|
||||
user << text("\red <B>The meter on the [src.name] indicates you are almost out of carbon dioxide!</B>")
|
||||
playsound(user, 'sound/effects/alert.ogg', 50, 1)
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/jetpack/rig
|
||||
name = "jetpack"
|
||||
var/obj/item/weapon/rig/holder
|
||||
|
||||
/obj/item/weapon/tank/jetpack/rig/examine()
|
||||
usr << "It's a jetpack. If you can see this, report it on the bug tracker."
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/tank/jetpack/rig/allow_thrust(num, mob/living/user as mob)
|
||||
|
||||
if(!(src.on))
|
||||
return 0
|
||||
|
||||
if(!istype(holder) || !holder.air_supply)
|
||||
return 0
|
||||
|
||||
var/obj/item/weapon/tank/pressure_vessel = holder.air_supply
|
||||
|
||||
if((num < 0.005 || pressure_vessel.air_contents.total_moles < num))
|
||||
src.ion_trail.stop()
|
||||
return 0
|
||||
|
||||
var/datum/gas_mixture/G = pressure_vessel.air_contents.remove(num)
|
||||
|
||||
var/allgases = G.gas["carbon_dioxide"] + G.gas["nitrogen"] + G.gas["oxygen"] + G.gas["phoron"]
|
||||
if(allgases >= 0.005)
|
||||
return 1
|
||||
del(G)
|
||||
return
|
||||
@@ -135,8 +135,13 @@
|
||||
data["maskConnected"] = 0
|
||||
if(istype(loc,/mob/living/carbon))
|
||||
var/mob/living/carbon/location = loc
|
||||
if(location.internal == src || (location.wear_mask && (location.wear_mask.flags & MASKINTERNALS)))
|
||||
data["maskConnected"] = 1
|
||||
if(location.internal == src)
|
||||
if(location.wear_mask && (location.wear_mask.flags & AIRTIGHT))
|
||||
data["maskConnected"] = 1
|
||||
else if(istype(location, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = location
|
||||
if(H.head && (H.head.flags & AIRTIGHT))
|
||||
data["maskConnected"] = 1
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
@@ -177,7 +182,16 @@
|
||||
if (location.internals)
|
||||
location.internals.icon_state = "internal0"
|
||||
else
|
||||
if(location.wear_mask && (location.wear_mask.flags & MASKINTERNALS))
|
||||
|
||||
var/can_open_valve
|
||||
if(location.wear_mask && (location.wear_mask.flags & AIRTIGHT))
|
||||
can_open_valve = 1
|
||||
else if(istype(location,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = location
|
||||
if(H.head && (H.head.flags & AIRTIGHT))
|
||||
can_open_valve = 1
|
||||
|
||||
if(can_open_valve)
|
||||
location.internal = src
|
||||
usr << "\blue You open \the [src] valve."
|
||||
if (location.internals)
|
||||
|
||||
@@ -294,3 +294,192 @@ obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob)
|
||||
del(src)
|
||||
update_icon(user)
|
||||
update_icon(user)
|
||||
|
||||
/obj/item/weapon/star
|
||||
name = "shuriken"
|
||||
desc = "A sharp, perfectly weighted piece of metal."
|
||||
icon_state = "star"
|
||||
force = 5
|
||||
throw_speed = 10
|
||||
throwforce = 15
|
||||
throw_range = 15
|
||||
sharp = 1
|
||||
edge = 1
|
||||
matter = list("metal" = 500)
|
||||
|
||||
var/poisoned = 0
|
||||
|
||||
/obj/item/weapon/star/New()
|
||||
..()
|
||||
src.pixel_x = rand(-12, 12)
|
||||
src.pixel_y = rand(-12, 12)
|
||||
|
||||
//TODO: consider making this something done with reagents.
|
||||
/obj/item/weapon/star/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
if(poisoned && istype(hit_atom,/mob/living))
|
||||
var/mob/living/M = hit_atom
|
||||
M.adjustToxLoss(rand(20,40))
|
||||
poisoned = 0
|
||||
color = null
|
||||
|
||||
/obj/item/weapon/star/ninja
|
||||
color = "#007700"
|
||||
poisoned = 1
|
||||
|
||||
/obj/item/weapon/energy_net
|
||||
name = "energy net"
|
||||
desc = "It's a net made of green energy."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "energynet"
|
||||
throwforce = 0
|
||||
force = 0
|
||||
var/net_type = /obj/effect/energy_net
|
||||
|
||||
/obj/item/weapon/energy_net/dropped()
|
||||
spawn(10)
|
||||
if(src) del(src)
|
||||
|
||||
/obj/item/weapon/energy_net/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
|
||||
var/mob/living/M = hit_atom
|
||||
|
||||
if(!istype(M) || locate(/obj/effect/energy_net) in M.loc)
|
||||
del(src)
|
||||
return 0
|
||||
|
||||
var/turf/T = get_turf(M)
|
||||
if(T)
|
||||
var/obj/effect/energy_net/net = new net_type(T)
|
||||
net.layer = M.layer+1
|
||||
M.captured = 1
|
||||
net.affecting = M
|
||||
T.visible_message("[M] was caught in an energy net!")
|
||||
del(src)
|
||||
|
||||
// If we miss or hit an obstacle, we still want to delete the net.
|
||||
spawn(10)
|
||||
if(src) del(src)
|
||||
|
||||
/obj/effect/energy_net
|
||||
name = "energy net"
|
||||
desc = "It's a net made of green energy."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "energynet"
|
||||
|
||||
density = 1
|
||||
opacity = 0
|
||||
mouse_opacity = 1
|
||||
anchored = 1
|
||||
|
||||
var/health = 25
|
||||
var/mob/living/affecting = null //Who it is currently affecting, if anyone.
|
||||
var/mob/living/master = null //Who shot web. Will let this person know if the net was successful.
|
||||
var/countdown = -1
|
||||
|
||||
/obj/effect/energy_net/teleport
|
||||
countdown = 60
|
||||
|
||||
/obj/effect/energy_net/New()
|
||||
..()
|
||||
processing_objects |= src
|
||||
|
||||
/obj/effect/energy_net/Del()
|
||||
|
||||
if(affecting)
|
||||
var/mob/living/carbon/M = affecting
|
||||
M.anchored = initial(affecting.anchored)
|
||||
M.captured = 0
|
||||
M << "You are free of the net!"
|
||||
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
/obj/effect/energy_net/proc/healthcheck()
|
||||
|
||||
if(health <=0)
|
||||
density = 0
|
||||
src.visible_message("The energy net is torn apart!")
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/effect/energy_net/process()
|
||||
|
||||
if(isnull(affecting) || affecting.loc != loc)
|
||||
del(src)
|
||||
return
|
||||
|
||||
// Countdown begin set to -1 will stop the teleporter from firing.
|
||||
// Clientless mobs can be netted but they will not teleport or decrement the timer.
|
||||
var/mob/living/M = affecting
|
||||
if(countdown == -1 || (istype(M) && !M.client))
|
||||
return
|
||||
|
||||
if(countdown > 0)
|
||||
countdown--
|
||||
return
|
||||
|
||||
// TODO: consider removing or altering this; energy nets are useful on their own
|
||||
// merits and the teleportation was never properly implemented; it's halfassed.
|
||||
density = 0
|
||||
invisibility = 101 //Make the net invisible so all the animations can play out.
|
||||
health = INFINITY //Make the net invincible so that an explosion/something else won't kill it during anims.
|
||||
|
||||
playsound(affecting.loc, 'sound/effects/sparks4.ogg', 50, 1)
|
||||
anim(affecting.loc,affecting,'icons/mob/mob.dmi',,"phaseout",,affecting.dir)
|
||||
|
||||
affecting.visible_message("[affecting] vanishes in a flare of light!")
|
||||
|
||||
if(holdingfacility.len)
|
||||
affecting.loc = pick(holdingfacility)
|
||||
|
||||
affecting << "You appear in a strange place!"
|
||||
|
||||
playsound(affecting.loc, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(affecting.loc, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
anim(affecting.loc,affecting,'icons/mob/mob.dmi',,"phasein",,affecting.dir)
|
||||
|
||||
del(src)
|
||||
|
||||
/obj/effect/energy_net/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
healthcheck()
|
||||
return 0
|
||||
|
||||
/obj/effect/energy_net/ex_act()
|
||||
health = 0
|
||||
healthcheck()
|
||||
|
||||
/obj/effect/energy_net/blob_act()
|
||||
health = 0
|
||||
healthcheck()
|
||||
|
||||
/obj/effect/energy_net/meteorhit()
|
||||
health = 0
|
||||
healthcheck()
|
||||
|
||||
/obj/effect/energy_net/attack_hand(var/mob/user)
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(istype(H))
|
||||
if(H.species.can_shred(H))
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1)
|
||||
health -= rand(10, 20)
|
||||
else
|
||||
health -= rand(1,3)
|
||||
|
||||
else if (HULK in user.mutations)
|
||||
health = 0
|
||||
else
|
||||
health -= rand(5,8)
|
||||
|
||||
H << "<span class='danger'>You claw at the energy net.</span>"
|
||||
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/energy_net/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
health -= W.force
|
||||
healthcheck()
|
||||
..()
|
||||
@@ -9,8 +9,8 @@
|
||||
..()
|
||||
new /obj/item/weapon/tank/jetpack/void(src)
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
new /obj/item/clothing/head/helmet/space/nasavoid(src)
|
||||
new /obj/item/clothing/suit/space/nasavoid(src)
|
||||
new /obj/item/clothing/head/helmet/space/void(src)
|
||||
new /obj/item/clothing/suit/space/void(src)
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
new /obj/item/weapon/cell(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
@@ -14,8 +14,8 @@
|
||||
new /obj/item/weapon/tank/jetpack/oxygen(src)
|
||||
new /obj/item/clothing/mask/gas/syndicate(src)
|
||||
new /obj/item/clothing/under/syndicate(src)
|
||||
new /obj/item/clothing/head/helmet/space/rig/syndi(src)
|
||||
new /obj/item/clothing/suit/space/rig/syndi(src)
|
||||
new /obj/item/clothing/head/helmet/space/void/merc(src)
|
||||
new /obj/item/clothing/suit/space/void/merc(src)
|
||||
new /obj/item/weapon/crowbar/red(src)
|
||||
new /obj/item/weapon/cell/high(src)
|
||||
new /obj/item/weapon/card/id/syndicate(src)
|
||||
@@ -25,15 +25,15 @@
|
||||
|
||||
|
||||
/obj/structure/closet/syndicate/suit
|
||||
desc = "It's a storage unit for rig suits."
|
||||
desc = "It's a storage unit for voidsuits."
|
||||
|
||||
/obj/structure/closet/syndicate/suit/New()
|
||||
..()
|
||||
new /obj/item/weapon/tank/jetpack/oxygen(src)
|
||||
new /obj/item/clothing/shoes/magboots(src)
|
||||
new /obj/item/clothing/suit/space/rig/syndi(src)
|
||||
new /obj/item/clothing/suit/space/void/merc(src)
|
||||
new /obj/item/clothing/mask/gas/syndicate(src)
|
||||
new /obj/item/clothing/head/helmet/space/rig/syndi(src)
|
||||
new /obj/item/clothing/head/helmet/space/void/merc(src)
|
||||
|
||||
|
||||
/obj/structure/closet/syndicate/nuclear
|
||||
|
||||
@@ -168,6 +168,8 @@
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
if(electrocute_mob(user, C, src))
|
||||
if(C.powernet)
|
||||
C.powernet.trigger_warning()
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
|
||||
@@ -334,13 +334,14 @@
|
||||
else if(response == "Dismantle")
|
||||
user << "<span class='notice'>You begin slicing through the outer plating.</span>"
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
sleep(100)
|
||||
if( !istype(src, /turf/simulated/wall) || !user || !WT || !WT.isOn() || !T ) return
|
||||
|
||||
if( user.loc == T && user.get_active_hand() == WT )
|
||||
if(!do_after(user,100))
|
||||
return
|
||||
if(WT.isOn())
|
||||
user << "<span class='notice'>You remove the outer plating.</span>"
|
||||
dismantle_wall()
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
O.show_message("<span class='warning'>The wall was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart.</span>", 2)
|
||||
return
|
||||
return
|
||||
else
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
@@ -351,16 +352,17 @@
|
||||
user << "<span class='notice'>You begin slicing through the outer plating.</span>"
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
sleep(60)
|
||||
if(mineral == "diamond")//Oh look, it's tougher
|
||||
sleep(60)
|
||||
if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
|
||||
var/delay = 60
|
||||
if(mineral == "diamond")
|
||||
delay += 60
|
||||
|
||||
if( user.loc == T && user.get_active_hand() == W )
|
||||
user << "<span class='notice'>You remove the outer plating.</span>"
|
||||
dismantle_wall()
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
O.show_message("<span class='warning'>The wall was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart.</span>", 2)
|
||||
if(!do_after(user,delay))
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You remove the outer plating.</span>"
|
||||
dismantle_wall()
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
O.show_message("<span class='warning'>The wall was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart.</span>", 2)
|
||||
return
|
||||
|
||||
//DRILLING
|
||||
@@ -368,16 +370,17 @@
|
||||
|
||||
user << "<span class='notice'>You begin to drill though the wall.</span>"
|
||||
|
||||
sleep(60)
|
||||
var/delay = 60
|
||||
if(mineral == "diamond")
|
||||
sleep(60)
|
||||
if( !istype(src, /turf/simulated/wall) || !user || !W || !T ) return
|
||||
delay += 60
|
||||
|
||||
if( user.loc == T && user.get_active_hand() == W )
|
||||
user << "<span class='notice'>Your drill tears though the last of the reinforced plating.</span>"
|
||||
dismantle_wall()
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
O.show_message("<span class='warning'>The wall was drilled through by [user]!</span>", 1, "<span class='warning'>You hear the grinding of metal.</span>", 2)
|
||||
if(!do_after(user,delay))
|
||||
return
|
||||
|
||||
user << "<span class='notice'>Your drill tears though the last of the reinforced plating.</span>"
|
||||
dismantle_wall()
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
O.show_message("<span class='warning'>The wall was drilled through by [user]!</span>", 1, "<span class='warning'>You hear the grinding of metal.</span>", 2)
|
||||
return
|
||||
|
||||
else if( istype(W, /obj/item/weapon/melee/energy/blade) )
|
||||
|
||||
@@ -202,6 +202,12 @@ var/datum/event_manager/event_manager = new()
|
||||
#define EVENT_LEVEL_MODERATE 2
|
||||
#define EVENT_LEVEL_MAJOR 3
|
||||
|
||||
// Suit sensor levels
|
||||
#define SUIT_SENSOR_OFF 0
|
||||
#define SUIT_SENSOR_BINARY 1
|
||||
#define SUIT_SENSOR_VITAL 2
|
||||
#define SUIT_SENSOR_TRACKING 3
|
||||
|
||||
//away missions
|
||||
var/list/awaydestinations = list() //a list of landmarks that the warpgate can take you to
|
||||
|
||||
|
||||
+70
-38
@@ -1483,61 +1483,92 @@
|
||||
log_admin("[src.owner] replied to [key_name(H)]'s illegal message with the message [input].")
|
||||
H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. <b>\"[input]\"</b> Message ends.\""
|
||||
|
||||
else if(href_list["CentcommFaxView"])
|
||||
var/info = locate(href_list["CentcommFaxView"])
|
||||
else if(href_list["AdminFaxView"])
|
||||
var/obj/item/fax = locate(href_list["AdminFaxView"])
|
||||
if (istype(fax, /obj/item/weapon/paper))
|
||||
var/obj/item/weapon/paper/P = fax
|
||||
P.show_content(usr)
|
||||
else if (istype(fax, /obj/item/weapon/photo))
|
||||
var/obj/item/weapon/photo/H = fax
|
||||
H.show(usr)
|
||||
else if (istype(fax, /obj/item/weapon/paper_bundle))
|
||||
//having multiple people turning pages on a paper_bundle can cause issues
|
||||
//open a browse window listing the contents instead
|
||||
var/data = ""
|
||||
var/obj/item/weapon/paper_bundle/B = fax
|
||||
|
||||
for (var/page = 1, page <= B.amount, page++)
|
||||
var/obj/pageobj = B.contents[page]
|
||||
data += "<A href='?src=\ref[src];AdminFaxViewPage=[page];paper_bundle=\ref[B]'>Page [page] - [pageobj.name]</A><BR>"
|
||||
|
||||
world << data
|
||||
world << "usr = [usr]"
|
||||
|
||||
usr << browse(data, "window=[B.name]")
|
||||
else
|
||||
usr << "\red The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]"
|
||||
|
||||
usr << browse("<HTML><HEAD><TITLE>Centcomm Fax Message</TITLE></HEAD><BODY>[info]</BODY></HTML>", "window=Centcomm Fax Message")
|
||||
else if (href_list["AdminFaxViewPage"])
|
||||
var/page = text2num(href_list["AdminFaxViewPage"])
|
||||
var/obj/item/weapon/paper_bundle/bundle = locate(href_list["paper_bundle"])
|
||||
|
||||
if (!bundle) return
|
||||
|
||||
if (istype(bundle.contents[page], /obj/item/weapon/paper))
|
||||
var/obj/item/weapon/paper/P = bundle.contents[page]
|
||||
P.show_content(src.owner, 1)
|
||||
else if (istype(bundle.contents[page], /obj/item/weapon/photo))
|
||||
var/obj/item/weapon/photo/H = bundle.contents[page]
|
||||
H.show(src.owner)
|
||||
return
|
||||
|
||||
else if(href_list["CentcommFaxReply"])
|
||||
var/mob/living/carbon/human/H = locate(href_list["CentcommFaxReply"])
|
||||
var/obj/machinery/faxmachine/fax = locate(href_list["originfax"])
|
||||
var/mob/sender = locate(href_list["CentcommFaxReply"])
|
||||
var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"])
|
||||
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use <br> for line breaks.", "Outgoing message from Centcomm", "") as message|null
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(sender)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use <br> for line breaks.", "Outgoing message from Centcomm", "") as message|null
|
||||
if(!input) return
|
||||
|
||||
var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
|
||||
|
||||
// Create the reply message
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( null ) //hopefully the null loc won't cause trouble for us
|
||||
P.name = "[command_name()]- [customname]"
|
||||
P.info = input
|
||||
P.update_icon()
|
||||
|
||||
// Stamps
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
stampoverlay.icon_state = "paper_stamp-cent"
|
||||
if(!P.stamped)
|
||||
P.stamped = new
|
||||
P.stamped += /obj/item/weapon/stamp
|
||||
P.overlays += stampoverlay
|
||||
P.stamps += "<HR><i>This paper has been stamped by the Central Command Quantum Relay.</i>"
|
||||
|
||||
for(var/obj/machinery/faxmachine/F in machines)
|
||||
if(F == fax)
|
||||
if(! (F.stat & (BROKEN|NOPOWER) ) )
|
||||
|
||||
// animate! it's alive!
|
||||
flick("faxreceive", F)
|
||||
|
||||
// give the sprite some time to flick
|
||||
spawn(20)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( F.loc )
|
||||
P.name = "[command_name()]- [customname]"
|
||||
P.info = input
|
||||
P.update_icon()
|
||||
|
||||
playsound(F.loc, "sound/items/polaroid1.ogg", 50, 1)
|
||||
|
||||
// Stamps
|
||||
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
|
||||
stampoverlay.icon_state = "paper_stamp-cent"
|
||||
if(!P.stamped)
|
||||
P.stamped = new
|
||||
P.stamped += /obj/item/weapon/stamp
|
||||
P.overlays += stampoverlay
|
||||
P.stamps += "<HR><i>This paper has been stamped by the Central Command Quantum Relay.</i>"
|
||||
|
||||
src.owner << "Message reply to transmitted successfully."
|
||||
log_admin("[key_name(src.owner)] replied to a fax message from [key_name(H)]: [input]")
|
||||
message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(H)]", 1)
|
||||
return
|
||||
src.owner << "/red Unable to locate fax!"
|
||||
if(fax.recievefax(P))
|
||||
src.owner << "\blue Message reply to transmitted successfully."
|
||||
log_admin("[key_name(src.owner)] replied to a fax message from [key_name(sender)]: [input]")
|
||||
message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(sender)]", 1)
|
||||
else
|
||||
src.owner << "\red Message reply failed."
|
||||
|
||||
spawn(100)
|
||||
del(P)
|
||||
return
|
||||
|
||||
else if(href_list["SolGovFaxReply"])
|
||||
//TODO
|
||||
/*
|
||||
var/mob/living/carbon/human/H = locate(href_list["SolGovFaxReply"])
|
||||
var/obj/machinery/faxmachine/fax = locate(href_list["originfax"])
|
||||
var/obj/machinery/photocopier/faxmachine/fax = locate(href_list["originfax"])
|
||||
|
||||
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via secure connection. NOTE: BBCode does not work, but HTML tags do! Use <br> for line breaks.", "Outgoing message from Centcomm", "") as message|null
|
||||
if(!input) return
|
||||
|
||||
var/customname = input(src.owner, "Pick a title for the report", "Title") as text|null
|
||||
|
||||
for(var/obj/machinery/faxmachine/F in machines)
|
||||
for(var/obj/machinery/photocopier/faxmachine/F in machines)
|
||||
if(F == fax)
|
||||
if(! (F.stat & (BROKEN|NOPOWER) ) )
|
||||
|
||||
@@ -1567,6 +1598,7 @@
|
||||
message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(H)]", 1)
|
||||
return
|
||||
src.owner << "/red Unable to locate fax!"
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -106,12 +106,12 @@
|
||||
/obj/effect/landmark/corpse/syndicatecommando
|
||||
name = "Syndicate Commando"
|
||||
corpseuniform = /obj/item/clothing/under/syndicate
|
||||
corpsesuit = /obj/item/clothing/suit/space/rig/syndi
|
||||
corpsesuit = /obj/item/clothing/suit/space/void/merc
|
||||
corpseshoes = /obj/item/clothing/shoes/swat
|
||||
corpsegloves = /obj/item/clothing/gloves/swat
|
||||
corpseradio = /obj/item/device/radio/headset
|
||||
corpsemask = /obj/item/clothing/mask/gas/syndicate
|
||||
corpsehelmet = /obj/item/clothing/head/helmet/space/rig/syndi
|
||||
corpsehelmet = /obj/item/clothing/head/helmet/space/void/merc
|
||||
corpseback = /obj/item/weapon/tank/jetpack/oxygen
|
||||
corpsepocket1 = /obj/item/weapon/tank/emergency_oxygen
|
||||
corpseid = 1
|
||||
@@ -161,9 +161,9 @@
|
||||
corpseidaccess = "Station Engineer"
|
||||
|
||||
/obj/effect/landmark/corpse/engineer/rig
|
||||
corpsesuit = /obj/item/clothing/suit/space/rig/engineering
|
||||
corpsesuit = /obj/item/clothing/suit/space/void/engineering
|
||||
corpsemask = /obj/item/clothing/mask/breath
|
||||
corpsehelmet = /obj/item/clothing/head/helmet/space/rig/engineering
|
||||
corpsehelmet = /obj/item/clothing/head/helmet/space/void/engineering
|
||||
|
||||
/obj/effect/landmark/corpse/clown
|
||||
name = "Clown"
|
||||
@@ -199,9 +199,9 @@
|
||||
corpseidaccess = "Shaft Miner"
|
||||
|
||||
/obj/effect/landmark/corpse/miner/rig
|
||||
corpsesuit = /obj/item/clothing/suit/space/rig/mining
|
||||
corpsesuit = /obj/item/clothing/suit/space/void/mining
|
||||
corpsemask = /obj/item/clothing/mask/breath
|
||||
corpsehelmet = /obj/item/clothing/head/helmet/space/rig/mining
|
||||
corpsehelmet = /obj/item/clothing/head/helmet/space/void/mining
|
||||
|
||||
|
||||
/////////////////Officers//////////////////////
|
||||
|
||||
@@ -3,10 +3,11 @@ var/global/list/gear_datums = list()
|
||||
/hook/startup/proc/populate_gear_list()
|
||||
var/list/sort_categories = list(
|
||||
"[slot_head]" = list(),
|
||||
"ears" = list(),
|
||||
"[slot_glasses]" = list(),
|
||||
"[slot_wear_mask]" = list(),
|
||||
"[slot_w_uniform]" = list(),
|
||||
"attachments" = list(),
|
||||
"[slot_tie]" = list(),
|
||||
"[slot_wear_suit]" = list(),
|
||||
"[slot_gloves]" = list(),
|
||||
"[slot_shoes]" = list(),
|
||||
@@ -204,6 +205,13 @@ var/global/list/gear_datums = list()
|
||||
cost = 2
|
||||
slot = slot_head
|
||||
|
||||
// Wig by Earthcrusher, blame him.
|
||||
/datum/gear/philosopher_wig
|
||||
display_name = "natural philosopher's wig"
|
||||
path = /obj/item/clothing/head/philosopher_wig
|
||||
cost = 3
|
||||
slot = slot_head
|
||||
|
||||
/datum/gear/ushanka
|
||||
display_name = "ushanka"
|
||||
path = /obj/item/clothing/head/ushanka
|
||||
@@ -323,13 +331,6 @@ var/global/list/gear_datums = list()
|
||||
cost = 1
|
||||
allowed_roles = list("Captain")
|
||||
|
||||
// Wig by Earthcrusher, blame him.
|
||||
/datum/gear/philosopher_wig
|
||||
display_name = "natural philosopher's wig"
|
||||
path = /obj/item/clothing/head/philosopher_wig
|
||||
cost = 3
|
||||
slot = slot_head
|
||||
|
||||
/datum/gear/corpsecsuit
|
||||
display_name = "uniform, corporate (Security)"
|
||||
path = /obj/item/clothing/under/rank/security/corp
|
||||
@@ -363,88 +364,88 @@ var/global/list/gear_datums = list()
|
||||
/datum/gear/armband_cargo
|
||||
display_name = "armband, cargo"
|
||||
path = /obj/item/clothing/tie/armband/cargo
|
||||
sort_category = "attachments"
|
||||
slot = slot_tie
|
||||
cost = 1
|
||||
|
||||
/datum/gear/armband_emt
|
||||
display_name = "armband, EMT"
|
||||
path = /obj/item/clothing/tie/armband/medgreen
|
||||
sort_category = "attachments"
|
||||
slot = slot_tie
|
||||
cost = 2
|
||||
|
||||
/datum/gear/armband_engineering
|
||||
display_name = "armband, engineering"
|
||||
path = /obj/item/clothing/tie/armband/engine
|
||||
sort_category = "attachments"
|
||||
slot = slot_tie
|
||||
cost = 1
|
||||
|
||||
/datum/gear/armband_hydroponics
|
||||
display_name = "armband, hydroponics"
|
||||
path = /obj/item/clothing/tie/armband/hydro
|
||||
sort_category = "attachments"
|
||||
slot = slot_tie
|
||||
cost = 1
|
||||
|
||||
/datum/gear/armband_medical
|
||||
display_name = "armband, medical"
|
||||
path = /obj/item/clothing/tie/armband/med
|
||||
sort_category = "attachments"
|
||||
slot = slot_tie
|
||||
cost = 1
|
||||
|
||||
/datum/gear/armband
|
||||
display_name = "armband, red"
|
||||
path = /obj/item/clothing/tie/armband
|
||||
sort_category = "attachments"
|
||||
slot = slot_tie
|
||||
cost = 1
|
||||
|
||||
/datum/gear/armband_science
|
||||
display_name = "armband, science"
|
||||
path = /obj/item/clothing/tie/armband/science
|
||||
sort_category = "attachments"
|
||||
slot = slot_tie
|
||||
cost = 1
|
||||
|
||||
/datum/gear/armpit
|
||||
display_name = "shoulder holster"
|
||||
path = /obj/item/clothing/tie/holster/armpit
|
||||
sort_category = "attachments"
|
||||
slot = slot_tie
|
||||
cost = 2
|
||||
allowed_roles = list("Captain", "Head of Personnel", "Security Officer", "Head of Security")
|
||||
allowed_roles = list("Captain", "Head of Personnel", "Security Officer", "Warden", "Head of Security")
|
||||
|
||||
/datum/gear/tie_blue
|
||||
display_name = "tie, blue"
|
||||
path = /obj/item/clothing/tie/blue
|
||||
sort_category = "attachments"
|
||||
slot = slot_tie
|
||||
cost = 1
|
||||
|
||||
/datum/gear/tie_red
|
||||
display_name = "tie, red"
|
||||
path = /obj/item/clothing/tie/red
|
||||
sort_category = "attachments"
|
||||
slot = slot_tie
|
||||
cost = 1
|
||||
|
||||
/datum/gear/tie_horrible
|
||||
display_name = "tie, socially disgraceful"
|
||||
path = /obj/item/clothing/tie/horrible
|
||||
sort_category = "attachments"
|
||||
slot = slot_tie
|
||||
cost = 1
|
||||
|
||||
/datum/gear/brown_vest
|
||||
display_name = "webbing, engineering"
|
||||
path = /obj/item/clothing/tie/storage/brown_vest
|
||||
sort_category = "attachments"
|
||||
slot = slot_tie
|
||||
cost = 2
|
||||
allowed_roles = list("Station Engineer","Atmospheric Technician","Chief Engineer")
|
||||
|
||||
/datum/gear/black_vest
|
||||
display_name = "webbing, security"
|
||||
path = /obj/item/clothing/tie/storage/black_vest
|
||||
sort_category = "attachments"
|
||||
slot = slot_tie
|
||||
cost = 2
|
||||
allowed_roles = list("Security Officer","Head of Security","Warden")
|
||||
|
||||
/datum/gear/webbing
|
||||
display_name = "webbing, simple"
|
||||
path = /obj/item/clothing/tie/storage/webbing
|
||||
sort_category = "attachments"
|
||||
slot = slot_tie
|
||||
cost = 2
|
||||
|
||||
// Suit slot
|
||||
@@ -710,11 +711,35 @@ var/global/list/gear_datums = list()
|
||||
sort_category = "utility"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/matchbook
|
||||
display_name = "matchbook"
|
||||
path = /obj/item/weapon/storage/box/matches
|
||||
/datum/gear/folder_blue
|
||||
display_name = "folder, blue"
|
||||
path = /obj/item/weapon/folder/blue
|
||||
sort_category = "utility"
|
||||
cost = 2
|
||||
cost = 1
|
||||
|
||||
/datum/gear/folder_grey
|
||||
display_name = "folder, grey"
|
||||
path = /obj/item/weapon/folder
|
||||
sort_category = "utility"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/folder_red
|
||||
display_name = "folder, red"
|
||||
path = /obj/item/weapon/folder/red
|
||||
sort_category = "utility"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/folder_white
|
||||
display_name = "folder, white"
|
||||
path = /obj/item/weapon/folder/white
|
||||
sort_category = "utility"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/folder_yellow
|
||||
display_name = "folder, yellow"
|
||||
path = /obj/item/weapon/folder/yellow
|
||||
sort_category = "utility"
|
||||
cost = 1
|
||||
|
||||
// The rest of the trash.
|
||||
|
||||
@@ -766,8 +791,44 @@ var/global/list/gear_datums = list()
|
||||
sort_category = "misc"
|
||||
cost = 1
|
||||
|
||||
/datum/gear/matchbook
|
||||
display_name = "matchbook"
|
||||
path = /obj/item/weapon/storage/box/matches
|
||||
sort_category = "misc"
|
||||
cost = 2
|
||||
|
||||
/datum/gear/comb
|
||||
display_name = "purple comb"
|
||||
path = /obj/item/weapon/haircomb
|
||||
sort_category = "misc"
|
||||
cost = 2
|
||||
|
||||
// Stuff worn on the ears. Items here go in the "ears" sort_category but they must not use
|
||||
// the slot_r_ear or slot_l_ear as the slot, or else players will spawn with no headset.
|
||||
/datum/gear/skrell_chain
|
||||
display_name = "skrell headtail-wear, female, chain"
|
||||
path = /obj/item/clothing/ears/skrell/chain
|
||||
cost = 2
|
||||
sort_category = "ears"
|
||||
whitelisted = "Skrell"
|
||||
|
||||
/datum/gear/skrell_plate
|
||||
display_name = "skrell headtail-wear, male, bands"
|
||||
path = /obj/item/clothing/ears/skrell/band
|
||||
cost = 2
|
||||
sort_category = "ears"
|
||||
whitelisted = "Skrell"
|
||||
|
||||
/datum/gear/skrell_cloth_male
|
||||
display_name = "skrell headtail-wear, male, cloth"
|
||||
path = /obj/item/clothing/ears/skrell/cloth_male
|
||||
cost = 2
|
||||
sort_category = "ears"
|
||||
whitelisted = "Skrell"
|
||||
|
||||
/datum/gear/skrell_cloth_female
|
||||
display_name = "skrell headtail-wear, female, cloth"
|
||||
path = /obj/item/clothing/ears/skrell/cloth_female
|
||||
cost = 2
|
||||
sort_category = "ears"
|
||||
whitelisted = "Skrell"
|
||||
@@ -243,6 +243,64 @@ BLIND // can't see anything
|
||||
slot_flags = SLOT_HEAD
|
||||
w_class = 2.0
|
||||
|
||||
var/light_overlay = "helmet_light"
|
||||
var/brightness_on
|
||||
var/on = 0
|
||||
|
||||
/obj/item/clothing/head/New()
|
||||
..()
|
||||
if(!icon_action_button && brightness_on)
|
||||
icon_action_button = "[icon_state]"
|
||||
|
||||
/obj/item/clothing/head/attack_self(mob/user)
|
||||
if(brightness_on)
|
||||
|
||||
if(!isturf(user.loc))
|
||||
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
|
||||
return
|
||||
|
||||
on = !on
|
||||
|
||||
overlays.Cut()
|
||||
if(on)
|
||||
if(!light_overlay_cache["[light_overlay]_icon"])
|
||||
light_overlay_cache["[light_overlay]_icon"] = image("icon" = 'icons/obj/light_overlays.dmi', "icon_state" = "[light_overlay]")
|
||||
if(!light_overlay_cache["[light_overlay]"])
|
||||
light_overlay_cache["[light_overlay]"] = image("icon" = 'icons/mob/light_overlays.dmi', "icon_state" = "[light_overlay]")
|
||||
overlays |= light_overlay_cache["[light_overlay]_icon"]
|
||||
user.SetLuminosity(user.luminosity + brightness_on)
|
||||
else
|
||||
user.SetLuminosity(user.luminosity - brightness_on)
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_head()
|
||||
|
||||
else
|
||||
return ..(user)
|
||||
|
||||
/obj/item/clothing/head/proc/update_light(mob/user)
|
||||
|
||||
if(!brightness_on)
|
||||
return
|
||||
|
||||
if(on)
|
||||
if(light_overlay) overlays |= light_overlay
|
||||
user.SetLuminosity(user.luminosity - brightness_on)
|
||||
SetLuminosity(brightness_on)
|
||||
|
||||
/obj/item/clothing/head/equipped(mob/user)
|
||||
..()
|
||||
update_light(user)
|
||||
|
||||
/obj/item/clothing/head/pickup(mob/user)
|
||||
..()
|
||||
update_light(user)
|
||||
|
||||
/obj/item/clothing/head/dropped(mob/user)
|
||||
..()
|
||||
update_light(user)
|
||||
|
||||
/obj/item/clothing/head/update_clothing_icon()
|
||||
if (ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
Skrell tentacle wear
|
||||
*/
|
||||
|
||||
/obj/item/clothing/ears/skrell
|
||||
name = "skrell tentacle wear"
|
||||
desc = "Some stuff worn by skrell to adorn their head tentacles."
|
||||
icon = 'icons/obj/clothing/ears.dmi'
|
||||
w_class = 1
|
||||
slot_flags = SLOT_EARS | SLOT_TWOEARS
|
||||
species_restricted = list("Skrell")
|
||||
|
||||
/obj/item/clothing/ears/skrell/chain
|
||||
name = "skrell headtail chains"
|
||||
desc = "A delicate golden chain worn by female skrell to decorate their head tails."
|
||||
icon_state = "skrell_chain"
|
||||
item_state = "skrell_chain"
|
||||
|
||||
/obj/item/clothing/ears/skrell/band
|
||||
name = "skrell headtail bands"
|
||||
desc = "Golden metallic bands worn by male skrell to adorn their head tails."
|
||||
icon_state = "skrell_band"
|
||||
item_state = "skrell_band"
|
||||
|
||||
/obj/item/clothing/ears/skrell/cloth_female
|
||||
name = "skrell headtail cloth"
|
||||
desc = "A cloth shawl worn by female skrell draped around their head tails."
|
||||
icon_state = "skrell_cloth_female"
|
||||
item_state = "skrell_cloth_female"
|
||||
|
||||
/obj/item/clothing/ears/skrell/cloth_male
|
||||
name = "skrell headtail cloth"
|
||||
desc = "A cloth band worn by male skrell around their head tails."
|
||||
icon_state = "skrell_cloth_male"
|
||||
item_state = "skrell_cloth_male"
|
||||
@@ -1,114 +0,0 @@
|
||||
/*
|
||||
Dear ninja gloves
|
||||
|
||||
This isn't because I like you
|
||||
this is because your father is a bastard
|
||||
|
||||
...
|
||||
I guess you're a little cool.
|
||||
-Sayu
|
||||
*/
|
||||
|
||||
/obj/item/clothing/gloves/space_ninja
|
||||
desc = "These nano-enhanced gloves insulate from electricity and provide fire resistance."
|
||||
name = "ninja gloves"
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja"
|
||||
siemens_coefficient = 0
|
||||
var/draining = 0
|
||||
var/candrain = 0
|
||||
var/mindrain = 200
|
||||
var/maxdrain = 400
|
||||
species_restricted = null
|
||||
|
||||
/*
|
||||
This runs the gamut of what ninja gloves can do
|
||||
The other option would be a dedicated ninja touch bullshit proc on everything
|
||||
which would probably more efficient, but ninjas are pretty rare.
|
||||
This was mostly introduced to keep ninja code from contaminating other code;
|
||||
with this in place it would be easier to untangle the rest of it.
|
||||
|
||||
For the drain proc, see events/ninja.dm
|
||||
*/
|
||||
/obj/item/clothing/gloves/space_ninja/Touch(var/atom/A,var/proximity)
|
||||
if(!candrain || draining) return 0
|
||||
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(!istype(H)) return 0 // what
|
||||
var/obj/item/clothing/suit/space/space_ninja/suit = H.wear_suit
|
||||
if(!istype(suit)) return 0
|
||||
if(isturf(A)) return 0
|
||||
|
||||
if(!proximity) // todo: you could add ninja stars or computer hacking here
|
||||
return 0
|
||||
|
||||
// Move an AI into and out of things
|
||||
if(istype(A,/mob/living/silicon/ai))
|
||||
if(suit.s_control)
|
||||
A.add_fingerprint(H)
|
||||
suit.transfer_ai("AICORE", "NINJASUIT", A, H)
|
||||
return 1
|
||||
else
|
||||
H << "\red <b>ERROR</b>: \black Remote access channel disabled."
|
||||
return 0
|
||||
|
||||
if(istype(A,/obj/structure/AIcore/deactivated))
|
||||
if(suit.s_control)
|
||||
A.add_fingerprint(H)
|
||||
suit.transfer_ai("INACTIVE","NINJASUIT",A, H)
|
||||
return 1
|
||||
else
|
||||
H << "\red <b>ERROR</b>: \black Remote access channel disabled."
|
||||
return 0
|
||||
if(istype(A,/obj/machinery/computer/aifixer))
|
||||
if(suit.s_control)
|
||||
A.add_fingerprint(H)
|
||||
suit.transfer_ai("AIFIXER","NINJASUIT",A, H)
|
||||
return 1
|
||||
else
|
||||
H << "\red <b>ERROR</b>: \black Remote access channel disabled."
|
||||
return 0
|
||||
|
||||
// steal energy from powered things
|
||||
if(istype(A,/mob/living/silicon/robot))
|
||||
A.add_fingerprint(H)
|
||||
drain("CYBORG",A,suit)
|
||||
return 1
|
||||
if(istype(A,/obj/machinery/power/apc))
|
||||
A.add_fingerprint(H)
|
||||
drain("APC",A,suit)
|
||||
return 1
|
||||
if(istype(A,/obj/structure/cable))
|
||||
A.add_fingerprint(H)
|
||||
drain("WIRE",A,suit)
|
||||
return 1
|
||||
if(istype(A,/obj/structure/grille))
|
||||
var/obj/structure/cable/C = locate() in A.loc
|
||||
if(C)
|
||||
drain("WIRE",C,suit)
|
||||
return 1
|
||||
if(istype(A,/obj/machinery/power/smes))
|
||||
A.add_fingerprint(H)
|
||||
drain("SMES",A,suit)
|
||||
return 1
|
||||
if(istype(A,/obj/mecha))
|
||||
A.add_fingerprint(H)
|
||||
drain("MECHA",A,suit)
|
||||
return 1
|
||||
|
||||
// download research
|
||||
if(istype(A,/obj/machinery/computer/rdconsole))
|
||||
A.add_fingerprint(H)
|
||||
drain("RESEARCH",A,suit)
|
||||
return 1
|
||||
if(istype(A,/obj/machinery/r_n_d/server))
|
||||
A.add_fingerprint(H)
|
||||
var/obj/machinery/r_n_d/server/S = A
|
||||
if(S.disabled)
|
||||
return 1
|
||||
if(S.shocked)
|
||||
S.shock(H,50)
|
||||
return 1
|
||||
drain("RESEARCH",A,suit)
|
||||
return 1
|
||||
|
||||
@@ -4,38 +4,13 @@
|
||||
icon_state = "hardhat0_yellow"
|
||||
flags = FPRINT | TABLEPASS
|
||||
item_state = "hardhat0_yellow"
|
||||
var/brightness_on = 4 //luminosity when on
|
||||
var/on = 0
|
||||
brightness_on = 4 //luminosity when on
|
||||
light_overlay = "hardhat_light"
|
||||
item_color = "yellow" //Determines used sprites: hardhat[on]_[color] and hardhat[on]_[color]2 (lying down sprite)
|
||||
armor = list(melee = 30, bullet = 5, laser = 20,energy = 10, bomb = 20, bio = 10, rad = 20)
|
||||
flags_inv = 0
|
||||
icon_action_button = "action_hardhat"
|
||||
siemens_coefficient = 0.9
|
||||
|
||||
attack_self(mob/user)
|
||||
if(!isturf(user.loc))
|
||||
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
|
||||
return
|
||||
on = !on
|
||||
icon_state = "hardhat[on]_[item_color]"
|
||||
item_state = "hardhat[on]_[item_color]"
|
||||
|
||||
if(on) user.SetLuminosity(user.luminosity + brightness_on)
|
||||
else user.SetLuminosity(user.luminosity - brightness_on)
|
||||
|
||||
pickup(mob/user)
|
||||
if(on)
|
||||
user.SetLuminosity(user.luminosity + brightness_on)
|
||||
// user.UpdateLuminosity() //TODO: Carn
|
||||
SetLuminosity(0)
|
||||
|
||||
dropped(mob/user)
|
||||
if(on)
|
||||
user.SetLuminosity(user.luminosity - brightness_on)
|
||||
// user.UpdateLuminosity()
|
||||
SetLuminosity(brightness_on)
|
||||
|
||||
|
||||
/obj/item/clothing/head/hardhat/orange
|
||||
icon_state = "hardhat0_orange"
|
||||
item_state = "hardhat0_orange"
|
||||
@@ -61,5 +36,4 @@
|
||||
/obj/item/clothing/head/hardhat/dblue
|
||||
icon_state = "hardhat0_dblue"
|
||||
item_state = "hardhat0_dblue"
|
||||
item_color = "dblue"
|
||||
|
||||
item_color = "dblue"
|
||||
@@ -126,33 +126,10 @@
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR
|
||||
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
|
||||
body_parts_covered = HEAD|EYES
|
||||
var/brightness_on = 2 //luminosity when on
|
||||
var/on = 0
|
||||
brightness_on = 2
|
||||
light_overlay = "helmet_light"
|
||||
w_class = 3
|
||||
|
||||
attack_self(mob/user)
|
||||
if(!isturf(user.loc))
|
||||
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
|
||||
return
|
||||
on = !on
|
||||
icon_state = "hardhat[on]_[item_color]"
|
||||
item_state = "hardhat[on]_[item_color]"
|
||||
|
||||
if(on) user.SetLuminosity(user.luminosity + brightness_on)
|
||||
else user.SetLuminosity(user.luminosity - brightness_on)
|
||||
|
||||
pickup(mob/user)
|
||||
if(on)
|
||||
user.SetLuminosity(user.luminosity + brightness_on)
|
||||
// user.UpdateLuminosity()
|
||||
SetLuminosity(0)
|
||||
|
||||
dropped(mob/user)
|
||||
if(on)
|
||||
user.SetLuminosity(user.luminosity - brightness_on)
|
||||
// user.UpdateLuminosity()
|
||||
SetLuminosity(brightness_on)
|
||||
|
||||
/*
|
||||
* Kitty ears
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "breath mask"
|
||||
icon_state = "breath"
|
||||
item_state = "breath"
|
||||
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKINTERNALS
|
||||
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | AIRTIGHT
|
||||
body_parts_covered = 0
|
||||
w_class = 2
|
||||
gas_transfer_coefficient = 0.10
|
||||
@@ -24,14 +24,14 @@
|
||||
if(!src.hanging)
|
||||
src.hanging = !src.hanging
|
||||
gas_transfer_coefficient = 1 //gas is now escaping to the turf and vice versa
|
||||
flags &= ~(MASKCOVERSMOUTH | MASKINTERNALS)
|
||||
flags &= ~(MASKCOVERSMOUTH | AIRTIGHT)
|
||||
icon_state = "breathdown"
|
||||
usr << "Your mask is now hanging on your neck."
|
||||
|
||||
else
|
||||
src.hanging = !src.hanging
|
||||
gas_transfer_coefficient = 0.10
|
||||
flags |= MASKCOVERSMOUTH | MASKINTERNALS
|
||||
flags |= MASKCOVERSMOUTH | AIRTIGHT
|
||||
icon_state = "breath"
|
||||
usr << "You pull the mask up to cover your face."
|
||||
update_clothing_icon()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "gas mask"
|
||||
desc = "A face-covering mask that can be connected to an air supply. Filters harmful gases from the air."
|
||||
icon_state = "gas_alt"
|
||||
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
|
||||
flags = FPRINT | TABLEPASS | MASKCOVERSMOUTH | MASKCOVERSEYES | BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT
|
||||
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE
|
||||
body_parts_covered = FACE|EYES
|
||||
w_class = 3.0
|
||||
@@ -48,22 +48,6 @@
|
||||
icon_state = "swat"
|
||||
siemens_coefficient = 0.7
|
||||
|
||||
/obj/item/clothing/mask/gas/voice
|
||||
name = "gas mask"
|
||||
//desc = "A face-covering mask that can be connected to an air supply. It seems to house some odd electronics."
|
||||
var/mode = 0// 0==Scouter | 1==Night Vision | 2==Thermal | 3==Meson
|
||||
var/voice = "Unknown"
|
||||
var/vchange = 0//This didn't do anything before. It now checks if the mask has special functions/N
|
||||
origin_tech = "syndicate=4"
|
||||
|
||||
/obj/item/clothing/mask/gas/voice/space_ninja
|
||||
name = "ninja mask"
|
||||
desc = "A close-fitting mask that acts both as an air filter and a post-modern fashion statement."
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja_mask"
|
||||
vchange = 1
|
||||
siemens_coefficient = 0.2
|
||||
|
||||
/obj/item/clothing/mask/gas/clown_hat
|
||||
name = "clown wig and mask"
|
||||
desc = "A true prankster's facial attire. A clown is incomplete without his wig and mask."
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/obj/item/voice_changer
|
||||
name = "voice changer"
|
||||
desc = "A voice scrambling module. If you can see this, report it as a bug on the tracker."
|
||||
var/voice //If set and item is present in mask/suit, this name will be used for the wearer's speech.
|
||||
var/active
|
||||
|
||||
/obj/item/clothing/mask/gas/voice
|
||||
name = "gas mask"
|
||||
desc = "A face-covering mask that can be connected to an air supply. It seems to house some odd electronics."
|
||||
var/obj/item/voice_changer/changer
|
||||
origin_tech = "syndicate=4"
|
||||
|
||||
/obj/item/clothing/mask/gas/voice/New()
|
||||
..()
|
||||
changer = new(src)
|
||||
|
||||
/obj/item/clothing/mask/gas/voice/space_ninja
|
||||
name = "ninja mask"
|
||||
desc = "A close-fitting mask that acts both as an air filter and a post-modern fashion statement."
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja_mask"
|
||||
siemens_coefficient = 0.2
|
||||
@@ -36,21 +36,6 @@
|
||||
heat_protection = FEET
|
||||
max_heat_protection_temperature = SHOE_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
|
||||
/obj/item/clothing/shoes/space_ninja
|
||||
name = "ninja shoes"
|
||||
desc = "A pair of running shoes. Excellent for running and even better for smashing skulls."
|
||||
icon_state = "s-ninja"
|
||||
permeability_coefficient = 0.01
|
||||
flags = NOSLIP
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
siemens_coefficient = 0.2
|
||||
|
||||
cold_protection = FEET
|
||||
min_cold_protection_temperature = SHOE_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
heat_protection = FEET
|
||||
max_heat_protection_temperature = SHOE_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
species_restricted = null
|
||||
|
||||
/obj/item/clothing/shoes/sandal
|
||||
desc = "A pair of rather plain, wooden sandals."
|
||||
name = "sandals"
|
||||
|
||||
@@ -35,50 +35,6 @@
|
||||
item_state = "skrell_suit_black"
|
||||
item_color = "skrell_suit_black"
|
||||
|
||||
//Unathi space gear. Huge and restrictive.
|
||||
/obj/item/clothing/head/helmet/space/unathi
|
||||
armor = list(melee = 40, bullet = 30, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 50)
|
||||
heat_protection = HEAD
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
var/up = 0 //So Unathi helmets play nicely with the weldervision check.
|
||||
species_restricted = list("Unathi")
|
||||
|
||||
/obj/item/clothing/head/helmet/space/unathi/helmet_cheap
|
||||
name = "NT breacher helmet"
|
||||
desc = "Hey! Watch it with that thing! It's a knock-off of a Unathi battle-helm, and that spike could put someone's eye out."
|
||||
icon_state = "unathi_helm_cheap"
|
||||
item_state = "unathi_helm_cheap"
|
||||
item_color = "unathi_helm_cheap"
|
||||
|
||||
/obj/item/clothing/suit/space/unathi
|
||||
armor = list(melee = 40, bullet = 30, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 50)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
species_restricted = list("Unathi")
|
||||
|
||||
/obj/item/clothing/suit/space/unathi/rig_cheap
|
||||
name = "NT breacher chassis"
|
||||
desc = "A cheap NT knock-off of a Unathi battle-rig. Looks like a fish, moves like a fish, steers like a cow."
|
||||
icon_state = "rig-unathi-cheap"
|
||||
item_state = "rig-unathi-cheap"
|
||||
slowdown = 3
|
||||
|
||||
/obj/item/clothing/head/helmet/space/unathi/breacher
|
||||
name = "breacher helm"
|
||||
desc = "Weathered, ancient and battle-scarred. The helmet is too."
|
||||
icon_state = "unathi_breacher"
|
||||
item_state = "unathi_breacher"
|
||||
item_color = "unathi_breacher"
|
||||
|
||||
/obj/item/clothing/suit/space/unathi/breacher
|
||||
name = "breacher chassis"
|
||||
desc = "Huge, bulky and absurdly heavy. It must be like wearing a tank."
|
||||
icon_state = "unathi_breacher"
|
||||
item_state = "unathi_breacher"
|
||||
item_color = "unathi_breacher"
|
||||
slowdown = 1
|
||||
|
||||
// Vox space gear (vaccuum suit, low pressure armour)
|
||||
// Can't be equipped by any other species due to bone structure and vox cybernetics.
|
||||
/obj/item/clothing/suit/space/vox
|
||||
|
||||
@@ -1,85 +0,0 @@
|
||||
/obj/item/clothing/head/helmet/space/rig/ert
|
||||
name = "emergency response team helmet"
|
||||
desc = "A helmet worn by members of the NanoTrasen Emergency Response Team. Armoured and space ready."
|
||||
icon_state = "rig0-ert_commander"
|
||||
item_state = "helm-command"
|
||||
armor = list(melee = 50, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 60)
|
||||
siemens_coefficient = 0.6
|
||||
var/obj/machinery/camera/camera
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/ert/attack_self(mob/user)
|
||||
if(camera)
|
||||
..(user)
|
||||
else
|
||||
camera = new /obj/machinery/camera(src)
|
||||
camera.network = list("ERT")
|
||||
cameranet.removeCamera(camera)
|
||||
camera.c_tag = user.name
|
||||
user << "\blue User scanned as [camera.c_tag]. Camera activated."
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/ert/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
user << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
|
||||
|
||||
/obj/item/clothing/suit/space/rig/ert
|
||||
name = "emergency response team suit"
|
||||
desc = "A suit worn by members of the NanoTrasen Emergency Response Team. Armoured, space ready, and fire resistant."
|
||||
icon_state = "ert_commander"
|
||||
item_state = "suit-command"
|
||||
w_class = 3
|
||||
slowdown = 1
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 100)
|
||||
allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, /obj/item/weapon/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/wirecutters, /obj/item/weapon/wrench, /obj/item/device/multitool, /obj/item/device/radio, /obj/item/device/analyzer, /obj/item/weapon/melee/baton, /obj/item/weapon/gun, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/handcuffs, /obj/item/weapon/storage/briefcase/inflatable)
|
||||
siemens_coefficient = 0.6
|
||||
|
||||
//Commander
|
||||
/obj/item/clothing/head/helmet/space/rig/ert/commander
|
||||
name = "emergency response team commander helmet"
|
||||
desc = "A helmet worn by the commander of a NanoTrasen Emergency Response Team. Has blue highlights. Armoured and space ready."
|
||||
icon_state = "rig0-ert_commander"
|
||||
item_state = "helm-command"
|
||||
item_color = "ert_commander"
|
||||
|
||||
/obj/item/clothing/suit/space/rig/ert/commander
|
||||
name = "emergency response team commander suit"
|
||||
desc = "A suit worn by the commander of a NanoTrasen Emergency Response Team. Has blue highlights. Armoured, space ready, and fire resistant."
|
||||
icon_state = "ert_commander"
|
||||
item_state = "suit-command"
|
||||
|
||||
//Security
|
||||
/obj/item/clothing/head/helmet/space/rig/ert/security
|
||||
name = "emergency response team security helmet"
|
||||
desc = "A helmet worn by security members of a NanoTrasen Emergency Response Team. Has red highlights. Armoured and space ready."
|
||||
icon_state = "rig0-ert_security"
|
||||
item_state = "syndicate-helm-black-red"
|
||||
item_color = "ert_security"
|
||||
|
||||
/obj/item/clothing/suit/space/rig/ert/security
|
||||
name = "emergency response team security suit"
|
||||
desc = "A suit worn by security members of a NanoTrasen Emergency Response Team. Has red highlights. Armoured, space ready, and fire resistant."
|
||||
icon_state = "ert_security"
|
||||
item_state = "syndicate-black-red"
|
||||
|
||||
//Engineer
|
||||
/obj/item/clothing/head/helmet/space/rig/ert/engineer
|
||||
name = "emergency response team engineer helmet"
|
||||
desc = "A helmet worn by engineering members of a NanoTrasen Emergency Response Team. Has orange highlights. Armoured and space ready."
|
||||
icon_state = "rig0-ert_engineer"
|
||||
item_color = "ert_engineer"
|
||||
|
||||
/obj/item/clothing/suit/space/rig/ert/engineer
|
||||
name = "emergency response team engineer suit"
|
||||
desc = "A suit worn by the engineering of a NanoTrasen Emergency Response Team. Has orange highlights. Armoured, space ready, and fire resistant."
|
||||
icon_state = "ert_engineer"
|
||||
|
||||
//Medical
|
||||
/obj/item/clothing/head/helmet/space/rig/ert/medical
|
||||
name = "emergency response team medical helmet"
|
||||
desc = "A helmet worn by medical members of a NanoTrasen Emergency Response Team. Has white highlights. Armoured and space ready."
|
||||
icon_state = "rig0-ert_medical"
|
||||
item_color = "ert_medical"
|
||||
|
||||
/obj/item/clothing/suit/space/rig/ert/medical
|
||||
name = "emergency response team medical suit"
|
||||
desc = "A suit worn by medical members of a NanoTrasen Emergency Response Team. Has white highlights. Armoured and space ready."
|
||||
icon_state = "ert_medical"
|
||||
@@ -1,71 +0,0 @@
|
||||
/obj/item/clothing/head/helmet/space/space_ninja
|
||||
desc = "What may appear to be a simple black garment is in fact a highly sophisticated nano-weave helmet. Standard issue ninja gear."
|
||||
name = "ninja hood"
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja_mask"
|
||||
allowed = list(/obj/item/weapon/cell)
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 25)
|
||||
siemens_coefficient = 0.2
|
||||
species_restricted = null
|
||||
body_parts_covered = HEAD|FACE
|
||||
flags_inv = HIDEEARS|HIDEEYES|HIDEFACE
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja
|
||||
name = "ninja suit"
|
||||
desc = "A unique, vaccum-proof suit of nano-enhanced armor designed specifically for Spider Clan assassins."
|
||||
icon_state = "s-ninja"
|
||||
item_state = "s-ninja_suit"
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/cell)
|
||||
slowdown = 0
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
siemens_coefficient = 0.2
|
||||
species_restricted = null //Workaround for spawning alien ninja without internals.
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
flags_inv = HIDEJUMPSUIT|HIDETAIL
|
||||
supporting_limbs = list()
|
||||
|
||||
// Hardsuit breaching data
|
||||
breach_threshold = 30 //A suit breach is a major issue for ninjas. This should maybe help.
|
||||
can_breach = 1
|
||||
|
||||
//Important parts of the suit.
|
||||
var/mob/living/carbon/affecting = null//The wearer.
|
||||
var/obj/item/weapon/cell/cell//Starts out with a high-capacity cell using New().
|
||||
var/datum/effect/effect/system/spark_spread/spark_system//To create sparks.
|
||||
var/reagent_list[] = list("tricordrazine","tramadol","dexalinp","spaceacillin","anti_toxin","nutriment","radium","hyronalin")//The reagents ids which are added to the suit at New().
|
||||
var/stored_research[]//For stealing station research.
|
||||
var/obj/item/weapon/disk/tech_disk/t_disk//To copy design onto disk.
|
||||
|
||||
//Other articles of ninja gear worn together, used to easily reference them after initializing.
|
||||
var/obj/item/clothing/head/helmet/space/space_ninja/n_hood
|
||||
var/obj/item/clothing/shoes/space_ninja/n_shoes
|
||||
var/obj/item/clothing/gloves/space_ninja/n_gloves
|
||||
|
||||
//Main function variables.
|
||||
var/s_initialized = 0//Suit starts off.
|
||||
var/s_coold = 0//If the suit is on cooldown. Can be used to attach different cooldowns to abilities. Ticks down every second based on suit ntick().
|
||||
var/s_cost = 5.0//Base energy cost each ntick.
|
||||
var/s_acost = 25.0//Additional cost for additional powers active.
|
||||
var/k_cost = 200.0//Kamikaze energy cost each ntick.
|
||||
var/k_damage = 1.0//Brute damage potentially done by Kamikaze each ntick.
|
||||
var/s_delay = 40.0//How fast the suit does certain things, lower is faster. Can be overridden in specific procs. Also determines adverse probability.
|
||||
var/a_transfer = 20.0//How much reagent is transferred when injecting.
|
||||
var/r_maxamount = 80.0//How much reagent in total there is.
|
||||
|
||||
//Support function variables.
|
||||
var/spideros = 0//Mode of SpiderOS. This can change so I won't bother listing the modes here (0 is hub). Check ninja_equipment.dm for how it all works.
|
||||
var/s_active = 0//Stealth off.
|
||||
var/s_busy = 0//Is the suit busy with a process? Like AI hacking. Used for safety functions.
|
||||
var/kamikaze = 0//Kamikaze on or off.
|
||||
var/k_unlock = 0//To unlock Kamikaze.
|
||||
|
||||
//Ability function variables.
|
||||
var/s_bombs = 10.0//Number of starting ninja smoke bombs.
|
||||
var/a_boost = 3.0//Number of adrenaline boosters.
|
||||
|
||||
//Onboard AI related variables.
|
||||
var/mob/living/silicon/ai/AI//If there is an AI inside the suit.
|
||||
var/obj/item/device/paicard/pai//A slot for a pAI device
|
||||
var/obj/effect/overlay/hologram//Is the AI hologram on or off? Visible only to the wearer of the suit. This works by attaching an image to a blank overlay.
|
||||
var/flush = 0//If an AI purge is in progress.
|
||||
var/s_control = 1//If user in control of the suit.
|
||||
@@ -1,477 +0,0 @@
|
||||
//Regular rig suits
|
||||
/obj/item/clothing/head/helmet/space/rig
|
||||
name = "hardsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low-pressure environment."
|
||||
icon_state = "rig0-engineering"
|
||||
item_state = "eng_helm"
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20)
|
||||
allowed = list(/obj/item/device/flashlight)
|
||||
var/brightness_on = 4 //luminosity when on
|
||||
var/on = 0
|
||||
item_color = "engineering" //Determines used sprites: rig[on]-[color] and rig[on]-[color]2 (lying down sprite)
|
||||
icon_action_button = "action_hardhat"
|
||||
heat_protection = HEAD
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
|
||||
//Species-specific stuff.
|
||||
species_restricted = list("exclude","Unathi","Tajara","Skrell","Diona","Vox")
|
||||
sprite_sheets_refit = list(
|
||||
"Unathi" = 'icons/mob/species/unathi/helmet.dmi',
|
||||
"Tajara" = 'icons/mob/species/tajaran/helmet.dmi',
|
||||
"Skrell" = 'icons/mob/species/skrell/helmet.dmi',
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Unathi" = 'icons/obj/clothing/species/unathi/hats.dmi',
|
||||
"Tajara" = 'icons/obj/clothing/species/tajaran/hats.dmi',
|
||||
"Skrell" = 'icons/obj/clothing/species/skrell/hats.dmi',
|
||||
)
|
||||
|
||||
attack_self(mob/user)
|
||||
if(!isturf(user.loc))
|
||||
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
|
||||
return
|
||||
on = !on
|
||||
icon_state = "rig[on]-[item_color]"
|
||||
// item_state = "rig[on]-[color]"
|
||||
|
||||
if(on) user.SetLuminosity(user.luminosity + brightness_on)
|
||||
else user.SetLuminosity(user.luminosity - brightness_on)
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_head()
|
||||
|
||||
pickup(mob/user)
|
||||
if(on)
|
||||
user.SetLuminosity(user.luminosity + brightness_on)
|
||||
// user.UpdateLuminosity()
|
||||
SetLuminosity(0)
|
||||
|
||||
dropped(mob/user)
|
||||
if(on)
|
||||
user.SetLuminosity(user.luminosity - brightness_on)
|
||||
// user.UpdateLuminosity()
|
||||
SetLuminosity(brightness_on)
|
||||
|
||||
/obj/item/clothing/suit/space/rig
|
||||
name = "hardsuit"
|
||||
desc = "A special space suit for environments that might pose hazards beyond just the vacuum of space. Provides more protection than a standard space suit."
|
||||
icon_state = "rig-engineering"
|
||||
item_state = "eng_hardsuit"
|
||||
slowdown = 1
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit)
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
|
||||
species_restricted = list("exclude","Unathi","Tajara","Diona","Vox")
|
||||
sprite_sheets_refit = list(
|
||||
"Unathi" = 'icons/mob/species/unathi/suit.dmi',
|
||||
"Tajara" = 'icons/mob/species/tajaran/suit.dmi',
|
||||
"Skrell" = 'icons/mob/species/skrell/suit.dmi',
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Unathi" = 'icons/obj/clothing/species/unathi/suits.dmi',
|
||||
"Tajara" = 'icons/obj/clothing/species/tajaran/suits.dmi',
|
||||
"Skrell" = 'icons/obj/clothing/species/skrell/suits.dmi',
|
||||
)
|
||||
|
||||
//Breach thresholds, should ideally be inherited by most (if not all) hardsuits.
|
||||
breach_threshold = 18
|
||||
can_breach = 1
|
||||
|
||||
//Component/device holders.
|
||||
var/obj/item/weapon/stock_parts/gloves = null // Basic capacitor allows insulation, upgrades allow shock gloves etc.
|
||||
|
||||
var/attached_boots = 1 // Can't wear boots if some are attached
|
||||
var/obj/item/clothing/shoes/magboots/boots = null // Deployable boots, if any.
|
||||
var/attached_helmet = 1 // Can't wear a helmet if one is deployable.
|
||||
var/obj/item/clothing/head/helmet/helmet = null // Deployable helmet, if any.
|
||||
|
||||
var/list/max_mounted_devices = 0 // Maximum devices. Easy.
|
||||
var/list/can_mount = null // Types of device that can be hardpoint mounted.
|
||||
var/list/mounted_devices = null // Holder for the above device.
|
||||
var/obj/item/active_device = null // Currently deployed device, if any.
|
||||
|
||||
/obj/item/clothing/suit/space/rig/equipped(mob/M)
|
||||
..()
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(!istype(H)) return
|
||||
|
||||
if(H.wear_suit != src)
|
||||
return
|
||||
|
||||
if(attached_helmet && helmet)
|
||||
if(H.head)
|
||||
M << "You are unable to deploy your suit's helmet as \the [H.head] is in the way."
|
||||
else
|
||||
M << "Your suit's helmet deploys with a hiss."
|
||||
//TODO: Species check, skull damage for forcing an unfitting helmet on?
|
||||
helmet.loc = H
|
||||
H.equip_to_slot(helmet, slot_head)
|
||||
helmet.canremove = 0
|
||||
|
||||
if(attached_boots && boots)
|
||||
if(H.shoes)
|
||||
M << "You are unable to deploy your suit's magboots as \the [H.shoes] are in the way."
|
||||
else
|
||||
M << "Your suit's boots deploy with a hiss."
|
||||
boots.loc = H
|
||||
H.equip_to_slot(boots, slot_shoes)
|
||||
boots.canremove = 0
|
||||
|
||||
/obj/item/clothing/suit/space/rig/dropped()
|
||||
..()
|
||||
|
||||
var/mob/living/carbon/human/H
|
||||
|
||||
if(helmet)
|
||||
H = helmet.loc
|
||||
if(istype(H))
|
||||
if(helmet && H.head == helmet)
|
||||
helmet.canremove = 1
|
||||
H.drop_from_inventory(helmet)
|
||||
helmet.loc = src
|
||||
|
||||
if(boots)
|
||||
H = boots.loc
|
||||
if(istype(H))
|
||||
if(boots && H.shoes == boots)
|
||||
boots.canremove = 1
|
||||
H.drop_from_inventory(boots)
|
||||
boots.loc = src
|
||||
|
||||
/*
|
||||
/obj/item/clothing/suit/space/rig/verb/get_mounted_device()
|
||||
|
||||
set name = "Deploy Mounted Device"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(!can_mount)
|
||||
verbs -= /obj/item/clothing/suit/space/rig/verb/get_mounted_device
|
||||
verbs -= /obj/item/clothing/suit/space/rig/verb/stow_mounted_device
|
||||
return
|
||||
|
||||
if(!istype(usr, /mob/living)) return
|
||||
if(usr.stat) return
|
||||
|
||||
if(active_device)
|
||||
usr << "You already have \the [active_device] deployed."
|
||||
return
|
||||
|
||||
if(!mounted_devices.len)
|
||||
usr << "You do not have any devices mounted on \the [src]."
|
||||
return
|
||||
|
||||
/obj/item/clothing/suit/space/rig/verb/stow_mounted_device()
|
||||
|
||||
set name = "Stow Mounted Device"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(!can_mount)
|
||||
verbs -= /obj/item/clothing/suit/space/rig/verb/get_mounted_device
|
||||
verbs -= /obj/item/clothing/suit/space/rig/verb/stow_mounted_device
|
||||
return
|
||||
|
||||
if(!istype(usr, /mob/living)) return
|
||||
|
||||
if(usr.stat) return
|
||||
|
||||
if(!active_device)
|
||||
usr << "You have no device currently deployed."
|
||||
return
|
||||
*/
|
||||
|
||||
/obj/item/clothing/suit/space/rig/verb/toggle_helmet()
|
||||
|
||||
set name = "Toggle Helmet"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(!istype(src.loc,/mob/living)) return
|
||||
|
||||
if(!helmet)
|
||||
usr << "There is no helmet installed."
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = usr
|
||||
|
||||
if(!istype(H)) return
|
||||
if(H.stat) return
|
||||
if(H.wear_suit != src) return
|
||||
|
||||
if(H.head == helmet)
|
||||
helmet.canremove = 1
|
||||
H.drop_from_inventory(helmet)
|
||||
helmet.loc = src
|
||||
H << "\blue You retract your hardsuit helmet."
|
||||
else
|
||||
if(H.head)
|
||||
H << "\red You cannot deploy your helmet while wearing another helmet."
|
||||
return
|
||||
//TODO: Species check, skull damage for forcing an unfitting helmet on?
|
||||
helmet.loc = H
|
||||
helmet.pickup(H)
|
||||
H.equip_to_slot(helmet, slot_head)
|
||||
helmet.canremove = 0
|
||||
H << "\blue You deploy your hardsuit helmet, sealing you off from the world."
|
||||
|
||||
/obj/item/clothing/suit/space/rig/attackby(obj/item/W as obj, mob/user as mob)
|
||||
|
||||
if(!istype(user,/mob/living)) return
|
||||
|
||||
if(user.a_intent == "help")
|
||||
|
||||
if(istype(src.loc,/mob/living))
|
||||
user << "How do you propose to modify a hardsuit while it is being worn?"
|
||||
return
|
||||
|
||||
var/target_zone = user.zone_sel.selecting
|
||||
|
||||
if(target_zone == "head")
|
||||
|
||||
//Installing a component into or modifying the contents of the helmet.
|
||||
if(!attached_helmet)
|
||||
user << "\The [src] does not have a helmet mount."
|
||||
return
|
||||
|
||||
if(istype(W,/obj/item/weapon/screwdriver))
|
||||
if(!helmet)
|
||||
user << "\The [src] does not have a helmet installed."
|
||||
else
|
||||
user << "You detatch \the [helmet] from \the [src]'s helmet mount."
|
||||
helmet.loc = get_turf(src)
|
||||
src.helmet = null
|
||||
return
|
||||
else if(istype(W,/obj/item/clothing/head/helmet/space))
|
||||
if(helmet)
|
||||
user << "\The [src] already has a helmet installed."
|
||||
else
|
||||
user << "You attach \the [W] to \the [src]'s helmet mount."
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
src.helmet = W
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
else if(target_zone == "l_leg" || target_zone == "r_leg" || target_zone == "l_foot" || target_zone == "r_foot")
|
||||
|
||||
//Installing a component into or modifying the contents of the feet.
|
||||
if(!attached_boots)
|
||||
user << "\The [src] does not have boot mounts."
|
||||
return
|
||||
|
||||
if(istype(W,/obj/item/weapon/screwdriver))
|
||||
if(!boots)
|
||||
user << "\The [src] does not have any boots installed."
|
||||
else
|
||||
user << "You detatch \the [boots] from \the [src]'s boot mounts."
|
||||
boots.loc = get_turf(src)
|
||||
boots = null
|
||||
return
|
||||
else if(istype(W,/obj/item/clothing/shoes/magboots))
|
||||
if(boots)
|
||||
user << "\The [src] already has magboots installed."
|
||||
else
|
||||
user << "You attach \the [W] to \the [src]'s boot mounts."
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
boots = W
|
||||
else
|
||||
return ..()
|
||||
|
||||
/*
|
||||
else if(target_zone == "l_arm" || target_zone == "r_arm" || target_zone == "l_hand" || target_zone == "r_hand")
|
||||
|
||||
//Installing a component into or modifying the contents of the hands.
|
||||
|
||||
else if(target_zone == "torso" || target_zone == "groin")
|
||||
|
||||
//Modifying the cell or mounted devices
|
||||
|
||||
if(!mounted_devices)
|
||||
return
|
||||
*/
|
||||
|
||||
else //wat
|
||||
return ..()
|
||||
|
||||
..()
|
||||
|
||||
//Engineering rig
|
||||
/obj/item/clothing/head/helmet/space/rig/engineering
|
||||
name = "engineering hardsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding."
|
||||
icon_state = "rig0-engineering"
|
||||
item_state = "eng_helm"
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 80)
|
||||
|
||||
/obj/item/clothing/suit/space/rig/engineering
|
||||
name = "engineering hardsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has radiation shielding."
|
||||
icon_state = "rig-engineering"
|
||||
item_state = "eng_hardsuit"
|
||||
slowdown = 1
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 80)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
|
||||
|
||||
//Chief Engineer's rig
|
||||
/obj/item/clothing/head/helmet/space/rig/engineering/chief
|
||||
name = "advanced hardsuit helmet"
|
||||
desc = "An advanced helmet designed for work in a hazardous, low pressure environment. Shines with a high polish."
|
||||
icon_state = "rig0-white"
|
||||
item_state = "ce_helm"
|
||||
item_color = "white"
|
||||
sprite_sheets_refit = null
|
||||
sprite_sheets_obj = null
|
||||
|
||||
/obj/item/clothing/suit/space/rig/engineering/chief
|
||||
icon_state = "rig-white"
|
||||
name = "advanced hardsuit"
|
||||
desc = "An advanced suit that protects against hazardous, low pressure environments. Shines with a high polish."
|
||||
item_state = "ce_hardsuit"
|
||||
sprite_sheets_refit = null
|
||||
sprite_sheets_obj = null
|
||||
|
||||
//Mining rig
|
||||
/obj/item/clothing/head/helmet/space/rig/mining
|
||||
name = "mining hardsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environment. Has reinforced plating."
|
||||
icon_state = "rig0-mining"
|
||||
item_state = "mining_helm"
|
||||
item_color = "mining"
|
||||
armor = list(melee = 50, bullet = 5, laser = 20,energy = 5, bomb = 55, bio = 100, rad = 20)
|
||||
|
||||
/obj/item/clothing/suit/space/rig/mining
|
||||
icon_state = "rig-mining"
|
||||
name = "mining hardsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has reinforced plating."
|
||||
item_state = "mining_hardsuit"
|
||||
armor = list(melee = 50, bullet = 5, laser = 20,energy = 5, bomb = 55, bio = 100, rad = 20)
|
||||
|
||||
|
||||
//Syndicate rig
|
||||
/obj/item/clothing/head/helmet/space/rig/syndi
|
||||
name = "blood-red hardsuit helmet"
|
||||
desc = "An advanced helmet designed for work in special operations. Property of Gorlex Marauders."
|
||||
icon_state = "rig0-syndie"
|
||||
item_state = "syndie_helm"
|
||||
item_color = "syndie"
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 60)
|
||||
siemens_coefficient = 0.6
|
||||
var/obj/machinery/camera/camera
|
||||
species_restricted = list("exclude","Unathi","Tajara","Skrell","Vox")
|
||||
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/syndi/attack_self(mob/user)
|
||||
if(camera)
|
||||
..(user)
|
||||
else
|
||||
camera = new /obj/machinery/camera(src)
|
||||
camera.network = list("NUKE")
|
||||
cameranet.removeCamera(camera)
|
||||
camera.c_tag = user.name
|
||||
user << "\blue User scanned as [camera.c_tag]. Camera activated."
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/syndi/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
user << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
|
||||
|
||||
/obj/item/clothing/suit/space/rig/syndi
|
||||
icon_state = "rig-syndie"
|
||||
name = "blood-red hardsuit"
|
||||
desc = "An advanced suit that protects against injuries during special operations. Property of Gorlex Marauders."
|
||||
item_state = "syndie_hardsuit"
|
||||
slowdown = 1
|
||||
w_class = 3
|
||||
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 60)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs)
|
||||
siemens_coefficient = 0.6
|
||||
species_restricted = list("exclude","Unathi","Tajara","Skrell","Vox")
|
||||
|
||||
|
||||
//Wizard Rig
|
||||
/obj/item/clothing/head/helmet/space/rig/wizard
|
||||
name = "gem-encrusted hardsuit helmet"
|
||||
desc = "A bizarre gem-encrusted helmet that radiates magical energies."
|
||||
icon_state = "rig0-wiz"
|
||||
item_state = "wiz_helm"
|
||||
item_color = "wiz"
|
||||
unacidable = 1 //No longer shall our kind be foiled by lone chemists with spray bottles!
|
||||
armor = list(melee = 40, bullet = 20, laser = 20,energy = 20, bomb = 35, bio = 100, rad = 60)
|
||||
siemens_coefficient = 0.7
|
||||
sprite_sheets_refit = null
|
||||
sprite_sheets_obj = null
|
||||
|
||||
/obj/item/clothing/suit/space/rig/wizard
|
||||
icon_state = "rig-wiz"
|
||||
name = "gem-encrusted hardsuit"
|
||||
desc = "A bizarre gem-encrusted suit that radiates magical energies."
|
||||
item_state = "wiz_hardsuit"
|
||||
slowdown = 1
|
||||
w_class = 3
|
||||
unacidable = 1
|
||||
armor = list(melee = 40, bullet = 20, laser = 20,energy = 20, bomb = 35, bio = 100, rad = 60)
|
||||
siemens_coefficient = 0.7
|
||||
sprite_sheets_refit = null
|
||||
sprite_sheets_obj = null
|
||||
|
||||
//Medical Rig
|
||||
/obj/item/clothing/head/helmet/space/rig/medical
|
||||
name = "medical hardsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environment. Has minor radiation shielding."
|
||||
icon_state = "rig0-medical"
|
||||
item_state = "medical_helm"
|
||||
item_color = "medical"
|
||||
armor = list(melee = 30, bullet = 5, laser = 20,energy = 5, bomb = 25, bio = 100, rad = 50)
|
||||
|
||||
/obj/item/clothing/suit/space/rig/medical
|
||||
icon_state = "rig-medical"
|
||||
name = "medical hardsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has minor radiation shielding."
|
||||
item_state = "medical_hardsuit"
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical)
|
||||
armor = list(melee = 30, bullet = 5, laser = 20,energy = 5, bomb = 25, bio = 100, rad = 50)
|
||||
|
||||
//Security
|
||||
/obj/item/clothing/head/helmet/space/rig/security
|
||||
name = "security hardsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environment. Has an additional layer of armor."
|
||||
icon_state = "rig0-sec"
|
||||
item_state = "sec_helm"
|
||||
item_color = "sec"
|
||||
armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10)
|
||||
siemens_coefficient = 0.7
|
||||
|
||||
/obj/item/clothing/suit/space/rig/security
|
||||
icon_state = "rig-sec"
|
||||
name = "security hardsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has an additional layer of armor."
|
||||
item_state = "sec_hardsuit"
|
||||
armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton)
|
||||
siemens_coefficient = 0.7
|
||||
|
||||
|
||||
//Atmospherics Rig (BS12)
|
||||
/obj/item/clothing/head/helmet/space/rig/atmos
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environments. Has improved thermal protection and minor radiation shielding."
|
||||
name = "atmospherics hardsuit helmet"
|
||||
icon_state = "rig0-atmos"
|
||||
item_state = "atmos_helm"
|
||||
item_color = "atmos"
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 50)
|
||||
max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
|
||||
/obj/item/clothing/suit/space/rig/atmos
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has improved thermal protection and minor radiation shielding."
|
||||
icon_state = "rig-atmos"
|
||||
name = "atmos hardsuit"
|
||||
item_state = "atmos_hardsuit"
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 50)
|
||||
max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
@@ -0,0 +1,223 @@
|
||||
/*
|
||||
* Contains
|
||||
* /obj/item/rig_module/grenade_launcher
|
||||
* /obj/item/rig_module/mounted
|
||||
* /obj/item/rig_module/mounted/taser
|
||||
* /obj/item/rig_module/shield
|
||||
* /obj/item/rig_module/fabricator
|
||||
*/
|
||||
|
||||
/obj/item/rig_module/grenade_launcher
|
||||
|
||||
name = "mounted grenade launcher"
|
||||
desc = "A shoulder-mounted micro-explosive dispenser."
|
||||
selectable = 1
|
||||
|
||||
interface_name = "integrated grenade launcher"
|
||||
interface_desc = "Discharges loaded grenades against the wearer's location."
|
||||
|
||||
var/fire_force = 30
|
||||
var/fire_distance = 10
|
||||
|
||||
charges = list(
|
||||
list("flashbang", "flashbang", /obj/item/weapon/grenade/flashbang, 3),
|
||||
list("smoke bomb", "smoke bomb", /obj/item/weapon/grenade/smokebomb, 3),
|
||||
list("EMP grenade", "EMP grenade", /obj/item/weapon/grenade/empgrenade, 3),
|
||||
)
|
||||
|
||||
/obj/item/rig_module/grenade_launcher/accepts_item(var/obj/item/input_device, var/mob/living/user)
|
||||
|
||||
if(!istype(input_device) || !istype(user))
|
||||
return 0
|
||||
|
||||
var/datum/rig_charge/accepted_item
|
||||
for(var/charge in charges)
|
||||
var/datum/rig_charge/charge_datum = charges[charge]
|
||||
if(input_device.type == charge_datum.product_type)
|
||||
accepted_item = charge_datum
|
||||
break
|
||||
|
||||
if(!accepted_item)
|
||||
return 0
|
||||
|
||||
if(accepted_item.charges >= 5)
|
||||
user << "<span class='danger'>Another grenade of that type will not fit into the module.</span>"
|
||||
return 0
|
||||
|
||||
user << "<font color='blue'><b>You slot \the [input_device] into the suit module.</b></font>"
|
||||
user.drop_from_inventory(input_device)
|
||||
del(input_device)
|
||||
accepted_item.charges++
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/grenade_launcher/engage(atom/target)
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
if(!target)
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
|
||||
if(!charge_selected)
|
||||
H << "<span class='danger'>You have not selected a grenade type.</span>"
|
||||
return 0
|
||||
|
||||
var/datum/rig_charge/charge = charges[charge_selected]
|
||||
|
||||
if(!charge)
|
||||
return 0
|
||||
|
||||
if(charge.charges <= 0)
|
||||
H << "<span class='danger'>Insufficient grenades!</span>"
|
||||
return 0
|
||||
|
||||
charge.charges--
|
||||
var/obj/item/weapon/grenade/new_grenade = new charge.product_type(get_turf(H))
|
||||
H.visible_message("<span class='danger'>[H] launches \a [new_grenade]!")
|
||||
new_grenade.activate(H)
|
||||
new_grenade.throw_at(target,fire_force,fire_distance)
|
||||
|
||||
/obj/item/rig_module/mounted
|
||||
|
||||
name = "mounted laser cannon"
|
||||
desc = "A shoulder-mounted battery-powered laser cannon mount."
|
||||
selectable = 1
|
||||
usable = 1
|
||||
use_power_cost = 10
|
||||
|
||||
engage_string = "Configure"
|
||||
|
||||
interface_name = "mounted laser cannon"
|
||||
interface_desc = "A shoulder-mounted cell-powered laser cannon."
|
||||
|
||||
var/gun_type = /obj/item/weapon/gun/energy/lasercannon/mounted
|
||||
var/obj/item/weapon/gun/gun
|
||||
|
||||
/obj/item/rig_module/mounted/New()
|
||||
..()
|
||||
gun = new gun_type(src)
|
||||
|
||||
/obj/item/rig_module/mounted/engage(atom/target)
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
if(!target)
|
||||
gun.attack_self(holder.wearer)
|
||||
return 1
|
||||
|
||||
gun.Fire(target,holder.wearer)
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/mounted/taser
|
||||
|
||||
name = "mounted taser"
|
||||
desc = "A shoulder-mounted energy projector."
|
||||
|
||||
usable = 0
|
||||
|
||||
suit_overlay_active = "mounted-taser"
|
||||
suit_overlay_inactive = "mounted-taser"
|
||||
|
||||
interface_name = "mounted energy gun"
|
||||
interface_desc = "A shoulder-mounted cell-powered energy gun."
|
||||
|
||||
gun_type = /obj/item/weapon/gun/energy/gun/mounted
|
||||
|
||||
/obj/item/rig_module/mounted/energy_blade
|
||||
|
||||
name = "energy blade projector"
|
||||
desc = "A powerful cutting beam projector."
|
||||
|
||||
activate_string = "Project Blade"
|
||||
deactivate_string = "Cancel Blade"
|
||||
|
||||
interface_name = "spider fang blade"
|
||||
interface_desc = "A lethal energy projector that can shape a blade projected from the hand of the wearer or launch radioactive darts."
|
||||
|
||||
usable = 0
|
||||
selectable = 1
|
||||
toggleable = 1
|
||||
use_power_cost = 50
|
||||
active_power_cost = 5
|
||||
|
||||
gun_type = /obj/item/weapon/gun/energy/crossbow/ninja
|
||||
|
||||
/obj/item/rig_module/mounted/energy_blade/process()
|
||||
|
||||
if(holder && holder.wearer)
|
||||
if(!(locate(/obj/item/weapon/melee/energy/blade) in holder.wearer))
|
||||
deactivate()
|
||||
return 0
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/rig_module/mounted/energy_blade/activate()
|
||||
|
||||
..()
|
||||
|
||||
var/mob/living/M = holder.wearer
|
||||
|
||||
if(M.l_hand && M.r_hand)
|
||||
M << "<span class='danger'>Your hands are full.</span>"
|
||||
deactivate()
|
||||
return
|
||||
|
||||
var/obj/item/weapon/melee/energy/blade/blade = new(M)
|
||||
blade.creator = M
|
||||
M.put_in_hands(blade)
|
||||
|
||||
/obj/item/rig_module/mounted/energy_blade/deactivate()
|
||||
|
||||
..()
|
||||
|
||||
var/mob/living/M = holder.wearer
|
||||
|
||||
if(!M)
|
||||
return
|
||||
|
||||
for(var/obj/item/weapon/melee/energy/blade/blade in M.contents)
|
||||
M.drop_from_inventory(blade)
|
||||
del(blade)
|
||||
|
||||
/obj/item/rig_module/fabricator
|
||||
|
||||
name = "matter fabricator"
|
||||
desc = "A self-contained microfactory system for hardsuit integration."
|
||||
selectable = 1
|
||||
usable = 1
|
||||
use_power_cost = 15
|
||||
|
||||
engage_string = "Fabricate Star"
|
||||
|
||||
interface_name = "death blossom launcher"
|
||||
interface_desc = "An integrated microfactory that produces poisoned throwing stars from thin air and electricity."
|
||||
|
||||
var/fabrication_type = /obj/item/weapon/star/ninja
|
||||
var/fire_force = 30
|
||||
var/fire_distance = 10
|
||||
|
||||
/obj/item/rig_module/fabricator/engage(atom/target)
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
var/mob/living/H = holder.wearer
|
||||
|
||||
if(target)
|
||||
var/obj/item/firing = new fabrication_type()
|
||||
firing.loc = get_turf(src)
|
||||
H.visible_message("<span class='danger'>[H] launches \a [firing]!</span>")
|
||||
firing.throw_at(target,fire_force,fire_distance)
|
||||
else
|
||||
if(H.l_hand && H.r_hand)
|
||||
H << "<span class='danger'>Your hands are full."
|
||||
else
|
||||
var/obj/item/new_weapon = new fabrication_type()
|
||||
new_weapon.loc = H
|
||||
H << "<font color='blue'><b>You quickly fabricate \a [new_weapon].</b></font>"
|
||||
H.put_in_hands(new_weapon)
|
||||
|
||||
return 1
|
||||
@@ -0,0 +1,436 @@
|
||||
/*
|
||||
* Contains
|
||||
* /obj/item/rig_module/ai_container
|
||||
* /obj/item/rig_module/datajack
|
||||
* /obj/item/rig_module/power_sink
|
||||
* /obj/item/rig_module/electrowarfare_suite
|
||||
*/
|
||||
|
||||
/obj/item/ai_verbs
|
||||
name = "AI verb holder"
|
||||
|
||||
/obj/item/ai_verbs/verb/hardsuit_interface()
|
||||
set category = "Hardsuit"
|
||||
set name = "Open Hardsuit Interface"
|
||||
set src in usr
|
||||
|
||||
if(!usr.loc || !usr.loc.loc || !istype(usr.loc.loc, /obj/item/rig_module))
|
||||
usr << "You are not loaded into a hardsuit."
|
||||
return
|
||||
|
||||
var/obj/item/rig_module/module = usr.loc.loc
|
||||
if(!module.holder)
|
||||
usr << "Your module is not installed in a hardsuit."
|
||||
return
|
||||
|
||||
module.holder.ui_interact(usr)
|
||||
|
||||
/obj/item/rig_module/ai_container
|
||||
|
||||
name = "IIS module"
|
||||
desc = "An integrated intelligence system module suitable for most hardsuits."
|
||||
toggleable = 1
|
||||
usable = 1
|
||||
disruptive = 0
|
||||
activates_on_touch = 1
|
||||
|
||||
engage_string = "Eject AI"
|
||||
activate_string = "Enable Dataspike"
|
||||
deactivate_string = "Disable Dataspike"
|
||||
|
||||
interface_name = "integrated intelligence system"
|
||||
interface_desc = "A socket that supports a range of artificial intelligence systems."
|
||||
|
||||
var/mob/integrated_ai // Direct reference to the actual mob held in the suit.
|
||||
var/obj/item/ai_card // Reference to the MMI, posibrain, intellicard or pAI card previously holding the AI.
|
||||
var/obj/item/ai_verbs/verb_holder
|
||||
|
||||
/obj/item/rig_module/ai_container/proc/update_verb_holder()
|
||||
if(!verb_holder)
|
||||
verb_holder = new(src)
|
||||
if(integrated_ai)
|
||||
verb_holder.loc = integrated_ai
|
||||
else
|
||||
verb_holder.loc = src
|
||||
|
||||
/obj/item/rig_module/ai_container/accepts_item(var/obj/item/input_device, var/mob/living/user)
|
||||
|
||||
// Check if there's actually an AI to deal with.
|
||||
var/mob/living/silicon/ai/target_ai
|
||||
if(istype(input_device, /mob/living/silicon/ai))
|
||||
target_ai = input_device
|
||||
else
|
||||
target_ai = locate(/mob/living/silicon/ai) in input_device.contents
|
||||
|
||||
var/obj/item/device/aicard/card = ai_card
|
||||
|
||||
// Downloading from/loading to a terminal.
|
||||
if(istype(input_device,/obj/machinery/computer/aifixer) || istype(input_device,/mob/living/silicon/ai) || istype(input_device,/obj/structure/AIcore/deactivated))
|
||||
|
||||
// If we're stealing an AI, make sure we have a card for it.
|
||||
if(!card)
|
||||
card = new /obj/item/device/aicard(src)
|
||||
|
||||
// Terminal interaction only works with an intellicarded AI.
|
||||
if(!istype(card))
|
||||
return 0
|
||||
|
||||
// Since we've explicitly checked for three types, this should be safe.
|
||||
input_device.attackby(card,user)
|
||||
|
||||
// If the transfer failed we can delete the card.
|
||||
if(locate(/mob/living/silicon/ai) in card)
|
||||
ai_card = card
|
||||
integrated_ai = locate(/mob/living/silicon/ai) in card
|
||||
else
|
||||
eject_ai()
|
||||
update_verb_holder()
|
||||
return 1
|
||||
|
||||
if(istype(input_device,/obj/item/device/aicard))
|
||||
// We are carding the AI in our suit.
|
||||
if(integrated_ai)
|
||||
integrated_ai.attackby(input_device,user)
|
||||
// If the transfer was successful, we can clear out our vars.
|
||||
if(integrated_ai.loc != src)
|
||||
integrated_ai = null
|
||||
eject_ai()
|
||||
else
|
||||
// You're using an empty card on an empty suit, idiot.
|
||||
if(!target_ai)
|
||||
return 0
|
||||
integrate_ai(input_device,user)
|
||||
return 1
|
||||
|
||||
// Okay, it wasn't a terminal being touched, check for all the simple insertions.
|
||||
if(input_device.type in list(/obj/item/device/paicard, /obj/item/device/mmi, /obj/item/device/mmi/posibrain))
|
||||
integrate_ai(input_device,user)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
/obj/item/rig_module/ai_container/engage(atom/target)
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
|
||||
if(!target)
|
||||
if(ai_card)
|
||||
if(istype(ai_card,/obj/item/device/aicard))
|
||||
ai_card.attack_self(H)
|
||||
else
|
||||
eject_ai(H)
|
||||
update_verb_holder()
|
||||
return 1
|
||||
|
||||
if(accepts_item(target,H))
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
/obj/item/rig_module/ai_container/removed()
|
||||
eject_ai()
|
||||
..()
|
||||
|
||||
/obj/item/rig_module/ai_container/proc/eject_ai(var/mob/user)
|
||||
|
||||
if(ai_card)
|
||||
if(istype(ai_card, /obj/item/device/aicard))
|
||||
if(integrated_ai && integrated_ai.client)
|
||||
if(user)
|
||||
user << "<span class='danger'>You cannot eject your currently stored AI. Purge it manually.</span>"
|
||||
return 0
|
||||
del(ai_card)
|
||||
else if(user)
|
||||
user.put_in_hands(ai_card)
|
||||
else
|
||||
ai_card.loc = get_turf(src)
|
||||
ai_card = null
|
||||
integrated_ai = null
|
||||
update_verb_holder()
|
||||
|
||||
/obj/item/rig_module/ai_container/proc/integrate_ai(var/obj/item/ai,var/mob/user)
|
||||
|
||||
if(!ai) return
|
||||
|
||||
// The ONLY THING all the different AI systems have in common is that they all store the mob inside an item.
|
||||
var/mob/living/ai_mob = locate(/mob/living) in ai.contents
|
||||
if(ai_mob)
|
||||
|
||||
if(ai_mob.key && ai_mob.client)
|
||||
|
||||
if(istype(ai, /obj/item/device/aicard))
|
||||
|
||||
if(!ai_card)
|
||||
ai_card = new /obj/item/device/aicard(src)
|
||||
|
||||
var/obj/item/device/aicard/source_card = ai
|
||||
var/obj/item/device/aicard/target_card = ai_card
|
||||
if(istype(source_card) && istype(target_card))
|
||||
if(target_card.grab_ai(ai_mob, user))
|
||||
source_card.clear()
|
||||
else
|
||||
return 0
|
||||
else
|
||||
return 0
|
||||
else
|
||||
user.drop_from_inventory(ai)
|
||||
ai.loc = src
|
||||
ai_card = ai
|
||||
ai_mob << "<font color='blue'>You have been transferred to \the [holder]'s [src].</font>"
|
||||
user << "<font color='blue'>You load [ai_mob] into \the [holder]'s [src].</font>"
|
||||
|
||||
integrated_ai = ai_mob
|
||||
|
||||
if(!(locate(integrated_ai) in ai_card))
|
||||
integrated_ai = null
|
||||
eject_ai()
|
||||
else
|
||||
user << "<span class='warning'>There is no active AI within \the [ai].</span>"
|
||||
else
|
||||
user << "<span class='warning'>There is no active AI within \the [ai].</span>"
|
||||
update_verb_holder()
|
||||
return
|
||||
|
||||
/obj/item/rig_module/datajack
|
||||
|
||||
name = "datajack module"
|
||||
desc = "A simple induction datalink module."
|
||||
toggleable = 1
|
||||
activates_on_touch = 1
|
||||
usable = 0
|
||||
|
||||
activate_string = "Enable Datajack"
|
||||
deactivate_string = "Disable Datajack"
|
||||
|
||||
interface_name = "contact datajack"
|
||||
interface_desc = "An induction-powered high-throughput datalink suitable for hacking encrypted networks."
|
||||
var/list/stored_research
|
||||
|
||||
/obj/item/rig_module/datajack/New()
|
||||
..()
|
||||
stored_research = list()
|
||||
|
||||
/obj/item/rig_module/datajack/engage(atom/target)
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
if(target)
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
if(!accepts_item(target,H))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/datajack/accepts_item(var/obj/item/input_device, var/mob/living/user)
|
||||
|
||||
if(istype(input_device,/obj/item/weapon/disk/tech_disk))
|
||||
user << "You slot the disk into [src]."
|
||||
var/obj/item/weapon/disk/tech_disk/disk = input_device
|
||||
if(disk.stored)
|
||||
if(load_data(disk.stored))
|
||||
user << "<font color='blue'>Download successful; disk erased.</font>"
|
||||
disk.stored = null
|
||||
else
|
||||
user << "<span class='warning'>The disk is corrupt. It is useless to you.</span>"
|
||||
else
|
||||
user << "<span class='warning'>The disk is blank. It is useless to you.</span>"
|
||||
return 1
|
||||
|
||||
// I fucking hate R&D code. This typecheck spam would be totally unnecessary in a sane setup.
|
||||
else if(istype(input_device,/obj/machinery))
|
||||
var/datum/research/incoming_files
|
||||
if(istype(input_device,/obj/machinery/computer/rdconsole))
|
||||
var/obj/machinery/computer/rdconsole/input_machine = input_device
|
||||
incoming_files = input_machine.files
|
||||
else if(istype(input_device,/obj/machinery/r_n_d/server))
|
||||
var/obj/machinery/r_n_d/server/input_machine = input_device
|
||||
incoming_files = input_machine.files
|
||||
else if(istype(input_device,/obj/machinery/mecha_part_fabricator))
|
||||
var/obj/machinery/mecha_part_fabricator/input_machine = input_device
|
||||
incoming_files = input_machine.files
|
||||
|
||||
if(!incoming_files || !incoming_files.known_tech || !incoming_files.known_tech.len)
|
||||
user << "<span class='warning'>Memory failure. There is nothing accessible stored on this terminal.</span>"
|
||||
else
|
||||
// Maybe consider a way to drop all your data into a target repo in the future.
|
||||
if(load_data(incoming_files.known_tech))
|
||||
user << "<font color='blue'>Download successful; local and remote repositories synchronized.</font>"
|
||||
else
|
||||
user << "<span class='warning'>Scan complete. There is nothing useful stored on this terminal.</span>"
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/rig_module/datajack/proc/load_data(var/incoming_data)
|
||||
|
||||
if(islist(incoming_data))
|
||||
for(var/entry in incoming_data)
|
||||
load_data(entry)
|
||||
return 1
|
||||
|
||||
if(istype(incoming_data, /datum/tech))
|
||||
var/data_found
|
||||
var/datum/tech/new_data = incoming_data
|
||||
for(var/datum/tech/current_data in stored_research)
|
||||
if(current_data.id == new_data.id)
|
||||
data_found = 1
|
||||
if(current_data.level < new_data.level)
|
||||
current_data.level = new_data.level
|
||||
break
|
||||
if(!data_found)
|
||||
stored_research += incoming_data
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/rig_module/electrowarfare_suite
|
||||
|
||||
name = "electrowarfare module"
|
||||
desc = "A bewilderingly complex bundle of fiber optics and chips."
|
||||
toggleable = 1
|
||||
usable = 0
|
||||
|
||||
engage_string = "Enable Countermeasures"
|
||||
deactivate_string = "Disable Countermeasures"
|
||||
|
||||
interface_name = "electrowarfare system"
|
||||
interface_desc = "An active counter-electronic warfare suite that disrupts AI tracking."
|
||||
|
||||
/obj/item/rig_module/electrowarfare_suite/activate()
|
||||
|
||||
if(!..())
|
||||
return
|
||||
|
||||
// This is not the best way to handle this, but I don't want it to mess with ling camo
|
||||
var/mob/living/M = holder.wearer
|
||||
M.digitalcamo++
|
||||
|
||||
/obj/item/rig_module/electrowarfare_suite/deactivate()
|
||||
|
||||
if(!..())
|
||||
return
|
||||
|
||||
var/mob/living/M = holder.wearer
|
||||
M.digitalcamo = max(0,(M.digitalcamo-1))
|
||||
|
||||
/obj/item/rig_module/power_sink
|
||||
|
||||
name = "hardsuit power sink"
|
||||
desc = "An heavy-duty power sink."
|
||||
toggleable = 1
|
||||
activates_on_touch = 1
|
||||
disruptive = 0
|
||||
|
||||
engage_string = "Enable Power Sink"
|
||||
deactivate_string = "Disable Power Sink"
|
||||
|
||||
interface_name = "niling d-sink"
|
||||
interface_desc = "Colloquially known as a power siphon, this module drains power through the suit hands into the suit battery."
|
||||
|
||||
var/atom/interfaced_with // Currently draining power from this device.
|
||||
var/total_power_drained = 0
|
||||
|
||||
/obj/item/rig_module/power_sink/deactivate()
|
||||
|
||||
if(interfaced_with)
|
||||
if(holder && holder.wearer)
|
||||
holder.wearer << "<span class = 'warning'>Your power sink retracts as the module deactivates.</span>"
|
||||
drain_complete()
|
||||
interfaced_with = null
|
||||
total_power_drained = 0
|
||||
return ..()
|
||||
|
||||
/obj/item/rig_module/power_sink/activate()
|
||||
interfaced_with = null
|
||||
total_power_drained = 0
|
||||
return ..()
|
||||
|
||||
/obj/item/rig_module/power_sink/engage(atom/target)
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
//Target wasn't supplied or we're already draining.
|
||||
if(interfaced_with)
|
||||
return 0
|
||||
|
||||
if(!target)
|
||||
return 1
|
||||
|
||||
// Are we close enough?
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
if(!target.Adjacent(H))
|
||||
return 0
|
||||
|
||||
// Is it a valid power source?
|
||||
if(target.drain_power(1) <= 0)
|
||||
return 0
|
||||
|
||||
H << "<span class = 'danger'>You begin draining power from [target]!</span>"
|
||||
interfaced_with = target
|
||||
|
||||
holder.spark_system.start()
|
||||
playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/power_sink/accepts_item(var/obj/item/input_device, var/mob/living/user)
|
||||
var/can_drain = input_device.drain_power(1)
|
||||
if(can_drain > 0)
|
||||
engage(input_device)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/rig_module/power_sink/process()
|
||||
|
||||
if(!interfaced_with)
|
||||
return ..()
|
||||
|
||||
var/mob/living/carbon/human/H
|
||||
if(holder && holder.wearer)
|
||||
H = holder.wearer
|
||||
|
||||
if(!H || !istype(H))
|
||||
return 0
|
||||
|
||||
holder.spark_system.start()
|
||||
playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
|
||||
if(!holder.cell)
|
||||
H << "<span class = 'danger'>Your power sink flashes an error; there is no cell in your rig.</span>"
|
||||
drain_complete(H)
|
||||
return
|
||||
|
||||
if(!interfaced_with || !interfaced_with.Adjacent(H))
|
||||
H << "<span class = 'warning'>Your power sink retracts into its casing.</span>"
|
||||
drain_complete(H)
|
||||
return
|
||||
|
||||
var/target_drained = interfaced_with.drain_power()
|
||||
if(target_drained <= 0)
|
||||
H << "<span class = 'danger'>Your power sink flashes a red light; there is no power left in [interfaced_with].</span>"
|
||||
drain_complete(H)
|
||||
return
|
||||
|
||||
holder.cell.charge += target_drained
|
||||
total_power_drained += target_drained
|
||||
|
||||
if(holder.cell.charge > holder.cell.maxcharge)
|
||||
H << "<span class = 'warning'>Your power sink flashes an amber light; your rig cell is full.</span>"
|
||||
holder.cell.charge = holder.cell.maxcharge
|
||||
drain_complete(H)
|
||||
return
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/power_sink/proc/drain_complete(var/mob/living/M)
|
||||
|
||||
if(!interfaced_with)
|
||||
if(M) M << "<font color='blue'><b>Total power drained:</b> [total_power_drained]W.</font>"
|
||||
else
|
||||
if(M) M << "<font color='blue'><b>Total power drained from [interfaced_with]:</b> [total_power_drained]W.</font>"
|
||||
interfaced_with.drain_power(0,1) // Damage the victim.
|
||||
|
||||
interfaced_with = null
|
||||
total_power_drained = 0
|
||||
@@ -0,0 +1,212 @@
|
||||
/*
|
||||
* Rigsuit upgrades/abilities.
|
||||
*/
|
||||
|
||||
/datum/rig_charge
|
||||
var/short_name = "undef"
|
||||
var/display_name = "undefined"
|
||||
var/product_type = "undefined"
|
||||
var/charges = 0
|
||||
|
||||
/obj/item/rig_module
|
||||
name = "hardsuit upgrade"
|
||||
desc = "It looks pretty sciency."
|
||||
icon = 'icons/obj/rig_modules.dmi'
|
||||
icon_state = "module"
|
||||
matter = list("metal" = 20000, "plastic" = 30000, "glass" = 5000)
|
||||
|
||||
var/damage = 0
|
||||
var/obj/item/weapon/rig/holder
|
||||
|
||||
var/module_cooldown = 10
|
||||
var/next_use = 0
|
||||
|
||||
var/toggleable // Set to 1 for the device to show up as an active effect.
|
||||
var/usable // Set to 1 for the device to have an on-use effect.
|
||||
var/selectable // Set to 1 to be able to assign the device as primary system.
|
||||
var/redundant // Set to 1 to ignore duplicate module checking when installing.
|
||||
var/permanent // If set, the module can't be removed.
|
||||
var/disruptive = 1 // Can disrupt by other effects.
|
||||
var/activates_on_touch // If set, unarmed attacks will call engage() on the target.
|
||||
|
||||
var/active // Basic module status
|
||||
var/disruptable // Will deactivate if some other powers are used.
|
||||
|
||||
var/use_power_cost = 0 // Power used when single-use ability called.
|
||||
var/active_power_cost = 0 // Power used when turned on.
|
||||
var/passive_power_cost = 0 // Power used when turned off.
|
||||
|
||||
var/list/charges // Associative list of charge types and remaining numbers.
|
||||
var/charge_selected // Currently selected option used for charge dispensing.
|
||||
|
||||
// Icons.
|
||||
var/suit_overlay
|
||||
var/suit_overlay_active // If set, drawn over icon and mob when effect is active.
|
||||
var/suit_overlay_inactive // As above, inactive.
|
||||
var/suit_overlay_used // As above, when engaged.
|
||||
|
||||
//Display fluff
|
||||
var/interface_name = "hardsuit upgrade"
|
||||
var/interface_desc = "A generic hardsuit upgrade."
|
||||
var/engage_string = "Engage"
|
||||
var/activate_string = "Activate"
|
||||
var/deactivate_string = "Deactivate"
|
||||
|
||||
/obj/item/rig_module/examine()
|
||||
..()
|
||||
switch(damage)
|
||||
if(0)
|
||||
usr << "It is undamaged."
|
||||
if(1)
|
||||
usr << "It is badly damaged."
|
||||
if(2)
|
||||
usr << "It is almost completely destroyed."
|
||||
|
||||
/obj/item/rig_module/attackby(obj/item/W as obj, mob/user as mob)
|
||||
|
||||
if(istype(W,/obj/item/stack/nanopaste))
|
||||
|
||||
if(damage == 0)
|
||||
user << "There is no damage to mend."
|
||||
return
|
||||
|
||||
user << "You start mending the damaged portions of \the [src]..."
|
||||
|
||||
if(!do_after(user,30) || !W || !src)
|
||||
return
|
||||
|
||||
var/obj/item/stack/nanopaste/paste = W
|
||||
damage = 0
|
||||
user << "You mend the damage to [src] with [W]."
|
||||
paste.use(1)
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/stack/cable_coil))
|
||||
|
||||
switch(damage)
|
||||
if(0)
|
||||
user << "There is no damage to mend."
|
||||
return
|
||||
if(2)
|
||||
user << "There is no damage that you are capable of mending with such crude tools."
|
||||
return
|
||||
|
||||
var/obj/item/stack/cable_coil/cable = W
|
||||
if(!cable.amount >= 5)
|
||||
user << "You need five units of cable to repair \the [src]."
|
||||
return
|
||||
|
||||
user << "You start mending the damaged portions of \the [src]..."
|
||||
if(!do_after(user,30) || !W || !src)
|
||||
return
|
||||
|
||||
damage = 1
|
||||
user << "You mend some of damage to [src] with [W], but you will need more advanced tools to fix it completely."
|
||||
cable.use(5)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/rig_module/New()
|
||||
..()
|
||||
if(suit_overlay_inactive)
|
||||
suit_overlay = suit_overlay_inactive
|
||||
|
||||
if(charges && charges.len)
|
||||
var/list/processed_charges = list()
|
||||
for(var/list/charge in charges)
|
||||
var/datum/rig_charge/charge_dat = new
|
||||
|
||||
charge_dat.short_name = charge[1]
|
||||
charge_dat.display_name = charge[2]
|
||||
charge_dat.product_type = charge[3]
|
||||
charge_dat.charges = charge[4]
|
||||
|
||||
if(!charge_selected) charge_selected = charge_dat.short_name
|
||||
processed_charges[charge_dat.short_name] = charge_dat
|
||||
|
||||
charges = processed_charges
|
||||
|
||||
..()
|
||||
|
||||
// Called when the module is installed into a suit.
|
||||
/obj/item/rig_module/proc/installed(var/obj/item/weapon/rig/new_holder)
|
||||
holder = new_holder
|
||||
return
|
||||
|
||||
//Proc for one-use abilities like teleport.
|
||||
/obj/item/rig_module/proc/engage()
|
||||
|
||||
if(damage >= 2)
|
||||
usr << "<span class='warning'>The [interface_name] is damaged beyond use!</span>"
|
||||
|
||||
if(world.time < next_use)
|
||||
usr << "<span class='warning'>You cannot use the [interface_name] again so soon.</span>"
|
||||
return 0
|
||||
|
||||
if(!holder || holder.canremove)
|
||||
usr << "<span class='warning'>The suit is not initialized.</span>"
|
||||
return 0
|
||||
|
||||
if(holder.security_check_enabled && !(istype(usr,/mob/living/silicon) || holder.allowed(usr)))
|
||||
usr << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
if(!holder.check_power_cost(usr, use_power_cost, 0, src, (istype(usr,/mob/living/silicon ? 1 : 0) ) ) )
|
||||
return 0
|
||||
|
||||
next_use = world.time + module_cooldown
|
||||
|
||||
return 1
|
||||
|
||||
// Proc for toggling on active abilities.
|
||||
/obj/item/rig_module/proc/activate()
|
||||
|
||||
if(active || !engage())
|
||||
return 0
|
||||
|
||||
active = 1
|
||||
|
||||
spawn(1)
|
||||
if(suit_overlay_active)
|
||||
suit_overlay = suit_overlay_active
|
||||
else
|
||||
suit_overlay = null
|
||||
holder.update_icon()
|
||||
|
||||
return 1
|
||||
|
||||
// Proc for toggling off active abilities.
|
||||
/obj/item/rig_module/proc/deactivate()
|
||||
|
||||
if(!active)
|
||||
return 0
|
||||
|
||||
active = 0
|
||||
|
||||
spawn(1)
|
||||
if(suit_overlay_inactive)
|
||||
suit_overlay = suit_overlay_inactive
|
||||
else
|
||||
suit_overlay = null
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
|
||||
return 1
|
||||
|
||||
// Called when the module is uninstalled from a suit.
|
||||
/obj/item/rig_module/proc/removed()
|
||||
deactivate()
|
||||
holder = null
|
||||
return
|
||||
|
||||
// Called by the hardsuit each rig process tick.
|
||||
/obj/item/rig_module/process()
|
||||
if(active)
|
||||
return active_power_cost
|
||||
else
|
||||
return passive_power_cost
|
||||
|
||||
// Called by holder rigsuit attackby()
|
||||
// Checks if an item is usable with this module and handles it if it is
|
||||
/obj/item/rig_module/proc/accepts_item(var/obj/item/input_device)
|
||||
return 0
|
||||
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
* Contains
|
||||
* /obj/item/rig_module/stealth_field
|
||||
* /obj/item/rig_module/teleporter
|
||||
* /obj/item/rig_module/fabricator/energy_net
|
||||
* /obj/item/rig_module/self_destruct
|
||||
*/
|
||||
|
||||
/obj/item/rig_module/stealth_field
|
||||
|
||||
name = "active camouflage module"
|
||||
desc = "A robust hardsuit-integrated stealth module."
|
||||
icon_state = "stealth"
|
||||
|
||||
toggleable = 1
|
||||
disruptable = 1
|
||||
disruptive = 0
|
||||
|
||||
use_power_cost = 5
|
||||
active_power_cost = 1
|
||||
passive_power_cost = 0
|
||||
|
||||
activate_string = "Enable Cloak"
|
||||
deactivate_string = "Disable Cloak"
|
||||
|
||||
interface_name = "integrated stealth system"
|
||||
interface_desc = "An integrated active camouflage system."
|
||||
|
||||
suit_overlay_active = "stealth_active"
|
||||
suit_overlay_inactive = "stealth_inactive"
|
||||
|
||||
/obj/item/rig_module/stealth_field/activate()
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
|
||||
H << "<font color='blue'><b>You are now invisible to normal detection.</b></font>"
|
||||
H.invisibility = INVISIBILITY_LEVEL_TWO
|
||||
|
||||
anim(get_turf(H), H, 'icons/effects/effects.dmi', "electricity",null,20,null)
|
||||
|
||||
H.visible_message("[H.name] vanishes into thin air!",1)
|
||||
|
||||
/obj/item/rig_module/stealth_field/deactivate()
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
|
||||
H << "<span class='danger'>You are now visible.</span>"
|
||||
H.invisibility = 0
|
||||
|
||||
anim(get_turf(H), H,'icons/mob/mob.dmi',,"uncloak",,H.dir)
|
||||
anim(get_turf(H), H, 'icons/effects/effects.dmi', "electricity",null,20,null)
|
||||
|
||||
for(var/mob/O in oviewers(H))
|
||||
O.show_message("[H.name] appears from thin air!",1)
|
||||
playsound(get_turf(H), 'sound/effects/stealthoff.ogg', 75, 1)
|
||||
|
||||
|
||||
/obj/item/rig_module/teleporter
|
||||
|
||||
name = "teleportation module"
|
||||
desc = "A complex, sleek-looking, hardsuit-integrated teleportation module."
|
||||
use_power_cost = 40
|
||||
redundant = 1
|
||||
usable = 1
|
||||
selectable = 1
|
||||
|
||||
engage_string = "Emergency Leap"
|
||||
|
||||
interface_name = "VOID-shift phase projector"
|
||||
interface_desc = "An advanced teleportation system. It is capable of pinpoint precision or random leaps forward."
|
||||
|
||||
/obj/item/rig_module/teleporter/proc/phase_in(var/mob/M,var/turf/T)
|
||||
|
||||
if(!M || !T)
|
||||
return
|
||||
|
||||
holder.spark_system.start()
|
||||
playsound(T, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(T, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
anim(T,M,'icons/mob/mob.dmi',,"phasein",,M.dir)
|
||||
|
||||
/obj/item/rig_module/teleporter/proc/phase_out(var/mob/M,var/turf/T)
|
||||
|
||||
if(!M || !T)
|
||||
return
|
||||
|
||||
playsound(T, "sparks", 50, 1)
|
||||
anim(T,M,'icons/mob/mob.dmi',,"phaseout",,M.dir)
|
||||
|
||||
/obj/item/rig_module/teleporter/engage(atom/target)
|
||||
|
||||
if(!..()) return 0
|
||||
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
|
||||
var/turf/T
|
||||
if(target)
|
||||
T = get_turf(target)
|
||||
else
|
||||
T = get_teleport_loc(get_turf(H), H, rand(5, 9))
|
||||
|
||||
if(!T || T.density)
|
||||
H << "<span class='warning'>You cannot teleport into solid walls.</span>"
|
||||
return 0
|
||||
|
||||
phase_out(H,get_turf(H))
|
||||
H.loc = T
|
||||
phase_in(H,get_turf(H))
|
||||
|
||||
for(var/obj/item/weapon/grab/G in H.contents)
|
||||
if(G.affecting)
|
||||
phase_out(G.affecting,get_turf(G.affecting))
|
||||
G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)
|
||||
phase_in(G.affecting,get_turf(G.affecting))
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/fabricator/energy_net
|
||||
|
||||
name = "net projector"
|
||||
desc = "Some kind of complex energy projector with a hardsuit mount."
|
||||
|
||||
interface_name = "energy net launcher"
|
||||
interface_desc = "An advanced energy-patterning projector used to capture targets."
|
||||
|
||||
engage_string = "Fabricate Net"
|
||||
|
||||
fabrication_type = /obj/item/weapon/energy_net
|
||||
use_power_cost = 70
|
||||
|
||||
/obj/item/rig_module/fabricator/energy_net/engage(atom/target)
|
||||
|
||||
if(holder && holder.wearer)
|
||||
if(..(target) && target)
|
||||
holder.wearer.Beam(target,"n_beam",,10)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/rig_module/self_destruct
|
||||
|
||||
name = "self-destruct module"
|
||||
desc = "Oh my God, Captain. A bomb."
|
||||
usable = 1
|
||||
active = 1
|
||||
permanent = 1
|
||||
|
||||
engage_string = "Detonate"
|
||||
|
||||
interface_name = "dead man's switch"
|
||||
interface_desc = "An integrated self-destruct module. When the wearer dies, so does the surrounding area. Do not press this button."
|
||||
|
||||
/obj/item/rig_module/self_destruct/activate()
|
||||
return
|
||||
|
||||
/obj/item/rig_module/self_destruct/deactivate()
|
||||
return
|
||||
|
||||
/obj/item/rig_module/self_destruct/process()
|
||||
|
||||
// Not being worn, leave it alone.
|
||||
if(!holder || !holder.wearer || !holder.wearer.wear_suit == holder)
|
||||
return 0
|
||||
|
||||
//OH SHIT.
|
||||
if(holder.wearer.stat == 2)
|
||||
engage()
|
||||
|
||||
/obj/item/rig_module/self_destruct/engage()
|
||||
explosion(get_turf(src), 0, 0, 3, 4)
|
||||
|
||||
/obj/item/rig_module/self_destruct/small/engage()
|
||||
explosion(get_turf(src), 0, 0, 1, 2)
|
||||
@@ -0,0 +1,338 @@
|
||||
/* Contains:
|
||||
* /obj/item/rig_module/device
|
||||
* /obj/item/rig_module/device/plasmacutter
|
||||
* /obj/item/rig_module/device/healthscanner
|
||||
* /obj/item/rig_module/device/drill
|
||||
* /obj/item/rig_module/device/orescanner
|
||||
* /obj/item/rig_module/device/rcd
|
||||
* /obj/item/rig_module/device/anomaly_scanner
|
||||
* /obj/item/rig_module/maneuvering_jets
|
||||
* /obj/item/rig_module/foam_sprayer
|
||||
* /obj/item/rig_module/device/broadcaster
|
||||
* /obj/item/rig_module/chem_dispenser
|
||||
* /obj/item/rig_module/chem_dispenser/injector
|
||||
* /obj/item/rig_module/voice
|
||||
*/
|
||||
|
||||
/obj/item/rig_module/device
|
||||
name = "mounted device"
|
||||
desc = "Some kind of hardsuit mount."
|
||||
usable = 0
|
||||
selectable = 1
|
||||
toggleable = 0
|
||||
disruptive = 0
|
||||
|
||||
var/device_type
|
||||
var/obj/item/device
|
||||
|
||||
/obj/item/rig_module/device/plasmacutter
|
||||
name = "hardsuit plasma cutter"
|
||||
desc = "A lethal-looking industrial cutter."
|
||||
interface_name = "plasma cutter"
|
||||
interface_desc = "A self-sustaining plasma arc capable of cutting through walls."
|
||||
suit_overlay_active = "plasmacutter"
|
||||
suit_overlay_inactive = "plasmacutter"
|
||||
|
||||
device_type = /obj/item/weapon/pickaxe/plasmacutter
|
||||
|
||||
/obj/item/rig_module/device/healthscanner
|
||||
name = "health scanner module"
|
||||
desc = "A hardsuit-mounted health scanner."
|
||||
interface_name = "health scanner"
|
||||
interface_desc = "Shows an informative health readout when used on a subject."
|
||||
|
||||
device_type = /obj/item/device/healthanalyzer
|
||||
|
||||
/obj/item/rig_module/device/drill
|
||||
name = "hardsuit drill mount"
|
||||
desc = "A very heavy diamond-tipped drill."
|
||||
interface_name = "mounted drill"
|
||||
interface_desc = "A diamond-tipped industrial drill."
|
||||
suit_overlay_active = "mounted-drill"
|
||||
suit_overlay_inactive = "mounted-drill"
|
||||
|
||||
device_type = /obj/item/weapon/pickaxe/diamonddrill
|
||||
|
||||
/obj/item/rig_module/device/anomaly_scanner
|
||||
name = "hardsuit anomaly scanner"
|
||||
desc = "You think it's called an Elder Sarsparilla or something."
|
||||
interface_name = "Alden-Saraspova counter"
|
||||
interface_desc = "An exotic particle detector commonly used by xenoarchaeologists."
|
||||
selectable = 1
|
||||
device_type = /obj/item/device/ano_scanner
|
||||
|
||||
/obj/item/rig_module/device/orescanner
|
||||
name = "ore scanner module"
|
||||
desc = "A clunky old ore scanner."
|
||||
interface_name = "ore detector"
|
||||
interface_desc = "A sonar system for detecting large masses of ore."
|
||||
|
||||
engage_string = "Begin Scan"
|
||||
|
||||
usable = 1
|
||||
selectable = 0
|
||||
|
||||
device_type = /obj/item/weapon/mining_scanner
|
||||
|
||||
/obj/item/rig_module/device/rcd
|
||||
name = "RCD mount"
|
||||
desc = "A cell-powered rapid construction device for a hardsuit."
|
||||
interface_name = "mounted RCD"
|
||||
interface_desc = "A device for building or removing walls. Cell-powered."
|
||||
usable = 1
|
||||
engage_string = "Configure RCD"
|
||||
|
||||
device_type = /obj/item/weapon/rcd/mounted
|
||||
|
||||
/obj/item/rig_module/device/New()
|
||||
..()
|
||||
if(device_type) device = new device_type(src)
|
||||
|
||||
/obj/item/rig_module/device/engage(atom/target)
|
||||
|
||||
if(!..() || !device)
|
||||
return 0
|
||||
|
||||
if(!target)
|
||||
device.attack_self(holder.wearer)
|
||||
return 1
|
||||
|
||||
var/resolved = target.attackby(device,holder.wearer)
|
||||
if(!resolved && device && target)
|
||||
device.afterattack(target,holder.wearer,1)
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/chem_dispenser
|
||||
name = "mounted chemical dispenser"
|
||||
desc = "A complex web of tubing and needles suitable for hardsuit use."
|
||||
usable = 1
|
||||
selectable = 0
|
||||
toggleable = 0
|
||||
disruptive = 0
|
||||
|
||||
engage_string = "Inject"
|
||||
|
||||
interface_name = "integrated chemical dispenser"
|
||||
interface_desc = "Dispenses loaded chemicals directly into the wearer's bloodstream."
|
||||
|
||||
charges = list(
|
||||
list("tricordrazine", "tricordrazine", 0, 80),
|
||||
list("tramadol", "tramadol", 0, 80),
|
||||
list("dexalin plus", "dexalinp", 0, 80),
|
||||
list("antibiotics", "spaceacillin", 0, 80),
|
||||
list("antitoxins", "anti_toxin", 0, 80),
|
||||
list("nutrients", "nutriment", 0, 80),
|
||||
list("hyronalin", "hyronalin", 0, 80),
|
||||
list("radium", "radium", 0, 80)
|
||||
)
|
||||
|
||||
var/max_reagent_volume = 80 //Used when refilling.
|
||||
|
||||
/obj/item/rig_module/chem_dispenser/accepts_item(var/obj/item/input_item, var/mob/living/user)
|
||||
|
||||
if(!input_item.is_open_container())
|
||||
return 0
|
||||
|
||||
if(!input_item.reagents || !input_item.reagents.total_volume)
|
||||
user << "\The [input_item] is empty."
|
||||
return 0
|
||||
|
||||
// Magical chemical filtration system, do not question it.
|
||||
var/total_transferred = 0
|
||||
for(var/datum/reagent/R in input_item.reagents.reagent_list)
|
||||
for(var/chargetype in charges)
|
||||
var/datum/rig_charge/charge = charges[chargetype]
|
||||
if(charge.display_name == R.id)
|
||||
|
||||
var/chems_to_transfer = R.volume
|
||||
|
||||
if((charge.charges + chems_to_transfer) > max_reagent_volume)
|
||||
chems_to_transfer = max_reagent_volume - charge.charges
|
||||
|
||||
charge.charges += chems_to_transfer
|
||||
input_item.reagents.remove_reagent(R.id, chems_to_transfer)
|
||||
total_transferred += chems_to_transfer
|
||||
|
||||
break
|
||||
|
||||
if(total_transferred)
|
||||
user << "<font color='blue'>You transfer [total_transferred] units into the suit reservoir.</font>"
|
||||
else
|
||||
user << "<span class='danger'>None of the reagents seem suitable.</span>"
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/chem_dispenser/engage(atom/target)
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = holder.wearer
|
||||
|
||||
if(!charge_selected)
|
||||
H << "<span class='danger'>You have not selected a chemical type.</span>"
|
||||
return 0
|
||||
|
||||
var/datum/rig_charge/charge = charges[charge_selected]
|
||||
|
||||
if(!charge)
|
||||
return 0
|
||||
|
||||
var/chems_to_use = 10
|
||||
if(charge.charges <= 0)
|
||||
H << "<span class='danger'>Insufficient chems!</span>"
|
||||
return 0
|
||||
else if(charge.charges < chems_to_use)
|
||||
chems_to_use = charge.charges
|
||||
|
||||
var/mob/living/target_mob
|
||||
if(target)
|
||||
if(istype(target,/mob/living))
|
||||
target_mob = target
|
||||
else
|
||||
return 0
|
||||
else
|
||||
target_mob = H
|
||||
|
||||
if(target_mob != H)
|
||||
H << "<span class='danger'>You inject [target_mob] with [chems_to_use] unit[chems_to_use == 1 ? "" : "s"] of [charge.display_name].</span>"
|
||||
target_mob << "<span class='danger'>You feel a rushing in your veins as [chems_to_use] unit[chems_to_use == 1 ? "" : "s"] of [charge.display_name] [chems_to_use == 1 ? "is" : "are"] injected.</span>"
|
||||
target_mob.reagents.add_reagent(charge.display_name, chems_to_use)
|
||||
|
||||
charge.charges -= chems_to_use
|
||||
if(charge.charges < 0) charge.charges = 0
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/chem_dispenser/combat
|
||||
|
||||
|
||||
/obj/item/rig_module/chem_dispenser/injector
|
||||
|
||||
name = "mounted chemical injector"
|
||||
desc = "A complex web of tubing and a large needle suitable for hardsuit use."
|
||||
usable = 0
|
||||
selectable = 1
|
||||
disruptive = 1
|
||||
|
||||
interface_name = "mounted chem injector"
|
||||
interface_desc = "Dispenses loaded chemicals via an arm-mounted injector."
|
||||
|
||||
/obj/item/rig_module/voice
|
||||
|
||||
name = "hardsuit voice synthesiser"
|
||||
desc = "A speaker box and sound processor."
|
||||
usable = 1
|
||||
selectable = 0
|
||||
toggleable = 0
|
||||
disruptive = 0
|
||||
|
||||
engage_string = "Configure Synthesiser"
|
||||
|
||||
interface_name = "voice synthesiser"
|
||||
interface_desc = "A flexible and powerful voice modulator system."
|
||||
|
||||
var/obj/item/voice_changer/voice_holder
|
||||
|
||||
/obj/item/rig_module/voice/New()
|
||||
..()
|
||||
voice_holder = new(src)
|
||||
voice_holder.active = 0
|
||||
|
||||
/obj/item/rig_module/voice/installed()
|
||||
..()
|
||||
holder.speech = src
|
||||
|
||||
/obj/item/rig_module/voice/engage()
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
var/choice= input("Would you like to toggle the synthesiser or set the name?") as null|anything in list("Enable","Disable","Set Name")
|
||||
|
||||
if(!choice)
|
||||
return 0
|
||||
|
||||
switch(choice)
|
||||
if("Enable")
|
||||
active = 1
|
||||
voice_holder.active = 1
|
||||
usr << "<font color='blue'>You enable the speech synthesiser.</font>"
|
||||
if("Disable")
|
||||
active = 0
|
||||
voice_holder.active = 0
|
||||
usr << "<font color='blue'>You disable the speech synthesiser.</font>"
|
||||
if("Set Name")
|
||||
var/raw_choice = input(usr, "Please enter a new name.") as text|null
|
||||
if(!raw_choice)
|
||||
return 0
|
||||
voice_holder.voice = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN))
|
||||
usr << "You are now mimicking <B>[voice_holder.voice]</B>.</font>"
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/maneuvering_jets
|
||||
|
||||
name = "hardsuit maneuvering jets"
|
||||
desc = "A compact gas thruster system for a hardsuit."
|
||||
usable = 1
|
||||
toggleable = 1
|
||||
selectable = 0
|
||||
disruptive = 0
|
||||
|
||||
suit_overlay_active = "maneuvering_active"
|
||||
suit_overlay_inactive = "maneuvering_inactive"
|
||||
|
||||
engage_string = "Toggle Stabilizers"
|
||||
activate_string = "Activate Thrusters"
|
||||
deactivate_string = "Deactivate Thrusters"
|
||||
|
||||
interface_name = "maneuvering jets"
|
||||
interface_desc = "An inbuilt EVA maneuvering system that runs off the rig air supply."
|
||||
|
||||
var/obj/item/weapon/tank/jetpack/rig/jets
|
||||
|
||||
/obj/item/rig_module/maneuvering_jets/engage()
|
||||
if(!..())
|
||||
return 0
|
||||
jets.toggle_rockets()
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/maneuvering_jets/activate()
|
||||
|
||||
if(active)
|
||||
return 0
|
||||
|
||||
active = 1
|
||||
|
||||
spawn(1)
|
||||
if(suit_overlay_active)
|
||||
suit_overlay = suit_overlay_active
|
||||
else
|
||||
suit_overlay = null
|
||||
holder.update_icon()
|
||||
|
||||
if(!jets.on)
|
||||
jets.toggle()
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/maneuvering_jets/deactivate()
|
||||
if(!..())
|
||||
return 0
|
||||
if(jets.on)
|
||||
jets.toggle()
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/maneuvering_jets/New()
|
||||
..()
|
||||
jets = new(src)
|
||||
|
||||
/obj/item/rig_module/maneuvering_jets/installed()
|
||||
..()
|
||||
jets.holder = holder
|
||||
jets.ion_trail.set_up(holder)
|
||||
|
||||
/obj/item/rig_module/maneuvering_jets/removed()
|
||||
..()
|
||||
jets.holder = null
|
||||
jets.ion_trail.set_up(jets)
|
||||
|
||||
/obj/item/rig_module/foam_sprayer
|
||||
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Contains
|
||||
* /obj/item/rig_module/vision
|
||||
* /obj/item/rig_module/vision/meson
|
||||
* /obj/item/rig_module/vision/thermal
|
||||
*/
|
||||
|
||||
/datum/rig_vision
|
||||
var/mode
|
||||
var/obj/item/clothing/glasses/glasses
|
||||
|
||||
/datum/rig_vision/nvg
|
||||
mode = "night vision"
|
||||
/datum/rig_vision/nvg/New()
|
||||
glasses = new /obj/item/clothing/glasses/night
|
||||
|
||||
/datum/rig_vision/thermal
|
||||
mode = "thermal scanner"
|
||||
/datum/rig_vision/thermal/New()
|
||||
glasses = new /obj/item/clothing/glasses/thermal
|
||||
|
||||
/datum/rig_vision/meson
|
||||
mode = "meson scanner"
|
||||
/datum/rig_vision/meson/New()
|
||||
glasses = new /obj/item/clothing/glasses/meson
|
||||
|
||||
/obj/item/rig_module/vision
|
||||
|
||||
name = "hardsuit visor"
|
||||
desc = "A layered, translucent visor system for a hardsuit."
|
||||
|
||||
interface_name = "optical scanners"
|
||||
interface_desc = "An integrated multi-mode vision system."
|
||||
|
||||
usable = 1
|
||||
toggleable = 1
|
||||
disruptive = 0
|
||||
|
||||
engage_string = "Cycle Visor Mode"
|
||||
activate_string = "Enable Visor"
|
||||
deactivate_string = "Disable Visor"
|
||||
|
||||
var/datum/rig_vision/vision
|
||||
var/list/vision_modes = list(
|
||||
/datum/rig_vision/nvg,
|
||||
/datum/rig_vision/thermal,
|
||||
/datum/rig_vision/meson
|
||||
)
|
||||
|
||||
var/vision_index
|
||||
|
||||
/obj/item/rig_module/vision/meson
|
||||
|
||||
name = "hardsuit meson scanner"
|
||||
desc = "A layered, translucent visor system for a hardsuit."
|
||||
|
||||
usable = 0
|
||||
|
||||
interface_name = "meson scanner"
|
||||
interface_desc = "An integrated meson scanner."
|
||||
|
||||
vision_modes = list(/datum/rig_vision/meson)
|
||||
|
||||
/obj/item/rig_module/vision/thermal
|
||||
|
||||
name = "hardsuit thermal scanner"
|
||||
desc = "A layered, translucent visor system for a hardsuit."
|
||||
|
||||
usable = 0
|
||||
|
||||
interface_name = "thermal scanner"
|
||||
interface_desc = "An integrated thermal scanner."
|
||||
|
||||
vision_modes = list(/datum/rig_vision/thermal)
|
||||
|
||||
// There should only ever be one vision module installed in a suit.
|
||||
/obj/item/rig_module/vision/installed()
|
||||
..()
|
||||
holder.visor = src
|
||||
|
||||
/obj/item/rig_module/vision/engage()
|
||||
|
||||
var/starting_up = !active
|
||||
|
||||
if(!..() || !vision_modes)
|
||||
return 0
|
||||
|
||||
// Don't cycle if this engage() is being called by activate().
|
||||
if(starting_up)
|
||||
holder.wearer << "<font color='blue'>You activate your visual sensors.</font>"
|
||||
return 1
|
||||
|
||||
if(vision_modes.len > 1)
|
||||
vision_index++
|
||||
if(vision_index > vision_modes.len)
|
||||
vision_index = 1
|
||||
vision = vision_modes[vision_index]
|
||||
|
||||
holder.wearer << "<font color='blue'>You cycle your sensors to <b>[vision.mode]</b> mode.</font>"
|
||||
else
|
||||
holder.wearer << "<font color='blue'>Your sensors only have one mode.</font>"
|
||||
return 1
|
||||
|
||||
/obj/item/rig_module/vision/New()
|
||||
..()
|
||||
|
||||
if(!vision_modes)
|
||||
return
|
||||
|
||||
vision_index = 1
|
||||
var/list/processed_vision = list()
|
||||
|
||||
for(var/vision_mode in vision_modes)
|
||||
var/datum/rig_vision/vision_datum = new vision_mode
|
||||
if(!vision) vision = vision_datum
|
||||
processed_vision += vision_datum
|
||||
|
||||
vision_modes = processed_vision
|
||||
@@ -0,0 +1,699 @@
|
||||
#define ONLY_DEPLOY 1
|
||||
#define ONLY_RETRACT 2
|
||||
#define SEAL_DELAY 30
|
||||
|
||||
/*
|
||||
* Defines the behavior of hardsuits/rigs/power armour.
|
||||
*/
|
||||
|
||||
/obj/item/weapon/rig
|
||||
|
||||
name = "hardsuit control module"
|
||||
icon = 'icons/obj/rig_modules.dmi'
|
||||
desc = "A back-mounted hardsuit deployment and control mechanism."
|
||||
slot_flags = SLOT_BACK
|
||||
req_one_access = null
|
||||
req_access = null
|
||||
w_class = 4
|
||||
|
||||
// These values are passed on to all component pieces.
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20)
|
||||
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
siemens_coefficient = 0
|
||||
permeability_coefficient = 0
|
||||
|
||||
var/interface_path = "hardsuit.tmpl"
|
||||
var/ai_interface_path = "hardsuit.tmpl"
|
||||
var/interface_title = "Hardsuit Controller"
|
||||
|
||||
// Keeps track of what this rig should spawn with.
|
||||
var/suit_type = "hardsuit"
|
||||
var/list/initial_modules
|
||||
var/chest_type = /obj/item/clothing/suit/space/rig
|
||||
var/helm_type = /obj/item/clothing/head/helmet/space/rig
|
||||
var/boot_type = /obj/item/clothing/shoes/rig
|
||||
var/glove_type = /obj/item/clothing/gloves/rig
|
||||
var/cell_type = /obj/item/weapon/cell/high
|
||||
var/air_type = /obj/item/weapon/tank/oxygen
|
||||
|
||||
//Component/device holders.
|
||||
var/obj/item/weapon/tank/air_supply // Air tank, if any.
|
||||
var/obj/item/clothing/shoes/rig/boots = null // Deployable boots, if any.
|
||||
var/obj/item/clothing/suit/space/rig/chest // Deployable chestpiece, if any.
|
||||
var/obj/item/clothing/head/helmet/space/rig/helmet = null // Deployable helmet, if any.
|
||||
var/obj/item/clothing/gloves/rig/gloves = null // Deployable gauntlets, if any.
|
||||
var/obj/item/weapon/cell/cell // Power supply, if any.
|
||||
var/obj/item/rig_module/selected_module = null // Primary system (used with middle-click)
|
||||
var/obj/item/rig_module/vision/visor // Kinda shitty to have a var for a module, but saves time.
|
||||
var/obj/item/rig_module/voice/speech // As above.
|
||||
var/mob/living/carbon/human/wearer // The person currently wearing the rig.
|
||||
var/image/mob_icon // Holder for on-mob icon.
|
||||
var/list/installed_modules = list() // Power consumption/use bookkeeping.
|
||||
|
||||
// Rig status vars.
|
||||
var/open = 0 // Access panel status.
|
||||
var/locked = 1 // Lock status.
|
||||
var/subverted = 0
|
||||
var/interface_locked = 0
|
||||
var/control_overridden = 0
|
||||
var/ai_override_enabled = 0
|
||||
var/security_check_enabled = 1
|
||||
var/malfunctioning = 0
|
||||
var/malfunction_delay = 0
|
||||
var/electrified = 0
|
||||
var/locked_down = 0
|
||||
|
||||
var/sealing // Keeps track of seal status independantly of canremove.
|
||||
var/offline = 1 // Should we be applying suit maluses?
|
||||
var/offline_slowdown = 10 // If the suit is deployed and unpowered, it sets slowdown to this.
|
||||
var/vision_restriction
|
||||
var/offline_vision_restriction = 1 // 0 - none, 1 - welder vision, 2 - blind. Maybe move this to helmets.
|
||||
|
||||
// Wiring! How exciting.
|
||||
var/datum/wires/rig/wires
|
||||
var/datum/effect/effect/system/spark_spread/spark_system
|
||||
|
||||
/obj/item/weapon/rig/examine()
|
||||
..()
|
||||
if(wearer)
|
||||
for(var/obj/item/piece in list(helmet,gloves,chest,boots))
|
||||
if(!piece || piece.loc != wearer)
|
||||
continue
|
||||
usr << "\icon[piece] \The [piece] [piece.gender == PLURAL ? "are" : "is"] deployed."
|
||||
|
||||
if(src.loc == usr)
|
||||
usr << "The maintenance panel is [open ? "open" : "closed"]."
|
||||
usr << "Hardsuit systems are [offline ? "<font color='red'>offline</font>" : "<font color='green'>online</green>"]."
|
||||
|
||||
/obj/item/weapon/rig/New()
|
||||
..()
|
||||
|
||||
wires = new(src)
|
||||
|
||||
if((!req_access || !req_access.len) && (!req_one_access || !req_one_access.len))
|
||||
locked = 0
|
||||
|
||||
spark_system = new()
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
processing_objects |= src
|
||||
|
||||
if(initial_modules && initial_modules.len)
|
||||
for(var/path in initial_modules)
|
||||
var/obj/item/rig_module/module = new path(src)
|
||||
installed_modules += module
|
||||
module.installed(src)
|
||||
|
||||
// Create and initialize our various segments.
|
||||
if(cell_type)
|
||||
cell = new cell_type(src)
|
||||
if(air_type)
|
||||
air_supply = new air_type(src)
|
||||
if(glove_type)
|
||||
gloves = new glove_type(src)
|
||||
verbs |= /obj/item/weapon/rig/proc/toggle_gauntlets
|
||||
if(helm_type)
|
||||
helmet = new helm_type(src)
|
||||
verbs |= /obj/item/weapon/rig/proc/toggle_helmet
|
||||
if(boot_type)
|
||||
boots = new boot_type(src)
|
||||
verbs |= /obj/item/weapon/rig/proc/toggle_boots
|
||||
if(chest_type)
|
||||
chest = new chest_type(src)
|
||||
verbs |= /obj/item/weapon/rig/proc/toggle_chest
|
||||
|
||||
for(var/obj/item/piece in list(gloves,helmet,boots,chest))
|
||||
if(!piece)
|
||||
continue
|
||||
piece.canremove = 0
|
||||
piece.name = "[suit_type] [initial(piece.name)]"
|
||||
piece.desc = "It seems to be part of a [src.name]."
|
||||
piece.icon_state = "[initial(icon_state)]"
|
||||
piece.armor = armor
|
||||
piece.min_cold_protection_temperature = min_cold_protection_temperature
|
||||
piece.max_heat_protection_temperature = max_heat_protection_temperature
|
||||
piece.siemens_coefficient = siemens_coefficient
|
||||
piece.permeability_coefficient = permeability_coefficient
|
||||
|
||||
spawn(1)
|
||||
var/mob/M = loc
|
||||
if(istype(M))
|
||||
toggle_seals(M,1)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/rig/Del()
|
||||
for(var/obj/item/piece in list(gloves,boots,helmet,chest))
|
||||
var/mob/living/M = piece.loc
|
||||
if(istype(M))
|
||||
M.drop_from_inventory(piece)
|
||||
del(piece)
|
||||
processing_objects -= src
|
||||
..()
|
||||
|
||||
/obj/item/weapon/rig/proc/suit_is_deployed()
|
||||
if(!istype(wearer) || src.loc != wearer || wearer.back != src)
|
||||
return 0
|
||||
if(helm_type && (!helmet || wearer.head != helmet))
|
||||
return 0
|
||||
if(glove_type && (!gloves || wearer.gloves != gloves))
|
||||
return 0
|
||||
if(boot_type && (!boots || wearer.shoes != boots))
|
||||
return 0
|
||||
if(chest_type && (!chest || wearer.wear_suit != chest))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/rig/proc/toggle_seals(var/mob/living/carbon/human/M,var/instant)
|
||||
|
||||
if(sealing) return
|
||||
|
||||
if(M && !(istype(M) && M.back == src ) && !istype(M,/mob/living/silicon) )
|
||||
return 0
|
||||
|
||||
if(!check_power_cost(M))
|
||||
return 0
|
||||
|
||||
deploy(M,instant)
|
||||
|
||||
var/seal_target = !canremove
|
||||
var/failed_to_seal
|
||||
|
||||
canremove = 0 // No removing the suit while unsealing.
|
||||
sealing = 1
|
||||
|
||||
if(!seal_target && !suit_is_deployed())
|
||||
M << "<span class='danger'>The suit flashes an error light. It can't function properly without being fully deployed.</span>"
|
||||
failed_to_seal = 1
|
||||
|
||||
if(!failed_to_seal && instant)
|
||||
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
|
||||
if(!piece) continue
|
||||
piece.icon_state = "[initial(icon_state)]_sealed"
|
||||
update_icon()
|
||||
|
||||
else if(!failed_to_seal)
|
||||
|
||||
M << "<font color='blue'>With a quiet hum, the suit begins running checks and adjusting components.</font>"
|
||||
|
||||
if(!do_after(M,SEAL_DELAY))
|
||||
if(M) M << "<span class='warning'>You must remain still while the suit is adjusting the components.</span>"
|
||||
failed_to_seal = 1
|
||||
|
||||
if(!M)
|
||||
failed_to_seal = 1
|
||||
else
|
||||
for(var/list/piece_data in list(list(M.shoes,boots,"boots"),list(M.gloves,gloves,"gloves"),list(M.head,helmet,"helmet"),list(M.wear_suit,chest,"chest")))
|
||||
|
||||
var/obj/item/piece = piece_data[1]
|
||||
var/obj/item/compare_piece = piece_data[2]
|
||||
var/msg_type = piece_data[3]
|
||||
|
||||
if(!piece)
|
||||
continue
|
||||
|
||||
if(!istype(M) || !istype(piece) || !istype(compare_piece) || !msg_type)
|
||||
if(!failed_to_seal)
|
||||
if(M) M << "<span class='warning'>You must remain still while the suit is adjusting the components.</span>"
|
||||
failed_to_seal = 1
|
||||
break
|
||||
|
||||
if(M.back == src && piece == compare_piece && do_after(M,SEAL_DELAY))
|
||||
piece.icon_state = "[initial(icon_state)][!seal_target ? "_sealed" : ""]"
|
||||
switch(msg_type)
|
||||
if("boots")
|
||||
M << "<font color='blue'>\The [piece] [!seal_target ? "seal around your feet" : "relax their grip on your legs"].</font>"
|
||||
M.update_inv_shoes()
|
||||
if("gloves")
|
||||
M << "<font color='blue'>\The [piece] [!seal_target ? "tighten around your fingers and wrists" : "become loose around your fingers"].</font>"
|
||||
M.update_inv_gloves()
|
||||
if("chest")
|
||||
M << "<font color='blue'>\The [piece] [!seal_target ? "cinches tight again your chest" : "releases your chest"].</font>"
|
||||
M.update_inv_wear_suit()
|
||||
if("helmet")
|
||||
M << "<font color='blue'>\The [piece] hisses [!seal_target ? "closed" : "open"].</font>"
|
||||
M.update_inv_head()
|
||||
if(!seal_target)
|
||||
if(flags & AIRTIGHT)
|
||||
helmet.flags |= AIRTIGHT
|
||||
helmet.flags_inv |= (HIDEEYES|HIDEFACE)
|
||||
helmet.body_parts_covered |= (FACE|EYES)
|
||||
else
|
||||
helmet.flags &= ~AIRTIGHT
|
||||
helmet.flags_inv &= ~(HIDEEYES|HIDEFACE)
|
||||
helmet.body_parts_covered &= ~(FACE|EYES)
|
||||
else
|
||||
failed_to_seal = 1
|
||||
|
||||
if((M && !(istype(M) && M.back == src) && !istype(M,/mob/living/silicon)) || (!seal_target && !suit_is_deployed()))
|
||||
failed_to_seal = 1
|
||||
|
||||
sealing = null
|
||||
|
||||
if(failed_to_seal)
|
||||
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
|
||||
if(!piece) continue
|
||||
piece.icon_state = "[initial(icon_state)][!seal_target ? "" : "_sealed"]"
|
||||
canremove = !seal_target
|
||||
if(helmet)
|
||||
if(canremove)
|
||||
if(flags & AIRTIGHT)
|
||||
helmet.flags |= AIRTIGHT
|
||||
helmet.flags_inv |= (HIDEEYES|HIDEFACE)
|
||||
helmet.body_parts_covered |= (FACE|EYES)
|
||||
else
|
||||
if(flags & AIRTIGHT)
|
||||
helmet.flags &= ~AIRTIGHT
|
||||
helmet.flags_inv &= ~(HIDEEYES|HIDEFACE)
|
||||
helmet.body_parts_covered &= ~(FACE|EYES)
|
||||
update_icon(1)
|
||||
return 0
|
||||
|
||||
// Success!
|
||||
canremove = seal_target
|
||||
M << "<font color='blue'><b>Your entire suit [canremove ? "loosens as the components relax" : "tightens around you as the components lock into place"].</b></font>"
|
||||
|
||||
if(canremove)
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
module.deactivate()
|
||||
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
|
||||
if(!piece) continue
|
||||
if(canremove && (flags & AIRTIGHT))
|
||||
piece.flags &= ~STOPSPRESSUREDMAGE
|
||||
piece.flags &= ~AIRTIGHT
|
||||
else
|
||||
piece.flags |= STOPSPRESSUREDMAGE
|
||||
piece.flags |= AIRTIGHT
|
||||
update_icon(1)
|
||||
|
||||
/obj/item/weapon/rig/process()
|
||||
|
||||
if(!istype(wearer) || loc != wearer || wearer.back != src || canremove || !cell || cell.charge <= 0)
|
||||
if(!cell || cell.charge <= 0)
|
||||
if(electrified >0)
|
||||
electrified = 0
|
||||
if(!offline)
|
||||
if(istype(wearer))
|
||||
if(!canremove)
|
||||
if (offline_slowdown < 3)
|
||||
wearer << "<span class='danger'>Your suit beeps stridently, and suddenly goes dead.</span>"
|
||||
else
|
||||
wearer << "<span class='danger'>Your suit beeps stridently, and suddenly you're wearing a leaden mass of metal and plastic instead of a powered suit.</span>"
|
||||
if(offline_vision_restriction == 1)
|
||||
wearer << "<span class='danger'>The suit optics flicker and die, leaving you with restricted vision.</span>"
|
||||
else if(offline_vision_restriction == 2)
|
||||
wearer << "<span class='danger'>The suit optics drop out completely, drowning you in darkness.</span>"
|
||||
if(!offline)
|
||||
offline = 1
|
||||
else
|
||||
if(offline)
|
||||
offline = 0
|
||||
slowdown = initial(slowdown)
|
||||
|
||||
if(offline)
|
||||
if(offline == 1)
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
module.deactivate()
|
||||
offline = 2
|
||||
slowdown = offline_slowdown
|
||||
return
|
||||
|
||||
if(cell && cell.charge > 0 && electrified > 0)
|
||||
electrified--
|
||||
|
||||
if(malfunction_delay > 0)
|
||||
malfunction_delay--
|
||||
else if(malfunctioning)
|
||||
malfunctioning--
|
||||
malfunction()
|
||||
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
cell.use(module.process()*10)
|
||||
|
||||
/obj/item/weapon/rig/proc/check_power_cost(var/mob/living/user, var/cost, var/use_unconcious, var/obj/item/rig_module/mod, var/user_is_ai)
|
||||
|
||||
if(!istype(user))
|
||||
return 0
|
||||
|
||||
var/fail_msg
|
||||
|
||||
if(!user_is_ai)
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(istype(H) && H.back != src)
|
||||
fail_msg = "<span class='warning'>You must be wearing \the [src] to do this.</span>"
|
||||
else if(user.incorporeal_move)
|
||||
fail_msg = "<span class='warning'>You must be solid to do this.</span>"
|
||||
if(sealing)
|
||||
fail_msg = "<span class='warning'>The hardsuit is in the process of adjusting seals and cannot be activated.</span>"
|
||||
else if(!fail_msg && ((use_unconcious && user.stat > 1) || (!use_unconcious && user.stat)))
|
||||
fail_msg = "<span class='warning'>You are in no fit state to do that."
|
||||
else if(!cell)
|
||||
fail_msg = "<span class='warning'>There is no cell installed in the suit.</span>"
|
||||
else if(cost && cell.charge < cost * 10) //TODO: Cellrate?
|
||||
fail_msg = "<span class='warning'>Not enough stored power.</span>"
|
||||
|
||||
if(fail_msg)
|
||||
user << "[fail_msg]"
|
||||
return 0
|
||||
|
||||
// This is largely for cancelling stealth and whatever.
|
||||
if(mod && mod.disruptive)
|
||||
for(var/obj/item/rig_module/module in (installed_modules - mod))
|
||||
if(module.active && module.disruptable)
|
||||
module.deactivate()
|
||||
|
||||
cell.use(cost*10)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/rig/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
|
||||
if(!user)
|
||||
return
|
||||
|
||||
var/list/data = list()
|
||||
|
||||
if(selected_module)
|
||||
data["primarysystem"] = "[selected_module.interface_name]"
|
||||
|
||||
if(src.loc != user)
|
||||
data["ai"] = 1
|
||||
|
||||
data["seals"] = "[src.canremove]"
|
||||
data["sealing"] = "[src.sealing]"
|
||||
data["helmet"] = (helmet ? "[helmet.name]" : "None.")
|
||||
data["gauntlets"] = (gloves ? "[gloves.name]" : "None.")
|
||||
data["boots"] = (boots ? "[boots.name]" : "None.")
|
||||
data["chest"] = (chest ? "[chest.name]" : "None.")
|
||||
|
||||
data["charge"] = cell ? cell.charge : 0
|
||||
data["maxcharge"] = cell ? cell.maxcharge : 0
|
||||
data["chargestatus"] = cell ? Floor((cell.charge/cell.maxcharge)*50) : 0
|
||||
|
||||
data["emagged"] = subverted
|
||||
data["coverlock"] = locked
|
||||
data["interfacelock"] = interface_locked
|
||||
data["aicontrol"] = control_overridden
|
||||
data["aioverride"] = ai_override_enabled
|
||||
data["securitycheck"] = security_check_enabled
|
||||
data["malf"] = malfunctioning
|
||||
|
||||
|
||||
var/list/module_list = list()
|
||||
var/i = 1
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
var/list/module_data = list(
|
||||
"index" = i,
|
||||
"name" = "[module.interface_name]",
|
||||
"desc" = "[module.interface_desc]",
|
||||
"can_use" = "[module.usable]",
|
||||
"can_select" = "[module.selectable]",
|
||||
"can_toggle" = "[module.toggleable]",
|
||||
"is_active" = "[module.active]",
|
||||
"engagecost" = module.use_power_cost*10,
|
||||
"activecost" = module.active_power_cost*10,
|
||||
"passivecost" = module.passive_power_cost*10,
|
||||
"engagestring" = module.engage_string,
|
||||
"activatestring" = module.activate_string,
|
||||
"deactivatestring" = module.deactivate_string,
|
||||
"damage" = module.damage
|
||||
)
|
||||
|
||||
if(module.charges && module.charges.len)
|
||||
|
||||
module_data["charges"] = list()
|
||||
var/datum/rig_charge/selected = module.charges[module.charge_selected]
|
||||
module_data["chargetype"] = selected ? "[selected.display_name]" : "none"
|
||||
|
||||
for(var/chargetype in module.charges)
|
||||
var/datum/rig_charge/charge = module.charges[chargetype]
|
||||
module_data["charges"] += list(list("caption" = "[chargetype] ([charge.charges])", "index" = "[chargetype]"))
|
||||
|
||||
module_list += list(module_data)
|
||||
i++
|
||||
|
||||
if(module_list.len)
|
||||
data["modules"] = module_list
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 800, 600)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/item/weapon/rig/update_icon(var/update_mob_icon)
|
||||
|
||||
//TODO: Maybe consider a cache for this (use mob_icon as blank canvas, use suit icon overlay).
|
||||
overlays.Cut()
|
||||
if(mob_icon)
|
||||
mob_icon.overlays.Cut()
|
||||
|
||||
if(!mob_icon || update_mob_icon)
|
||||
var/species_icon = 'icons/mob/back.dmi'
|
||||
// Since setting mob_icon will override the species checks in
|
||||
// update_inv_wear_suit(), handle species checks here.
|
||||
if(wearer && sprite_sheets && sprite_sheets[wearer.species.name])
|
||||
species_icon = sprite_sheets[wearer.species.name]
|
||||
mob_icon = image("icon" = species_icon, "icon_state" = "[icon_state]")
|
||||
|
||||
if(installed_modules.len)
|
||||
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
if(module.suit_overlay)
|
||||
mob_icon.overlays += image("icon" = 'icons/mob/rig_modules.dmi', "icon_state" = "[module.suit_overlay]")
|
||||
chest.overlays += image("icon" = 'icons/mob/rig_modules.dmi', "icon_state" = "[module.suit_overlay]", "dir" = SOUTH)
|
||||
|
||||
if(wearer)
|
||||
wearer.update_inv_shoes()
|
||||
wearer.update_inv_gloves()
|
||||
wearer.update_inv_head()
|
||||
wearer.update_inv_wear_suit()
|
||||
wearer.update_inv_back()
|
||||
return
|
||||
|
||||
/obj/item/weapon/rig/Topic(href,href_list)
|
||||
|
||||
var/mob/living/carbon/human/H = usr
|
||||
|
||||
if((istype(H) && H.back == src) || (istype(H,/mob/living/silicon)))
|
||||
|
||||
if(istype(H,/mob/living/silicon))
|
||||
if(!control_overridden)
|
||||
usr << "<span class='danger'>Synthetic access disabled. Please consult hardware provider.</span>"
|
||||
return
|
||||
else if(security_check_enabled && !src.allowed(usr))
|
||||
usr << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
if(href_list["toggle_piece"])
|
||||
toggle_piece(href_list["toggle_piece"], H)
|
||||
else if(href_list["toggle_seals"])
|
||||
toggle_seals(H)
|
||||
else if(href_list["interact_module"])
|
||||
|
||||
var/module_index = text2num(href_list["interact_module"])
|
||||
|
||||
if(module_index > 0 && module_index <= installed_modules.len)
|
||||
var/obj/item/rig_module/module = installed_modules[module_index]
|
||||
switch(href_list["module_mode"])
|
||||
if("activate")
|
||||
module.activate()
|
||||
if("deactivate")
|
||||
module.deactivate()
|
||||
if("engage")
|
||||
module.engage()
|
||||
if("select")
|
||||
selected_module = module
|
||||
if("select_charge_type")
|
||||
module.charge_selected = href_list["charge_type"]
|
||||
else if(href_list["toggle_ai_control"])
|
||||
ai_override_enabled = !ai_override_enabled
|
||||
else if(href_list["toggle_suit_lock"])
|
||||
security_check_enabled = !security_check_enabled
|
||||
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/item/weapon/rig/equipped(mob/living/carbon/human/M)
|
||||
..()
|
||||
|
||||
if(istype(M) && M.back == src)
|
||||
M.visible_message("<font color='blue'>[M] starts putting on \the [src]...</font>", "<font color='blue'>You start putting on \the [src]...</font>")
|
||||
|
||||
if(!do_after(M,SEAL_DELAY))
|
||||
if(M && M.back == src)
|
||||
M.back = null
|
||||
M.drop_from_inventory(src)
|
||||
src.loc = get_turf(src)
|
||||
return
|
||||
|
||||
if(istype(M) && M.back == src)
|
||||
M.visible_message("<font color='blue'><b>[M] struggles into \the [src].</b></font>", "<font color='blue'><b>You struggle into \the [src].</b></font>")
|
||||
wearer = M
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/rig/proc/toggle_piece(var/piece, var/mob/living/carbon/human/H, var/deploy_mode)
|
||||
|
||||
if(sealing)
|
||||
return
|
||||
|
||||
if(!cell || !cell.charge)
|
||||
H << "<span class='warning'>The suit is out of power.</span>"
|
||||
return
|
||||
|
||||
if(!istype(wearer) || !wearer.back == src)
|
||||
H << "<span class='warning'>The hardsuit is not being worn.</span>"
|
||||
return
|
||||
|
||||
var/obj/item/check_slot
|
||||
var/equip_to
|
||||
var/obj/item/use_obj
|
||||
|
||||
if(!H)
|
||||
return
|
||||
|
||||
switch(piece)
|
||||
if("helmet")
|
||||
equip_to = slot_head
|
||||
use_obj = helmet
|
||||
check_slot = H.head
|
||||
if("gauntlets")
|
||||
equip_to = slot_gloves
|
||||
use_obj = gloves
|
||||
check_slot = H.gloves
|
||||
if("boots")
|
||||
equip_to = slot_shoes
|
||||
use_obj = boots
|
||||
check_slot = H.shoes
|
||||
if("chest")
|
||||
equip_to = slot_wear_suit
|
||||
use_obj = chest
|
||||
check_slot = H.wear_suit
|
||||
|
||||
if(use_obj)
|
||||
if(check_slot == use_obj && deploy_mode != ONLY_DEPLOY)
|
||||
|
||||
var/mob/living/carbon/human/holder
|
||||
|
||||
if(use_obj)
|
||||
holder = use_obj.loc
|
||||
if(istype(holder))
|
||||
if(use_obj && check_slot == use_obj)
|
||||
H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "retract" : "retracts"] swiftly.</b></font>"
|
||||
use_obj.canremove = 1
|
||||
holder.drop_from_inventory(use_obj)
|
||||
use_obj.canremove = 0
|
||||
use_obj.loc = src
|
||||
|
||||
else if (deploy_mode != ONLY_RETRACT)
|
||||
if(check_slot)
|
||||
if(check_slot != use_obj)
|
||||
H << "<span class='danger'>You are unable to deploy \the [piece] as \the [check_slot] [check_slot.gender == PLURAL ? "are" : "is"] in the way.</span>"
|
||||
return
|
||||
else
|
||||
H << "<font color='blue'><b>Your [use_obj.name] [use_obj.gender == PLURAL ? "deploy" : "deploys"] swiftly.</b></span>"
|
||||
use_obj.loc = H
|
||||
H.equip_to_slot(use_obj, equip_to)
|
||||
|
||||
if(piece == "helmet" && helmet)
|
||||
helmet.update_light(H)
|
||||
|
||||
/obj/item/weapon/rig/proc/deploy(mob/M,var/sealed)
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(!H || !istype(H)) return
|
||||
|
||||
if(H.back != src)
|
||||
return
|
||||
|
||||
if(sealed)
|
||||
if(H.head)
|
||||
var/obj/item/garbage = H.head
|
||||
H.drop_from_inventory(garbage)
|
||||
H.head = null
|
||||
del(garbage)
|
||||
|
||||
if(H.gloves)
|
||||
var/obj/item/garbage = H.gloves
|
||||
H.drop_from_inventory(garbage)
|
||||
H.gloves = null
|
||||
del(garbage)
|
||||
|
||||
if(H.shoes)
|
||||
var/obj/item/garbage = H.shoes
|
||||
H.drop_from_inventory(garbage)
|
||||
H.shoes = null
|
||||
del(garbage)
|
||||
|
||||
if(H.wear_suit)
|
||||
var/obj/item/garbage = H.wear_suit
|
||||
H.drop_from_inventory(garbage)
|
||||
H.wear_suit = null
|
||||
del(garbage)
|
||||
|
||||
for(var/piece in list("helmet","gauntlets","chest","boots"))
|
||||
toggle_piece(piece, H, ONLY_DEPLOY)
|
||||
|
||||
/obj/item/weapon/rig/dropped()
|
||||
..()
|
||||
for(var/piece in list("helmet","gauntlets","chest","boots"))
|
||||
toggle_piece(piece, wearer, ONLY_RETRACT)
|
||||
wearer = null
|
||||
|
||||
//Todo
|
||||
/obj/item/weapon/rig/proc/malfunction()
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/rig/emp_act(severity)
|
||||
malfunctioning += severity*10
|
||||
if(malfunction_delay <= 0)
|
||||
malfunction_delay = 20
|
||||
take_hit(severity*10,"electrical pulse")
|
||||
|
||||
/obj/item/weapon/rig/proc/shock(mob/user)
|
||||
if (electrocute_mob(user, cell, src))
|
||||
spark_system.start()
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/rig/proc/take_hit(damage,source)
|
||||
|
||||
if(!installed_modules.len)
|
||||
return
|
||||
|
||||
if(!prob(max(0,(damage-(chest ? chest.breach_threshold : 0)))))
|
||||
return
|
||||
|
||||
var/list/valid_modules = list()
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
if(module.damage < 2)
|
||||
valid_modules |= module
|
||||
|
||||
if(!valid_modules.len)
|
||||
return
|
||||
|
||||
var/obj/item/rig_module/dam_module = pick(valid_modules)
|
||||
dam_module.damage++
|
||||
|
||||
if(!source)
|
||||
source = "hit"
|
||||
|
||||
if(wearer)
|
||||
wearer << "<span class='danger'>The [source] has [dam_module.damage >= 2 ? "destroyed" : "damaged"] your [dam_module.interface_name]!"
|
||||
dam_module.deactivate()
|
||||
|
||||
/*/obj/item/weapon/rig/proc/forced_move(dir)
|
||||
if(locked_down)
|
||||
return 0
|
||||
if(!control_overridden)
|
||||
return
|
||||
if(!wearer || wearer.back != src)
|
||||
return 0
|
||||
wearer.Move(null,dir)*/
|
||||
|
||||
#undef ONLY_DEPLOY
|
||||
#undef ONLY_RETRACT
|
||||
#undef SEAL_DELAY
|
||||
@@ -0,0 +1,193 @@
|
||||
/obj/item/weapon/rig/attackby(obj/item/W as obj, mob/user as mob)
|
||||
|
||||
if(!istype(user,/mob/living)) return 0
|
||||
|
||||
if(electrified != 0)
|
||||
if(cell && cell.charge >= 100)
|
||||
cell.use(100)
|
||||
if(shock(user, 100))
|
||||
return
|
||||
|
||||
// Pass repair items on to the chestpiece.
|
||||
if(chest && (istype(W,/obj/item/stack/sheet/mineral/plastic) || istype(W,/obj/item/stack/sheet/metal) || istype(W, /obj/item/weapon/weldingtool)))
|
||||
return chest.attackby(W,user)
|
||||
|
||||
// Lock or unlock the access panel.
|
||||
if(istype(W, /obj/item/weapon/card) || istype(W, /obj/item/device/pda))
|
||||
|
||||
if(subverted)
|
||||
locked = 0
|
||||
user << "<span class='danger'>It looks like the locking system has been shorted out.</span>"
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/card/emag))
|
||||
req_access = null
|
||||
req_one_access = null
|
||||
locked = 0
|
||||
subverted = 1
|
||||
user << "<span class='danger'>You short out the access protocol for the suit.</span>"
|
||||
return
|
||||
|
||||
if((!req_access || !req_access.len) && (!req_one_access || !req_one_access.len))
|
||||
locked = 0
|
||||
user << "<span class='danger'>\The [src] doesn't seem to have a locking mechanism.</span>"
|
||||
return
|
||||
|
||||
if(security_check_enabled && !src.allowed(user))
|
||||
user << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
locked = !locked
|
||||
user << "You [locked ? "lock" : "unlock"] \the [src] access panel."
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/weapon/crowbar))
|
||||
|
||||
if(!open && locked)
|
||||
user << "The access panel is locked shut."
|
||||
return
|
||||
|
||||
open = !open
|
||||
user << "You [open ? "open" : "close"] the access panel."
|
||||
return
|
||||
|
||||
if(open)
|
||||
|
||||
// Hacking.
|
||||
if(istype(W,/obj/item/weapon/wirecutters) || istype(W,/obj/item/device/multitool))
|
||||
if(open)
|
||||
wires.Interact(user)
|
||||
else
|
||||
user << "You can't reach the wiring."
|
||||
return
|
||||
// Air tank.
|
||||
if(istype(W,/obj/item/weapon/tank)) //Todo, some kind of check for suits without integrated air supplies.
|
||||
|
||||
if(air_supply)
|
||||
user << "\The [src] already has a tank installed."
|
||||
return
|
||||
|
||||
user.drop_from_inventory(W)
|
||||
air_supply = W
|
||||
W.loc = src
|
||||
user << "You slot [W] into [src] and tighten the connecting valve."
|
||||
return
|
||||
|
||||
// Check if this is a hardsuit upgrade or a modification.
|
||||
else if(istype(W,/obj/item/rig_module))
|
||||
|
||||
if(istype(src.loc,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src.loc
|
||||
if(H.back == src)
|
||||
user << "<span class='danger'>You can't install a hardsuit module while the suit is being worn.</span>"
|
||||
return 1
|
||||
|
||||
if(!installed_modules) installed_modules = list()
|
||||
if(installed_modules.len)
|
||||
for(var/obj/item/rig_module/installed_mod in installed_modules)
|
||||
if(!installed_mod.redundant && istype(installed_mod,W))
|
||||
user << "The hardsuit already has a module of that class installed."
|
||||
return 1
|
||||
|
||||
var/obj/item/rig_module/mod = W
|
||||
user << "You begin installing \the [mod] into \the [src]."
|
||||
if(!do_after(user,40))
|
||||
return
|
||||
if(!user || !W)
|
||||
return
|
||||
user << "You install \the [mod] into \the [src]."
|
||||
user.drop_from_inventory(mod)
|
||||
installed_modules |= mod
|
||||
mod.loc = src
|
||||
mod.installed(src)
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
else if(!cell && istype(W,/obj/item/weapon/cell))
|
||||
|
||||
user << "You jack \the [W] into \the [src]'s battery mount."
|
||||
user.drop_from_inventory(W)
|
||||
W.loc = src
|
||||
src.cell = W
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/weapon/wrench))
|
||||
|
||||
if(!air_supply)
|
||||
user << "There is not tank to remove."
|
||||
return
|
||||
|
||||
user.put_in_hands(air_supply)
|
||||
user << "You detach and remove \the [air_supply]."
|
||||
air_supply = null
|
||||
return
|
||||
|
||||
else if(istype(W,/obj/item/weapon/screwdriver))
|
||||
|
||||
var/list/current_mounts = list()
|
||||
if(cell) current_mounts += "cell"
|
||||
if(installed_modules && installed_modules.len) current_mounts += "system module"
|
||||
|
||||
var/to_remove = input("Which would you like to modify?") as null|anything in current_mounts
|
||||
if(!to_remove)
|
||||
return
|
||||
|
||||
if(istype(src.loc,/mob/living/carbon/human) && to_remove != "cell")
|
||||
var/mob/living/carbon/human/H = src.loc
|
||||
if(H.back == src)
|
||||
user << "You can't remove an installed device while the hardsuit is being worn."
|
||||
return
|
||||
|
||||
switch(to_remove)
|
||||
|
||||
if("cell")
|
||||
|
||||
if(cell)
|
||||
user << "You detatch \the [cell] from \the [src]'s battery mount."
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
module.deactivate()
|
||||
cell.loc = user.put_in_hands(cell)
|
||||
cell = null
|
||||
else
|
||||
user << "There is nothing loaded in that mount."
|
||||
|
||||
if("system module")
|
||||
|
||||
var/list/possible_removals = list()
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
if(module.permanent)
|
||||
continue
|
||||
possible_removals[module.name] = module
|
||||
|
||||
if(!possible_removals.len)
|
||||
user << "There are no installed modules to remove."
|
||||
return
|
||||
|
||||
var/removal_choice = input("Which module would you like to remove?") as null|anything in possible_removals
|
||||
if(!removal_choice)
|
||||
return
|
||||
|
||||
var/obj/item/rig_module/removed = possible_removals[removal_choice]
|
||||
user << "You detatch \the [removed] from \the [src]."
|
||||
removed.loc = get_turf(src)
|
||||
removed.removed()
|
||||
installed_modules -= removed
|
||||
update_icon()
|
||||
|
||||
return
|
||||
|
||||
// If we've gotten this far, all we have left to do before we pass off to root procs
|
||||
// is check if any of the loaded modules want to use the item we've been given.
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
if(module.accepts_item(W,user)) //Item is handled in this proc
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/rig/attack_hand(var/mob/user)
|
||||
|
||||
if(electrified != 0)
|
||||
if(cell && cell.charge >= 100)
|
||||
cell.use(100)
|
||||
if(shock(user, 100))
|
||||
return
|
||||
..()
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Defines the helmets, gloves and shoes for rigs.
|
||||
*/
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig
|
||||
name = "helmet"
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | THICKMATERIAL
|
||||
flags_inv = HIDEEARS
|
||||
body_parts_covered = HEAD
|
||||
heat_protection = HEAD
|
||||
cold_protection = HEAD
|
||||
brightness_on = 4
|
||||
species_restricted = null
|
||||
|
||||
/obj/item/clothing/gloves/rig
|
||||
name = "gauntlets"
|
||||
flags = FPRINT | TABLEPASS | THICKMATERIAL
|
||||
body_parts_covered = HANDS
|
||||
heat_protection = HANDS
|
||||
cold_protection = HANDS
|
||||
species_restricted = null
|
||||
gender = PLURAL
|
||||
|
||||
/obj/item/clothing/shoes/rig
|
||||
name = "boots"
|
||||
cold_protection = FEET
|
||||
heat_protection = FEET
|
||||
species_restricted = null
|
||||
gender = PLURAL
|
||||
|
||||
/obj/item/clothing/suit/space/rig
|
||||
name = "chestpiece"
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit)
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
cold_protection = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
flags_inv = HIDEJUMPSUIT|HIDETAIL
|
||||
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | THICKMATERIAL | AIRTIGHT
|
||||
slowdown = 0
|
||||
breach_threshold = 35
|
||||
can_breach = 1
|
||||
supporting_limbs = list()
|
||||
|
||||
//TODO: move this to modules
|
||||
/obj/item/clothing/head/helmet/space/rig/proc/prevent_track()
|
||||
return 0
|
||||
|
||||
/obj/item/clothing/gloves/rig/Touch(var/atom/A, var/proximity)
|
||||
|
||||
if(!A || !proximity)
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(!istype(H) || !H.back)
|
||||
return 0
|
||||
|
||||
var/obj/item/weapon/rig/suit = H.back
|
||||
if(!suit || !istype(suit) || !suit.installed_modules.len)
|
||||
return 0
|
||||
|
||||
for(var/obj/item/rig_module/module in suit.installed_modules)
|
||||
if(module.active && module.activates_on_touch)
|
||||
if(module.engage(A))
|
||||
return 1
|
||||
|
||||
return 0
|
||||
@@ -0,0 +1,287 @@
|
||||
// Interface for humans.
|
||||
/obj/item/weapon/rig/verb/hardsuit_interface()
|
||||
|
||||
set name = "Open Hardsuit Interface"
|
||||
set desc = "Open the hardsuit system interface."
|
||||
set category = "Hardsuit"
|
||||
set src = usr.contents
|
||||
|
||||
if(wearer && wearer.back == src)
|
||||
ui_interact(usr)
|
||||
|
||||
/obj/item/weapon/rig/verb/toggle_vision()
|
||||
|
||||
set name = "Toggle Visor"
|
||||
set desc = "Turns your rig visor off or on."
|
||||
set category = "Hardsuit"
|
||||
set src = usr.contents
|
||||
|
||||
if(!istype(wearer) || !wearer.back == src)
|
||||
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
|
||||
return
|
||||
|
||||
if(!check_power_cost(usr))
|
||||
return
|
||||
|
||||
if(canremove)
|
||||
usr << "<span class='warning'>The suit is not active.</span>"
|
||||
return
|
||||
|
||||
if((security_check_enabled && !src.allowed(wearer)) || control_overridden)
|
||||
wearer << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
if(!visor)
|
||||
usr << "<span class='warning'>The hardsuit does not have a configurable visor.</span>"
|
||||
return
|
||||
|
||||
if(!visor.active)
|
||||
visor.activate()
|
||||
else
|
||||
visor.deactivate()
|
||||
|
||||
/obj/item/weapon/rig/proc/toggle_helmet()
|
||||
|
||||
set name = "Toggle Helmet"
|
||||
set desc = "Deploys or retracts your helmet."
|
||||
set category = "Hardsuit"
|
||||
set src = usr.contents
|
||||
|
||||
if(!istype(wearer) || !wearer.back == src)
|
||||
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
|
||||
return
|
||||
|
||||
if((security_check_enabled && !src.allowed(wearer)) || control_overridden)
|
||||
wearer << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
toggle_piece("helmet",wearer)
|
||||
|
||||
/obj/item/weapon/rig/proc/toggle_chest()
|
||||
|
||||
set name = "Toggle Chestpiece"
|
||||
set desc = "Deploys or retracts your chestpiece."
|
||||
set category = "Hardsuit"
|
||||
set src = usr.contents
|
||||
|
||||
if((security_check_enabled && !src.allowed(wearer)) || control_overridden)
|
||||
wearer << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
toggle_piece("chest",wearer)
|
||||
|
||||
/obj/item/weapon/rig/proc/toggle_gauntlets()
|
||||
|
||||
set name = "Toggle Gauntlets"
|
||||
set desc = "Deploys or retracts your gauntlets."
|
||||
set category = "Hardsuit"
|
||||
set src = usr.contents
|
||||
|
||||
if(!istype(wearer) || !wearer.back == src)
|
||||
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
|
||||
return
|
||||
|
||||
if((security_check_enabled && !src.allowed(wearer)) || control_overridden)
|
||||
wearer << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
toggle_piece("gauntlets",wearer)
|
||||
|
||||
/obj/item/weapon/rig/proc/toggle_boots()
|
||||
|
||||
set name = "Toggle Boots"
|
||||
set desc = "Deploys or retracts your boots."
|
||||
set category = "Hardsuit"
|
||||
set src = usr.contents
|
||||
|
||||
if(!istype(wearer) || !wearer.back == src)
|
||||
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
|
||||
return
|
||||
|
||||
if((security_check_enabled && !src.allowed(wearer)) || control_overridden)
|
||||
wearer << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
toggle_piece("boots",wearer)
|
||||
|
||||
/obj/item/weapon/rig/verb/deploy_suit()
|
||||
|
||||
set name = "Deploy Hardsuit"
|
||||
set desc = "Deploys helmet, gloves and boots."
|
||||
set category = "Hardsuit"
|
||||
set src = usr.contents
|
||||
|
||||
if(!istype(wearer) || !wearer.back == src)
|
||||
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
|
||||
return
|
||||
|
||||
if((security_check_enabled && !src.allowed(wearer)) || control_overridden)
|
||||
wearer << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
if(!check_power_cost(usr))
|
||||
return
|
||||
|
||||
deploy(wearer)
|
||||
|
||||
/obj/item/weapon/rig/verb/toggle_seals_verb()
|
||||
|
||||
set name = "Toggle Seals"
|
||||
set desc = "Activates or deactivates your rig seals."
|
||||
set category = "Hardsuit"
|
||||
set src = usr.contents
|
||||
|
||||
if(!istype(wearer) || !wearer.back == src)
|
||||
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
|
||||
return
|
||||
|
||||
if((security_check_enabled && !src.allowed(wearer)) || control_overridden)
|
||||
wearer << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
toggle_seals(wearer)
|
||||
|
||||
/obj/item/weapon/rig/verb/switch_vision_mode()
|
||||
|
||||
set name = "Switch Vision Mode"
|
||||
set desc = "Switches between available vision modes."
|
||||
set category = "Hardsuit"
|
||||
set src = usr.contents
|
||||
|
||||
if(!check_power_cost(usr, 0, 0, 0, 0))
|
||||
return
|
||||
|
||||
if(canremove)
|
||||
usr << "<span class='warning'>The suit is not active.</span>"
|
||||
return
|
||||
|
||||
if(!visor)
|
||||
usr << "<span class='warning'>The hardsuit does not have a configurable visor.</span>"
|
||||
return
|
||||
|
||||
if(!visor.active)
|
||||
visor.activate()
|
||||
|
||||
if(!visor.active)
|
||||
usr << "<span class='warning'>The visor is suffering a hardware fault and cannot be configured.</span>"
|
||||
return
|
||||
|
||||
visor.engage()
|
||||
|
||||
/obj/item/weapon/rig/verb/alter_voice()
|
||||
|
||||
set name = "Configure Voice Synthesiser"
|
||||
set desc = "Toggles or configures your voice synthesizer."
|
||||
set category = "Hardsuit"
|
||||
set src = usr.contents
|
||||
|
||||
if(canremove)
|
||||
usr << "<span class='warning'>The suit is not active.</span>"
|
||||
return
|
||||
|
||||
if(!istype(wearer) || !wearer.back == src)
|
||||
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
|
||||
return
|
||||
|
||||
if(!speech)
|
||||
usr << "<span class='warning'>The hardsuit does not have a speech synthesiser.</span>"
|
||||
return
|
||||
|
||||
speech.engage()
|
||||
|
||||
/obj/item/weapon/rig/verb/select_module()
|
||||
|
||||
set name = "Select Module"
|
||||
set desc = "Selects a module as your primary system."
|
||||
set category = "Hardsuit"
|
||||
set src = usr.contents
|
||||
|
||||
if(!check_power_cost(usr, 0, 0, 0, 0))
|
||||
return
|
||||
|
||||
if(canremove)
|
||||
usr << "<span class='warning'>The suit is not active.</span>"
|
||||
return
|
||||
|
||||
if(!istype(wearer) || !wearer.back == src)
|
||||
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
|
||||
return
|
||||
|
||||
var/list/selectable = list()
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
if(module.selectable)
|
||||
selectable |= module
|
||||
|
||||
var/obj/item/rig_module/module = input("Which module do you wish to select?") as null|anything in selectable
|
||||
|
||||
if(!istype(module))
|
||||
return
|
||||
|
||||
selected_module = module
|
||||
usr << "<font color='blue'><b>Primary system is now: [selected_module.interface_name].</b></font>"
|
||||
|
||||
/obj/item/weapon/rig/verb/toggle_module()
|
||||
|
||||
set name = "Toggle Module"
|
||||
set desc = "Toggle a system module."
|
||||
set category = "Hardsuit"
|
||||
set src = usr.contents
|
||||
|
||||
if(!check_power_cost(usr, 0, 0, 0, 0))
|
||||
return
|
||||
|
||||
if(canremove)
|
||||
usr << "<span class='warning'>The suit is not active.</span>"
|
||||
return
|
||||
|
||||
if(!istype(wearer) || !wearer.back == src)
|
||||
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
|
||||
return
|
||||
|
||||
var/list/selectable = list()
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
if(module.toggleable)
|
||||
selectable |= module
|
||||
|
||||
var/obj/item/rig_module/module = input("Which module do you wish to toggle?") as null|anything in selectable
|
||||
|
||||
if(!istype(module))
|
||||
return
|
||||
|
||||
if(module.active)
|
||||
usr << "<font color='blue'><b>You attempt to deactivate \the [module.interface_name].</b></font>"
|
||||
module.deactivate()
|
||||
else
|
||||
usr << "<font color='blue'><b>You attempt to activate \the [module.interface_name].</b></font>"
|
||||
module.activate()
|
||||
|
||||
/obj/item/weapon/rig/verb/engage_module()
|
||||
|
||||
set name = "Engage Module"
|
||||
set desc = "Engages a system module."
|
||||
set category = "Hardsuit"
|
||||
set src = usr.contents
|
||||
|
||||
if(canremove)
|
||||
usr << "<span class='warning'>The suit is not active.</span>"
|
||||
return
|
||||
|
||||
if(!istype(wearer) || !wearer.back == src)
|
||||
usr << "<span class='warning'>The hardsuit is not being worn.</span>"
|
||||
return
|
||||
|
||||
if(!check_power_cost(usr, 0, 0, 0, 0))
|
||||
return
|
||||
|
||||
var/list/selectable = list()
|
||||
for(var/obj/item/rig_module/module in installed_modules)
|
||||
if(module.usable)
|
||||
selectable |= module
|
||||
|
||||
var/obj/item/rig_module/module = input("Which module do you wish to engage?") as null|anything in selectable
|
||||
|
||||
if(!istype(module))
|
||||
return
|
||||
|
||||
usr << "<font color='blue'><b>You attempt to engage the [module.interface_name].</b></font>"
|
||||
module.engage()
|
||||
@@ -0,0 +1,57 @@
|
||||
/datum/wires/rig
|
||||
random = 1
|
||||
holder_type = /obj/item/weapon/rig
|
||||
wire_count = 5
|
||||
|
||||
#define RIG_SECURITY 1
|
||||
#define RIG_AI_OVERRIDE 2
|
||||
#define RIG_SYSTEM_CONTROL 4
|
||||
#define RIG_INTERFACE_LOCK 8
|
||||
#define RIG_INTERFACE_SHOCK 16
|
||||
/*
|
||||
* Rig security can be snipped to disable ID access checks on rig.
|
||||
* Rig AI override can be pulsed to toggle whether or not the AI can take control of the suit.
|
||||
* System control can be pulsed to toggle some malfunctions.
|
||||
* Interface lock can be pulsed to toggle whether or not the interface can be accessed.
|
||||
*/
|
||||
|
||||
/datum/wires/rig/UpdateCut(var/index, var/mended)
|
||||
|
||||
var/obj/item/weapon/rig/rig = holder
|
||||
switch(index)
|
||||
if(RIG_SECURITY)
|
||||
if(mended)
|
||||
rig.req_access = initial(rig.req_access)
|
||||
rig.req_one_access = initial(rig.req_one_access)
|
||||
if(RIG_INTERFACE_SHOCK)
|
||||
rig.electrified = mended ? 0 : -1
|
||||
rig.shock(usr,100)
|
||||
|
||||
/datum/wires/rig/UpdatePulsed(var/index)
|
||||
|
||||
var/obj/item/weapon/rig/rig = holder
|
||||
switch(index)
|
||||
if(RIG_SECURITY)
|
||||
rig.security_check_enabled = !rig.security_check_enabled
|
||||
rig.visible_message("\The [rig] twitches as several suit locks [rig.security_check_enabled?"close":"open"].")
|
||||
if(RIG_AI_OVERRIDE)
|
||||
rig.ai_override_enabled = !rig.ai_override_enabled
|
||||
rig.visible_message("A small red light on [rig] [rig.ai_override_enabled?"goes dead":"flickers on"].")
|
||||
if(RIG_SYSTEM_CONTROL)
|
||||
rig.malfunctioning += 10
|
||||
if(rig.malfunction_delay <= 0)
|
||||
rig.malfunction_delay = 20
|
||||
rig.shock(usr,100)
|
||||
if(RIG_INTERFACE_LOCK)
|
||||
rig.interface_locked = !rig.interface_locked
|
||||
rig.visible_message("\The [rig] clicks audibly as the software interface [rig.interface_locked?"darkens":"brightens"].")
|
||||
if(RIG_INTERFACE_SHOCK)
|
||||
if(rig.electrified != -1)
|
||||
rig.electrified = 30
|
||||
rig.shock(usr,100)
|
||||
|
||||
/datum/wires/rig/CanUse(var/mob/living/L)
|
||||
var/obj/item/weapon/rig/rig = holder
|
||||
if(rig.open)
|
||||
return 1
|
||||
return 0
|
||||
@@ -0,0 +1,19 @@
|
||||
/obj/item/weapon/rig/unathi
|
||||
name = "NT breacher chassis control module"
|
||||
desc = "A cheap NT knock-off of a Unathi battle-rig. Looks like a fish, moves like a fish, steers like a cow."
|
||||
suit_type = "NT breacher"
|
||||
icon_state = "breacher_rig_cheap"
|
||||
armor = list(melee = 60, bullet = 60, laser = 60, energy = 60, bomb = 70, bio = 100, rad = 50)
|
||||
slowdown = 6
|
||||
offline_slowdown = 10
|
||||
vision_restriction = 1
|
||||
offline_vision_restriction = 2
|
||||
|
||||
/obj/item/weapon/rig/unathi/fancy
|
||||
name = "breacher chassis control module"
|
||||
desc = "An authentic Unathi breacher chassis. Huge, bulky and absurdly heavy. It must be like wearing a tank."
|
||||
suit_type = "breacher chassis"
|
||||
icon_state = "breacher_rig"
|
||||
armor = list(melee = 90, bullet = 90, laser = 90, energy = 90, bomb = 90, bio = 100, rad = 80)
|
||||
vision_restriction = 0
|
||||
offline_vision_restriction = 2
|
||||
@@ -0,0 +1,41 @@
|
||||
/obj/item/clothing/head/helmet/space/rig/combat
|
||||
light_overlay = "helmet_light_green_dual"
|
||||
|
||||
/obj/item/weapon/rig/combat
|
||||
name = "combat hardsuit control module"
|
||||
desc = "A sleek and dangerous hardsuit for active combat."
|
||||
icon_state = "security_rig"
|
||||
suit_type = "combat hardsuit"
|
||||
armor = list(melee = 80, bullet = 65, laser = 50, energy = 15, bomb = 80, bio = 100, rad = 60)
|
||||
slowdown = 1
|
||||
offline_slowdown = 3
|
||||
offline_vision_restriction = 1
|
||||
|
||||
helm_type = /obj/item/clothing/head/helmet/space/rig/combat
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/mounted,
|
||||
/obj/item/rig_module/vision/thermal,
|
||||
/obj/item/rig_module/grenade_launcher,
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/power_sink,
|
||||
/obj/item/rig_module/electrowarfare_suite,
|
||||
/obj/item/rig_module/chem_dispenser/combat
|
||||
)
|
||||
|
||||
/obj/item/weapon/rig/combat/merc
|
||||
name = "crimson hardsuit control module"
|
||||
desc = "A blood-red hardsuit featuring some fairly illegal technology."
|
||||
icon_state = "merc_rig"
|
||||
suit_type = "crimson hardsuit"
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/mounted,
|
||||
/obj/item/rig_module/vision/thermal,
|
||||
/obj/item/rig_module/grenade_launcher,
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/power_sink,
|
||||
/obj/item/rig_module/electrowarfare_suite,
|
||||
/obj/item/rig_module/chem_dispenser/combat,
|
||||
/obj/item/rig_module/fabricator/energy_net
|
||||
)
|
||||
@@ -0,0 +1,67 @@
|
||||
/obj/item/clothing/head/helmet/space/rig/ert
|
||||
light_overlay = "helmet_light_dual"
|
||||
|
||||
/obj/item/weapon/rig/ert
|
||||
name = "ERT-C hardsuit control module"
|
||||
desc = "A suit worn by the commander of a NanoTrasen Emergency Response Team. Has blue highlights. Armoured and space ready."
|
||||
suit_type = "ERT commander"
|
||||
icon_state = "ert_commander_rig"
|
||||
siemens_coefficient = 0.6
|
||||
offline_slowdown = 3
|
||||
|
||||
helm_type = /obj/item/clothing/head/helmet/space/rig/ert
|
||||
|
||||
req_access = list(access_cent_specops)
|
||||
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 100)
|
||||
allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, \
|
||||
/obj/item/weapon/screwdriver, /obj/item/weapon/weldingtool, /obj/item/weapon/wirecutters, /obj/item/weapon/wrench, /obj/item/device/multitool, \
|
||||
/obj/item/device/radio, /obj/item/device/analyzer, /obj/item/weapon/gun/energy/laser, /obj/item/weapon/gun/energy/pulse_rifle, \
|
||||
/obj/item/weapon/gun/energy/taser, /obj/item/weapon/melee/baton, /obj/item/weapon/gun/energy/gun)
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/maneuvering_jets,
|
||||
/obj/item/rig_module/datajack,
|
||||
/obj/item/rig_module/mounted
|
||||
)
|
||||
|
||||
/obj/item/weapon/rig/ert/engineer
|
||||
name = "ERT-E suit control module"
|
||||
desc = "A suit worn by the engineering division of a NanoTrasen Emergency Response Team. Has orange highlights. Armoured and space ready."
|
||||
suit_type = "ERT engineer"
|
||||
icon_state = "ert_engineer_rig"
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/maneuvering_jets,
|
||||
/obj/item/rig_module/device/plasmacutter,
|
||||
/obj/item/rig_module/device/rcd,
|
||||
/obj/item/rig_module/foam_sprayer
|
||||
)
|
||||
|
||||
/obj/item/weapon/rig/ert/medical
|
||||
name = "ERT-M suit control module"
|
||||
desc = "A suit worn by the medical division of a NanoTrasen Emergency Response Team. Has white highlights. Armoured and space ready."
|
||||
suit_type = "ERT medic"
|
||||
icon_state = "ert_medical_rig"
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/maneuvering_jets,
|
||||
/obj/item/rig_module/device/healthscanner,
|
||||
/obj/item/rig_module/chem_dispenser/injector
|
||||
)
|
||||
|
||||
/obj/item/weapon/rig/ert/security
|
||||
name = "ERT-S suit control module"
|
||||
desc = "A suit worn by the security division of a NanoTrasen Emergency Response Team. Has red highlights. Armoured and space ready."
|
||||
suit_type = "ERT security"
|
||||
icon_state = "ert_security_rig"
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/maneuvering_jets,
|
||||
/obj/item/rig_module/grenade_launcher,
|
||||
/obj/item/rig_module/mounted
|
||||
)
|
||||
@@ -0,0 +1,91 @@
|
||||
// Light rigs are not space-capable, but don't suffer excessive slowdown or sight issues when depowered.
|
||||
/obj/item/weapon/rig/light
|
||||
name = "light suit control module"
|
||||
desc = "A lighter, less armoured rig suit."
|
||||
icon_state = "ninja_rig"
|
||||
suit_type = "light suit"
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/cell)
|
||||
armor = list(melee = 50, bullet = 15, laser = 50, energy = 10, bomb = 25, bio = 0, rad = 0)
|
||||
slowdown = 0
|
||||
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | THICKMATERIAL
|
||||
offline_slowdown = 0
|
||||
offline_vision_restriction = 0
|
||||
|
||||
chest_type = /obj/item/clothing/suit/space/rig/light
|
||||
helm_type = /obj/item/clothing/head/helmet/space/rig/light
|
||||
boot_type = /obj/item/clothing/shoes/rig/light
|
||||
glove_type = /obj/item/clothing/gloves/rig/light
|
||||
|
||||
/obj/item/clothing/suit/space/rig/light
|
||||
name = "suit"
|
||||
|
||||
/obj/item/clothing/gloves/rig/light
|
||||
name = "gloves"
|
||||
|
||||
/obj/item/clothing/shoes/rig/light
|
||||
name = "shoes"
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/light
|
||||
name = "hood"
|
||||
|
||||
/obj/item/weapon/rig/light/hacker
|
||||
name = "cybersuit control module"
|
||||
suit_type = "cyber"
|
||||
desc = "An advanced powered armour suit with many cyberwarfare enhancements."
|
||||
icon_state = "hacker_rig"
|
||||
|
||||
req_access = list(access_syndicate)
|
||||
|
||||
helm_type = /obj/item/clothing/head/helmet/space/rig/mask
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/power_sink,
|
||||
/obj/item/rig_module/datajack
|
||||
)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/mask
|
||||
name = "mask"
|
||||
flags = FPRINT | TABLEPASS | THICKMATERIAL
|
||||
|
||||
/obj/item/weapon/rig/light/ninja
|
||||
name = "ominous suit control module"
|
||||
suit_type = "ominous"
|
||||
desc = "A unique, vaccum-proof suit of nano-enhanced armor designed specifically for Spider Clan assassins."
|
||||
icon_state = "ninja_rig"
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/cell)
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
slowdown = 0
|
||||
|
||||
req_access = list(access_syndicate)
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/teleporter,
|
||||
/obj/item/rig_module/stealth_field,
|
||||
/obj/item/rig_module/mounted/energy_blade,
|
||||
/obj/item/rig_module/vision,
|
||||
/obj/item/rig_module/voice,
|
||||
/obj/item/rig_module/fabricator/energy_net,
|
||||
/obj/item/rig_module/chem_dispenser,
|
||||
/obj/item/rig_module/grenade_launcher,
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/power_sink,
|
||||
/obj/item/rig_module/datajack,
|
||||
/obj/item/rig_module/self_destruct
|
||||
)
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/weapon/rig/light/stealth
|
||||
name = "stealth suit control module"
|
||||
suit_type = "stealth"
|
||||
desc = "A highly advanced and expensive suit designed for covert operations."
|
||||
icon_state = "ninja_rig"
|
||||
|
||||
req_access = list(access_syndicate)
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/teleporter,
|
||||
/obj/item/rig_module/stealth_field,
|
||||
/obj/item/rig_module/vision
|
||||
)
|
||||
@@ -0,0 +1,67 @@
|
||||
/obj/item/weapon/rig/industrial
|
||||
name = "industrial suit control module"
|
||||
suit_type = "industrial hardsuit"
|
||||
desc = "A heavy, powerful rig used by construction crews and mining corporations."
|
||||
icon_state = "engineering_rig"
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
slowdown = 3
|
||||
offline_slowdown = 10
|
||||
offline_vision_restriction = 2
|
||||
|
||||
req_access = null
|
||||
req_one_access = null
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/device/plasmacutter,
|
||||
/obj/item/rig_module/device/drill,
|
||||
/obj/item/rig_module/device/orescanner,
|
||||
/obj/item/rig_module/device/rcd,
|
||||
/obj/item/rig_module/vision/meson
|
||||
)
|
||||
|
||||
//Chief Engineer's rig. This is sort of a halfway point between the old hardsuits (voidsuits) and the rig class.
|
||||
/obj/item/weapon/rig/ce
|
||||
|
||||
name = "advanced voidsuit control module"
|
||||
suit_type = "advanced voidsuit"
|
||||
desc = "An advanced voidsuit that protects against hazardous, low pressure environments. Shines with a high polish."
|
||||
icon_state = "ce_rig"
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
slowdown = 0
|
||||
offline_slowdown = 0
|
||||
offline_vision_restriction = 0
|
||||
|
||||
req_access = list(access_ce)
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/maneuvering_jets,
|
||||
/obj/item/rig_module/device/plasmacutter,
|
||||
/obj/item/rig_module/device/rcd,
|
||||
/obj/item/rig_module/vision/meson
|
||||
)
|
||||
|
||||
boot_type = null
|
||||
glove_type = null
|
||||
|
||||
/obj/item/weapon/rig/hazmat
|
||||
|
||||
name = "AMI control module"
|
||||
suit_type = "hazmat"
|
||||
desc = "An Anomalous Material Interaction hardsuit that protects against the strangest energies the universe can throw at it."
|
||||
icon_state = "science_rig"
|
||||
armor = list(melee = 15, bullet = 15, laser = 80, energy = 80, bomb = 60, bio = 100, rad = 100)
|
||||
slowdown = 1
|
||||
offline_slowdown = 3
|
||||
offline_vision_restriction = 1
|
||||
|
||||
req_access = list(access_rd)
|
||||
|
||||
initial_modules = list(
|
||||
/obj/item/rig_module/ai_container,
|
||||
/obj/item/rig_module/maneuvering_jets,
|
||||
/obj/item/rig_module/device/anomaly_scanner
|
||||
)
|
||||
|
||||
boot_type = null
|
||||
glove_type = null
|
||||
@@ -1,11 +1,12 @@
|
||||
//Spacesuit
|
||||
//Note: Everything in modules/clothing/spacesuits should have the entire suit grouped together.
|
||||
// Meaning the the suit is defined directly after the corrisponding helmet. Just like below!
|
||||
|
||||
/obj/item/clothing/head/helmet/space
|
||||
name = "Space helmet"
|
||||
icon_state = "space"
|
||||
desc = "A special helmet designed for work in a hazardous, low-pressure environment."
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL
|
||||
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL | AIRTIGHT
|
||||
item_state = "space"
|
||||
permeability_coefficient = 0.01
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
|
||||
@@ -16,6 +17,34 @@
|
||||
siemens_coefficient = 0.9
|
||||
species_restricted = list("exclude","Diona","Vox")
|
||||
|
||||
var/obj/machinery/camera/camera
|
||||
var/list/camera_networks
|
||||
|
||||
light_overlay = "helmet_light"
|
||||
brightness_on = 4
|
||||
on = 0
|
||||
|
||||
/obj/item/clothing/head/helmet/space/attack_self(mob/user)
|
||||
|
||||
if(!camera && camera_networks)
|
||||
|
||||
if(!icon_action_button)
|
||||
icon_action_button = "[icon_state]"
|
||||
|
||||
camera = new /obj/machinery/camera(src)
|
||||
camera.network = camera_networks
|
||||
cameranet.removeCamera(camera)
|
||||
camera.c_tag = user.name
|
||||
user << "\blue User scanned as [camera.c_tag]. Camera activated."
|
||||
return 1
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/clothing/head/helmet/space/examine()
|
||||
..()
|
||||
if(camera_networks && get_dist(usr,src) <= 1)
|
||||
usr << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
|
||||
|
||||
/obj/item/clothing/suit/space
|
||||
name = "Space suit"
|
||||
desc = "A suit that protects against low pressure environments. \"NSS EXODUS\" is written in large block letters on the back."
|
||||
|
||||
@@ -138,7 +138,6 @@
|
||||
icon_state = "syndicate-black-red"
|
||||
item_state = "syndicate-black-red"
|
||||
|
||||
|
||||
//Black with yellow/red engineering syndicate space suit
|
||||
/obj/item/clothing/head/helmet/space/syndicate/black/engie
|
||||
name = "Black Space Helmet"
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
|
||||
//NASA Voidsuit
|
||||
/obj/item/clothing/head/helmet/space/nasavoid
|
||||
name = "NASA Void Helmet"
|
||||
desc = "A high tech, NASA Centcom branch designed, dark red space suit helmet. Used for AI satellite maintenance."
|
||||
icon_state = "void"
|
||||
item_state = "void"
|
||||
|
||||
/obj/item/clothing/suit/space/nasavoid
|
||||
name = "NASA Voidsuit"
|
||||
icon_state = "void"
|
||||
item_state = "void"
|
||||
desc = "A high tech, NASA Centcom branch designed, dark red Space suit. Used for AI satellite maintenance."
|
||||
slowdown = 1
|
||||
@@ -0,0 +1,24 @@
|
||||
//Syndicate rig
|
||||
/obj/item/clothing/head/helmet/space/void/merc
|
||||
name = "blood-red voidsuit helmet"
|
||||
desc = "An advanced helmet designed for work in special operations. Property of Gorlex Marauders."
|
||||
icon_state = "rig0-syndie"
|
||||
item_state = "syndie_helm"
|
||||
item_color = "syndie"
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 60)
|
||||
siemens_coefficient = 0.6
|
||||
species_restricted = list("exclude","Unathi","Tajara","Skrell","Vox")
|
||||
camera_networks = list("NUKE")
|
||||
light_overlay = "helmet_light_green" //todo: species-specific light overlays
|
||||
|
||||
/obj/item/clothing/suit/space/void/merc
|
||||
icon_state = "rig-syndie"
|
||||
name = "blood-red voidsuit"
|
||||
desc = "An advanced suit that protects against injuries during special operations. Property of Gorlex Marauders."
|
||||
item_state = "syndie_voidsuit"
|
||||
slowdown = 1
|
||||
w_class = 3
|
||||
armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 60)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs)
|
||||
siemens_coefficient = 0.6
|
||||
species_restricted = list("exclude","Unathi","Tajara","Skrell","Vox")
|
||||
@@ -0,0 +1,90 @@
|
||||
// Station voidsuits
|
||||
//Engineering rig
|
||||
/obj/item/clothing/head/helmet/space/void/engineering
|
||||
name = "engineering voidsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding."
|
||||
icon_state = "rig0-engineering"
|
||||
item_state = "eng_helm"
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 80)
|
||||
|
||||
/obj/item/clothing/suit/space/void/engineering
|
||||
name = "engineering voidsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has radiation shielding."
|
||||
icon_state = "rig-engineering"
|
||||
item_state = "eng_voidsuit"
|
||||
slowdown = 1
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 80)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/bag/ore,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
|
||||
|
||||
//Mining rig
|
||||
/obj/item/clothing/head/helmet/space/void/mining
|
||||
name = "mining voidsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environment. Has reinforced plating."
|
||||
icon_state = "rig0-mining"
|
||||
item_state = "mining_helm"
|
||||
item_color = "mining"
|
||||
armor = list(melee = 50, bullet = 5, laser = 20,energy = 5, bomb = 55, bio = 100, rad = 20)
|
||||
light_overlay = "helmet_light_dual"
|
||||
|
||||
/obj/item/clothing/suit/space/void/mining
|
||||
icon_state = "rig-mining"
|
||||
name = "mining voidsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has reinforced plating."
|
||||
item_state = "mining_voidsuit"
|
||||
armor = list(melee = 50, bullet = 5, laser = 20,energy = 5, bomb = 55, bio = 100, rad = 20)
|
||||
|
||||
//Medical Rig
|
||||
/obj/item/clothing/head/helmet/space/void/medical
|
||||
name = "medical voidsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environment. Has minor radiation shielding."
|
||||
icon_state = "rig0-medical"
|
||||
item_state = "medical_helm"
|
||||
item_color = "medical"
|
||||
armor = list(melee = 30, bullet = 5, laser = 20,energy = 5, bomb = 25, bio = 100, rad = 50)
|
||||
|
||||
/obj/item/clothing/suit/space/void/medical
|
||||
icon_state = "rig-medical"
|
||||
name = "medical voidsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has minor radiation shielding."
|
||||
item_state = "medical_voidsuit"
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical)
|
||||
armor = list(melee = 30, bullet = 5, laser = 20,energy = 5, bomb = 25, bio = 100, rad = 50)
|
||||
|
||||
//Security
|
||||
/obj/item/clothing/head/helmet/space/void/security
|
||||
name = "security voidsuit helmet"
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environment. Has an additional layer of armor."
|
||||
icon_state = "rig0-sec"
|
||||
item_state = "sec_helm"
|
||||
item_color = "sec"
|
||||
armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10)
|
||||
siemens_coefficient = 0.7
|
||||
light_overlay = "helmet_light_dual"
|
||||
|
||||
/obj/item/clothing/suit/space/void/security
|
||||
icon_state = "rig-sec"
|
||||
name = "security voidsuit"
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has an additional layer of armor."
|
||||
item_state = "sec_voidsuit"
|
||||
armor = list(melee = 60, bullet = 10, laser = 30, energy = 5, bomb = 45, bio = 100, rad = 10)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton)
|
||||
siemens_coefficient = 0.7
|
||||
|
||||
//Atmospherics Rig (BS12)
|
||||
/obj/item/clothing/head/helmet/space/void/atmos
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environments. Has improved thermal protection and minor radiation shielding."
|
||||
name = "atmospherics voidsuit helmet"
|
||||
icon_state = "rig0-atmos"
|
||||
item_state = "atmos_helm"
|
||||
item_color = "atmos"
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 50)
|
||||
max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
light_overlay = "helmet_light_dual"
|
||||
|
||||
/obj/item/clothing/suit/space/void/atmos
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has improved thermal protection and minor radiation shielding."
|
||||
icon_state = "rig-atmos"
|
||||
name = "atmos voidsuit"
|
||||
item_state = "atmos_voidsuit"
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 50)
|
||||
max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
@@ -0,0 +1,52 @@
|
||||
//NASA Voidsuit
|
||||
/obj/item/clothing/head/helmet/space/void
|
||||
name = "void helmet"
|
||||
desc = "A high-tech dark red space suit helmet. Used for AI satellite maintenance."
|
||||
icon_state = "void"
|
||||
item_state = "void"
|
||||
|
||||
heat_protection = HEAD
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20)
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
|
||||
//Species-specific stuff.
|
||||
species_restricted = list("exclude","Unathi","Tajara","Skrell","Diona","Vox")
|
||||
sprite_sheets_refit = list(
|
||||
"Unathi" = 'icons/mob/species/unathi/helmet.dmi',
|
||||
"Tajara" = 'icons/mob/species/tajaran/helmet.dmi',
|
||||
"Skrell" = 'icons/mob/species/skrell/helmet.dmi',
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Unathi" = 'icons/obj/clothing/species/unathi/hats.dmi',
|
||||
"Tajara" = 'icons/obj/clothing/species/tajaran/hats.dmi',
|
||||
"Skrell" = 'icons/obj/clothing/species/skrell/hats.dmi',
|
||||
)
|
||||
|
||||
light_overlay = "helmet_light"
|
||||
|
||||
/obj/item/clothing/suit/space/void
|
||||
name = "voidsuit"
|
||||
icon_state = "void"
|
||||
item_state = "void"
|
||||
desc = "A high-tech dark red space suit. Used for AI satellite maintenance."
|
||||
slowdown = 1
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit)
|
||||
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
|
||||
species_restricted = list("exclude","Unathi","Tajara","Diona","Vox")
|
||||
sprite_sheets_refit = list(
|
||||
"Unathi" = 'icons/mob/species/unathi/suit.dmi',
|
||||
"Tajara" = 'icons/mob/species/tajaran/suit.dmi',
|
||||
"Skrell" = 'icons/mob/species/skrell/suit.dmi',
|
||||
)
|
||||
sprite_sheets_obj = list(
|
||||
"Unathi" = 'icons/obj/clothing/species/unathi/suits.dmi',
|
||||
"Tajara" = 'icons/obj/clothing/species/tajaran/suits.dmi',
|
||||
"Skrell" = 'icons/obj/clothing/species/skrell/suits.dmi',
|
||||
)
|
||||
|
||||
//Breach thresholds, should ideally be inherited by most (if not all) voidsuits.
|
||||
breach_threshold = 18
|
||||
can_breach = 1
|
||||
@@ -0,0 +1,25 @@
|
||||
//Wizard Rig
|
||||
/obj/item/clothing/head/helmet/space/void/wizard
|
||||
name = "gem-encrusted voidsuit helmet"
|
||||
desc = "A bizarre gem-encrusted helmet that radiates magical energies."
|
||||
icon_state = "rig0-wiz"
|
||||
item_state = "wiz_helm"
|
||||
item_color = "wiz"
|
||||
unacidable = 1 //No longer shall our kind be foiled by lone chemists with spray bottles!
|
||||
armor = list(melee = 40, bullet = 20, laser = 20,energy = 20, bomb = 35, bio = 100, rad = 60)
|
||||
siemens_coefficient = 0.7
|
||||
sprite_sheets_refit = null
|
||||
sprite_sheets_obj = null
|
||||
|
||||
/obj/item/clothing/suit/space/void/wizard
|
||||
icon_state = "rig-wiz"
|
||||
name = "gem-encrusted voidsuit"
|
||||
desc = "A bizarre gem-encrusted suit that radiates magical energies."
|
||||
item_state = "wiz_voidsuit"
|
||||
slowdown = 1
|
||||
w_class = 3
|
||||
unacidable = 1
|
||||
armor = list(melee = 40, bullet = 20, laser = 20,energy = 20, bomb = 35, bio = 100, rad = 60)
|
||||
siemens_coefficient = 0.7
|
||||
sprite_sheets_refit = null
|
||||
sprite_sheets_obj = null
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
var/blocked = list(/obj/item/clothing/suit/chameleon, /obj/item/clothing/suit/space/space_ninja,
|
||||
var/blocked = list(/obj/item/clothing/suit/chameleon,
|
||||
/obj/item/clothing/suit/golem, /obj/item/clothing/suit/cyborg_suit, /obj/item/clothing/suit/justice,
|
||||
/obj/item/clothing/suit/greatcoat)//Prevent infinite loops and bad suits.
|
||||
for(var/U in typesof(/obj/item/clothing/suit)-blocked)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
item_state = "" //no inhands
|
||||
item_color = "bluetie"
|
||||
flags = FPRINT | TABLEPASS
|
||||
slot_flags = 0
|
||||
slot_flags = SLOT_TIE
|
||||
w_class = 2.0
|
||||
var/obj/item/clothing/under/has_suit = null //the suit the tie may be attached to
|
||||
var/image/inv_overlay = null //overlay used when attached to clothing.
|
||||
@@ -390,7 +390,7 @@
|
||||
desc = "This glowing blue badge marks the holder as THE LAW."
|
||||
icon_state = "holobadge"
|
||||
item_color = "holobadge"
|
||||
slot_flags = SLOT_BELT
|
||||
slot_flags = SLOT_BELT | SLOT_TIE
|
||||
|
||||
var/emagged = 0 //Emagging removes Sec check.
|
||||
var/stored_name = null
|
||||
@@ -398,7 +398,7 @@
|
||||
/obj/item/clothing/tie/holobadge/cord
|
||||
icon_state = "holobadge-cord"
|
||||
item_color = "holobadge-cord"
|
||||
slot_flags = SLOT_MASK
|
||||
slot_flags = SLOT_MASK | SLOT_TIE
|
||||
|
||||
/obj/item/clothing/tie/holobadge/attack_self(mob/user as mob)
|
||||
if(!stored_name)
|
||||
|
||||
@@ -533,19 +533,23 @@
|
||||
var/suit_icon // Sets suit icon_state and item_state.
|
||||
var/helmet_color // Sets item_color.
|
||||
var/uses = 2 // Uses before the kit deletes itself.
|
||||
var/new_light_overlay
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/attackby(var/obj/item/O as obj, mob/user as mob)
|
||||
/obj/item/clothing/head/helmet/space/void/attackby(var/obj/item/O as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
if(istype(O,/obj/item/device/kit/suit/fluff))
|
||||
|
||||
var/obj/item/device/kit/suit/fluff/kit = O
|
||||
name = "[kit.new_name] hardsuit helmet"
|
||||
name = "[kit.new_name] suit helmet"
|
||||
desc = kit.new_helmet_desc
|
||||
icon_state = kit.helmet_icon
|
||||
item_state = kit.helmet_icon
|
||||
item_color = kit.helmet_color
|
||||
|
||||
if(kit.new_light_overlay)
|
||||
light_overlay = kit.new_light_overlay
|
||||
|
||||
user << "You set about modifying the helmet into [src]."
|
||||
playsound(user.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
|
||||
@@ -554,13 +558,13 @@
|
||||
user.drop_item()
|
||||
del(O)
|
||||
|
||||
/obj/item/clothing/suit/space/rig/attackby(var/obj/item/O as obj, mob/user as mob)
|
||||
/obj/item/clothing/suit/space/void/attackby(var/obj/item/O as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
if(istype(O,/obj/item/device/kit/suit/fluff))
|
||||
|
||||
var/obj/item/device/kit/suit/fluff/kit = O
|
||||
name = "[kit.new_name] hardsuit"
|
||||
name = "[kit.new_name] voidsuit"
|
||||
desc = kit.new_suit_desc
|
||||
icon_state = kit.suit_icon
|
||||
item_state = kit.suit_icon
|
||||
@@ -608,6 +612,7 @@
|
||||
helmet_icon = "rig0-hazardhardsuit"
|
||||
suit_icon = "rig-hazardhardsuit"
|
||||
helmet_color = "hazardhardsuit"
|
||||
new_light_overlay = "helmet_light_dual"
|
||||
|
||||
//////// Meat Hook - Korom Bhararaya - Matthew951 ////////////////////////
|
||||
|
||||
@@ -1140,7 +1145,6 @@
|
||||
item_color = "radi_pendant"
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 2.0
|
||||
slot_flags = 0
|
||||
|
||||
//////////// Masks ////////////
|
||||
|
||||
@@ -1186,7 +1190,7 @@
|
||||
slot_flags = 0
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 2
|
||||
slot_flags = SLOT_MASK
|
||||
slot_flags = SLOT_MASK | SLOT_TIE
|
||||
|
||||
////// Silver locket - Konaa Hirano - Konaa_Hirano
|
||||
|
||||
@@ -1200,7 +1204,7 @@
|
||||
slot_flags = 0
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 2
|
||||
slot_flags = SLOT_MASK
|
||||
slot_flags = SLOT_MASK | SLOT_TIE
|
||||
var/obj/item/held //Item inside locket.
|
||||
|
||||
/obj/item/clothing/tie/fluff/konaa_hirano/attack_self(mob/user as mob)
|
||||
@@ -1230,7 +1234,7 @@
|
||||
icon_state = "nasir_khayyam_1"
|
||||
flags = FPRINT|TABLEPASS
|
||||
w_class = 2
|
||||
slot_flags = SLOT_MASK
|
||||
slot_flags = SLOT_MASK | SLOT_TIE
|
||||
|
||||
////// Emerald necklace - Ty Foster - Nega
|
||||
|
||||
@@ -1458,7 +1462,7 @@
|
||||
follow_dist = 2
|
||||
var/near_dist = max(follow_dist - 3, 1)
|
||||
var/current_dist = get_dist(src, bff)
|
||||
|
||||
|
||||
if (movement_target != bff)
|
||||
if (current_dist > follow_dist && !istype(movement_target, /mob/living/simple_animal/mouse) && (bff in oview(src)))
|
||||
//stop existing movement
|
||||
@@ -1469,7 +1473,7 @@
|
||||
stop_automated_movement = 1
|
||||
movement_target = bff
|
||||
walk_to(src, movement_target, near_dist, 4)
|
||||
|
||||
|
||||
//already following and close enough, stop
|
||||
else if (current_dist <= near_dist)
|
||||
walk_to(src,0)
|
||||
@@ -1481,17 +1485,17 @@
|
||||
|
||||
/mob/living/simple_animal/cat/fluff/Life()
|
||||
..()
|
||||
if (stat || !bff)
|
||||
if (stat || !bff)
|
||||
return
|
||||
if (get_dist(src, bff) <= 1)
|
||||
if (bff.stat >= DEAD || bff.health <= config.health_threshold_softcrit)
|
||||
if (prob((bff.stat < DEAD)? 50 : 15))
|
||||
if (prob((bff.stat < DEAD)? 50 : 15))
|
||||
audible_emote(pick("meows in distress.", "meows anxiously."))
|
||||
else
|
||||
if (prob(5))
|
||||
visible_emote(pick("nuzzles [bff].",
|
||||
if (prob(5))
|
||||
visible_emote(pick("nuzzles [bff].",
|
||||
"brushes against [bff].",
|
||||
"rubs against [bff].",
|
||||
"purrs."))
|
||||
else if (bff.health <= 50)
|
||||
if (prob(10)) audible_emote("meows anxiously.")
|
||||
if (prob(10)) audible_emote("meows anxiously.")
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
/obj/item/weapon/evidencebag/attack_self(mob/user as mob)
|
||||
if(contents.len)
|
||||
var/obj/item/I = stored_item
|
||||
var/obj/item/I = contents[1]
|
||||
user.visible_message("[user] takes [I] out of [src]", "You take [I] out of [src].",\
|
||||
"You hear someone rustle around in a plastic bag, and remove something.")
|
||||
overlays.Cut() //remove the overlays
|
||||
|
||||
@@ -346,7 +346,7 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
|
||||
/obj/item/weapon/hand_tele, /obj/item/weapon/rcd, /obj/item/weapon/tank/jetpack,\
|
||||
/obj/item/clothing/under/rank/captain, /obj/item/device/aicard,\
|
||||
/obj/item/clothing/shoes/magboots, /obj/item/blueprints, /obj/item/weapon/disk/nuclear,\
|
||||
/obj/item/clothing/suit/space/nasavoid, /obj/item/weapon/tank)
|
||||
/obj/item/clothing/suit/space/void, /obj/item/weapon/tank)
|
||||
|
||||
/proc/fake_attack(var/mob/living/target)
|
||||
// var/list/possible_clones = new/list()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user