mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Moar whitespace normalization [MDB IGNORE] (#7750)
Co-authored-by: Raeschen <rycoop29@gmail.com>
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
|
||||
// Mostly for debugging table connections
|
||||
// This file is not #included in the .dme.
|
||||
|
||||
/obj/structure/table/debug
|
||||
New()
|
||||
material = get_material_by_name("debugium")
|
||||
..()
|
||||
|
||||
/datum/material/debug
|
||||
name = "debugium"
|
||||
stack_type = /obj/item/stack/material/debug
|
||||
icon_base = "debug"
|
||||
icon_reinf = "rdebug"
|
||||
icon_colour = "#FFFFFF"
|
||||
|
||||
/obj/item/stack/material/debug
|
||||
name = "debugium"
|
||||
icon = 'icons/obj/tables.dmi'
|
||||
icon_state = "debugium"
|
||||
default_type = "debugium"
|
||||
|
||||
|
||||
// Mostly for debugging table connections
|
||||
// This file is not #included in the .dme.
|
||||
|
||||
/obj/structure/table/debug
|
||||
New()
|
||||
material = get_material_by_name("debugium")
|
||||
..()
|
||||
|
||||
/datum/material/debug
|
||||
name = "debugium"
|
||||
stack_type = /obj/item/stack/material/debug
|
||||
icon_base = "debug"
|
||||
icon_reinf = "rdebug"
|
||||
icon_colour = "#FFFFFF"
|
||||
|
||||
/obj/item/stack/material/debug
|
||||
name = "debugium"
|
||||
icon = 'icons/obj/tables.dmi'
|
||||
icon_state = "debugium"
|
||||
default_type = "debugium"
|
||||
|
||||
|
||||
@@ -1,118 +1,118 @@
|
||||
|
||||
/obj/structure/table/proc/straight_table_check(var/direction)
|
||||
if(health > 100)
|
||||
return 0
|
||||
var/obj/structure/table/T
|
||||
for(var/angle in list(-90,90))
|
||||
T = locate() in get_step(src.loc,turn(direction,angle))
|
||||
if(T && T.flipped == 0 && T.material.name == material.name)
|
||||
return 0
|
||||
T = locate() in get_step(src.loc,direction)
|
||||
if (!T || T.flipped == 1 || T.material != material)
|
||||
return 1
|
||||
return T.straight_table_check(direction)
|
||||
|
||||
/obj/structure/table/verb/do_flip()
|
||||
set name = "Flip table"
|
||||
set desc = "Flips a non-reinforced table"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (!can_touch(usr) || ismouse(usr))
|
||||
return
|
||||
|
||||
if(flipped < 0 || !flip(get_cardinal_dir(usr,src)))
|
||||
to_chat(usr, "<span class='notice'>It won't budge.</span>")
|
||||
return
|
||||
|
||||
usr.visible_message("<span class='warning'>[usr] flips \the [src]!</span>")
|
||||
|
||||
if(climbable)
|
||||
structure_shaken()
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/table/proc/unflipping_check(var/direction)
|
||||
|
||||
for(var/mob/M in oview(src,0))
|
||||
return 0
|
||||
|
||||
var/obj/occupied = turf_is_crowded()
|
||||
if(occupied)
|
||||
to_chat(usr, "<span class='filter_notice'>There's \a [occupied] in the way.</span>")
|
||||
return 0
|
||||
|
||||
var/list/L = list()
|
||||
if(direction)
|
||||
L.Add(direction)
|
||||
else
|
||||
L.Add(turn(src.dir,-90))
|
||||
L.Add(turn(src.dir,90))
|
||||
for(var/new_dir in L)
|
||||
var/obj/structure/table/T = locate() in get_step(src.loc,new_dir)
|
||||
if(T && T.material && T.material.name == material.name)
|
||||
if(T.flipped == 1 && T.dir == src.dir && !T.unflipping_check(new_dir))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/table/proc/do_put()
|
||||
set name = "Put table back"
|
||||
set desc = "Puts flipped table back"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (!can_touch(usr))
|
||||
return
|
||||
|
||||
if (!unflipping_check())
|
||||
to_chat(usr, "<span class='notice'>It won't budge.</span>")
|
||||
return
|
||||
unflip()
|
||||
|
||||
/obj/structure/table/proc/flip(var/direction)
|
||||
if( !straight_table_check(turn(direction,90)) || !straight_table_check(turn(direction,-90)) )
|
||||
return 0
|
||||
|
||||
verbs -=/obj/structure/table/verb/do_flip
|
||||
verbs +=/obj/structure/table/proc/do_put
|
||||
|
||||
var/list/targets = list(get_step(src,dir),get_step(src,turn(dir, 45)),get_step(src,turn(dir, -45)))
|
||||
for (var/atom/movable/A in get_turf(src))
|
||||
if (!A.anchored)
|
||||
spawn(0)
|
||||
A.throw_at(pick(targets),1,1)
|
||||
|
||||
set_dir(direction)
|
||||
if(dir != NORTH)
|
||||
plane = MOB_PLANE
|
||||
layer = ABOVE_MOB_LAYER
|
||||
//climbable = FALSE //flipping tables allows them to be used as makeshift barriers
|
||||
flipped = 1
|
||||
flags |= ON_BORDER
|
||||
for(var/D in list(turn(direction, 90), turn(direction, -90)))
|
||||
var/obj/structure/table/T = locate() in get_step(src,D)
|
||||
if(T && T.flipped == 0 && material && T.material && T.material.name == material.name)
|
||||
T.flip(direction)
|
||||
take_damage(rand(5, 10))
|
||||
update_connections(1)
|
||||
update_icon()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/table/proc/unflip()
|
||||
verbs -=/obj/structure/table/proc/do_put
|
||||
verbs +=/obj/structure/table/verb/do_flip
|
||||
|
||||
reset_plane_and_layer()
|
||||
flipped = 0
|
||||
//climbable = initial(climbable)
|
||||
flags &= ~ON_BORDER
|
||||
for(var/D in list(turn(dir, 90), turn(dir, -90)))
|
||||
var/obj/structure/table/T = locate() in get_step(src.loc,D)
|
||||
if(T && T.flipped == 1 && T.dir == src.dir && material && T.material&& T.material.name == material.name)
|
||||
T.unflip()
|
||||
|
||||
update_connections(1)
|
||||
update_icon()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/table/proc/straight_table_check(var/direction)
|
||||
if(health > 100)
|
||||
return 0
|
||||
var/obj/structure/table/T
|
||||
for(var/angle in list(-90,90))
|
||||
T = locate() in get_step(src.loc,turn(direction,angle))
|
||||
if(T && T.flipped == 0 && T.material.name == material.name)
|
||||
return 0
|
||||
T = locate() in get_step(src.loc,direction)
|
||||
if (!T || T.flipped == 1 || T.material != material)
|
||||
return 1
|
||||
return T.straight_table_check(direction)
|
||||
|
||||
/obj/structure/table/verb/do_flip()
|
||||
set name = "Flip table"
|
||||
set desc = "Flips a non-reinforced table"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (!can_touch(usr) || ismouse(usr))
|
||||
return
|
||||
|
||||
if(flipped < 0 || !flip(get_cardinal_dir(usr,src)))
|
||||
to_chat(usr, "<span class='notice'>It won't budge.</span>")
|
||||
return
|
||||
|
||||
usr.visible_message("<span class='warning'>[usr] flips \the [src]!</span>")
|
||||
|
||||
if(climbable)
|
||||
structure_shaken()
|
||||
|
||||
return
|
||||
|
||||
/obj/structure/table/proc/unflipping_check(var/direction)
|
||||
|
||||
for(var/mob/M in oview(src,0))
|
||||
return 0
|
||||
|
||||
var/obj/occupied = turf_is_crowded()
|
||||
if(occupied)
|
||||
to_chat(usr, "<span class='filter_notice'>There's \a [occupied] in the way.</span>")
|
||||
return 0
|
||||
|
||||
var/list/L = list()
|
||||
if(direction)
|
||||
L.Add(direction)
|
||||
else
|
||||
L.Add(turn(src.dir,-90))
|
||||
L.Add(turn(src.dir,90))
|
||||
for(var/new_dir in L)
|
||||
var/obj/structure/table/T = locate() in get_step(src.loc,new_dir)
|
||||
if(T && T.material && T.material.name == material.name)
|
||||
if(T.flipped == 1 && T.dir == src.dir && !T.unflipping_check(new_dir))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/structure/table/proc/do_put()
|
||||
set name = "Put table back"
|
||||
set desc = "Puts flipped table back"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (!can_touch(usr))
|
||||
return
|
||||
|
||||
if (!unflipping_check())
|
||||
to_chat(usr, "<span class='notice'>It won't budge.</span>")
|
||||
return
|
||||
unflip()
|
||||
|
||||
/obj/structure/table/proc/flip(var/direction)
|
||||
if( !straight_table_check(turn(direction,90)) || !straight_table_check(turn(direction,-90)) )
|
||||
return 0
|
||||
|
||||
verbs -=/obj/structure/table/verb/do_flip
|
||||
verbs +=/obj/structure/table/proc/do_put
|
||||
|
||||
var/list/targets = list(get_step(src,dir),get_step(src,turn(dir, 45)),get_step(src,turn(dir, -45)))
|
||||
for (var/atom/movable/A in get_turf(src))
|
||||
if (!A.anchored)
|
||||
spawn(0)
|
||||
A.throw_at(pick(targets),1,1)
|
||||
|
||||
set_dir(direction)
|
||||
if(dir != NORTH)
|
||||
plane = MOB_PLANE
|
||||
layer = ABOVE_MOB_LAYER
|
||||
//climbable = FALSE //flipping tables allows them to be used as makeshift barriers
|
||||
flipped = 1
|
||||
flags |= ON_BORDER
|
||||
for(var/D in list(turn(direction, 90), turn(direction, -90)))
|
||||
var/obj/structure/table/T = locate() in get_step(src,D)
|
||||
if(T && T.flipped == 0 && material && T.material && T.material.name == material.name)
|
||||
T.flip(direction)
|
||||
take_damage(rand(5, 10))
|
||||
update_connections(1)
|
||||
update_icon()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/table/proc/unflip()
|
||||
verbs -=/obj/structure/table/proc/do_put
|
||||
verbs +=/obj/structure/table/verb/do_flip
|
||||
|
||||
reset_plane_and_layer()
|
||||
flipped = 0
|
||||
//climbable = initial(climbable)
|
||||
flags &= ~ON_BORDER
|
||||
for(var/D in list(turn(dir, 90), turn(dir, -90)))
|
||||
var/obj/structure/table/T = locate() in get_step(src.loc,D)
|
||||
if(T && T.flipped == 1 && T.dir == src.dir && material && T.material&& T.material.name == material.name)
|
||||
T.unflip()
|
||||
|
||||
update_connections(1)
|
||||
update_icon()
|
||||
|
||||
return 1
|
||||
|
||||
@@ -1,163 +1,163 @@
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover,/obj/item/projectile))
|
||||
return (check_cover(mover,target))
|
||||
if(flipped == 1)
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(locate(/obj/structure/table/bench) in get_turf(mover))
|
||||
return FALSE
|
||||
var/obj/structure/table/table = locate(/obj/structure/table) in get_turf(mover)
|
||||
if(table && !(table.flipped == 1))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/table/climb_to(mob/living/mover)
|
||||
if(flipped == 1 && mover.loc == loc)
|
||||
var/turf/T = get_step(src, dir)
|
||||
if(T.Enter(mover))
|
||||
return T
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/table/Uncross(atom/movable/mover, turf/target)
|
||||
if(flipped == 1 && (get_dir(mover, target) == dir)) // From here to elsewhere, can't move in our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
//checks if projectile 'P' from turf 'from' can hit whatever is behind the table. Returns 1 if it can, 0 if bullet stops.
|
||||
/obj/structure/table/proc/check_cover(obj/item/projectile/P, turf/from)
|
||||
var/turf/cover
|
||||
if(flipped==1)
|
||||
cover = get_turf(src)
|
||||
else if(flipped==0)
|
||||
cover = get_step(loc, get_dir(from, loc))
|
||||
if(!cover)
|
||||
return 1
|
||||
if (get_dist(P.starting, loc) <= 1) //Tables won't help you if people are THIS close
|
||||
return 1
|
||||
if (get_turf(P.original) == cover)
|
||||
var/chance = 20
|
||||
if (ismob(P.original))
|
||||
var/mob/M = P.original
|
||||
if (M.lying)
|
||||
chance += 20 //Lying down lets you catch less bullets
|
||||
if(flipped==1)
|
||||
if(get_dir(loc, from) == dir) //Flipped tables catch mroe bullets
|
||||
chance += 20
|
||||
else
|
||||
return 1 //But only from one side
|
||||
if(prob(chance))
|
||||
health -= P.damage/2
|
||||
if (health > 0)
|
||||
visible_message("<span class='warning'>[P] hits \the [src]!</span>")
|
||||
return 0
|
||||
else
|
||||
visible_message("<span class='warning'>[src] breaks down!</span>")
|
||||
break_to_parts()
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/obj/structure/table/MouseDrop_T(obj/O, mob/user, src_location, over_location, src_control, over_control, params)
|
||||
if(ismob(O.loc)) //If placing an item
|
||||
if(!isitem(O) || user.get_active_hand() != O)
|
||||
return ..()
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.drop_item()
|
||||
if(O.loc != src.loc)
|
||||
step(O, get_dir(O, src))
|
||||
|
||||
else if(isturf(O.loc) && isitem(O)) //If pushing an item on the tabletop
|
||||
var/obj/item/I = O
|
||||
if(I.anchored)
|
||||
return
|
||||
|
||||
if((isliving(user)) && (Adjacent(user)) && !(user.incapacitated()))
|
||||
if(O.w_class <= user.can_pull_size)
|
||||
O.forceMove(loc)
|
||||
auto_align(I, params, TRUE)
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("\The [I] is too big for you to move!"))
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/table/attackby(obj/item/W as obj, mob/user as mob, var/hit_modifier, var/click_parameters)
|
||||
if (!W) return
|
||||
|
||||
// Handle harm intent grabbing/tabling.
|
||||
if(istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if (istype(G.affecting, /mob/living))
|
||||
var/mob/living/M = G.affecting
|
||||
var/obj/occupied = turf_is_crowded()
|
||||
if(occupied)
|
||||
to_chat(user, "<span class='danger'>There's \a [occupied] in the way.</span>")
|
||||
return
|
||||
if(!user.Adjacent(M))
|
||||
return
|
||||
if (G.state < 2)
|
||||
if(user.a_intent == I_HURT)
|
||||
if (prob(15)) M.Weaken(5)
|
||||
M.apply_damage(8,def_zone = BP_HEAD)
|
||||
visible_message("<span class='danger'>[G.assailant] slams [G.affecting]'s face against \the [src]!</span>")
|
||||
if(material)
|
||||
playsound(src, material.tableslam_noise, 50, 1)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tablehit1.ogg', 50, 1)
|
||||
var/list/L = take_damage(rand(1,5))
|
||||
// Shards. Extra damage, plus potentially the fact YOU LITERALLY HAVE A PIECE OF GLASS/METAL/WHATEVER IN YOUR FACE
|
||||
for(var/obj/item/weapon/material/shard/S in L)
|
||||
if(prob(50))
|
||||
M.visible_message("<span class='danger'>\The [S] slices [M]'s face messily!</span>",
|
||||
"<span class='danger'>\The [S] slices your face messily!</span>")
|
||||
M.apply_damage(10, def_zone = BP_HEAD)
|
||||
if(prob(2))
|
||||
M.embed(S, def_zone = BP_HEAD)
|
||||
else
|
||||
to_chat(user, "<span class='danger'>You need a better grip to do that!</span>")
|
||||
return
|
||||
else if(G.state > GRAB_AGGRESSIVE || world.time >= (G.last_action + UPGRADE_COOLDOWN))
|
||||
M.forceMove(get_turf(src))
|
||||
M.Weaken(5)
|
||||
visible_message("<span class='danger'>[G.assailant] puts [G.affecting] on \the [src].</span>")
|
||||
qdel(W)
|
||||
return
|
||||
|
||||
// Handle dismantling or placing things on the table from here on.
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
if(W.loc != user) // This should stop mounted modules ending up outside the module.
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src, "sparks", 50, 1)
|
||||
user.visible_message("<span class='danger'>\The [src] was sliced apart by [user]!</span>")
|
||||
break_to_parts()
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/melee/changeling/arm_blade))
|
||||
user.visible_message("<span class='danger'>\The [src] was sliced apart by [user]!</span>")
|
||||
break_to_parts()
|
||||
return
|
||||
|
||||
if(can_plate && !material)
|
||||
to_chat(user, "<span class='warning'>There's nothing to put \the [W] on! Try adding plating to \the [src] first.</span>")
|
||||
return
|
||||
|
||||
// Placing stuff on tables
|
||||
if(user.unEquip(W, 0, src.loc) && user.is_preference_enabled(/datum/client_preference/precision_placement))
|
||||
auto_align(W, click_parameters)
|
||||
return 1
|
||||
|
||||
/obj/structure/table/attack_tk() // no telehulk sorry
|
||||
return
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover,/obj/item/projectile))
|
||||
return (check_cover(mover,target))
|
||||
if(flipped == 1)
|
||||
if(get_dir(mover, target) == reverse_dir[dir]) // From elsewhere to here, can't move against our dir
|
||||
return !density
|
||||
return TRUE
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
if(locate(/obj/structure/table/bench) in get_turf(mover))
|
||||
return FALSE
|
||||
var/obj/structure/table/table = locate(/obj/structure/table) in get_turf(mover)
|
||||
if(table && !(table.flipped == 1))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/table/climb_to(mob/living/mover)
|
||||
if(flipped == 1 && mover.loc == loc)
|
||||
var/turf/T = get_step(src, dir)
|
||||
if(T.Enter(mover))
|
||||
return T
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/table/Uncross(atom/movable/mover, turf/target)
|
||||
if(flipped == 1 && (get_dir(mover, target) == dir)) // From here to elsewhere, can't move in our dir
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
//checks if projectile 'P' from turf 'from' can hit whatever is behind the table. Returns 1 if it can, 0 if bullet stops.
|
||||
/obj/structure/table/proc/check_cover(obj/item/projectile/P, turf/from)
|
||||
var/turf/cover
|
||||
if(flipped==1)
|
||||
cover = get_turf(src)
|
||||
else if(flipped==0)
|
||||
cover = get_step(loc, get_dir(from, loc))
|
||||
if(!cover)
|
||||
return 1
|
||||
if (get_dist(P.starting, loc) <= 1) //Tables won't help you if people are THIS close
|
||||
return 1
|
||||
if (get_turf(P.original) == cover)
|
||||
var/chance = 20
|
||||
if (ismob(P.original))
|
||||
var/mob/M = P.original
|
||||
if (M.lying)
|
||||
chance += 20 //Lying down lets you catch less bullets
|
||||
if(flipped==1)
|
||||
if(get_dir(loc, from) == dir) //Flipped tables catch mroe bullets
|
||||
chance += 20
|
||||
else
|
||||
return 1 //But only from one side
|
||||
if(prob(chance))
|
||||
health -= P.damage/2
|
||||
if (health > 0)
|
||||
visible_message("<span class='warning'>[P] hits \the [src]!</span>")
|
||||
return 0
|
||||
else
|
||||
visible_message("<span class='warning'>[src] breaks down!</span>")
|
||||
break_to_parts()
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/obj/structure/table/MouseDrop_T(obj/O, mob/user, src_location, over_location, src_control, over_control, params)
|
||||
if(ismob(O.loc)) //If placing an item
|
||||
if(!isitem(O) || user.get_active_hand() != O)
|
||||
return ..()
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.drop_item()
|
||||
if(O.loc != src.loc)
|
||||
step(O, get_dir(O, src))
|
||||
|
||||
else if(isturf(O.loc) && isitem(O)) //If pushing an item on the tabletop
|
||||
var/obj/item/I = O
|
||||
if(I.anchored)
|
||||
return
|
||||
|
||||
if((isliving(user)) && (Adjacent(user)) && !(user.incapacitated()))
|
||||
if(O.w_class <= user.can_pull_size)
|
||||
O.forceMove(loc)
|
||||
auto_align(I, params, TRUE)
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("\The [I] is too big for you to move!"))
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/table/attackby(obj/item/W as obj, mob/user as mob, var/hit_modifier, var/click_parameters)
|
||||
if (!W) return
|
||||
|
||||
// Handle harm intent grabbing/tabling.
|
||||
if(istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if (istype(G.affecting, /mob/living))
|
||||
var/mob/living/M = G.affecting
|
||||
var/obj/occupied = turf_is_crowded()
|
||||
if(occupied)
|
||||
to_chat(user, "<span class='danger'>There's \a [occupied] in the way.</span>")
|
||||
return
|
||||
if(!user.Adjacent(M))
|
||||
return
|
||||
if (G.state < 2)
|
||||
if(user.a_intent == I_HURT)
|
||||
if (prob(15)) M.Weaken(5)
|
||||
M.apply_damage(8,def_zone = BP_HEAD)
|
||||
visible_message("<span class='danger'>[G.assailant] slams [G.affecting]'s face against \the [src]!</span>")
|
||||
if(material)
|
||||
playsound(src, material.tableslam_noise, 50, 1)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tablehit1.ogg', 50, 1)
|
||||
var/list/L = take_damage(rand(1,5))
|
||||
// Shards. Extra damage, plus potentially the fact YOU LITERALLY HAVE A PIECE OF GLASS/METAL/WHATEVER IN YOUR FACE
|
||||
for(var/obj/item/weapon/material/shard/S in L)
|
||||
if(prob(50))
|
||||
M.visible_message("<span class='danger'>\The [S] slices [M]'s face messily!</span>",
|
||||
"<span class='danger'>\The [S] slices your face messily!</span>")
|
||||
M.apply_damage(10, def_zone = BP_HEAD)
|
||||
if(prob(2))
|
||||
M.embed(S, def_zone = BP_HEAD)
|
||||
else
|
||||
to_chat(user, "<span class='danger'>You need a better grip to do that!</span>")
|
||||
return
|
||||
else if(G.state > GRAB_AGGRESSIVE || world.time >= (G.last_action + UPGRADE_COOLDOWN))
|
||||
M.forceMove(get_turf(src))
|
||||
M.Weaken(5)
|
||||
visible_message("<span class='danger'>[G.assailant] puts [G.affecting] on \the [src].</span>")
|
||||
qdel(W)
|
||||
return
|
||||
|
||||
// Handle dismantling or placing things on the table from here on.
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
if(W.loc != user) // This should stop mounted modules ending up outside the module.
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src, "sparks", 50, 1)
|
||||
user.visible_message("<span class='danger'>\The [src] was sliced apart by [user]!</span>")
|
||||
break_to_parts()
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/melee/changeling/arm_blade))
|
||||
user.visible_message("<span class='danger'>\The [src] was sliced apart by [user]!</span>")
|
||||
break_to_parts()
|
||||
return
|
||||
|
||||
if(can_plate && !material)
|
||||
to_chat(user, "<span class='warning'>There's nothing to put \the [W] on! Try adding plating to \the [src] first.</span>")
|
||||
return
|
||||
|
||||
// Placing stuff on tables
|
||||
if(user.unEquip(W, 0, src.loc) && user.is_preference_enabled(/datum/client_preference/precision_placement))
|
||||
auto_align(W, click_parameters)
|
||||
return 1
|
||||
|
||||
/obj/structure/table/attack_tk() // no telehulk sorry
|
||||
return
|
||||
|
||||
@@ -1,249 +1,249 @@
|
||||
//TABLE PRESETS
|
||||
/obj/structure/table/standard
|
||||
icon_state = "plain_preview"
|
||||
color = "#EEEEEE"
|
||||
|
||||
/obj/structure/table/standard/New()
|
||||
material = get_material_by_name(DEFAULT_TABLE_MATERIAL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/steel
|
||||
icon_state = "plain_preview"
|
||||
color = "#666666"
|
||||
|
||||
/obj/structure/table/steel/New()
|
||||
material = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/marble
|
||||
icon_state = "stone_preview"
|
||||
color = "#CCCCCC"
|
||||
|
||||
/obj/structure/table/marble/New()
|
||||
material = get_material_by_name("marble")
|
||||
..()
|
||||
|
||||
/obj/structure/table/reinforced
|
||||
icon_state = "reinf_preview"
|
||||
color = "#EEEEEE"
|
||||
|
||||
/obj/structure/table/reinforced/New()
|
||||
material = get_material_by_name(DEFAULT_TABLE_MATERIAL)
|
||||
reinforced = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/steel_reinforced
|
||||
icon_state = "reinf_preview"
|
||||
color = "#666666"
|
||||
|
||||
/obj/structure/table/steel_reinforced/New()
|
||||
material = get_material_by_name(MAT_STEEL)
|
||||
reinforced = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/wooden_reinforced
|
||||
icon_state = "reinf_preview"
|
||||
color = "#824B28"
|
||||
|
||||
/obj/structure/table/wooden_reinforced/New()
|
||||
material = get_material_by_name("wood")
|
||||
reinforced = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/woodentable
|
||||
icon_state = "plain_preview"
|
||||
color = "#824B28"
|
||||
|
||||
/obj/structure/table/woodentable/New()
|
||||
material = get_material_by_name("wood")
|
||||
..()
|
||||
|
||||
/obj/structure/table/sifwoodentable
|
||||
icon_state = "plain_preview"
|
||||
color = "#824B28"
|
||||
|
||||
/obj/structure/table/sifwoodentable/New()
|
||||
material = get_material_by_name("alien wood")
|
||||
..()
|
||||
|
||||
/obj/structure/table/sifwooden_reinforced
|
||||
icon_state = "reinf_preview"
|
||||
color = "#824B28"
|
||||
|
||||
/obj/structure/table/sifwooden_reinforced/New()
|
||||
material = get_material_by_name("alien wood")
|
||||
reinforced = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/hardwoodtable
|
||||
icon_state = "stone_preview"
|
||||
color = "#42291a"
|
||||
|
||||
/obj/structure/table/hardwoodtable/Initialize(mapload)
|
||||
material = get_material_by_name("hardwood")
|
||||
return ..()
|
||||
|
||||
/obj/structure/table/gamblingtable
|
||||
icon_state = "gamble_preview"
|
||||
|
||||
/obj/structure/table/gamblingtable/New()
|
||||
material = get_material_by_name("wood")
|
||||
carpeted = 1
|
||||
..()
|
||||
|
||||
/obj/structure/table/glass
|
||||
icon_state = "plain_preview"
|
||||
color = "#00E1FF"
|
||||
alpha = 77 // 0.3 * 255
|
||||
|
||||
/obj/structure/table/glass/New()
|
||||
material = get_material_by_name("glass")
|
||||
..()
|
||||
|
||||
/obj/structure/table/borosilicate
|
||||
icon_state = "plain_preview"
|
||||
color = "#4D3EAC"
|
||||
alpha = 77
|
||||
|
||||
/obj/structure/table/borosilicate/New()
|
||||
material = get_material_by_name("borosilicate glass")
|
||||
..()
|
||||
|
||||
/obj/structure/table/holotable
|
||||
icon_state = "holo_preview"
|
||||
color = "#EEEEEE"
|
||||
|
||||
/obj/structure/table/holotable/New()
|
||||
material = get_material_by_name("holo[DEFAULT_TABLE_MATERIAL]")
|
||||
..()
|
||||
|
||||
/obj/structure/table/woodentable/holotable
|
||||
icon_state = "holo_preview"
|
||||
|
||||
/obj/structure/table/woodentable/holotable/New()
|
||||
material = get_material_by_name("holowood")
|
||||
..()
|
||||
|
||||
/obj/structure/table/alien
|
||||
name = "alien table"
|
||||
desc = "Advanced flat surface technology at work!"
|
||||
icon_state = "alien_preview"
|
||||
can_reinforce = FALSE
|
||||
can_plate = FALSE
|
||||
|
||||
/obj/structure/table/alien/New()
|
||||
material = get_material_by_name("alium")
|
||||
verbs -= /obj/structure/table/verb/do_flip
|
||||
verbs -= /obj/structure/table/proc/do_put
|
||||
..()
|
||||
|
||||
/obj/structure/table/alien/dismantle(obj/item/weapon/tool/wrench/W, mob/user)
|
||||
to_chat(user, "<span class='warning'>You cannot dismantle \the [src].</span>")
|
||||
return
|
||||
|
||||
//BENCH PRESETS
|
||||
/obj/structure/table/bench/standard
|
||||
icon_state = "plain_preview"
|
||||
color = "#EEEEEE"
|
||||
|
||||
/obj/structure/table/bench/standard/New()
|
||||
material = get_material_by_name(DEFAULT_TABLE_MATERIAL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/bench/steel
|
||||
icon_state = "plain_preview"
|
||||
color = "#666666"
|
||||
|
||||
/obj/structure/table/bench/steel/New()
|
||||
material = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/table/bench/marble
|
||||
icon_state = "stone_preview"
|
||||
color = "#CCCCCC"
|
||||
|
||||
/obj/structure/table/bench/marble/New()
|
||||
material = get_material_by_name("marble")
|
||||
..()
|
||||
/*
|
||||
/obj/structure/table/bench/reinforced
|
||||
icon_state = "reinf_preview"
|
||||
color = "#EEEEEE"
|
||||
|
||||
/obj/structure/table/bench/reinforced/New()
|
||||
material = get_material_by_name(DEFAULT_TABLE_MATERIAL)
|
||||
reinforced = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/bench/steel_reinforced
|
||||
icon_state = "reinf_preview"
|
||||
color = "#666666"
|
||||
|
||||
/obj/structure/table/bench/steel_reinforced/New()
|
||||
material = get_material_by_name(MAT_STEEL)
|
||||
reinforced = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/bench/wooden_reinforced
|
||||
icon_state = "reinf_preview"
|
||||
color = "#824B28"
|
||||
|
||||
/obj/structure/table/bench/wooden_reinforced/New()
|
||||
material = get_material_by_name("wood")
|
||||
reinforced = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
*/
|
||||
/obj/structure/table/bench/wooden
|
||||
icon_state = "plain_preview"
|
||||
color = "#824B28"
|
||||
|
||||
/obj/structure/table/bench/wooden/New()
|
||||
material = get_material_by_name("wood")
|
||||
..()
|
||||
|
||||
/obj/structure/table/bench/sifwooden
|
||||
icon_state = "plain_preview"
|
||||
color = "#824B28"
|
||||
|
||||
/obj/structure/table/bench/sifwooden/New()
|
||||
material = get_material_by_name("alien wood")
|
||||
..()
|
||||
|
||||
/obj/structure/table/bench/sifwooden/padded
|
||||
icon_state = "padded_preview"
|
||||
carpeted = 1
|
||||
|
||||
/obj/structure/table/bench/padded
|
||||
icon_state = "padded_preview"
|
||||
|
||||
/obj/structure/table/bench/padded/New()
|
||||
material = get_material_by_name(MAT_STEEL)
|
||||
carpeted = 1
|
||||
..()
|
||||
|
||||
/obj/structure/table/bench/glass
|
||||
icon_state = "plain_preview"
|
||||
color = "#00E1FF"
|
||||
alpha = 77 // 0.3 * 255
|
||||
|
||||
/obj/structure/table/bench/glass/New()
|
||||
material = get_material_by_name("glass")
|
||||
..()
|
||||
|
||||
/*
|
||||
/obj/structure/table/bench/holotable
|
||||
icon_state = "holo_preview"
|
||||
color = "#EEEEEE"
|
||||
|
||||
/obj/structure/table/bench/holotable/New()
|
||||
material = get_material_by_name("holo[DEFAULT_TABLE_MATERIAL]")
|
||||
..()
|
||||
|
||||
/obj/structure/table/bench/wooden/holotable
|
||||
icon_state = "holo_preview"
|
||||
|
||||
/obj/structure/table/bench/wooden/holotable/New()
|
||||
material = get_material_by_name("holowood")
|
||||
..()
|
||||
//TABLE PRESETS
|
||||
/obj/structure/table/standard
|
||||
icon_state = "plain_preview"
|
||||
color = "#EEEEEE"
|
||||
|
||||
/obj/structure/table/standard/New()
|
||||
material = get_material_by_name(DEFAULT_TABLE_MATERIAL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/steel
|
||||
icon_state = "plain_preview"
|
||||
color = "#666666"
|
||||
|
||||
/obj/structure/table/steel/New()
|
||||
material = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/marble
|
||||
icon_state = "stone_preview"
|
||||
color = "#CCCCCC"
|
||||
|
||||
/obj/structure/table/marble/New()
|
||||
material = get_material_by_name("marble")
|
||||
..()
|
||||
|
||||
/obj/structure/table/reinforced
|
||||
icon_state = "reinf_preview"
|
||||
color = "#EEEEEE"
|
||||
|
||||
/obj/structure/table/reinforced/New()
|
||||
material = get_material_by_name(DEFAULT_TABLE_MATERIAL)
|
||||
reinforced = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/steel_reinforced
|
||||
icon_state = "reinf_preview"
|
||||
color = "#666666"
|
||||
|
||||
/obj/structure/table/steel_reinforced/New()
|
||||
material = get_material_by_name(MAT_STEEL)
|
||||
reinforced = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/wooden_reinforced
|
||||
icon_state = "reinf_preview"
|
||||
color = "#824B28"
|
||||
|
||||
/obj/structure/table/wooden_reinforced/New()
|
||||
material = get_material_by_name("wood")
|
||||
reinforced = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/woodentable
|
||||
icon_state = "plain_preview"
|
||||
color = "#824B28"
|
||||
|
||||
/obj/structure/table/woodentable/New()
|
||||
material = get_material_by_name("wood")
|
||||
..()
|
||||
|
||||
/obj/structure/table/sifwoodentable
|
||||
icon_state = "plain_preview"
|
||||
color = "#824B28"
|
||||
|
||||
/obj/structure/table/sifwoodentable/New()
|
||||
material = get_material_by_name("alien wood")
|
||||
..()
|
||||
|
||||
/obj/structure/table/sifwooden_reinforced
|
||||
icon_state = "reinf_preview"
|
||||
color = "#824B28"
|
||||
|
||||
/obj/structure/table/sifwooden_reinforced/New()
|
||||
material = get_material_by_name("alien wood")
|
||||
reinforced = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/hardwoodtable
|
||||
icon_state = "stone_preview"
|
||||
color = "#42291a"
|
||||
|
||||
/obj/structure/table/hardwoodtable/Initialize(mapload)
|
||||
material = get_material_by_name("hardwood")
|
||||
return ..()
|
||||
|
||||
/obj/structure/table/gamblingtable
|
||||
icon_state = "gamble_preview"
|
||||
|
||||
/obj/structure/table/gamblingtable/New()
|
||||
material = get_material_by_name("wood")
|
||||
carpeted = 1
|
||||
..()
|
||||
|
||||
/obj/structure/table/glass
|
||||
icon_state = "plain_preview"
|
||||
color = "#00E1FF"
|
||||
alpha = 77 // 0.3 * 255
|
||||
|
||||
/obj/structure/table/glass/New()
|
||||
material = get_material_by_name("glass")
|
||||
..()
|
||||
|
||||
/obj/structure/table/borosilicate
|
||||
icon_state = "plain_preview"
|
||||
color = "#4D3EAC"
|
||||
alpha = 77
|
||||
|
||||
/obj/structure/table/borosilicate/New()
|
||||
material = get_material_by_name("borosilicate glass")
|
||||
..()
|
||||
|
||||
/obj/structure/table/holotable
|
||||
icon_state = "holo_preview"
|
||||
color = "#EEEEEE"
|
||||
|
||||
/obj/structure/table/holotable/New()
|
||||
material = get_material_by_name("holo[DEFAULT_TABLE_MATERIAL]")
|
||||
..()
|
||||
|
||||
/obj/structure/table/woodentable/holotable
|
||||
icon_state = "holo_preview"
|
||||
|
||||
/obj/structure/table/woodentable/holotable/New()
|
||||
material = get_material_by_name("holowood")
|
||||
..()
|
||||
|
||||
/obj/structure/table/alien
|
||||
name = "alien table"
|
||||
desc = "Advanced flat surface technology at work!"
|
||||
icon_state = "alien_preview"
|
||||
can_reinforce = FALSE
|
||||
can_plate = FALSE
|
||||
|
||||
/obj/structure/table/alien/New()
|
||||
material = get_material_by_name("alium")
|
||||
verbs -= /obj/structure/table/verb/do_flip
|
||||
verbs -= /obj/structure/table/proc/do_put
|
||||
..()
|
||||
|
||||
/obj/structure/table/alien/dismantle(obj/item/weapon/tool/wrench/W, mob/user)
|
||||
to_chat(user, "<span class='warning'>You cannot dismantle \the [src].</span>")
|
||||
return
|
||||
|
||||
//BENCH PRESETS
|
||||
/obj/structure/table/bench/standard
|
||||
icon_state = "plain_preview"
|
||||
color = "#EEEEEE"
|
||||
|
||||
/obj/structure/table/bench/standard/New()
|
||||
material = get_material_by_name(DEFAULT_TABLE_MATERIAL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/bench/steel
|
||||
icon_state = "plain_preview"
|
||||
color = "#666666"
|
||||
|
||||
/obj/structure/table/bench/steel/New()
|
||||
material = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/table/bench/marble
|
||||
icon_state = "stone_preview"
|
||||
color = "#CCCCCC"
|
||||
|
||||
/obj/structure/table/bench/marble/New()
|
||||
material = get_material_by_name("marble")
|
||||
..()
|
||||
/*
|
||||
/obj/structure/table/bench/reinforced
|
||||
icon_state = "reinf_preview"
|
||||
color = "#EEEEEE"
|
||||
|
||||
/obj/structure/table/bench/reinforced/New()
|
||||
material = get_material_by_name(DEFAULT_TABLE_MATERIAL)
|
||||
reinforced = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/bench/steel_reinforced
|
||||
icon_state = "reinf_preview"
|
||||
color = "#666666"
|
||||
|
||||
/obj/structure/table/bench/steel_reinforced/New()
|
||||
material = get_material_by_name(MAT_STEEL)
|
||||
reinforced = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
|
||||
/obj/structure/table/bench/wooden_reinforced
|
||||
icon_state = "reinf_preview"
|
||||
color = "#824B28"
|
||||
|
||||
/obj/structure/table/bench/wooden_reinforced/New()
|
||||
material = get_material_by_name("wood")
|
||||
reinforced = get_material_by_name(MAT_STEEL)
|
||||
..()
|
||||
*/
|
||||
/obj/structure/table/bench/wooden
|
||||
icon_state = "plain_preview"
|
||||
color = "#824B28"
|
||||
|
||||
/obj/structure/table/bench/wooden/New()
|
||||
material = get_material_by_name("wood")
|
||||
..()
|
||||
|
||||
/obj/structure/table/bench/sifwooden
|
||||
icon_state = "plain_preview"
|
||||
color = "#824B28"
|
||||
|
||||
/obj/structure/table/bench/sifwooden/New()
|
||||
material = get_material_by_name("alien wood")
|
||||
..()
|
||||
|
||||
/obj/structure/table/bench/sifwooden/padded
|
||||
icon_state = "padded_preview"
|
||||
carpeted = 1
|
||||
|
||||
/obj/structure/table/bench/padded
|
||||
icon_state = "padded_preview"
|
||||
|
||||
/obj/structure/table/bench/padded/New()
|
||||
material = get_material_by_name(MAT_STEEL)
|
||||
carpeted = 1
|
||||
..()
|
||||
|
||||
/obj/structure/table/bench/glass
|
||||
icon_state = "plain_preview"
|
||||
color = "#00E1FF"
|
||||
alpha = 77 // 0.3 * 255
|
||||
|
||||
/obj/structure/table/bench/glass/New()
|
||||
material = get_material_by_name("glass")
|
||||
..()
|
||||
|
||||
/*
|
||||
/obj/structure/table/bench/holotable
|
||||
icon_state = "holo_preview"
|
||||
color = "#EEEEEE"
|
||||
|
||||
/obj/structure/table/bench/holotable/New()
|
||||
material = get_material_by_name("holo[DEFAULT_TABLE_MATERIAL]")
|
||||
..()
|
||||
|
||||
/obj/structure/table/bench/wooden/holotable
|
||||
icon_state = "holo_preview"
|
||||
|
||||
/obj/structure/table/bench/wooden/holotable/New()
|
||||
material = get_material_by_name("holowood")
|
||||
..()
|
||||
*/
|
||||
@@ -1,28 +1,28 @@
|
||||
/obj/structure/table/rack
|
||||
name = "rack"
|
||||
desc = "Different from the Middle Ages version."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "rack"
|
||||
can_plate = 0
|
||||
can_reinforce = 0
|
||||
flipped = -1
|
||||
|
||||
/obj/structure/table/rack/New()
|
||||
..()
|
||||
verbs -= /obj/structure/table/verb/do_flip
|
||||
verbs -= /obj/structure/table/proc/do_put
|
||||
|
||||
/obj/structure/table/rack/update_connections()
|
||||
return
|
||||
|
||||
/obj/structure/table/rack/update_desc()
|
||||
return
|
||||
|
||||
/obj/structure/table/rack/update_icon()
|
||||
if(material) //VOREStation Add for rack colors based on materials
|
||||
color = material.icon_colour
|
||||
return
|
||||
|
||||
/obj/structure/table/rack/holorack/dismantle(obj/item/weapon/tool/wrench/W, mob/user)
|
||||
to_chat(user, "<span class='warning'>You cannot dismantle \the [src].</span>")
|
||||
return
|
||||
/obj/structure/table/rack
|
||||
name = "rack"
|
||||
desc = "Different from the Middle Ages version."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "rack"
|
||||
can_plate = 0
|
||||
can_reinforce = 0
|
||||
flipped = -1
|
||||
|
||||
/obj/structure/table/rack/New()
|
||||
..()
|
||||
verbs -= /obj/structure/table/verb/do_flip
|
||||
verbs -= /obj/structure/table/proc/do_put
|
||||
|
||||
/obj/structure/table/rack/update_connections()
|
||||
return
|
||||
|
||||
/obj/structure/table/rack/update_desc()
|
||||
return
|
||||
|
||||
/obj/structure/table/rack/update_icon()
|
||||
if(material) //VOREStation Add for rack colors based on materials
|
||||
color = material.icon_colour
|
||||
return
|
||||
|
||||
/obj/structure/table/rack/holorack/dismantle(obj/item/weapon/tool/wrench/W, mob/user)
|
||||
to_chat(user, "<span class='warning'>You cannot dismantle \the [src].</span>")
|
||||
return
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/obj/structure/window/New()
|
||||
..()
|
||||
for(var/obj/structure/table/T in view(src, 1))
|
||||
T.update_connections()
|
||||
T.update_icon()
|
||||
|
||||
/obj/structure/window/Destroy()
|
||||
var/oldloc = loc
|
||||
. = ..()
|
||||
for(var/obj/structure/table/T in view(oldloc, 1))
|
||||
T.update_connections()
|
||||
T.update_icon()
|
||||
|
||||
/obj/structure/window/Move()
|
||||
var/oldloc = loc
|
||||
. = ..()
|
||||
if(loc != oldloc)
|
||||
for(var/obj/structure/table/T in view(oldloc, 1) | view(loc, 1))
|
||||
T.update_connections()
|
||||
/obj/structure/window/New()
|
||||
..()
|
||||
for(var/obj/structure/table/T in view(src, 1))
|
||||
T.update_connections()
|
||||
T.update_icon()
|
||||
|
||||
/obj/structure/window/Destroy()
|
||||
var/oldloc = loc
|
||||
. = ..()
|
||||
for(var/obj/structure/table/T in view(oldloc, 1))
|
||||
T.update_connections()
|
||||
T.update_icon()
|
||||
|
||||
/obj/structure/window/Move()
|
||||
var/oldloc = loc
|
||||
. = ..()
|
||||
if(loc != oldloc)
|
||||
for(var/obj/structure/table/T in view(oldloc, 1) | view(loc, 1))
|
||||
T.update_connections()
|
||||
T.update_icon()
|
||||
Reference in New Issue
Block a user