mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-19 13:35:10 +00:00
*TABLEPASS was already totally obsolete. FPRINT was used, but it was on virtually everything anyway. Removes those flags from every instance where they were used. Also assigned and removed other flags where it made sense. If it is desired, I can revive the flag as NOFPRINT, which would retain the original functionality, though inverted. That way it would be be used only where it was intentional (holodeck items could use this for example).
44 lines
1.3 KiB
Plaintext
44 lines
1.3 KiB
Plaintext
// APC HULL
|
|
|
|
/obj/item/apc_frame
|
|
name = "\improper APC frame"
|
|
desc = "Used for repairing or building APCs"
|
|
icon = 'icons/obj/apc_repair.dmi'
|
|
icon_state = "apc_frame"
|
|
flags = CONDUCT
|
|
|
|
/obj/item/apc_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
..()
|
|
if (istype(W, /obj/item/weapon/wrench))
|
|
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
|
|
del(src)
|
|
|
|
/obj/item/apc_frame/proc/try_build(turf/on_wall)
|
|
if (get_dist(on_wall,usr)>1)
|
|
return
|
|
var/ndir = get_dir(usr,on_wall)
|
|
if (!(ndir in cardinal))
|
|
return
|
|
var/turf/loc = get_turf(usr)
|
|
var/area/A = loc.loc
|
|
if (!istype(loc, /turf/simulated/floor))
|
|
usr << "\red APC cannot be placed on this spot."
|
|
return
|
|
if (A.requires_power == 0 || A.name == "Space")
|
|
usr << "\red APC cannot be placed in this area."
|
|
return
|
|
if (A.get_apc())
|
|
usr << "\red This area already has APC."
|
|
return //only one APC per area
|
|
for(var/obj/machinery/power/terminal/T in loc)
|
|
if (T.master)
|
|
usr << "\red There is another network terminal here."
|
|
return
|
|
else
|
|
var/obj/item/weapon/cable_coil/C = new /obj/item/weapon/cable_coil(loc)
|
|
C.amount = 10
|
|
usr << "You cut the cables and disassemble the unused power terminal."
|
|
del(T)
|
|
new /obj/machinery/power/apc(loc, ndir, 1)
|
|
del(src)
|