Files
Polaris/code/modules/power/antimatter/fuel.dm
mport2004@gmail.com 17ed3899c4 Fixed the map/code issues that the body bags caused.
/obj/effects is now /obj/effect.
/obj/station_objects is now /obj/structure.
Did a bit of minor blob work. 
The Bay 12 body bags were replaced with closets because having two sets of code that do almost the same thing is silly.
Changed back a few of the last jobproc edits as the remove from list before assign was a check to see if the mob was fucked up and if it was remove it so we did not check it again as it would still be fucked up.
The medbay/tox monkeys names are random once more.  More random name monkeys will help with changeling and clean up the observe/mob menus.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2324 316c924e-a436-60f5-8080-3fe189b3f50e
2011-10-03 10:28:57 +00:00

101 lines
2.6 KiB
Plaintext

/obj/item/weapon/fuel
name = "Magnetic Storage Ring"
desc = "A magnetic storage ring."
icon = 'items.dmi'
icon_state = "rcdammo"
opacity = 0
density = 0
anchored = 0.0
var/fuel = 0
var/s_time = 1.0
var/content = null
/obj/item/weapon/fuel/H
name = "Hydrogen storage ring"
content = "Hydrogen"
fuel = 1e-12 //pico-kilogram
/obj/item/weapon/fuel/antiH
name = "Anti-Hydrogen storage ring"
content = "Anti-Hydrogen"
fuel = 1e-12 //pico-kilogram
/obj/item/weapon/fuel/attackby(obj/item/weapon/fuel/F, mob/user)
..()
if(istype(src, /obj/item/weapon/fuel/antiH))
if(istype(F, /obj/item/weapon/fuel/antiH))
src.fuel += F.fuel
F.fuel = 0
user << "You have added the anti-Hydrogen to the storage ring, it now contains [src.fuel]kg"
if(istype(F, /obj/item/weapon/fuel/H))
src.fuel += F.fuel
del(F)
src:annihilation(src.fuel)
if(istype(src, /obj/item/weapon/fuel/H))
if(istype(F, /obj/item/weapon/fuel/H))
src.fuel += F.fuel
F.fuel = 0
user << "You have added the Hydrogen to the storage ring, it now contains [src.fuel]kg"
if(istype(F, /obj/item/weapon/fuel/antiH))
src.fuel += F.fuel
del(src)
F:annihilation(F.fuel)
/obj/item/weapon/fuel/antiH/proc/annihilation(var/mass)
var/strength = convert2energy(mass)
if (strength < 773.0)
var/turf/T = get_turf(src.loc)
if (strength > (450+T0C))
explosion(T, 0, 1, 2, 4)
else
if (strength > (300+T0C))
explosion(T, 0, 0, 2, 3)
del(src)
return
var/turf/ground_zero = get_turf(loc)
var/ground_zero_range = round(strength / 387)
explosion(ground_zero, ground_zero_range, ground_zero_range*2, ground_zero_range*3, ground_zero_range*4)
//SN src = null
del(src)
return
/obj/item/weapon/fuel/examine()
set src in view(1)
if(usr && !usr.stat)
usr << "A magnetic storage ring, it contains [fuel]kg of [content ? content : "nothing"]."
/obj/item/weapon/fuel/proc/injest(mob/M as mob)
switch(content)
if("Anti-Hydrogen")
M.gib(1)
if("Hydrogen")
M << "\blue You feel very light, as if you might just float away..."
del(src)
return
/obj/item/weapon/fuel/attack(mob/M as mob, mob/user as mob)
if (user != M)
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = user
O.target = M
O.item = src
O.s_loc = user.loc
O.t_loc = M.loc
O.place = "fuel"
M.requests += O
spawn( 0 )
O.process()
return
else
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [M] ate the [content ? content : "empty canister"]!"), 1)
src.injest(M)