Pulling lockers now slow you down. (#46216)

Pulling lockers now slow you down.
This commit is contained in:
skoglol
2019-09-02 18:32:54 -07:00
committed by Rob Bailey
parent a0f476d874
commit 86839addb9
8 changed files with 29 additions and 12 deletions
+2 -2
View File
@@ -64,6 +64,6 @@
#define MOVESPEED_ID_DIE_OF_FATE "DIE_OF_FATE"
#define MOVESPEED_ID_SHOVE "SHOVE"
#define MOVESPEED_ID_PRONE_DRAGGING "PRONE_DRAG"
#define MOVESPEED_ID_BULKY_DRAGGING "BULKY_DRAG"
#define MOVESPEED_ID_HUMAN_CARRYING "HUMAN_CARRY"
#define MOVESPEED_ID_SHRINK_RAY "SHRUNKEN_SPEED_MODIFIER"
#define MOVESPEED_ID_SHRINK_RAY "SHRUNKEN_SPEED_MODIFIER"
+2
View File
@@ -31,6 +31,8 @@
var/renamedByPlayer = FALSE //set when a player uses a pen on a renamable object
var/drag_slowdown // Amont of multiplicative slowdown applied if pulled. >1 makes you slower, <1 makes you faster.
/obj/vv_edit_var(vname, vval)
switch(vname)
if("anchored")
+2 -1
View File
@@ -3,12 +3,13 @@
pressure_resistance = 8
max_integrity = 300
interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT
layer = BELOW_OBJ_LAYER
var/climb_time = 20
var/climb_stun = 20
var/climbable = FALSE
var/mob/living/structureclimber
var/broken = 0 //similar to machinery's stat BROKEN
layer = BELOW_OBJ_LAYER
/obj/structure/Initialize()
@@ -4,6 +4,11 @@
icon = 'icons/obj/closet.dmi'
icon_state = "generic"
density = TRUE
drag_slowdown = 1.5 // Same as a prone mob
max_integrity = 200
integrity_failure = 50
armor = list("melee" = 20, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 60)
var/icon_door = null
var/icon_door_override = FALSE //override to have open overlay use icon different to its base's
var/secure = FALSE //secure locker or not, also used if overriding a non-secure locker with a secure door overlay to add fancy lights
@@ -12,9 +17,6 @@
var/locked = FALSE
var/large = TRUE
var/wall_mounted = 0 //never solid (You can always pass over it)
max_integrity = 200
integrity_failure = 50
armor = list("melee" = 20, "bullet" = 10, "laser" = 10, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 60)
var/breakout_time = 1200
var/message_cooldown
var/can_weld_shut = TRUE
@@ -15,6 +15,7 @@
delivery_icon = null //unwrappable
anchorable = FALSE
mouse_drag_pointer = MOUSE_ACTIVE_POINTER
drag_slowdown = 0
var/foldedbag_path = /obj/item/bodybag
var/obj/item/bodybag/foldedbag_instance = null
var/tagged = 0 // so closet code knows to put the tag overlay back
@@ -17,6 +17,7 @@
close_sound = 'sound/machines/crate_close.ogg'
open_sound_volume = 35
close_sound_volume = 50
drag_slowdown = 0
var/obj/item/paper/fluff/jobs/cargo/manifest/manifest
/obj/structure/closet/crate/Initialize()
+1 -1
View File
@@ -117,4 +117,4 @@
var/list/diseases = list() // list of all diseases in a mob
var/list/disease_resistances = list()
var/drag_slowdown = TRUE //Whether the mob is slowed down when dragging another prone mob
var/slowed_by_drag = TRUE //Whether the mob is slowed down when dragging another prone mob
+15 -5
View File
@@ -42,12 +42,22 @@
remove_movespeed_modifier(MOVESPEED_ID_LIVING_TURF_SPEEDMOD)
/mob/living/proc/update_pull_movespeed()
if(pulling && isliving(pulling))
var/mob/living/L = pulling
if(drag_slowdown && !(L.mobility_flags & MOBILITY_STAND) && !L.buckled && grab_state < GRAB_AGGRESSIVE)
add_movespeed_modifier(MOVESPEED_ID_PRONE_DRAGGING, multiplicative_slowdown = PULL_PRONE_SLOWDOWN)
if(pulling)
if(isliving(pulling))
var/mob/living/L = pulling
if(!slowed_by_drag || (L.mobility_flags & MOBILITY_STAND) || L.buckled || grab_state >= GRAB_AGGRESSIVE)
remove_movespeed_modifier(MOVESPEED_ID_BULKY_DRAGGING)
return
add_movespeed_modifier(MOVESPEED_ID_BULKY_DRAGGING, multiplicative_slowdown = PULL_PRONE_SLOWDOWN)
return
remove_movespeed_modifier(MOVESPEED_ID_PRONE_DRAGGING)
if(isobj(pulling))
var/obj/structure/S = pulling
if(!slowed_by_drag || !S.drag_slowdown)
remove_movespeed_modifier(MOVESPEED_ID_BULKY_DRAGGING)
return
add_movespeed_modifier(MOVESPEED_ID_BULKY_DRAGGING, multiplicative_slowdown = S.drag_slowdown)
return
remove_movespeed_modifier(MOVESPEED_ID_BULKY_DRAGGING)
/mob/living/can_zFall(turf/T, levels)
return ..()