Fixes Pushing Custodial Carts Slowing You Down (#15409)

This commit is contained in:
SleepyGemmy
2023-01-06 17:44:24 +01:00
committed by GitHub
parent 678e5267bd
commit e4ef2c8c83
8 changed files with 29 additions and 19 deletions
+5 -4
View File
@@ -17,7 +17,7 @@
var/throw_speed = 2
var/throw_range = 7
var/moved_recently = 0
var/mob/pulledby = null
var/atom/movable/pulledby = null
var/item_state = null // Base name of the image used for when the item is in someone's hand. Suffixes are added to this. Doubles as legacy overlay_state.
var/overlay_state = null // Base name of the image used for when the item is worn. Suffixes are added to this. Important for icon flipping as _flip is added at the end of the value.
//Also used on holdable mobs for the same info related to their held version
@@ -53,9 +53,10 @@
qdel(AM)
loc = null
screen_loc = null
if (pulledby)
if (pulledby.pulling == src)
pulledby.pulling = null
if(ismob(pulledby))
var/mob/M = pulledby
if(M.pulling == src)
M.pulling = null
pulledby = null
if (bound_overlay)
@@ -400,9 +400,10 @@
if(isAdminLevel(src.z))
return
if(pulledby)
if(pulledby.pulling == src)
pulledby.pulling = null
if(ismob(pulledby))
var/mob/M = pulledby
if(M.pulling == src)
M.pulling = null
pulledby = null
for(var/thing in grabbed_by)
qdel(thing)
+2 -2
View File
@@ -7,8 +7,8 @@
</br>You can also use a lightreplacer, spraybottle (of spacecleaner) and four wet-floor signs on the cart to store them"
icon = 'icons/obj/janitor.dmi'
icon_state = "cart"
anchored = 0
density = 1
anchored = FALSE
density = TRUE
climbable = TRUE
flags = OPENCONTAINER
build_amt = 15
@@ -7,13 +7,11 @@
material_alteration = MATERIAL_ALTERATION_DESC
held_item = /obj/item/material/stool/chair/wheelchair
withdraw_verb = "fold"
can_dismantle = FALSE
slowdown = 1
var/bloodiness
slowdown = 0
/obj/structure/bed/stool/chair/office/wheelchair/New(var/newloc) // Colorable wheelchairs?
..(newloc, MATERIAL_STEEL, MATERIAL_CLOTH)
+3 -2
View File
@@ -1311,8 +1311,9 @@
if (dest != loc && istype(dest, /atom/movable))
AM = dest
LAZYADD(AM.contained_mobs, src)
if(pulledby)
pulledby.stop_pulling()
if(ismob(pulledby))
var/mob/M = pulledby
M.stop_pulling()
if (istype(loc, /atom/movable))
AM = loc
+2 -1
View File
@@ -339,7 +339,8 @@
//Wheelchair pushing goes here for now.
//TODO: Fuck wheelchairs.
if(istype(mob.pulledby, /obj/structure/bed/stool/chair/office/wheelchair) || istype(mob.pulledby, /obj/structure/janitorialcart))
move_delay += 1
var/obj/structure/S = mob.pulledby
move_delay += S.slowdown
return mob.pulledby.relaymove(mob, direct)
var/old_loc = mob.loc
+6 -4
View File
@@ -73,8 +73,9 @@
return
user.visible_message("\The [user] puts down \the [src]'s kickstand.", "You put down \the [src]'s kickstand.", "You hear a thunk.")
playsound(src, 'sound/misc/bike_stand_down.ogg', 50, 1)
if(pulledby)
pulledby.stop_pulling()
if(ismob(pulledby))
var/mob/M = pulledby
M.stop_pulling()
kickstand = !kickstand
anchored = (kickstand || on)
@@ -143,8 +144,9 @@
update_icon()
if(pulledby)
pulledby.stop_pulling()
if(ismob(pulledby))
var/mob/M = pulledby
M.stop_pulling()
..()
/obj/vehicle/bike/turn_off()
@@ -0,0 +1,6 @@
author: SleepyGemmy
delete-after: True
changes:
- bugfix: "Fixes pushing custodial carts slowing you down."