mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
You can no longer steal chairs that mobs are buckled to those chairs. Fixes issue 1133.
False walls now have a variable that flips on when it's opening or closing. This should prevent the closing door code to execute after trying to open the door (or visa versa) due to the sleep()s used in there. I've also re-organized teh false_walls.dm file a bit. False r-walls really need to be changed into a subtype of false walls at some point. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5289 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -252,7 +252,15 @@
|
|||||||
for(var/obj/O in get_turf(src))
|
for(var/obj/O in get_turf(src))
|
||||||
if(itemcount >= storage_capacity)
|
if(itemcount >= storage_capacity)
|
||||||
break
|
break
|
||||||
if(O.density || O.anchored || istype(O,/obj/structure/closet)) continue
|
|
||||||
|
if(O.density || O.anchored || istype(O,/obj/structure/closet))
|
||||||
|
continue
|
||||||
|
|
||||||
|
if(istype(O, /obj/structure/stool/bed)) //This is only necessary because of rollerbeds and swivel chairs.
|
||||||
|
var/obj/structure/stool/bed/B = O
|
||||||
|
if(B.buckled_mob)
|
||||||
|
continue
|
||||||
|
|
||||||
O.loc = src
|
O.loc = src
|
||||||
itemcount++
|
itemcount++
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
|
/*
|
||||||
|
* False Walls
|
||||||
|
*/
|
||||||
/obj/structure/falsewall
|
/obj/structure/falsewall
|
||||||
name = "wall"
|
name = "wall"
|
||||||
desc = "A huge chunk of metal used to seperate rooms."
|
desc = "A huge chunk of metal used to seperate rooms."
|
||||||
anchored = 1
|
anchored = 1
|
||||||
icon = 'icons/turf/walls.dmi'
|
icon = 'icons/turf/walls.dmi'
|
||||||
var/mineral = "metal"
|
var/mineral = "metal"
|
||||||
|
var/opening = 0
|
||||||
|
|
||||||
/obj/structure/falsewall/New()
|
/obj/structure/falsewall/New()
|
||||||
relativewall_neighbours()
|
relativewall_neighbours()
|
||||||
@@ -24,65 +28,6 @@
|
|||||||
W.relativewall()
|
W.relativewall()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/structure/falsewall/gold
|
|
||||||
name = "gold wall"
|
|
||||||
desc = "A wall with gold plating. Swag!"
|
|
||||||
icon_state = ""
|
|
||||||
mineral = "gold"
|
|
||||||
|
|
||||||
/obj/structure/falsewall/silver
|
|
||||||
name = "silver wall"
|
|
||||||
desc = "A wall with silver plating. Shiny."
|
|
||||||
icon_state = ""
|
|
||||||
mineral = "silver"
|
|
||||||
|
|
||||||
/obj/structure/falsewall/diamond
|
|
||||||
name = "diamond wall"
|
|
||||||
desc = "A wall with diamond plating. You monster."
|
|
||||||
icon_state = ""
|
|
||||||
mineral = "diamond"
|
|
||||||
|
|
||||||
/obj/structure/falsewall/uranium
|
|
||||||
name = "uranium wall"
|
|
||||||
desc = "A wall with uranium plating. This is probably a bad idea."
|
|
||||||
icon_state = ""
|
|
||||||
mineral = "uranium"
|
|
||||||
var/active = null
|
|
||||||
var/last_event = 0
|
|
||||||
|
|
||||||
/obj/structure/falsewall/plasma
|
|
||||||
name = "plasma wall"
|
|
||||||
desc = "A wall with plasma plating. This is definately a bad idea."
|
|
||||||
icon_state = ""
|
|
||||||
mineral = "plasma"
|
|
||||||
|
|
||||||
//-----------wtf?-----------start
|
|
||||||
/obj/structure/falsewall/clown
|
|
||||||
name = "bananium wall"
|
|
||||||
desc = "A wall with bananium plating. Honk!"
|
|
||||||
icon_state = ""
|
|
||||||
mineral = "clown"
|
|
||||||
|
|
||||||
/obj/structure/falsewall/sandstone
|
|
||||||
name = "sandstone wall"
|
|
||||||
desc = "A wall with sandstone plating."
|
|
||||||
icon_state = ""
|
|
||||||
mineral = "sandstone"
|
|
||||||
//------------wtf?------------end
|
|
||||||
|
|
||||||
/obj/structure/falserwall
|
|
||||||
name = "reinforced wall"
|
|
||||||
desc = "A huge chunk of reinforced metal used to seperate rooms."
|
|
||||||
icon = 'icons/turf/walls.dmi'
|
|
||||||
icon_state = "r_wall"
|
|
||||||
density = 1
|
|
||||||
opacity = 1
|
|
||||||
anchored = 1
|
|
||||||
var/mineral = "metal"
|
|
||||||
|
|
||||||
/obj/structure/falserwall/New()
|
|
||||||
relativewall_neighbours()
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/structure/falsewall/relativewall()
|
/obj/structure/falsewall/relativewall()
|
||||||
|
|
||||||
@@ -108,24 +53,26 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/falsewall/attack_hand(mob/user as mob)
|
/obj/structure/falsewall/attack_hand(mob/user as mob)
|
||||||
|
if(opening)
|
||||||
|
return
|
||||||
|
|
||||||
if(density)
|
if(density)
|
||||||
// Open wall
|
opening = 1
|
||||||
icon_state = "[mineral]fwall_open"
|
icon_state = "[mineral]fwall_open"
|
||||||
flick("[mineral]fwall_opening", src)
|
flick("[mineral]fwall_opening", src)
|
||||||
sleep(15)
|
sleep(15)
|
||||||
src.density = 0
|
src.density = 0
|
||||||
SetOpacity(0)
|
SetOpacity(0)
|
||||||
|
opening = 0
|
||||||
else
|
else
|
||||||
|
opening = 1
|
||||||
flick("[mineral]fwall_closing", src)
|
flick("[mineral]fwall_closing", src)
|
||||||
icon_state = "[mineral]0"
|
icon_state = "[mineral]0"
|
||||||
density = 1
|
density = 1
|
||||||
sleep(15)
|
sleep(15)
|
||||||
SetOpacity(1)
|
SetOpacity(1)
|
||||||
src.relativewall()
|
src.relativewall()
|
||||||
|
opening = 0
|
||||||
/obj/structure/falsewall/uranium/attack_hand(mob/user as mob)
|
|
||||||
radiate()
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/structure/falsewall/update_icon()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
|
/obj/structure/falsewall/update_icon()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
|
||||||
..()
|
..()
|
||||||
@@ -136,6 +83,10 @@
|
|||||||
icon_state = "[mineral]fwall_open"
|
icon_state = "[mineral]fwall_open"
|
||||||
|
|
||||||
/obj/structure/falsewall/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/structure/falsewall/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
|
if(opening)
|
||||||
|
user << "\red You must wait until the door has stopped moving."
|
||||||
|
return
|
||||||
|
|
||||||
if(density)
|
if(density)
|
||||||
if(istype(W, /obj/item/weapon/screwdriver))
|
if(istype(W, /obj/item/weapon/screwdriver))
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
@@ -193,21 +144,6 @@
|
|||||||
T = get_turf(src)
|
T = get_turf(src)
|
||||||
T.attackby(W,user)
|
T.attackby(W,user)
|
||||||
del(src)
|
del(src)
|
||||||
/*
|
|
||||||
|
|
||||||
var/turf/T = get_turf(user)
|
|
||||||
user << "\blue Now adding plating..."
|
|
||||||
sleep(40)
|
|
||||||
if (get_turf(user) == T)
|
|
||||||
user << "\blue You added the plating!"
|
|
||||||
var/turf/Tsrc = get_turf(src)
|
|
||||||
Tsrc.ReplaceWithWall()
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/obj/structure/falsewall/uranium/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
||||||
radiate()
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/structure/falsewall/update_icon()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
|
/obj/structure/falsewall/update_icon()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
|
||||||
..()
|
..()
|
||||||
@@ -217,24 +153,48 @@
|
|||||||
else
|
else
|
||||||
icon_state = "[mineral]fwall_open"
|
icon_state = "[mineral]fwall_open"
|
||||||
|
|
||||||
/obj/structure/falserwall/
|
/*
|
||||||
anchored = 1
|
* False R-Walls
|
||||||
|
*/
|
||||||
|
|
||||||
attack_hand(mob/user as mob)
|
/obj/structure/falserwall
|
||||||
if(density)
|
name = "reinforced wall"
|
||||||
// Open wall
|
desc = "A huge chunk of reinforced metal used to seperate rooms."
|
||||||
icon_state = "frwall_open"
|
icon = 'icons/turf/walls.dmi'
|
||||||
flick("frwall_opening", src)
|
icon_state = "r_wall"
|
||||||
sleep(15)
|
density = 1
|
||||||
density = 0
|
opacity = 1
|
||||||
SetOpacity(0)
|
anchored = 1
|
||||||
else
|
var/mineral = "metal"
|
||||||
icon_state = "r_wall"
|
var/opening = 0
|
||||||
flick("frwall_closing", src)
|
|
||||||
density = 1
|
/obj/structure/falserwall/New()
|
||||||
sleep(15)
|
relativewall_neighbours()
|
||||||
SetOpacity(1)
|
..()
|
||||||
relativewall()
|
|
||||||
|
|
||||||
|
/obj/structure/falserwall/attack_hand(mob/user as mob)
|
||||||
|
if(opening)
|
||||||
|
return
|
||||||
|
|
||||||
|
if(density)
|
||||||
|
opening = 1
|
||||||
|
// Open wall
|
||||||
|
icon_state = "frwall_open"
|
||||||
|
flick("frwall_opening", src)
|
||||||
|
sleep(15)
|
||||||
|
density = 0
|
||||||
|
SetOpacity(0)
|
||||||
|
opening = 0
|
||||||
|
else
|
||||||
|
opening = 1
|
||||||
|
icon_state = "r_wall"
|
||||||
|
flick("frwall_closing", src)
|
||||||
|
density = 1
|
||||||
|
sleep(15)
|
||||||
|
SetOpacity(1)
|
||||||
|
relativewall()
|
||||||
|
opening = 0
|
||||||
|
|
||||||
/obj/structure/falserwall/relativewall()
|
/obj/structure/falserwall/relativewall()
|
||||||
|
|
||||||
@@ -262,6 +222,10 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/structure/falserwall/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/structure/falserwall/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
|
if(opening)
|
||||||
|
user << "\red You must wait until the door has stopped moving."
|
||||||
|
return
|
||||||
|
|
||||||
if(istype(W, /obj/item/weapon/screwdriver))
|
if(istype(W, /obj/item/weapon/screwdriver))
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
user.visible_message("[user] tightens some bolts on the r wall.", "You tighten the bolts on the wall.")
|
user.visible_message("[user] tightens some bolts on the r wall.", "You tighten the bolts on the wall.")
|
||||||
@@ -299,6 +263,27 @@
|
|||||||
T.attackby(W,user)
|
T.attackby(W,user)
|
||||||
del(src)
|
del(src)
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Uranium Falsewalls
|
||||||
|
*/
|
||||||
|
|
||||||
|
/obj/structure/falsewall/uranium
|
||||||
|
name = "uranium wall"
|
||||||
|
desc = "A wall with uranium plating. This is probably a bad idea."
|
||||||
|
icon_state = ""
|
||||||
|
mineral = "uranium"
|
||||||
|
var/active = null
|
||||||
|
var/last_event = 0
|
||||||
|
|
||||||
|
/obj/structure/falsewall/uranium/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
|
radiate()
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/structure/falsewall/uranium/attack_hand(mob/user as mob)
|
||||||
|
radiate()
|
||||||
|
..()
|
||||||
|
|
||||||
/obj/structure/falsewall/uranium/proc/radiate()
|
/obj/structure/falsewall/uranium/proc/radiate()
|
||||||
if(!active)
|
if(!active)
|
||||||
if(world.time > last_event+15)
|
if(world.time > last_event+15)
|
||||||
@@ -311,3 +296,44 @@
|
|||||||
active = null
|
active = null
|
||||||
return
|
return
|
||||||
return
|
return
|
||||||
|
/*
|
||||||
|
* Other misc falsewall types
|
||||||
|
*/
|
||||||
|
|
||||||
|
/obj/structure/falsewall/gold
|
||||||
|
name = "gold wall"
|
||||||
|
desc = "A wall with gold plating. Swag!"
|
||||||
|
icon_state = ""
|
||||||
|
mineral = "gold"
|
||||||
|
|
||||||
|
/obj/structure/falsewall/silver
|
||||||
|
name = "silver wall"
|
||||||
|
desc = "A wall with silver plating. Shiny."
|
||||||
|
icon_state = ""
|
||||||
|
mineral = "silver"
|
||||||
|
|
||||||
|
/obj/structure/falsewall/diamond
|
||||||
|
name = "diamond wall"
|
||||||
|
desc = "A wall with diamond plating. You monster."
|
||||||
|
icon_state = ""
|
||||||
|
mineral = "diamond"
|
||||||
|
|
||||||
|
/obj/structure/falsewall/plasma
|
||||||
|
name = "plasma wall"
|
||||||
|
desc = "A wall with plasma plating. This is definately a bad idea."
|
||||||
|
icon_state = ""
|
||||||
|
mineral = "plasma"
|
||||||
|
|
||||||
|
//-----------wtf?-----------start
|
||||||
|
/obj/structure/falsewall/clown
|
||||||
|
name = "bananium wall"
|
||||||
|
desc = "A wall with bananium plating. Honk!"
|
||||||
|
icon_state = ""
|
||||||
|
mineral = "clown"
|
||||||
|
|
||||||
|
/obj/structure/falsewall/sandstone
|
||||||
|
name = "sandstone wall"
|
||||||
|
desc = "A wall with sandstone plating."
|
||||||
|
icon_state = ""
|
||||||
|
mineral = "sandstone"
|
||||||
|
//------------wtf?------------end
|
||||||
Reference in New Issue
Block a user