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

Conflicts:
	code/__DEFINES/misc.dm
This commit is contained in:
Tigercat2000
2015-05-16 18:40:54 -07:00
177 changed files with 4385 additions and 2397 deletions
+3 -3
View File
@@ -1037,7 +1037,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
@@ -1049,7 +1049,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/red(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
@@ -1061,7 +1061,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
M.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/marisa(M), slot_head)
M.equip_to_slot_or_del(new /obj/item/weapon/teleportation_scroll(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/spellbook(M), slot_r_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/twohanded/staff(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/box(M), slot_in_backpack)
+451
View File
@@ -0,0 +1,451 @@
/obj/machinery/computer/general_air_control/atmos_automation
icon = 'icons/obj/computer.dmi'
icon_state = "aac"
circuit = "/obj/item/weapon/circuitboard/atmos_automation"
req_one_access_txt = "24;10"
Mtoollink = 1
show_sensors = 0
var/on = 0
name = "Atmospherics Automations Console"
var/list/datum/automation/automations = list()
receive_signal(datum/signal/signal)
if(!signal || signal.encryption) return
var/id_tag = signal.data["tag"]
if(!id_tag)
return
sensor_information[id_tag] = signal.data
process()
if(on)
for(var/datum/automation/A in automations)
A.process()
update_icon()
icon_state = initial(icon_state)
// Broken
if(stat & BROKEN)
icon_state += "b"
// Powered
else if(stat & NOPOWER)
icon_state = initial(icon_state)
icon_state += "0"
else if(on)
icon_state += "_active"
proc/request_device_refresh(var/device)
send_signal(list("tag"=device, "status"))
proc/send_signal(var/list/data, var/filter = RADIO_ATMOSIA)//filter's here so the AAC can cross communicate to things like vents, which have a different filter
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.source = src
signal.data=data
signal.data["sigtype"]="command"
signal.data["advcontrol"]=1//AAC balancing, you need to manually get up to the machine to make it listen to this
radio_connection.post_signal(src, signal, range = 8, filter = filter)
proc/selectValidChildFor(var/datum/automation/parent, var/mob/user, var/list/valid_returntypes)
var/list/choices=list()
for(var/childtype in automation_types)
var/datum/automation/A = new childtype(src)
if(A.returntype == null)
continue
if(!(A.returntype in valid_returntypes))
continue
choices[A.name]=A
if (choices.len==0)
testing("Unable to find automations with returntype in [english_list(valid_returntypes)]!")
return 0
var/label=input(user, "Select new automation:", "Automations", "Cancel") as null|anything in choices
if(!label)
return 0
return choices[label]
return_text()
var/out=..()
if(on)
out += "<a href=\"?src=\ref[src];on=1\" style=\"font-size:large;font-weight:bold;color:red;\">RUNNING</a>"
else
out += "<a href=\"?src=\ref[src];on=1\" style=\"font-size:large;font-weight:bold;color:green;\">STOPPED</a>"
out += {"
<h2>Automations</h2>
<p>\[
<a href="?src=\ref[src];add=1">
Add
</a>
|
<a href="?src=\ref[src];reset=*">
Reset All
</a>
|
<a href="?src=\ref[src];remove=*">
Clear
</a>
\]</p>
<p>\[
<a href="?src=\ref[src];dump=1">
Export
</a>
|
<a href="?src=\ref[src];read=1">
Import
</a>
\]</p>"}
if(automations.len==0)
out += "<i>No automations present.</i>"
else
for(var/datum/automation/A in automations)
out += {"
<fieldset>
<legend>
<a href="?src=\ref[src];label=\ref[A]">[A.label]</a>
(<a href="?src=\ref[src];reset=\ref[A]">Reset</a> |
<a href="?src=\ref[src];remove=\ref[A]">&times;</a>)
</legend>
[A.GetText()]
</fieldset>
"}
return out
Topic(href,href_list)
if(..())
return 1
if(href_list["on"])
on = !on
updateUsrDialog()
update_icon()
return 1
if(href_list["add"])
var/new_child=selectValidChildFor(null,usr,list(0))
if(!new_child)
return 1
automations += new_child
updateUsrDialog()
return 1
if(href_list["label"])
var/datum/automation/A=locate(href_list["label"])
if(!A) return 1
var/nl=input(usr, "Please enter a label for this automation task.") as text|null
if(!nl) return 1
nl = copytext(sanitize(nl), 1, 50)
A.label=nl
updateUsrDialog()
return 1
if(href_list["reset"])
if(href_list["reset"]=="*")
for(var/datum/automation/A in automations)
if(!A) continue
A.OnReset()
else
var/datum/automation/A=locate(href_list["reset"])
if(!A) return 1
A.OnReset()
updateUsrDialog()
return 1
if(href_list["remove"])
if(href_list["remove"]=="*")
var/confirm=alert("Are you sure you want to remove ALL automations?","Automations","Yes","No")
if(confirm == "No") return 0
for(var/datum/automation/A in automations)
if(!A) continue
A.OnRemove()
automations.Remove(A)
else
var/datum/automation/A=locate(href_list["remove"])
if(!A) return 1
A.OnRemove()
automations.Remove(A)
updateUsrDialog()
return 1
if(href_list["read"])
var/code = input("Input exported AAC code.","Automations","") as message|null
if(!code) return 0
ReadCode(code)
updateUsrDialog()
return 1
if(href_list["dump"])
input("Exported AAC code:","Automations",DumpCode()) as message|null
return 0
proc/MakeCompare(var/datum/automation/a, var/datum/automation/b, var/comparetype)
var/datum/automation/compare/compare=new(src)
compare.comparator = comparetype
compare.children[1] = a
compare.children[2] = b
return compare
proc/MakeNumber(var/value)
var/datum/automation/static_value/val = new(src)
val.value=value
return val
proc/MakeGetSensorData(var/sns_tag,var/field)
var/datum/automation/get_sensor_data/sensor=new(src)
sensor.sensor=sns_tag
sensor.field=field
return sensor
proc/DumpCode()
var/list/json[0]
for(var/datum/automation/A in automations)
json += list(A.Export())
return list2json(json)
proc/ReadCode(var/jsonStr)
automations.Cut()
var/list/json=json2list(jsonStr)
if(json.len>0)
for(var/list/cData in json)
if(isnull(cData) || !("type" in cData))
testing("AAC: Null cData in root JS array.")
continue
var/Atype=text2path(cData["type"])
if(!(Atype in automation_types))
testing("AAC: Unrecognized Atype [Atype].")
continue
var/datum/automation/A = new Atype(src)
A.Import(cData)
automations += A
/obj/machinery/computer/general_air_control/atmos_automation/burnchamber
var/injector_tag="inc_in"
var/output_tag="inc_out"
var/sensor_tag="inc_sensor"
frequency=1449
var/temperature=1000
New()
..()
// On State
// Pretty much this:
/*
if(get_sensor("inc_sensor","temperature") < 200)
set_injector_state("inc_in",1)
set_vent_pump_power("inc_out",0)
else
set_vent_pump_power("inc_out",1
*/
var/datum/automation/get_sensor_data/sensor=new(src)
sensor.sensor=sensor_tag
sensor.field="temperature"
var/datum/automation/static_value/val = new(src)
val.value=temperature - 800
var/datum/automation/compare/compare=new(src)
compare.comparator = "Less Than"
compare.children[1] = sensor
compare.children[2] = val
var/datum/automation/set_injector_power/inj_on=new(src)
inj_on.injector=injector_tag
inj_on.state=1
var/datum/automation/set_vent_pump_power/vp_on=new(src)
vp_on.vent_pump=output_tag
vp_on.state=1
var/datum/automation/set_vent_pump_power/vp_off=new(src)
vp_off.vent_pump=output_tag
vp_off.state=0
var/datum/automation/if_statement/i = new (src)
i.label = "Fuel Injector On"
i.condition = compare
i.children_then.Add(inj_on)
i.children_then.Add(vp_off)
i.children_else.Add(vp_on)
automations += i
// Off state
/*
if(get_sensor("inc_sensor","temperature") > 1000)
set_injector_state("inc_in",0)
*/
sensor=new(src)
sensor.sensor=sensor_tag
sensor.field="temperature"
val = new(src)
val.value=temperature
compare=new(src)
compare.comparator = "Greater Than"
compare.children[1] = sensor
compare.children[2] = val
var/datum/automation/set_injector_power/inj_off=new(src)
inj_off.injector=injector_tag
inj_off.state=0
i = new (src)
i.label = "Fuel Injector Off"
i.condition = compare
i.children_then.Add(inj_off)
automations += i
/obj/machinery/computer/general_air_control/atmos_automation/air_mixing
var/n2_injector_tag="air_n2_in"
var/o2_injector_tag="air_o2_in"
var/output_tag="air_out"
var/sensor_tag="air_sensor"
frequency=1443
var/temperature=1000
New()
..()
buildO2()
buildN2()
buildOutletVent()
proc/buildO2()
///////////////////////////////////////////////////////////////
// Oxygen Injection
///////////////////////////////////////////////////////////////
var/datum/automation/set_injector_power/inj_on=new(src)
inj_on.injector=o2_injector_tag
inj_on.state=1
var/datum/automation/set_injector_power/inj_off=new(src)
inj_off.injector=o2_injector_tag
inj_off.state=0
var/datum/automation/if_statement/i = new (src)
i.label = "Oxygen Injection"
i.condition = MakeCompare(
MakeGetSensorData(sensor_tag,"oxygen"),
MakeNumber(20),
"Less Than or Equal to"
)
i.children_then.Add(inj_on)
i.children_else.Add(inj_off)
automations += i
proc/buildN2()
///////////////////////////////////////////////////////////////
// Nitrogen Injection
///////////////////////////////////////////////////////////////
/*
if(get_sensor_data("pressure") < 100)
injector_on()
else
if(get_sensor_data("pressure") > 5000)
injector_off()
*/
var/datum/automation/set_injector_power/inj_on=new(src)
inj_on.injector=n2_injector_tag
inj_on.state=1
var/datum/automation/set_injector_power/inj_off=new(src)
inj_off.injector=n2_injector_tag
inj_off.state=0
var/datum/automation/if_statement/if_on = new (src)
if_on.label = "Nitrogen Injection"
if_on.condition = MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(100),
"Less Than"
)
if_on.children_then.Add(inj_on)
var/datum/automation/if_statement/if_off=new(src)
if_off.condition=MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(5000),
"Greater Than"
)
if_off.children_then.Add(inj_off)
if_on.children_else.Add(if_off)
automations += if_on
proc/buildOutletVent()
///////////////////////////////////////////////////////////////
// Outlet Management
///////////////////////////////////////////////////////////////
/*
if(get_sensor_data("pressure") >= 5000 && get_sensor_data("oxygen") >= 20)
vent_on()
else
if(get_sensor_data("oxygen") < 20 || get_sensor_data("pressure") < 100)
vent_off()
*/
var/datum/automation/set_vent_pump_power/vp_on=new(src)
vp_on.vent_pump=output_tag
vp_on.state=1
var/datum/automation/set_vent_pump_power/vp_off=new(src)
vp_off.vent_pump=output_tag
vp_off.state=0
var/datum/automation/if_statement/if_on=new(src)
if_on.label="Air Output"
var/datum/automation/and/and_on=new(src)
and_on.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(5000),
"Greater Than or Equal to"
)
)
and_on.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"oxygen"),
MakeNumber(20),
"Greater Than or Equal to"
)
)
if_on.condition=and_on
if_on.children_then.Add(vp_on)
//////////////////////////////
var/datum/automation/if_statement/if_off=new(src)
var/datum/automation/or/or_off=new(src)
or_off.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"pressure"),
MakeNumber(100),
"Less Than"
)
)
or_off.children.Add(
MakeCompare(
MakeGetSensorData(sensor_tag,"oxygen"),
MakeNumber(20),
"Less Than"
)
)
if_off.condition=or_off
if_off.children_then.Add(vp_off)
if_on.children_else.Add(if_off)
automations += if_on
@@ -0,0 +1,44 @@
/datum/automation/set_valve_state
name = "Digital Valve: Set Open/Closed"
var/valve=null
var/state=0
Export()
var/list/json = ..()
json["valve"]=valve
json["state"]=state
return json
Import(var/list/json)
..(json)
valve = json["valve"]
state = text2num(json["state"])
process()
if(valve)
parent.send_signal(list ("tag" = valve, "command"="valve_set","valve_set"=state))
return 0
GetText()
return "Set digital valve <a href=\"?src=\ref[src];set_subject=1\">[fmtString(valve)]</a> to <a href=\"?src=\ref[src];set_state=1\">[state?"open":"closed"]</a>."
Topic(href,href_list)
if(..())
return 1
if(href_list["set_state"])
state=!state
parent.updateUsrDialog()
return 1
if(href_list["set_subject"])
var/list/valves=list()
for(var/obj/machinery/atmospherics/valve/digital/V in world)
if(!isnull(V.id_tag) && V.frequency == parent.frequency)
valves|=V.id_tag
if(valves.len==0)
usr << "<span class='warning'>Unable to find any digital valves on this frequency.</span>"
return
valve = input("Select a valve:", "Sensor Data", valve) as null|anything in valves
parent.updateUsrDialog()
return 1
@@ -0,0 +1,42 @@
/datum/automation/set_emitter_power
name = "Emitter: Set Power"
var/emitter=null
var/on=0
Export()
var/list/json = ..()
json["emitter"]=emitter
json["on"]=on
return json
Import(var/list/json)
..(json)
emitter = json["emitter"]
on = text2num(json["on"])
process()
if(emitter)
parent.send_signal(list("tag" = emitter, "command"="set", "state" = on, "hiddenprints" = parent.fingerprintshidden))
return 0
GetText()
return "Set emitter <a href=\"?src=\ref[src];set_subject=1\">[fmtString(emitter)]</a> to <a href=\"?src=\ref[src];set_power=1\">[on?"on":"off"]</a>."
Topic(href,href_list)
if(..())
return 1
if(href_list["set_power"])
on=!on
parent.updateUsrDialog()
return 1
if(href_list["set_subject"])
var/list/emitters=list()
for(var/obj/machinery/power/emitter/E in machines)
if(!isnull(E.id_tag) && E.frequency == parent.frequency)
emitters|=E.id_tag
if(emitters.len==0)
usr << "<span class='warning'>Unable to find any emitters on this frequency.</span>"
return
emitter = input("Select an emitter:", "Emitter", emitter) as null|anything in emitters
parent.updateUsrDialog()
return 1
@@ -0,0 +1,83 @@
////////////////////////////////////////////
// Injector
////////////////////////////////////////////
/datum/automation/set_injector_power
name = "Injector: Power"
var/injector=null
var/state=0
Export()
var/list/json = ..()
json["injector"]=injector
json["state"]=state
return json
Import(var/list/json)
..(json)
injector = json["injector"]
state = text2num(json["state"])
process()
if(injector)
parent.send_signal(list ("tag" = injector, "power"=state))
return 0
GetText()
return "Set injector <a href=\"?src=\ref[src];set_injector=1\">[fmtString(injector)]</a> power to <a href=\"?src=\ref[src];toggle_state=1\">[state ? "on" : "off"]</a>."
Topic(href,href_list)
if(..())
return 1
if(href_list["toggle_state"])
state = !state
parent.updateUsrDialog()
return 1
if(href_list["set_injector"])
var/list/injector_names=list()
for(var/obj/machinery/atmospherics/unary/outlet_injector/I in machines)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
injector = input("Select an injector:", "Sensor Data", injector) as null|anything in injector_names
parent.updateUsrDialog()
return 1
/datum/automation/set_injector_rate
name = "Injector: Rate"
var/injector = null
var/rate = 0
Export()
var/list/json = ..()
json["injector"] = injector
json["rate"] = rate
return json
Import(var/list/json)
..(json)
injector = json["injector"]
rate = text2num(json["rate"])
process()
if(injector)
parent.send_signal(list ("tag" = injector, "set_volume_rate"=rate))
return 0
GetText()
return "Set injector <a href=\"?src=\ref[src];set_injector=1\">[fmtString(injector)]</a> transfer rate to <a href=\"?src=\ref[src];set_rate=1\">[rate]</a> L/s."
Topic(href,href_list)
if(..())
return 1
if(href_list["set_rate"])
rate = input("Set rate in L/s.", "Rate", rate) as num
parent.updateUsrDialog()
return 1
if(href_list["set_injector"])
var/list/injector_names=list()
for(var/obj/machinery/atmospherics/unary/outlet_injector/I in machines)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
injector = input("Select an injector:", "Sensor Data", injector) as null|anything in injector_names
parent.updateUsrDialog()
return 1
@@ -0,0 +1,153 @@
/datum/automation/set_scrubber_mode
name="Scrubber: Mode"
var/scrubber=null
var/mode=1
Export()
var/list/json = ..()
json["scrubber"]=scrubber
json["mode"]=mode
return json
Import(var/list/json)
..(json)
scrubber = json["scrubber"]
mode = text2num(json["mode"])
New(var/obj/machinery/computer/general_air_control/atmos_automation/aa)
..(aa)
children=list(null)
process()
if(scrubber)
parent.send_signal(list ("tag" = scrubber, "sigtype"="command", "scrubbing"=mode),filter = RADIO_FROM_AIRALARM)
return 0
GetText()
return "Set Scrubber <a href=\"?src=\ref[src];set_scrubber=1\">[fmtString(scrubber)]</a> mode to <a href=\"?src=\ref[src];set_mode=1\">[mode?"Scrubbing":"Syphoning"]</a>."
Topic(href,href_list)
if(..()) return
if(href_list["set_mode"])
mode=!mode
parent.updateUsrDialog()
return 1
if(href_list["set_scrubber"])
var/list/injector_names=list()
for(var/obj/machinery/atmospherics/unary/vent_scrubber/S in machines)
if(!isnull(S.id_tag) && S.frequency == parent.frequency)
injector_names|=S.id_tag
scrubber = input("Select a scrubber:", "Scrubbers", scrubber) as null|anything in injector_names
parent.updateUsrDialog()
return 1
/datum/automation/set_scrubber_power
name="Scrubber: Power"
var/scrubber=null
var/state=0
Export()
var/list/json = ..()
json["scrubber"]=scrubber
json["state"]=state
return json
Import(var/list/json)
..(json)
scrubber = json["scrubber"]
state = text2num(json["state"])
New(var/obj/machinery/computer/general_air_control/atmos_automation/aa)
..(aa)
process()
if(scrubber)
parent.send_signal(list ("tag" = scrubber, "sigtype"="command", "power"=state),filter = RADIO_FROM_AIRALARM)
GetText()
return "Set Scrubber <a href=\"?src=\ref[src];set_scrubber=1\">[fmtString(scrubber)]</a> power to <a href=\"?src=\ref[src];set_power=1\">[state ? "on" : "off"]</a>."
Topic(href,href_list)
if(..()) return
if(href_list["set_power"])
state = !state
parent.updateUsrDialog()
return 1
if(href_list["set_scrubber"])
var/list/injector_names=list()
for(var/obj/machinery/atmospherics/unary/vent_scrubber/S in machines)
if(!isnull(S.id_tag) && S.frequency == parent.frequency)
injector_names|=S.id_tag
scrubber = input("Select a scrubber:", "Scrubbers", scrubber) as null|anything in injector_names
parent.updateUsrDialog()
return 1
var/global/list/gas_labels=list(
"co2" = "CO<sub>2</sub>",
"tox" = "Plasma",
"n2o" = "N<sub>2</sub>O",
"o2" = "O<sub>2</sub>",
"n2" = "N<sub>2</sub>"
)
/datum/automation/set_scrubber_gasses
name="Scrubber: Gasses"
var/scrubber=null
var/list/gasses=list(
"co2" = 1,
"tox" = 0,
"n2o" = 0,
"o2" = 0,
"n2" = 0
)
Export()
var/list/json = ..()
json["scrubber"]=scrubber
json["gasses"]=gasses
return json
Import(var/list/json)
..(json)
scrubber = json["scrubber"]
var/list/newgasses=json["gasses"]
for(var/key in newgasses)
gasses[key]=newgasses[key]
New(var/obj/machinery/computer/general_air_control/atmos_automation/aa)
..(aa)
process()
if(scrubber)
var/list/data = list ("tag" = scrubber, "sigtype"="command")
for(var/gas in gasses)
data[gas+"_scrub"]=gasses[gas]
parent.send_signal(data,filter = RADIO_FROM_AIRALARM)
GetText()
var/txt = "Set Scrubber <a href=\"?src=\ref[src];set_scrubber=1\">[fmtString(scrubber)]</a> to scrub "
for(var/gas in gasses)
txt += " [gas_labels[gas]] (<a href=\"?src=\ref[src];tog_gas=[gas]\">[gasses[gas] ? "on" : "off"]</a>),"
return txt
Topic(href,href_list)
if(..()) return
if(href_list["tog_gas"])
var/gas = href_list["tog_gas"]
if(!(gas in gasses))
return
gasses[gas] = !gasses[gas]
parent.updateUsrDialog()
return 1
if(href_list["set_scrubber"])
var/list/injector_names=list()
for(var/obj/machinery/atmospherics/unary/vent_scrubber/S in machines)
if(!isnull(S.id_tag) && S.frequency == parent.frequency)
injector_names|=S.id_tag
scrubber = input("Select a scrubber:", "Scrubbers", scrubber) as null|anything in injector_names
parent.updateUsrDialog()
return 1
@@ -0,0 +1,56 @@
///////////////////////////////////////////
// sensor data
///////////////////////////////////////////
/datum/automation/get_sensor_data
name = "Sensor: Get Data"
var/field="temperature"
var/sensor=null
returntype=AUTOM_RT_NUM
Export()
var/list/json = ..()
json["sensor"]=sensor
json["field"]=field
return json
Import(var/list/json)
..(json)
sensor = json["sensor"]
field = json["field"]
Evaluate()
if(sensor && field && sensor in parent.sensor_information)
return parent.sensor_information[sensor][field]
return 0
GetText()
return "<a href=\"?src=\ref[src];set_field=1\">[fmtString(field)]</a> from sensor <a href=\"?src=\ref[src];set_sensor=1\">[fmtString(sensor)]</a>"
Topic(href,href_list)
if(..())
return 1
if(href_list["set_field"])
field = input("Select a sensor output:", "Sensor Data", field) as null|anything in list(
"temperature",
"pressure",
"oxygen",
"toxins",
"nitrogen",
"carbon_dioxide"
)
parent.updateUsrDialog()
return 1
if(href_list["set_sensor"])
var/list/sensor_list = list()
for(var/obj/machinery/air_sensor/G in machines)
if(!isnull(G.id_tag) && G.frequency == parent.frequency)
sensor_list|=G.id_tag
for(var/obj/machinery/meter/M in machines)
if(!isnull(M.id_tag) && M.frequency == parent.frequency)
sensor_list|=M.id_tag
sensor = input("Select a sensor:", "Sensor Data", field) as null|anything in sensor_list
parent.updateUsrDialog()
return 1
@@ -0,0 +1,314 @@
/datum/automation/set_vent_pump_mode
name="Vent Pump: Mode"
var/vent_pump = null
var/mode = "stabilize"
var/vent_type = 0//0 for unary vents, 1 for DP vents
var/list/modes = list("stabilize","purge")
Export()
var/list/json = ..()
json["vent_pump"] = vent_pump
json["mode"] = mode
json["vent_type"] = vent_type
return json
Import(var/list/json)
..(json)
vent_pump = json["vent_pump"]
mode = json["mode"]
vent_type = text2num(json["vent_type"])
process()
if(vent_pump)
var/dirvalue = (mode == "stabilize" ? 1 : mode == "purge" ? 0 : 1)
parent.send_signal(list("tag" = vent_pump, "direction" = dirvalue), filter = (vent_type ? RADIO_ATMOSIA : RADIO_FROM_AIRALARM))
return 0
GetText()
return "Set <a href=\"?src=\ref[src];toggle_type=1\">[vent_type ? "Dual-Port" : "Unary"]</a> vent pump <a href=\"?src=\ref[src];set_vent_pump=1\">[fmtString(vent_pump)]</a> mode to <a href=\"?src=\ref[src];set_mode=1\">[mode]</a>."
Topic(href,href_list)
if(..())
return 1
if(href_list["set_mode"])
mode = input("Select a mode to put this pump into.",mode) in modes
parent.updateUsrDialog()
return 1
if(href_list["set_vent_pump"])
var/list/injector_names = list()
if(!vent_type)
for(var/obj/machinery/atmospherics/unary/vent_pump/I in machines)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names |= I.id_tag
else
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world)
//world << "test"
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names |= I.id_tag
vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names
parent.updateUsrDialog()
return 1
if(href_list["toggle_type"])
vent_type = !vent_type
parent.updateUsrDialog()
return 1
/datum/automation/set_vent_pump_power
name="Vent Pump: Power"
var/vent_pump = null
var/state = 0
var/mode = 0//0 for unary vents, 1 for DP vents.
Export()
var/list/json = ..()
json["vent_pump"] = vent_pump
json["state"] = state
json["mode"] = mode
return json
Import(var/list/json)
..(json)
vent_pump = json["vent_pump"]
state = text2num(json["state"])
mode = text2num(json["mode"])
process()
if(vent_pump)
parent.send_signal(list ("tag" = vent_pump, "power" = state), filter = (mode ? RADIO_ATMOSIA : RADIO_FROM_AIRALARM))
GetText()
return "Set <a href=\"?src=\ref[src];toggle_mode=1\">[mode ? "Dual-Port" : "Unary"]</a> vent pump <a href=\"?src=\ref[src];set_vent_pump=1\">[fmtString(vent_pump)]</a> power to <a href=\"?src=\ref[src];set_power=1\">[state ? "on" : "off"]</a>."
Topic(href,href_list)
if(..())
return 1
if(href_list["set_power"])
state = !state
parent.updateUsrDialog()
return 1
if(href_list["set_vent_pump"])
var/list/injector_names=list()
if(!mode)
for(var/obj/machinery/atmospherics/unary/vent_pump/I in machines)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
else
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names
parent.updateUsrDialog()
return 1
if(href_list["toggle_mode"])
mode = !mode
parent.updateUsrDialog()
return 1
/datum/automation/set_vent_pump_pressure//controls the internal/external pressure bounds of a vent pump.
name = "Vent Pump: Pressure Settings"
var/vent_pump = null
var/intpressureout = 0//these 2 are for DP vents, if it's a unary vent you're sending to it will take intpressureout as var
var/intpressurein = 0
var/extpressure = 0
var/mode = 0//0 for unary vents, 1 for DP vents.
Export()
var/list/json = ..()
json["vent_pump"] = vent_pump
json["intpressureout"] = intpressureout
json["intpressurein"] = intpressurein
json["extpressure"] = extpressure
json["mode"] = mode
return json
Import(var/list/json)
..(json)
vent_pump = json["vent_pump"]
intpressureout = text2num(json["intpressureout"])
intpressurein = text2num(json["intpressurein"])
extpressure = text2num(json["extpressure"])
mode = text2num(json["mode"])
New(var/obj/machinery/computer/general_air_control/atmos_automation/aa)
..(aa)
process()
if(vent_pump)
var/list/data = list( \
"tag" = vent_pump, \
)
var/filter = RADIO_ATMOSIA
if(mode)//it's a DP vent
if(intpressurein)
data.Add(list("set_input_pressure" = intpressurein))
if(intpressureout)
data.Add(list("set_output_pressure" = intpressureout))
if(extpressure)
data.Add(list("set_external_pressure" = extpressure))
else
if(intpressureout)
data.Add(list("set_internal_pressure" = intpressureout))
if(extpressure)
data.Add(list("set_external_pressure" = extpressure))
filter = RADIO_FROM_AIRALARM
parent.send_signal(data, filter)
GetText()
if(mode)//DP vent
return {"Set <a href=\"?src=\ref[src];swap_modes=1\">dual-port</a> vent pump <a href=\"?src=\ref[src];set_vent_pump=1\">[fmtString(vent_pump)]</a>
pressure bounds: internal outwards: <a href=\"?src=\ref[src];set_intpressure_out=1">[fmtString(intpressureout)]</a>
internal inwards: <a href=\"?src=\ref[src];set_intpressure_in=1">[fmtString(intpressurein)]</a>
external: <a href=\"?src=\ref[src];set_external=1">[fmtString(extpressure)]</a>
"}//well that was a lot to type
else
return {"Set <a href=\"?src=\ref[src];swap_modes=1\">unary</a> vent pump <a href=\"?src=\ref[src];set_vent_pump=1\">[fmtString(vent_pump)]</a>
pressure bounds: internal: <a href=\"?src=\ref[src];set_intpressure_out=1">[fmtString(intpressureout)]</a>
external: <a href=\"?src=\ref[src];set_external=1">[fmtString(extpressure)]</a>
"}//copy paste FTW
Topic(href, href_list)
if(..())
return 1
if(href_list["set_vent_pump"])
var/list/injector_names=list()
if(mode)//DP vent selection
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
else
for(var/obj/machinery/atmospherics/unary/vent_pump/I in machines)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names
parent.updateUsrDialog()
return 1
if(href_list["set_intpressure_out"])
var/response = input("Set new pressure, in kPa. \[0-[50*ONE_ATMOSPHERE]\]") as num
intpressureout = text2num(response)
intpressureout = between(0, intpressureout, 50*ONE_ATMOSPHERE)
parent.updateUsrDialog()
return 1
if(href_list["set_intpressure_in"])
var/response = input("Set new pressure, in kPa. \[0-[50*ONE_ATMOSPHERE]\]") as num
intpressurein = text2num(response)
intpressurein = between(0, intpressurein, 50*ONE_ATMOSPHERE)
parent.updateUsrDialog()
return 1
if(href_list["set_external"])
var/response = input(usr,"Set new pressure, in kPa. \[0-[50*ONE_ATMOSPHERE]\]") as num
extpressure = text2num(response)
extpressure = between(0, extpressure, 50*ONE_ATMOSPHERE)
parent.updateUsrDialog()
return 1
if(href_list["swap_modes"])
mode = !mode
vent_pump = null//if we don't clear this is could get glitchy, by which I mean not at all, whatever, stay clean
parent.updateUsrDialog()
return 1
/datum/automation/set_vent_pressure_checks
name = "Vent Pump: Pressure Checks"
var/vent_pump = null
var/checks = 1
var/mode = 0//1 for DP vent, 0 for unary vent
/*
checks bitflags
1 = external
2 = internal in (regular internal for unaries)
4 = internal out (ignored by unaries)
*/
Export()
var/list/json = ..()
json["vent_pump"] = vent_pump
json["checks"] = checks
json["mode"] = mode
return json
Import(var/list/json)
..(json)
vent_pump = json["vent_pump"]
checks = text2num(json["checks"])
mode = text2num(json["mode"])
New(var/obj/machinery/computer/general_air_control/atmos_automation/aa)
..(aa)
process()
if(vent_pump)
parent.send_signal(list("tag" = vent_pump, "checks" = checks), filter = (mode ? RADIO_ATMOSIA : RADIO_FROM_AIRALARM))//not gonna bother with a sanity check here, there *should* not be any problems
GetText()
if(mode)
return {"Set <a href=\"?src=\ref[src];swap_modes=1\">dual-port</a> vent pump <a href=\"?src=\ref[src];set_vent_pump=1\">[fmtString(vent_pump)]</a> pressure checks to:
external <a href=\"?src=\ref[src];togglecheck=1\">[checks&1 ? "Enabled" : "Disabled"]</a>
internal inwards <a href=\"?src=\ref[src];togglecheck=2\">[checks&2 ? "Enabled" : "Disabled"]</a>
internal outwards <a href=\"?src=\ref[src];togglecheck=4\">[checks&4 ? "Enabled" : "Disabled"]</a>
"}
else
return {"Set <a href=\"?src=\ref[src];swap_modes=1\">unary</a> vent pump <a href=\"?src=\ref[src];set_vent_pump=1\">[fmtString(vent_pump)]</a> pressure checks to:
external: <a href=\"?src=\ref[src];togglecheck=1\">[checks&1 ? "Enabled" : "Disabled"]</a>,
internal: <a href=\"?src=\ref[src];togglecheck=2\">[checks&2 ? "Enabled" : "Disabled"]</a>
"}
Topic(href, href_list)
if(..())
return 1
if(href_list["set_vent_pump"])
var/list/injector_names=list()
if(mode)//DP vent selection
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
else
for(var/obj/machinery/atmospherics/unary/vent_pump/I in machines)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names
parent.updateUsrDialog()
return 1
if(href_list["swap_modes"])
mode = !mode
vent_pump = null//if we don't clear this is could get glitchy, by which I mean not at all, whatever, stay clean
if(!mode && checks&4)//disable this bitflag since we're switching to unaries
checks &= ~4
parent.updateUsrDialog()
return 1
if(href_list["togglecheck"])
var/bitflagvalue = text2num(href_list["togglecheck"])
if(mode)
if(!(bitflagvalue in list(1, 2, 4)))
return 0
else if(!(bitflagvalue in list(1, 2)))
return 0
if(checks&bitflagvalue)//the bitflag is on ATM
checks &= ~bitflagvalue
else//can't not be off
checks |= bitflagvalue
parent.updateUsrDialog()
return 1
+457
View File
@@ -0,0 +1,457 @@
var/global/automation_types=typesof(/datum/automation) - /datum/automation
#define AUTOM_RT_NULL 0
#define AUTOM_RT_NUM 1
#define AUTOM_RT_STRING 2
/datum/automation
// Name of the Automation
var/name="Base Automation"
// For labelling what shit does on the AAC.
var/label="Unnamed Script"
var/desc ="No Description."
var/obj/machinery/computer/general_air_control/atmos_automation/parent
var/list/valid_child_returntypes=list()
var/list/datum/automation/children=list()
var/returntype=AUTOM_RT_NULL
/datum/automation/New(var/obj/machinery/computer/general_air_control/atmos_automation/aa)
parent=aa
/datum/automation/proc/GetText()
return "[type] doesn't override GetText()!"
/datum/automation/proc/OnReset()
return
/datum/automation/proc/OnRemove()
return
/datum/automation/proc/process()
return
/datum/automation/proc/Evaluate()
return 0
/datum/automation/proc/Export()
var/list/R = list("type"=type)
if(initial(label)!=label)
R["label"]=label
if(initial(desc)!=desc)
R["desc"]=desc
if(children.len>0)
var/list/C=list()
for(var/datum/automation/A in children)
C += list(A.Export())
R["children"]=C
return R
/datum/automation/proc/unpackChild(var/list/cData)
if(isnull(cData) || !("type" in cData))
return null
var/Atype=text2path(cData["type"])
if(!(Atype in automation_types))
return null
var/datum/automation/A = new Atype(parent)
A.Import(cData)
return A
/datum/automation/proc/unpackChildren(var/list/childList)
. = list()
if(childList.len>0)
for(var/list/cData in childList)
if(isnull(cData) || !("type" in cData))
. += null
continue
var/Atype=text2path(cData["type"])
if(!(Atype in automation_types))
continue
var/datum/automation/A = new Atype(parent)
A.Import(cData)
. += A
/datum/automation/proc/packChildren(var/list/childList)
. = list()
if(childList.len>0)
for(var/datum/automation/A in childList)
if(isnull(A) || !istype(A))
. += null
continue
. += list(A.Export())
/datum/automation/proc/Import(var/list/json)
if("label" in json)
label = json["label"]
if("desc" in json)
desc = json["desc"]
if("children" in json)
children = unpackChildren(json["children"])
/datum/automation/proc/fmtString(var/str)
if(str==null || str == "")
return "-----"
return str
/datum/automation/Topic(href,href_list)
if(parent.Topic("src=\ref[parent]", list("src" = parent)))//dumb hack to check sanity, empty topic shouldn't trigger a 1 on anything but sanity checks
return 1
if(href_list["add"])
var/new_child=selectValidChildFor(usr)
if(!new_child) return 1
children += new_child
parent.updateUsrDialog()
return 1
if(href_list["remove"])
if(href_list["remove"]=="*")
var/confirm=alert("Are you sure you want to remove ALL automations?","Automations","Yes","No")
if(confirm == "No") return 0
for(var/datum/automation/A in children)
A.OnRemove()
children.Remove(A)
else
var/datum/automation/A=locate(href_list["remove"])
if(!A) return 1
var/confirm=alert("Are you sure you want to remove this automation?","Automations","Yes","No")
if(confirm == "No") return 0
A.OnRemove()
children.Remove(A)
parent.updateUsrDialog()
return 1
if(href_list["reset"])
if(href_list["reset"]=="*")
for(var/datum/automation/A in children)
A.OnReset()
else
var/datum/automation/A=locate(href_list["reset"])
if(!A) return 1
A.OnReset()
parent.updateUsrDialog()
return 1
return 0 // 1 if handled
/datum/automation/proc/selectValidChildFor(var/mob/user, var/list/returntypes=valid_child_returntypes)
return parent.selectValidChildFor(src, user, returntypes)
///////////////////////////////////////////
// AND
///////////////////////////////////////////
/datum/automation/and
name = "AND statement"
returntype=AUTOM_RT_NUM
valid_child_returntypes=list(AUTOM_RT_NUM)
Evaluate()
if(children.len==0) return 0
for(var/datum/automation/stmt in children)
if(!stmt.Evaluate())
return 0
return 1
GetText()
var/out="AND (<a href=\"?src=\ref[src];add=1\">Add</a>)"
if(children.len>0)
out += "<ul>"
for(var/datum/automation/stmt in children)
out += {"<li>
\[<a href="?src=\ref[src];reset=\ref[stmt]">Reset</a> |
<a href="?src=\ref[src];remove=\ref[stmt]">&times;</a>\]
[stmt.GetText()]
</li>"}
out += "</ul>"
else
out += "<blockquote><i>No statements to evaluate.</i></blockquote>"
return out
///////////////////////////////////////////
// OR
///////////////////////////////////////////
/datum/automation/or
name = "OR statement"
returntype=AUTOM_RT_NUM
valid_child_returntypes=list(AUTOM_RT_NUM)
Evaluate()
if(children.len==0) return 0
for(var/datum/automation/stmt in children)
if(stmt.Evaluate())
return 1
return 0
GetText()
var/out="OR (<a href=\"?src=\ref[src];add=1\">Add</a>)"
if(children.len>0)
out += "<ul>"
for(var/datum/automation/stmt in children)
out += {"<li>
\[<a href="?src=\ref[src];reset=\ref[stmt]">Reset</a> |
<a href="?src=\ref[src];remove=\ref[stmt]">&times;</a>\]
[stmt.GetText()]
</li>"}
out += "</ul>"
else
out += "<blockquote><i>No statements to evaluate.</i></blockquote>"
return out
///////////////////////////////////////////
// if .. then
///////////////////////////////////////////
/datum/automation/if_statement
name = "IF statement"
var/datum/automation/condition=null
valid_child_returntypes=list(AUTOM_RT_NULL)
var/list/valid_conditions=list(AUTOM_RT_NUM)
var/list/children_then=list()
var/list/children_else=list()
Export()
var/list/R = ..()
if(children_then.len>0)
R["then"]=packChildren(children_then)
if(children_else.len>0)
R["else"]=packChildren(children_else)
if(condition)
R["condition"]=condition.Export()
return R
Import(var/list/json)
..(json)
if("then" in json)
children_then = unpackChildren(json["then"])
if("else" in json)
children_else = unpackChildren(json["else"])
if("condition" in json)
condition = unpackChild(json["condition"])
GetText()
var/out="<b>IF</b> (<a href=\"?src=\ref[src];set_condition=1\">SET</a>):<blockquote>"
if(condition)
out += condition.GetText()
else
out += "<i>Not set</i>"
out += "</blockquote>"
out += "<b>THEN:</b> (<a href=\"?src=\ref[src];add=then\">Add</a>)"
if(children_then.len>0)
out += "<ul>"
for(var/datum/automation/stmt in children_then)
out += {"<li>
\[<a href="?src=\ref[src];reset=\ref[stmt];context=then">Reset</a> |
<a href="?src=\ref[src];remove=\ref[stmt];context=then">&times;</a>\]
[stmt.GetText()]
</li>"}
out += "</ul>"
else
out += "<blockquote><i>(No statements to run)</i></blockquote>"
out += "<b>ELSE:</b> (<a href=\"?src=\ref[src];add=else\">Add</a>)"
if(children_then.len>0)
out += "<ul>"
for(var/datum/automation/stmt in children_else)
out += {"<li>
\[<a href="?src=\ref[src];reset=\ref[stmt];context=else">Reset</a> |
<a href="?src=\ref[src];remove=\ref[stmt];context=else">&times;</a>\]
[stmt.GetText()]
</li>"}
out += "</ul>"
else
out += "<blockquote><i>(No statements to run)</i></blockquote>"
return out
Topic(href,href_list)
if(href_list["add"])
var/new_child=selectValidChildFor(usr)
if(!new_child) return 1
switch(href_list["add"])
if("then")
children_then += new_child
if("else")
children_else += new_child
else
warning("Unknown add value given to [type]/Topic():[__LINE__]: [href]")
return 1
parent.updateUsrDialog()
return 1
if(href_list["remove"])
if(href_list["remove"]=="*")
var/confirm=input("Are you sure you want to remove ALL automations?","Automations","No") in list("Yes","No")
if(confirm == "No") return 0
for(var/datum/automation/A in children_then)
A.OnRemove()
children_then.Remove(A)
for(var/datum/automation/A in children_else)
A.OnRemove()
children_else.Remove(A)
else
var/datum/automation/A=locate(href_list["remove"])
if(!A) return 1
var/confirm=input("Are you sure you want to remove this automation?","Automations","No") in list("Yes","No")
if(confirm == "No") return 0
A.OnRemove()
switch(href_list["context"])
if("then")
children_then.Remove(A)
if("else")
children_else.Remove(A)
parent.updateUsrDialog()
return 1
if(href_list["reset"])
if(href_list["reset"]=="*")
for(var/datum/automation/A in children_then)
A.OnReset()
for(var/datum/automation/A in children_else)
A.OnReset()
else
var/datum/automation/A=locate(href_list["reset"])
if(!A) return 1
A.OnReset()
parent.updateUsrDialog()
return 1
if(href_list["set_condition"])
var/new_condition = selectValidChildFor(usr,valid_conditions)
testing("Selected condition: [new_condition]")
if(!new_condition)
return 1
condition = new_condition
parent.updateUsrDialog()
return 1
process()
if(condition)
if(condition.Evaluate())
for(var/datum/automation/stmt in children_then)
stmt.process()
else
for(var/datum/automation/stmt in children_else)
stmt.process()
///////////////////////////////////////////
// compare
///////////////////////////////////////////
/datum/automation/compare
name = "comparison"
var/comparator="Greater Than"
returntype=AUTOM_RT_NUM
valid_child_returntypes=list(AUTOM_RT_NUM)
New(var/obj/machinery/computer/general_air_control/atmos_automation/aa)
..(aa)
children=list(null,null)
Export()
var/list/json = ..()
json["cmp"]=comparator
return json
Import(var/list/json)
..(json)
comparator = json["cmp"]
Evaluate()
if(children.len<2)
return 0
var/datum/automation/d_left =children[1]
var/datum/automation/d_right=children[2]
if(!d_left || !d_right)
return 0
var/left=d_left.Evaluate()
var/right=d_right.Evaluate()
switch(comparator)
if("Greater Than")
return left>right
if("Greater Than or Equal to")
return left>=right
if("Less Than")
return left<right
if("Less Than or Equal to")
return left<=right
if("Equal to")
return left==right
if("NOT Equal To")
return left!=right
else
return 0
GetText()
var/datum/automation/left =children[1]
var/datum/automation/right=children[2]
var/out = "<a href=\"?src=\ref[src];set_field=1\">(Set Left)</a> ("
if(left==null)
out += "-----"
else
out += left.GetText()
out += ") is <a href=\"?src=\ref[src];set_comparator=left\">[comparator]</a>: <a href=\"?src=\ref[src];set_field=2\">(Set Right)</a> ("
if(right==null)
out += "-----"
else
out += right.GetText()
out +=")"
return out
Topic(href,href_list)
if(href_list["set_comparator"])
comparator = input("Select a comparison operator:", "Compare", "Greater Than") in list("Greater Than","Greater Than or Equal to","Less Than","Less Than or Equal to","Equal to","NOT Equal To")
parent.updateUsrDialog()
return 1
if(href_list["set_field"])
var/idx = text2num(href_list["set_field"])
var/new_child = selectValidChildFor(usr)
if(!new_child)
return 1
children[idx] = new_child
parent.updateUsrDialog()
return 1
///////////////////////////////////////////
// static value
///////////////////////////////////////////
/datum/automation/static_value
name = "Number"
var/value=0
returntype=AUTOM_RT_NUM
Evaluate()
return value
Export()
var/list/json = ..()
json["value"]=value
return json
Import(var/list/json)
..(json)
value = text2num(json["value"])
GetText()
return "<a href=\"?src=\ref[src];set_value=1\">[value]</a>"
Topic(href,href_list)
if(href_list["set_value"])
value = input("Set a value:", "Static Value", value) as num
parent.updateUsrDialog()
return 1
+2 -2
View File
@@ -970,7 +970,7 @@ datum/preferences
if("age")
age = rand(AGE_MIN, AGE_MAX)
if("hair")
if(species == "Human" || species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Machine")
if(species == "Human" || species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Machine" || species == "Wryn")
r_hair = rand(0,255)
g_hair = rand(0,255)
b_hair = rand(0,255)
@@ -996,7 +996,7 @@ datum/preferences
if(species == "Human")
s_tone = random_skin_tone()
if("s_color")
if(species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Slime People")
if(species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Slime People" || species == "Wryn")
r_skin = rand(0,255)
g_skin = rand(0,255)
b_skin = rand(0,255)
+5 -5
View File
@@ -45,7 +45,7 @@
//Set species_restricted list
switch(target_species)
if("Human", "Skrell") //humanoid bodytypes
species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox")
species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox","Wryn")
else
species_restricted = list(target_species)
@@ -161,7 +161,7 @@ BLIND // can't see anything
var/transfer_prints = FALSE
var/pickpocket = 0 //Master pickpocket?
var/clipped = 0
species_restricted = list("exclude","Unathi","Tajaran")
species_restricted = list("exclude","Unathi","Tajaran","Wryn")
/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/wirecutters))
@@ -295,7 +295,7 @@ BLIND // can't see anything
permeability_coefficient = 0.50
slowdown = SHOES_SLOWDOWN
species_restricted = list("exclude","Unathi","Tajaran")
species_restricted = list("exclude","Unathi","Tajaran","Wryn")
/obj/item/proc/negates_gravity()
return 0
@@ -328,7 +328,7 @@ BLIND // can't see anything
heat_protection = HEAD
max_heat_protection_temperature = SPACE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE
siemens_coefficient = 0.9
species_restricted = list("exclude","Diona","Vox")
species_restricted = list("exclude","Diona","Vox","Wryn")
loose = 0 // What kind of idiot designs a pressurized suit where the helmet can fall off?
flash_protect = 2
@@ -351,7 +351,7 @@ BLIND // can't see anything
heat_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
siemens_coefficient = 0.9
species_restricted = list("exclude","Diona","Vox")
species_restricted = list("exclude","Diona","Vox","Wryn")
//Under clothing
/obj/item/clothing/under
+1 -1
View File
@@ -45,4 +45,4 @@
obj/item/clothing/shoes/magboots/syndie/advance //For the Syndicate Strike Team
desc = "Reverse-engineered magboots that appear to be based on an advanced model, as they have a lighter magnetic pull. Property of Gorlex Marauders."
name = "advanced blood-red magboots"
slowdown_active = SHOES_SLOWDOWN
slowdown_active = SHOES_SLOWDOWN
+2 -2
View File
@@ -13,7 +13,7 @@
action_button_name = "Toggle Helmet Light"
//Species-specific stuff.
species_restricted = list("exclude","Unathi","Tajaran","Skrell","Diona","Vox")
species_restricted = list("exclude","Unathi","Tajaran","Skrell","Diona","Vox","Wryn")
sprite_sheets = list(
"Unathi" = 'icons/mob/species/unathi/helmet.dmi',
"Tajaran" = 'icons/mob/species/tajaran/helmet.dmi',
@@ -51,7 +51,7 @@
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/t_scanner, /obj/item/weapon/rcd)
species_restricted = list("exclude","Unathi","Tajaran","Skrell","Diona","Vox")
species_restricted = list("exclude","Unathi","Tajaran","Skrell","Diona","Vox","Wryn")
sprite_sheets = list(
"Unathi" = 'icons/mob/species/unathi/suit.dmi',
"Tajaran" = 'icons/mob/species/tajaran/suit.dmi',
+17 -1
View File
@@ -3,7 +3,7 @@
/obj/item/clothing/under/color/random/New()
..()
var/list/excluded = list(/obj/item/clothing/under/color/random, /obj/item/clothing/under/color, /obj/item/clothing/under/color/blackf, /obj/item/clothing/under/color/blue/dodgeball, /obj/item/clothing/under/color/orange/prison, /obj/item/clothing/under/color/red/dodgeball)
var/list/excluded = list(/obj/item/clothing/under/color/random, /obj/item/clothing/under/color, /obj/item/clothing/under/color/blackf, /obj/item/clothing/under/color/blue/dodgeball, /obj/item/clothing/under/color/orange/prison, /obj/item/clothing/under/color/red/dodgeball, /obj/item/clothing/under/color/red/jersey, /obj/item/clothing/under/color/blue/jersey)
var/obj/item/clothing/under/color/C = pick(typesof(/obj/item/clothing/under/color) - excluded)
name = initial(C.name)
icon_state = initial(C.icon_state)
@@ -173,3 +173,19 @@
icon_state = "darkred"
_color = "darkred"
flags = ONESIZEFITSALL
/obj/item/clothing/under/color/red/jersey
name = "red team jersey"
desc = "The jersey of the Nanotrasen Phi-ghters!"
icon_state = "redjersey"
item_state = "r_suit"
_color = "redjersey"
flags = ONESIZEFITSALL
/obj/item/clothing/under/color/blue/jersey
name = "blue team jersey"
desc = "The jersey of the Nanotrasen Pi-rates!"
icon_state = "bluejersey"
item_state = "b_suit"
_color = "bluejersey"
flags = ONESIZEFITSALL
+1 -806
View File
@@ -52,446 +52,22 @@
icon_state = "bookSpaceLawblack"
title = "Space Law - Limited Edition"
//////////////////////////////////
////////// Fluff Items ///////////
//////////////////////////////////
/obj/item/weapon/paper/fluff/sue_donem // aikasan: Sue Donem
name = "cyborgification waiver"
desc = "It's some kind of official-looking contract."
/obj/item/weapon/paper/fluff/sue_donem/New()
..()
info = "<B>Organic Carrier AIA and Standard Cyborgification Agreement</B><BR>\n<BR>\nUnder the authority of Nanotrasen Synthetic Intelligence Division, this document hereby authorizes an accredited Roboticist of the NSS Exodus or a deputized authority to perform a regulation lobotomisation upon the person of one '<I>Sue Donem</I>' (hereafter referred to as the Subject) with intent to enact a live Artificial Intelligence Assimilation (AIA) or live Cyborgification proceedure.<BR>\n<BR>\nNo further station authorization is required, and the Subject waives all rights as a human under Nanotrasen internal and external legal protocol. This document is subject to amendment under Nanotrasen internal protocol \[REDACTED\].<BR>\n<BR>\nSigned: <I>Sue Donem</I><BR>\n"
stamps = (stamps=="" ? "<HR>" : "<BR>") + "<i>This paper has been stamped with the Nanotrasen Synthetic Intelligence Division rubber stamp.</i>"
var/image/stampoverlay = image('icons/obj/bureaucracy.dmi')
stampoverlay.pixel_x = rand(-2, 2)
stampoverlay.pixel_y = rand(-3, 2)
stampoverlay.icon_state = "paper_stamp-rd"
overlays += stampoverlay
update_icon()
/obj/item/fluff/wes_solari_1 //tzefa: Wes Solari
name = "family photograph"
desc = "A family photograph of a couple and a young child, Written on the back it says \"See you soon Dad -Roy\"."
icon_state = "wes_solari_1"
/obj/item/fluff/sarah_calvera_1 //fniff: Sarah Calvera
name = "old photo"
desc = "Looks like it was made on a really old, cheap camera. Low quality. The camera shows a young hispanic looking girl with red hair wearing a white dress is standing in front of\
an old looking wall. On the back there is a note in black marker that reads \"Sara, Siempre pensé que eras tan linda con ese vestido. Tu hermano, Carlos.\""
icon_state = "sarah_calvera_1"
/obj/item/fluff/angelo_wilkerson_1 //fniff: Angleo Wilkerson
name = "fancy watch"
desc = "An old and expensive pocket watch. Engraved on the bottom is \"Odium est Source De Dolor\". On the back, there is an engraving that does not match the bottom and looks more recent.\
\"Angelo, If you find this, you shall never see me again. Please, for your sake, go anywhere and do anything but stay. I'm proud of you and I will always love you. Your father, Jacob Wilkerson.\"\
Jacob Wilkerson... Wasn't he that serial killer?"
icon_state = "angelo_wilkerson_1"
/obj/item/fluff/sarah_carbrokes_1 //gvazdas: Sarah Carbrokes
name = "locket"
desc = "A grey locket with a picture of a black haired man in it. The text above it reads: \"Edwin Carbrokes\"."
icon_state = "sarah_carbrokes_1"
/obj/item/fluff/ethan_way_1 //whitellama: Ethan Way
name = "old ID"
desc = "A scratched and worn identification card; it appears too damaged to inferface with any technology. You can almost make out \"Tom Cabinet\" in the smeared ink."
icon_state = "ethan_way_1"
/obj/item/fluff/val_mcneil_1 //silentthunder: Val McNeil
name = "rosary pendant"
desc = "A cross on a ring of beads, has McNeil etched onto the back."
icon_state = "val_mcneil_1"
/obj/item/fluff/steve_johnson_1 //thebreadbocks: Steve Johnson
name = "bottle of hair dye"
desc = "A bottle of pink hair dye. So that's how he gets his beard so pink..."
icon_state = "steve_johnson_1"
item_state = "steve_johnson_1"
/obj/item/fluff/david_fanning_1 //sicktrigger: David Fanning
name = "golden scalpel"
desc = "A fine surgical cutting tool covered in thin gold leaf. Does not seem able to cut anything."
icon_state = "david_fanning_1"
item_state = "david_fanning_1"
/obj/item/fluff/john_mckeever_1 //kirbyelder: John McKeever
name = "Suspicious Paper"
desc = "A piece of paper reading: Smash = 1/3 Leaf Juice, 1/3 Tricker, 1/3 Aajkli Extract"
icon_state = "paper"
item_state = "paper"
/obj/item/fluff/maurice_bedford_1
name = "Monogrammed Handkerchief"
desc = "A neatly folded handkerchief embroidered with a 'M'."
icon_state = "maurice_bedford_1"
/obj/item/weapon/book/fluff/johnathan_falcian_1
name = "sketchbook"
desc = "A small, well-used sketchbook."
icon = 'icons/obj/custom_items.dmi'
icon_state = "johnathan_notebook"
dat = "In the notebook there are numerous drawings of various crew-mates, locations, and scenes on the ship. They are of fairly good quality."
author = "Johnathan Falcian"
title = "Falcian's sketchbook"
//////////////////////////////////
////////// Usable Items //////////
//////////////////////////////////
/obj/item/weapon/folder/blue/fluff/matthew_riebhardt //Matthew Riebhardt - ZekeSulastin
name = "academic journal"
desc = "An academic journal, seemingly pertaining to medical genetics. This issue is for the second quarter of 2557. Paper flags demarcate some articles the owner finds interesting."
icon = 'icons/obj/custom_items.dmi'
icon_state = "matthewriebhardt"
/obj/item/weapon/pen/fluff/multi //spaceman96: Trenna Seber
name = "multicolor pen"
desc = "It's a cool looking pen. Lots of colors!"
/obj/item/weapon/pen/fluff/fancypen //orangebottle: Lillian Levett, Lilliana Reade
name = "fancy pen"
desc = "A fancy metal pen. It uses blue ink. An inscription on one side reads,\"L.L. - L.R.\""
icon = 'icons/obj/custom_items.dmi'
icon_state = "fancypen"
/obj/item/weapon/pen/fluff/eugene_bissegger_1 //metamorp: eugene bisseger
name = "Gilded Pen"
desc = "A golden pen that is gilded with a meager amount of gold material. The word 'Nanotrasen' is etched on the clip of the pen."
icon = 'icons/obj/custom_items.dmi'
icon_state = "eugene_pen"
/obj/item/weapon/pen/fluff/fountainpen //paththegreat: Eli Stevens
name = "Engraved Fountain Pen"
desc = "An expensive looking pen with the initials E.S. engraved into the side."
icon = 'icons/obj/custom_items.dmi'
icon_state = "fountainpen"
/obj/item/fluff/victor_kaminsky_1 //chinsky: Victor Kaminski
name = "golden detective's badge"
desc = "Nanotrasen Security Department detective's badge, made from gold. Badge number is 564."
icon_state = "victor_kaminsky_1"
/obj/item/fluff/victor_kaminsky_1/attack_self(mob/user as mob)
for(var/mob/O in viewers(user, null))
O.show_message(text("[] shows you: \icon[] [].", user, src, src.name), 1)
src.add_fingerprint(user)
/obj/item/fluff/ana_issek_2 //suethecake: Ana Issek
name = "Faded Badge"
desc = "A faded badge, backed with leather, that reads 'NT Security Force' across the front. It bears the emblem of the Forensic division."
icon_state = "ana_badge"
item_state = "ana_badge"
_color = "ana_badge"
/obj/item/fluff/ana_issek_2/attack_self(mob/user as mob)
if(isliving(user))
user.visible_message("\red [user] flashes their golden security badge.\nIt reads: Ana Issek, NT Security.","\red You display the faded bage.\nIt reads: Ana Issek, NT Security.")
/obj/item/fluff/ana_issek_2/attack(mob/living/carbon/human/M, mob/living/user)
if(isliving(user))
user.visible_message("\red [user] invades [M]'s personal space, thrusting [src] into their face insistently.","\red You invade [M]'s personal space, thrusting [src] into their face insistently. You are the law.")
/obj/item/weapon/soap/fluff/azare_siraj_1 //mister fox: Azare Siraj
name = "S'randarr's Tongue Leaf"
desc = "A waxy, scentless leaf."
icon = 'icons/obj/custom_items.dmi'
icon_state = "siraj_tongueleaf"
item_state = "siraj_tongueleaf"
/obj/item/weapon/clipboard/fluff/smallnote //lexusjjss: Lexus Langg, Zachary Tomlinson
name = "small notebook"
desc = "A generic small spiral notebook that flips upwards."
icon = 'icons/obj/custom_items.dmi'
icon_state = "smallnotetext"
item_state = "smallnotetext"
/obj/item/weapon/storage/fluff/maye_daye_1 //morrinn: Maye Day
name = "pristine lunchbox"
desc = "A pristine stainless steel lunch box. The initials M.D. are engraved on the inside of the lid."
icon = 'icons/obj/custom_items.dmi'
icon_state = "maye_daye_1"
/obj/item/weapon/reagent_containers/food/drinks/flask/fluff/william_hackett
name = "handmade flask"
desc = "A wooden flask with a silver lid and bottom. It has a matte, dark blue paint on it with the initials \"W.H.\" etched in black."
icon = 'icons/obj/custom_items.dmi'
icon_state = "williamhackett"
/obj/item/weapon/storage/firstaid/fluff/asus_rose //Kerbal22 - Asus Rose
name = "rugged medkit"
desc = "A dinged up medkit, it seems to have seen quite a bit of use."
icon = 'icons/obj/custom_items.dmi'
icon_state = "asusrose"
/obj/item/weapon/reagent_containers/food/drinks/flask/fluff/johann_erzatz_1 //leonheart11: Johann Erzatz
name = "vintage thermos"
desc = "An older thermos with a faint shine."
icon = 'icons/obj/custom_items.dmi'
icon_state = "johann_erzatz_1"
volume = 50
/obj/item/weapon/lighter/zippo/fluff/li_matsuda_1 //mangled: Li Matsuda
name = "blue zippo lighter"
desc = "A zippo lighter made of some blue metal."
icon = 'icons/obj/custom_items.dmi'
icon_state = "bluezippo"
icon_on = "bluezippoon"
icon_off = "bluezippo"
/obj/item/weapon/lighter/zippo/fluff/michael_guess_1 //Dragor23: Michael Guess
name = "engraved lighter"
desc = "A golden lighter, engraved with some ornaments and a G."
icon = 'icons/obj/custom_items.dmi'
icon_state = "guessip"
icon_on = "guessipon"
icon_off = "guessip"
/obj/item/weapon/lighter/zippo/fluff/riley_rohtin_1 //rawrtaicho: Riley Rohtin
name = "Riley's black zippo"
desc = "A black zippo lighter, which holds some form of sentimental value."
icon = 'icons/obj/custom_items.dmi'
icon_state = "blackzippo"
icon_on = "blackzippoon"
icon_off = "blackzippo"
/obj/item/weapon/lighter/zippo/fluff/fay_sullivan_1 //furohman: Fay Sullivan
name = "Graduation Lighter"
desc = "A silver engraved lighter with 41 on one side and Tharsis University on the other. The lid reads Fay Sullivan, Cybernetic Engineering, 2541"
icon = 'icons/obj/custom_items.dmi'
icon_state = "gradzippo"
icon_on = "gradzippoon"
icon_off = "gradzippo"
/obj/item/weapon/lighter/zippo/fluff/executivekill_1 //executivekill: Hunter Duke
name = "Gonzo Fist zippo"
desc = "A Zippo lighter with the iconic Gonzo Fist on a matte black finish."
icon = 'icons/obj/custom_items.dmi'
icon_state = "gonzozippo"
icon_on = "gonzozippoon"
icon_off = "gonzozippo"
/obj/item/weapon/lighter/zippo/fluff/naples_1 //naples: Russell Vierson
name = "Engraved zippo"
desc = "A intricately engraved Zippo lighter."
icon = 'icons/obj/custom_items.dmi'
icon_state = "engravedzippo"
icon_on = "engravedzippoon"
icon_off = "engravedzippo"
/obj/item/weapon/lighter/zippo/fluff/nt_rep
name = "gold engraved zippo"
desc = "An engraved golden Zippo lighter with the letters NT on it."
icon = 'icons/obj/custom_items.dmi'
icon_state = "zippo_nt_off"
icon_on = "zippo_nt_on"
icon_off = "zippo_nt_off"
/obj/item/weapon/lighter/zippo/fluff/purple
name = "purple engraved zippo"
desc = "All craftsspacemanship is of the highest quality. It is encrusted with refined plasma sheets. On the item is an image of a dwarf and the words 'Strike the Earth!' etched onto the side."
icon = 'icons/obj/custom_items.dmi'
icon_state = "purple_zippo_off"
icon_on = "purple_zippo_on"
icon_off = "purple_zippo_off"
/obj/item/weapon/fluff/cado_keppel_1 //sparklysheep: Cado Keppel
name = "purple comb"
desc = "A pristine purple comb made from flexible plastic. It has a small K etched into its side."
w_class = 1.0
icon = 'icons/obj/custom_items.dmi'
icon_state = "purplecomb"
item_state = "purplecomb"
attack_self(mob/user)
if(user.r_hand == src || user.l_hand == src)
for(var/mob/O in viewers(user, null))
O.show_message(text("\red [] uses [] to comb their hair with incredible style and sophistication. What a [].", user, src, user.gender == FEMALE ? "lady" : "guy"), 1)
return
/obj/item/weapon/fluff/hugo_cinderbacth_1 //thatoneguy: Hugo Cinderbatch
name = "Old Cane"
desc = "An old brown cane made from wood. It has a a large, itallicized H on it's handle."
icon = 'icons/obj/custom_items.dmi'
icon_state = "special_cane"
/obj/item/device/camera/fluff/orange //chinsky: Summer Springfield
name = "orange camera"
icon = 'icons/obj/custom_items.dmi'
desc = "A modified detective's camera, painted in bright orange. On the back you see \"Have fun\" written in small accurate letters with something black."
icon_state = "orangecamera"
icon_on = "orangecamera"
icon_off = "camera_off"
pictures_left = 30
/obj/item/device/camera/fluff/oldcamera //magmaram: Maria Crash
name = "Old Camera"
icon = 'icons/obj/custom_items.dmi'
desc = "An old, slightly beat-up digital camera, with a cheap photo printer taped on. It's a nice shade of blue."
icon_state = "oldcamera"
icon_on = "oldcamera"
icon_off = "oldcamera_off"
pictures_left = 30
/obj/item/weapon/id_wallet/fluff/reese_mackenzie //Reese MacKenzie - ThoseDernSquirrels
name = "ID wallet"
desc = "A wallet made of black leather, holding an ID and a gold badge that reads 'NT.' The ID has a small picture of a man, with the caption Reese James MacKenzie, with other pieces of information to the right of the picture."
icon = 'icons/obj/custom_items.dmi'
icon_state = "reesemackenzie"
/obj/item/weapon/card/id/fluff/lifetime //fastler: Fastler Greay; it seemed like something multiple people would have
name = "Lifetime ID Card"
desc = "A modified ID card given only to those people who have devoted their lives to the better interests of Nanotrasen. It sparkles blue."
icon = 'icons/obj/custom_items.dmi'
icon_state = "lifetimeid"
/obj/item/weapon/reagent_containers/food/drinks/flask/fluff/shinyflask //lexusjjss: Lexus Langg & Zachary Tomlinson
name = "shiny flask"
desc = "A shiny metal flask. It appears to have a Greek symbol inscribed on it."
icon = 'icons/obj/custom_items.dmi'
icon_state = "shinyflask"
volume = 50
/obj/item/weapon/reagent_containers/food/drinks/flask/fluff/lithiumflask //mcgulliver: Wox Derax
name = "Lithium Flask"
desc = "A flask with a Lithium Atom symbol on it."
icon = 'icons/obj/custom_items.dmi'
icon_state = "lithiumflask"
volume = 50
/obj/item/weapon/reagent_containers/glass/beaker/large/fluff/nashida_bishara_1 //rukral:Nashida Bisha'ra
name = "Nashida's Etched Beaker"
desc = "The message: 'Please do not be removing this beaker from the chemistry lab. If lost, return to Nashida Bisha'ra' can be seen etched into the side of this 100 unit beaker."
icon = 'icons/obj/chemical.dmi'
icon_state = "beakerlarge"
g_amt = 5000
volume = 100
/obj/item/weapon/reagent_containers/glass/beaker/fluff/eleanor_stone //Rkf45: Eleanor Stone
name = "teapot"
desc = "An elegant teapot. The engraving on the bottom reads 'ENS'"
icon = 'icons/obj/custom_items.dmi'
icon_state = "eleanorstone"
item_state = "eleanorstone"
volume = 150
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25,30,50,150)
/obj/item/weapon/storage/pill_bottle/fluff/listermedbottle //compactninja: Lister Black
name = "Pill bottle (anti-depressants)"
desc = "Contains pills used to deal with depression. They appear to be prescribed to Lister Black"
New()
..()
new /obj/item/weapon/reagent_containers/pill/fluff/listermed( src )
new /obj/item/weapon/reagent_containers/pill/fluff/listermed( src )
new /obj/item/weapon/reagent_containers/pill/fluff/listermed( src )
new /obj/item/weapon/reagent_containers/pill/fluff/listermed( src )
new /obj/item/weapon/reagent_containers/pill/fluff/listermed( src )
new /obj/item/weapon/reagent_containers/pill/fluff/listermed( src )
new /obj/item/weapon/reagent_containers/pill/fluff/listermed( src )
/obj/item/weapon/reagent_containers/pill/fluff/listermed
name = "anti-depressant pill"
desc = "Used to deal with depression."
icon_state = "pill9"
New()
..()
reagents.add_reagent("morphine", 5)
reagents.add_reagent("sugar", 10)
reagents.add_reagent("ethanol", 5)
/obj/item/clothing/mask/fluff/electriccig //CubeJackal: Barry Sharke
name = "Electronic cigarette"
desc = "An electronic cigarette. Most of the relief of a real cigarette with none of the side effects. Often used by smokers who are trying to quit the habit."
icon = 'icons/obj/custom_items.dmi'
icon_state = "cigon"
throw_speed = 0.5
item_state = "ciglit"
w_class = 1
body_parts_covered = null
//Strange penlight, Nerezza: Asher Spock
/obj/item/weapon/reagent_containers/hypospray/fluff/asher_spock_1
name = "strange penlight"
desc = "Besides the coloring, this penlight looks rather normal and innocent. However, you get a nagging feeling whenever you see it..."
icon = 'icons/obj/custom_items.dmi'
icon_state = "asher_spock_1"
amount_per_transfer_from_this = 5
volume = 15
/obj/item/weapon/reagent_containers/hypospray/fluff/asher_spock_1/New()
..()
reagents.add_reagent("hydrocodone", 15)
update_icon()
return
/obj/item/weapon/reagent_containers/hypospray/fluff/asher_spock_1/attack_self(mob/user as mob)
user << "\blue You click \the [src] but get no reaction. Must be dead."
/obj/item/weapon/reagent_containers/hypospray/fluff/asher_spock_1/attack(mob/M as mob, mob/user as mob)
if (user.ckey != "nerezza") //Because this can end up in the wrong hands, let's make it useless for them!
user << "\blue You click \the [src] but get no reaction. Must be dead."
return
if(!reagents.total_volume)
user << "\red \The [src] is empty."
return
if (!( istype(M, /mob) ))
return
if (reagents.total_volume)
if (M == user && user.ckey == "nerezza") //Make sure this is being used by the right person, for the right reason (self injection)
visible_message("\blue [user] presses their \
penlight against their skin, quickly clicking the button once.", \
"\blue You press the disguised autoinjector against your skin and click the button. There's a sharp pain at the injection site that rapidly fades.", \
"You hear a rustle as someone moves nearby, then a sharp click.")
if (M != user && user.ckey == "nerezza") //Woah now, you better be careful partner
user << "\blue You don't want to contaminate the autoinjector."
return
src.reagents.reaction(M, INGEST)
if(M.reagents)
var/trans = reagents.trans_to(M, amount_per_transfer_from_this)
user << "\blue [trans] units injected. [reagents.total_volume] units remaining in \the [src]."
return
/obj/item/weapon/reagent_containers/hypospray/fluff/asher_spock_1/examine(mob/user as mob)
..()
if(user.ckey != "nerezza") return //Only the owner knows how to examine the contents.
if(reagents && reagents.reagent_list.len)
for(var/datum/reagent/R in reagents.reagent_list)
usr << "\blue You examine the penlight closely and see that it has [R.volume] units of [R.name] stored."
else
usr << "\blue You examine the penlight closely and see that it is currently empty."
//End strange penlight
/obj/item/weapon/card/id/fluff/asher_spock_2 //Nerezza: Asher Spock
name = "Odysses Specialist ID card"
desc = "A special identification card with a red cross signifying an emergency physician has specialised in Odysseus operations and maintenance.\nIt grants the owner recharge bay access."
icon = 'icons/obj/custom_items.dmi'
icon_state = "odysseus_spec_id"
/obj/item/weapon/clipboard/fluff/mcreary_journal //sirribbot: James McReary
name = "McReary's journal"
desc = "A journal with a warning sticker on the front cover. The initials \"J.M.\" are written on the back."
icon = 'icons/obj/custom_items.dmi'
icon_state = "mcreary_journal"
item_state = "mcreary_journal"
/obj/item/device/flashlight/fluff/thejesster14_1 //thejesster14: Rosa Wolff
name = "old red flashlight"
desc = "A very old, childlike flashlight."
icon = 'icons/obj/custom_items.dmi'
icon_state = "wolfflight"
item_state = "wolfflight"
/obj/item/weapon/crowbar/fluff/zelda_creedy_1 //daaneesh: Zelda Creedy
name = "Zelda's Crowbar"
desc = "A pink crow bar that has an engraving that reads, 'To Zelda. Love always, Dawn'"
@@ -499,67 +75,11 @@
icon_state = "zeldacrowbar"
item_state = "crowbar"
////// Ripley customisation kit - Butchery Royce - MayeDay
/obj/item/weapon/paintkit/fluff/butcher_royce_1
name = "Ripley customisation kit"
desc = "A kit containing all the needed tools and parts to turn an APLU Ripley into a Titan's Fist worker mech."
icon = 'icons/obj/custom_items.dmi'
icon_state = "royce_kit"
new_name = "APLU \"Titan's Fist\""
new_desc = "This ordinary mining Ripley has been customized to look like a unit of the Titans Fist."
new_icon = "titan"
allowed_types = list("ripley","firefighter")
////// Ripley customisation kit - Sven Fjeltson - Mordeth221
/obj/item/weapon/paintkit/fluff/sven_fjeltson_1
name = "Mercenary APLU kit"
desc = "A kit containing all the needed tools and parts to turn an APLU Ripley into an old Mercenaries APLU."
icon = 'icons/obj/custom_items.dmi'
icon_state = "sven_kit"
new_name = "APLU \"Strike the Earth!\""
new_desc = "Looks like an over worked, under maintained Ripley with some horrific damage."
new_icon = "earth"
allowed_types = list("ripley","firefighter")
//////////////////////////////////
//////////// Clothing ////////////
//////////////////////////////////
//////////// Gloves ////////////
/obj/item/clothing/gloves/fluff/murad_hassim_1
name = "Tajaran Surgical Gloves"
desc = "Reinforced sterile gloves custom tailored to comfortably accommodate Tajaran claws."
icon_state = "latex"
item_state = "lgloves"
siemens_coefficient = 0.30
permeability_coefficient = 0.01
_color="white"
/obj/item/clothing/gloves/fluff/walter_brooks_1 //botanistpower: Walter Brooks
name = "mittens"
desc = "A pair of well worn, blue mittens."
icon = 'icons/obj/custom_items.dmi'
icon_state = "walter_brooks_1"
item_state = "bluegloves"
_color="blue"
/obj/item/clothing/gloves/fluff/chal_appara_1 //furlucis: Chal Appara
name = "Left Black Glove"
desc = "The left one of a pair of black gloves. Wonder where the other one went..."
icon = 'icons/obj/custom_items.dmi'
icon_state = "chal_appara_1"
/obj/item/clothing/gloves/fluff/ashley_rifler_1 //Vinceluk: Ashley Rifler
name = "Purple Glove"
desc = "A single, purple glove. Initials A.R. are written on the inside of it."
icon = 'icons/obj/custom_items.dmi'
icon_state = "ashley_rifler_1"
//////////// Eye Wear ////////////
/obj/item/clothing/glasses/meson/fluff/book_berner_1 //asanadas: Book Berner
@@ -568,33 +88,7 @@
icon = 'icons/obj/custom_items.dmi'
icon_state = "book_berner_1"
/obj/item/clothing/glasses/fluff/uzenwa_sissra_1 //sparklysheep: Uzenwa Sissra
name = "Scanning Goggles"
desc = "A very oddly shaped pair of goggles with bits of wire poking out the sides. A soft humming sound emanates from it."
icon = 'icons/obj/custom_items.dmi'
icon_state = "uzenwa_sissra_1"
////// Medical eyepatch - Thysse Ezinwa - Jadepython
/obj/item/clothing/glasses/eyepatch/fluff/thysse_1
name = "medical eyepatch"
desc = "On the strap, EZINWA is written in white block letters."
////// Safety Goggles - Arjun Chopra - MindPhyre - APPROVED
/obj/item/clothing/glasses/fluff/arjun_chopra_1
name = "safety goggles"
desc = "A used pair of leather safety goggles."
icon = 'icons/obj/custom_items.dmi'
icon_state = "arjun_chopra"
item_state = "arjun_chopra"
//////////// Hats ////////////
/obj/item/clothing/head/secsoft/fluff/swatcap //deusdactyl: James Girard
name = "\improper SWAT hat"
desc = "A black hat. The inside has the words, \"Lieutenant James Girard, LPD SWAT Team Four.\""
icon = 'icons/obj/custom_items.dmi'
icon_state = "swatcap"
/obj/item/clothing/head/welding/fluff/alice_mccrea_1 //madmalicemccrea: Alice McCrea
name = "flame decal welding helmet"
desc = "A welding helmet adorned with flame decals, and several cryptic slogans of varying degrees of legibility. \"Fly the Friendly Skies\" is clearly visible, written above the visor, for some reason."
@@ -613,30 +107,6 @@
icon = 'icons/obj/custom_items.dmi'
icon_state = "norah_briggs_1"
/obj/item/clothing/head/helmet/greenbandana/fluff/taryn_kifer_1 //themij: Taryn Kifer
name = "orange bandana"
desc = "Hey, I think we're missing a hazard vest..."
icon = 'icons/obj/custom_items.dmi'
icon_state = "taryn_kifer_1"
/obj/item/clothing/head/fluff/edvin_telephosphor_1 //foolamancer: Edvin Telephosphor
name = "Edvin's Hat"
desc = "A hat specially tailored for Skrellian anatomy. It has a yellow badge on the front, with a large red 'T' inscribed on it."
icon = 'icons/obj/custom_items.dmi'
icon_state = "edvin_telephosphor_1"
/obj/item/clothing/head/fluff/krinnhat //Shirotyrant: Krinn Seeskale
name = "saucepan hat"
desc = "This hat is the shiniest shiny Krinn has ever owned."
icon = 'icons/obj/custom_items.dmi'
icon_state = "krinn_hat"
/obj/item/clothing/head/fluff/bruce_hachert //Stup1dg33kz: Bruce Hachert
name = "worn hat"
desc = "A worn-looking hat. It is slightly faded in color."
icon = 'icons/obj/custom_items.dmi'
icon_state = "brucehachert"
//////////// Suits ////////////
/obj/item/clothing/suit/storage/labcoat/fluff/aeneas_rinil //Robotics Labcoat - Aeneas Rinil [APPR]
@@ -645,28 +115,6 @@
icon = 'icons/obj/custom_items.dmi'
icon_state = "aeneasrinil_open"
/obj/item/clothing/suit/storage/labcoat/fluff/pink //spaceman96: Trenna Seber
name = "pink labcoat"
desc = "A suit that protects against minor chemical spills. Has a pink stripe down from the shoulders."
icon = 'icons/obj/custom_items.dmi'
icon_state = "labcoat_pink_open"
/obj/item/clothing/suit/storage/det_suit/fluff/graycoat //vinceluk: Seth Sealis
name = "gray coat"
desc = "Old, worn out coat. It's seen better days."
icon = 'icons/obj/custom_items.dmi'
icon_state = "graycoat"
item_state = "graycoat"
_color = "graycoat"
/obj/item/clothing/suit/storage/det_suit/fluff/leatherjack //atomicdog92: Seth Sealis
name = "leather jacket"
desc = "A black leather coat, popular amongst punks, greasers, and other galactic scum."
icon = 'icons/obj/custom_items.dmi'
icon_state = "leatherjack"
item_state = "leatherjack"
_color = "leatherjack"
/obj/item/clothing/suit/armor/vest/fluff/deus_blueshield //deusdactyl
name = "blueshield security armor"
desc = "An armored vest with the badge of a Blueshield Lieutenant."
@@ -674,95 +122,7 @@
icon_state = "deus_blueshield"
item_state = "deus_blueshield"
/obj/item/clothing/suit/fluff/oldscarf //Writerer2: Javaria Zara
name = "old scarf"
desc = "An old looking scarf, it seems to be fairly worn."
icon = 'icons/obj/clothing/suits.dmi'
icon_state = "mantle-unathi"
item_state = "mantle-unathi"
body_parts_covered = UPPER_TORSO
//////////// Uniforms ////////////
/obj/item/clothing/under/fluff/milo_hachert //Field Dress Uniform - Milo Hachert - Commissar_Drew
name = "customs uniform"
desc = "A uniform jacket, its buttons polished to a shine, coupled with a dark pair of trousers. 'Customs' is embroidered upon the jackets shoulder bar."
icon = 'icons/obj/custom_items.dmi'
icon_state = "milohachert"
item_state = "milohachert"
_color = "milohachert"
/obj/item/clothing/under/fluff/jumpsuitdown //searif: Yuki Matsuda
name = "rolled down jumpsuit"
desc = "A rolled down jumpsuit. Great for mechanics."
icon = 'icons/obj/custom_items.dmi'
icon_state = "jumpsuitdown"
item_state = "jumpsuitdown"
_color = "jumpsuitdown"
/obj/item/clothing/under/fluff/lilith_vinous_1 //slyhidden: Lilith Vinous
name = "casual security uniform"
desc = "A less formal version of the traditional dark red Security uniform. It has the top button undone, rolled up sleeves and different belt."
icon = 'icons/obj/custom_items.dmi'
icon_state = "lilith_uniform"
item_state = "lilith_uniform"
_color = "lilith_uniform"
/obj/item/clothing/under/fluff/ana_issek_1 //suethecake: Ana Issek
name = "retired uniform"
desc = "A silken blouse paired with dark-colored slacks. It has the words 'Chief Investigator' embroidered into the shoulder bar."
icon = 'icons/obj/custom_items.dmi'
icon_state = "ana_uniform"
item_state = "ana_uniform"
_color = "ana_uniform"
/obj/item/clothing/under/fluff/olddressuniform //desiderium: Momiji Inubashiri
name = "retired dress uniform"
desc = "A retired Station Head of Staff uniform, phased out twenty years ago for the newer jumpsuit design, but still acceptable dress. Lovingly maintained."
icon = 'icons/obj/custom_items.dmi'
icon_state = "olddressuniform"
item_state = "olddressuniform"
_color = "olddressuniform"
/obj/item/clothing/under/rank/security/fluff/jeremy_wolf_1 //whitewolf41: Jeremy Wolf
name = "worn officer's uniform"
desc = "An old red security jumpsuit. Seems to have some slight modifications."
icon = 'icons/obj/custom_items.dmi'
icon_state = "jeremy_wolf_1"
_color = "jeremy_wolf_1"
/obj/item/clothing/under/fluff/tian_dress //phaux: Tian Yinhu
name = "purple dress"
desc = "A nicely tailored purple dress made for the taller woman."
icon = 'icons/obj/custom_items.dmi'
icon_state = "tian_dress"
item_state = "tian_dress"
_color = "tian_dress"
/obj/item/clothing/under/rank/bartender/fluff/classy //searif: Ara Al-Jazari
name = "classy bartender uniform"
desc = "A prim and proper uniform that looks very similar to a bartender's, the only differences being a red accessory, waistcoat and a rag hanging out of the back pocket."
icon = 'icons/obj/custom_items.dmi'
icon_state = "ara_bar_uniform"
item_state = "ara_bar_uniform"
_color = "ara_bar_uniform"
/obj/item/clothing/under/fluff/callum_suit //roaper: Callum Leamus
name = "knockoff suit"
desc = "A knockoff of a suit commonly worn by the upper class."
icon = 'icons/obj/custom_items.dmi'
icon_state = "callum_suit"
item_state = "callum_suit"
_color = "callum_suit"
/obj/item/clothing/under/fluff/solara_light_1 //bluefishie: Solara Born-In-Light
name = "Elaborate Purple Dress"
desc = "An expertly tailored dress, made out of fine fabrics. The interwoven necklace appears to be made out of gold, with three complicated symbols engraved in the front."
icon = 'icons/obj/custom_items.dmi'
icon_state = "solara_dress"
item_state = "solara_dress"
_color = "solara_dress"
/obj/item/clothing/under/psysuit/fluff/isaca_sirius_1 // Xilia: Isaca Sirius
name = "Isaca's suit"
desc = "Black, comfortable and nicely fitting suit. Made not to hinder the wearer in any way. Made of some exotic fabric. And some strange glowing jewel at the waist. Name labels says; Property of Isaca Sirius; The Seeder."
@@ -801,129 +161,10 @@
src.item_state = "[_color]"
usr.update_inv_w_uniform()
////// Wyatt's Ex-Commander Jumpsuit - RawrTaicho
/obj/item/clothing/under/fluff/wyatt_1
name = "ex-commander jumpsuit"
desc = "A standard Central Command Engineering Commander jumpsuit tailored to fight the wearer tightly. It has a Medal of Service pinned onto the left side of it."
icon = 'icons/obj/custom_items.dmi'
icon_state = "wyatt_uniform"
item_state = "wyatt_uniform"
_color = "wyatt_uniform"
//////////// Masks ////////////
/*
/obj/item/clothing/mask/fluff/flagmask //searif: Tsiokeriio Tarbell
name = "\improper First Nations facemask"
desc = "A simple cloth rag that bears the flag of the first nations."
icon = 'icons/obj/custom_items.dmi'
icon_state = "flagmask"
item_state = "flagmask"
flags = MASKCOVERSMOUTH
w_class = 2
gas_transfer_coefficient = 0.90
*/
/obj/item/clothing/mask/mara_kilpatrick_1 //staghorn: Mara Kilpatrick
name = "shamrock pendant"
desc = "A silver and emerald shamrock pendant. It has the initials \"M.K.\" engraved on the back."
icon = 'icons/obj/custom_items.dmi'
icon_state = "mara_kilpatrick_1"
w_class = 1
////// Small locket - Altair An-Nasaqan - Serithi
/obj/item/clothing/accessory/fluff/altair_locket
name = "small locket"
desc = "A small golden locket attached to an Ii'rka-reed string. Inside the locket is a holo-picture of a female Tajaran, and an inscription writtin in Siik'mas."
icon = 'icons/obj/custom_items.dmi'
icon_state = "altair_locket"
item_state = "altair_locket"
_color = "altair_locket"
slot_flags = 0
w_class = 1
slot_flags = SLOT_MASK
////// Silver locket - Konaa Hirano - Konaa_Hirano
/obj/item/clothing/accessory/fluff/konaa_hirano
name = "silver locket"
desc = "This oval shaped, argentium sterling silver locket hangs on an incredibly fine, refractive string, almost thin as hair and microweaved from links to a deceptive strength, of similar material. The edges are engraved very delicately with an elegant curving design, but overall the main is unmarked and smooth to the touch, leaving room for either remaining as a stolid piece or future alterations. There is an obvious internal place for a picture or lock of some sort, but even behind that is a very thin compartment unhinged with the pinch of a thumb and forefinger."
icon = 'icons/obj/custom_items.dmi'
icon_state = "konaahirano"
item_state = "konaahirano"
_color = "konaahirano"
slot_flags = 0
w_class = 1
slot_flags = SLOT_MASK
var/obj/item/held //Item inside locket.
/obj/item/clothing/accessory/fluff/konaa_hirano/attack_self(mob/user as mob)
if(held)
user << "You open [src] and [held] falls out."
held.loc = get_turf(user)
src.held = null
/obj/item/clothing/accessory/fluff/konaa_hirano/attackby(var/obj/item/O as obj, mob/user as mob, params)
if(istype(O,/obj/item/weapon/paper))
if(held)
usr << "[src] already has something inside it."
else
usr << "You slip [O] into [src]."
user.drop_item()
O.loc = src
src.held = O
return
..()
////// Medallion - Nasir Khayyam - Jamini
/obj/item/clothing/accessory/fluff/nasir_khayyam_1
name = "medallion"
desc = "This silvered medallion bears the symbol of the Hadii Clan of the Tajaran."
icon = 'icons/obj/custom_items.dmi'
icon_state = "nasir_khayyam_1"
w_class = 1
slot_flags = SLOT_MASK
////// Medallion - Lin Chang - Roland410
/obj/item/clothing/accessory/fluff/lin_chang_1
name = "shining black medallion"
desc = "A shiny black medallion made of something that looks like the Earth's obsidian, but it is harder than anything ever seen yet. On the front there seems to be a standing unathi chiseled in it, on the back the name of Lin Chang with the title of the Assassin Archmage."
icon = 'icons/obj/custom_items.dmi'
icon_state = "nasir_khayyam_1"
w_class = 1
slot_flags = SLOT_MASK
////// Emerald necklace - Ty Foster - Nega
/obj/item/clothing/mask/mara_kilpatrick_1
name = "emerald necklace"
desc = "A brass necklace with a green emerald placed at the end. It has a small inscription on the top of the chain, saying \'Foster\'"
icon = 'icons/obj/custom_items.dmi'
icon_state = "ty_foster"
w_class = 1
//////////// Shoes ////////////
/obj/item/clothing/shoes/magboots/fluff/susan_harris_1 //sniperyeti: Susan Harris
name = "Susan's Magboots"
desc = "A colorful pair of magboots with the name Susan Harris clearly written on the back."
icon = 'icons/obj/custom_items.dmi'
icon_state = "atmosmagboots0"
//////////// Sets ////////////
/*
/obj/item/clothing/suit/storage/labcoat/fluff/cdc_labcoat
name = "\improper CDC labcoat"
desc = "A standard-issue CDC labcoat that protects against minor chemical spills. It has the name \"Wiles\" sewn on to the breast pocket."
icon = 'icons/obj/custom_items.dmi'
icon_state = "labcoat_cdc_open"
*/
////// Short Sleeve Medical Outfit //erthilo: Farah Lants
/obj/item/clothing/under/rank/medical/fluff/short
@@ -939,29 +180,6 @@
icon = 'icons/obj/custom_items.dmi'
icon_state = "labcoat_red_open"
////// Retired Patrol Outfit //desiderium: Rook Maudlin
/obj/item/clothing/suit/storage/det_suit/fluff/retpolcoat
name = "retired colony patrolman's coat"
desc = "A clean, black nylon windbreaker with the words \"OUTER LIGHT POLICE\" embroidered in gold-dyed thread on the back. \"RETIRED\" is tastefully embroidered below in a smaller font."
icon = 'icons/obj/custom_items.dmi'
icon_state = "retpolcoat"
item_state = "retpolcoat"
_color = "retpolcoat"
/obj/item/clothing/head/det_hat/fluff/retpolcap
name = "retired colony patrolman's cap"
desc = "A clean and properly creased colony police cap. The badge is shined and polished, the word \"RETIRED\" engraved professionally under the words \"OUTER LIGHT POLICE.\""
icon = 'icons/obj/custom_items.dmi'
icon_state = "retpolcap"
/obj/item/clothing/under/det/fluff/retpoluniform
name = "retired colony patrolman's uniform"
desc = "A meticulously clean police uniform belonging to Precinct 31, Outer Light Colony. The word \"RETIRED\" is engraved tastefully and professionally in the badge below the number, 501."
icon = 'icons/obj/custom_items.dmi'
icon_state = "retpoluniform"
_color = "retpoluniform"
////// Blue and Bloody Set //deimosvezzati: Hiro Mezu
/obj/item/clothing/under/fluff/customblue // Personal jumpsuit (blue tie / belt buckle)
@@ -1019,27 +237,4 @@
_color = "noble_boot"
item_state = "noble_boot"
//////////// Weapons ////////////
///// Well-used baton - Oen'g Issek - Donofnyc3
/obj/item/weapon/melee/baton/fluff/oeng_baton
name = "well-used stun baton"
desc = "A stun baton used for incapacitating targets; there seems to be a bunch of tally marks set into the handle."
//////////// Weapons ////////////
+5 -1
View File
@@ -33,7 +33,11 @@
if (!available_recipes)
available_recipes = new
for (var/type in (typesof(/datum/recipe/candy)-/datum/recipe/candy))
available_recipes+= new type
var/datum/recipe/recipe = new type
if(recipe.result) // Ignore recipe subtypes that lack a result
available_recipes += recipe
else
del(recipe)
acceptable_items = new
acceptable_reagents = new
for (var/datum/recipe/candy/recipe in available_recipes)
+5 -1
View File
@@ -34,7 +34,11 @@
if (!available_recipes)
available_recipes = new
for (var/type in (typesof(/datum/recipe/grill)-/datum/recipe/grill))
available_recipes+= new type
var/datum/recipe/recipe = new type
if(recipe.result) // Ignore recipe subtypes that lack a result
available_recipes += recipe
else
del(recipe)
acceptable_items = new
acceptable_reagents = new
for (var/datum/recipe/grill/recipe in available_recipes)
+5 -1
View File
@@ -34,7 +34,11 @@
if (!available_recipes)
available_recipes = new
for (var/type in (typesof(/datum/recipe/oven)-/datum/recipe/oven))
available_recipes+= new type
var/datum/recipe/recipe = new type
if(recipe.result) // Ignore recipe subtypes that lack a result
available_recipes += recipe
else
del(recipe)
acceptable_items = new
acceptable_reagents = new
for (var/datum/recipe/oven/recipe in available_recipes)
+1 -1
View File
@@ -51,7 +51,7 @@
destroyed = 1
force_update()
if(source_atom && source_atom.light_sources) source_atom.light_sources -= src
if(top_atom) top_atom.light_sources -= src
if(top_atom && top_atom.light_sources) top_atom.light_sources -= src
/datum/light_source/proc/update(atom/new_top_atom)
if(new_top_atom && new_top_atom != top_atom)
+1 -1
View File
@@ -3,7 +3,7 @@
mouse_opacity = 0
simulated = 0
anchored = 1
flags = NOREACT
icon = LIGHTING_ICON
layer = LIGHTING_LAYER
invisibility = INVISIBILITY_LIGHTING
+1 -1
View File
@@ -422,7 +422,7 @@
playsound(src,'sound/weapons/resonator_blast.ogg',50,1)
if(creator)
for(var/mob/living/L in src.loc)
add_logs(creator, L, "used a resonator field on", object="resonator")
add_logs(L, creator, "used a resonator field on", object="resonator")
L << "<span class='danger'>The [src.name] ruptured with you in it!</span>"
L.adjustBruteLoss(resonance_damage)
else
+1 -1
View File
@@ -82,7 +82,7 @@
/obj/item/weapon/storage/belt/soulstone=1,
/obj/item/trash/candle=3,
/obj/item/weapon/dice=3,
/obj/item/weapon/staff=2,
/obj/item/weapon/twohanded/staff=2,
/obj/effect/decal/cleanable/dirt=3,
)
+20
View File
@@ -326,6 +326,26 @@
key = "0"
syllables = list ("honk","squeak","bonk","toot","narf","zub","wee","wub","norf")
/datum/language/wryn
name = "Wryn Hivemind"
desc = "Wryn have the strange ability to commune over a psychic hivemind."
speech_verb = "chitters"
ask_verb = "chitters"
exclaim_verb = "chitters"
colour = "alien"
key = "y"
flags = RESTRICTED | HIVEMIND
/datum/language/wryn/check_special_condition(var/mob/other)
var/mob/living/carbon/M = other
if(!istype(M))
return 1
if(locate(/obj/item/organ/wryn/hivenode) in M.internal_organs)
return 1
return 0
/datum/language/xenocommon
name = "Xenomorph"
colour = "alien"
@@ -151,7 +151,7 @@
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
add_logs(M, src, "attacked", admin=0)
add_logs(src, M, "attacked", admin=0)
updatehealth()
@@ -22,6 +22,9 @@
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/organ/brain/crystal ))
user << "<span class='warning'> This brain is too malformed to be able to use with the [src].</span>"
return
if(istype(O,/obj/item/organ/brain) && !brainmob) //Time to stick a brain in it --NEO
if(!O:brainmob)
user << "\red You aren't sure where this brain came from, but you're pretty sure it's a useless brain."
+14 -9
View File
@@ -110,6 +110,14 @@
h_style = "Bald"
..(new_loc, "Golem")
/mob/living/carbon/human/wryn/New(var/new_loc)
h_style = "Antennae"
..(new_loc, "Wryn")
/mob/living/carbon/human/nucleation/New(var/new_loc)
h_style = "Nucleation Crystals"
..(new_loc, "Nucleation")
/mob/living/carbon/human/Bump(atom/movable/AM as mob|obj, yes)
if ((!( yes ) || now_pushing))
return
@@ -659,13 +667,16 @@
/mob/living/carbon/human/Topic(href, href_list)
var/pickpocket = 0
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
var/obj/item/clothing/gloves/G = H.gloves
if(G)
pickpocket = G.pickpocket
if(!usr.stat && usr.canmove && !usr.restrained() && in_range(src, usr))
// if looting pockets with gloves, do it quietly
if(href_list["pockets"])
if(usr:gloves)
var/obj/item/clothing/gloves/G = usr:gloves
pickpocket = G.pickpocket
var/pocket_side = href_list["pockets"]
var/pocket_id = (pocket_side == "right" ? slot_r_store : slot_l_store)
var/obj/item/pocket_item = (pocket_id == slot_r_store ? src.r_store : src.l_store)
@@ -704,9 +715,6 @@
if(href_list["item"])
var/itemTarget = href_list["item"]
if(itemTarget == "id")
if(usr:gloves)
var/obj/item/clothing/gloves/G = usr:gloves
pickpocket = G.pickpocket
if(pickpocket)
var/obj/item/worn_id = src.wear_id
var/obj/item/place_item = usr.get_active_hand() // Item to place in the pocket, if it's empty
@@ -751,9 +759,6 @@
if ((href_list["item"] && !( usr.stat ) && usr.canmove && !( usr.restrained() ) && in_range(src, usr) && ticker)) //if game hasn't started, can't make an equip_e
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
if(ishuman(usr) && usr:gloves)
var/obj/item/clothing/gloves/G = usr:gloves
pickpocket = G.pickpocket
if(!pickpocket || href_list["item"] != "id") // Stop the non-stealthy verbose strip if pickpocketing id.
O.source = usr
O.target = src
@@ -55,6 +55,8 @@
var/datum/martial_art/attacker_style = M.martial_art
species.handle_attack_hand(src,M)
switch(M.a_intent)
if("help")
if(health >= config.health_threshold_crit)
@@ -10,6 +10,8 @@
if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
if(flying) return -1
if(embedded_flag)
handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
@@ -77,6 +79,11 @@
//Can we act
if(restrained()) return 0
//Are we flying?
if(flying)
inertia_dir = 0
return 1
//Do we have a working jetpack
if(istype(back, /obj/item/weapon/tank/jetpack))
var/obj/item/weapon/tank/jetpack/J = back
+18 -1
View File
@@ -264,6 +264,16 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
gene.OnMobLife(src)
if (radiation)
if((locate(src.internal_organs_by_name["resonant crystal"]) in src.internal_organs))
var/rads = radiation/25
radiation -= rads
radiation -= 0.1
reagents.add_reagent("radium", rads/10)
if( prob(10) )
src << "\blue You feel relaxed."
return
if (radiation > 100)
radiation = 100
if(!(species.flags & RAD_ABSORB))
@@ -276,7 +286,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
radiation = 0
else
if(species.flags & RAD_ABSORB)
var/rads = radiation/25
radiation -= rads
@@ -1034,6 +1043,14 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(jitteriness)
do_jitter_animation(jitteriness)
//Flying
if(flying)
spawn()
animate(src, pixel_y = pixel_y + 5 , time = 10, loop = 1, easing = SINE_EASING)
spawn(10)
if(flying)
animate(src, pixel_y = pixel_y - 5, time = 10, loop = 1, easing = SINE_EASING)
//Other
handle_statuses()
@@ -0,0 +1,110 @@
/datum/species/wryn
name = "Wryn"
icobase = 'icons/mob/human_races/r_wryn.dmi'
deform = 'icons/mob/human_races/r_wryn.dmi'
language = "Wryn Hivemind"
tail = "wryntail"
unarmed_type = /datum/unarmed_attack/punch/weak
primitive = /mob/living/carbon/monkey/wryn
darksight = 3
slowdown = 1
warning_low_pressure = -300
hazard_low_pressure = 1
blurb = "The wryn (r-in, singular r-in) are a humanoid race that possess many bee-like features. Originating from Alveare they \
have adapted extremely well to cold environments though have lost most of their muscles over generations.\
In order to communicate and work with multi-species crew Wryn were forced to take on names. Wryn have tended towards using only \
first names, these names are generally simplistic and easy to pronounce. Wryn have rarely had to communicate using their mouths, \
so in order to integrate with the multi-species crew they have been taught broken sol?."
cold_level_1 = 200 //Default 260 - Lower is better
cold_level_2 = 150 //Default 200
cold_level_3 = 115 //Default 120
heat_level_1 = 300 //Default 360 - Higher is better
heat_level_2 = 310 //Default 400
heat_level_3 = 317 //Default 1000
body_temperature = 286
has_organ = list(
"heart" = /obj/item/organ/heart,
"brain" = /obj/item/organ/brain,
"eyes" = /obj/item/organ/eyes,
"appendix" = /obj/item/organ/appendix,
"antennae" = /obj/item/organ/wryn/hivenode
)
flags = IS_WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | NO_BREATHE | HAS_SKIN_COLOR | NO_SCAN | NO_SCAN | HIVEMIND
base_color = "#704300"
flesh_color = "#704300"
blood_color = "#FFFF99"
/datum/species/wryn/handle_death(var/mob/living/carbon/human/H)
for(var/mob/living/carbon/C in living_mob_list)
if(locate(/obj/item/organ/wryn/hivenode) in C.internal_organs)
C << "<span class='danger'><B>Your antennae tingle as you are overcome with pain...</B></span>"
C << "<span class='danger'>It feels like part of you has died.</span>"
/datum/species/wryn/handle_attack_hand(var/mob/living/carbon/human/H, var/mob/living/carbon/human/M)
if(M.a_intent == "harm")
if(H.handcuffed)
if(!(locate(H.internal_organs_by_name["antennae"]) in H.internal_organs)) return
var/turf/p_loc = M.loc
var/turf/p_loc_m = H.loc
M.visible_message("<span class='notice'>[M] begins to violently pull off [H]'s antennae.</span>")
H << "<span class='danger'><B>[M] grips your antennae and starts violently pulling!<B></span>"
do_after(H, 250)
if(p_loc == M.loc && p_loc_m == H.loc)
del(H.internal_organs_by_name["antennae"])
H.remove_language("Wryn Hivemind")
new /obj/item/organ/wryn/hivenode(M.loc)
M << "<span class='notice'>You hear a loud crunch as you mercilessly pull off [H]'s antennae.</span>"
H << "<span class='danger'><B>You hear a loud crunch as your antennae is ripped off your head by [M].</span></B>"
H << "<span class='danger'><span class='danger'><B>It's so quiet...</B></span>"
H.h_style = "Bald"
H.update_hair()
M.attack_log += text("\[[time_stamp()]\] <font color='red'>removed antennae [H.name] ([H.ckey])</font>")
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had their antennae removed by [M.name] ([M.ckey])</font>")
msg_admin_attack("[key_name(M)] removed [key_name(H)]'s antennae")
return 0
/datum/species/nucleation
name = "Nucleation"
icobase = 'icons/mob/human_races/r_nucleation.dmi'
unarmed_type = /datum/unarmed_attack/punch
blurb = "A sub-race of unforunates who have been exposed to too much supermatter radiation. As a result, \
supermatter crystal clusters have begun to grow across their bodies. Research to find a cure for this ailment \
has been slow, and so this is a common fate for veteran engineers. The supermatter crystals produce oxygen, \
negating the need for the individual to breath. Their massive change in biology, however, renders most medicines \
obselete. Ionizing radiation seems to cause resonance in some of their crystals, which seems to encourage regeneration \
and produces a calming effect on the individual. Nucleations are highly stigmatized, and are treated much in the same \
way as lepers were back on Earth."
language = "Sol Common"
burn_mod = 4 // holy shite, poor guys wont survive half a second cooking smores
brute_mod = 2 // damn, double wham, double dam
flags = IS_WHITELISTED | NO_BREATHE | NO_BLOOD | NO_PAIN | HAS_LIPS | NO_SCAN
has_organ = list(
"heart" = /obj/item/organ/heart,
"crystalized brain" = /obj/item/organ/brain/crystal,
"eyes" = /obj/item/organ/eyes/luminescent_crystal,
"strange crystal" = /obj/item/organ/nucleation/strange_crystal,
"resonant crystal" = /obj/item/organ/nucleation/resonant_crystal
)
/datum/species/nucleation/handle_post_spawn(var/mob/living/carbon/human/H)
H.light_color = "#1C1C00"
H.set_light(2)
return ..()
/datum/species/nucleation/handle_death(var/mob/living/carbon/human/H)
var/turf/T = get_turf(H)
H.visible_message("\red[H]'s body explodes, leaving behind a pile of microscopic crystals!")
supermatter_delamination(T, 2, 0, 0) // Create a small supermatter burst upon death
new /obj/item/weapon/shard/supermatter( T )
del(H)
@@ -38,6 +38,13 @@
icon_state = "stokkey1"
uni_append = list(0x044,0xC5D) // 044C5D
/mob/living/carbon/monkey/wryn
name = "lajavi"
voice_name = "lajavi"
speak_emote = list("hisses")
icon_state = "wrynkey1"
uni_append = list(0x022,0xF5D) // 022F5D
/mob/living/carbon/monkey/New()
var/datum/reagents/R = new/datum/reagents(330)
reagents = R
@@ -301,6 +301,8 @@
/datum/species/proc/handle_death(var/mob/living/carbon/human/H) //Handles any species-specific death events (such as dionaea nymph spawns).
return
/datum/species/proc/handle_attack_hand(var/mob/living/carbon/human/H, var/mob/living/carbon/human/M) //Handles any species-specific attackhand events.
return
/datum/species/proc/say_filter(mob/M, message, datum/language/speaking)
return message
@@ -745,6 +747,10 @@
/datum/unarmed_attack/punch
attack_verb = list("punch")
/datum/unarmed_attack/punch/weak
attack_verb = list("flail")
damage = 1
/datum/unarmed_attack/diona
attack_verb = list("lash", "bludgeon")
+1 -1
View File
@@ -362,7 +362,7 @@
user << "<span class='notice'>You already grabbed [src].</span>"
return
add_logs(user, src, "grabbed", addition="passively")
add_logs(src, user, "grabbed", addition="passively")
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(user, src)
if(buckled)
+2 -1
View File
@@ -1,4 +1,5 @@
var/obj/nano_module/crew_monitor/crew_monitor
/mob/living/silicon/ai
var/obj/nano_module/crew_monitor/crew_monitor
/mob/living/silicon/ai/proc/init_subsystems()
crew_monitor = new(src)
+3 -2
View File
@@ -457,8 +457,9 @@
if(istype(T)) T.visible_message("<b>[src]</b> neatly folds inwards, compacting down to a rectangular card.")
src.stop_pulling()
src.client.perspective = EYE_PERSPECTIVE
src.client.eye = card
if(src.client)
src.client.perspective = EYE_PERSPECTIVE
src.client.eye = card
//This seems redundant but not including the forced loc setting messes the behavior up.
src.loc = card
+1
View File
@@ -102,6 +102,7 @@
var/drowsyness = 0.0//Carbon
var/dizziness = 0//Carbon
var/jitteriness = 0//Carbon
var/flying = 0
var/charges = 0.0
var/nutrition = 400.0//Carbon
+7 -6
View File
@@ -429,13 +429,14 @@ var/list/intents = list("help","disarm","grab","harm")
src << "\blue You are now [resting ? "resting" : "getting up"]"
/proc/get_multitool(mob/user as mob)
// Check distance for those that need it.
if(!isAI(user))
if(!in_range(user, src))
return null
// Get tool
var/obj/item/device/multitool/P = user.get_multitool()
var/obj/item/device/multitool/P
if(isrobot(user) || ishuman(user))
P = user.get_active_hand()
else if(isAI(user))
var/mob/living/silicon/ai/AI=user
P = AI.aiMulti
if(!istype(P))
return null
return P
@@ -689,6 +689,51 @@
icon_state = "vox_keetquills"
species_allowed = list("Vox")
// Apollo-specific
//Wryn antennae
wry_antennae_default
name = "Antennae"
icon_state = "wryn_antennae"
species_allowed = list("Wryn")
//Nucleation "hairstyles"
nuc_crystals
name = "Nucleation Crystals"
icon_state = "nuc_crystal"
species_allowed = list("Nucleation")
nuc_betaburns
name = "Nucleation Beta Burns"
icon_state = "nuc_betaburns"
species_allowed = list("Nucleation")
nuc_fallout
name = "Nucleation Fallout"
icon_state = "nuc_fallout"
species_allowed = list("Nucleation")
nuc_frission
name = "Nucleation Frission"
icon_state = "nuc_frission"
species_allowed = list("Nucleation")
nuc_radical
name = "Nucleation Free Radical"
icon_state = "nuc_radical"
species_allowed = list("Nucleation")
nuc_gammaray
name = "Nucleation Gamma Ray"
icon_state = "nuc_gammaray"
species_allowed = list("Nucleation")
nuc_neutron
name = "Nucleation Neutron Bomb"
icon_state = "nuc_neutron"
species_allowed = list("Nucleation")
/datum/sprite_accessory/facial_hair
+10 -3
View File
@@ -26,7 +26,7 @@ json_reader
src.json = json
. = new/list()
src.i = 1
while(src.i <= lentext(json))
while(src.i <= length(json))
var/char = get_char()
if(is_whitespace(char))
i++
@@ -44,7 +44,7 @@ json_reader
read_word()
var/val = ""
while(i <= lentext(json))
while(i <= length(json))
var/char = get_char()
if(is_whitespace(char) || symbols.Find(char))
i-- // let scanner handle this character
@@ -56,7 +56,7 @@ json_reader
var
escape = FALSE
val = ""
while(++i <= lentext(json))
while(++i <= length(json))
var/char = get_char()
if(escape)
escape=FALSE // WHICH STUPID ASSHOLE FORGOT THIS - N3X
@@ -101,6 +101,13 @@ json_reader
return 48 <= c && c <= 57 || char == "+" || char == "-"
// parser
ReadArray(list/tokens)
src.tokens = tokens
i = 1
return read_array()
// parser
ReadObject(list/tokens)
src.tokens = tokens
+13 -2
View File
@@ -5,8 +5,19 @@ n_Json v11.3.21
proc
json2list(json)
var/static/json_reader/_jsonr = new()
return _jsonr.ReadObject(_jsonr.ScanJson(json))
// N3X: Array support.
if(dd_hasprefix(json,"\["))
return _jsonr.ReadArray(_jsonr.ScanJson(json))
else
return _jsonr.ReadObject(_jsonr.ScanJson(json))
list2json(list/L, var/cached_data = null)
var/static/json_writer/_jsonw = new()
return _jsonw.WriteObject(L, cached_data)
// Detect if it's just a list of things, or an associative list
// (Used to just assume associative, which broke things.)
if(_jsonw.is_associative(L))
return _jsonw.WriteObject(L, cached_data)
else
return _jsonw.write_array(L)
+5 -4
View File
@@ -77,10 +77,11 @@ var/list/organ_cache = list()
owner = null
if(!owner)
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in reagents.reagent_list
if(B && prob(40))
reagents.remove_reagent("blood",0.1)
blood_splatter(src,B,1)
if(reagents)
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in reagents.reagent_list
if(B && prob(40))
reagents.remove_reagent("blood",0.1)
blood_splatter(src,B,1)
if(prob(5)) //How about we not have organs become completely useless less than a minute after removal?
damage += 1
+48
View File
@@ -336,3 +336,51 @@
name = "vox cortical stack"
/obj/item/organ/stack/vox/stack
//WRYN ORGAN
/obj/item/organ/wryn/hivenode
name = "antennae"
parent_organ = "head"
/obj/item/organ/wryn/hivenode
name = "antennae"
organ_tag = "antennae"
icon = 'icons/mob/human_races/r_wryn.dmi'
icon_state = "antennae"
//NUCLEATION ORGAN
/obj/item/organ/nucleation
name = "nucleation organ"
icon = 'icons/obj/surgery.dmi'
desc = "A crystalized human organ. /red It has a strangely iridescent glow."
/obj/item/organ/nucleation/resonant_crystal
name = "resonant crystal"
icon_state = "resonant-crystal"
organ_tag = "resonant crystal"
parent_organ = "head"
/obj/item/organ/nucleation/strange_crystal
name = "strange crystal"
icon_state = "strange-crystal"
organ_tag = "strange crystal"
parent_organ = "chest"
/obj/item/organ/eyes/luminescent_crystal
name = "luminescent eyes"
icon_state = "crystal-eyes"
organ_tag = "luminescent eyes"
light_color = "#1C1C00"
parent_organ = "head"
New()
set_light(2)
/obj/item/organ/brain/crystal
name = "crystalized brain"
icon_state = "crystal-brain"
organ_tag = "crystalized brain"
+15
View File
@@ -47,6 +47,21 @@
icon_state = "pen"
colour = "white"
/obj/item/weapon/pen/multi //spaceman96: Trenna Seber
name = "multicolor pen"
desc = "It's a cool looking pen. Lots of colors!"
/obj/item/weapon/pen/fancy
name = "fancy pen"
desc = "A fancy metal pen. It uses blue ink. An inscription on one side reads,\"L.L. - L.R.\""
icon = 'icons/obj/custom_items.dmi'
icon_state = "fancypen"
/obj/item/weapon/pen/gold
name = "Gilded Pen"
desc = "A golden pen that is gilded with a meager amount of gold material. The word 'Nanotrasen' is etched on the clip of the pen."
icon = 'icons/obj/custom_items.dmi'
icon_state = "eugene_pen"
/obj/item/weapon/pen/attack(mob/living/M, mob/user)
if(!istype(M))
+49
View File
@@ -21,6 +21,17 @@
var/state = 0
var/locked = 0
var/frequency = 0
var/id_tag = null
var/datum/radio_frequency/radio_connection
//Radio remote control
/obj/machinery/power/emitter/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
if(frequency)
radio_connection = radio_controller.add_object(src, frequency, RADIO_ATMOSIA)
/obj/machinery/power/emitter/verb/rotate()
set name = "Rotate"
@@ -38,6 +49,41 @@
if(state == 2 && anchored)
connect_to_network()
src.directwired = 1
if(frequency)
set_frequency(frequency)
/obj/machinery/power/emitter/multitool_menu(var/mob/user,var/obj/item/device/multitool/P)
return {"
<ul>
<li><b>Frequency:</b> <a href="?src=\ref[src];set_freq=-1">[format_frequency(frequency)] GHz</a> (<a href="?src=\ref[src];set_freq=[1439]">Reset</a>)</li>
<li>[format_tag("ID Tag","id_tag","set_id")]</a></li>
</ul>
"}
/obj/machinery/power/emitter/receive_signal(datum/signal/signal)
if(!signal.data["tag"] || (signal.data["tag"] != id_tag))
return 0
var/on=0
switch(signal.data["command"])
if("on")
on=1
if("off")
on=0
if("set")
on = signal.data["state"] > 0
if("toggle")
on = !active
if(anchored && state == 2 && on != active)
active=on
var/statestr=on?"on":"off"
// Spammy message_admins("Emitter turned [statestr] by radio signal ([signal.data["command"]] @ [frequency]) in [formatJumpTo(src)]",0,1)
log_game("Emitter turned [statestr] by radio signal ([signal.data["command"]] @ [frequency]) in ([x],[y],[z]) AAC prints: [list2text(signal.data["hiddenprints"])]")
investigate_log("turned <font color='orange'>[statestr]</font> by radio signal ([signal.data["command"]] @ [frequency]) AAC prints: [list2text(signal.data["hiddenprints"])]","singulo")
update_icon()
/obj/machinery/power/emitter/Destroy()
msg_admin_attack("Emitter deleted at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
@@ -145,6 +191,9 @@
/obj/machinery/power/emitter/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/device/multitool))
update_multitool_menu(user)
return 1
if(istype(W, /obj/item/weapon/wrench))
if(active)
+1 -1
View File
@@ -488,7 +488,7 @@ datum
R.holder = src
R.volume = amount
// SetViruses(R, data) // Includes setting data
R.data = data
if(data) R.data = data
//debug
//world << "Adding data"
//for(var/D in R.data)
+1 -1
View File
@@ -106,7 +106,7 @@ datum/reagent/charcoal
id = "charcoal"
description = "Activated charcoal helps to absorb toxins."
reagent_state = LIQUID
color = "#C8A5DC"
color = "#000000"
datum/reagent/charcoal/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -372,3 +372,30 @@
desc = "A cup with the british flag emblazoned on it."
icon_state = "britcup"
volume = 30
/obj/item/weapon/reagent_containers/food/drinks/flask/hand_made
name = "handmade flask"
desc = "A wooden flask with a silver lid and bottom. It has a matte, dark blue paint on it with the initials \"W.H.\" etched in black."
icon = 'icons/obj/custom_items.dmi'
icon_state = "williamhackett"
/obj/item/weapon/reagent_containers/food/drinks/flask/thermos
name = "vintage thermos"
desc = "An older thermos with a faint shine."
icon = 'icons/obj/custom_items.dmi'
icon_state = "johann_erzatz_1"
volume = 50
/obj/item/weapon/reagent_containers/food/drinks/flask/shiny
name = "shiny flask"
desc = "A shiny metal flask. It appears to have a Greek symbol inscribed on it."
icon = 'icons/obj/custom_items.dmi'
icon_state = "shinyflask"
volume = 50
/obj/item/weapon/reagent_containers/food/drinks/flask/lithium
name = "Lithium Flask"
desc = "A flask with a Lithium Atom symbol on it."
icon = 'icons/obj/custom_items.dmi'
icon_state = "lithiumflask"
volume = 50
-1
View File
@@ -60,4 +60,3 @@ other types of metals and chemistry for reagents).
new_reliability = Clamp(new_reliability, reliability, 100)
reliability = new_reliability
return
@@ -340,4 +340,31 @@
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/teleporter
category = list("Computer Boards")
category = list("Computer Boards")
datum/design/GAC
name = "Circuit Design (General Air Control)"
desc = "Allows for the construction of circuit boards used to build a General Air Control Computer."
id = "GAC"
req_tech = list("programming" = 3, "magnets" = 2)
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = "/obj/item/weapon/circtuiboard/air_management"
datum/design/tank_control
name = "Circuit Design (Large Tank Control)"
desc = "Allows for the construction of circuit boards used to build a Large Tank Control Computer."
id = "tankcontrol"
req_tech = list("programming" = 3, "magnets" = 2)
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = "/obj/item/weapon/circtuiboard/general_air_control/large_tank_control"
datum/design/AAC
name = "Circuit Design (Atmospheric Automations Console)"
desc = "Allows for the construction of circuit boards used to build an Atmospheric Autmations Console."
id = "AAC"
req_tech = list("programming" = 4, "magnets" = 2)
build_type = IMPRINTER
materials = list("$glass" = 1000, "sacid" = 20)
build_path = "/obj/item/weapon/circtuiboard/general_air_control/atmos_automation"
+1 -1
View File
@@ -34,7 +34,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
/obj/machinery/computer/rdconsole
name = "R&D Console"
icon_state = "rdcomp"
light_color = "#a97faa"
light_color = LIGHT_COLOR_FADEDPURPLE
circuit = /obj/item/weapon/circuitboard/rdconsole
var/datum/research/files //Stores all the collected research data.
var/obj/item/weapon/disk/tech_disk/t_disk = null //Stores the technology disk.
+1 -1
View File
@@ -181,7 +181,7 @@
/obj/machinery/computer/rdservercontrol
name = "R&D Server Controller"
icon_state = "rdcomp"
light_color = "#a96faa"
light_color = LIGHT_COLOR_FADEDPURPLE
circuit = /obj/item/weapon/circuitboard/rdservercontrol
var/screen = 0
var/obj/machinery/r_n_d/server/temp_server
+1 -1
View File
@@ -3,7 +3,7 @@
req_access = list()
shuttle_tag = "White Ship"
circuit = "/obj/item/weapon/circuitboard/white_ship"
light_color = "#CC0000"
light_color = LIGHT_COLOR_DARKRED
/obj/machinery/computer/shuttle_control/multi/whiteship/attack_ai(user as mob)
user << "\red Access Denied."
+246 -123
View File
@@ -1,23 +1,35 @@
#define NITROGEN_RETARDATION_FACTOR 4 //Higher == N2 slows reaction more
#define THERMAL_RELEASE_MODIFIER 750 //Higher == more heat released during reaction
#define PLASMA_RELEASE_MODIFIER 1500 //Higher == less plasma released by reaction
#define OXYGEN_RELEASE_MODIFIER 1500 //Higher == less oxygen released at high temperature/power
#define REACTION_POWER_MODIFIER 1.1 //Higher == more overall power
#define NITROGEN_RETARDATION_FACTOR 0.15 //Higher == N2 slows reaction more
#define THERMAL_RELEASE_MODIFIER 750 //Higher == more heat released during reaction
#define PLASMA_RELEASE_MODIFIER 1500 //Higher == less plasma released by reaction
#define OXYGEN_RELEASE_MODIFIER 1500 //Higher == less oxygen released at high temperature/power
#define REACTION_POWER_MODIFIER 1.1 //Higher == more overall power
/*
How to tweak the SM
POWER_FACTOR directly controls how much power the SM puts out at a given level of excitation (power var). Making this lower means you have to work the SM harder to get the same amount of power.
CRITICAL_TEMPERATURE The temperature at which the SM starts taking damage.
CHARGING_FACTOR Controls how much emitter shots excite the SM.
DAMAGE_RATE_LIMIT Controls the maximum rate at which the SM will take damage due to high temperatures.
*/
//Controls how much power is produced by each collector in range - this is the main parameter for tweaking SM balance, as it basically controls how the power variable relates to the rest of the game.
#define POWER_FACTOR 0.35 //Obtained from testing. Aiming to make the ideal running output (600 kW) run the SM to ~85% of the safety level.
#define CHARGING_FACTOR 0.55
#define DAMAGE_RATE_LIMIT 5 //damage rate cap at power = 900, scales linearly with power
#define POWER_FACTOR 1.0
#define DECAY_FACTOR 700 //Affects how fast the supermatter power decays
#define CRITICAL_TEMPERATURE 800 //K
#define CHARGING_FACTOR 0.05
#define DAMAGE_RATE_LIMIT 3 //damage rate cap at power = 300, scales linearly with power
//These would be what you would get at point blank, decreases with distance
#define DETONATION_RADS 200
#define DETONATION_HALLUCINATION 600
#define TRANSFORM_DISTANCE_MOD 2 // Size/this is maximum distance from SM during burst for transformation to Nucleation
#define WARNING_DELAY 30 //seconds between warnings.
#define WARNING_DELAY 30 //seconds between warnings.
/obj/machinery/power/supermatter
name = "Supermatter"
@@ -35,6 +47,7 @@
var/damage = 0
var/damage_archived = 0
var/safe_alert = "Crystaline hyperstructure returning to safe operating levels."
var/safe_warned = 0
var/warning_point = 100
var/warning_alert = "Danger! Crystal hyperstructure instability!"
var/emergency_point = 700
@@ -47,15 +60,20 @@
var/grav_pulling = 0
var/pull_radius = 14
// Time in ticks between delamination ('exploding') and exploding (as in the actual boom)
var/pull_time = 100
var/explosion_power = 8
var/emergency_issued = 0
var/explosion_power = 8
// Time in 1/10th of seconds since the last sent warning
var/lastwarning = 0
// This stops spawning redundand explosions. Also incidentally makes supermatter unexplodable if set to 1.
var/exploded = 0
var/lastwarning = 0 // Time in 1/10th of seconds since the last sent warning
var/power = 0
var/oxygen = 0 // Moving this up here for easier debugging.
var/oxygen = 0
//Temporary values so that we can optimize this
//How much the bullets damage should be multiplied by when it is added to the internal variables
@@ -67,21 +85,7 @@
var/obj/item/device/radio/radio
shard //Small subtype, less efficient and more sensitive, but less boom.
name = "Supermatter Shard"
desc = "A strangely translucent and iridescent crystal that looks like it used to be part of a larger structure. \red You get headaches just from looking at it."
icon_state = "darkmatter_shard"
base_icon_state = "darkmatter_shard"
warning_point = 50
emergency_point = 500
explosion_point = 900
gasefficency = 0.125
pull_radius = 5
explosion_power = 3 //3,6,9,12? Or is that too small?
var/debug = 0
/obj/machinery/power/supermatter/New()
. = ..()
@@ -93,17 +97,46 @@
. = ..()
/obj/machinery/power/supermatter/proc/explode()
message_admins("Supermatter exploded at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Supermatter exploded at ([x],[y],[z])")
anchored = 1
grav_pulling = 1
spawn(100)
explosion(get_turf(src), explosion_power, explosion_power * 2, explosion_power * 3, explosion_power * 4, 1)
exploded = 1
spawn(pull_time)
var/turf/epicenter = get_turf(src)
explosion(epicenter, explosion_power, explosion_power*2, explosion_power*3, explosion_power*4, 1)
supermatter_delamination( epicenter, explosion_power*4, 1 )
del src
return
//Changes color and luminosity of the light to these values if they were not already set
//Changes color and light_range of the light to these values if they were not already set
/obj/machinery/power/supermatter/proc/shift_light(var/lum, var/clr)
if(lum != light_range || clr != light_color)
set_light(lum, l_color = clr)
if(light_color != clr)
light_color = clr
if(light_range != lum)
set_light(lum)
/obj/machinery/power/supermatter/proc/announce_warning()
var/integrity = damage / explosion_point
integrity = round(100 - integrity * 100)
integrity = integrity < 0 ? 0 : integrity
var/alert_msg = " Integrity at [integrity]%"
if(damage > emergency_point)
alert_msg = emergency_alert + alert_msg
lastwarning = world.timeofday - WARNING_DELAY * 4
else if(damage >= damage_archived) // The damage is still going up
safe_warned = 0
alert_msg = warning_alert + alert_msg
lastwarning = world.timeofday
else if(!safe_warned)
safe_warned = 1 // We are safe, warn only once
alert_msg = safe_alert
lastwarning = world.timeofday
else
alert_msg = null
if(alert_msg)
radio.autosay(alert_msg, "Supermatter Monitor")
/obj/machinery/power/supermatter/process()
@@ -115,105 +148,85 @@
if(!istype(L)) //We are in a crate or somewhere that isn't turf, if we return to turf resume processing but for now.
return //Yeah just stop.
if(istype(L, /turf/space)) // Stop processing this stuff if we've been ejected.
return
if(damage > warning_point) // while the core is still damaged and it's still worth noting its status
shift_light(5, warning_color)
if((world.timeofday - lastwarning) / 10 >= WARNING_DELAY)
var/stability = num2text(round((damage / explosion_point) * 100))
if(damage > emergency_point)
shift_light(7, emergency_color)
radio.autosay(addtext(emergency_alert, " Instability: ",stability,"%"), "Supermatter Monitor")
lastwarning = world.timeofday
else if(damage >= damage_archived) // The damage is still going up
radio.autosay(addtext(warning_alert," Instability: ",stability,"%"), "Supermatter Monitor")
lastwarning = world.timeofday - 150
else // Phew, we're safe
radio.autosay(safe_alert, "Supermatter Monitor")
lastwarning = world.timeofday
if(damage > explosion_point)
for(var/mob/living/mob in living_mob_list)
if(loc.z == mob.loc.z)
if(istype(mob, /mob/living/carbon/human))
//Hilariously enough, running into a closet should make you get hit the hardest.
var/mob/living/carbon/human/H = mob
H.hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)) ) )
var/rads = DETONATION_RADS * sqrt( 1 / (get_dist(mob, src) + 1) )
mob.apply_effect(rads, IRRADIATE)
if(damage > explosion_point)
if(!exploded)
if(!istype(L, /turf/space))
announce_warning()
explode()
else if(damage > warning_point) // while the core is still damaged and it's still worth noting its status
shift_light(5, warning_color)
if(damage > emergency_point)
shift_light(7, emergency_color)
if(!istype(L, /turf/space) && (world.timeofday - lastwarning) >= WARNING_DELAY * 10)
announce_warning()
else
shift_light(4,initial(light_color))
if(grav_pulling)
supermatter_pull()
//Ok, get the air from the turf
var/datum/gas_mixture/env = L.return_air()
//Ok, get the air from the turf
var/datum/gas_mixture/removed = null
var/datum/gas_mixture/env = null
//Remove gas from surrounding area
var/datum/gas_mixture/removed = env.remove(gasefficency * env.total_moles())
//ensure that damage doesn't increase too quickly due to super high temperatures resulting from no coolant, for example. We dont want the SM exploding before anyone can react.
//We want the cap to scale linearly with power (and explosion_point). Let's aim for a cap of 5 at power = 300 (based on testing, equals roughly 5% per SM alert announcement).
var/damage_inc_limit = (power/300)*(explosion_point/1000)*DAMAGE_RATE_LIMIT
if(!removed || !removed.total_moles())
damage += max((power-1600)/10, 0)
power = min(power, 1600)
return 1
if(!istype(L, /turf/space))
env = L.return_air()
removed = env.remove(gasefficency * env.total_moles()) //Remove gas from surrounding area
damage_archived = damage
damage = max( damage + ( (removed.temperature - 800) / 150 ) , 0 )
//Ok, 100% oxygen atmosphere = best reaction
//Maxes out at 100% oxygen pressure
oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / MOLES_CELLSTANDARD, 1), 0)
var/temp_factor = 50
if(oxygen > 0.8)
// with a perfect gas mix, make the power less based on heat
icon_state = "[base_icon_state]_glow"
if(!env || !removed || !removed.total_moles())
damage += max((power - 15*POWER_FACTOR)/10, 0)
else if (grav_pulling) //If supermatter is detonating, remove all air from the zone
env.remove(env.total_moles())
else
// in normal mode, base the produced energy around the heat
temp_factor = 30
icon_state = base_icon_state
damage_archived = damage
power = max( (removed.temperature * temp_factor / T0C) * oxygen + power, 0) //Total laser power plus an overload
damage = max( damage + min( ( (removed.temperature - CRITICAL_TEMPERATURE) / 150 ), damage_inc_limit ) , 0 )
//Ok, 100% oxygen atmosphere = best reaction
//Maxes out at 100% oxygen pressure
oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / removed.total_moles(), 1), 0)
//We've generated power, now let's transfer it to the collectors for storing/usage
transfer_energy()
//calculate power gain for oxygen reaction
var/temp_factor
var/equilibrium_power
if (oxygen > 0.8)
//If chain reacting at oxygen == 1, we want the power at 800 K to stabilize at a power level of 400
equilibrium_power = 400
icon_state = "[base_icon_state]_glow"
else
//If chain reacting at oxygen == 1, we want the power at 800 K to stabilize at a power level of 250
equilibrium_power = 250
icon_state = base_icon_state
var/device_energy = power * REACTION_POWER_MODIFIER
temp_factor = ( (equilibrium_power/DECAY_FACTOR)**3 )/800
power = max( (removed.temperature * temp_factor) * oxygen + power, 0)
//To figure out how much temperature to add each tick, consider that at one atmosphere's worth
//of pure oxygen, with all four lasers firing at standard energy and no N2 present, at room temperature
//that the device energy is around 2140. At that stage, we don't want too much heat to be put out
//Since the core is effectively "cold"
//We've generated power, now let's transfer it to the collectors for storing/usage
transfer_energy()
//Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock
//is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall.
removed.temperature += (device_energy / THERMAL_RELEASE_MODIFIER)
var/device_energy = power * REACTION_POWER_MODIFIER
removed.temperature = max(0, min(removed.temperature, 2500))
//Calculate how much gas to release
removed.toxins += max(device_energy / PLASMA_RELEASE_MODIFIER, 0)
//Calculate how much gas to release
removed.toxins += max(device_energy / PLASMA_RELEASE_MODIFIER, 0)
removed.oxygen += max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
removed.oxygen += max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
env.merge(removed)
env.merge(removed)
for(var/mob/living/carbon/human/l in view(src, min(7, round(power ** 0.25)))) // If they can see it without mesons on. Bad on them.
for(var/mob/living/carbon/human/l in view(src, min(7, round(sqrt(power/6))))) // If they can see it without mesons on. Bad on them.
if(!istype(l.glasses, /obj/item/clothing/glasses/meson))
l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1, get_dist(l, src)) ) ) )
l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1,get_dist(l, src)) ) ) )
for(var/mob/living/l in range(src, round((power / 100) ** 0.25)))
var/rads = (power / 10) * sqrt( 1 / max(get_dist(l, src),1) )
l.apply_effect(irradiate=rads)
//adjusted range so that a power of 300 (pretty high) results in 8 tiles, roughly the distance from the core to the engine monitoring room.
for(var/mob/living/l in range(src, round(sqrt(power / 5))))
var/rads = (power / 10) * sqrt( 1 / get_dist(l, src) )
l.apply_effect(rads, IRRADIATE)
power -= (power/500)**3
power -= (power/DECAY_FACTOR)**3 //energy losses due to radiation
return 1
@@ -225,17 +238,12 @@
// Then bring it inside to explode instantly upon landing on a valid turf.
if(Proj.flag != "bullet")
power += Proj.damage * config_bullet_energy * CHARGING_FACTOR
if(istype(Proj, /obj/item/projectile/beam))
power += Proj.damage * config_bullet_energy * CHARGING_FACTOR / POWER_FACTOR
else
damage += Proj.damage * config_bullet_energy
return 0
/obj/machinery/power/supermatter/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/machinery/power/supermatter/attack_robot(mob/user as mob)
if(Adjacent(user))
return attack_hand(user)
@@ -247,6 +255,9 @@
user << "<span class = \"warning\">You attempt to interface with the control circuits but find they are not connected to your network. Maybe in a future firmware update.</span>"
/obj/machinery/power/supermatter/attack_hand(mob/user as mob)
if(istype(user,/mob/living/carbon/human/nucleation)) // Nucleation's biology doesn't react to this
return
user.visible_message("<span class=\"warning\">\The [user] reaches out and touches \the [src], inducing a resonance... \his body starts to glow and bursts into flames before flashing into ash.</span>",\
"<span class=\"danger\">You reach out and touch \the [src]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"</span>",\
"<span class=\"warning\">You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.</span>")
@@ -255,11 +266,13 @@
/obj/machinery/power/supermatter/proc/transfer_energy()
for(var/obj/machinery/power/rad_collector/R in rad_collectors)
if(get_dist(R, src) <= 15) // Better than using orange() every process
R.receive_pulse(power * POWER_FACTOR)
var/distance = get_dist(R, src)
if(distance <= 15)
//for collectors using standard plasma tanks at 1013 kPa, the actual power generated will be this power*POWER_FACTOR*20*29 = power*POWER_FACTOR*580
R.receive_pulse(power * POWER_FACTOR * (min(3/distance, 1))**2)
return
/obj/machinery/power/supermatter/attackby(obj/item/weapon/W as obj, mob/living/user as mob, params)
/obj/machinery/power/supermatter/attackby(obj/item/weapon/W as obj, mob/living/carbon/user as mob)
user.visible_message("<span class=\"warning\">\The [user] touches \a [W] to \the [src] as a silence fills the room...</span>",\
"<span class=\"danger\">You touch \the [W] to \the [src] when everything suddenly goes silent.\"</span>\n<span class=\"notice\">\The [W] flashes into dust as you flinch away from \the [src].</span>",\
"<span class=\"warning\">Everything suddenly goes silent.</span>")
@@ -272,6 +285,8 @@
/obj/machinery/power/supermatter/Bumped(atom/AM as mob|obj)
if(istype(AM, /mob/living))
if(istype(AM,/mob/living/carbon/human/nucleation)) // Nucleation's biology doesn't react to this
return
AM.visible_message("<span class=\"warning\">\The [AM] slams into \the [src] inducing a resonance... \his body starts to glow and catch flame before flashing into ash.</span>",\
"<span class=\"danger\">You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\"</span>",\
"<span class=\"warning\">You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.</span>")
@@ -283,6 +298,9 @@
/obj/machinery/power/supermatter/proc/Consume(var/mob/living/user)
if(istype(user,/mob/living/carbon/human/nucleation)) // Nucleation's biology doesn't react to this
return
if(istype(user))
user.dust()
power += 200
@@ -299,11 +317,10 @@
else
l.show_message("<span class=\"warning\">You hear an uneartly ringing and notice your skin is covered in fresh radiation burns.</span>", 2)
var/rads = 500 * sqrt( 1 / (get_dist(l, src) + 1) )
l.apply_effect(rads, IRRADIATE, 0) // Permit blocking
l.apply_effect(rads, IRRADIATE)
/obj/machinery/power/supermatter/proc/supermatter_pull()
//following is adapted from singulo code
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 1
@@ -335,4 +352,110 @@
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 0
return
return
proc/supermatter_delamination(var/turf/epicenter, var/size, var/transform_mobs = 0, var/adminlog = 1)
spawn(0)
var/start = world.timeofday
epicenter = get_turf(epicenter)
if(!epicenter) return
if(adminlog)
message_admins("Supermatter delamination with size ([size]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[epicenter.x];Y=[epicenter.y];Z=[epicenter.z]'>JMP</a>)")
log_game("Supermatter delamination with size ([size]) in area [epicenter.loc.name] ")
playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(size*2,1) )
playsound(epicenter, "explosion", 100, 1, round(size,1) )
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 1
var/x = epicenter.x
var/y = epicenter.y
var/z = epicenter.z
epicenter.ChangeTurf( /turf/simulated/floor/plating/smatter )
for(var/mob/living/mob in orange( epicenter, size*2 )) // Irradiate area twice the size of the main blast
if(epicenter.z == mob.loc.z)
if( ishuman(mob) )
//Hilariously enough, running into a closet should make you get hit the hardest.
var/mob/living/carbon/human/H = mob
H.hallucination += max(50, min(size*10, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, epicenter) + 1)) ) )
var/rads = size*10 * sqrt( 1 / (get_dist(mob, epicenter) + 1) )
mob.apply_effect(rads, IRRADIATE)
for(var/i=0, i<size, i++) // An awful way to do this, but i'm tired
for(var/j=0, j<i, j++)
var/turf/cur_turf = locate((x-i)+j, y+j, z )
var/dist = get_dist( cur_turf, epicenter )
var/percent = min( 100, ((( size-dist )/size )*100 ))
blow_lights( cur_turf )
if( prob( percent ))
supermatter_convert( cur_turf, transform_mobs )
cur_turf = locate(x+j, (y+i)-j, z )
dist = get_dist( cur_turf, epicenter )
percent = min( 100, ((( size-dist )/size )*100 ))
blow_lights( cur_turf )
if( prob( percent ))
supermatter_convert( cur_turf, transform_mobs )
cur_turf = locate((x+i)-j, y-j, z )
dist = get_dist( cur_turf, epicenter )
percent = min( 100, ((( size-dist )/size )*100 ))
blow_lights( cur_turf )
if( prob( percent ))
supermatter_convert( cur_turf, transform_mobs )
cur_turf = locate(x-j, (y-i)+j, z )
dist = get_dist( cur_turf, epicenter )
percent = min( 100, ((( size-dist )/size )*100 ))
blow_lights( cur_turf )
if( prob( percent ))
supermatter_convert( cur_turf, transform_mobs )
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 0
diary << "## Supermatter delamination with size [size]. Took [(world.timeofday-start)/10] seconds."
return 1
proc/supermatter_convert( var/turf/T, var/transform_mobs = 0 )
if( transform_mobs )
for( var/mob/item in T.contents )
if( ishuman( item ))
var/mob/living/carbon/human/M = item
if( istype(M.species, /datum/species/human ))
if( prob( 33 ))
M.set_species( "Nucleation", 1 )
item.ex_act( 3 )
if( istype( T, /turf/simulated/floor ))
new /obj/effect/supermatter_crystal(T)
proc/blow_lights( var/turf/T )
for( var/obj/machinery/power/apc/apc in T )
apc.overload_lighting()
/obj/machinery/power/supermatter/shard //Small subtype, less efficient and more sensitive, but less boom.
name = "Supermatter Shard"
desc = "A strangely translucent and iridescent crystal that looks like it used to be part of a larger structure. \red You get headaches just from looking at it."
icon_state = "darkmatter_shard"
base_icon_state = "darkmatter_shard"
warning_point = 50
emergency_point = 400
explosion_point = 600
gasefficency = 0.125
pull_radius = 5
pull_time = 45
explosion_power = 3
/obj/machinery/power/supermatter/shard/announce_warning() //Shards don't get announcements
return
+74
View File
@@ -0,0 +1,74 @@
/turf/simulated/floor/plating/smatter
name = "supermatter floor"
icon_state = "smatter"
light_color = "#8A8A00"
/turf/simulated/floor/plating/smatter/New()
..()
var/r = rand( 0, 3 )
icon_state = "smatter[r]"
spawn(2)
var/list/step_overlays = list("s" = NORTH, "n" = SOUTH, "w" = EAST, "e" = WEST)
for(var/direction in step_overlays)
var/turf/turf_to_check = get_step(src,step_overlays[direction])
if((istype(turf_to_check,/turf/space) || istype(turf_to_check,/turf/simulated/floor)) && !istype(turf_to_check,/turf/simulated/floor/plating/smatter))
turf_to_check.overlays += image('icons/turf/floors.dmi', "smatter_side_[direction]")
/turf/simulated/floor/plating/smatter/Destroy()
..()
var/list/step_overlays = list("n" = NORTH, "s" = SOUTH, "e" = EAST, "w" = WEST)
// Kill and update the space overlays around us.
for(var/direction in step_overlays)
var/turf/space/T = get_step(src, step_overlays[direction])
if(istype(T))
for(var/next_direction in step_overlays)
if(istype(get_step(T, step_overlays[next_direction]),/turf/simulated/floor/plating/smatter))
T.overlays += image('icons/turf/floors.dmi', "smatter_side_[next_direction]")
/turf/simulated/wall/smatter
name = "supermatter"
desc = "thats a wall of supermatter"
icon = 'icons/turf/walls.dmi'
icon_state = "smatter"
temperature = T20C+80
density = 1
opacity = 1
blocks_air = 1
/turf/simulated/smatter/New()
..()
name = "supermatter"
desc = "thats a wall of supermatter"
icon = 'icons/turf/walls.dmi'
icon_state = "smatter"
temperature = T20C+80
density = 1
opacity = 1
blocks_air = 1
spawn(2)
var/list/step_overlays = list("s" = NORTH, "n" = SOUTH, "w" = EAST, "e" = WEST)
for(var/direction in step_overlays)
var/turf/turf_to_check = get_step(src,step_overlays[direction])
if(istype(turf_to_check,/turf/space) || istype(turf_to_check,/turf/simulated/floor))
turf_to_check.overlays += image('icons/turf/walls.dmi', "smatter_side_[direction]")
/turf/simulated/smatter/Destroy()
..()
var/list/step_overlays = list("n" = NORTH, "s" = SOUTH, "e" = EAST, "w" = WEST)
// Kill and update the space overlays around us.
for(var/direction in step_overlays)
var/turf/space/T = get_step(src, step_overlays[direction])
if(istype(T))
T.overlays.Cut()
for(var/next_direction in step_overlays)
if(istype(get_step(T, step_overlays[next_direction]),/turf/simulated/wall/smatter))
T.overlays += image('icons/turf/walls.dmi', "smatter_side_[next_direction]")
+44 -12
View File
@@ -3,10 +3,10 @@
desc = "Retracts stuff."
icon = 'icons/obj/surgery.dmi'
icon_state = "retractor"
m_amt = 10000
g_amt = 5000
m_amt = 6000
g_amt = 3000
flags = CONDUCT
w_class = 1.0
w_class = 2.0
origin_tech = "materials=1;biotech=1"
@@ -28,8 +28,8 @@
desc = "This stops bleeding."
icon = 'icons/obj/surgery.dmi'
icon_state = "cautery"
m_amt = 5000
g_amt = 2500
m_amt = 2500
g_amt = 750
flags = CONDUCT
w_class = 1.0
origin_tech = "materials=1;biotech=1"
@@ -42,8 +42,8 @@
icon = 'icons/obj/surgery.dmi'
icon_state = "drill"
hitsound = 'sound/weapons/circsawhit.ogg'
m_amt = 15000
g_amt = 10000
m_amt = 10000
g_amt = 6000
flags = CONDUCT
force = 15.0
w_class = 3.0
@@ -63,12 +63,14 @@
icon_state = "scalpel"
flags = CONDUCT
force = 10.0
sharp = 1
edge = 1
w_class = 1.0
throwforce = 5.0
throw_speed = 3
throw_range = 5
m_amt = 10000
g_amt = 5000
m_amt = 4000
g_amt = 1000
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
@@ -84,7 +86,7 @@
name = "circular saw"
desc = "For heavy duty cutting."
icon = 'icons/obj/surgery.dmi'
icon_state = "saw"
icon_state = "saw3"
hitsound = 'sound/weapons/circsawhit.ogg'
flags = CONDUCT
force = 15.0
@@ -92,12 +94,42 @@
throwforce = 9.0
throw_speed = 3
throw_range = 5
m_amt = 20000
g_amt = 10000
m_amt = 10000
g_amt = 6000
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "slashed", "sawed", "cut")
//misc, formerly from code/defines/weapons.dm
/obj/item/weapon/bonegel
name = "bone gel"
icon = 'icons/obj/surgery.dmi'
icon_state = "bone-gel"
force = 0
w_class = 2.0
throwforce = 1.0
/obj/item/weapon/FixOVein
name = "FixOVein"
icon = 'icons/obj/surgery.dmi'
icon_state = "fixovein"
force = 0
throwforce = 1.0
origin_tech = "materials=1;biotech=3"
w_class = 2.0
var/usage_amount = 10
/obj/item/weapon/bonesetter
name = "bone setter"
icon = 'icons/obj/surgery.dmi'
icon_state = "bone setter"
force = 8.0
throwforce = 9.0
throw_speed = 3
throw_range = 5
w_class = 2.0
attack_verb = list("attacked", "hit", "bludgeoned")
/obj/item/weapon/surgical_drapes
name = "surgical drapes"
desc = "Nanotrasen brand surgical drapes provide optimal safety and infection control."