config junk

This commit is contained in:
DragonTrance
2022-06-09 17:54:40 -04:00
parent c771649850
commit 7bae2a36ee
51 changed files with 192 additions and 114 deletions
@@ -7,6 +7,23 @@ SUBSYSTEM_DEF(economy)
/// How many "paychecks" someone gets at the creation of the bank account
var/roundstart_paychecks = 5
var/list/bank_accounts = list() //List of normal accounts (not department accounts)
var/static/list/prices_by_type
/// Updates the prices from the config. Assorted into this individual proc instead of Initialize() so testers can change the config mid-round
/// without having to initialize the economy SS again
/datum/controller/subsystem/economy/proc/UpdatePrices()
prices_by_type = list()
prices_by_type += CONFIG_GET(number/economy_price_default) //ECONOMY_PRICE_DEFAULT.. 1
prices_by_type += CONFIG_GET(number/economy_price_low) //ECONOMY_PRICE_LOW.. 2
prices_by_type += CONFIG_GET(number/economy_price_high)
prices_by_type += CONFIG_GET(number/economy_price_erotic)
prices_by_type += CONFIG_GET(number/economy_price_expensive)
prices_by_type += CONFIG_GET(number/economy_price_expensive_af)
prices_by_type += 0 //ECONOMY_PRICE_FORCED_FREE.. 7
/datum/controller/subsystem/economy/Initialize()
UpdatePrices()
return ..()
/datum/controller/subsystem/economy/fire()
for(var/datum/bank_account/account as anything in bank_accounts)
@@ -21,3 +38,12 @@ SUBSYSTEM_DEF(economy)
*/
/datum/controller/subsystem/economy/proc/GetPaycheck(datum/bank_account/account, datum/job/job, multiplier=1)
return FLOOR((account:base_pay * job:base_paycheck_multiplier * multiplier) / 3, 1)
/**
* Returns a price value from a subtype of an /obj/item, assuming it was compiled to use money.
* Otherwise, returns null if it does not use economy
*/
/datum/controller/subsystem/economy/proc/GetPrice(obj/item/costly_item)
if(!costly_item.economy_type)
return
return FLOOR(prices_by_type[costly_item.economy_type] * costly_item.economy_price_mul, 1)
@@ -7,8 +7,9 @@
icon_state = "nailcap"
item_state = "nailpolish"
w_class = WEIGHT_CLASS_SMALL
economy_type = ECONOMY_PRICE_LOW
economy_price_mul = 1.25
var/paint = "black"
price = PRICE_LOW * 0.5
var/mutable_appearance/bottle //show the colour on the bottle.
/obj/item/nailpolish/red
@@ -12,7 +12,8 @@ sarcoph mar 2022
desc = "Contains all the intimate ideas you'll ever need. A game that everyone wins!"
icon = 'hyperstation/icons/obj/toy.dmi'
icon_state = "lovedicebag"
price = PRICE_LOW * 1.25
economy_type = ECONOMY_PRICE_EROTIC
economy_price_mul = 0.5
/obj/item/storage/pill_bottle/lovedice/Initialize()
. = ..()
+3 -2
View File
@@ -8,8 +8,7 @@
/// The pin number that the owner wanted. Not set by default, so anyone can just steal your ID if you don't remember to set it
var/account_pin
/// The base amount of pay you get per paycheck
/// At the moment of documenting this, the base pay is 80
var/base_pay = PRICE_BASE * 5
var/base_pay = 80
/// The linked job datum for this bank account, for calculating unique base payment for each job
var/datum/job/account_job
/// The associated ID, for letting the card-holder know when a paycheck is processed
@@ -25,6 +24,8 @@
stack_trace("A new bank account was made without the economy subsystem being initialized first. If this is an issue, change the subsystem's init_order.")
return
base_pay = CONFIG_GET(number/economy_base_payment)
SSeconomy.bank_accounts += src
balance += SSeconomy.GetPaycheck(src, job, SSeconomy.roundstart_paychecks)
+1 -1
View File
@@ -9,7 +9,7 @@
icon_state = "b_condom_wrapped"
var/unwrapped = 0
w_class = WEIGHT_CLASS_TINY
price = PRICE_LOW * 0.5
economy_type = ECONOMY_PRICE_LOW
obj/item/condom/Initialize()
create_reagents(300, DRAWABLE|NO_REACT)
+8 -5
View File
@@ -10,10 +10,11 @@
icon_state = "fleshlight_base"
item_state = "fleshlight"
w_class = WEIGHT_CLASS_SMALL
var/sleevecolor = "#ffcbd4" //pink
price = PRICE_EROTICA * 0.75
var/mutable_appearance/sleeve
economy_type = ECONOMY_PRICE_EROTIC
economy_price_mul = 0.95
var/inuse = 0
var/sleevecolor = "#ffcbd4" //pink
var/mutable_appearance/sleeve
/obj/item/fleshlight/examine(mob/user)
. = ..()
@@ -78,10 +79,11 @@
icon_state = "unpaired"
item_state = "fleshlight"
w_class = WEIGHT_CLASS_SMALL
economy_type = ECONOMY_PRICE_EROTIC
economy_price_mul = 1.2
var/partnercolor = "#ffcbd4"
var/partnerbase = "normal"
var/partnerorgan = "portal_vag"
price = PRICE_EROTICA
var/mutable_appearance/sleeve
var/mutable_appearance/organ
var/inuse = 0
@@ -276,7 +278,8 @@
icon = 'hyperstation/icons/obj/fleshlight.dmi'
desc = "A small silver box with Silver Love Co embossed."
icon_state = "box"
price = PRICE_EROTICA * 1.15
economy_type = ECONOMY_PRICE_EROTIC
economy_price_mul = 1.5
// portal fleshlight box
/obj/item/storage/box/portallight/PopulateContents()
+8 -4
View File
@@ -6,14 +6,16 @@
icon = 'hyperstation/icons/obj/clothing/gloves.dmi'
alternate_worn_icon = 'hyperstation/icons/mobs/gloves.dmi'
mutantrace_variation = NO_MUTANTRACE_VARIATION
price = PRICE_EROTICA * 0.75
economy_type = ECONOMY_PRICE_EROTIC
economy_price_mul = 0.75
/obj/item/clothing/gloves/latexsleeves/security
name = "security sleeves"
desc = "A pair of latex sleeves, with a band of red above the elbows denoting that the wearer is part of the security team."
icon_state = "latexsec"
item_state = "latexsec"
price = PRICE_EROTICA * 0.75
economy_type = ECONOMY_PRICE_EROTIC
economy_price_mul = 0.75
/obj/item/clothing/head/dominatrixcap
name = "dominatrix cap"
@@ -45,7 +47,8 @@ obj/item/clothing/neck/stole
w_class = WEIGHT_CLASS_SMALL
icon_state = "stole"
item_state = "" //no inhands
price = PRICE_HIGH * 0.75
economy_type = ECONOMY_PRICE_EXPENSIVE
economy_price_mul = 0.75
obj/item/clothing/neck/stole/black
name = "black boa"
@@ -55,7 +58,8 @@ obj/item/clothing/neck/stole/black
icon_state = "stole"
item_state = "" //no inhands
color = "#3d3d3d"
price = PRICE_HIGH * 0.75
economy_type = ECONOMY_PRICE_EXPENSIVE
economy_price_mul = 0.75
/obj/item/clothing/suit/fluffyhalfcrop
name = "fluffy half-crop jacket"
+2 -1
View File
@@ -10,7 +10,8 @@
item_state = "rope" //This sprite is in restraints.dmi until I figure out how to refrence somewhere else
cuffsound = 'sound/weapons/cablecuff.ogg'
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
price = PRICE_LOW * 1.25
economy_type = ECONOMY_PRICE_LOW
economy_price_mul = 1.25
/mob/living/proc/rope_add(source) //Check to see if the rope is on, and then add effects
var/mob/living/carbon/M = source
+1 -1
View File
@@ -6,7 +6,7 @@
icon_state = "sounding_wrapped"
var/unwrapped = 0
w_class = WEIGHT_CLASS_TINY
price = PRICE_LOW
economy_type = ECONOMY_PRICE_LOW
/obj/item/sounding/attack_self(mob/user)
if(!istype(user))
+1 -1
View File
@@ -13,7 +13,7 @@
var/style = "long"
var/inside = FALSE
var/last = 0
price = PRICE_LOW * 1.25
economy_type = ECONOMY_PRICE_EROTIC
/obj/item/electropack/vibrator/Initialize() //give the device its own code
. = ..()