Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into regen-rebalance
  • Loading branch information
Absolucy committed Jun 25, 2024
2 parents 8bf3656 + 914b2e3 commit 6407d28
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions monkestation/code/modules/store/atm/_atm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,12 @@

var/obj/item/stack/monkecoin/coin_stack = new(living_user.loc)
coin_stack.amount = withdraw_amount
coin_stack.update_desc()

living_user.put_in_hands(coin_stack)



/obj/machinery/atm/attacked_by(obj/item/attacking_item, mob/living/user)
. = ..()
if(do_after(user, 1 SECONDS, src))
Expand Down Expand Up @@ -222,28 +224,29 @@
/obj/item/stack/monkecoin
name = "monkecoin"
singular_name = "monkecoin"
icon = 'monkestation/icons/obj/economy.dmi'
icon_state = "coins"
icon = 'monkestation/icons/obj/monkecoin.dmi'
icon_state = "monkecoin"
amount = 1
max_amount = INFINITY
throwforce = 0
throw_speed = 2
throw_range = 2
w_class = WEIGHT_CLASS_TINY
full_w_class = WEIGHT_CLASS_TINY
resistance_flags = FLAMMABLE
resistance_flags = FIRE_PROOF | ACID_PROOF
merge_type = /obj/item/stack/monkecoin
var/value = 100

/obj/item/stack/monkecoin/Initialize(mapload, new_amount, merge = TRUE, list/mat_override=null, mat_amt=1)
/obj/item/stack/monkecoin/Initialize(mapload, new_amount, merge = FALSE, list/mat_override=null, mat_amt=1)
. = ..()
update_desc()

/obj/item/stack/monkecoin/update_desc()
. = ..()
var/total_worth = get_item_credit_value()
desc = "It's worth [total_worth] credit[(total_worth > 1) ? "s" : null] in total.\n"
desc += "Their are [amount] monkecoins in this stack."
desc = "Monkecoin, it's the backbone of the economy. "
desc += "It's worth [total_worth] credit[(total_worth > 1) ? "s" : null] in total."
update_icon_state()

/obj/item/stack/monkecoin/get_item_credit_value()
return (amount*value)
Expand All @@ -258,12 +261,23 @@

/obj/item/stack/monkecoin/update_icon_state()
. = ..()
var/coinpress = copytext("[amount]",1,2)
switch(amount)
if(1)
icon_state = initial(icon_state)
if(2 to 9)
icon_state = "[initial(icon_state)]_2"
if(10 to 24)
icon_state = "[initial(icon_state)]_3"
if(25 to INFINITY)
icon_state = "[initial(icon_state)]_4"
if(1 to 9)
icon_state = "[initial(icon_state)][coinpress]"
if(10 to 99)
icon_state = "[initial(icon_state)][coinpress]0"
if(100 to 999)
icon_state = "[initial(icon_state)][coinpress]00"
if(1000 to 8999)
icon_state = "[initial(icon_state)][coinpress]000"
if(9000 to INFINITY)
icon_state = "[initial(icon_state)]9000"

/obj/item/stack/monkecoin/suicide_act(mob/living/carbon/user)
user.visible_message(span_suicide("[user] begins to gouge [user.p_their()] eyes with the [src]! It looks like [user.p_theyre()] trying to commit suicide!"))
user.emote("scream")
if(do_after(user, 5 SECONDS, src))
return BRUTELOSS
else
user.visible_message(span_suicide("[user] puts the [src] down away from [user.p_their()] eyes."))
Binary file removed monkestation/icons/obj/economy.dmi
Binary file not shown.
Binary file added monkestation/icons/obj/monkecoin.dmi
Binary file not shown.

0 comments on commit 6407d28

Please sign in to comment.