mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-22 05:25:15 +01:00
Fixes thrown closet opening to not use spawn().
Fixes throw_at() to look nicely for xeno leap by adding the diagonals_first argument. Removes useless gateway/Crossed and gateway/Bumped(). Changes throw_at() to use diagonal directions. I replaced the atom variable "throwpass" with the LETPASSTHROW pass_flags I readded hit_check proc to catch things getting on the thrown thing's tile during its sleep(1) (especially needed for mobs running towards the thing), the only other possibility would've been to add throwing checks in atom/movable/Crossed() (called after every move) and I don't think it'd be worth it. I added the item var "thrownby" to be able to continue to log the thrower of the item when it hits a mob. It removes the need for a thrower argument in throw_impact() and hitby().
This commit is contained in:
@@ -79,12 +79,10 @@
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/dump_contents()
|
||||
|
||||
for(var/obj/O in src)
|
||||
O.loc = loc
|
||||
if(throwing) //you keep some momentum when getting out of a thrown closet
|
||||
spawn(2) //some time to avoid a collision between the obj and the closet/crate
|
||||
step(O, dir)
|
||||
step(O, dir)
|
||||
|
||||
for(var/mob/M in src)
|
||||
M.loc = loc
|
||||
@@ -92,8 +90,9 @@
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
if(throwing)
|
||||
spawn(2)
|
||||
step(M, dir)
|
||||
step(M, dir)
|
||||
if(throwing)
|
||||
throwing = 0
|
||||
|
||||
/obj/structure/closet/proc/take_contents()
|
||||
|
||||
@@ -106,14 +105,13 @@
|
||||
return 0
|
||||
if(!can_open())
|
||||
return 0
|
||||
dump_contents()
|
||||
|
||||
opened = 1
|
||||
if(istype(src, /obj/structure/closet/body_bag))
|
||||
playsound(loc, 'sound/items/zip.ogg', 15, 1, -3)
|
||||
else
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
density = 0
|
||||
dump_contents()
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ Crematorium Switch
|
||||
layer = 2.9
|
||||
var/obj/structure/bodycontainer/connected = null
|
||||
anchored = 1.0
|
||||
throwpass = 1
|
||||
pass_flags = LETPASSTHROW
|
||||
|
||||
/obj/structure/tray/Destroy()
|
||||
if(connected)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
layer = 2.8
|
||||
throwpass = 1 //You can throw objects over this, despite it's density.")
|
||||
pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density.")
|
||||
var/frame = /obj/structure/table_frame
|
||||
var/framestack = /obj/item/stack/rods
|
||||
var/buildstack = /obj/item/stack/sheet/metal
|
||||
@@ -364,7 +364,7 @@
|
||||
icon_state = "rack"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
throwpass = 1 //You can throw objects over this, despite it's density.
|
||||
pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density.
|
||||
var/health = 5
|
||||
|
||||
/obj/structure/rack/ex_act(severity, target)
|
||||
|
||||
Reference in New Issue
Block a user