Merge pull request #13253 from SuperSayu/abstract_holodeck

Holodeck Fixes
This commit is contained in:
duncathan salt
2015-11-30 21:26:52 -06:00
18 changed files with 262 additions and 349 deletions
+3 -2
View File
@@ -91,11 +91,12 @@
for(var/obj/O in T)
var/obj/O2 = DuplicateObject(O , 1, newloc = X, nerf=nerf_weapons)
if(!O2) continue
copiedobjs += O2.contents + O2
copiedobjs += O2.GetAllContents() + O2
for(var/mob/M in T)
if(istype(M, /mob/camera)) continue // If we need to check for more mobs, I'll add a variable
copiedobjs += DuplicateObject(M , 1, newloc = X)
var/mob/SM = DuplicateObject(M , 1, newloc = X)
copiedobjs += SM.GetAllContents() + SM
var/global/list/forbidden_vars = list("type","stat","loc","locs","vars", "parent", "parent_type","verbs","ckey","key","x","y","z","contents", "luminosity")
for(var/V in T.vars - forbidden_vars)
+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 |= NODECONSTRUCT
for(var/obj/structure/S in spawned)
S.flags |= NODECONSTRUCT
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 |= NODECONSTRUCT
for(var/obj/structure/S in added)
S.flags |= NODECONSTRUCT
/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.
+3 -2
View File
@@ -213,8 +213,9 @@
eventstarted = 1
for(var/obj/structure/window/holo/W in currentarea)
qdel(W)
for(var/obj/structure/window/W in currentarea)
if(W.flags&NODECONSTRUCT) // Just in case: only holo-windows
qdel(W)
for(var/mob/M in currentarea)
M << "FIGHT!"
-68
View File
@@ -1,68 +0,0 @@
/obj/structure/table/holo
name = "table"
frame = null
buildstackamount = 0
framestackamount = 0
canSmoothWith = null
/obj/structure/table/holo/glass
name = "glass table"
icon = 'icons/obj/smooth_structures/glass_table.dmi'
icon_state = "glass_table"
/obj/structure/table/holo/wood
name = "wood table"
icon = 'icons/obj/smooth_structures/wood_table.dmi'
icon_state = "wood_table"
canSmoothWith = list(/obj/structure/table/holo/wood, /obj/structure/table/holo/poker)
/obj/structure/table/holo/poker
name = "poker table"
icon = 'icons/obj/smooth_structures/poker_table.dmi'
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
-44
View File
@@ -1,44 +0,0 @@
/obj/structure/window/holo
name = "reinforced window"
icon = 'icons/obj/structures.dmi'
icon_state = "rwindow"
desc = "A window. It has an electric hum to it."
density = 1
layer = 3.2//Just above doors
pressure_resistance = 4*ONE_ATMOSPHERE
anchored = 1.0
flags = ON_BORDER
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
/obj/structure/window/holo/opaque
name = "tinted window"
opacity = 1
/obj/structure/window/holo/fulltile
dir = 5
maxhealth = 250
/obj/structure/window/holo/opaque/fulltile
dir = 5
maxhealth = 250