diff --git a/code/game/machinery/bank_machine.dm b/code/game/machinery/bank_machine.dm
index fc9b808bcee..d258f7a4d0a 100644
--- a/code/game/machinery/bank_machine.dm
+++ b/code/game/machinery/bank_machine.dm
@@ -8,6 +8,7 @@
var/obj/item/radio/radio
var/radio_channel = "Common"
var/minimum_time_between_warnings = 400
+ var/syphoning_credits = 0
/obj/machinery/computer/bank_machine/Initialize()
. = ..()
@@ -25,6 +26,9 @@
if(istype(I, /obj/item/stack/spacecash))
var/obj/item/stack/spacecash/C = I
value = C.value * C.amount
+ else if(istype(I, /obj/item/holochip))
+ var/obj/item/holochip/H = I
+ value = H.credits
if(value)
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
if(D)
@@ -40,14 +44,15 @@
if(siphoning)
if (stat & (BROKEN|NOPOWER))
say("Insufficient power. Halting siphon.")
- siphoning = FALSE
+ end_syphon()
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
if(!D.has_money(200))
say("Cargo budget depleted. Halting siphon.")
- siphoning = FALSE
+ end_syphon()
return
- new /obj/item/stack/spacecash/c200(drop_location()) // will autostack
+
playsound(src, 'sound/items/poster_being_created.ogg', 100, 1)
+ syphoning_credits += 200
D.adjust_money(-200)
if(next_warning < world.time && prob(15))
var/area/A = get_area(loc)
@@ -85,4 +90,9 @@
siphoning = TRUE
if(href_list["halt"])
say("Station credit withdrawal halted.")
- siphoning = FALSE
+ end_syphon()
+
+/obj/machinery/computer/bank_machine/proc/end_syphon()
+ siphoning = FALSE
+ new /obj/item/holochip(drop_location(), syphoning_credits) //get the loot
+ syphoning_credits = 0
diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm
index e57bd6b4ad7..62b7fef8ea9 100644
--- a/code/game/objects/items/cards_ids.dm
+++ b/code/game/objects/items/cards_ids.dm
@@ -142,14 +142,12 @@
update_label()
/obj/item/card/id/attackby(obj/item/W, mob/user, params)
- if(istype(W, /obj/item/stack/spacecash))
- var/obj/item/stack/spacecash/vbucks = W
+ if(istype(W, /obj/item/holochip))
+ var/obj/item/holochip/holochip = W
if(registered_account)
- var/fortnite_money = vbucks.value * vbucks.amount
- registered_account.adjust_money(fortnite_money)
- to_chat(user, "You insert [vbucks] into [src], adding $[fortnite_money] to your account.")
- qdel(vbucks)
-
+ registered_account.adjust_money(holochip.credits)
+ to_chat(user, "You insert [holochip] into [src], adding [holochip.credits] credits to your account.")
+ qdel(holochip)
/obj/item/card/id/attack_self(mob/user)
if(!registered_account)
@@ -170,10 +168,9 @@
if(!amount_to_remove || amount_to_remove < 0)
return
if(registered_account.adjust_money(-amount_to_remove))
- var/obj/item/stack/spacecash/c1/dosh = new /obj/item/stack/spacecash/c1(get_turf(user))
- dosh.amount = amount_to_remove
- user.put_in_hands(dosh)
- to_chat(user, "You withdraw $[amount_to_remove].")
+ var/obj/item/holochip/holochip = new (get_turf(user), amount_to_remove)
+ user.put_in_hands(holochip)
+ to_chat(user, "You withdraw [amount_to_remove] credits into a holochip.")
return
else
to_chat(user, "You don't have the funds for that.")
@@ -187,8 +184,8 @@
var/datum/bank_account/D = SSeconomy.get_dep_account(registered_account.account_job.paycheck_department)
if(D)
to_chat(user, "The [D.account_holder] reports a balance of $[D.account_balance].")
- to_chat(user, "Use your ID in-hand to pull money from your account in the form of cash.")
- to_chat(user, "You can insert cash into your account by smashing the money against the ID.")
+ to_chat(user, "Use your ID in-hand to pull money from your account in the form of holochips.")
+ to_chat(user, "You can insert credits into your account by pressing holochips against the ID.")
to_chat(user, "If you lose this ID card, you can reclaim your account by using a blank ID card inhand and punching in the account ID.")
if(mining_points)
diff --git a/code/game/objects/items/credit_holochip.dm b/code/game/objects/items/credit_holochip.dm
new file mode 100644
index 00000000000..2a96fa0ca11
--- /dev/null
+++ b/code/game/objects/items/credit_holochip.dm
@@ -0,0 +1,83 @@
+/obj/item/holochip
+ name = "credit holochip"
+ desc = "A hard-light chip encoded with an amount of credits. It is a modern replacement for physical money that can be directly converted to virtual currency and viceversa. Keep away from magnets."
+ icon = 'icons/obj/economy.dmi'
+ icon_state = "holochip_1"
+ throwforce = 0
+ force = 0
+ w_class = WEIGHT_CLASS_TINY
+ var/credits = 0
+
+/obj/item/holochip/Initialize(mapload, amount)
+ . = ..()
+ credits = amount
+ update_icon()
+
+/obj/item/holochip/examine(mob/user)
+ . = ..()
+ to_chat(user, "It's loaded with [credits] credit[( credits > 1 ) ? "s" : ""]")
+ to_chat(user, "Alt-Click to split.")
+
+/obj/item/holochip/update_icon()
+ switch(credits)
+ if(1 to 9)
+ icon_state = "holochip_1"
+ if(10 to 99)
+ icon_state = "holochip_10"
+ if(100 to 999)
+ icon_state = "holochip_100"
+ if(1000 to 9999)
+ icon_state = "holochip_1k"
+ if(10000 to 999999)
+ icon_state = "holochip_10k"
+ if(1000000 to 999999999)
+ icon_state = "holochip_million"
+ if(1000000000 to INFINITY)
+ icon_state = "holochip_billion"
+
+/obj/item/holochip/proc/spend(amount, pay_anyway = FALSE)
+ if(credits >= amount)
+ credits -= amount
+ if(credits == 0)
+ qdel(src)
+ update_icon()
+ return amount
+ else if(pay_anyway)
+ qdel(src)
+ return credits
+ else
+ return 0
+
+/obj/item/holochip/attackby(obj/item/I, mob/user, params)
+ ..()
+ if(istype(I, /obj/item/holochip))
+ var/obj/item/holochip/H = I
+ credits += H.credits
+ to_chat(user, "You insert the credits into [src].")
+ update_icon()
+ qdel(H)
+
+/obj/item/holochip/AltClick(mob/user)
+ if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
+ return
+ var/split_amount = round(input(user,"How many credits do you want to extract from the holochip?") as null|num)
+ if(split_amount == null || split_amount <= 0 || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
+ return
+ else
+ var/new_credits = spend(split_amount, TRUE)
+ var/obj/item/holochip/H = new(user ? user : drop_location(), new_credits)
+ if(user)
+ if(!user.put_in_hands(H))
+ H.forceMove(user.drop_location())
+ add_fingerprint(user)
+ H.add_fingerprint(user)
+ to_chat(user, "You extract [split_amount] credits into a new holochip.")
+
+/obj/item/holochip/emp_act(severity)
+ . = ..()
+ if(. & EMP_PROTECT_SELF)
+ return
+ var/wipe_chance = 60 / severity
+ if(prob(wipe_chance))
+ visible_message("[src] fizzles and disappears!")
+ qdel(src) //rip cash
\ No newline at end of file
diff --git a/code/game/objects/items/storage/wallets.dm b/code/game/objects/items/storage/wallets.dm
index e9458b28b11..3f28c10212e 100644
--- a/code/game/objects/items/storage/wallets.dm
+++ b/code/game/objects/items/storage/wallets.dm
@@ -15,6 +15,7 @@
STR.max_items = 4
STR.can_hold = typecacheof(list(
/obj/item/stack/spacecash,
+ /obj/item/holochip,
/obj/item/card,
/obj/item/clothing/mask/cigarette,
/obj/item/flashlight/pen,
@@ -75,6 +76,5 @@
icon_state = "random_wallet"
/obj/item/storage/wallet/random/PopulateContents()
- var/obj/item/stack/spacecash/c10/cash = new /obj/item/stack/spacecash/c10(src)
- cash.amount = rand(1,5)
+ new /obj/item/holochip(src, rand(5,30))
update_icon()
diff --git a/code/modules/economy/pay_stand.dm b/code/modules/economy/pay_stand.dm
index bc22b109b69..e703477ab3f 100644
--- a/code/modules/economy/pay_stand.dm
+++ b/code/modules/economy/pay_stand.dm
@@ -28,8 +28,7 @@
var/obj/item/card/id/vbucks = W
if(vbucks.registered_account)
if(vbucks.registered_account.adjust_money(-price))
- my_card.registered_account.adjust_money(price)
- my_card.registered_account.bank_card_talk("Purchase made at your vendor by [vbucks.registered_account.account_holder] for $[price].")
+ purchase(vbucks.registered_account.account_holder)
to_chat(user, "Thanks for purchasing! The vendor has been informed.")
return
else
@@ -38,6 +37,15 @@
else
to_chat(user, "You're going to need an actual bank account for that one, buddy.")
return
+ if(istype(W, /obj/item/holochip))
+ var/obj/item/holochip/H = W
+ if(H.spend(price, FALSE))
+ purchase(user)
+ to_chat(user, "Thanks for purchasing! The vendor has been informed.")
+ return
+ else
+ to_chat(user, "You trying to punk me, kid? Come back when you have the cash.")
+ return
if(istype(W, /obj/item/stack/spacecash))
to_chat(user, "What is this, the 2000s? We only take card here.")
return
@@ -57,4 +65,9 @@
else if(default_deconstruction_crowbar(W))
return
else
- return ..()
\ No newline at end of file
+ return ..()
+
+/obj/machinery/paystand/proc/purchase(buyer)
+ my_card.registered_account.adjust_money(price)
+ my_card.registered_account.bank_card_talk("Purchase made at your vendor by [buyer] for [price] credits.")
+
\ No newline at end of file
diff --git a/code/modules/events/pirates.dm b/code/modules/events/pirates.dm
index 99a8dc2f7f1..099ed1a83f2 100644
--- a/code/modules/events/pirates.dm
+++ b/code/modules/events/pirates.dm
@@ -146,15 +146,9 @@
new /obj/effect/temp_visual/emp(get_turf(S))
/obj/machinery/shuttle_scrambler/proc/dump_loot(mob/user)
- if(credits_stored < 200)
- to_chat(user,"Not enough credits to retrieve.")
- return
- while(credits_stored >= 200)
- new /obj/item/stack/spacecash/c200(drop_location())
- credits_stored -= 200
+ new /obj/item/holochip(drop_location(), credits_stored)
to_chat(user,"You retrieve the siphoned credits!")
-
/obj/machinery/shuttle_scrambler/proc/send_notification()
priority_announce("Data theft signal detected, source registered on local gps units.")
@@ -458,4 +452,13 @@
/datum/export/pirate/cash/get_amount(obj/O)
var/obj/item/stack/spacecash/C = O
- return ..() * C.amount * C.value
\ No newline at end of file
+ return ..() * C.amount * C.value
+
+/datum/export/pirate/holochip
+ cost = 1
+ unit_name = "holochip"
+ export_types = list(/obj/item/holochip)
+
+/datum/export/pirate/holochip/get_cost(atom/movable/AM)
+ var/obj/item/holochip/H = AM
+ return H.credits
\ No newline at end of file
diff --git a/code/modules/mining/money_bag.dm b/code/modules/mining/money_bag.dm
index 597cad727ce..5d2fc6f4bd8 100644
--- a/code/modules/mining/money_bag.dm
+++ b/code/modules/mining/money_bag.dm
@@ -15,7 +15,7 @@
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.max_items = 40
STR.max_combined_w_class = 40
- STR.can_hold = typecacheof(list(/obj/item/coin, /obj/item/stack/spacecash))
+ STR.can_hold = typecacheof(list(/obj/item/coin, /obj/item/stack/spacecash, /obj/item/holochip))
/obj/item/storage/bag/money/vault/PopulateContents()
new /obj/item/coin/silver(src)
diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm
index f61e5fe52b0..dd01ee28131 100644
--- a/code/modules/shuttle/special.dm
+++ b/code/modules/shuttle/special.dm
@@ -232,25 +232,35 @@
var/list/counted_money = list()
for(var/obj/item/coin/C in AM.GetAllContents())
- payees[AM] += C.value
- counted_money += C
if(payees[AM] >= threshold)
break
+ payees[AM] += C.value
+ counted_money += C
for(var/obj/item/stack/spacecash/S in AM.GetAllContents())
+ if(payees[AM] >= threshold)
+ break
payees[AM] += S.value * S.amount
counted_money += S
+ for(var/obj/item/holochip/H in AM.GetAllContents())
if(payees[AM] >= threshold)
break
+ payees[AM] += H.credits
+ counted_money += H
- if(istype(AM.pulling, /obj/item/coin))
+ if(payees[AM] < threshold && istype(AM.pulling, /obj/item/coin))
var/obj/item/coin/C = AM.pulling
payees[AM] += C.value
counted_money += C
- else if(istype(AM.pulling, /obj/item/stack/spacecash))
+ else if(payees[AM] < threshold && istype(AM.pulling, /obj/item/stack/spacecash))
var/obj/item/stack/spacecash/S = AM.pulling
payees[AM] += S.value * S.amount
counted_money += S
+
+ else if(payees[AM] < threshold && istype(AM.pulling, /obj/item/holochip))
+ var/obj/item/holochip/H = AM.pulling
+ payees[AM] += H.credits
+ counted_money += H
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
diff --git a/code/modules/spells/spell_types/devil_boons.dm b/code/modules/spells/spell_types/devil_boons.dm
index 36b69b1115b..b5174462d4f 100644
--- a/code/modules/spells/spell_types/devil_boons.dm
+++ b/code/modules/spells/spell_types/devil_boons.dm
@@ -16,14 +16,14 @@
for(var/mob/living/carbon/C in targets)
if(user.dropItemToGround(user.get_active_held_item()))
var/obj/item = pick(
- new /obj/item/coin/gold(user.loc),
- new /obj/item/coin/diamond(user.loc),
- new /obj/item/coin/silver(user.loc),
- new /obj/item/clothing/accessory/medal/gold(user.loc),
- new /obj/item/stack/sheet/mineral/gold(user.loc),
- new /obj/item/stack/sheet/mineral/silver(user.loc),
- new /obj/item/stack/sheet/mineral/diamond(user.loc),
- new /obj/item/stack/spacecash/c1000(user.loc))
+ new /obj/item/coin/gold(user.drop_location()),
+ new /obj/item/coin/diamond(user.drop_location()),
+ new /obj/item/coin/silver(user.drop_location()),
+ new /obj/item/clothing/accessory/medal/gold(user.drop_location()),
+ new /obj/item/stack/sheet/mineral/gold(user.drop_location()),
+ new /obj/item/stack/sheet/mineral/silver(user.drop_location()),
+ new /obj/item/stack/sheet/mineral/diamond(user.drop_location()),
+ new /obj/item/holochip(user.drop_location(), 1000))
C.put_in_hands(item)
/obj/effect/proc_holder/spell/targeted/view_range
diff --git a/icons/obj/economy.dmi b/icons/obj/economy.dmi
index 8e24281aa2d..ed623515079 100644
Binary files a/icons/obj/economy.dmi and b/icons/obj/economy.dmi differ
diff --git a/tgstation.dme b/tgstation.dme
index b5c7007cdb4..4820be15228 100755
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -771,6 +771,7 @@
#include "code\game\objects\items\cosmetics.dm"
#include "code\game\objects\items\courtroom.dm"
#include "code\game\objects\items\crayons.dm"
+#include "code\game\objects\items\credit_holochip.dm"
#include "code\game\objects\items\defib.dm"
#include "code\game\objects\items\dehy_carp.dm"
#include "code\game\objects\items\dice.dm"