mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
Merge branch 'master' of https://github.com/tgstation/-tg-station into AttackbyDestruction
Conflicts: code/game/objects/structures/crates_lockers/closets.dm
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
pressure_resistance = 8
|
||||
var/climb_time = 20
|
||||
var/climb_stun = 2
|
||||
var/climbable = FALSE
|
||||
var/mob/structureclimber
|
||||
|
||||
@@ -60,7 +61,7 @@
|
||||
. = ..()
|
||||
if(!climbable)
|
||||
return
|
||||
if(ismob(O) && user == O && ishuman(user))
|
||||
if(ismob(O) && user == O && iscarbon(user))
|
||||
if(user.canmove)
|
||||
climb_structure(user)
|
||||
return
|
||||
@@ -78,22 +79,22 @@
|
||||
src.add_fingerprint(user)
|
||||
user.visible_message("<span class='warning'>[user] starts climbing onto [src].</span>", \
|
||||
"<span class='notice'>You start climbing onto [src]...</span>")
|
||||
var/climb_time = 20
|
||||
var/adjusted_climb_time = climb_time
|
||||
if(user.restrained()) //climbing takes twice as long when restrained.
|
||||
climb_time *= 2
|
||||
adjusted_climb_time *= 2
|
||||
if(istype(user, /mob/living/carbon/alien))
|
||||
adjusted_climb_time *= 0.25 //aliens are terrifyingly fast
|
||||
structureclimber = user
|
||||
if(do_mob(user, user, climb_time))
|
||||
if(do_mob(user, user, adjusted_climb_time))
|
||||
if(src.loc) //Checking if structure has been destroyed
|
||||
density = 0
|
||||
if(step(user,get_dir(user,src.loc)))
|
||||
user.visible_message("<span class='warning'>[user] climbs onto [src].</span>", \
|
||||
"<span class='notice'>You climb onto [src].</span>")
|
||||
add_logs(user, src, "climbed onto")
|
||||
user.Stun(2)
|
||||
user.Stun(climb_stun)
|
||||
. = 1
|
||||
else
|
||||
user << "<span class='warning'>You fail to climb onto [src].</span>"
|
||||
density = 1
|
||||
structureclimber = null
|
||||
return 1
|
||||
structureclimber = null
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user