piggy_bank ![code/game/objects/items/piggy_bank.dm 5](git.png)
Piggy banks. They store your hard-earned money until you or someone destroys it. If the persistence id is set, money will be carried between rounds until broken.
Vars | |
initial_value | How much dosh this piggy bank spawns with. |
---|---|
maximum_savings_per_shift | A limit to much dosh can you put inside this piggy bank each round. If 0, there's no limit. Only applies to persistent piggies. |
maximum_value | How much dosh can this piggy bank hold. |
persistence_cb | Callback to execute upon roundend to save the current amount of cash it has stored, IF persistent. |
persistence_id | Some piggy banks are persistent, meaning they carry dosh between rounds. |
Procs | |
calculate_dosh_amount | Returns the total amount of credits that its contents amount to. |
Var Details
initial_value ![code/game/objects/items/piggy_bank.dm 26](git.png)
How much dosh this piggy bank spawns with.
maximum_savings_per_shift ![code/game/objects/items/piggy_bank.dm 24](git.png)
A limit to much dosh can you put inside this piggy bank each round. If 0, there's no limit. Only applies to persistent piggies.
maximum_value ![code/game/objects/items/piggy_bank.dm 22](git.png)
How much dosh can this piggy bank hold.
persistence_cb ![code/game/objects/items/piggy_bank.dm 20](git.png)
Callback to execute upon roundend to save the current amount of cash it has stored, IF persistent.
persistence_id ![code/game/objects/items/piggy_bank.dm 18](git.png)
Some piggy banks are persistent, meaning they carry dosh between rounds.
Proc Details
calculate_dosh_amount
Returns the total amount of credits that its contents amount to.