mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 21:40:55 +01:00
Fix persistent supplies (#22435)
# Summary This PR fixes the carry logic and persistence register of persistent supply packages. ## Changes - Fixed proc path of additional pickup checks that was still pointing at only delivery packages. - Fixed eager location check on persistence register. Objects finalize will do the same, but this will allow objects to be brought to the Horizon with persistence registered.
This commit is contained in:
@@ -9,10 +9,6 @@
|
||||
if(new_track.persistent_objects_track_active) // Prevent multiple registers per object and removes the need to check the register if it's already in there
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(new_track)
|
||||
if(!T || !is_station_level(T.z) || SSatlas.current_map.path != "sccv_horizon") // The persistence system only supports objects from the main map levels for multiple reasons, e.g. Z level value, mapping support
|
||||
return
|
||||
|
||||
new_track.persistent_objects_track_active = TRUE
|
||||
new_track.persistent_objects_author_ckey = ckey
|
||||
GLOB.persistence_object_track_register += new_track
|
||||
|
||||
@@ -36,6 +36,31 @@ ABSTRACT_TYPE(/obj/item/package)
|
||||
/obj/item/package/too_heavy_to_throw()
|
||||
return TRUE
|
||||
|
||||
/obj/item/package/do_additional_pickup_checks(var/mob/living/carbon/human/user)
|
||||
if(!ishuman(user))
|
||||
return FALSE
|
||||
|
||||
if(user.species.mob_size < 12)
|
||||
var/obj/A = user.get_inactive_hand()
|
||||
if(A)
|
||||
to_chat(user, SPAN_WARNING("Your other hand is occupied!"))
|
||||
return
|
||||
|
||||
user.visible_message("<b>[user]</b> tightens their grip on \the [src] and starts heaving...", SPAN_NOTICE("You tighten your grip on \the [src] and start heaving..."))
|
||||
if(do_after(user, 1 SECONDS, src, DO_UNIQUE))
|
||||
user.visible_message("<b>[user]</b> heaves \the [src] up!", SPAN_NOTICE("You heave \the [src] up!"))
|
||||
// larger mobs, such as industrials, can hold two pieces of cargo
|
||||
if(user.species.mob_size < 12)
|
||||
wield(user)
|
||||
slowdown = 1
|
||||
else
|
||||
slowdown = 0
|
||||
|
||||
user.update_equipment_speed_mods()
|
||||
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/package/delivery
|
||||
name = "cargo package"
|
||||
desc = "\
|
||||
@@ -96,31 +121,6 @@ ABSTRACT_TYPE(/obj/item/package)
|
||||
delivery_point_coordinates = "[delivery_point.x]-[delivery_point.y]"
|
||||
pay_amount = pay_amount * delivery_point.payment_modifier
|
||||
|
||||
/obj/item/package/delivery/do_additional_pickup_checks(var/mob/living/carbon/human/user)
|
||||
if(!ishuman(user))
|
||||
return FALSE
|
||||
|
||||
if(user.species.mob_size < 12)
|
||||
var/obj/A = user.get_inactive_hand()
|
||||
if(A)
|
||||
to_chat(user, SPAN_WARNING("Your other hand is occupied!"))
|
||||
return
|
||||
|
||||
user.visible_message("<b>[user]</b> tightens their grip on \the [src] and starts heaving...", SPAN_NOTICE("You tighten your grip on \the [src] and start heaving..."))
|
||||
if(do_after(user, 1 SECONDS, src, DO_UNIQUE))
|
||||
user.visible_message("<b>[user]</b> heaves \the [src] up!", SPAN_NOTICE("You heave \the [src] up!"))
|
||||
// larger mobs, such as industrials, can hold two pieces of cargo
|
||||
if(user.species.mob_size < 12)
|
||||
wield(user)
|
||||
slowdown = 1
|
||||
else
|
||||
slowdown = 0
|
||||
|
||||
user.update_equipment_speed_mods()
|
||||
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/package/delivery/offship
|
||||
pays_horizon_account = FALSE
|
||||
/// Whether this package is guaranteed to deliver to the horizon or not
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
author: FabianK3
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- bugfix: "Fixed two-hand carry and pickup of persistent supply packages."
|
||||
- bugfix: "Removed location check on persistent object register."
|
||||
Reference in New Issue
Block a user