Files
Paradise/code/game/machinery/igniter.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

142 lines
3.3 KiB
Plaintext

/obj/machinery/igniter/attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/igniter/attack_paw(mob/user as mob)
if ((ticker && ticker.mode.name == "monkey"))
return src.attack_hand(user)
return
/obj/machinery/igniter/attack_hand(mob/user as mob)
if(..())
return
add_fingerprint(user)
use_power(50)
src.on = !( src.on )
src.icon_state = text("igniter[]", src.on)
return
/obj/machinery/igniter/process()
if (src.on && !(stat & NOPOWER) )
var/turf/location = src.loc
if (isturf(location))
location.hotspot_expose(1000,500,1)
return 1
/obj/machinery/igniter/New()
..()
icon_state = "igniter[on]"
/obj/machinery/igniter/power_change()
if(!( stat & NOPOWER) )
icon_state = "igniter[src.on]"
else
icon_state = "igniter0"
// Wall mounted remote-control igniter.
/obj/machinery/sparker
name = "Mounted igniter"
desc = "A wall-mounted ignition device."
icon = 'stationobjs.dmi'
icon_state = "migniter"
var/id = null
var/disable = 0
var/last_spark = 0
var/base_state = "migniter"
anchored = 1
/obj/machinery/sparker/New()
..()
/obj/machinery/sparker/power_change()
if ( powered() && disable == 0 )
stat &= ~NOPOWER
icon_state = "[base_state]"
src.sd_SetLuminosity(2)
else
stat |= ~NOPOWER
icon_state = "[base_state]-p"
src.sd_SetLuminosity(0)
/obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/screwdriver))
add_fingerprint(user)
src.disable = !src.disable
if (src.disable)
user.visible_message("\red [user] has disabled the [src]!", "\red You disable the connection to the [src].")
icon_state = "[base_state]-d"
if (!src.disable)
user.visible_message("\red [user] has reconnected the [src]!", "\red You fix the connection to the [src].")
if(src.powered())
icon_state = "[base_state]"
else
icon_state = "[base_state]-p"
/obj/machinery/sparker/attack_ai()
if (src.anchored)
return src.ignite()
else
return
/obj/machinery/sparker/proc/ignite()
if (!(powered()))
return
if ((src.disable) || (src.last_spark && world.time < src.last_spark + 50))
return
flick("[base_state]-spark", src)
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
s.set_up(2, 1, src)
s.start()
src.last_spark = world.time
use_power(1000)
var/turf/location = src.loc
if (isturf(location))
location.hotspot_expose(1000,500,1)
return 1
/obj/machinery/ignition_switch/attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/ignition_switch/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/ignition_switch/attackby(obj/item/weapon/W, mob/user as mob)
if(istype(W, /obj/item/device/detective_scanner))
return
return src.attack_hand(user)
/obj/machinery/ignition_switch/attack_hand(mob/user as mob)
if(stat & (NOPOWER|BROKEN))
return
if(active)
return
use_power(5)
active = 1
icon_state = "launcheract"
for(var/obj/machinery/sparker/M in machines)
if (M.id == src.id)
spawn( 0 )
M.ignite()
for(var/obj/machinery/igniter/M in machines)
if(M.id == src.id)
use_power(50)
M.on = !( M.on )
M.icon_state = text("igniter[]", M.on)
sleep(50)
icon_state = "launcherbtt"
active = 0
return