Skip to content

Commit

Permalink
FREE cargo beacons (#4070)
Browse files Browse the repository at this point in the history
## About The Pull Request

they're FREE
for FREE

## Why It's Good For The Game

Cargo can go where you want it. for free.

## Changelog

:cl:
add: Cargo Beacons are free now.
/:cl:
  • Loading branch information
Erikafox authored Jan 27, 2025
1 parent 91fb1bb commit c6b8ed0
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions code/modules/cargo/console.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define BEACON_COST 500
#define SP_LINKED 1
#define SP_READY 2
#define SP_LAUNCH 3
Expand Down Expand Up @@ -112,11 +111,11 @@
data["beaconZone"] = beacon ? get_area(beacon) : ""//where is the beacon located? outputs in the tgui
data["usingBeacon"] = use_beacon //is the mode set to deliver to the beacon or the cargobay?
data["canBeacon"] = !use_beacon || canBeacon //is the mode set to beacon delivery, and is the beacon in a valid location?
data["canBuyBeacon"] = charge_account ? (cooldown <= 0 && charge_account.account_balance >= BEACON_COST) : FALSE
data["canBuyBeacon"] = charge_account ? (cooldown <= 0) : FALSE
data["beaconError"] = use_beacon && !canBeacon ? "(BEACON ERROR)" : ""//changes button text to include an error alert if necessary
data["hasBeacon"] = beacon != null//is there a linked beacon?
data["beaconName"] = beacon ? beacon.name : "No Beacon Found"
data["printMsg"] = cooldown > 0 ? "Print Beacon for [BEACON_COST] credits ([cooldown])" : "Print Beacon for [BEACON_COST] credits"//buttontext for printing beacons
data["printMsg"] = cooldown > 0 ? "Print Beacon ([cooldown])" : "Print Beacon"//buttontext for printing beacons
data["supplies"] = list()
message = "Sales are near-instantaneous - please choose carefully."
if(SSshuttle.supplyBlocked)
Expand Down Expand Up @@ -172,12 +171,11 @@
if (beacon)
beacon.update_status(SP_READY) //turns on the beacon's ready light
if("printBeacon")
if(charge_account?.adjust_money(-BEACON_COST, "cargo_beacon"))
cooldown = 10//a ~ten second cooldown for printing beacons to prevent spam
var/obj/item/supplypod_beacon/C = new /obj/item/supplypod_beacon(drop_location())
C.link_console(src, usr)//rather than in beacon's Initialize(), we can assign the computer to the beacon by reusing this proc)
printed_beacons++//printed_beacons starts at 0, so the first one out will be called beacon # 1
beacon.name = "Supply Pod Beacon #[printed_beacons]"
cooldown = 300
var/obj/item/supplypod_beacon/C = new /obj/item/supplypod_beacon(drop_location())
C.link_console(src, usr)//rather than in beacon's Initialize(), we can assign the computer to the beacon by reusing this proc)
printed_beacons++//printed_beacons starts at 0, so the first one out will be called beacon # 1
beacon.name = "Supply Pod Beacon #[printed_beacons]"
if("add")
var/datum/overmap/outpost/current_outpost = current_ship.docked_to
if(istype(current_ship.docked_to))
Expand Down

0 comments on commit c6b8ed0

Please sign in to comment.