mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge pull request #10867 from VOREStation/Fixes/10787
Fix excessive table merge, convert climbers lazy
This commit is contained in:
committed by
Chompstation Bot
parent
0b9ebd3c6a
commit
c30f4c2dbc
@@ -7,7 +7,7 @@
|
||||
var/climb_delay = 3.5 SECONDS
|
||||
var/breakable
|
||||
var/parts
|
||||
var/list/climbers = list()
|
||||
var/list/climbers
|
||||
var/block_turf_edges = FALSE // If true, turf edge icons will not be made on the turf this occupies.
|
||||
|
||||
var/list/connections = list("0", "0", "0", "0")
|
||||
@@ -35,7 +35,7 @@
|
||||
if(H.species.can_shred(user))
|
||||
attack_generic(user,1,"slices")
|
||||
|
||||
if(climbers.len && !(user in climbers))
|
||||
if(LAZYLEN(climbers) && !(user in climbers))
|
||||
user.visible_message("<span class='warning'>[user.name] shakes \the [src].</span>", \
|
||||
"<span class='notice'>You shake \the [src].</span>")
|
||||
structure_shaken()
|
||||
@@ -103,21 +103,21 @@
|
||||
return
|
||||
|
||||
usr.visible_message("<span class='warning'>[user] starts climbing onto \the [src]!</span>")
|
||||
climbers |= user
|
||||
LAZYDISTINCTADD(climbers, user)
|
||||
|
||||
if(!do_after(user,(issmall(user) ? climb_delay * 0.6 : climb_delay)))
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
if (!can_climb(user, post_climb_check=1))
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
return
|
||||
|
||||
usr.forceMove(get_turf(src))
|
||||
|
||||
if (get_turf(user) == get_turf(src))
|
||||
usr.visible_message("<span class='warning'>[user] climbs onto \the [src]!</span>")
|
||||
climbers -= user
|
||||
LAZYREMOVE(climbers, user)
|
||||
|
||||
/obj/structure/proc/structure_shaken()
|
||||
for(var/mob/living/M in climbers)
|
||||
@@ -204,7 +204,7 @@
|
||||
if(can_visually_connect_to(S))
|
||||
if(S.can_visually_connect())
|
||||
if(propagate)
|
||||
//S.update_connections() //Not here
|
||||
S.update_connections()
|
||||
S.update_icon()
|
||||
dirs += get_dir(src, S)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user