Skip to content

Commit

Permalink
finally adds platinum coins, fuck you takyon
Browse files Browse the repository at this point in the history
  • Loading branch information
efzapa committed Nov 16, 2024
1 parent 8bf740b commit 69e388b
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 43 deletions.
33 changes: 25 additions & 8 deletions code/game/objects/items/rogueitems/coins.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define CTYPE_XYBRIUM "x"
#define CTYPE_GOLD "g"
#define CTYPE_SILV "s"
#define CTYPE_COPP "c"
Expand Down Expand Up @@ -46,11 +47,13 @@
if(isturf(T) && quantity > 1)
var/obj/structure/table/TA = locate() in T
if(!TA) //no table
var/obj/item/roguecoin/new_coin = new type(T)
new_coin.set_quantity(1) // prevent exploits with coin piles
new_coin.pixel_x = rand(-8, 8)
new_coin.pixel_y = rand(-5, 5)
set_quantity(quantity - 1)
for(var/i in 2 to quantity) // exclude the first coin
var/obj/item/roguecoin/new_coin = new type(T)
new_coin.set_quantity(1) // prevent exploits with coin piles
new_coin.pixel_x = rand(-8, 8)
new_coin.pixel_y = rand(-5, 5)

set_quantity(1)

/obj/item/roguecoin/get_real_price()
return sellprice * quantity
Expand All @@ -63,7 +66,7 @@
/obj/item/roguecoin/examine(mob/user)
. = ..()
if(quantity > 1)
. += span_info("\Roman [quantity] coins.")
. += "<span class='info'>\Roman [quantity] coins.</span>"

/obj/item/roguecoin/proc/merge(obj/item/roguecoin/G, mob/user)
if(!G)
Expand Down Expand Up @@ -118,10 +121,10 @@
flip_cd = world.time
playsound(user, 'sound/foley/coinphy (1).ogg', 100, FALSE)
if(prob(50))
user.visible_message(span_info("[user] flips the coin. Heads!"))
user.visible_message("<span class='info'>[user] flips the coin. Heads!</span>")
heads_tails = TRUE
else
user.visible_message(span_info("[user] flips the coin. Tails!"))
user.visible_message("<span class='info'>[user] flips the coin. Tails!</span>")
heads_tails = FALSE
update_icon()

Expand Down Expand Up @@ -169,6 +172,15 @@
return
return ..()

//XYBRIUM
/obj/item/roguecoin/xybrium
name = "xentara"
desc = "Xybrium, an exceptionally rare metal, was primarily used to craft small, high-value items like coins. Its extreme rarity made it perfect for minting precious currency such as Zentari, valued for their enduring worth and unique composition."
icon_state = "x1"
sellprice = 50
base_type = CTYPE_XYBRIUM
plural_name = "zentari"

//GOLD
/obj/item/roguecoin/gold
name = "zenar"
Expand Down Expand Up @@ -209,6 +221,11 @@
. = ..()
set_quantity(rand(4,19))

/obj/item/roguecoin/xybrium/pile/Initialize()
. = ..()
set_quantity(rand(4,19))

#undef CTYPE_XYBRIUM
#undef CTYPE_GOLD
#undef CTYPE_SILV
#undef CTYPE_COPP
Expand Down
8 changes: 6 additions & 2 deletions code/modules/roguetown/roguemachine/ATM.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
say("Your balance is NEGATIVE.")
return
var/list/choicez = list()
if(amt > 50)
choicez += "PLATINUM"
if(amt > 10)
choicez += "GOLD"
if(amt > 5)
Expand All @@ -30,6 +32,8 @@
return
amt = SStreasury.bank_accounts[H]
var/mod = 1
if(selection == "PLATINUM")
mod = 50
if(selection == "GOLD")
mod = 10
if(selection == "SILVER")
Expand All @@ -49,7 +53,7 @@
return
budget2change(coin_amt*mod, user, selection)
else
to_chat(user, span_warning("The machine bites my finger."))
to_chat(user, "<span class='warning'>The machine bites my finger.</span>")
icon_state = "atm-b"
H.flash_fullscreen("redflash3")
playsound(H, 'sound/combat/hits/bladed/genstab (1).ogg', 100, FALSE, -1)
Expand Down Expand Up @@ -85,5 +89,5 @@

/obj/structure/roguemachine/atm/examine(mob/user)
. += ..()
. += span_info("The current tax rate on deposits is [SStreasury.tax_value * 100] percent. Nobles exempt.")
. += "<span class='info'>The current tax rate on deposits is [SStreasury.tax_value * 100] percent. Nobles exempt.</span>"

64 changes: 32 additions & 32 deletions code/modules/roguetown/roguemachine/money.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,48 +78,45 @@ GLOBAL_VAR(moneymaster)
/obj/structure/roguemachine/money/attack_hand(mob/living/user)
. = ..()
user.changeNext_move(CLICK_CD_MELEE)
to_chat(user, span_info("I rub the machine clockwise."))
to_chat(user, "<span class='info'>I rub the machine clockwise.</span>")
if(budget > 0)
say("[budget] MAMMON ARE MINE...")
playsound(src, 'sound/misc/machinetalk.ogg', 100, FALSE, -1)
playsound(loc, 'sound/misc/beep.ogg', 100, FALSE, -1)
update_icon()

proc/select_currency(mob/user)
return input(user, "Select a currency:", "Currency Selection") in list("BRONZE", "SILVER", "GOLD", "PLATINUM")

/obj/structure/roguemachine/money/attack_right(mob/user)
. = ..()
if(.)
return
user.changeNext_move(CLICK_CD_MELEE)
var/inputt = alert(user,"Gold, Silver, or Bronze?",,"BRONZE","SILVER","GOLD")
if(inputt && Adjacent(user))
to_chat(user, span_info("I pull on the [inputt] tongue."))
if(inputt == "BRONZE" && budget >= 50)
budget2change(budget, user, inputt)
budget = 0
if(isliving(user))
var/mob/living/L = user
L.emote("scream")
L.Paralyze(50)
L.Stun(50)
L.visible_message(span_danger("[user] is buried under a mountain of coins!"))
else
budget2change(budget, user, inputt)
switch(inputt)
if("GOLD")
var/zenars = budget/10
if(zenars >= 1)
for(var/i in 1 to zenars)
budget -= 10
if("SILVER")
var/zenars = budget/5
if(zenars >= 1)
for(var/i in 1 to zenars)
budget -= 5
if("BRONZE")
if(budget >= 1)
for(var/i in 1 to budget)
budget -= 1
update_icon()
var/currency = select_currency(user)
if(currency && Adjacent(user))
to_chat(user, "<span class='info'>I pull on the [currency] tongue.</span>")
switch(currency)
if("PLATINUM")
var/zenars = budget/50
if(zenars >= 1)
for(var/i in 1 to zenars)
budget -= 50
if("GOLD")
var/zenars = budget/10
if(zenars >= 1)
for(var/i in 1 to zenars)
budget -= 10
if("SILVER")
var/zenars = budget/5
if(zenars >= 1)
for(var/i in 1 to zenars)
budget -= 5
if("BRONZE")
if(budget >= 1)
for(var/i in 1 to budget)
budget -= 1
update_icon()

/obj/structure/roguemachine/proc/budget2change(budget, mob/user, specify)
var/turf/T
Expand All @@ -134,6 +131,9 @@ GLOBAL_VAR(moneymaster)
var/zenars_to_put
if(specify)
switch(specify)
if("PLATINUM")
zenars_to_put = budget/50
type_to_put = /obj/item/roguecoin/xybrium
if("GOLD")
zenars_to_put = budget/10
type_to_put = /obj/item/roguecoin/gold
Expand Down Expand Up @@ -179,7 +179,7 @@ GLOBAL_VAR(moneymaster)
user.changeNext_move(CLICK_CD_MELEE)
playsound(loc, 'sound/misc/beep.ogg', 100, FALSE, -1)
speaking = !speaking
to_chat(user, span_info("I press the right eye."))
to_chat(user, "<span class='info'>I press the right eye.</span>")
update_icon()
*/
/obj/structure/roguemachine/money/obj_break(damage_flag)
Expand Down
4 changes: 4 additions & 0 deletions code/modules/shuttle/supply.dm
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ GLOBAL_LIST_INIT(blacklisted_cargo_types, typecacheof(list(

if(budget > 0)
var/spawnedcoins = round(budget / 10)
if(spawnedcoins >= 1)
for(var/i in 1 to spawnedcoins)
budget -= 50
new /obj/item/roguecoin/xybrium(moneybox)
if(spawnedcoins >= 1)
for(var/i in 1 to spawnedcoins)
budget -= 10
Expand Down
Binary file modified icons/roguetown/items/valuable.dmi
Binary file not shown.
1 change: 0 additions & 1 deletion roguetown.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2191,7 +2191,6 @@
#include "code\modules\jobs\job_types\roguetown\adventurer\types\special\crusader.dm"
#include "code\modules\jobs\job_types\roguetown\adventurer\types\special\nakedandafraid.dm"
#include "code\modules\jobs\job_types\roguetown\adventurer\types\special\torso.dm"
#include "code\modules\jobs\job_types\roguetown\adventurer\types\special\whitecheesemaker.dm"
#include "code\modules\jobs\job_types\roguetown\church\confessor.dm"
#include "code\modules\jobs\job_types\roguetown\church\druid.dm"
#include "code\modules\jobs\job_types\roguetown\church\monk.dm"
Expand Down

0 comments on commit 69e388b

Please sign in to comment.