mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-23 16:42:13 +00:00
Pulling lockers, chairs, etc. now gives you a slowdown. (#9785)
This commit is contained in:
@@ -81,6 +81,7 @@
|
|||||||
var/max_cooling = 12 //in degrees per second - probably don't need to mess with heat capacity here
|
var/max_cooling = 12 //in degrees per second - probably don't need to mess with heat capacity here
|
||||||
var/charge_consumption = 8.3 //charge per second at max_cooling
|
var/charge_consumption = 8.3 //charge per second at max_cooling
|
||||||
var/thermostat = T20C
|
var/thermostat = T20C
|
||||||
|
slowdown = 0
|
||||||
|
|
||||||
// Examine to see tank pressure
|
// Examine to see tank pressure
|
||||||
/obj/structure/closet/airbubble/examine(mob/user)
|
/obj/structure/closet/airbubble/examine(mob/user)
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
var/material/material
|
var/material/material
|
||||||
var/build_amt = 2 // used by some structures to determine into how many pieces they should disassemble into or be made with
|
var/build_amt = 2 // used by some structures to determine into how many pieces they should disassemble into or be made with
|
||||||
|
|
||||||
|
var/slowdown = 0 //amount that pulling mobs have their movement delayed by
|
||||||
|
|
||||||
/obj/structure/Destroy()
|
/obj/structure/Destroy()
|
||||||
if(parts)
|
if(parts)
|
||||||
new parts(loc)
|
new parts(loc)
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
var/const/default_mob_size = 15
|
var/const/default_mob_size = 15
|
||||||
var/obj/item/closet_teleporter/linked_teleporter
|
var/obj/item/closet_teleporter/linked_teleporter
|
||||||
|
|
||||||
|
slowdown = 5
|
||||||
|
|
||||||
/obj/structure/closet/LateInitialize()
|
/obj/structure/closet/LateInitialize()
|
||||||
if (opened) // if closed, any item at the crate's loc is put in the contents
|
if (opened) // if closed, any item at the crate's loc is put in the contents
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
var/tablestatus = 0
|
var/tablestatus = 0
|
||||||
pass_flags = PASSTABLE
|
pass_flags = PASSTABLE
|
||||||
|
|
||||||
|
slowdown = 0
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/closet/crate/can_open()
|
/obj/structure/closet/crate/can_open()
|
||||||
if (tablestatus != -1)//Can't be opened while under a table
|
if (tablestatus != -1)//Can't be opened while under a table
|
||||||
|
|||||||
@@ -30,6 +30,8 @@
|
|||||||
var/makes_rolling_sound = TRUE
|
var/makes_rolling_sound = TRUE
|
||||||
var/buckle_sound = 'sound/effects/buckle.ogg'
|
var/buckle_sound = 'sound/effects/buckle.ogg'
|
||||||
|
|
||||||
|
slowdown = 5
|
||||||
|
|
||||||
/obj/structure/bed/Initialize(mapload, var/new_material, var/new_padding_material)
|
/obj/structure/bed/Initialize(mapload, var/new_material, var/new_padding_material)
|
||||||
. = ..()
|
. = ..()
|
||||||
color = null
|
color = null
|
||||||
@@ -213,6 +215,7 @@
|
|||||||
var/obj/item/reagent_containers/beaker
|
var/obj/item/reagent_containers/beaker
|
||||||
var/iv_attached = 0
|
var/iv_attached = 0
|
||||||
var/iv_stand = TRUE
|
var/iv_stand = TRUE
|
||||||
|
slowdown = 0
|
||||||
|
|
||||||
/obj/structure/bed/roller/update_icon()
|
/obj/structure/bed/roller/update_icon()
|
||||||
overlays.Cut()
|
overlays.Cut()
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
var/mob/living/pulling = null
|
var/mob/living/pulling = null
|
||||||
var/bloodiness
|
var/bloodiness
|
||||||
|
|
||||||
|
slowdown = 0
|
||||||
|
|
||||||
/obj/structure/bed/chair/wheelchair/update_icon()
|
/obj/structure/bed/chair/wheelchair/update_icon()
|
||||||
cut_overlays()
|
cut_overlays()
|
||||||
add_overlay(image(icon = 'icons/obj/furniture.dmi', icon_state = "w_overlay", layer = FLY_LAYER))
|
add_overlay(image(icon = 'icons/obj/furniture.dmi', icon_state = "w_overlay", layer = FLY_LAYER))
|
||||||
|
|||||||
@@ -4,11 +4,7 @@
|
|||||||
if(species.slowdown)
|
if(species.slowdown)
|
||||||
tally = species.slowdown
|
tally = species.slowdown
|
||||||
|
|
||||||
if(ishuman(pulling))
|
tally += get_pulling_movement_delay()
|
||||||
var/mob/living/carbon/human/H = pulling
|
|
||||||
if(H.species.slowdown> species.slowdown)
|
|
||||||
tally = H.species.slowdown
|
|
||||||
tally += H.ClothesSlowdown()
|
|
||||||
|
|
||||||
if (istype(loc, /turf/space) || isopenturf(loc))
|
if (istype(loc, /turf/space) || isopenturf(loc))
|
||||||
if(!(locate(/obj/structure/lattice, loc) || locate(/obj/structure/stairs, loc) || locate(/obj/structure/ladder, loc)))
|
if(!(locate(/obj/structure/lattice, loc) || locate(/obj/structure/stairs, loc) || locate(/obj/structure/ladder, loc)))
|
||||||
@@ -176,3 +172,12 @@
|
|||||||
/mob/living/carbon/human/proc/ClothesSlowdown()
|
/mob/living/carbon/human/proc/ClothesSlowdown()
|
||||||
for(var/obj/item/I in list(wear_suit, w_uniform, back, gloves, head, wear_mask, shoes, l_ear, r_ear, glasses, belt))
|
for(var/obj/item/I in list(wear_suit, w_uniform, back, gloves, head, wear_mask, shoes, l_ear, r_ear, glasses, belt))
|
||||||
. += I.slowdown
|
. += I.slowdown
|
||||||
|
|
||||||
|
/mob/living/carbon/human/get_pulling_movement_delay()
|
||||||
|
. = ..()
|
||||||
|
|
||||||
|
if(ishuman(pulling))
|
||||||
|
var/mob/living/carbon/human/H = pulling
|
||||||
|
if(H.species.slowdown > species.slowdown)
|
||||||
|
. += H.species.slowdown - species.slowdown
|
||||||
|
. += H.ClothesSlowdown()
|
||||||
@@ -31,4 +31,14 @@
|
|||||||
up_hint.icon_state = "uphint[(B ? !!B.is_hole : 0)]"
|
up_hint.icon_state = "uphint[(B ? !!B.is_hole : 0)]"
|
||||||
|
|
||||||
/mob/living/silicon/robot/movement_delay()
|
/mob/living/silicon/robot/movement_delay()
|
||||||
return speed
|
. = speed
|
||||||
|
. += get_pulling_movement_delay()
|
||||||
|
|
||||||
|
/mob/living/silicon/robot/get_pulling_movement_delay()
|
||||||
|
. = ..()
|
||||||
|
|
||||||
|
if(ishuman(pulling))
|
||||||
|
var/mob/living/carbon/human/H = pulling
|
||||||
|
if(H.species.slowdown > speed)
|
||||||
|
. += H.species.slowdown - speed
|
||||||
|
. += H.ClothesSlowdown()
|
||||||
@@ -207,7 +207,13 @@
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
/mob/proc/movement_delay()
|
/mob/proc/movement_delay()
|
||||||
return 0
|
. = get_pulling_movement_delay()
|
||||||
|
|
||||||
|
/mob/proc/get_pulling_movement_delay()
|
||||||
|
. = 0
|
||||||
|
if(istype(pulling, /obj/structure))
|
||||||
|
var/obj/structure/P = pulling
|
||||||
|
. += P.slowdown
|
||||||
|
|
||||||
/mob/proc/Life()
|
/mob/proc/Life()
|
||||||
return
|
return
|
||||||
|
|||||||
6
html/changelogs/pulling-structures-slowdown.yml
Normal file
6
html/changelogs/pulling-structures-slowdown.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
author: mikomyazaki
|
||||||
|
|
||||||
|
delete-after: True
|
||||||
|
|
||||||
|
changes:
|
||||||
|
- tweak: "Pulling structures, e.g. chairs, lockers will now cause some slowdown. To prevent people circumventing the slowdown from pulling a slow mob by putting them inside something first. Roller beds & Wheelchairs are exempt from this."
|
||||||
Reference in New Issue
Block a user