Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arconomy: The bigger balance PR (REVISED EDITION) #65795

Merged
merged 44 commits into from Apr 27, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0b53179
Documents economy and bank account variables
ArcaneMusic Jan 18, 2022
08666da
Original Commit: Jobs have had their income equalized, as have produc…
ArcaneMusic Jan 20, 2022
1f9e64a
Briefcase of cash contains 500 credits now. Basically doubles the pla…
ArcaneMusic Feb 20, 2022
e01837a
Merge remote-tracking branch 'upstream/master' into TheEconomicCrashO…
ArcaneMusic Feb 20, 2022
a61b019
Un-changes runtime station
ArcaneMusic Feb 20, 2022
a38a92d
fixes compile
ArcaneMusic Feb 20, 2022
f06d8a1
Merge remote-tracking branch 'upstream/master' into TheEconomicCrashO…
ArcaneMusic Mar 27, 2022
99c59f0
Fixes compile
ArcaneMusic Mar 28, 2022
8c877c2
LATHE CHARGES, PAYMENT CURVE EDITION.
ArcaneMusic Mar 28, 2022
d6490ed
Adjustments
ArcaneMusic Mar 29, 2022
01edebc
Bam
ArcaneMusic Mar 30, 2022
a810a8f
I've been working in matlab for too long
ArcaneMusic Mar 30, 2022
7182982
Merge remote-tracking branch 'upstream/master' into TheEconomicCrashO…
ArcaneMusic Mar 30, 2022
5fef11b
ccost is not a word
ArcaneMusic Mar 30, 2022
8b3a4e7
Merge remote-tracking branch 'upstream/master' into TheEconomicCrashO…
ArcaneMusic Apr 1, 2022
ef71e68
Fixes merge conflict with scanners
ArcaneMusic Apr 1, 2022
5d54396
Conflicts fixed and reviews applied.
ArcaneMusic Apr 1, 2022
2dea71a
Implements ghetto code review edit
ArcaneMusic Apr 1, 2022
f2352c2
Discord indentation am I rite fellas
ArcaneMusic Apr 1, 2022
2adbd27
Potato I fixed the discounts, sorry guys
ArcaneMusic Apr 3, 2022
6490773
First round of changes from the maintainer agreed-upon decision for e…
ArcaneMusic Apr 5, 2022
d5c5d01
I learned something invoke_async
ArcaneMusic Apr 6, 2022
4668945
Merge remote-tracking branch 'upstream/master' into TheEconomicCrashO…
ArcaneMusic Apr 6, 2022
bc91257
WHOOPS APPARENTLY THIS GOT LOST IN MERGE CONFLICTS
ArcaneMusic Apr 6, 2022
5812a4d
Adds some additional, basic logging onto payment component.
ArcaneMusic Apr 9, 2022
d55f357
Fixes a glaring oversight in the differences between protolathes and …
ArcaneMusic Apr 9, 2022
0020d59
Review cleanup
ArcaneMusic Apr 13, 2022
6fad8bd
Revolutions now remove the lathe tax is revs win. Missing early return.
ArcaneMusic Apr 14, 2022
12c1870
attempts to clean up payment component's handling of cash/credits for…
ArcaneMusic Apr 15, 2022
7972637
Early returns on handling with cash.
ArcaneMusic Apr 18, 2022
98524b6
Correctly tweaks the inflation with the new income values
ArcaneMusic Apr 19, 2022
ba4a428
Merge remote-tracking branch 'upstream/master' into TheEconomicCrashO…
ArcaneMusic Apr 19, 2022
d6b6173
Fixes conflicts
ArcaneMusic Apr 19, 2022
fe9d245
Why did I put that out of order. Comments.
ArcaneMusic Apr 19, 2022
cfafec0
Merge remote-tracking branch 'upstream/master' into TheEconomicCrashO…
ArcaneMusic Apr 21, 2022
7e9c5ac
Finishes some documentation that I negelected to do the first time.
ArcaneMusic Apr 21, 2022
6a79fd5
New potato review
ArcaneMusic Apr 23, 2022
0e57fbd
Hand slipped
ArcaneMusic Apr 23, 2022
3c1e50b
Merge remote-tracking branch 'upstream/master' into TheEconomicCrashO…
ArcaneMusic Apr 26, 2022
9200b13
Moves to a signal removal system
ArcaneMusic Apr 26, 2022
3767b59
Moves to a global signal
ArcaneMusic Apr 27, 2022
3c4954d
Tweaks to signal documentation
ArcaneMusic Apr 27, 2022
763177c
You are alone, child. There is only darkness for you, these ancients …
ArcaneMusic Apr 27, 2022
315647e
renames signal string
LemonInTheDark Apr 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions code/__DEFINES/dcs/signals/signals_revolution.dm
@@ -0,0 +1,4 @@
/// Revolution signals

///Called when the crew wins the revolution onto machines with the payment component associated with the LATHE_TAX define. No arguments.
#define COMSIG_REVOLUTION_TAX_REMOVAL "revs_tax_removal"
LemonInTheDark marked this conversation as resolved.
Show resolved Hide resolved
17 changes: 11 additions & 6 deletions code/datums/components/payment.dm
Expand Up @@ -33,6 +33,7 @@
transaction_style = _style
RegisterSignal(parent, COMSIG_OBJ_ATTEMPT_CHARGE, .proc/attempt_charge)
RegisterSignal(parent, COMSIG_OBJ_ATTEMPT_CHARGE_CHANGE, .proc/change_cost)
RegisterSignal(parent, COMSIG_REVOLUTION_TAX_REMOVAL, .proc/clean_up)

/datum/component/payment/proc/attempt_charge(datum/source, atom/movable/target, extra_fees = 0)
SIGNAL_HANDLER
Expand Down Expand Up @@ -153,12 +154,16 @@
log_econ("[total_cost] credits were spent on [parent] by [user] via [idcard.registered_account.account_holder]'s card.")
idcard.registered_account.bank_card_talk("[total_cost] credits deducted from your account.")
playsound(src, 'sound/effects/cashregister.ogg', 20, TRUE)
SSeconomy.track_purchase(card.registered_account, cost + extra_fees, parent)
SSeconomy.track_purchase(idcard.registered_account, total_cost, parent)
return TRUE


/datum/component/payment/proc/change_cost(datum/source, new_cost)
/**
* Attempts to remove the payment component, currently when the crew wins a revolution.
* * datum/source: source of the signal.
*/
/datum/component/payment/proc/clean_up(datum/source)
SIGNAL_HANDLER
if(!isnum(new_cost))
CRASH("change_cost called with variable new_cost as not a number.")
cost = new_cost
target_acc = null
qdel(src)
return

2 changes: 1 addition & 1 deletion code/modules/antagonists/revolution/revolution.dm
Expand Up @@ -456,7 +456,7 @@
\"Please stand by for a message from your benefactor. Message as follows, provocateur. \
<b>You have been chosen out of your fellow provocateurs to rename the station. Choose wisely.</b> Message ends.\""))
for (var/obj/machinery/taxed_machine as anything in GLOB.production_machines)
qdel(taxed_machine.GetComponent(/datum/component/payment))
SEND_SIGNAL(taxed_machine, COMSIG_REVOLUTION_TAX_REMOVAL)
LemonInTheDark marked this conversation as resolved.
Show resolved Hide resolved

for (var/mob/living/player as anything in GLOB.player_list)
var/datum/mind/player_mind = player.mind
Expand Down
1 change: 1 addition & 0 deletions tgstation.dme
Expand Up @@ -235,6 +235,7 @@
#include "code\__DEFINES\dcs\signals\signals_radiation.dm"
#include "code\__DEFINES\dcs\signals\signals_reagent.dm"
#include "code\__DEFINES\dcs\signals\signals_restaurant.dm"
#include "code\__DEFINES\dcs\signals\signals_revolution.dm"
#include "code\__DEFINES\dcs\signals\signals_scangate.dm"
#include "code\__DEFINES\dcs\signals\signals_screentips.dm"
#include "code\__DEFINES\dcs\signals\signals_spatial_grid.dm"
Expand Down