mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
TG: Updated Cell charger and recharger
Cell charger and Recharger are now wrenchable to make them moveable Cleaned up autolathe code, removed the delay when inserting sheets, using any item on it while maintence cover is open will result in cable window opening. Revision: r3406 Author: daniel.cf.hultgren
This commit is contained in:
@@ -377,18 +377,6 @@
|
|||||||
var/control = 0
|
var/control = 0
|
||||||
req_access = list(access_engine_equip)
|
req_access = list(access_engine_equip)
|
||||||
|
|
||||||
/obj/machinery/cell_charger
|
|
||||||
name = "cell charger"
|
|
||||||
desc = "A charging unit for power cells."
|
|
||||||
icon = 'power.dmi'
|
|
||||||
icon_state = "ccharger0"
|
|
||||||
var/obj/item/weapon/cell/charging = null
|
|
||||||
var/chargelevel = -1
|
|
||||||
anchored = 1
|
|
||||||
use_power = 1
|
|
||||||
idle_power_usage = 5
|
|
||||||
active_power_usage = 60
|
|
||||||
|
|
||||||
/obj/machinery/light_switch
|
/obj/machinery/light_switch
|
||||||
name = "light switch"
|
name = "light switch"
|
||||||
desc = "It turns lights on and off. What are you, simple?"
|
desc = "It turns lights on and off. What are you, simple?"
|
||||||
|
|||||||
@@ -1,11 +1,144 @@
|
|||||||
/obj/machinery/autolathe
|
var/global/list/autolathe_recipes = list( \
|
||||||
var/busy = 0
|
/* screwdriver removed*/ \
|
||||||
var/max_m_amount = 150000.0
|
new /obj/item/weapon/reagent_containers/glass/bucket(), \
|
||||||
var/max_g_amount = 75000.0
|
new /obj/item/weapon/crowbar(), \
|
||||||
var/outputAmount = 1
|
new /obj/item/device/flashlight(), \
|
||||||
var/makeDir = 0
|
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/helmet/welding(), \
|
||||||
|
new /obj/item/weapon/stock_parts/console_screen(), \
|
||||||
|
new /obj/item/weapon/airlock_electronics(), \
|
||||||
|
new /obj/item/weapon/module/power_control(), \
|
||||||
|
new /obj/item/weapon/circuitboard/disposal(), \
|
||||||
|
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/ammo_casing/shotgun/blank(), \
|
||||||
|
new /obj/item/ammo_casing/shotgun/beanbag(), \
|
||||||
|
new /obj/item/ammo_magazine/c38(), \
|
||||||
|
new /obj/item/device/taperecorder(), \
|
||||||
|
new /obj/item/device/assembly/igniter(), \
|
||||||
|
new /obj/item/device/infra_sensor(), \
|
||||||
|
new /obj/item/device/assembly/signaler(), \
|
||||||
|
new /obj/item/device/radio/headset(), \
|
||||||
|
new /obj/item/device/radio(), \
|
||||||
|
new /obj/item/device/assembly/infra(), \
|
||||||
|
new /obj/item/device/assembly/timer(), \
|
||||||
|
new /obj/item/weapon/light/tube(), \
|
||||||
|
new /obj/item/weapon/light/bulb(), \
|
||||||
|
new /obj/item/ashtray/glass()
|
||||||
|
)
|
||||||
|
|
||||||
/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
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_casing/shotgun(), \
|
||||||
|
new /obj/item/ammo_casing/shotgun/dart(), \
|
||||||
|
/* new /obj/item/weapon/shield/riot(), */ \
|
||||||
|
)
|
||||||
|
|
||||||
|
/obj/machinery/autolathe
|
||||||
|
var
|
||||||
|
busy = 0
|
||||||
|
max_m_amount = 150000.0
|
||||||
|
max_g_amount = 75000.0
|
||||||
|
outputAmount = 1
|
||||||
|
makeDir = 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>")
|
||||||
|
|
||||||
|
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>")
|
||||||
|
dat += "<FONT color=green><B>Output Queue:</B></FONT> [outputAmount] (<A href='?src=\ref[src];modifyOutputAmount=1'>Modify</A>)"
|
||||||
|
dat += "<HR>"
|
||||||
|
var/list/heldContainers = list()
|
||||||
|
for(var/obj/item/weapon/storage/container in src.contents)
|
||||||
|
heldContainers += container
|
||||||
|
if(heldContainers.len)
|
||||||
|
for(var/obj/item/weapon/storage/container in heldContainers)
|
||||||
|
dat += "<A href='?src=\ref[src];removeContainer=\ref[container]'>[container.name] (eject stored container)</A><br>"
|
||||||
|
else
|
||||||
|
dat += "No held storage containers"
|
||||||
|
dat += "<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")
|
||||||
|
|
||||||
|
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)
|
||||||
|
return
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||||
if (stat)
|
if (stat)
|
||||||
return 1
|
return 1
|
||||||
if(istype(O,/obj/item/weapon/storage/))
|
if(istype(O,/obj/item/weapon/storage/))
|
||||||
@@ -45,8 +178,10 @@
|
|||||||
del(src)
|
del(src)
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
user << "\red You can't load the autolathe while it's opened."
|
user.machine = src
|
||||||
|
interact(user)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
if (src.m_amount + O.m_amt > max_m_amount)
|
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."
|
user << "\red The autolathe is full. Please remove metal from the autolathe in order to insert more."
|
||||||
return 1
|
return 1
|
||||||
@@ -81,93 +216,27 @@
|
|||||||
stack.use(amount)
|
stack.use(amount)
|
||||||
else
|
else
|
||||||
usr.before_take_item(O)
|
usr.before_take_item(O)
|
||||||
flick("autolathe_o",src)//plays metal insertion animation
|
|
||||||
O.loc = src
|
O.loc = src
|
||||||
icon_state = "autolathe"
|
icon_state = "autolathe"
|
||||||
busy = 1
|
busy = 1
|
||||||
use_power(max(1000, (m_amt+g_amt)*amount/10))
|
use_power(max(1000, (m_amt+g_amt)*amount/10))
|
||||||
spawn(16)
|
|
||||||
icon_state = "autolathe"
|
|
||||||
src.m_amount += m_amt * amount
|
src.m_amount += m_amt * amount
|
||||||
src.g_amount += g_amt * amount
|
src.g_amount += g_amt * amount
|
||||||
|
user << "You insert [amount] sheet[amount>1 ? "s" : ""] to the autolathe."
|
||||||
if (O && O.loc == src)
|
if (O && O.loc == src)
|
||||||
del(O)
|
del(O)
|
||||||
busy = 0
|
busy = 0
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
|
|
||||||
/obj/machinery/autolathe/attack_paw(mob/user as mob)
|
attack_paw(mob/user as mob)
|
||||||
return src.attack_hand(user)
|
return src.attack_hand(user)
|
||||||
|
|
||||||
/obj/machinery/autolathe/attack_hand(mob/user as mob)
|
attack_hand(mob/user as mob)
|
||||||
user.machine = src
|
user.machine = src
|
||||||
interact(user)
|
interact(user)
|
||||||
|
|
||||||
/obj/machinery/autolathe/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>")
|
|
||||||
|
|
||||||
dat += text("The red light is [src.disabled ? "off" : "on"].<BR>")
|
Topic(href, href_list)
|
||||||
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")
|
|
||||||
|
|
||||||
/obj/machinery/autolathe/proc/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>")
|
|
||||||
dat += "<FONT color=green><B>Output Queue:</B></FONT> [outputAmount] (<A href='?src=\ref[src];modifyOutputAmount=1'>Modify</A>)"
|
|
||||||
dat += "<HR>"
|
|
||||||
var/list/heldContainers = list()
|
|
||||||
for(var/obj/item/weapon/storage/container in src.contents)
|
|
||||||
heldContainers += container
|
|
||||||
if(heldContainers.len)
|
|
||||||
for(var/obj/item/weapon/storage/container in heldContainers)
|
|
||||||
dat += "<A href='?src=\ref[src];removeContainer=\ref[container]'>[container.name] (eject stored container)</A><br>"
|
|
||||||
else
|
|
||||||
dat += "No held storage containers"
|
|
||||||
dat += "<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")
|
|
||||||
|
|
||||||
/obj/machinery/autolathe/proc/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)
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/autolathe/Topic(href, href_list)
|
|
||||||
if(..())
|
if(..())
|
||||||
return
|
return
|
||||||
usr.machine = src
|
usr.machine = src
|
||||||
@@ -192,18 +261,18 @@
|
|||||||
var/power = max(2000, (template.m_amt+template.g_amt)*multiplier/5)
|
var/power = max(2000, (template.m_amt+template.g_amt)*multiplier/5)
|
||||||
restart:
|
restart:
|
||||||
if(outputAmount > 0)
|
if(outputAmount > 0)
|
||||||
if( (src.m_amount >= template.m_amt*multiplier) && (src.g_amount >= template.g_amt*multiplier) )
|
if(src.m_amount >= template.m_amt*multiplier && src.g_amount >= template.g_amt*multiplier)
|
||||||
|
busy = 1
|
||||||
use_power(power)
|
use_power(power)
|
||||||
icon_state = "autolathe"
|
icon_state = "autolathe"
|
||||||
flick("autolathe_n",src)
|
flick("autolathe_n",src)
|
||||||
spawn(16)
|
spawn(16)
|
||||||
|
|
||||||
if(!busy)
|
if(!busy)
|
||||||
busy = 1
|
busy = 1
|
||||||
use_power(power)
|
use_power(power)
|
||||||
flick("autolathe_n",src)
|
|
||||||
spawn(16)
|
spawn(16)
|
||||||
use_power(power)
|
use_power(power)
|
||||||
flick("autolathe_n",src)
|
|
||||||
spawn(16)
|
spawn(16)
|
||||||
flick("autolathe_n",src)
|
flick("autolathe_n",src)
|
||||||
src.m_amount -= template.m_amt*multiplier
|
src.m_amount -= template.m_amt*multiplier
|
||||||
@@ -269,60 +338,8 @@
|
|||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
return
|
return
|
||||||
|
|
||||||
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/helmet/welding(), \
|
|
||||||
new /obj/item/weapon/stock_parts/console_screen(), \
|
|
||||||
new /obj/item/weapon/airlock_electronics(), \
|
|
||||||
new /obj/item/weapon/module/power_control(), \
|
|
||||||
new /obj/item/weapon/circuitboard/disposal(), \
|
|
||||||
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/ammo_casing/shotgun/blank(), \
|
|
||||||
new /obj/item/ammo_casing/shotgun/beanbag(), \
|
|
||||||
new /obj/item/ammo_magazine/c38(), \
|
|
||||||
new /obj/item/device/taperecorder(), \
|
|
||||||
new /obj/item/device/assembly/igniter(), \
|
|
||||||
new /obj/item/device/infra_sensor(), \
|
|
||||||
new /obj/item/device/assembly/signaler(), \
|
|
||||||
new /obj/item/device/radio/headset(), \
|
|
||||||
new /obj/item/device/radio(), \
|
|
||||||
new /obj/item/device/assembly/infra(), \
|
|
||||||
new /obj/item/device/assembly/timer(), \
|
|
||||||
new /obj/item/weapon/light/tube(), \
|
|
||||||
new /obj/item/weapon/light/bulb(), \
|
|
||||||
new /obj/item/ashtray/glass()
|
|
||||||
)
|
|
||||||
|
|
||||||
var/global/list/autolathe_recipes_hidden = list( \
|
RefreshParts()
|
||||||
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_casing/shotgun(), \
|
|
||||||
new /obj/item/ammo_casing/shotgun/dart(), \
|
|
||||||
/* new /obj/item/weapon/shield/riot(), */ \
|
|
||||||
)
|
|
||||||
|
|
||||||
/obj/machinery/autolathe/RefreshParts()
|
|
||||||
..()
|
..()
|
||||||
var/tot_rating = 0
|
var/tot_rating = 0
|
||||||
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
|
for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
|
||||||
@@ -331,7 +348,7 @@ var/global/list/autolathe_recipes_hidden = list( \
|
|||||||
max_m_amount = tot_rating * 2
|
max_m_amount = tot_rating * 2
|
||||||
max_g_amount = tot_rating
|
max_g_amount = tot_rating
|
||||||
|
|
||||||
/obj/machinery/autolathe/New()
|
New()
|
||||||
..()
|
..()
|
||||||
component_parts = list()
|
component_parts = list()
|
||||||
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
|
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
|
||||||
@@ -361,16 +378,3 @@ var/global/list/autolathe_recipes_hidden = list( \
|
|||||||
w -= src.shock_wire
|
w -= src.shock_wire
|
||||||
src.disable_wire = pick(w)
|
src.disable_wire = pick(w)
|
||||||
w -= src.disable_wire
|
w -= src.disable_wire
|
||||||
|
|
||||||
/obj/machinery/autolathe/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
|
|
||||||
@@ -1,20 +1,19 @@
|
|||||||
/obj/machinery/cell_charger/attackby(obj/item/weapon/W, mob/user)
|
|
||||||
if(stat & BROKEN)
|
|
||||||
return
|
|
||||||
|
|
||||||
if(istype(W, /obj/item/weapon/cell))
|
/obj/machinery/cell_charger
|
||||||
if(charging)
|
name = "cell charger"
|
||||||
user << "There is already a cell in the charger."
|
desc = "It charges power cells."
|
||||||
return
|
icon = 'power.dmi'
|
||||||
else
|
icon_state = "ccharger0"
|
||||||
user.drop_item()
|
anchored = 1
|
||||||
W.loc = src
|
use_power = 1
|
||||||
charging = W
|
idle_power_usage = 5
|
||||||
user.visible_message("[user] inserts a cell into the charger.", "You insert a cell into the charger.")
|
active_power_usage = 60
|
||||||
|
power_channel = EQUIP
|
||||||
|
var
|
||||||
|
obj/item/weapon/cell/charging = null
|
||||||
chargelevel = -1
|
chargelevel = -1
|
||||||
|
proc
|
||||||
updateicon()
|
updateicon()
|
||||||
|
|
||||||
/obj/machinery/cell_charger/proc/updateicon()
|
|
||||||
icon_state = "ccharger[charging ? 1 : 0]"
|
icon_state = "ccharger[charging ? 1 : 0]"
|
||||||
|
|
||||||
if(charging && !(stat & (BROKEN|NOPOWER)) )
|
if(charging && !(stat & (BROKEN|NOPOWER)) )
|
||||||
@@ -30,9 +29,45 @@
|
|||||||
chargelevel = newlevel
|
chargelevel = newlevel
|
||||||
else
|
else
|
||||||
overlays = null
|
overlays = null
|
||||||
|
examine()
|
||||||
|
set src in oview(5)
|
||||||
|
..()
|
||||||
|
usr << "There's [charging ? "a" : "no"] cell in the charger."
|
||||||
|
if(charging)
|
||||||
|
usr << "Current charge: [charging.charge]"
|
||||||
|
|
||||||
/obj/machinery/cell_charger/attack_hand(mob/user)
|
attackby(obj/item/weapon/W, mob/user)
|
||||||
|
if(stat & BROKEN)
|
||||||
|
return
|
||||||
|
|
||||||
|
if(istype(W, /obj/item/weapon/cell) && anchored)
|
||||||
|
if(charging)
|
||||||
|
user << "\red There is already a cell in the charger."
|
||||||
|
return
|
||||||
|
else
|
||||||
|
var/area/a = loc.loc // Gets our locations location, like a dream within a dream
|
||||||
|
if(!isarea(a))
|
||||||
|
return
|
||||||
|
if(a.power_equip == 0) // There's no APC in this area, don't try to cheat power!
|
||||||
|
user << "\red The charger rejects the cell!"
|
||||||
|
return
|
||||||
|
|
||||||
|
user.drop_item()
|
||||||
|
W.loc = src
|
||||||
|
charging = W
|
||||||
|
user.visible_message("[user] inserts a cell into the charger.", "You insert a cell into the charger.")
|
||||||
|
chargelevel = -1
|
||||||
|
updateicon()
|
||||||
|
else if(istype(W, /obj/item/weapon/wrench))
|
||||||
|
if(charging)
|
||||||
|
user << "\red Remove the cell first!"
|
||||||
|
return
|
||||||
|
|
||||||
|
anchored = !anchored
|
||||||
|
user << "You [anchored ? "attach" : "detach"] the cell charger [anchored ? "to" : "from"] the ground"
|
||||||
|
playsound(src.loc, 'Ratchet.ogg', 75, 1)
|
||||||
|
|
||||||
|
attack_hand(mob/user)
|
||||||
if(charging)
|
if(charging)
|
||||||
usr.put_in_hand(charging)
|
usr.put_in_hand(charging)
|
||||||
charging.add_fingerprint(user)
|
charging.add_fingerprint(user)
|
||||||
@@ -43,12 +78,12 @@
|
|||||||
chargelevel = -1
|
chargelevel = -1
|
||||||
updateicon()
|
updateicon()
|
||||||
|
|
||||||
/obj/machinery/cell_charger/attack_ai(mob/user)
|
attack_ai(mob/user)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/cell_charger/process()
|
process()
|
||||||
//world << "ccpt [charging] [stat]"
|
//world << "ccpt [charging] [stat]"
|
||||||
if(!charging || (stat & (BROKEN|NOPOWER)) )
|
if(!charging || (stat & (BROKEN|NOPOWER)) || !anchored)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/added = charging.give(75)
|
var/added = charging.give(75)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
obj/machinery/recharger
|
obj/machinery/recharger
|
||||||
anchored = 1.0
|
anchored = 1
|
||||||
icon = 'stationobjs.dmi'
|
icon = 'stationobjs.dmi'
|
||||||
icon_state = "recharger0"
|
icon_state = "recharger0"
|
||||||
name = "recharger"
|
name = "recharger"
|
||||||
@@ -11,27 +11,42 @@ obj/machinery/recharger
|
|||||||
obj/item/weapon/gun/energy/charging = null
|
obj/item/weapon/gun/energy/charging = null
|
||||||
obj/item/weapon/melee/baton/charging2 = null
|
obj/item/weapon/melee/baton/charging2 = null
|
||||||
|
|
||||||
/obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
|
attackby(obj/item/weapon/G as obj, mob/user as mob)
|
||||||
|
if (istype(G, /obj/item/weapon/gun/energy))
|
||||||
if (src.charging || src.charging2)
|
if (src.charging || src.charging2)
|
||||||
return
|
return
|
||||||
if (istype(G, /obj/item/weapon/gun/energy))
|
|
||||||
if (istype(G, /obj/item/weapon/gun/energy/gun/nuclear) || istype(G, /obj/item/weapon/gun/energy/crossbow))
|
if (istype(G, /obj/item/weapon/gun/energy/gun/nuclear) || istype(G, /obj/item/weapon/gun/energy/crossbow))
|
||||||
user << "Your gun's recharge port was removed to make room for a miniaturized reactor."
|
user << "Your gun's recharge port was removed to make room for a miniaturized reactor."
|
||||||
return
|
return
|
||||||
if (istype(G, /obj/item/weapon/gun/energy/staff))
|
if (istype(G, /obj/item/weapon/gun/energy/staff))
|
||||||
user << "It's a wooden staff, not a gun!"
|
user << "It's a wooden staff, not a gun!"
|
||||||
return
|
return
|
||||||
|
var/area/a = loc.loc // Gets our locations location, like a dream within a dream
|
||||||
|
if(!isarea(a))
|
||||||
|
return
|
||||||
|
if(a.power_equip == 0) // There's no APC in this area, don't try to cheat power!
|
||||||
|
user << "\red The recharger rejects the weapon!"
|
||||||
|
return
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
G.loc = src
|
G.loc = src
|
||||||
src.charging = G
|
src.charging = G
|
||||||
use_power = 2
|
use_power = 2
|
||||||
if (istype(G, /obj/item/weapon/melee/baton))
|
else if (istype(G, /obj/item/weapon/melee/baton))
|
||||||
|
if (src.charging || src.charging2)
|
||||||
|
return
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
G.loc = src
|
G.loc = src
|
||||||
src.charging2 = G
|
src.charging2 = G
|
||||||
use_power = 2
|
use_power = 2
|
||||||
|
else if(istype(G, /obj/item/weapon/wrench))
|
||||||
|
if (src.charging || src.charging2)
|
||||||
|
user << "\red Remove the weapon first!"
|
||||||
|
return
|
||||||
|
anchored = !anchored
|
||||||
|
user << "You [anchored ? "attach" : "detach"] the recharger [anchored ? "to" : "from"] the ground"
|
||||||
|
playsound(src.loc, 'Ratchet.ogg', 75, 1)
|
||||||
|
|
||||||
/obj/machinery/recharger/attack_hand(mob/user as mob)
|
attack_hand(mob/user as mob)
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
if(ishuman(user))
|
if(ishuman(user))
|
||||||
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
|
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
|
||||||
@@ -49,24 +64,27 @@ obj/machinery/recharger
|
|||||||
src.charging2 = null
|
src.charging2 = null
|
||||||
use_power = 1
|
use_power = 1
|
||||||
|
|
||||||
/obj/machinery/recharger/attack_paw(mob/user as mob)
|
attack_paw(mob/user as mob)
|
||||||
if ((ticker && ticker.mode.name == "monkey"))
|
if ((ticker && ticker.mode.name == "monkey"))
|
||||||
return src.attack_hand(user)
|
return src.attack_hand(user)
|
||||||
|
|
||||||
/obj/machinery/recharger/process()
|
process()
|
||||||
if ((src.charging) && ! (stat & NOPOWER) )
|
if(stat & (NOPOWER|BROKEN) || !anchored)
|
||||||
|
return
|
||||||
|
|
||||||
|
if (src.charging)
|
||||||
if (src.charging.power_supply.charge < src.charging.power_supply.maxcharge)
|
if (src.charging.power_supply.charge < src.charging.power_supply.maxcharge)
|
||||||
src.charging.power_supply.give(100)
|
src.charging.power_supply.give(100)
|
||||||
src.icon_state = "recharger1"
|
src.icon_state = "recharger1"
|
||||||
use_power(250)
|
use_power(250)
|
||||||
else
|
else
|
||||||
src.icon_state = "recharger2"
|
src.icon_state = "recharger2"
|
||||||
if ((src.charging2) && ! (stat & NOPOWER) )
|
else if (src.charging2)
|
||||||
if (src.charging2.charges < src.charging2.maximum_charges)
|
if (src.charging2.charges < src.charging2.maximum_charges)
|
||||||
src.charging2.charges++
|
src.charging2.charges++
|
||||||
src.icon_state = "recharger1"
|
src.icon_state = "recharger1"
|
||||||
use_power(250)
|
use_power(250)
|
||||||
else
|
else
|
||||||
src.icon_state = "recharger2"
|
src.icon_state = "recharger2"
|
||||||
else if (!(src.charging || src.charging2))
|
else
|
||||||
src.icon_state = "recharger0"
|
src.icon_state = "recharger0"
|
||||||
|
|||||||
@@ -59,6 +59,10 @@ should be listed in the changelog upon commit though. Thanks. -->
|
|||||||
|
|
||||||
<div class="commit sansserif">
|
<div class="commit sansserif">
|
||||||
<h2 class="date">30th April 2012</h2>
|
<h2 class="date">30th April 2012</h2>
|
||||||
|
<h3 class="author">Mloc updated:</h3>
|
||||||
|
<ul class="changes bgimages16">
|
||||||
|
<li class="rscadd">Due to new NT hiring protocols, characters can now only be between the ages of 20-65 instead of 15-45.</li>
|
||||||
|
</ul>
|
||||||
<h3 class="author">Erthilo updated:</h3>
|
<h3 class="author">Erthilo updated:</h3>
|
||||||
<ul class="changes bgimages16">
|
<ul class="changes bgimages16">
|
||||||
<li class="rscadd">Switched to /tg/'s changelog format! Previous updates can be found here: http://baystation12.net/wiki/index.php/Changelog</li>
|
<li class="rscadd">Switched to /tg/'s changelog format! Previous updates can be found here: http://baystation12.net/wiki/index.php/Changelog</li>
|
||||||
@@ -69,6 +73,7 @@ should be listed in the changelog upon commit though. Thanks. -->
|
|||||||
</ul>
|
</ul>
|
||||||
<h3 class="author">TG updated:</h3>
|
<h3 class="author">TG updated:</h3>
|
||||||
<ul class="changes bgimages16">
|
<ul class="changes bgimages16">
|
||||||
|
<li class="rscadd">The escape shuttle will now spend two minutes travelling to CentCom, woo! Objectives are only complete when the shuttle reaches CentCom, and anyone leaving the shuttle during transit time will be lost in deep space! Also, anyone standing in the way of the shuttle when it arrives will be gibbed.</li>
|
||||||
<li class="rscadd">Added Antimov module. Very dangerous.</li>
|
<li class="rscadd">Added Antimov module. Very dangerous.</li>
|
||||||
<li class="rscadd">Pill bottles now work like ore satchels, click a tile full of pills to pick them all up.</li>
|
<li class="rscadd">Pill bottles now work like ore satchels, click a tile full of pills to pick them all up.</li>
|
||||||
<li class="rscadd">Tower caps can now grow randomly as weeds</li>
|
<li class="rscadd">Tower caps can now grow randomly as weeds</li>
|
||||||
@@ -82,6 +87,31 @@ should be listed in the changelog upon commit though. Thanks. -->
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="commit sansserif">
|
||||||
|
<h2 class="date">TG</h2>
|
||||||
|
<h3 class="author">29th April 2012 updated:</h3>
|
||||||
|
<ul class="changes bgimages16">
|
||||||
|
<li class="imageadd">Added new sprites for Killer Tomatoes.</li>
|
||||||
|
<li class="rscadd">Added lasertag vests, guns, projectiles. Sprites for the vests and guns from Muncher. Not actually mapped in. Lasertag guns are only usable if you're wearing the appropriate team vest. Lasertag projectiles will only stun people who are wearing vests belonging to the opposing team.</li>
|
||||||
|
<li class="rscadd">Adds Holodeck, also not mapped in.</li>
|
||||||
|
<li class="rscadd">Janitor borgs have been massively upgraded. They now clean as they move around.</li>
|
||||||
|
<li class="rscadd">Mining shuttle now shunts people where it wants to be. Shuttles now crush people if they fail to move out of where they want to be with the initial shunt. </li>
|
||||||
|
<li class="rscadd">Adds Halloss (Hallucination Damage) as a damage type weapons can do. Halloss can be healed by sleeping. </li>
|
||||||
|
<li class="tweak">Windows can only be damaged by weapons that do brute or burn. </li>
|
||||||
|
<li class="tweak">HUD damage indicator now updates with halloss. Inspecting yourself for organ damage now randomly shows damaged organs if you have halloss. </li>
|
||||||
|
<li class="tweak">Nuke disk now respawns in all rounds. </li>
|
||||||
|
<li class="rscadd">Pinpointers now show the remaining time until a nuke goes off if it's been armed when examined. </li>
|
||||||
|
<li class="tweak">Instead of z-level transition happening when you reach the edge of the map, it will now happen 7 tiles away from the edge. This means that you will no longer see the black edge, transition will likely happen without you even noticing. </li>
|
||||||
|
<li class="tweak">Slight changes to examine messages. You cannot examine when blind/unconscious. </li>
|
||||||
|
<li class="imageadd">More new locker sprites! </li>
|
||||||
|
<li class="bugfix">Fixes glass knock sound having a pop at the end of it. </li>
|
||||||
|
<li class="bugfix">Telecomm traffic control now has its own circuitboard and doesn't transform into a server when the monitor is disconnected/reconnected. </li>
|
||||||
|
<li class="bugfix">Using an igniter on a flamethrower that already has one attached no longer uses up the igniter. </li>
|
||||||
|
<li class="bugfix">NTSL bugfixes.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Credits Section
|
Credits Section
|
||||||
-->
|
-->
|
||||||
|
|||||||
Reference in New Issue
Block a user