mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +01:00
Point Verdant Delivery Points + Long Range Holopad in Cells + Konyang Police Fax + Police Speedloader fix + L + Ratio (#18531)
* Point Verdant Deliveries * Holopad Police * Refactor code * Variables applied * Spawn Limits * nicer * Fix bug (hopefully) * Document * Maptweaks + bugfix * spell * typo * Bugfix * no spaces * Extra Document * oops --------- Co-authored-by: Ben10083 <Ben10083@users.noreply.github.com>
This commit is contained in:
@@ -13,11 +13,14 @@
|
||||
|
||||
var/delivery_point_id = ""
|
||||
var/datum/weakref/delivery_point_sector
|
||||
/// Site name displayed to player when examining the package. This should clearly state where the player should go, and be lore accurate. This is typically overridden by either sectorname or one set by receptacle
|
||||
var/delivery_site = "Unknown"
|
||||
var/delivery_point_coordinates = ""
|
||||
|
||||
var/datum/weakref/associated_delivery_point
|
||||
var/pay_amount = 69420
|
||||
|
||||
/// If true, pay_amount goes into Operations Account
|
||||
var/pays_horizon_account = TRUE
|
||||
|
||||
/obj/item/cargo_package/Initialize(mapload, obj/structure/cargo_receptacle/delivery_point)
|
||||
@@ -33,16 +36,20 @@
|
||||
associated_delivery_point = WEAKREF(delivery_point)
|
||||
delivery_point_id = delivery_point.delivery_id
|
||||
delivery_point_sector = delivery_point.delivery_sector
|
||||
if(delivery_point.override_name)
|
||||
delivery_site = delivery_point.override_name
|
||||
delivery_point_coordinates = "[delivery_point.x]-[delivery_point.y]"
|
||||
pay_amount = pay_amount * delivery_point.payment_modifier
|
||||
|
||||
/obj/item/cargo_package/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
if(delivery_point_id)
|
||||
var/delivery_site = "Unknown"
|
||||
if(delivery_point_sector)
|
||||
var/obj/effect/overmap/visitable/delivery_sector = delivery_point_sector.resolve()
|
||||
if(delivery_sector)
|
||||
delivery_site = delivery_sector.name
|
||||
// if name not already set by cargo receptacle, acquire the sector name instead
|
||||
if(delivery_site == "Unknown")
|
||||
if(delivery_point_sector)
|
||||
var/obj/effect/overmap/visitable/delivery_sector = delivery_point_sector.resolve()
|
||||
if(delivery_sector)
|
||||
delivery_site = delivery_sector.name
|
||||
. += SPAN_NOTICE("The label on the package reads: SITE: <b>[delivery_site]</b> | COORD: <b>[delivery_point_coordinates]</b> | ID: <b>[delivery_point_id]</b>")
|
||||
. += SPAN_NOTICE("The price tag on the package reads: <b>[pay_amount]电</b>.")
|
||||
|
||||
@@ -99,7 +106,8 @@
|
||||
|
||||
/obj/item/cargo_package/offship
|
||||
pays_horizon_account = FALSE
|
||||
var/horizon_delivery = FALSE // whether this package is guaranteed to deliver to the horizon or not
|
||||
/// Whether this package is guaranteed to deliver to the horizon or not
|
||||
var/horizon_delivery = FALSE
|
||||
|
||||
/obj/item/cargo_package/offship/Initialize(mapload, obj/structure/cargo_receptacle/delivery_point)
|
||||
. = ..()
|
||||
|
||||
@@ -9,8 +9,16 @@ var/global/list/all_cargo_receptacles = list()
|
||||
|
||||
var/delivery_id = ""
|
||||
var/datum/weakref/delivery_sector
|
||||
|
||||
/// If set, will be displayed as the site name on inbound packages (delivery_site)
|
||||
var/override_name = ""
|
||||
/// Used to adjust the reward for delivering to this point
|
||||
var/payment_modifier = 1.0
|
||||
/// Set to true to have a chance for packages to spawn with
|
||||
var/spawns_packages = TRUE
|
||||
/// Minimum amount of packages that can spawn for this receptacle. INTEGER
|
||||
var/min_spawn = 2
|
||||
/// Maximum amount of packages that can spawn for this receptacle. INTEGER
|
||||
var/max_spawn = 4
|
||||
|
||||
/obj/structure/cargo_receptacle/Initialize(mapload)
|
||||
..()
|
||||
@@ -41,7 +49,7 @@ var/global/list/all_cargo_receptacles = list()
|
||||
if(!turf_contains_dense_objects(T))
|
||||
warehouse_turfs += T
|
||||
|
||||
var/package_amount = rand(2, 4)
|
||||
var/package_amount = rand(min_spawn, max_spawn)
|
||||
for(var/i = 1 to package_amount)
|
||||
var/turf/random_turf = pick_n_take(warehouse_turfs)
|
||||
if(random_turf)
|
||||
|
||||
Reference in New Issue
Block a user