mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-04 06:31:47 +00:00
- When a blood sample is taken, it retains some information on what kind of chemicals were the subject's body at the time the sample was taken. - Two new R&D Items: Mass-Spectrometer (EM Spectrum Research 2, Biotech 2) and Advanced Mass-Spectrometer (EM Spectrum Research 4, Biotech 2). Allows for the identification of chemicals in a blood sample. To use the devices, you simply use a container (or syringe) full of blood on the device and then click the device in your hand (like how you use the gas analyzer). At low reliability, they might miss some chemicals in their report or potentially even break. The Advanced version not only lists what chemicals were present in the body, but also much much. - The deconstructive analyzer now gives 1 or 2 points to a device design's reliability (rather then just 1) when analyzing a device. Also fixed some bugs in the deconstructive analyzer. - Not all devices have a 100% reliability now (most current ones did, but not all). - Few tweaks in R&D lab. Derp derp. - Mint tweaked slightly. Miners can now access the mint foyer and the mint materials loading area but not the vault (only the captain can access the vault, by default). - Research sub-paths Robotics and generators removed. Now all techs just use the primary paths. Sub-paths might be re-added later but not these ones. - Power Storage Technology renamed "Power Manipulation Technology". - More stuff can be analyzed in the destructive analyzer. Intellicards can now be produced from the protolathe (Programming 4. Requires 1000 glass and 200 gold) - Updated the R&D readme file. Now it has a list of all the holes in the tech paths (ie. Where we need to add new stuff). It's not intended as a complete list of everything that can be made or researched, just a check list to make sure all the research levels are covered. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1073 316c924e-a436-60f5-8080-3fe189b3f50e
123 lines
3.4 KiB
Plaintext
123 lines
3.4 KiB
Plaintext
// Powersink - used to drain station power
|
|
|
|
/obj/item/device/powersink
|
|
desc = "A nulling power sink which drains energy from electrical systems."
|
|
name = "power sink"
|
|
icon_state = "powersink0"
|
|
item_state = "electronic"
|
|
w_class = 4.0
|
|
flags = FPRINT | TABLEPASS | CONDUCT
|
|
throwforce = 5
|
|
throw_speed = 1
|
|
throw_range = 2
|
|
m_amt = 750
|
|
w_amt = 750
|
|
origin_tech = "powerstorage=3;syndicate=3"
|
|
var/drain_rate = 600000 // amount of power to drain per tick
|
|
var/power_drained = 0 // has drained this much power
|
|
var/max_power = 1e8 // maximum power that can be drained before exploding
|
|
var/mode = 0 // 0 = off, 1=clamped (off), 2=operating
|
|
|
|
|
|
var/obj/cable/attached // the attached cable
|
|
|
|
attackby(var/obj/item/I, var/mob/user)
|
|
if(istype(I, /obj/item/weapon/screwdriver))
|
|
if(mode == 0)
|
|
var/turf/T = loc
|
|
if(isturf(T) && !T.intact)
|
|
attached = locate() in T
|
|
if(!attached)
|
|
user << "No exposed cable here to attach to."
|
|
return
|
|
else
|
|
anchored = 1
|
|
mode = 1
|
|
user << "You attach the device to the cable."
|
|
for(var/mob/M in viewers(user))
|
|
if(M == user) continue
|
|
M << "[user] attaches the power sink to the cable."
|
|
return
|
|
else
|
|
user << "Device must be placed over an exposed cable to attach to it."
|
|
return
|
|
else
|
|
if (mode == 2)
|
|
processing_items.Remove(src) // Now the power sink actually stops draining the station's power if you unhook it. --NeoFite
|
|
anchored = 0
|
|
mode = 0
|
|
user << "You detach the device from the cable."
|
|
for(var/mob/M in viewers(user))
|
|
if(M == user) continue
|
|
M << "[user] detaches the power sink from the cable."
|
|
sd_SetLuminosity(0)
|
|
icon_state = "powersink0"
|
|
|
|
return
|
|
else
|
|
..()
|
|
|
|
|
|
|
|
attack_paw()
|
|
return
|
|
|
|
attack_ai()
|
|
return
|
|
|
|
attack_hand(var/mob/user)
|
|
switch(mode)
|
|
if(0)
|
|
..()
|
|
|
|
if(1)
|
|
user << "You activate the device!"
|
|
for(var/mob/M in viewers(user))
|
|
if(M == user) continue
|
|
M << "[user] activates the power sink!"
|
|
mode = 2
|
|
icon_state = "powersink1"
|
|
processing_items.Add(src)
|
|
|
|
if(2) //This switch option wasn't originally included. It exists now. --NeoFite
|
|
user << "You deactivate the device!"
|
|
for(var/mob/M in viewers(user))
|
|
if(M == user) continue
|
|
M << "[user] deactivates the power sink!"
|
|
mode = 1
|
|
sd_SetLuminosity(0)
|
|
icon_state = "powersink0"
|
|
processing_items.Remove(src)
|
|
|
|
process()
|
|
if(attached)
|
|
var/datum/powernet/PN = attached.get_powernet()
|
|
if(PN)
|
|
if(!luminosity)
|
|
sd_SetLuminosity(12)
|
|
|
|
|
|
// found a powernet, so drain up to max power from it
|
|
|
|
var/drained = min ( drain_rate, PN.avail )
|
|
PN.newload += drained
|
|
power_drained += drained
|
|
|
|
// if tried to drain more than available on powernet
|
|
// now look for APCs and drain their cells
|
|
if(drained < drain_rate)
|
|
for(var/obj/machinery/power/terminal/T in PN.nodes)
|
|
if(istype(T.master, /obj/machinery/power/apc))
|
|
var/obj/machinery/power/apc/A = T.master
|
|
if(A.operating && A.cell)
|
|
A.cell.charge = max(0, A.cell.charge - 50)
|
|
power_drained += 50
|
|
|
|
|
|
if(power_drained > max_power * 0.95)
|
|
playsound(src, 'screech.ogg', 100, 1, 1)
|
|
if(power_drained >= max_power)
|
|
processing_items.Remove(src)
|
|
explosion(src.loc, 3,6,9,12)
|
|
del(src)
|