Merge pull request #5342 from Zuhayr/dev

Allows climbing onto tables and crates, also adds falling off if you are...
This commit is contained in:
Chinsky
2014-06-24 13:05:17 +04:00
3 changed files with 95 additions and 20 deletions
@@ -7,6 +7,7 @@
icon_state = "crate"
icon_opened = "crateopen"
icon_closed = "crate"
climbable = 1
// mouse_drag_pointer = MOUSE_ACTIVE_POINTER //???
var/rigged = 0
@@ -36,7 +37,11 @@
O.loc = get_turf(src)
icon_state = icon_opened
src.opened = 1
return 1
if(climbable)
structure_shaken()
return
/obj/structure/closet/crate/close()
if(!src.opened)
+12 -15
View File
@@ -19,6 +19,8 @@
anchored = 1.0
layer = 2.8
throwpass = 1 //You can throw objects over this, despite it's density.")
climbable = 1
var/parts = /obj/item/weapon/table_parts
var/flipped = 0
var/health = 100
@@ -412,31 +414,26 @@
return 0
return T.straight_table_check(direction)
/obj/structure/table/verb/can_touch(var/mob/user)
if (!user)
return 0
if (user.stat) //zombie goasts go away
return 0
if (issilicon(user))
user << "<span class='notice'>You need hands for this.</span>"
return 0
return 1
/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(ismouse(usr))
return
if (!can_touch(usr))
if (!can_touch(usr) || ismouse(usr))
return
if(!flip(get_cardinal_dir(usr,src)))
usr << "<span class='notice'>It won't budge.</span>"
else
usr.visible_message("<span class='warning'>[usr] flips \the [src]!</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