Sets up the the ABSTRACT flag to be used by machines and structures that should not be disassembled or break into parts.

This is specifically used by the holodeck for things that should be immune to disassembly.

Fixes invisible windoors in the holodeck.
Standardizes the fire axe's interaction with windows.
Fixes a runtime with holodeck tiles getting broken or burned.
This commit is contained in:
Vincent
2015-11-26 21:11:54 -05:00
parent e596033153
commit 026e6ee772
12 changed files with 178 additions and 217 deletions
+10
View File
@@ -70,15 +70,25 @@
// should also remove/limit/filter reagents?
// this is an exercise left to others I'm afraid. -Sayu
spawned = A.copy_contents_to(linked, 1, nerf_weapons = !emagged)
for(var/obj/machinery/M in spawned)
M.flags |= ABSTRACT
for(var/obj/structure/S in spawned)
S.flags |= ABSTRACT
effects = list()
spawn(30)
var/list/added = list()
for(var/obj/effect/holodeck_effect/HE in spawned)
effects += HE
spawned -= HE
var/atom/x = HE.activate(src)
if(istype(x) || islist(x))
spawned += x // holocarp are not forever
added += x
for(var/obj/machinery/M in added)
M.flags |= ABSTRACT
for(var/obj/structure/S in added)
S.flags |= ABSTRACT
/obj/machinery/computer/holodeck/proc/derez(var/obj/obj, var/silent = 1, var/forced = 0)
// Emagging a machine creates an anomaly in the derez systems.
-44
View File
@@ -22,47 +22,3 @@
icon_state = "poker_table"
canSmoothWith = list(/obj/structure/table/holo/wood, /obj/structure/table/holo/poker)
/obj/structure/table/holo/attack_paw(mob/user as mob)
return
/obj/structure/table/holo/attack_alien(mob/user as mob)
return
/obj/structure/table/holo/attack_animal(mob/living/simple_animal/user as mob)
return
/obj/structure/table/holo/attack_hand(mob/user as mob)
return
/obj/structure/table/holo/attack_hulk()
return
/obj/structure/table/holo/attackby(obj/item/I, mob/user, params)
if (istype(I, /obj/item/weapon/grab))
tablepush(I, user)
return
if (istype(I, /obj/item/weapon/storage/bag/tray))
var/obj/item/weapon/storage/bag/tray/T = I
if(T.contents.len > 0) // If the tray isn't empty
var/list/obj/item/oldContents = T.contents.Copy()
T.quick_empty()
for(var/obj/item/C in oldContents)
C.loc = src.loc
user.visible_message("[user] empties [I] on [src].")
return
// If the tray IS empty, continue on (tray will be placed on the table like other items)
if(isrobot(user))
return
if(!(I.flags & ABSTRACT)) //rip more parems rip in peace ;_;
if(user.drop_item())
I.Move(loc)
var/list/click_params = params2list(params)
//Center the icon where the user clicked.
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
return
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
I.pixel_x = Clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_y = Clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
+2 -2
View File
@@ -1,8 +1,8 @@
/turf/simulated/floor/holofloor
icon_state = "floor"
thermal_conductivity = 0
broken_states = list()
burnt_states = list()
broken_states = list("engine")
burnt_states = list("engine")
/turf/simulated/floor/holofloor/attackby(obj/item/weapon/W as obj, mob/user as mob)
return // HOLOFLOOR DOES NOT GIVE A FUCK
+2 -16
View File
@@ -7,29 +7,15 @@
layer = 3.2//Just above doors
pressure_resistance = 4*ONE_ATMOSPHERE
anchored = 1.0
flags = ON_BORDER
flags = ON_BORDER | ABSTRACT
maxhealth = 100
disassembled = 1 // prevents noise on destruction
/obj/structure/window/holo/New()
..()
for(var/O in contents)
qdel(O) // standard window code generates stuff no matter what we want
/obj/structure/window/holo/spawnfragments()
qdel(src)
return
/obj/structure/window/holo/attackby(var/obj/item/I, var/mob/user)
if(istype(I,/obj/item/weapon/screwdriver))
user << "You see no screws to unfasten!"
return
return ..()
/obj/structure/window/holo/hit(var/damage, var/sound_effect = 1)
. = ..()
spawn(50) // self-healing
health += damage
update_icon()
/obj/structure/window/holo/opaque
name = "tinted window"