mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 15:01:04 +01:00
Persistent mobile liquid tanks (#22879)
# Summary This PR makes liquid tanks (fuel, foam, water) persistent.
This commit is contained in:
@@ -578,7 +578,6 @@
|
||||
/obj/random/tech_supply = 0.2,
|
||||
/obj/structure/girder = 0.2,
|
||||
/obj/random/canister/empty = 0.2,
|
||||
/obj/structure/reagent_dispensers/fueltank = 0.1,
|
||||
/obj/random/canister/filled/restricted = 0.1,
|
||||
/obj/structure/closet/crate/loot = 0.05,
|
||||
/obj/random/contraband = 0.2,
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
description = "Send us some water tanks that will be used for botany research, and definitely not for creating a slip 'n slide in %PERSONNAME's office."
|
||||
reward_low = 115
|
||||
reward_high = 135
|
||||
required_count = 3
|
||||
required_count = 1
|
||||
random_count = 1
|
||||
wanted_types = list(/obj/structure/reagent_dispensers/watertank)
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
description = "After observing your engineering staff, we think it's best if you send us a few of those fuel tanks so nobody hurts themselves."
|
||||
reward_low = 250
|
||||
reward_high = 350
|
||||
required_count = 4
|
||||
required_count = 1
|
||||
random_count = 2
|
||||
wanted_types = list(/obj/structure/reagent_dispensers/fueltank)
|
||||
|
||||
|
||||
@@ -430,6 +430,20 @@
|
||||
groupable = TRUE
|
||||
spawn_amount = 1
|
||||
|
||||
/singleton/cargo_item/extinguishertank
|
||||
category = "engineering"
|
||||
name = "extinguisher tank"
|
||||
supplier = "hephaestus"
|
||||
description = "A tank filled with extinguisher fluid."
|
||||
price = 10
|
||||
items = list(
|
||||
/obj/structure/reagent_dispensers/extinguisher
|
||||
)
|
||||
access = ACCESS_ENGINE
|
||||
container_type = "box"
|
||||
groupable = TRUE
|
||||
spawn_amount = 1
|
||||
|
||||
/singleton/cargo_item/gasmask
|
||||
category = "engineering"
|
||||
name = "gas mask"
|
||||
|
||||
@@ -72,3 +72,17 @@
|
||||
container_type = "crate"
|
||||
groupable = TRUE
|
||||
spawn_amount = 1
|
||||
|
||||
/singleton/cargo_item/watertank
|
||||
category = "miscellaneous"
|
||||
name = "water tank"
|
||||
supplier = "orion"
|
||||
description = "A tank filled with water."
|
||||
price = 10
|
||||
items = list(
|
||||
/obj/structure/reagent_dispensers/watertank
|
||||
)
|
||||
access = 0
|
||||
container_type = "box"
|
||||
groupable = TRUE
|
||||
spawn_amount = 1
|
||||
|
||||
@@ -37,12 +37,6 @@ STOCK_ITEM_LARGE(bubbleshield, 0.5)
|
||||
break
|
||||
new /obj/structure/machinery/shield_capacitor(T)
|
||||
|
||||
STOCK_ITEM_LARGE(watertank, 2)
|
||||
new /obj/structure/reagent_dispensers/watertank(L)
|
||||
|
||||
STOCK_ITEM_LARGE(fueltank, 2)
|
||||
new /obj/structure/reagent_dispensers/fueltank(L)
|
||||
|
||||
STOCK_ITEM_LARGE(lubetank, 2)
|
||||
new /obj/structure/reagent_dispensers/lube(L)
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
icon_state = "watertank"
|
||||
density = 1
|
||||
anchored = 0
|
||||
maxhealth = OBJECT_HEALTH_HIGH
|
||||
var/accept_any_reagent = TRUE
|
||||
|
||||
var/amount_per_transfer_from_this = 10
|
||||
var/possible_transfer_amounts = list(5,10,15,25,30,50,60,100,120,250,300)
|
||||
var/capacity = 1000
|
||||
var/can_tamper = TRUE
|
||||
var/is_leaking = FALSE
|
||||
maxhealth = OBJECT_HEALTH_HIGH
|
||||
var/is_persistent = FALSE
|
||||
|
||||
/obj/structure/reagent_dispensers/mechanics_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
@@ -32,6 +32,29 @@
|
||||
create_reagents(capacity)
|
||||
if (!possible_transfer_amounts)
|
||||
src.verbs -= /obj/structure/reagent_dispensers/verb/set_APTFT
|
||||
if(is_persistent)
|
||||
SSpersistence.objectsRegisterTrack(src)
|
||||
|
||||
/obj/structure/reagent_dispensers/persistent_objects_get_content()
|
||||
var/list/content = ..()
|
||||
content["remaining_volume"] = reagents ? reagents.total_volume : 0
|
||||
return content
|
||||
|
||||
/obj/structure/reagent_dispensers/persistent_objects_apply_content(content, x, y, z)
|
||||
src.x = x
|
||||
src.y = y
|
||||
src.z = z
|
||||
if(!content["remaining_volume"] || content["remaining_volume"] <= 0)
|
||||
qdel(src)
|
||||
|
||||
if(!LAZYLEN(reagents_to_add))
|
||||
return
|
||||
|
||||
// This happens before Initialize, reagents are not generated yet, override to-be-added contents
|
||||
// Keep ratios the same if multiple reagents are within reagents_to_add
|
||||
var/scale = content["remaining_volume"] / capacity
|
||||
for(var/reagent in reagents_to_add)
|
||||
reagents_to_add[reagent] *= scale
|
||||
|
||||
/obj/structure/reagent_dispensers/verb/set_APTFT() //set amount_per_transfer_from_this
|
||||
set name = "Set transfer amount"
|
||||
@@ -56,6 +79,9 @@
|
||||
return
|
||||
if (usr.a_intent == I_HELP)
|
||||
RG.standard_dispenser_refill(user,src)
|
||||
if(!reagents || !reagents.total_volume)
|
||||
SSpersistence.objectsDeregisterTrack(src)
|
||||
return
|
||||
playsound(src.loc, 'sound/machines/reagent_dispense.ogg', 25, 1)
|
||||
else
|
||||
if(!accept_any_reagent)
|
||||
@@ -113,8 +139,9 @@
|
||||
name = "extinguisher tank"
|
||||
desc = "A tank filled with extinguisher fluid."
|
||||
icon_state = "extinguisher_tank"
|
||||
amount_per_transfer_from_this = 30
|
||||
amount_per_transfer_from_this = 150 // Same volume as extinguisher refillers, quality of life value
|
||||
reagents_to_add = list(/singleton/reagent/toxin/fertilizer/monoammoniumphosphate = 1000)
|
||||
is_persistent = TRUE
|
||||
|
||||
// Tanks
|
||||
/obj/structure/reagent_dispensers/watertank
|
||||
@@ -123,6 +150,7 @@
|
||||
icon_state = "watertank"
|
||||
amount_per_transfer_from_this = 300
|
||||
reagents_to_add = list(/singleton/reagent/water = 1000)
|
||||
is_persistent = TRUE
|
||||
|
||||
/obj/structure/reagent_dispensers/lube
|
||||
name = "lube tank"
|
||||
@@ -141,6 +169,7 @@
|
||||
var/armed = 0
|
||||
var/obj/item/assembly_holder/rig = null
|
||||
reagents_to_add = list(/singleton/reagent/fuel = 1000)
|
||||
is_persistent = TRUE
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/feedback_hints(mob/user, distance, is_adjacent)
|
||||
. += ..()
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
author: FabianK3
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- rscadd: "Added persistence to roller water/fuel/extinguisher tanks."
|
||||
- rscdel: "Added water and extinguisher tanks to cargo orders."
|
||||
- balance: "Reduce the cargo bounty for water and fuel tanks down to 1."
|
||||
@@ -3,7 +3,12 @@
|
||||
{
|
||||
"title": "Objects excluded due to persistent mechanics",
|
||||
"maps": ["sccv_horizon.dmm", "ops_warehouse_small_storage.dmm"],
|
||||
"forbidden_types": ["/obj/item/material/ashtray"]
|
||||
"forbidden_types": [
|
||||
"/obj/item/material/ashtray",
|
||||
"/obj/structure/reagent_dispensers/extinguisher",
|
||||
"/obj/structure/reagent_dispensers/watertank",
|
||||
"/obj/structure/reagent_dispensers/fueltank"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+1732
-1925
File diff suppressed because it is too large
Load Diff
@@ -198,10 +198,6 @@
|
||||
/obj/structure/closet/crate/tool,
|
||||
/turf/template_noop,
|
||||
/area/template_noop)
|
||||
"dY" = (
|
||||
/obj/structure/reagent_dispensers/extinguisher,
|
||||
/turf/template_noop,
|
||||
/area/template_noop)
|
||||
"eg" = (
|
||||
/obj/structure/machinery/portable_atmospherics/canister/chlorine,
|
||||
/turf/template_noop,
|
||||
@@ -683,10 +679,6 @@
|
||||
},
|
||||
/turf/template_noop,
|
||||
/area/template_noop)
|
||||
"oz" = (
|
||||
/obj/structure/reagent_dispensers/fueltank,
|
||||
/turf/template_noop,
|
||||
/area/template_noop)
|
||||
"oD" = (
|
||||
/obj/vehicle/bike/motor{
|
||||
dir = 4
|
||||
@@ -966,11 +958,6 @@
|
||||
/obj/effect/decal/cleanable/liquid_fuel,
|
||||
/turf/template_noop,
|
||||
/area/template_noop)
|
||||
"vl" = (
|
||||
/obj/effect/map_effect/marker/mapmanip/submap/extract/sccv_horizon/ops_warehouse_small_storage,
|
||||
/obj/structure/reagent_dispensers/fueltank,
|
||||
/turf/template_noop,
|
||||
/area/template_noop)
|
||||
"vm" = (
|
||||
/obj/effect/map_effect/marker/mapmanip/submap/extract/sccv_horizon/ops_warehouse_small_storage,
|
||||
/obj/structure/table/rack/no_cargo,
|
||||
@@ -1101,11 +1088,6 @@
|
||||
/obj/item/organ/internal/eyes/optical_sensor,
|
||||
/turf/template_noop,
|
||||
/area/template_noop)
|
||||
"xF" = (
|
||||
/obj/effect/map_effect/marker/mapmanip/submap/extract/sccv_horizon/ops_warehouse_small_storage,
|
||||
/obj/structure/reagent_dispensers/extinguisher,
|
||||
/turf/template_noop,
|
||||
/area/template_noop)
|
||||
"xI" = (
|
||||
/obj/structure/closet/crate/autakh,
|
||||
/turf/template_noop,
|
||||
@@ -1129,11 +1111,6 @@
|
||||
/obj/item/stack/tile/carpet/red,
|
||||
/turf/template_noop,
|
||||
/area/template_noop)
|
||||
"yo" = (
|
||||
/obj/structure/reagent_dispensers/fueltank,
|
||||
/obj/effect/decal/cleanable/liquid_fuel,
|
||||
/turf/template_noop,
|
||||
/area/template_noop)
|
||||
"yz" = (
|
||||
/obj/item/toy/figure/corgi,
|
||||
/turf/template_noop,
|
||||
@@ -1155,11 +1132,6 @@
|
||||
/obj/item/circuitboard/rdconsole,
|
||||
/turf/template_noop,
|
||||
/area/template_noop)
|
||||
"zd" = (
|
||||
/obj/effect/map_effect/marker/mapmanip/submap/extract/sccv_horizon/ops_warehouse_small_storage,
|
||||
/obj/structure/reagent_dispensers/watertank,
|
||||
/turf/template_noop,
|
||||
/area/template_noop)
|
||||
"zi" = (
|
||||
/obj/structure/table/rack/no_cargo,
|
||||
/obj/item/storage/box/large/condimentbottles,
|
||||
@@ -1651,10 +1623,6 @@
|
||||
/obj/random/dirt_75,
|
||||
/turf/template_noop,
|
||||
/area/template_noop)
|
||||
"NU" = (
|
||||
/obj/structure/reagent_dispensers/watertank,
|
||||
/turf/template_noop,
|
||||
/area/template_noop)
|
||||
"Oc" = (
|
||||
/obj/effect/map_effect/marker/mapmanip/submap/extract/sccv_horizon/ops_warehouse_small_storage,
|
||||
/obj/structure/table/rack/no_cargo,
|
||||
@@ -3481,7 +3449,7 @@ Gz
|
||||
Gz
|
||||
Gz
|
||||
sW
|
||||
dY
|
||||
Gz
|
||||
Gz
|
||||
Gz
|
||||
ZM
|
||||
@@ -3492,7 +3460,7 @@ Gt
|
||||
Gt
|
||||
Gz
|
||||
Gz
|
||||
xF
|
||||
tG
|
||||
Gz
|
||||
Gz
|
||||
Gz
|
||||
@@ -3577,7 +3545,7 @@ Sl
|
||||
Gz
|
||||
Gz
|
||||
Vh
|
||||
oz
|
||||
Gz
|
||||
nn
|
||||
sW
|
||||
iM
|
||||
@@ -4009,9 +3977,9 @@ Gz
|
||||
sW
|
||||
vk
|
||||
sk
|
||||
oz
|
||||
yo
|
||||
vl
|
||||
Gz
|
||||
Rn
|
||||
tG
|
||||
Gz
|
||||
Gz
|
||||
Gz
|
||||
@@ -4053,8 +4021,8 @@ Gz
|
||||
Gz
|
||||
Gz
|
||||
Gz
|
||||
yo
|
||||
oz
|
||||
Rn
|
||||
Gz
|
||||
Rn
|
||||
Rn
|
||||
uz
|
||||
@@ -4063,7 +4031,7 @@ Gz
|
||||
Gz
|
||||
Gz
|
||||
AW
|
||||
NU
|
||||
Gz
|
||||
Gz
|
||||
Gz
|
||||
cm
|
||||
@@ -4099,11 +4067,11 @@ Gz
|
||||
Gz
|
||||
Gz
|
||||
sW
|
||||
yo
|
||||
Rn
|
||||
Gz
|
||||
Rn
|
||||
Rn
|
||||
yo
|
||||
Rn
|
||||
nn
|
||||
Gz
|
||||
Gz
|
||||
@@ -4292,7 +4260,7 @@ Gz
|
||||
Gz
|
||||
Gz
|
||||
sW
|
||||
NU
|
||||
Gz
|
||||
cU
|
||||
Gz
|
||||
WG
|
||||
@@ -5423,8 +5391,8 @@ sW
|
||||
Vi
|
||||
Gz
|
||||
Gz
|
||||
NU
|
||||
zd
|
||||
Gz
|
||||
tG
|
||||
Gz
|
||||
Gz
|
||||
Gz
|
||||
@@ -5470,7 +5438,7 @@ RB
|
||||
Gz
|
||||
Gz
|
||||
Gz
|
||||
NU
|
||||
Gz
|
||||
Gz
|
||||
Gz
|
||||
Gz
|
||||
@@ -5516,7 +5484,7 @@ ip
|
||||
Gz
|
||||
Gz
|
||||
Gz
|
||||
NU
|
||||
Gz
|
||||
nn
|
||||
Gz
|
||||
Gz
|
||||
|
||||
Reference in New Issue
Block a user