Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
4071f32
Steals bounty cubes from TG
adamsong Jan 14, 2022
f7a4063
Fixed runtime
adamsong Jan 14, 2022
ee50929
Finish committing files
adamsong Jan 14, 2022
b566429
Added debug cube
adamsong Jan 14, 2022
7c9037a
Add cube machine to yoggers station
adamsong Jan 14, 2022
d8557ac
Forgot the console
adamsong Jan 14, 2022
68c5845
Less punching happens now
adamsong Jan 14, 2022
b7ec3b7
Merge remote-tracking branch 'origin/THE-CUBES' into THE-CUBES
adamsong Jan 14, 2022
b9a5296
Remove references to old bounty list
adamsong Jan 14, 2022
d473554
Configured job specific bounties
adamsong Jan 14, 2022
17454ef
Handle mechs
adamsong Jan 14, 2022
e3c65c9
Reorder jobs modificiation to eliminate conflict
adamsong Jan 14, 2022
dbdc6b9
Fix runtime in high priority bounty
adamsong Jan 14, 2022
0b5d8bd
Prevents overwriting IDs
adamsong Jan 15, 2022
638101d
Merge remote-tracking branch 'origin/master' into THE-CUBES
adamsong Jan 15, 2022
76da5f1
Add to meta
adamsong Jan 15, 2022
0a1e2a7
Added the thing to kilo
adamsong Jan 15, 2022
5d7c1e7
Merge remote-tracking branch 'origin/master' into THE-CUBES
adamsong Feb 22, 2023
c2fb87b
Fix compile errors, remove need to have id in the machine
adamsong Feb 22, 2023
5048e90
Adds bounty packager back to the map
adamsong Feb 22, 2023
328ae3d
Fix some things
adamsong Feb 22, 2023
e6d8a31
Adds bounty cubes to jobs without them
adamsong Feb 22, 2023
8a8582a
Silicons don't get bounties
adamsong Feb 22, 2023
05a63e2
Fixes no id message
adamsong Feb 22, 2023
177871d
Fixes conveyor
adamsong Feb 22, 2023
0e41f74
Merge 177871d22dc18d5534730418a3700e42e567c776 into THE-CUBES
adamsong Feb 22, 2023
bd38648
Merge remote-tracking branch 'origin/master' into THE-CUBES
adamsong Feb 22, 2023
42ccf03
Merge remote-tracking branch 'origin/THE-CUBES' into THE-CUBES
adamsong Feb 22, 2023
38e1a3a
No longer uses decimal minutes
adamsong Feb 22, 2023
3145d1b
Removed wrong units
adamsong Feb 22, 2023
ae56b25
Fixed high priority bounty
adamsong Feb 22, 2023
885797a
Made changes from review
adamsong Feb 22, 2023
8b399d5
Merge remote-tracking branch 'origin/THE-CUBES' into HEAD
adamsong Apr 26, 2024
4409596
Merge economy.dmi
adamsong Apr 26, 2024
ac6272f
Fix build error
adamsong Apr 26, 2024
33e0d6f
Fix lints
adamsong Apr 26, 2024
c540b3b
Fix lint, again
adamsong Apr 26, 2024
b6ec95b
Add cube machine to YogStation
adamsong Apr 26, 2024
5a3de50
More updates YogStation map
adamsong Apr 28, 2024
a49cd66
Update a couple more maps
adamsong Apr 28, 2024
5ccfa71
Does a little bit more to the donut station
adamsong Apr 28, 2024
0b36d12
IceMeta done, just gax left, and the conflict terrify me
adamsong Apr 28, 2024
2148dc4
Update gax
adamsong Jun 11, 2024
92cfb47
Merge remote-tracking branch 'origin/master' into THE-CUBES
adamsong Jun 11, 2024
e434dc0
Re-added yogs and gax changes
adamsong Jun 11, 2024
defe3aa
Merge remote-tracking branch 'origin/master' into THE-CUBES
adamsong Jun 17, 2024
e3145e9
Fix disposals
adamsong Jun 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 44 additions & 30 deletions _maps/map_files/YogStation/YogStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -16930,10 +16930,6 @@
},
/turf/open/floor/engine/n2,
/area/engine/atmos/distro)
"dls" = (
/obj/effect/turf_decal/trimline/brown/filled/line/lower,
/turf/open/floor/plasteel,
/area/quartermaster/office)
"dlt" = (
/obj/machinery/door/airlock{
name = "Law Office";
Expand Down Expand Up @@ -26896,6 +26892,15 @@
},
/turf/open/floor/circuit/telecomms/server,
/area/ai_monitored/turret_protected/ai)
"gNs" = (
/obj/effect/turf_decal/trimline/brown/filled/line/lower,
/obj/machinery/conveyor{
dir = 8;
id = "bounty"
},
/obj/machinery/bounty_packager,
/turf/open/floor/plasteel,
/area/quartermaster/office)
"gNM" = (
/obj/structure/closet/radiation,
/obj/effect/turf_decal/trimline/purple/filled/line/lower{
Expand Down Expand Up @@ -40378,6 +40383,20 @@
},
/turf/open/floor/plasteel,
/area/hallway/primary/starboard)
"lEi" = (
/obj/machinery/light,
/obj/structure/sign/departments/minsky/security/security{
pixel_y = -32
},
/obj/effect/turf_decal/trimline/brown/filled/line/lower{
dir = 6
},
/obj/machinery/conveyor{
dir = 8;
id = "bounty"
},
/turf/open/floor/plasteel,
/area/quartermaster/office)
"lEr" = (
/obj/structure/disposalpipe/segment,
/obj/machinery/atmospherics/components/unary/vent_pump/on/layer2{
Expand Down Expand Up @@ -49304,6 +49323,14 @@
},
/turf/open/floor/plasteel,
/area/hallway/primary/central)
"oSn" = (
/obj/effect/turf_decal/trimline/brown/filled/line/lower,
/obj/machinery/conveyor{
dir = 8;
id = "bounty"
},
/turf/open/floor/plasteel,
/area/quartermaster/office)
"oSq" = (
/obj/structure/cable{
icon_state = "1-2"
Expand Down Expand Up @@ -56122,15 +56149,6 @@
"rpB" = (
/turf/open/floor/carpet,
/area/crew_quarters/bar)
"rpC" = (
/obj/structure/chair{
dir = 8
},
/obj/effect/turf_decal/trimline/brown/filled/line/lower{
dir = 4
},
/turf/open/floor/plasteel,
/area/quartermaster/office)
"rqi" = (
/obj/machinery/atmospherics/pipe/manifold/general/visible{
dir = 1
Expand Down Expand Up @@ -62118,6 +62136,15 @@
/obj/item/stack/packageWrap,
/turf/open/floor/plasteel,
/area/storage/primary)
"tAs" = (
/obj/effect/turf_decal/trimline/brown/filled/line/lower{
dir = 4
},
/obj/machinery/conveyor_switch{
id = "bounty"
},
/turf/open/floor/plasteel,
/area/quartermaster/office)
"tAu" = (
/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2,
/obj/structure/cable{
Expand Down Expand Up @@ -69225,19 +69252,6 @@
"wec" = (
/turf/template_noop,
/area/medical/morgue)
"wem" = (
/obj/structure/chair{
dir = 8
},
/obj/machinery/light,
/obj/structure/sign/departments/minsky/security/security{
pixel_y = -32
},
/obj/effect/turf_decal/trimline/brown/filled/line/lower{
dir = 6
},
/turf/open/floor/plasteel,
/area/quartermaster/office)
"wen" = (
/obj/structure/bed,
/obj/item/bedsheet/red,
Expand Down Expand Up @@ -99094,7 +99108,7 @@ cPP
stm
aWM
bnx
dls
oSn
bzy
diJ
bvI
Expand Down Expand Up @@ -99351,7 +99365,7 @@ bbR
bpA
blp
bbR
dls
gNs
bzy
yaO
kSb
Expand Down Expand Up @@ -99607,8 +99621,8 @@ fKl
uEI
vpX
ilc
rpC
wem
tAs
lEi
bwe
cdM
bRh
Expand Down
16 changes: 16 additions & 0 deletions code/__DEFINES/economy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,19 @@
#define MEGAFAUNA_CASH_SCALE 2

#define NO_FREEBIES "commies go home"

//Defines that set what kind of civilian bounties should be applied mid-round.
#define CIV_JOB_BASIC 1
#define CIV_JOB_ROBO 2
#define CIV_JOB_CHEF 3
#define CIV_JOB_SEC 4
#define CIV_JOB_DRINK 5
#define CIV_JOB_CHEM 6
#define CIV_JOB_VIRO 7
#define CIV_JOB_SCI 8
#define CIV_JOB_XENO 9
#define CIV_JOB_MINE 10
#define CIV_JOB_MED 11
#define CIV_JOB_GROW 12
#define CIV_JOB_ATMOS 13
#define CIV_JOB_RANDOM 14 // Must be the last index
71 changes: 71 additions & 0 deletions code/datums/components/pricetag.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* Pricetag component.
*
* Used when exporting items via the cargo system.
* Gives a cut of the profit to one or multiple bank accounts.
*/
/datum/component/pricetag
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
/// List of bank accounts this pricetag pays out to. Format is payees[bank_account] = profit_ratio.
var/list/payees = list()

/datum/component/pricetag/Initialize(pay_to_account, profit_ratio = 1)
if(!isobj(parent)) //Has to account for both objects and sellable structures like crates.
return COMPONENT_INCOMPATIBLE

if(isnull(pay_to_account))
stack_trace("[type] component was added to something without a pay_to_account!")
return COMPONENT_INCOMPATIBLE

payees[pay_to_account] = profit_ratio

/datum/component/pricetag/RegisterWithParent()
RegisterSignal(parent, COMSIG_ITEM_EXPORTED, PROC_REF(on_parent_sold))

/datum/component/pricetag/UnregisterFromParent()
UnregisterSignal(parent, COMSIG_ITEM_EXPORTED)

/*
* Inheriting an incoming / new version of price tag:
*
* If the account passed in the incoming version is already in our list,
* only override it if the ratio is better for the payee
*
* If the account passed in the incoming version is not in our list, add it like normal.
*/
/datum/component/pricetag/InheritComponent(datum/component/pricetag/new_comp, i_am_original, argslist)
var/pay_to_account = argslist[1]
var/profit_ratio = argslist[2]
if(!isnull(payees[pay_to_account]) && payees[pay_to_account] >= profit_ratio) // They're already getting a better ratio, don't scam them
return

payees[pay_to_account] = profit_ratio

/*
* Signal proc for [COMSIG_ITEM_EXPORTED].
*
* Pays out money to everyone in the payees list.
*/
/datum/component/pricetag/proc/on_parent_sold(obj/source, datum/export/export, datum/export_report/report, item_value)

if(!isnum(item_value))
return

// Gotta see how much money we've lost by the end of things.
var/overall_item_price = item_value

for(var/datum/bank_account/payee as anything in payees)
// Every payee with a ratio gets a cut based on the item's total value
var/payee_cut = round(item_value * payees[payee])
// And of course, the cut is removed from what cargo gets. (But not below zero, just in case)
overall_item_price = max(0, overall_item_price - payee_cut)

payee.adjust_money(payee_cut)
payee.bank_card_talk("Sale of [source] recorded. [payee_cut] credits added to account.")

// Update the report with the modified final price
report.total_value[export] += overall_item_price
report.total_amount[export] += export.get_amount(source)

// And ensure we don't double-add to the report
return COMPONENT_STOP_EXPORT_REPORT
Loading