Rewrote autolathe, changed all m_amt and g_amt to a list called 'matter'. Updated RCD vars in view of this.

This commit is contained in:
Zuhayr
2014-06-11 01:14:38 +09:30
parent 0d2b9b8c33
commit 9e7fe6d700
81 changed files with 925 additions and 789 deletions

View File

@@ -279,6 +279,7 @@
#include "code\game\machinery\alarm.dm"
#include "code\game\machinery\atmo_control.dm"
#include "code\game\machinery\autolathe.dm"
#include "code\game\machinery\autolathe_datums.dm"
#include "code\game\machinery\Beacon.dm"
#include "code\game\machinery\bees_apiary.dm"
#include "code\game\machinery\bees_items.dm"

View File

@@ -82,8 +82,7 @@
icon_broken = "ashtray_bork_bl"
max_butts = 14
health = 24.0
g_amt = 30
m_amt = 30
matter = list("metal" = 30,"glass" = 30)
empty_desc = "Cheap plastic ashtray."
throwforce = 3.0
die()
@@ -103,7 +102,7 @@
icon_broken = "ashtray_bork_br"
max_butts = 10
health = 72.0
m_amt = 80
matter = list("metal" = 80)
empty_desc = "Massive bronze ashtray."
throwforce = 10.0
@@ -124,7 +123,7 @@
icon_broken = "ashtray_bork_gl"
max_butts = 12
health = 12.0
g_amt = 60
matter = list("glass" = 60)
empty_desc = "Glass ashtray. Looks fragile."
throwforce = 6.0

View File

@@ -1387,7 +1387,7 @@
force = 5.0
throwforce = 7.0
w_class = 2.0
m_amt = 50
matter = list("metal" = 50)
attack_verb = list("slashed", "sliced", "cut", "clawed")
// *************************************

View File

@@ -20,7 +20,7 @@
opacity = 0
density = 0
anchored = 0.0
var/matter = 0
var/stored_matter = 0
var/mode = 1
flags = TABLEPASS
w_class = 3.0
@@ -105,7 +105,7 @@
force = 5.0
throwforce = 7.0
w_class = 2.0
m_amt = 50
matter = list("metal" = 50)
attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed")
/obj/item/weapon/disk
@@ -221,7 +221,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "rack_parts"
flags = FPRINT | TABLEPASS| CONDUCT
m_amt = 3750
matter = list("metal" = 3750)
/obj/item/weapon/shard
name = "shard"
@@ -233,7 +233,7 @@
force = 5.0
throwforce = 8.0
item_state = "shard-glass"
g_amt = 3750
matter = list("glass" = 3750)
attack_verb = list("stabbed", "slashed", "sliced", "cut")
suicide_act(mob/user)
@@ -303,7 +303,7 @@
w_class = 2.0
throw_speed = 4
throw_range = 20
m_amt = 100
matter = list("metal" = 100)
origin_tech = "magnets=1"
/obj/item/weapon/staff
@@ -351,7 +351,7 @@
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "table_parts"
m_amt = 3750
matter = list("metal" = 3750)
flags = FPRINT | TABLEPASS| CONDUCT
attack_verb = list("slammed", "bashed", "battered", "bludgeoned", "thrashed", "whacked")
@@ -360,7 +360,7 @@
desc = "Hard table parts. Well...harder..."
icon = 'icons/obj/items.dmi'
icon_state = "reinf_tableparts"
m_amt = 7500
matter = list("metal" = 7500)
flags = FPRINT | TABLEPASS| CONDUCT
/obj/item/weapon/table_parts/wood
@@ -377,7 +377,7 @@
var/amount = 1.0
var/laying = 0.0
var/old_lay = null
m_amt = 40
matter = list("metal" = 40)
attack_verb = list("whipped", "lashed", "disciplined", "tickled")
suicide_act(mob/user)
@@ -401,8 +401,7 @@
name = "power control module"
icon_state = "power_mod"
desc = "Heavy-duty switching circuits for power control."
m_amt = 50
g_amt = 50
matter = list("metal" = 50, "glass" = 50)
/obj/item/weapon/module/id_auth
name = "\improper ID authentication module"
@@ -475,7 +474,7 @@
throwforce = 15.0
throw_speed = 4
throw_range = 4
m_amt = 15000
matter = list("metal" = 15000)
origin_tech = "materials=2;combat=1"
attack_verb = list("chopped", "torn", "cut")
@@ -565,45 +564,42 @@
desc = "Used in the construction of computers and other devices with a interactive console."
icon_state = "screen"
origin_tech = "materials=1"
g_amt = 200
matter = list("glass" = 200)
/obj/item/weapon/stock_parts/capacitor
name = "capacitor"
desc = "A basic capacitor used in the construction of a variety of devices."
icon_state = "capacitor"
origin_tech = "powerstorage=1"
m_amt = 50
g_amt = 50
matter = list("metal" = 50, "glass" = 50)
/obj/item/weapon/stock_parts/scanning_module
name = "scanning module"
desc = "A compact, high resolution scanning module used in the construction of certain devices."
icon_state = "scan_module"
origin_tech = "magnets=1"
m_amt = 50
g_amt = 20
matter = list("metal" = 50, "glass" = 20)
/obj/item/weapon/stock_parts/manipulator
name = "micro-manipulator"
desc = "A tiny little manipulator used in the construction of certain devices."
icon_state = "micro_mani"
origin_tech = "materials=1;programming=1"
m_amt = 30
matter = list("metal" = 30)
/obj/item/weapon/stock_parts/micro_laser
name = "micro-laser"
desc = "A tiny laser used in certain devices."
icon_state = "micro_laser"
origin_tech = "magnets=1"
m_amt = 10
g_amt = 20
matter = list("metal" = 10, "glass" = 20)
/obj/item/weapon/stock_parts/matter_bin
name = "matter bin"
desc = "A container for hold compressed matter awaiting re-construction."
icon_state = "matter_bin"
origin_tech = "materials=1"
m_amt = 80
matter = list("metal" = 80)
//Rank 2
@@ -612,8 +608,7 @@
desc = "An advanced capacitor used in the construction of a variety of devices."
origin_tech = "powerstorage=3"
rating = 2
m_amt = 50
g_amt = 50
matter = list("metal" = 50,"glass" = 50)
/obj/item/weapon/stock_parts/scanning_module/adv
name = "advanced scanning module"
@@ -621,8 +616,7 @@
icon_state = "scan_module"
origin_tech = "magnets=3"
rating = 2
m_amt = 50
g_amt = 20
matter = list("metal" = 50, "glass" = 20)
/obj/item/weapon/stock_parts/manipulator/nano
name = "nano-manipulator"
@@ -630,7 +624,7 @@
icon_state = "nano_mani"
origin_tech = "materials=3,programming=2"
rating = 2
m_amt = 30
matter = list("metal" = 30)
/obj/item/weapon/stock_parts/micro_laser/high
name = "high-power micro-laser"
@@ -638,8 +632,7 @@
icon_state = "high_micro_laser"
origin_tech = "magnets=3"
rating = 2
m_amt = 10
g_amt = 20
matter = list("metal" = 10, "glass" = 20)
/obj/item/weapon/stock_parts/matter_bin/adv
name = "advanced matter bin"
@@ -647,7 +640,7 @@
icon_state = "advanced_matter_bin"
origin_tech = "materials=3"
rating = 2
m_amt = 80
matter = list("metal" = 80)
//Rating 3
@@ -656,16 +649,14 @@
desc = "A super-high capacity capacitor used in the construction of a variety of devices."
origin_tech = "powerstorage=5;materials=4"
rating = 3
m_amt = 50
g_amt = 50
matter = list("metal" = 50, "glass" = 50)
/obj/item/weapon/stock_parts/scanning_module/phasic
name = "phasic scanning module"
desc = "A compact, high resolution phasic scanning module used in the construction of certain devices."
origin_tech = "magnets=5"
rating = 3
m_amt = 50
g_amt = 20
matter = list("metal" = 50, "glass" = 20)
/obj/item/weapon/stock_parts/manipulator/pico
name = "pico-manipulator"
@@ -673,7 +664,7 @@
icon_state = "pico_mani"
origin_tech = "materials=5,programming=2"
rating = 3
m_amt = 30
matter = list("metal" = 30)
/obj/item/weapon/stock_parts/micro_laser/ultra
name = "ultra-high-power micro-laser"
@@ -681,8 +672,7 @@
desc = "A tiny laser used in certain devices."
origin_tech = "magnets=5"
rating = 3
m_amt = 10
g_amt = 20
matter = list("metal" = 10, "glass" = 20)
/obj/item/weapon/stock_parts/matter_bin/super
name = "super matter bin"
@@ -690,7 +680,7 @@
icon_state = "super_matter_bin"
origin_tech = "materials=5"
rating = 3
m_amt = 80
matter = list("metal" = 80)
// Subspace stock parts
@@ -699,54 +689,49 @@
icon_state = "subspace_ansible"
desc = "A compact module capable of sensing extradimensional activity."
origin_tech = "programming=3;magnets=5;materials=4;bluespace=2"
m_amt = 30
g_amt = 10
matter = list("metal" = 30, "glass" = 10)
/obj/item/weapon/stock_parts/subspace/filter
name = "hyperwave filter"
icon_state = "hyperwave_filter"
desc = "A tiny device capable of filtering and converting super-intense radiowaves."
origin_tech = "programming=4;magnets=2"
m_amt = 30
g_amt = 10
matter = list("metal" = 30, "glass" = 10)
/obj/item/weapon/stock_parts/subspace/amplifier
name = "subspace amplifier"
icon_state = "subspace_amplifier"
desc = "A compact micro-machine capable of amplifying weak subspace transmissions."
origin_tech = "programming=3;magnets=4;materials=4;bluespace=2"
m_amt = 30
g_amt = 10
matter = list("metal" = 30, "glass" = 10)
/obj/item/weapon/stock_parts/subspace/treatment
name = "subspace treatment disk"
icon_state = "treatment_disk"
desc = "A compact micro-machine capable of stretching out hyper-compressed radio waves."
origin_tech = "programming=3;magnets=2;materials=5;bluespace=2"
m_amt = 30
g_amt = 10
matter = list("metal" = 30, "glass" = 10)
/obj/item/weapon/stock_parts/subspace/analyzer
name = "subspace wavelength analyzer"
icon_state = "wavelength_analyzer"
desc = "A sophisticated analyzer capable of analyzing cryptic subspace wavelengths."
origin_tech = "programming=3;magnets=4;materials=4;bluespace=2"
m_amt = 30
g_amt = 10
matter = list("metal" = 30, "glass" = 10)
/obj/item/weapon/stock_parts/subspace/crystal
name = "ansible crystal"
icon_state = "ansible_crystal"
desc = "A crystal made from pure glass used to transmit laser databursts to subspace."
origin_tech = "magnets=4;materials=4;bluespace=2"
g_amt = 50
matter = list("glass" = 50)
/obj/item/weapon/stock_parts/subspace/transmitter
name = "subspace transmitter"
icon_state = "subspace_transmitter"
desc = "A large piece of equipment used to open a window into the subspace dimension."
origin_tech = "magnets=5;materials=5;bluespace=3"
m_amt = 50
matter = list("metal" = 50)
/obj/item/weapon/ectoplasm
name = "ectoplasm"

View File

@@ -8,7 +8,7 @@
item_state = "electronic"
throw_speed = 4
throw_range = 20
m_amt = 500
matter = list("metal" = 500)
var/obj/item/weapon/disk/nuclear/the_disk = null
var/active = 0

View File

@@ -616,18 +616,6 @@
updateDialog()
return
/obj/machinery/alarm/proc/shock(mob/user, prb)
if((stat & (NOPOWER))) // unpowered, no shock
return 0
if(!prob(prb))
return 0 //you lucked out, no shock for you
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start() //sparks always.
if (electrocute_mob(user, get_area(src), src))
return 1
else
return 0
///////////////
//END HACKING//
///////////////
@@ -964,11 +952,11 @@ table tr:first-child th:first-child { border: none;}
add_fingerprint(usr)
usr.set_machine(src)
// hrefs that can always be called -walter0o
if(href_list["rcon"])
var/attempted_rcon_setting = text2num(href_list["rcon"])
switch(attempted_rcon_setting)
if(RCON_NO)
rcon_setting = RCON_NO
@@ -978,7 +966,7 @@ table tr:first-child th:first-child { border: none;}
rcon_setting = RCON_YES
else
return
if(href_list["temperature"])
var/list/selected = TLV["temperature"]
var/max_temperature = min(selected[3] - T0C, MAX_TEMPERATURE)
@@ -991,7 +979,7 @@ table tr:first-child th:first-child { border: none;}
// hrefs that need the AA unlocked -walter0o
if(!locked || istype(usr, /mob/living/silicon))
if(href_list["command"])
var/device_id = href_list["id_tag"]
switch(href_list["command"])
@@ -1004,9 +992,9 @@ table tr:first-child th:first-child { border: none;}
"n2o_scrub",
"panic_siphon",
"scrubbing")
send_signal(device_id, list(href_list["command"] = text2num(href_list["val"]) ) )
if("set_threshold")
var/env = href_list["env"]
var/threshold = text2num(href_list["var"])
@@ -1054,36 +1042,36 @@ table tr:first-child th:first-child { border: none;}
selected[2] = selected[4]
if(selected[3] > selected[4])
selected[3] = selected[4]
apply_mode()
if(href_list["screen"])
screen = text2num(href_list["screen"])
if(href_list["atmos_unlock"])
switch(href_list["atmos_unlock"])
if("0")
air_doors_close(1)
if("1")
air_doors_open(1)
if(href_list["atmos_alarm"])
if (alarm_area.atmosalert(2))
apply_danger_level(2)
update_icon()
if(href_list["atmos_reset"])
if (alarm_area.atmosalert(0))
apply_danger_level(0)
update_icon()
if(href_list["mode"])
mode = text2num(href_list["mode"])
apply_mode()
// hrefs that need the AA wires exposed, note that borgs should be in range here too -walter0o
if(wiresexposed && Adjacent(usr))
if (href_list["AAlarmwires"])
var/t1 = text2num(href_list["AAlarmwires"])
if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) ))
@@ -1098,7 +1086,7 @@ table tr:first-child th:first-child { border: none;}
update_icon()
buildstage = 1
return
else if (href_list["pulse"])
var/t1 = text2num(href_list["pulse"])
if (!istype(usr.equipped(), /obj/item/device/multitool))
@@ -1217,8 +1205,7 @@ Just a object used in constructing air alarms
icon_state = "door_electronics"
desc = "Looks like a circuit. Probably is."
w_class = 2.0
m_amt = 50
g_amt = 50
matter = list("metal" = 50, "glass" = 50)
/*
@@ -1545,8 +1532,7 @@ Just a object used in constructing fire alarms
icon_state = "door_electronics"
desc = "A circuit. It has a label on it, it says \"Can handle heat levels up to 40 degrees celsius!\""
w_class = 2.0
m_amt = 50
g_amt = 50
matter = list("metal" = 50, "glass" = 50)
/*

View File

@@ -1,401 +1,361 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
var/global/list/autolathe_recipes = list( \
/* screwdriver removed*/ \
new /obj/item/weapon/reagent_containers/glass/bucket(), \
new /obj/item/weapon/crowbar(), \
new /obj/item/device/flashlight(), \
new /obj/item/weapon/extinguisher(), \
new /obj/item/device/multitool(), \
new /obj/item/device/t_scanner(), \
new /obj/item/weapon/weldingtool(), \
new /obj/item/weapon/screwdriver(), \
new /obj/item/weapon/wirecutters(), \
new /obj/item/weapon/wrench(), \
new /obj/item/clothing/head/welding(), \
new /obj/item/weapon/stock_parts/console_screen(), \
new /obj/item/weapon/airlock_electronics(), \
new /obj/item/weapon/airalarm_electronics(), \
new /obj/item/weapon/firealarm_electronics(), \
new /obj/item/weapon/module/power_control(), \
new /obj/item/stack/sheet/metal(), \
new /obj/item/stack/sheet/glass(), \
new /obj/item/stack/sheet/rglass(), \
new /obj/item/stack/rods(), \
new /obj/item/weapon/rcd_ammo(), \
new /obj/item/weapon/kitchenknife(), \
new /obj/item/weapon/scalpel(), \
new /obj/item/weapon/circular_saw(), \
new /obj/item/weapon/surgicaldrill(),\
new /obj/item/weapon/retractor(),\
new /obj/item/weapon/cautery(),\
new /obj/item/weapon/hemostat(),\
new /obj/item/weapon/reagent_containers/glass/beaker(), \
new /obj/item/weapon/reagent_containers/glass/beaker/large(), \
new /obj/item/weapon/reagent_containers/glass/beaker/vial(), \
new /obj/item/weapon/reagent_containers/syringe(), \
new /obj/item/ammo_casing/shotgun/blank(), \
new /obj/item/ammo_casing/shotgun/beanbag(), \
new /obj/item/ammo_magazine/c45r(), \
new /obj/item/device/taperecorder(), \
new /obj/item/device/assembly/igniter(), \
new /obj/item/device/assembly/signaler(), \
new /obj/item/device/radio/headset(), \
new /obj/item/device/radio/off(), \
new /obj/item/device/assembly/infra(), \
new /obj/item/device/assembly/timer(), \
new /obj/item/device/assembly/prox_sensor(), \
new /obj/item/weapon/light/tube(), \
new /obj/item/weapon/light/bulb(), \
new /obj/item/ashtray/glass(), \
new /obj/item/weapon/camera_assembly(), \
)
var/global/list/autolathe_recipes_hidden = list( \
new /obj/item/weapon/flamethrower/full(), \
new /obj/item/weapon/rcd(), \
new /obj/item/device/radio/electropack(), \
new /obj/item/weapon/weldingtool/largetank(), \
new /obj/item/weapon/handcuffs(), \
new /obj/item/ammo_magazine/a357(), \
new /obj/item/ammo_magazine/c45m(), \
new /obj/item/ammo_casing/shotgun(), \
new /obj/item/ammo_casing/shotgun/dart(), \
/* new /obj/item/weapon/shield/riot(), */ \
)
/obj/machinery/autolathe
name = "\improper Autolathe"
name = "\improper autolathe"
desc = "It produces items using metal and glass."
icon_state = "autolathe"
density = 1
anchored = 1
use_power = 1
idle_power_usage = 10
active_power_usage = 100
var/m_amount = 0.0
var/max_m_amount = 150000.0
var/list/stored_material = list("metal" = 0, "glass" = 0, "phoron" = 0, "osmium" = 0)
var/list/storage_capacity = list("metal" = 0, "glass" = 0, "phoron" = 0, "osmium" = 0)
var/show_category = "All"
var/g_amount = 0.0
var/max_g_amount = 75000.0
var/operating = 0.0
var/opened = 0.0
anchored = 1.0
var/list/L = list()
var/list/LL = list()
var/opened = 0
var/hacked = 0
var/disabled = 0
var/shocked = 0
var/busy = 0
var/list/wires = list()
var/hack_wire
var/disable_wire
var/shock_wire
use_power = 1
idle_power_usage = 10
active_power_usage = 100
var/busy = 0
proc
wires_win(mob/user as mob)
var/dat as text
dat += "Autolathe Wires:<BR>"
for(var/wire in src.wires)
dat += text("[wire] Wire: <A href='?src=\ref[src];wire=[wire];act=wire'>[src.wires[wire] ? "Mend" : "Cut"]</A> <A href='?src=\ref[src];wire=[wire];act=pulse'>Pulse</A><BR>")
/obj/machinery/autolathe/interact(mob/user as mob)
dat += text("The red light is [src.disabled ? "off" : "on"].<BR>")
dat += text("The green light is [src.shocked ? "off" : "on"].<BR>")
dat += text("The blue light is [src.hacked ? "off" : "on"].<BR>")
user << browse("<HTML><HEAD><TITLE>Autolathe Hacking</TITLE></HEAD><BODY>[dat]</BODY></HTML>","window=autolathe_hack")
onclose(user, "autolathe_hack")
regular_win(mob/user as mob)
var/dat as text
dat = text("<B>Metal Amount:</B> [src.m_amount] cm<sup>3</sup> (MAX: [max_m_amount])<BR>\n<FONT color=blue><B>Glass Amount:</B></FONT> [src.g_amount] cm<sup>3</sup> (MAX: [max_g_amount])<HR>")
var/list/objs = list()
objs += src.L
if (src.hacked)
objs += src.LL
for(var/obj/t in objs)
var/title = "[t.name] ([t.m_amt] m /[t.g_amt] g)"
if (m_amount<t.m_amt || g_amount<t.g_amt)
dat += title + "<br>"
continue
dat += "<A href='?src=\ref[src];make=\ref[t]'>[title]</A>"
if (istype(t, /obj/item/stack))
var/obj/item/stack/S = t
var/max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY)
if (max_multiplier>1)
dat += " |"
if (max_multiplier>10)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[10]'>x[10]</A>"
if (max_multiplier>25)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[25]'>x[25]</A>"
if (max_multiplier>1)
dat += " <A href='?src=\ref[src];make=\ref[t];multiplier=[max_multiplier]'>x[max_multiplier]</A>"
dat += "<br>"
user << browse("<HTML><HEAD><TITLE>Autolathe Control Panel</TITLE></HEAD><BODY><TT>[dat]</TT></BODY></HTML>", "window=autolathe_regular")
onclose(user, "autolathe_regular")
shock(mob/user, prb)
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
return 0
if(!prob(prb))
return 0
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (electrocute_mob(user, get_area(src), src, 0.7))
return 1
else
return 0
interact(mob/user as mob)
if(..())
return
if (src.shocked)
src.shock(user,50)
if (src.opened)
wires_win(user,50)
return
if (src.disabled)
user << "\red You press the button, but nothing happens."
return
regular_win(user)
if(..() || disabled)
return
attackby(var/obj/item/O as obj, var/mob/user as mob)
if (stat)
return 1
if (busy)
user << "\red The autolathe is busy. Please wait for completion of previous operation."
return 1
if (istype(O, /obj/item/weapon/screwdriver))
if (!opened)
src.opened = 1
src.icon_state = "autolathe_t"
user << "You open the maintenance hatch of [src]."
else
src.opened = 0
src.icon_state = "autolathe"
user << "You close the maintenance hatch of [src]."
return 1
if (opened)
if(istype(O, /obj/item/weapon/crowbar))
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = src.loc
if(m_amount >= 3750)
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
G.amount = round(m_amount / 3750)
if(g_amount >= 3750)
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
G.amount = round(g_amount / 3750)
del(src)
return 1
else
user.set_machine(src)
interact(user)
return 1
if (shocked)
shock(user,50)
if (src.m_amount + O.m_amt > max_m_amount)
user << "\red The autolathe is full. Please remove metal from the autolathe in order to insert more."
return 1
if (src.g_amount + O.g_amt > max_g_amount)
user << "\red The autolathe is full. Please remove glass from the autolathe in order to insert more."
return 1
if (O.m_amt == 0 && O.g_amt == 0)
user << "\red This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials."
return 1
/*
if (istype(O, /obj/item/weapon/grab) && src.hacked)
var/obj/item/weapon/grab/G = O
if (prob(25) && G.affecting)
G.affecting.gib()
m_amount += 50000
return
*/
var/dat = "<center><h1>Autolathe Control Panel</h1><hr/>"
var/amount = 1
var/obj/item/stack/stack
var/m_amt = O.m_amt
var/g_amt = O.g_amt
if (istype(O, /obj/item/stack))
stack = O
amount = stack.amount
if (m_amt)
amount = min(amount, round((max_m_amount-src.m_amount)/m_amt))
flick("autolathe_o",src)//plays metal insertion animation
if (g_amt)
amount = min(amount, round((max_g_amount-src.g_amount)/g_amt))
flick("autolathe_r",src)//plays glass insertion animation
stack.use(amount)
dat += "<table width = '100%'>"
var/material_top = "<tr>"
var/material_bottom = "<tr>"
for(var/material in stored_material)
material_top += "<td width = '25%' align = center><b>[material]</b></td>"
material_bottom += "<td width = '25%' align = center>[stored_material[material]]<b>/[storage_capacity[material]]</b></td>"
dat += "[material_top]</tr>[material_bottom]</tr></table><hr>"
dat += "<h2>Printable Designs</h2><h3>Showing: <a href='?src=\ref[src];change_category=1'>[show_category]</a>.</h3></center><table width = '100%'>"
for(var/datum/autolathe/recipe/R in autolathe_recipes)
if(R.hidden && !hacked || (show_category != "All" && show_category != R.category))
continue
var/can_make = 1
var/material_string = ""
var/comma
if(!R.resources || !R.resources.len)
material_string = "No resources required.</td>"
else
usr.before_take_item(O)
O.loc = src
icon_state = "autolathe"
for(var/material in R.resources)
if(!isnull(stored_material[material]) && stored_material[material] < R.resources[material])
can_make = 0
if(!comma)
comma = 1
else
material_string += ", "
material_string += "[R.resources[material]] [material]"
material_string += ".<br></td>"
dat += "<tr><td width = 180><b>[can_make ? "<a href='?src=\ref[src];make=\ref[R]'>" : ""][R.name][can_make ? "</a>" : ""]</b></td><td align = right>[material_string]</tr>"
dat += "</table><hr>"
//Hacking.
if(opened)
dat += "<h2>Maintenance Panel</h2>"
for(var/wire in wires)
dat += "[wire] Wire: <A href='?src=\ref[src];wire=[wire];act=wire'>[wires[wire] ? "Mend" : "Cut"]</A> <A href='?src=\ref[src];wire=[wire];act=pulse'>Pulse</A><BR>"
dat += "<br>"
dat += "The red light is [disabled ? "off" : "on"].<br>"
dat += "The green light is [shocked ? "off" : "on"].<br>"
dat += "The blue light is [hacked ? "off" : "on"].<br>"
dat += "<hr>"
user << browse(dat, "window=autolathe")
onclose(user, "autolathe")
/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (stat)
return
if (busy)
user << "\red \The [src] is busy. Please wait for completion of previous operation."
return
if(istype(O, /obj/item/weapon/screwdriver))
opened = !opened
icon_state = (opened ? "autolathe_t": "autolathe")
user << "You [opened ? "open" : "close"] the maintenance hatch of [src]."
updateUsrDialog()
return
if (opened)
//Dismantle the frame.
if(istype(O, /obj/item/weapon/crowbar))
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(loc)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
if(I.reliability != 100 && crit_fail)
I.crit_fail = 1
I.loc = loc
del(src)
return 1
//Resources are being loaded.
var/obj/item/eating = O
if(!eating.matter)
user << "\The [eating] does not contain significant amounts of useful materials and cannot be accepted."
return
var/filltype = 0 // Used to determine message.
var/total_used = 0 // Amount of material used.
var/mass_per_sheet = 0 // Amount of material constituting one sheet.
for(var/material in eating.matter)
if(isnull(stored_material[material]) || isnull(storage_capacity[material]))
continue
if(stored_material[material] >= storage_capacity[material])
continue
var/total_material = eating.matter[material]
//If it's a stack, we eat multiple sheets.
if(istype(eating,/obj/item/stack))
var/obj/item/stack/stack = eating
total_material *= stack.amount
if(stored_material[material] + total_material > storage_capacity[material])
total_material = storage_capacity[material] - stored_material[material]
filltype = 1
else
filltype = 2
stored_material[material] += total_material
total_used += total_material
mass_per_sheet += eating.matter[material]
if(!filltype)
user << "\red \The [src] is full. Please remove material from the autolathe in order to insert more."
return
else if(filltype == 1)
user << "You fill \the [src] to capacity with \the [eating]."
else
user << "You fill \the [src] with \the [eating]."
flick("autolathe_o",src) // Plays metal insertion animation. Work out a good way to work out a fitting animation. ~Z
if(istype(eating,/obj/item/stack))
var/obj/item/stack/stack = eating
stack.use(max(1,round(total_used/mass_per_sheet))) // Always use at least 1 to prevent infinite materials.
else
user.drop_item(O)
del(O)
updateUsrDialog()
return
/obj/machinery/autolathe/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/machinery/autolathe/attack_hand(mob/user as mob)
user.set_machine(src)
interact(user)
/obj/machinery/autolathe/Topic(href, href_list)
if(..())
return
usr.set_machine(src)
add_fingerprint(usr)
if(busy)
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
return
if(href_list["change_category"])
var/choice = input("Which category do you wish to display?") as null|anything in autolathe_categories+"All"
if(!choice) return
show_category = choice
if(href_list["make"] && autolathe_recipes)
var/datum/autolathe/recipe/making
for(var/datum/autolathe/recipe/R in autolathe_recipes)
if(R == href_list["make"])
making = R
break
//Exploit detection, not sure if necessary after rewrite.
if(!making)
var/turf/exploit_loc = get_turf(usr)
message_admins("[key_name_admin(usr)] tried to exploit an autolathe to duplicate an item! ([exploit_loc ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[exploit_loc.x];Y=[exploit_loc.y];Z=[exploit_loc.z]'>JMP</a>" : "null"])", 0)
log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe to duplicate an item!")
return
busy = 1
use_power(max(1000, (m_amt+g_amt)*amount/10))
src.m_amount += m_amt * amount
src.g_amount += g_amt * amount
user << "You insert [amount] sheet[amount>1 ? "s" : ""] to the autolathe."
if (O && O.loc == src)
del(O)
busy = 0
src.updateUsrDialog()
use_power(max(2000, making.power_use))
attack_paw(mob/user as mob)
return src.attack_hand(user)
attack_hand(mob/user as mob)
user.set_machine(src)
interact(user)
Topic(href, href_list)
if(..())
return
usr.set_machine(src)
src.add_fingerprint(usr)
if (!busy)
if(href_list["make"])
var/turf/T = get_step(src.loc, get_dir(src,usr))
// critical exploit fix start -walter0o
var/obj/item/template = null
var/attempting_to_build = locate(href_list["make"])
if(!attempting_to_build)
//Check if we still have the materials.
for(var/material in making.resources)
if(!isnull(stored_material[material]))
if(stored_material[material] < making.resources[material])
return
if(locate(attempting_to_build, src.L) || locate(attempting_to_build, src.LL)) // see if the requested object is in one of the construction lists, if so, it is legit -walter0o
template = attempting_to_build
//Consume materials.
for(var/material in making.resources)
if(!isnull(stored_material[material]))
stored_material[material] = max(0,stored_material[material]-making.resources[material])
else // somebody is trying to exploit, alert admins -walter0o
var/turf/LOC = get_turf(usr)
message_admins("[key_name_admin(usr)] tried to exploit an autolathe to duplicate <a href='?_src_=vars;Vars=\ref[attempting_to_build]'>[attempting_to_build]</a> ! ([LOC ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[LOC.x];Y=[LOC.y];Z=[LOC.z]'>JMP</a>" : "null"])", 0)
log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe to duplicate [attempting_to_build] !")
return
//Fancy autolathe animation.
flick("autolathe_n",src)
// now check for legit multiplier, also only stacks should pass with one to prevent raw-materials-manipulation -walter0o
sleep(50)
var/multiplier = text2num(href_list["multiplier"])
if (!multiplier) multiplier = 1
var/max_multiplier = 1
if(istype(template, /obj/item/stack)) // stacks are the only items which can have a multiplier higher than 1 -walter0o
var/obj/item/stack/S = template
max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY) // pasta from regular_win() to make sure the numbers match -walter0o
//Sanity check.
if(!making || !src) return
if( (multiplier > max_multiplier) || (multiplier <= 0) ) // somebody is trying to exploit, alert admins-walter0o
var/turf/LOC = get_turf(usr)
message_admins("[key_name_admin(usr)] tried to exploit an autolathe with multiplier set to <u>[multiplier]</u> on <u>[template]</u> ! ([LOC ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[LOC.x];Y=[LOC.y];Z=[LOC.z]'>JMP</a>" : "null"])" , 0)
log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe with multiplier set to [multiplier] on [template] !")
return
//Create the desired item.
new making.path(get_step(loc, get_dir(src,usr)))
var/power = max(2000, (template.m_amt+template.g_amt)*multiplier/5)
if(src.m_amount >= template.m_amt*multiplier && src.g_amount >= template.g_amt*multiplier)
busy = 1
use_power(power)
icon_state = "autolathe"
flick("autolathe_n",src)
spawn(16)
use_power(power)
spawn(16)
use_power(power)
spawn(16)
src.m_amount -= template.m_amt*multiplier
src.g_amount -= template.g_amt*multiplier
if(src.m_amount < 0)
src.m_amount = 0
if(src.g_amount < 0)
src.g_amount = 0
var/obj/new_item = new template.type(T)
if (multiplier>1)
var/obj/item/stack/S = new_item
S.amount = multiplier
busy = 0
src.updateUsrDialog()
if(href_list["act"])
var/temp_wire = href_list["wire"]
if(href_list["act"] == "pulse")
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
usr << "You need a multitool!"
else
if(src.wires[temp_wire])
usr << "You can't pulse a cut wire."
else
if(src.hack_wire == temp_wire)
src.hacked = !src.hacked
spawn(100) src.hacked = !src.hacked
if(src.disable_wire == temp_wire)
src.disabled = !src.disabled
src.shock(usr,50)
spawn(100) src.disabled = !src.disabled
if(src.shock_wire == temp_wire)
src.shocked = !src.shocked
src.shock(usr,50)
spawn(100) src.shocked = !src.shocked
if(href_list["act"] == "wire")
if (!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
usr << "You need wirecutters!"
else
wires[temp_wire] = !wires[temp_wire]
if(src.hack_wire == temp_wire)
src.hacked = !src.hacked
if(src.disable_wire == temp_wire)
src.disabled = !src.disabled
src.shock(usr,50)
if(src.shock_wire == temp_wire)
src.shocked = !src.shocked
src.shock(usr,50)
else
usr << "\red The autolathe is busy. Please wait for completion of previous operation."
src.updateUsrDialog()
return
if(href_list["act"])
var/temp_wire = href_list["wire"]
if(href_list["act"] == "pulse")
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
usr << "You need a multitool!"
return
if(wires[temp_wire])
usr << "You can't pulse a cut wire."
return
if(hack_wire == temp_wire)
hacked = !hacked
spawn(100)
hacked = !hacked
if(disable_wire == temp_wire)
disabled = !disabled
shock(usr,50)
spawn(100)
disabled = !disabled
if(shock_wire == temp_wire)
shocked = !shocked
shock(usr,50)
spawn(100)
shocked = !shocked
else if(href_list["act"] == "wire")
if (!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
usr << "You need wirecutters!"
return
wires[temp_wire] = !wires[temp_wire]
if(hack_wire == temp_wire)
hacked = !hacked
if(disable_wire == temp_wire)
disabled = !disabled
shock(usr,50)
if(shock_wire == temp_wire)
shocked = !shocked
shock(usr,50)
updateUsrDialog()
/obj/machinery/autolathe/New()
..()
//Create global autolathe recipe list if it hasn't been made already.
if(isnull(autolathe_recipes))
autolathe_recipes = list()
autolathe_categories = list()
for(var/R in typesof(/datum/autolathe/recipe)-/datum/autolathe/recipe)
var/datum/autolathe/recipe/recipe = new R
autolathe_recipes += recipe
autolathe_categories |= recipe.category
var/obj/item/I = new recipe.path
if(I.matter && !recipe.resources) //This can be overidden in the datums.
recipe.resources = list()
for(var/material in I.matter)
if(!isnull(storage_capacity[material]))
recipe.resources[material] = round(I.matter[material]*1.25) // More expensive to produce than they are to recycle.
del(I)
//Create parts for lathe.
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
RefreshParts()
..()
var/tot_rating = 0
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
tot_rating += MB.rating
tot_rating *= 25000
max_m_amount = tot_rating * 2
max_g_amount = tot_rating
New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
RefreshParts()
//Init wires.
wires = list(
"Light Red" = 0,
"Dark Red" = 0,
"Blue" = 0,
"Green" = 0,
"Yellow" = 0,
"Black" = 0,
"White" = 0,
"Gray" = 0,
"Orange" = 0,
"Pink" = 0
)
src.L = autolathe_recipes
src.LL = autolathe_recipes_hidden
src.wires["Light Red"] = 0
src.wires["Dark Red"] = 0
src.wires["Blue"] = 0
src.wires["Green"] = 0
src.wires["Yellow"] = 0
src.wires["Black"] = 0
src.wires["White"] = 0
src.wires["Gray"] = 0
src.wires["Orange"] = 0
src.wires["Pink"] = 0
var/list/w = list("Light Red","Dark Red","Blue","Green","Yellow","Black","White","Gray","Orange","Pink")
src.hack_wire = pick(w)
w -= src.hack_wire
src.shock_wire = pick(w)
w -= src.shock_wire
src.disable_wire = pick(w)
w -= src.disable_wire
//Randomize wires.
var/list/w = list("Light Red","Dark Red","Blue","Green","Yellow","Black","White","Gray","Orange","Pink")
hack_wire = pick(w)
w -= hack_wire
shock_wire = pick(w)
w -= shock_wire
disable_wire = pick(w)
w -= disable_wire
//Updates overall lathe storage size.
/obj/machinery/autolathe/RefreshParts()
..()
var/tot_rating = 0
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
tot_rating += MB.rating
storage_capacity["metal"] = tot_rating * 25000
storage_capacity["glass"] = tot_rating * 25000
storage_capacity["phoron"] = tot_rating * 12500
storage_capacity["osmium"] = tot_rating * 7500
//max_m_amount = tot_rating * 2
//max_g_amount = tot_rating

View File

@@ -0,0 +1,299 @@
/var/global/list/autolathe_recipes
/var/global/list/autolathe_categories
/datum/autolathe/recipe
var/name = "object"
var/path
var/list/resources
var/hidden
var/category
var/power_use = 0
/datum/autolathe/recipe/bucket
name = "bucket"
path = /obj/item/weapon/reagent_containers/glass/bucket
category = "General"
/datum/autolathe/recipe/flashlight
name = "flashlight"
path = /obj/item/device/flashlight
category = "General"
/datum/autolathe/recipe/extinguisher
name = "extinguisher"
path = /obj/item/weapon/extinguisher
category = "General"
/datum/autolathe/recipe/crowbar
name = "crowbar"
path = /obj/item/weapon/crowbar
category = "Tools"
/datum/autolathe/recipe/multitool
name = "multitool"
path = /obj/item/device/multitool
category = "Tools"
/datum/autolathe/recipe/t_scanner
name = "T-ray scanner"
path = /obj/item/device/t_scanner
category = "Tools"
/datum/autolathe/recipe/weldertool
name = "welding tool"
path = /obj/item/weapon/weldingtool
category = "Tools"
/datum/autolathe/recipe/screwdriver
name = "screwdriver"
path = /obj/item/weapon/screwdriver
category = "Tools"
/datum/autolathe/recipe/wirecutters
name = "wirecutters"
path = /obj/item/weapon/wirecutters
category = "Tools"
/datum/autolathe/recipe/wrench
name = "wrench"
path = /obj/item/weapon/wrench
category = "Tools"
/datum/autolathe/recipe/radio_headset
name = "radio headset"
path = /obj/item/device/radio/headset
category = "General"
/datum/autolathe/recipe/radio_bounced
name = "station bounced radio"
path = /obj/item/device/radio/off
category = "General"
/datum/autolathe/recipe/weldermask
name = "welding mask"
path = /obj/item/clothing/head/welding
category = "General"
/datum/autolathe/recipe/metal
name = "steel sheets"
path = /obj/item/stack/sheet/metal
category = "General"
/datum/autolathe/recipe/glass
name = "glass sheets"
path = /obj/item/stack/sheet/glass
category = "General"
/datum/autolathe/recipe/rglass
name = "reinforced glass sheets"
path = /obj/item/stack/sheet/rglass
category = "General"
/datum/autolathe/recipe/rods
name = "metal rods"
path = /obj/item/stack/rods
category = "General"
/datum/autolathe/recipe/knife
name = "kitchen knife"
path = /obj/item/weapon/kitchenknife
category = "General"
/datum/autolathe/recipe/taperecorder
name = "tape recorder"
path = /obj/item/device/taperecorder
category = "General"
/datum/autolathe/recipe/airlockmodule
name = "airlock electronics"
path = /obj/item/weapon/airlock_electronics
category = "Engineering"
/datum/autolathe/recipe/airalarm
name = "air alarm electronics"
path = /obj/item/weapon/airalarm_electronics
category = "Engineering"
/datum/autolathe/recipe/firealarm
name = "fire alarm electronics"
path = /obj/item/weapon/firealarm_electronics
category = "Engineering"
/datum/autolathe/recipe/powermodule
name = "power control module"
path = /obj/item/weapon/module/power_control
category = "Engineering"
/datum/autolathe/recipe/rcd_ammo
name = "matter cartridge"
path = /obj/item/weapon/rcd_ammo
category = "Engineering"
/datum/autolathe/recipe/scalpel
name = "scalpel"
path = /obj/item/weapon/scalpel
category = "Medical"
/datum/autolathe/recipe/circularsaw
name = "circular saw"
path = /obj/item/weapon/circular_saw
category = "Medical"
/datum/autolathe/recipe/surgicaldrill
name = "surgical drill"
path = /obj/item/weapon/surgicaldrill
category = "Medical"
/datum/autolathe/recipe/retractor
name = "retractor"
path = /obj/item/weapon/retractor
category = "Medical"
/datum/autolathe/recipe/cautery
name = "cautery"
path = /obj/item/weapon/cautery
category = "Medical"
/datum/autolathe/recipe/hemostat
name = "hemostat"
path = /obj/item/weapon/hemostat
category = "Medical"
/datum/autolathe/recipe/beaker
name = "glass beaker"
path = /obj/item/weapon/reagent_containers/glass/beaker
category = "Medical"
/datum/autolathe/recipe/beaker_large
name = "large glass beaker"
path = /obj/item/weapon/reagent_containers/glass/beaker/large
category = "Medical"
/datum/autolathe/recipe/vial
name = "glass vial"
path = /obj/item/weapon/reagent_containers/glass/beaker/vial
category = "Medical"
/datum/autolathe/recipe/syringe
name = "syringe"
path = /obj/item/weapon/reagent_containers/syringe
category = "Medical"
/datum/autolathe/recipe/shotgun_blanks
name = "blanks"
path = /obj/item/ammo_casing/shotgun/blank
category = "Arms and Ammunition"
/datum/autolathe/recipe/shotgun_beanbag
name = "beanbag rounds"
path = /obj/item/ammo_casing/shotgun/beanbag
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_rubber
name = "magazine (.45 rubber)"
path = /obj/item/ammo_magazine/c45r
category = "Arms and Ammunition"
/datum/autolathe/recipe/consolescreen
name = "console screen"
path = /obj/item/weapon/stock_parts/console_screen
category = "Devices and Components"
/datum/autolathe/recipe/igniter
name = "igniter"
path = /obj/item/device/assembly/igniter
category = "Devices and Components"
/datum/autolathe/recipe/signaler
name = "signaler"
path = /obj/item/device/assembly/signaler
category = "Devices and Components"
/datum/autolathe/recipe/sensor_infra
name = "infrared sensor"
path = /obj/item/device/assembly/infra
category = "Devices and Components"
/datum/autolathe/recipe/timer
name = "timer"
path = /obj/item/device/assembly/timer
category = "Devices and Components"
/datum/autolathe/recipe/sensor_prox
name = "proximity sensor"
path = /obj/item/device/assembly/prox_sensor
category = "Devices and Components"
/datum/autolathe/recipe/tube
name = "light tube"
path = /obj/item/weapon/light/tube
category = "General"
/datum/autolathe/recipe/bulb
name = "light bulb"
path = /obj/item/weapon/light/bulb
category = "General"
/datum/autolathe/recipe/ashtray_glass
name = "glass ashtray"
path = /obj/item/ashtray/glass
category = "General"
/datum/autolathe/recipe/camera_assembly
name = "camera assembly"
path = /obj/item/weapon/camera_assembly
category = "Engineering"
/datum/autolathe/recipe/flamethrower
name = "flamethrower"
path = /obj/item/weapon/flamethrower/full
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_revolver_1
name = ""
path = /obj/item/ammo_magazine/a357
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_revolver_2
name = "magazine (.45)"
path = /obj/item/ammo_magazine/c45m
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/shotgun
name = "shotgun"
path = /obj/item/ammo_casing/shotgun
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/shotgun_dart
name = "shotgun dart"
path = /obj/item/ammo_casing/shotgun/dart
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/rcd
name = "rapid construction device"
path = /obj/item/weapon/rcd
hidden = 1
category = "Engineering"
/datum/autolathe/recipe/electropack
name = "electropack"
path = /obj/item/device/radio/electropack
hidden = 1
category = "Devices and Components"
/datum/autolathe/recipe/welder_industrial
name = "industrial welding tool"
path = /obj/item/weapon/weldingtool/largetank
hidden = 1
category = "Tools"
/datum/autolathe/recipe/handcuffs
name = "handcuffs"
path = /obj/item/weapon/handcuffs
hidden = 1
category = "General"

View File

@@ -94,11 +94,6 @@
src.view_range = num
cameranet.updateVisibility(src, 0)
/obj/machinery/camera/proc/shock(var/mob/living/user)
if(!istype(user))
return
user.electrocute_act(10, src)
/obj/machinery/camera/attack_paw(mob/living/carbon/alien/humanoid/user as mob)
if(!istype(user))
return

View File

@@ -6,8 +6,7 @@
w_class = 2
anchored = 0
m_amt = 700
g_amt = 300
matter = list("metal" = 700,"glass" = 300)
// Motion, EMP-Proof, X-Ray
var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/sheet/mineral/phoron, /obj/item/weapon/reagent_containers/food/snacks/grown/carrot)

View File

@@ -50,7 +50,6 @@
if(CAMERA_WIRE_POWER)
deactivate(usr, 1)
//shock(usr)
if(CAMERA_WIRE_LIGHT)
light_disabled = 1

View File

@@ -160,7 +160,7 @@
//Machine Frame Circuit Boards
/*Common Parts: Parts List: Ignitor, Timer, Infra-red laser, Infra-red sensor, t_scanner, Capacitor, Valve, sensor unit,
micro-manipulator, console screen, beaker, Microlaser, matter bin, power cells.
Note: Once everything is added to the public areas, will add m_amt and g_amt to circuit boards since autolathe won't be able
Note: Once everything is added to the public areas, will add materials to circuit boards since autolathe won't be able
to destroy them and players will be able to make replacements.
*/
/obj/item/weapon/circuitboard/destructive_analyzer

View File

@@ -610,17 +610,12 @@ About the new airlock wires panel:
// shock user with probability prb (if all connections & power are working)
// returns 1 if shocked, 0 otherwise
// The preceding comment was borrowed from the grille's shock script
/obj/machinery/door/airlock/proc/shock(mob/user, prb)
if((stat & (NOPOWER)) || !src.arePowerSystemsOn()) // unpowered, no shock
/obj/machinery/door/airlock/shock(mob/user, prb)
if(!arePowerSystemsOn())
return 0
if(hasShocked)
return 0 //Already shocked someone recently?
if(!prob(prb))
return 0 //you lucked out, no shock for you
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start() //sparks always.
if(electrocute_mob(user, get_area(src), src))
if(..())
hasShocked = 1
sleep(10)
hasShocked = 0
@@ -831,7 +826,7 @@ About the new airlock wires panel:
if (src.isElectrified())
if (istype(mover, /obj/item))
var/obj/item/i = mover
if (i.m_amt)
if (i.matter["metal"])
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
@@ -1332,7 +1327,7 @@ About the new airlock wires panel:
/obj/machinery/door/airlock/New()
..()
//wires
if (!secured_wires)
airlockWireColorToFlag = globalAirlockWireColorToFlag
@@ -1341,14 +1336,14 @@ About the new airlock wires panel:
airlockWireColorToIndex = globalAirlockWireColorToIndex
else
randomize_wires()
if(src.closeOtherId != null)
spawn (5)
for (var/obj/machinery/door/airlock/A in world)
if(A.closeOtherId == src.closeOtherId && A != src)
src.closeOther = A
break
/obj/machinery/door/airlock/proc/randomize_wires()
var/wire_assignments = CreateRandomAirlockWires()
airlockWireColorToFlag = wire_assignments[1]

View File

@@ -5,8 +5,8 @@
icon = 'icons/obj/doors/door_assembly.dmi'
icon_state = "door_electronics"
w_class = 2.0 //It should be tiny! -Agouri
m_amt = 50
g_amt = 50
matter = list("metal" = 50,"glass" = 50)
req_access = list(access_engine)
@@ -113,4 +113,4 @@
/obj/item/weapon/airlock_electronics/secure
name = "secure airlock electronics"
desc = "designed to be somewhat more resistant to hacking than standard electronics."
origin_tech = "programming=3"
origin_tech = "programming=3"

View File

@@ -407,16 +407,6 @@
src.visible_message("\red <b>[src] launches [throw_item.name] at [target.name]!</b>")
return 1
/obj/machinery/smartfridge/proc/shock(mob/user, prb)
if(!ispowered) return 0
if(!prob(prb)) return 0
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return electrocute_mob(user, get_area(src), src, 0.7)
/************************
* Secure SmartFridges
*************************/

View File

@@ -258,3 +258,16 @@ Class Procs:
state(text, "blue")
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
/obj/machinery/proc/shock(mob/user, prb)
if(stat & (BROKEN|NOPOWER))
return 0
if(!prob(prb))
return 0
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (electrocute_mob(user, get_area(src), src, 0.7))
return 1
else
return 0

View File

@@ -21,7 +21,7 @@
if(!O:amount)
return
while(metal_amount < 150000 && O:amount)
src.metal_amount += O:m_amt /*O:height * O:width * O:length * 100000.0*/
src.metal_amount += O.matter["metal"] /*O:height * O:width * O:length * 100000.0*/
O:amount--
count++

View File

@@ -1027,19 +1027,6 @@
if (WIRE_SCANID)
locked = !locked
/obj/machinery/suit_cycler/proc/shock(mob/user, prb)
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
return 0
if(!prob(prb))
return 0
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (electrocute_mob(user, get_area(src), src, 0.7))
return 1
else
return 0
//There HAS to be a less bloated way to do this. TODO: some kind of table/icon name coding? ~Z
/obj/machinery/suit_cycler/proc/apply_paintjob()

View File

@@ -159,7 +159,7 @@
user << "\blue You insert the [W] into the [src]"
else if(istype(W, /obj/item/weapon/wrench))
if(do_after(user, 20))
if(!src) return
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
@@ -171,7 +171,7 @@
user.visible_message("[user] unfastens the bolts securing \the [src] to the floor.", "You unfasten the bolts securing \the [src] to the floor.")
anchored = 0
return
else if(src.panel_open)
for(var/datum/data/vending_product/R in product_records)
@@ -601,19 +601,6 @@
src.shoot_inventory = !src.shoot_inventory
/obj/machinery/vending/proc/shock(mob/user, prb)
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
return 0
if(!prob(prb))
return 0
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (electrocute_mob(user, get_area(src), src, 0.7))
return 1
else
return 0
/*
* Vending machine types
*/

View File

@@ -16,8 +16,9 @@
throw_range = 15
throw_speed = 3
desc = "You can use this on airlocks or APCs to try to hack them without cutting wires."
m_amt = 50
g_amt = 20
matter = list("metal" = 50,"glass" = 20)
origin_tech = "magnets=1;engineering=1"
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage

View File

@@ -7,8 +7,9 @@
w_class = 2
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
m_amt = 50
g_amt = 20
matter = list("metal" = 50,"glass" = 20)
icon_action_button = "action_flashlight"
var/on = 0
var/brightness_on = 4 //luminosity when on
@@ -119,8 +120,7 @@
brightness_on = 5
w_class = 4
flags = FPRINT | TABLEPASS | CONDUCT
m_amt = 0
g_amt = 0
on = 1
@@ -195,7 +195,7 @@
src.force = on_damage
src.damtype = "fire"
processing_objects += src
/obj/item/device/flashlight/slime
gender = PLURAL
name = "glowing slime extract"
@@ -204,16 +204,14 @@
icon_state = "floor1" //not a slime extract sprite but... something close enough!
item_state = "slime"
w_class = 1
m_amt = 0
g_amt = 0
brightness_on = 6
on = 1 //Bio-luminesence has one setting, on.
/obj/item/device/flashlight/slime/New()
SetLuminosity(brightness_on)
spawn(1) //Might be sloppy, but seems to be necessary to prevent further runtimes and make these work as intended... don't judge me!
update_brightness()
icon_state = initial(icon_state)
/obj/item/device/flashlight/slime/attack_self(mob/user)
return //Bio-luminescence does not toggle.

View File

@@ -15,7 +15,8 @@
throw_range = 15
throw_speed = 3
desc = "You can use this on airlocks or APCs to try to hack them without cutting wires."
m_amt = 50
g_amt = 20
matter = list("metal" = 50,"glass" = 20)
origin_tech = "magnets=1;engineering=1"
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage

View File

@@ -10,8 +10,9 @@
throwforce = 5
throw_speed = 1
throw_range = 2
m_amt = 750
w_amt = 750
matter = list("metal" = 750,"waste" = 750)
origin_tech = "powerstorage=3;syndicate=5"
var/drain_rate = 600000 // amount of power to drain per tick
var/power_drained = 0 // has drained this much power

View File

@@ -7,8 +7,9 @@
flags = FPRINT | CONDUCT | TABLEPASS
slot_flags = SLOT_BACK
w_class = 5.0
g_amt = 2500
m_amt = 10000
matter = list("metal" = 10000,"glass" = 2500)
var/code = 2
/obj/item/device/radio/electropack/attack_hand(mob/user as mob)

View File

@@ -3,8 +3,7 @@
desc = "An updated, modular intercom that fits over the head. Takes encryption keys"
icon_state = "headset"
item_state = "headset"
g_amt = 0
m_amt = 75
matter = list("metal" = 75)
subspace_transmission = 1
canhear_range = 0 // can't hear headsets from very far away

View File

@@ -30,8 +30,9 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
throw_speed = 2
throw_range = 9
w_class = 2
g_amt = 25
m_amt = 75
matter = list("glass" = 25,"metal" = 75)
var/const/WIRE_SIGNAL = 1 //sends a signal, like to set off a bomb or electrocute someone
var/const/WIRE_RECEIVE = 2
var/const/WIRE_TRANSMIT = 4
@@ -761,10 +762,10 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
continue
src.channels += ch_name
src.channels[ch_name] += keyslot.channels[ch_name]
if(keyslot.syndie)
src.syndie = 1
for (var/ch_name in src.channels)
if(!radio_controller)

View File

@@ -17,7 +17,9 @@ REAGENT SCANNER
slot_flags = SLOT_BELT
w_class = 2
item_state = "electronic"
m_amt = 150
matter = list("metal" = 150)
origin_tech = "magnets=1;engineering=1"
/obj/item/device/t_scanner/attack_self(mob/user)
@@ -71,7 +73,7 @@ REAGENT SCANNER
w_class = 2.0
throw_speed = 5
throw_range = 10
m_amt = 200
matter = list("metal" = 200)
origin_tech = "magnets=1;biotech=1"
var/mode = 1;
@@ -208,8 +210,9 @@ REAGENT SCANNER
throwforce = 5
throw_speed = 4
throw_range = 20
m_amt = 30
g_amt = 20
matter = list("metal" = 30,"glass" = 20)
origin_tech = "magnets=1;engineering=1"
/obj/item/device/analyzer/attack_self(mob/user as mob)
@@ -278,8 +281,9 @@ REAGENT SCANNER
throwforce = 5
throw_speed = 4
throw_range = 20
m_amt = 30
g_amt = 20
matter = list("metal" = 30,"glass" = 20)
origin_tech = "magnets=2;biotech=2"
var/details = 0
var/recent_fail = 0
@@ -351,8 +355,8 @@ REAGENT SCANNER
throwforce = 5
throw_speed = 4
throw_range = 20
m_amt = 30
g_amt = 20
matter = list("metal" = 30,"glass" = 20)
origin_tech = "magnets=2;biotech=2"
var/details = 0
var/recent_fail = 0

View File

@@ -4,8 +4,9 @@
icon_state = "taperecorderidle"
item_state = "analyzer"
w_class = 2.0
m_amt = 60
g_amt = 30
matter = list("metal" = 60,"glass" = 30)
var/emagged = 0.0
var/recording = 0.0
var/playing = 0.0

View File

@@ -9,7 +9,7 @@
throwforce = 15.0
throw_speed = 5
throw_range = 20
m_amt = 1875
matter = list("metal" = 1875)
max_amount = 60
attack_verb = list("hit", "bludgeoned", "whacked")
@@ -63,4 +63,4 @@
usr << "\blue You assemble a grille"
F.add_fingerprint(usr)
use(2)
return
return

View File

@@ -15,7 +15,7 @@
desc = "HOLY SHEET! That is a lot of glass."
singular_name = "glass sheet"
icon_state = "sheet-glass"
g_amt = 3750
matter = list("glass" = 3750)
origin_tech = "materials=1"
var/created_window = /obj/structure/window/basic
@@ -24,7 +24,7 @@
desc = "HOLY SHEET! That is a lot of glass."
singular_name = "glass sheet"
icon_state = "sheet-glass"
g_amt = 0
matter = null
created_window = /obj/structure/window/basic
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
@@ -123,8 +123,9 @@
desc = "Glass which seems to have rods or something stuck in them."
singular_name = "reinforced glass sheet"
icon_state = "sheet-rglass"
g_amt = 3750
m_amt = 1875
matter = list("metal" = 1875,"glass" = 3750)
origin_tech = "materials=2"
/obj/item/stack/sheet/rglass/cyborg
@@ -132,8 +133,6 @@
desc = "Glass which seems to have rods or something stuck in them."
singular_name = "reinforced glass sheet"
icon_state = "sheet-rglass"
g_amt = 0
m_amt = 0
/obj/item/stack/sheet/rglass/attack_self(mob/user as mob)
construct_window(user)
@@ -317,7 +316,7 @@
desc = "A very strong and very resistant sheet of a phoron-glass alloy."
singular_name = "phoron glass sheet"
icon_state = "sheet-phoronglass"
g_amt = 7500
matter = list("glass" = 7500)
origin_tech = "materials=3;phoron=2"
created_window = /obj/structure/window/phoronbasic
@@ -349,8 +348,8 @@
desc = "Phoron glass which seems to have rods or something stuck in them."
singular_name = "reinforced phoron glass sheet"
icon_state = "sheet-phoronrglass"
g_amt = 7500
m_amt = 1875
matter = list("glass" = 7500,"metal" = 1875)
origin_tech = "materials=4;phoron=2"
created_window = /obj/structure/window/phoronreinforced

View File

@@ -78,7 +78,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
desc = "Sheets made out off metal. It has been dubbed Metal Sheets."
singular_name = "metal sheet"
icon_state = "sheet-metal"
m_amt = 3750
matter = list("metal" = 3750)
throwforce = 14.0
flags = FPRINT | TABLEPASS | CONDUCT
origin_tech = "materials=1"
@@ -88,7 +88,6 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
desc = "Sheets made out off metal. It has been dubbed Metal Sheets."
singular_name = "metal sheet"
icon_state = "sheet-metal"
m_amt = 0
throwforce = 14.0
flags = FPRINT | TABLEPASS | CONDUCT
@@ -113,7 +112,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
desc = "This sheet is an alloy of iron and phoron."
icon_state = "sheet-plasteel"
item_state = "sheet-metal"
m_amt = 7500
matter = list("metal" = 7500)
throwforce = 15.0
flags = FPRINT | TABLEPASS | CONDUCT
origin_tech = "materials=2"

View File

@@ -5,7 +5,7 @@
icon_state = "tile"
w_class = 3.0
force = 6.0
m_amt = 937.5
matter = list("metal" = 937.5)
throwforce = 15.0
throw_speed = 5
throw_range = 20
@@ -42,4 +42,4 @@
S.ChangeTurf(/turf/simulated/floor/plating)
// var/turf/simulated/floor/W = S.ReplaceWithFloor()
// W.make_plating()
return
return

View File

@@ -126,8 +126,9 @@
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
w_class = 3.0
g_amt = 10
m_amt = 10
matter = list("glass" = 10,"metal" = 10)
attack_verb = list("struck", "pistol whipped", "hit", "bashed")
var/bullets = 7.0
@@ -182,8 +183,9 @@
icon_state = "357-7"
flags = FPRINT | TABLEPASS| CONDUCT
w_class = 1.0
g_amt = 10
m_amt = 10
matter = list("metal" = 10,"glass" = 10)
var/amount_left = 7.0
update_icon()

View File

@@ -18,10 +18,10 @@ RCD
throw_speed = 1
throw_range = 5
w_class = 3.0
m_amt = 50000
matter = list("metal" = 50000)
origin_tech = "engineering=4;materials=2"
var/datum/effect/effect/system/spark_spread/spark_system
var/matter = 0
var/stored_matter = 0
var/working = 0
var/mode = 1
var/canRwall = 0
@@ -29,7 +29,7 @@ RCD
New()
desc = "A RCD. It currently holds [matter]/30 matter-units."
desc = "A RCD. It currently holds [stored_matter]/30 matter-units."
src.spark_system = new /datum/effect/effect/system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -39,15 +39,15 @@ RCD
attackby(obj/item/weapon/W, mob/user)
..()
if(istype(W, /obj/item/weapon/rcd_ammo))
if((matter + 10) > 30)
if((stored_matter + 10) > 30)
user << "<span class='notice'>The RCD cant hold any more matter-units.</span>"
return
user.drop_item()
del(W)
matter += 10
stored_matter += 10
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
user << "<span class='notice'>The RCD now holds [matter]/30 matter-units.</span>"
desc = "A RCD. It currently holds [matter]/30 matter-units."
user << "<span class='notice'>The RCD now holds [stored_matter]/30 matter-units.</span>"
desc = "A RCD. It currently holds [stored_matter]/30 matter-units."
return
@@ -163,14 +163,14 @@ RCD
return 0
/obj/item/weapon/rcd/proc/useResource(var/amount, var/mob/user)
if(matter < amount)
if(stored_matter < amount)
return 0
matter -= amount
desc = "A RCD. It currently holds [matter]/30 matter-units."
stored_matter -= amount
desc = "A RCD. It currently holds [stored_matter]/30 matter-units."
return 1
/obj/item/weapon/rcd/proc/checkResource(var/amount, var/mob/user)
return matter >= amount
return stored_matter >= amount
/obj/item/weapon/rcd/borg/useResource(var/amount, var/mob/user)
if(!isrobot(user))
return 0
@@ -196,5 +196,4 @@ RCD
density = 0
anchored = 0.0
origin_tech = "materials=2"
m_amt = 30000
g_amt = 15000
matter = list("metal" = 30000,"glass" = 15000)

View File

@@ -3,6 +3,8 @@ CONTAINS:
RSF
*/
//TODO: WHAT THE FUCK, FIX THIS GARBAGE.
/obj/item/weapon/rsf
name = "\improper Rapid-Service-Fabricator"
desc = "A device used to rapidly deploy service items."
@@ -11,26 +13,26 @@ RSF
opacity = 0
density = 0
anchored = 0.0
var/matter = 0
var/stored_matter = 0
var/mode = 1
flags = TABLEPASS
w_class = 3.0
/obj/item/weapon/rsf/New()
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
/obj/item/weapon/rsf/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/rcd_ammo))
if ((matter + 10) > 30)
if ((stored_matter + 10) > 30)
user << "The RSF cant hold any more matter."
return
del(W)
matter += 10
stored_matter += 10
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
user << "The RSF now holds [stored_matter]/30 fabrication-units."
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
/obj/item/weapon/rsf/attack_self(mob/user as mob)
@@ -67,7 +69,7 @@ RSF
return
if (istype(A, /obj/structure/table) && mode == 1)
if (istype(A, /obj/structure/table) && matter >= 1)
if (istype(A, /obj/structure/table) && stored_matter >= 1)
user << "Dispensing Dosh..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/spacecash/c10( A.loc )
@@ -75,13 +77,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
stored_matter--
user << "The RSF now holds [stored_matter]/30 fabrication-units."
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 1)
if (istype(A, /turf/simulated/floor) && matter >= 1)
if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
user << "Dispensing Dosh..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/spacecash/c10( A )
@@ -89,13 +91,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
stored_matter--
user << "The RSF now holds [stored_matter]/30 fabrication-units."
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 2)
if (istype(A, /obj/structure/table) && matter >= 1)
if (istype(A, /obj/structure/table) && stored_matter >= 1)
user << "Dispensing Drinking Glass..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass( A.loc )
@@ -103,13 +105,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 50
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
stored_matter--
user << "The RSF now holds [stored_matter]/30 fabrication-units."
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 2)
if (istype(A, /turf/simulated/floor) && matter >= 1)
if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
user << "Dispensing Drinking Glass..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass( A )
@@ -117,13 +119,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 50
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
stored_matter--
user << "The RSF now holds [stored_matter]/30 fabrication-units."
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 3)
if (istype(A, /obj/structure/table) && matter >= 1)
if (istype(A, /obj/structure/table) && stored_matter >= 1)
user << "Dispensing Paper Sheet..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/paper( A.loc )
@@ -131,13 +133,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 10
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
stored_matter--
user << "The RSF now holds [stored_matter]/30 fabrication-units."
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 3)
if (istype(A, /turf/simulated/floor) && matter >= 1)
if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
user << "Dispensing Paper Sheet..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/paper( A )
@@ -145,13 +147,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 10
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
stored_matter--
user << "The RSF now holds [stored_matter]/30 fabrication-units."
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 4)
if (istype(A, /obj/structure/table) && matter >= 1)
if (istype(A, /obj/structure/table) && stored_matter >= 1)
user << "Dispensing Pen..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/pen( A.loc )
@@ -159,13 +161,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 50
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
stored_matter--
user << "The RSF now holds [stored_matter]/30 fabrication-units."
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 4)
if (istype(A, /turf/simulated/floor) && matter >= 1)
if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
user << "Dispensing Pen..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/pen( A )
@@ -173,13 +175,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 50
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
stored_matter--
user << "The RSF now holds [stored_matter]/30 fabrication-units."
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 5)
if (istype(A, /obj/structure/table) && matter >= 1)
if (istype(A, /obj/structure/table) && stored_matter >= 1)
user << "Dispensing Dice Pack..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/storage/pill_bottle/dice( A.loc )
@@ -187,13 +189,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
stored_matter--
user << "The RSF now holds [stored_matter]/30 fabrication-units."
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 5)
if (istype(A, /turf/simulated/floor) && matter >= 1)
if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
user << "Dispensing Dice Pack..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/storage/pill_bottle/dice( A )
@@ -201,13 +203,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
stored_matter--
user << "The RSF now holds [stored_matter]/30 fabrication-units."
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 6)
if (istype(A, /obj/structure/table) && matter >= 1)
if (istype(A, /obj/structure/table) && stored_matter >= 1)
user << "Dispensing Cigarette..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/clothing/mask/cigarette( A.loc )
@@ -215,13 +217,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 10
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
stored_matter--
user << "The RSF now holds [stored_matter]/30 fabrication-units."
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 6)
if (istype(A, /turf/simulated/floor) && matter >= 1)
if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
user << "Dispensing Cigarette..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/clothing/mask/cigarette( A )
@@ -229,7 +231,7 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 10
else
matter--
user << "The RSF now holds [matter]/30 fabrication-units."
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
stored_matter--
user << "The RSF now holds [stored_matter]/30 fabrication-units."
desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return

View File

@@ -11,7 +11,7 @@
throw_speed = 2
throw_range = 10
force = 10.0
m_amt = 90
matter = list("metal" = 90)
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
var/max_water = 50
var/last_use = 1.0
@@ -28,7 +28,6 @@
throwforce = 2
w_class = 2.0
force = 3.0
m_amt = 0
max_water = 30
sprite_name = "miniFE"

View File

@@ -10,7 +10,7 @@
throw_speed = 1
throw_range = 5
w_class = 3.0
m_amt = 500
matter = list("metal" = 500)
origin_tech = "combat=1;phorontech=1"
var/status = 0
var/throw_amount = 100

View File

@@ -10,7 +10,7 @@
w_class = 2.0
throw_speed = 2
throw_range = 5
m_amt = 500
matter = list("metal" = 500)
origin_tech = "materials=1"
var/dispenser = 0
var/breakouttime = 1200 //Deciseconds = 120s = 2 minutes

View File

@@ -159,7 +159,7 @@
throwforce = 6.0
throw_speed = 3
throw_range = 6
m_amt = 12000
matter = list("metal" = 12000)
origin_tech = "materials=1"
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
@@ -189,7 +189,7 @@
throwforce = 8.0
throw_speed = 3
throw_range = 6
m_amt = 12000
matter = list("metal" = 12000)
origin_tech = "materials=1"
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
@@ -259,7 +259,7 @@
throw_range = 5
w_class = 3.0
flags = FPRINT | TABLEPASS | CONDUCT
m_amt = 3000
matter = list("metal" = 3000)
/* // NOPE
var/food_total= 0
var/burger_amt = 0

View File

@@ -8,8 +8,7 @@ var/global/list/cached_icons = list()
icon = 'icons/obj/items.dmi'
icon_state = "paint_neutral"
item_state = "paintcan"
m_amt = 200
g_amt = 0
matter = list("metal" = 200)
w_class = 3.0
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(10,20,30,50,70)

View File

@@ -13,12 +13,11 @@
w_class = 3.0
var/charge = 0 // note %age conveted to actual charge in New
var/maxcharge = 1000
m_amt = 700
g_amt = 50
var/rigged = 0 // true if rigged to explode
var/minor_fault = 0 //If not 100% reliable, it will build up faults.
var/construction_cost = list("metal"=750,"glass"=75)
var/construction_time=100
matter = list("metal" = 700, "glass" = 50)
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is licking the electrodes of the [src.name]! It looks like \he's trying to commit suicide.</b>"
@@ -29,7 +28,7 @@
desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT
origin_tech = "powerstorage=0"
maxcharge = 500
g_amt = 40
matter = list("glass" = 40)
/obj/item/weapon/cell/crap/empty/New()
..()
@@ -39,7 +38,7 @@
name = "security borg rechargable D battery"
origin_tech = "powerstorage=0"
maxcharge = 600 //600 max charge / 100 charge per shot = six shots
g_amt = 40
matter = list("glass" = 40)
/obj/item/weapon/cell/secborg/empty/New()
..()
@@ -50,7 +49,7 @@
origin_tech = "powerstorage=2"
icon_state = "hcell"
maxcharge = 10000
g_amt = 60
matter = list("glass" = 60)
/obj/item/weapon/cell/high/empty/New()
..()
@@ -61,7 +60,7 @@
origin_tech = "powerstorage=5"
icon_state = "scell"
maxcharge = 20000
g_amt = 70
matter = list("glass" = 70)
construction_cost = list("metal"=750,"glass"=100)
/obj/item/weapon/cell/super/empty/New()
@@ -73,7 +72,7 @@
origin_tech = "powerstorage=6"
icon_state = "hpcell"
maxcharge = 30000
g_amt = 80
matter = list("glass" = 80)
construction_cost = list("metal"=500,"glass"=150,"gold"=200,"silver"=200)
/obj/item/weapon/cell/hyper/empty/New()
@@ -85,7 +84,7 @@
icon_state = "icell"
origin_tech = null
maxcharge = 30000
g_amt = 80
matter = list("glass"= 80)
use()
return 1
@@ -97,8 +96,6 @@
icon_state = "potato_cell" //"potato_battery"
charge = 100
maxcharge = 300
m_amt = 0
g_amt = 0
minor_fault = 1
@@ -110,5 +107,4 @@
icon_state = "yellow slime extract" //"potato_battery"
maxcharge = 10000
maxcharge = 10000
m_amt = 0
g_amt = 0
matter = null

View File

@@ -13,8 +13,7 @@
throw_speed = 1
throw_range = 4
w_class = 4.0
g_amt = 7500
m_amt = 1000
matter = list("glass" = 7500, "metal" = 1000)
origin_tech = "materials=2"
attack_verb = list("shoved", "bashed")
var/cooldown = 0 //shield bash cooldown. based on world.time

View File

@@ -16,8 +16,7 @@
desc = "Retracts stuff."
icon = 'icons/obj/surgery.dmi'
icon_state = "retractor"
m_amt = 10000
g_amt = 5000
matter = list("metal" = 10000, "glass" = 5000)
flags = FPRINT | TABLEPASS | CONDUCT
w_class = 2.0
origin_tech = "materials=1;biotech=1"
@@ -130,8 +129,7 @@ LOOK FOR SURGERY.DM*/
desc = "You think you have seen this before."
icon = 'icons/obj/surgery.dmi'
icon_state = "hemostat"
m_amt = 5000
g_amt = 2500
matter = list("metal" = 5000, "glass" = 2500)
flags = FPRINT | TABLEPASS | CONDUCT
w_class = 2.0
origin_tech = "materials=1;biotech=1"
@@ -265,8 +263,7 @@ LOOK FOR SURGERY.DM*/
desc = "This stops bleeding."
icon = 'icons/obj/surgery.dmi'
icon_state = "cautery"
m_amt = 5000
g_amt = 2500
matter = list("metal" = 5000, "glass" = 2500)
flags = FPRINT | TABLEPASS | CONDUCT
w_class = 2.0
origin_tech = "materials=1;biotech=1"
@@ -356,8 +353,7 @@ LOOK FOR SURGERY.DM*/
icon = 'icons/obj/surgery.dmi'
icon_state = "drill"
hitsound = 'sound/weapons/circsawhit.ogg'
m_amt = 15000
g_amt = 10000
matter = list("metal" = 15000, "glass" = 10000)
flags = FPRINT | TABLEPASS | CONDUCT
force = 15.0
w_class = 2.0
@@ -383,8 +379,7 @@ LOOK FOR SURGERY.DM*/
throwforce = 5.0
throw_speed = 3
throw_range = 5
m_amt = 10000
g_amt = 5000
matter = list("metal" = 10000, "glass" = 5000)
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
@@ -664,8 +659,7 @@ LOOK FOR SURGERY.DM*/
throwforce = 9.0
throw_speed = 3
throw_range = 5
m_amt = 20000
g_amt = 10000
matter = list("metal" = 20000,"glass" = 10000)
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "slashed", "sawed", "cut")

View File

@@ -21,7 +21,7 @@
item_state = "electronic"
throw_speed = 4
throw_range = 20
m_amt = 400
matter = list("metal" = 400)
origin_tech = "magnets=1"
/obj/item/weapon/locator/attack_self(mob/user as mob)
@@ -132,7 +132,7 @@ Frequency:
w_class = 2.0
throw_speed = 3
throw_range = 5
m_amt = 10000
matter = list("metal" = 10000)
origin_tech = "magnets=1;bluespace=3"
/obj/item/weapon/hand_tele/attack_self(mob/user as mob)

View File

@@ -24,7 +24,7 @@
force = 5.0
throwforce = 7.0
w_class = 2.0
m_amt = 150
matter = list("metal" = 150)
origin_tech = "materials=1;engineering=1"
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
@@ -44,8 +44,7 @@
throwforce = 5.0
throw_speed = 3
throw_range = 5
g_amt = 0
m_amt = 75
matter = list("metal" = 75)
attack_verb = list("stabbed")
suicide_act(mob/user)
@@ -103,7 +102,7 @@
throw_speed = 2
throw_range = 9
w_class = 2.0
m_amt = 80
matter = list("metal" = 80)
origin_tech = "materials=1;engineering=1"
attack_verb = list("pinched", "nipped")
@@ -141,8 +140,7 @@
w_class = 2.0
//Cost to make in the autolathe
m_amt = 70
g_amt = 30
matter = list("metal" = 70, "glass" = 30)
//R&D tech level
origin_tech = "engineering=1"
@@ -395,24 +393,21 @@
/obj/item/weapon/weldingtool/largetank
name = "Industrial Welding Tool"
max_fuel = 40
m_amt = 70
g_amt = 60
matter = list("metal" = 70, "glass" = 60)
origin_tech = "engineering=2"
/obj/item/weapon/weldingtool/hugetank
name = "Upgraded Welding Tool"
max_fuel = 80
w_class = 3.0
m_amt = 70
g_amt = 120
matter = list("metal" = 70, "glass" = 120)
origin_tech = "engineering=3"
/obj/item/weapon/weldingtool/experimental
name = "Experimental Welding Tool"
max_fuel = 40
w_class = 3.0
m_amt = 70
g_amt = 120
matter = list("metal" = 70, "glass" = 120)
origin_tech = "engineering=4;phoron=3"
var/last_gen = 0
@@ -439,7 +434,7 @@
throwforce = 7.0
item_state = "crowbar"
w_class = 2.0
m_amt = 50
matter = list("metal" = 50)
origin_tech = "engineering=1"
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")

View File

@@ -1,8 +1,7 @@
/obj
//var/datum/module/mod //not used
var/m_amt = 0 // metal
var/g_amt = 0 // glass
var/w_amt = 0 // waster amounts
//Used to store information about the contents of the object.
var/list/matter
var/origin_tech = null //Used by R&D to determine what research bonuses it grants.
var/reliability = 100 //Used by SOME devices to determine how reliable they are.
var/crit_fail = 0

View File

@@ -5,9 +5,7 @@
icon_state = ""
flags = FPRINT | TABLEPASS| CONDUCT
w_class = 2.0
m_amt = 100
g_amt = 0
w_amt = 0
matter = list("metal" = 100)
throwforce = 2
throw_speed = 3
throw_range = 10

View File

@@ -2,9 +2,7 @@
name = "igniter"
desc = "A small electronic device able to ignite combustable substances."
icon_state = "igniter"
m_amt = 500
g_amt = 50
w_amt = 10
matter = list("metal" = 500, "glass" = 50, "waste" = 10)
origin_tech = "magnets=1"
secured = 1

View File

@@ -4,9 +4,7 @@
name = "infrared emitter"
desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted."
icon_state = "infrared"
m_amt = 1000
g_amt = 500
w_amt = 100
matter = list("metal" = 1000, "glass" = 500, "waste" = 100)
origin_tech = "magnets=2"
wires = WIRE_PULSE

View File

@@ -2,8 +2,7 @@
name = "mousetrap"
desc = "A handy little spring-loaded trap for catching pesty rodents."
icon_state = "mousetrap"
m_amt = 100
w_amt = 10
matter = list("metal" = 100, "waste" = 10)
origin_tech = "combat=1"
var/armed = 0

View File

@@ -2,9 +2,7 @@
name = "proximity sensor"
desc = "Used for scanning and alerting when someone enters a certain proximity."
icon_state = "prox"
m_amt = 800
g_amt = 200
w_amt = 50
matter = list("metal" = 800, "glass" = 200, "waste" = 50)
origin_tech = "magnets=1"
wires = WIRE_PULSE

View File

@@ -3,9 +3,7 @@
desc = "Used to remotely activate devices."
icon_state = "signaller"
item_state = "signaler"
m_amt = 1000
g_amt = 200
w_amt = 100
matter = list("metal" = 1000, "glass" = 200, "waste" = 100)
origin_tech = "magnets=1"
wires = WIRE_RECEIVE | WIRE_PULSE | WIRE_RADIO_PULSE | WIRE_RADIO_RECEIVE

View File

@@ -2,9 +2,7 @@
name = "timer"
desc = "Used to time things. Works well with contraptions which has to count down. Tick tock."
icon_state = "timer"
m_amt = 500
g_amt = 50
w_amt = 10
matter = list("metal" = 500, "glass" = 50, "waste" = 10)
origin_tech = "magnets=1"
wires = WIRE_PULSE
@@ -20,7 +18,7 @@
activate()
if(!..()) return 0//Cooldown check
timing = !timing
update_icon()

View File

@@ -17,8 +17,7 @@
icon_state = "welding"
flags = (FPRINT | TABLEPASS | HEADCOVERSEYES | HEADCOVERSMOUTH)
item_state = "welding"
m_amt = 3000
g_amt = 1000
matter = list("metal" = 3000, "glass" = 1000)
var/up = 0
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
flags_inv = (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)

View File

@@ -326,7 +326,7 @@
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
matter = list("glass" = 5000)
volume = 100
/obj/item/weapon/reagent_containers/glass/beaker/fluff/eleanor_stone //Rkf45: Eleanor Stone

View File

@@ -58,7 +58,7 @@
throwforce = 4.0
item_state = "pickaxe"
w_class = 4.0
m_amt = 3750 //one sheet, but where can you make them?
matter = list("metal" = 3750)
var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO
origin_tech = "materials=1;engineering=1"
attack_verb = list("hit", "pierced", "sliced", "attacked")
@@ -155,7 +155,7 @@
throwforce = 4.0
item_state = "shovel"
w_class = 3.0
m_amt = 50
matter = list("metal" = 50)
origin_tech = "materials=1;engineering=1"
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")

View File

@@ -171,7 +171,7 @@
w_class = 2.0
throw_speed = 5
throw_range = 10
m_amt = 200
matter = list("metal" = 200)
origin_tech = "magnets=1;biotech=1"
var/mode = 1;

View File

@@ -21,7 +21,7 @@
w_class = 1.0
throw_speed = 7
throw_range = 15
m_amt = 10
matter = list("metal" = 10)
var/colour = "black" //what colour the ink is!
pressure_resistance = 2

View File

@@ -119,7 +119,7 @@
w_class = 2.0
flags = FPRINT | CONDUCT | TABLEPASS
slot_flags = SLOT_BELT
m_amt = 2000
matter = list("metal" = 2000)
var/pictures_max = 10
var/pictures_left = 10
var/on = 1

View File

@@ -9,7 +9,7 @@
w_class = 1.0
throw_speed = 7
throw_range = 15
m_amt = 60
matter = list("metal" = 60)
item_color = "cargo"
pressure_resistance = 2
attack_verb = list("stamped")

View File

@@ -210,8 +210,7 @@ proc/cardinalrange(var/center)
throwforce = 5
throw_speed = 1
throw_range = 2
m_amt = 100
w_amt = 2000
matter = list("metal" = 100, "waste" = 2000)
/obj/item/device/am_shielding_container/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/device/multitool) && istype(src.loc,/turf))

View File

@@ -1425,17 +1425,4 @@
malfvacate(1)*/
..()
/obj/machinery/power/apc/proc/shock(mob/user, prb)
if(!prob(prb))
return 0
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if(isalien(user))
return 0
if (electrocute_mob(user, src, src))
return 1
else
return 0
#undef APC_UPDATE_ICON_COOLDOWN

View File

@@ -212,8 +212,7 @@
w_class = 2.0
throw_speed = 2
throw_range = 5
m_amt = 50
g_amt = 20
matter = list("metal" = 50, "glass" = 20)
flags = TABLEPASS | FPRINT | CONDUCT
slot_flags = SLOT_BELT
item_state = "coil"

View File

@@ -646,7 +646,7 @@
var/status = 0 // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN
var/base_state
var/switchcount = 0 // number of times switched
m_amt = 60
matter = list("metal" = 60)
var/rigged = 0 // true if rigged to explode
var/brightness = 2 //how much light it gives off
@@ -656,7 +656,7 @@
icon_state = "ltube"
base_state = "ltube"
item_state = "c_tube"
g_amt = 100
matter = list("glass" = 100)
brightness = 8
/obj/item/weapon/light/tube/large
@@ -670,7 +670,7 @@
icon_state = "lbulb"
base_state = "lbulb"
item_state = "contvapour"
g_amt = 100
matter = list("glass" = 100)
brightness = 5
/obj/item/weapon/light/throw_impact(atom/hit_atom)
@@ -683,7 +683,7 @@
icon_state = "fbulb"
base_state = "fbulb"
item_state = "egg4"
g_amt = 100
matter = list("glass" = 100)
brightness = 5
// update the icon state and description of the light

View File

@@ -50,7 +50,7 @@
/obj/machinery/containment_field/proc/shock(mob/living/user as mob)
/obj/machinery/containment_field/shock(mob/living/user as mob)
if(hasShocked)
return 0
if(!FG1 || !FG2)

View File

@@ -51,7 +51,7 @@
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
item_state = "syringe_kit"
m_amt = 50000
matter = list("metal" = 50000)
throwforce = 2
w_class = 2.0
throw_speed = 4

View File

@@ -60,7 +60,7 @@
icon_state = "gshell"
caliber = "shotgun"
projectile_type = "/obj/item/projectile/bullet"
m_amt = 12500
matter = list("metal" = 12500)
/obj/item/ammo_casing/shotgun/blank
@@ -68,7 +68,7 @@
desc = "A blank shell."
icon_state = "blshell"
projectile_type = ""
m_amt = 250
matter = list("metal" = 250)
/obj/item/ammo_casing/shotgun/beanbag
@@ -76,7 +76,7 @@
desc = "A weak beanbag shell."
icon_state = "bshell"
projectile_type = "/obj/item/projectile/bullet/weakbullet/beanbag"
m_amt = 500
matter = list("metal" = 500)
/obj/item/ammo_casing/shotgun/stunshell
@@ -84,7 +84,7 @@
desc = "A stunning shell."
icon_state = "stunshell"
projectile_type = "/obj/item/projectile/bullet/stunshot"
m_amt = 2500
matter = list("metal" = 2500)
/obj/item/ammo_casing/shotgun/dart
@@ -92,7 +92,7 @@
desc = "A dart for use in shotguns."
icon_state = "dart"
projectile_type = "/obj/item/projectile/energy/dart"
m_amt = 12500
matter = list("metal" = 12500)
/obj/item/ammo_casing/a762
desc = "A 7.62 bullet casing."

View File

@@ -6,7 +6,7 @@
item_state = "gun"
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
m_amt = 2000
matter = list("metal" = 2000)
w_class = 3.0
throwforce = 5
throw_speed = 4
@@ -194,7 +194,7 @@
playsound(user, fire_sound, 10, 1)
else
playsound(user, fire_sound, 50, 1)
if(istype(in_chamber, /obj/item/projectile/beam/lastertag))
if(istype(in_chamber, /obj/item/projectile/beam/lastertag))
user.show_message("<span class = 'warning'>You feel rather silly, trying to commit suicide with a toy.</span>")
mouthshoot = 0
return

View File

@@ -5,7 +5,7 @@
item_state = "laser"
fire_sound = 'sound/weapons/Laser.ogg'
w_class = 3.0
m_amt = 2000
matter = list("metal" = 2000)
origin_tech = "combat=3;magnets=2"
projectile_type = "/obj/item/projectile/beam"

View File

@@ -65,7 +65,7 @@
icon_state = "crossbow"
w_class = 2.0
item_state = "crossbow"
m_amt = 2000
matter = list("metal" = 2000)
origin_tech = "combat=2;magnets=2;syndicate=5"
silenced = 1
fire_sound = 'sound/weapons/Genhit.ogg'
@@ -103,7 +103,7 @@
desc = "A weapon favored by syndicate infiltration teams."
w_class = 4.0
force = 10
m_amt = 200000
matter = list("metal" = 200000)
projectile_type = "/obj/item/projectile/energy/bolt/large"

View File

@@ -9,7 +9,7 @@
caliber = "357"
origin_tech = "combat=2;materials=2"
w_class = 3.0
m_amt = 1000
matter = list("metal" = 1000)
recoil = 1
var/ammo_type = "/obj/item/ammo_casing/a357"
var/list/loaded = list()

View File

@@ -11,7 +11,7 @@
force = 5.0
var/list/grenades = new/list()
var/max_grenades = 3
m_amt = 2000
matter = list("metal" = 2000)
examine()
set src in view()

View File

@@ -160,8 +160,7 @@
icon = 'icons/obj/chemical.dmi'
icon_state = "beaker"
item_state = "beaker"
m_amt = 0
g_amt = 500
matter = list("glass" = 500)
on_reagent_change()
update_icon()
@@ -205,7 +204,7 @@
name = "large beaker"
desc = "A large beaker. Can hold up to 100 units."
icon_state = "beakerlarge"
g_amt = 5000
matter = list("glass" = 5000)
volume = 100
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25,30,50,100)
@@ -215,7 +214,7 @@
name = "cryostasis beaker"
desc = "A cryostasis beaker that allows for chemical storage without reactions. Can hold up to 50 units."
icon_state = "beakernoreact"
g_amt = 500
matter = list("glass" = 500)
volume = 50
amount_per_transfer_from_this = 10
flags = FPRINT | TABLEPASS | OPENCONTAINER | NOREACT
@@ -224,7 +223,7 @@
name = "bluespace beaker"
desc = "A bluespace beaker, powered by experimental bluespace technology. Can hold up to 300 units."
icon_state = "beakerbluespace"
g_amt = 5000
matter = list("glass" = 5000)
volume = 300
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25,30,50,100,300)
@@ -235,7 +234,7 @@
name = "vial"
desc = "A small glass vial. Can hold up to 25 units."
icon_state = "vial"
g_amt = 250
matter = list("glass" = 250)
volume = 25
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25)
@@ -265,8 +264,7 @@
icon = 'icons/obj/janitor.dmi'
icon_state = "bucket"
item_state = "bucket"
m_amt = 200
g_amt = 0
matter = list("metal" = 200)
w_class = 3.0
amount_per_transfer_from_this = 20
possible_transfer_amounts = list(10,20,30,50,70)
@@ -280,7 +278,7 @@
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
user.drop_from_inventory(src)
del(src)
update_icon()
overlays.Cut()

View File

@@ -11,7 +11,7 @@
icon = 'icons/obj/syringe.dmi'
item_state = "syringe_0"
icon_state = "0"
g_amt = 150
matter = list("glass" = 150)
amount_per_transfer_from_this = 5
possible_transfer_amounts = null //list(5,10,15)
volume = 15

View File

@@ -13,7 +13,7 @@
force = 4.0
var/list/syringes = new/list()
var/max_syringes = 1
m_amt = 2000
matter = list("metal" = 2000)
/obj/item/weapon/gun/syringe/examine()
set src in view()

View File

@@ -10,7 +10,7 @@
anchored = 0
density = 0
pressure_resistance = 5*ONE_ATMOSPHERE
m_amt = 1850
matter = list("metal" = 1850)
level = 2
var/ptype = 0
// 0=straight, 1=bent, 2=junction-j1, 3=junction-j2, 4=junction-y, 5=trunk, 6=disposal bin, 7=outlet, 8=inlet

View File

@@ -1722,8 +1722,7 @@ datum/design/security_hud
icon_state = "datadisk2"
item_state = "card-id"
w_class = 2.0
m_amt = 30
g_amt = 10
matter = list("metal" = 30,"glass" = 10)
var/datum/design/blueprint
/obj/item/weapon/disk/design_disk/New()

View File

@@ -163,7 +163,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else
//The construction/deconstruction of the console code.
..()
src.updateUsrDialog()
return
@@ -264,8 +264,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(linked_destroy.loaded_item.reliability < 100 && linked_destroy.loaded_item.crit_fail)
files.UpdateDesign(linked_destroy.loaded_item.type)
if(linked_lathe) //Also sends salvaged materials to a linked protolathe, if any.
linked_lathe.m_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.m_amt*linked_destroy.decon_mod))
linked_lathe.g_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.g_amt*linked_destroy.decon_mod))
linked_lathe.m_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter["metal"]*linked_destroy.decon_mod))
linked_lathe.g_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter["glass"]*linked_destroy.decon_mod))
linked_destroy.loaded_item = null
for(var/obj/I in linked_destroy.contents)
for(var/mob/M in I.contents)

View File

@@ -36,20 +36,6 @@
src.disable_wire = pick(w)
w -= src.disable_wire
/obj/machinery/r_n_d/proc/
shock(mob/user, prb)
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
return 0
if(!prob(prb))
return 0
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if (electrocute_mob(user, get_area(src), src, 0.7))
return 1
else
return 0
/obj/machinery/r_n_d/attack_hand(mob/user as mob)
if (shocked)
shock(user,50)

View File

@@ -263,8 +263,7 @@ datum/tech/robotics
icon_state = "datadisk2"
item_state = "card-id"
w_class = 2.0
m_amt = 30
g_amt = 10
matter = list("metal" = 30, "glass" = 10)
var/datum/tech/stored
/obj/item/weapon/disk/tech_disk/New()

View File

@@ -75,8 +75,7 @@ datum
desc = "A small, open-topped glass container for delicate research samples. It sports a re-useable strip for labelling with a pen."
icon = 'icons/obj/device.dmi'
icon_state = "solution_tray"
m_amt = 0
g_amt = 5
matter = list("glass" = 5)
w_class = 2.0
amount_per_transfer_from_this = 1
possible_transfer_amounts = list(1, 2)