diff --git a/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm b/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm index aabd7f4769961..06d6a8e9fd271 100644 --- a/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm +++ b/_maps/RandomRuins/IceRuins/icemoon_underground_abandoned_village.dmm @@ -437,7 +437,6 @@ /obj/item/clothing/under/rank/cargo/miner, /obj/item/clothing/suit/hooded/wintercoat/miner, /obj/item/clothing/shoes/winterboots, -/obj/item/card/id/mining, /obj/effect/decal/cleanable/dirt, /turf/open/floor/wood, /area/ruin/powered) diff --git a/_maps/RandomRuins/RockRuins/rockplanet_shippingdock.dmm b/_maps/RandomRuins/RockRuins/rockplanet_shippingdock.dmm index f4307cf7a84bf..6bb4f2e48c990 100644 --- a/_maps/RandomRuins/RockRuins/rockplanet_shippingdock.dmm +++ b/_maps/RandomRuins/RockRuins/rockplanet_shippingdock.dmm @@ -2068,7 +2068,7 @@ "sa" = ( /obj/effect/turf_decal/rechargefloor, /obj/effect/turf_decal/industrial/warning/dust, -/obj/effect/spawner/lootdrop/whiteship_cere_ripley, +/obj/effect/spawner/lootdrop/ripley, /turf/open/floor/plasteel/mono/dark, /area/ruin/rockplanet/shippingdockwarehouse) "sc" = ( diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index 2ba7553f823c4..241136c297b9a 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -176,6 +176,8 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list( #define isidcard(I) (istype(I, /obj/item/card/id)) +#define isbankcard(I) (istype(I, /obj/item/card/bank)) + #define isstructure(A) (istype(A, /obj/structure)) #define ismachinery(A) (istype(A, /obj/machinery)) diff --git a/code/datums/outfit.dm b/code/datums/outfit.dm index 34771af91ed22..15a580a893286 100644 --- a/code/datums/outfit.dm +++ b/code/datums/outfit.dm @@ -50,9 +50,13 @@ /// Type path of item to go in the glasses slot var/glasses = null + var/wallet = null + /// Type path of item to go in the idcard slot var/id = null + var/bank_card = null + /// Type path of item for left pocket slot var/l_pocket = null @@ -180,8 +184,13 @@ H.equip_to_slot_or_del(new ears(H),ITEM_SLOT_EARS, TRUE) if(glasses) H.equip_to_slot_or_del(new glasses(H),ITEM_SLOT_EYES, TRUE) - if(id) - H.equip_to_slot_or_del(new id(H),ITEM_SLOT_ID, TRUE) + if(!visualsOnly) + if(wallet) + H.equip_to_slot_or_del(new wallet(H),ITEM_SLOT_ID, TRUE) + if(id) + H.equip_to_slot_or_del(new id(H),ITEM_SLOT_ID, TRUE) + if(bank_card) + H.equip_to_slot_or_del(new bank_card(H),ITEM_SLOT_ID, TRUE) if(suit_store) H.equip_to_slot_or_del(new suit_store(H),ITEM_SLOT_SUITSTORE, TRUE) diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/beacon.dm similarity index 100% rename from code/game/machinery/Beacon.dm rename to code/game/machinery/beacon.dm diff --git a/code/game/machinery/bounty_board.dm b/code/game/machinery/bounty_board.dm index b0991110e80d4..4cc3413fe9d9f 100644 --- a/code/game/machinery/bounty_board.dm +++ b/code/game/machinery/bounty_board.dm @@ -33,8 +33,8 @@ GLOBAL_LIST_EMPTY(request_list) /obj/machinery/bounty_board/attackby(obj/item/I, mob/living/user, params) . = ..() - if(istype(I,/obj/item/card/id)) - var/obj/item/card/id/current_card = I + if(istype(I,/obj/item/card/bank)) + var/obj/item/card/bank/current_card = I if(current_card.registered_account) current_user = current_card.registered_account return TRUE @@ -72,9 +72,9 @@ GLOBAL_LIST_EMPTY(request_list) if(request.applicants) for(var/datum/bank_account/j in request.applicants) formatted_applicants += list(list("name" = j.account_holder, "request_id" = request.owner_account.account_id, "requestee_id" = j.account_id)) - var/obj/item/card/id/id_card = user.get_idcard() - if(id_card?.registered_account) - current_user = id_card.registered_account + var/obj/item/card/bank/bank_card = user.get_bankcard() + if(bank_card?.registered_account) + current_user = bank_card.registered_account if(current_user) data["accountName"] = current_user.account_holder data["requests"] = formatted_requests diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 0fe059653d5ca..3916ad0d4b005 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -534,9 +534,7 @@ if(ishuman(mob_occupant)) dna = C.has_dna() - var/obj/item/card/id/I = C.get_idcard(TRUE) - if(I) - has_bank_account = I.registered_account + has_bank_account = C.get_bank_account() if(isbrain(mob_occupant)) dna = B.stored_dna diff --git a/code/game/machinery/droneDispenser.dm b/code/game/machinery/drone_dispenser.dm similarity index 100% rename from code/game/machinery/droneDispenser.dm rename to code/game/machinery/drone_dispenser.dm diff --git a/code/game/machinery/roulette_machine.dm b/code/game/machinery/roulette_machine.dm index 351f1c42ae5e8..a36bf79a41b33 100644 --- a/code/game/machinery/roulette_machine.dm +++ b/code/game/machinery/roulette_machine.dm @@ -39,7 +39,7 @@ var/chosen_bet_type = "0" var/last_anti_spam = 0 var/anti_spam_cooldown = 20 - var/obj/item/card/id/my_card + var/obj/item/card/bank/my_card var/playing = FALSE var/locked = FALSE var/drop_dir = SOUTH @@ -81,7 +81,7 @@ data["Spinning"] = playing if(ishuman(user)) var/mob/living/carbon/human/H = user - var/obj/item/card/id/C = H.get_idcard(TRUE) + var/obj/item/card/bank/C = H.get_bankcard() if(C) data["AccountBalance"] = C.registered_account.account_balance else @@ -114,7 +114,7 @@ return if(playing) return ..() - if(istype(W, /obj/item/card/id)) + if(istype(W, /obj/item/card/bank)) playsound(src, 'sound/machines/card_slide.ogg', 50, TRUE) if(machine_stat & MAINT || !on || locked) @@ -122,7 +122,7 @@ return FALSE if(my_card) - var/obj/item/card/id/player_card = W + var/obj/item/card/bank/player_card = W if(player_card.registered_account.account_balance < chosen_bet_amount) //Does the player have enough funds audible_message("You do not have the funds to play! Lower your bet or get more money.") playsound(src, 'sound/machines/buzz-two.ogg', 30, TRUE) @@ -167,7 +167,7 @@ addtimer(CALLBACK(src, PROC_REF(play), user, player_card, chosen_bet_type, chosen_bet_amount, potential_payout), 4) //Animation first return TRUE else - var/obj/item/card/id/new_card = W + var/obj/item/card/bank/new_card = W if(new_card.registered_account) var/msg = stripped_input(user, "Name of your roulette wheel:", "Roulette Naming", "Roulette Machine") if(!msg) @@ -181,7 +181,7 @@ return ..() ///Proc called when player is going to try and play -/obj/machinery/roulette/proc/play(mob/user, obj/item/card/id/player_id, bet_type, bet_amount, potential_payout) +/obj/machinery/roulette/proc/play(mob/user, obj/item/card/bank/player_id, bet_type, bet_amount, potential_payout) var/payout = potential_payout @@ -203,7 +203,7 @@ playsound(src, 'sound/machines/piston_lower.ogg', 70) ///Ran after a while to check if the player won or not. -/obj/machinery/roulette/proc/finish_play(obj/item/card/id/player_id, bet_type, bet_amount, potential_payout, rolled_number) +/obj/machinery/roulette/proc/finish_play(obj/item/card/bank/player_id, bet_type, bet_amount, potential_payout, rolled_number) last_spin = rolled_number var/is_winner = check_win(bet_type, bet_amount, rolled_number) //Predetermine if we won diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/sleeper.dm similarity index 100% rename from code/game/machinery/Sleeper.dm rename to code/game/machinery/sleeper.dm diff --git a/code/game/objects/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm index d763c46e84e95..08d1514f7bbe6 100644 --- a/code/game/objects/effects/spawners/lootdrop.dm +++ b/code/game/objects/effects/spawners/lootdrop.dm @@ -468,12 +468,18 @@ /obj/structure/salvageable/destructive_analyzer ) +/obj/effect/spawner/lootdrop/ripley + name = "25% mech 75% wreckage ripley spawner" + loot = list(/obj/mecha/working/ripley/mining = 1, + /obj/structure/mecha_wreckage/ripley = 5) + lootdoubles = FALSE + /obj/effect/spawner/lootdrop/salvage_50 name = "50% salvage spawner" loot = list( /obj/effect/spawner/lootdrop/maintenance = 13, /obj/effect/spawner/lootdrop/salvage_machine = 12, - /obj/effect/spawner/lootdrop/whiteship_cere_ripley = 12, + /obj/effect/spawner/lootdrop/ripley = 12, /obj/structure/closet/crate/secure/loot = 13, "" = 50 ) diff --git a/code/game/objects/items/bank_card.dm b/code/game/objects/items/bank_card.dm new file mode 100644 index 0000000000000..4a7f2f9d2f210 --- /dev/null +++ b/code/game/objects/items/bank_card.dm @@ -0,0 +1,160 @@ +/obj/item/card/bank + name = "cash card" + desc = "Managed by a bank outside the sector." + icon_state = "data_1" + var/mining_points = 0 //For redeeming at mining equipment vendors + + var/registered_name = null // The name registered_name on the card + var/datum/bank_account/registered_account + var/obj/machinery/paystand/my_store + +/obj/item/card/bank/Destroy() + if (registered_account) + registered_account.bank_cards -= src + if (my_store && my_store.my_card == src) + my_store.my_card = null + return ..() + +/obj/item/card/bank/attackby(obj/item/W, mob/user, params) + if(istype(W, /obj/item/holochip)) + insert_money(W, user) + return + else if(istype(W, /obj/item/spacecash/bundle)) + insert_money(W, user, TRUE) + return + else if(istype(W, /obj/item/coin)) + insert_money(W, user, TRUE) + return + else if(istype(W, /obj/item/storage/bag/money)) + var/obj/item/storage/bag/money/money_bag = W + var/list/money_contained = money_bag.contents + + var/money_added = mass_insert_money(money_contained, user) + + if (money_added) + to_chat(user, "You stuff the contents into the card! They disappear in a puff of bluespace smoke, adding [money_added] worth of credits to the linked account.") + return + else + return ..() + +/obj/item/card/bank/proc/insert_money(obj/item/I, mob/user, physical_currency) + var/cash_money = I.get_item_credit_value() + if(!cash_money) + to_chat(user, "[I] doesn't seem to be worth anything!") + return + + if(!registered_account) + to_chat(user, "[src] doesn't have a linked account to deposit [I] into!") + return + + registered_account.adjust_money(cash_money) + SSblackbox.record_feedback("amount", "credits_inserted", cash_money) + log_econ("[cash_money] credits were inserted into [src] owned by [src.registered_name]") + if(physical_currency) + to_chat(user, "You stuff [I] into [src]. It disappears in a small puff of bluespace smoke, adding [cash_money] credits to the linked account.") + else + to_chat(user, "You insert [I] into [src], adding [cash_money] credits to the linked account.") + + to_chat(user, "The linked account now reports a balance of [registered_account.account_balance] cr.") + qdel(I) + +/obj/item/card/bank/proc/mass_insert_money(list/money, mob/user) + if (!money || !money.len) + return FALSE + + var/total = 0 + + for (var/obj/item/physical_money in money) + var/cash_money = physical_money.get_item_credit_value() + + total += cash_money + + registered_account.adjust_money(cash_money) + SSblackbox.record_feedback("amount", "credits_inserted", total) + log_econ("[total] credits were inserted into [src] owned by [src.registered_name]") + QDEL_LIST(money) + + return total + +/obj/item/card/bank/proc/alt_click_can_use_id(mob/living/user) + if(!isliving(user)) + return + if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) + return + + return TRUE + +// Returns true if new account was set. +/obj/item/card/bank/proc/set_new_account(mob/living/user) + . = FALSE + var/datum/bank_account/old_account = registered_account + + var/new_bank_id = input(user, "Enter your account ID number.", "Account Reclamation", 111111) as num | null + + if (isnull(new_bank_id)) + return + + if(!alt_click_can_use_id(user)) + return + if(!new_bank_id || new_bank_id < 111111 || new_bank_id > 999999) + to_chat(user, "The account ID number needs to be between 111111 and 999999.") + return + if (registered_account && registered_account.account_id == new_bank_id) + to_chat(user, "The account ID was already assigned to this card.") + return + + for(var/A in SSeconomy.bank_accounts) + var/datum/bank_account/B = A + if(B.account_id == new_bank_id) + if (old_account) + old_account.bank_cards -= src + + B.bank_cards += src + registered_account = B + to_chat(user, "The provided account has been linked to this ID card.") + + return TRUE + + to_chat(user, "The account ID number provided is invalid.") + return + +/obj/item/card/bank/AltClick(mob/living/user) + if(!alt_click_can_use_id(user)) + return + + if(!registered_account) + set_new_account(user) + return + + var/amount_to_remove = FLOOR(input(user, "How much do you want to withdraw? Current Balance: [registered_account.account_balance]", "Withdraw Funds", 5) as num|null, 1) + + if(!amount_to_remove || amount_to_remove < 0) + return + if(!alt_click_can_use_id(user)) + return + if(registered_account.adjust_money(-amount_to_remove)) + var/obj/item/holochip/holochip = new (user.drop_location(), amount_to_remove) + user.put_in_hands(holochip) + to_chat(user, "You withdraw [amount_to_remove] credits into a holochip.") + SSblackbox.record_feedback("amount", "credits_removed", amount_to_remove) + log_econ("[amount_to_remove] credits were removed from [src] owned by [registered_account.account_holder]") + return + else + var/difference = amount_to_remove - registered_account.account_balance + registered_account.bank_card_talk("ERROR: The linked account requires [difference] more credit\s to perform that withdrawal.", TRUE) + +/obj/item/card/bank/examine(mob/user) + . = ..() + if(registered_account) + . += "The account linked to the ID belongs to '[registered_account.account_holder]' and reports a balance of [registered_account.account_balance] cr." + . += "The card indicates that the holder is [registered_account.holder_age] years old. [(registered_account.holder_age < AGE_MINOR) ? "There's a holographic stripe that reads 'MINOR: DO NOT SERVE ALCOHOL OR TOBACCO' along the bottom of the card." : ""]" + . += "Alt-Click the ID to pull money from the linked account in the form of holochips." + . += "You can insert credits into the linked account by pressing holochips, cash, or coins against the ID." + . += "If you lose this ID card, you can reclaim your account by Alt-Clicking a blank ID card while holding it and entering your account ID number." + else + . += "There is no registered account linked to this card. Alt-Click to add one." + if(mining_points) + . += "There's [mining_points] mining equipment redemption point\s loaded onto this card." + +/obj/item/card/bank/GetBankCard() + return src diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 110121dc08e29..ae7aa27cdc3f1 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -149,14 +149,12 @@ slot_flags = ITEM_SLOT_ID armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) resistance_flags = FIRE_PROOF | ACID_PROOF - var/mining_points = 0 //For redeeming at mining equipment vendors var/list/access = list() var/list/ship_access = list() var/registered_name = null // The name registered_name on the card var/assignment = null var/access_txt // mapping aid - var/datum/bank_account/registered_account - var/obj/machinery/paystand/my_store + //var/datum/bank_account/registered_account var/uses_overlays = TRUE var/icon/cached_flat_icon var/registered_age = 18 // default age for ss13 players @@ -171,13 +169,6 @@ update_appearance() RegisterSignal(src, COMSIG_ATOM_UPDATED_ICON, PROC_REF(update_in_wallet)) -/obj/item/card/id/Destroy() - if (registered_account) - registered_account.bank_cards -= src - if (my_store && my_store.my_card == src) - my_store.my_card = null - return ..() - /obj/item/card/id/attack_self(mob/user) if(Adjacent(user)) var/id_message = "\the [initial(name)] " @@ -201,173 +192,29 @@ if(NAMEOF(src, assignment),NAMEOF(src, registered_name),NAMEOF(src, registered_age)) update_label() -/obj/item/card/id/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/holochip)) - insert_money(W, user) - return - else if(istype(W, /obj/item/spacecash/bundle)) - insert_money(W, user, TRUE) - return - else if(istype(W, /obj/item/coin)) - insert_money(W, user, TRUE) - return - else if(istype(W, /obj/item/storage/bag/money)) - var/obj/item/storage/bag/money/money_bag = W - var/list/money_contained = money_bag.contents - - var/money_added = mass_insert_money(money_contained, user) - - if (money_added) - to_chat(user, "You stuff the contents into the card! They disappear in a puff of bluespace smoke, adding [money_added] worth of credits to the linked account.") - return - else - return ..() - -/obj/item/card/id/proc/insert_money(obj/item/I, mob/user, physical_currency) - var/cash_money = I.get_item_credit_value() - if(!cash_money) - to_chat(user, "[I] doesn't seem to be worth anything!") - return - - if(!registered_account) - to_chat(user, "[src] doesn't have a linked account to deposit [I] into!") - return - - registered_account.adjust_money(cash_money) - SSblackbox.record_feedback("amount", "credits_inserted", cash_money) - log_econ("[cash_money] credits were inserted into [src] owned by [src.registered_name]") - if(physical_currency) - to_chat(user, "You stuff [I] into [src]. It disappears in a small puff of bluespace smoke, adding [cash_money] credits to the linked account.") - else - to_chat(user, "You insert [I] into [src], adding [cash_money] credits to the linked account.") - - to_chat(user, "The linked account now reports a balance of [registered_account.account_balance] cr.") - qdel(I) - -/obj/item/card/id/proc/mass_insert_money(list/money, mob/user) - if (!money || !money.len) - return FALSE - - var/total = 0 - - for (var/obj/item/physical_money in money) - var/cash_money = physical_money.get_item_credit_value() - - total += cash_money - - registered_account.adjust_money(cash_money) - SSblackbox.record_feedback("amount", "credits_inserted", total) - log_econ("[total] credits were inserted into [src] owned by [src.registered_name]") - QDEL_LIST(money) - - return total - -/obj/item/card/id/proc/alt_click_can_use_id(mob/living/user) - if(!isliving(user)) - return - if(!user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK)) - return - - return TRUE - -// Returns true if new account was set. -/obj/item/card/id/proc/set_new_account(mob/living/user) - . = FALSE - var/datum/bank_account/old_account = registered_account - - var/new_bank_id = input(user, "Enter your account ID number.", "Account Reclamation", 111111) as num | null - - if (isnull(new_bank_id)) - return - - if(!alt_click_can_use_id(user)) - return - if(!new_bank_id || new_bank_id < 111111 || new_bank_id > 999999) - to_chat(user, "The account ID number needs to be between 111111 and 999999.") - return - if (registered_account && registered_account.account_id == new_bank_id) - to_chat(user, "The account ID was already assigned to this card.") - return - - for(var/A in SSeconomy.bank_accounts) - var/datum/bank_account/B = A - if(B.account_id == new_bank_id) - if (old_account) - old_account.bank_cards -= src - - B.bank_cards += src - registered_account = B - to_chat(user, "The provided account has been linked to this ID card.") - - return TRUE - - to_chat(user, "The account ID number provided is invalid.") - return - -/obj/item/card/id/AltClick(mob/living/user) - if(!alt_click_can_use_id(user)) - return - - if(!registered_account) - set_new_account(user) - return - - var/amount_to_remove = FLOOR(input(user, "How much do you want to withdraw? Current Balance: [registered_account.account_balance]", "Withdraw Funds", 5) as num|null, 1) - - if(!amount_to_remove || amount_to_remove < 0) - return - if(!alt_click_can_use_id(user)) - return - if(registered_account.adjust_money(-amount_to_remove)) - var/obj/item/holochip/holochip = new (user.drop_location(), amount_to_remove) - user.put_in_hands(holochip) - to_chat(user, "You withdraw [amount_to_remove] credits into a holochip.") - SSblackbox.record_feedback("amount", "credits_removed", amount_to_remove) - log_econ("[amount_to_remove] credits were removed from [src] owned by [src.registered_name]") - return - else - var/difference = amount_to_remove - registered_account.account_balance - registered_account.bank_card_talk("ERROR: The linked account requires [difference] more credit\s to perform that withdrawal.", TRUE) - /obj/item/card/id/examine(mob/user) . = ..() - . += "There's more information below, you can look again to take a closer look..." - -/obj/item/card/id/examine_more(mob/user) - var/list/msg = list("You examine [src] closer, and note the following...") - + . += "
CARD INFO:" if(registered_name) - msg += "NAME:" - msg += "[registered_name]" + . += "NAME:" + . += "[registered_name]" if(registered_age) - msg += "AGE:" - msg += "[registered_age] years old [(registered_age < AGE_MINOR) ? "There's a holographic stripe that reads 'MINOR: DO NOT SERVE ALCOHOL OR TOBACCO' along the bottom of the card." : ""]" + . += "AGE:" + . += "[registered_age] years old [(registered_age < AGE_MINOR) ? "There's a holographic stripe that reads 'MINOR: DO NOT SERVE ALCOHOL OR TOBACCO' along the bottom of the card." : ""]" if(length(ship_access)) - msg += "SHIP ACCESS:" + . += "SHIP ACCESS:" var/list/ship_factions = list() for(var/datum/overmap/ship/controlled/ship in ship_access) var/faction = ship.get_faction() if(!(faction in ship_factions)) ship_factions += faction - msg += "[ship_factions.Join(", ")]" + . += "[ship_factions.Join(", ")]" var/list/ship_names = list() for(var/datum/overmap/ship/controlled/ship in ship_access) ship_names += ship.name - msg += "[ship_names.Join(", ")]" - - if(registered_account) - msg += "ACCOUNT:" - msg += "LINKED ACCOUNT HOLDER: '[registered_account.account_holder]'" - msg += "BALANCE: [registered_account.account_balance] cr." - msg += "Alt-click the ID to pull money from the account in the form of holochips." - msg += "You can insert credits into the account by pressing holochips, cash, or coins against the ID." - if(registered_account.account_holder == user.real_name) - msg += "If you lose this ID card, you can reclaim your account by Alt-click a blank ID card and entering your account ID number." - else - msg += "There is no registered account. Alt-click to add one." - return msg + . += "[ship_names.Join(", ")]" /obj/item/card/id/GetAccess() return access @@ -483,7 +330,7 @@ update_label() else return ..() - var/popup_input = alert(user, "Choose Action", "Agent ID", "Show", "Forge/Reset", "Change Account ID") + var/popup_input = alert(user, "Choose Action", "Agent ID", "Show", "Forge/Reset") if(user.incapacitated()) return if(popup_input == "Forge/Reset" && !forged) @@ -513,17 +360,6 @@ update_label() to_chat(user, "You successfully forge the ID card.") log_game("[key_name(user)] has forged \the [initial(name)] with name \"[registered_name]\" and occupation \"[assignment]\".") - // First time use automatically sets the account id to the user. - if (first_use && !registered_account) - if(ishuman(user)) - var/mob/living/carbon/human/accountowner = user - - for(var/bank_account in SSeconomy.bank_accounts) - var/datum/bank_account/account = bank_account - if(account.account_id == accountowner.account_id) - account.bank_cards += src - registered_account = account - to_chat(user, "Your account number has been automatically assigned.") return else if (popup_input == "Forge/Reset" && forged) registered_name = initial(registered_name) @@ -535,9 +371,6 @@ update_label() forged = FALSE to_chat(user, "You successfully reset the ID card.") return - else if (popup_input == "Change Account ID") - set_new_account(user) - return return ..() /obj/item/card/id/syndicate/anyone @@ -552,7 +385,6 @@ update_label() icon_state = "syndie" access = list(ACCESS_SYNDICATE) uses_overlays = FALSE - registered_age = null /obj/item/card/id/syndicate_command/crew_id assignment = "Operative" @@ -740,11 +572,6 @@ update_label() registered_name = "Prisoner #13-007" icon_state = "prisoner_007" -/obj/item/card/id/mining - name = "mining ID" - access = list(ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MECH_MINING, ACCESS_MAILSORTING, ACCESS_MINERAL_STOREROOM) - custom_price = 250 - /obj/item/card/id/away name = "\proper a perfectly generic identification card" desc = "A perfectly generic identification card. Looks like it could use some flavor." diff --git a/code/game/objects/items/storage/wallets.dm b/code/game/objects/items/storage/wallets.dm index 91f47f56cdd54..c031e998cdcc0 100644 --- a/code/game/objects/items/storage/wallets.dm +++ b/code/game/objects/items/storage/wallets.dm @@ -117,6 +117,11 @@ else return ..() +/obj/item/storage/wallet/GetBankCard() + for(var/obj/item/card/I in contents) + if(istype(I, /obj/item/card/bank)) + return I + /obj/item/storage/wallet/random icon_state = "random_wallet" diff --git a/code/game/objects/structures/crates_lockers/crates/secure.dm b/code/game/objects/structures/crates_lockers/crates/secure.dm index cdd98f22196f0..77d75164b185d 100644 --- a/code/game/objects/structures/crates_lockers/crates/secure.dm +++ b/code/game/objects/structures/crates_lockers/crates/secure.dm @@ -83,10 +83,10 @@ /obj/structure/closet/crate/secure/owned/togglelock(mob/living/user, silent) if(privacy_lock) if(!broken) - var/obj/item/card/id/id_card = user.get_idcard(TRUE) - if(id_card) - if(id_card.registered_account) - if(id_card.registered_account == buyer_account) + var/obj/item/card/bank/bank_card = user.get_bankcard() + if(bank_card) + if(bank_card.registered_account) + if(bank_card.registered_account == buyer_account) if(iscarbon(user)) add_fingerprint(user) locked = !locked diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 37c8163359778..4e95b55588429 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -422,7 +422,7 @@ . = ..() if(.) return - var/obj/item/card/id/potential_acc = usr.get_idcard(hand_first = TRUE) + var/obj/item/card/bank/potential_acc = usr.get_bankcard() switch(action) if("Buy") if(!showpiece) @@ -497,9 +497,9 @@ return TRUE . = TRUE /obj/structure/displaycase/forsale/attackby(obj/item/I, mob/living/user, params) - if(isidcard(I)) + if(isbankcard(I)) //Card Registration - var/obj/item/card/id/potential_acc = I + var/obj/item/card/bank/potential_acc = I if(!potential_acc.registered_account) to_chat(user, "This ID card has no account registered!") return diff --git a/code/modules/antagonists/traitor/syndicate_contract.dm b/code/modules/antagonists/traitor/syndicate_contract.dm index a6edcb0753611..d6bbba3593031 100644 --- a/code/modules/antagonists/traitor/syndicate_contract.dm +++ b/code/modules/antagonists/traitor/syndicate_contract.dm @@ -143,10 +143,10 @@ // Pay contractor their portion of ransom if (status == CONTRACT_STATUS_COMPLETE) var/mob/living/carbon/human/H - var/obj/item/card/id/C + var/obj/item/card/bank/C if(ishuman(contract.owner.current)) H = contract.owner.current - C = H.get_idcard(TRUE) + C = H.get_bankcard() if(C && C.registered_account) C.registered_account.adjust_money(ransom * 0.35, "syndicate_contract") diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index 11358938bd47a..0bf0b74c715af 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -224,7 +224,7 @@ C.sensor_mode = NO_SENSORS - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.get_idcard() if(W) if(H.age) W.registered_age = H.age @@ -437,7 +437,7 @@ /datum/outfit/spacebartender/post_equip(mob/living/carbon/human/H, visualsOnly) . = ..() - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.get_idcard() if(H.age < AGE_MINOR) W.registered_age = AGE_MINOR to_chat(H, "You're not technically old enough to access or serve alcohol, but your ID has been discreetly modified to display your age as [AGE_MINOR]. Try to keep that a secret!") diff --git a/code/modules/client/loadout/loadout_general.dm b/code/modules/client/loadout/loadout_general.dm index 4c081a67e92fb..6277a8a3a6016 100644 --- a/code/modules/client/loadout/loadout_general.dm +++ b/code/modules/client/loadout/loadout_general.dm @@ -62,10 +62,6 @@ display_name = "toy, magic eight ball" path = /obj/item/toy/eightball -/datum/gear/wallet - display_name = "wallet" - path = /obj/item/storage/wallet - /datum/gear/pai display_name = "personal AI device" path = /obj/item/paicard diff --git a/code/modules/clothing/outfits/factions/independent.dm b/code/modules/clothing/outfits/factions/independent.dm index 24b3201573d3a..db227c2903c75 100644 --- a/code/modules/clothing/outfits/factions/independent.dm +++ b/code/modules/clothing/outfits/factions/independent.dm @@ -6,8 +6,6 @@ box = /obj/item/storage/box/survival id = /obj/item/card/id - r_pocket = /obj/item/storage/wallet - // Assistant /datum/outfit/job/independent/assistant @@ -314,7 +312,6 @@ jobtype = /datum/job/engineer belt = /obj/item/storage/belt/utility/full/engi - l_pocket = /obj/item/storage/wallet gloves = /obj/item/clothing/gloves/color/yellow ears = /obj/item/radio/headset/headset_eng uniform = /obj/item/clothing/under/rank/engineering/engineer @@ -393,7 +390,6 @@ id = /obj/item/card/id/silver belt = /obj/item/storage/belt/utility/chief/full - l_pocket = /obj/item/storage/wallet ears = /obj/item/radio/headset/headset_com uniform = /obj/item/clothing/under/rank/engineering/chief_engineer dcoat = /obj/item/clothing/suit/hooded/wintercoat/engineering diff --git a/code/modules/clothing/outfits/factions/nanotrasen.dm b/code/modules/clothing/outfits/factions/nanotrasen.dm index 93f1ee3a347c4..e93c7b4b8e52d 100644 --- a/code/modules/clothing/outfits/factions/nanotrasen.dm +++ b/code/modules/clothing/outfits/factions/nanotrasen.dm @@ -220,7 +220,6 @@ id = /obj/item/card/id/silver belt = /obj/item/storage/belt/utility/chief/full - l_pocket = /obj/item/storage/wallet ears = /obj/item/radio/headset/headset_com uniform = /obj/item/clothing/under/nanotrasen/engineering/director dcoat = /obj/item/clothing/suit/hooded/wintercoat/engineering diff --git a/code/modules/clothing/outfits/factions/syndicate.dm b/code/modules/clothing/outfits/factions/syndicate.dm index 5e04d87d88c68..03254ed8927ee 100644 --- a/code/modules/clothing/outfits/factions/syndicate.dm +++ b/code/modules/clothing/outfits/factions/syndicate.dm @@ -22,10 +22,11 @@ //generates a codename and assigns syndicate access, used in the twinkleshine. /datum/outfit/job/syndicate/proc/assign_codename(mob/living/carbon/human/H) - var/obj/item/card/id/I = H.wear_id - I.registered_name = pick(GLOB.twinkle_names) + "-" + num2text(rand(1, 12)) // squidquest real - I.access |= list(ACCESS_SYNDICATE) - I.update_label() + var/obj/item/card/id/I = H.get_idcard() + if(I) + I.registered_name = pick(GLOB.twinkle_names) + "-" + num2text(rand(1, 12)) // squidquest real + I.access |= list(ACCESS_SYNDICATE) + I.update_label() //and now, for the Assistants @@ -199,7 +200,7 @@ /datum/outfit/job/syndicate/bartender/post_equip(mob/living/carbon/human/H, visualsOnly) . = ..() - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.get_idcard() if(H.age < AGE_MINOR) W.registered_age = AGE_MINOR to_chat(H, "You're not technically old enough to access or serve alcohol, but your ID has been discreetly modified to display your age as [AGE_MINOR]. Try to keep that a secret!") diff --git a/code/modules/economy/account.dm b/code/modules/economy/account.dm index 64280475664a6..4213ae91376b1 100644 --- a/code/modules/economy/account.dm +++ b/code/modules/economy/account.dm @@ -1,21 +1,23 @@ /datum/bank_account var/account_holder = "Rusty Venture" var/account_balance = 0 + var/holder_age = 18 var/list/bank_cards = list() var/add_to_accounts = TRUE var/account_id -/datum/bank_account/New(newname, job) +/datum/bank_account/New(newname, age) if(add_to_accounts) SSeconomy.bank_accounts += src account_holder = newname + holder_age = age account_id = rand(111111,999999) /datum/bank_account/Destroy() if(add_to_accounts) SSeconomy.bank_accounts -= src - for(var/obj/item/card/id/id_card as anything in bank_cards) - id_card.registered_account = null + for(var/obj/item/card/bank/bank_card as anything in bank_cards) + bank_card.registered_account = null SSeconomy.bank_money -= account_balance return ..() @@ -49,10 +51,6 @@ return for(var/obj/A in bank_cards) var/icon_source = A - if(istype(A, /obj/item/card/id)) - var/obj/item/card/id/id_card = A - if(id_card.uses_overlays) - icon_source = id_card.get_cached_flat_icon() var/mob/card_holder = recursive_loc_check(A, /mob) if(ismob(card_holder)) //If on a mob if(!card_holder.client || (!(card_holder.client.prefs.chat_toggles & CHAT_BANKCARD) && !force)) diff --git a/code/modules/economy/pay_stand.dm b/code/modules/economy/pay_stand.dm index af7d9be4b947c..9382a03d062ec 100644 --- a/code/modules/economy/pay_stand.dm +++ b/code/modules/economy/pay_stand.dm @@ -6,14 +6,14 @@ density = TRUE anchored = TRUE var/locked = FALSE - var/obj/item/card/id/my_card + var/obj/item/card/bank/my_card var/obj/item/assembly/signaler/signaler //attached signaler, let people attach signalers that get activated if the user's transaction limit is achieved. var/signaler_threshold = 0 //signaler threshold amount var/amount_deposited = 0 //keep track of the amount deposited over time so you can pay multiple times to reach the signaler threshold var/force_fee = 0 //replaces the "pay whatever" functionality with a set amount when non-zero. /obj/machinery/paystand/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/card/id)) + if(istype(W, /obj/item/card/bank)) if(W == my_card) if(user.a_intent == INTENT_DISARM) var/rename_msg = stripped_input(user, "Rename the Paystand:", "Paystand Naming", name) @@ -31,7 +31,7 @@ to_chat(user, "You [src.locked ? "lock" : "unlock"] the paystand, protecting the bolts from [anchored ? "loosening" : "tightening"].") return if(!my_card) - var/obj/item/card/id/assistant_mains_need_to_die = W + var/obj/item/card/bank/assistant_mains_need_to_die = W if(!assistant_mains_need_to_die.registered_account) return var/msg = stripped_input(user, "Name of pay stand:", "Paystand Naming", "[user]'s Awesome Paystand") @@ -42,7 +42,7 @@ my_card = assistant_mains_need_to_die to_chat(user, "You link the stand to your account.") return - var/obj/item/card/id/vbucks = W + var/obj/item/card/bank/vbucks = W if(vbucks.registered_account) var/momsdebitcard = 0 if(!force_fee) diff --git a/code/modules/jobs/access.dm b/code/modules/jobs/access.dm index cdd44cab9ae8c..550e413f1a59d 100644 --- a/code/modules/jobs/access.dm +++ b/code/modules/jobs/access.dm @@ -44,6 +44,9 @@ /obj/item/proc/InsertID() return FALSE +/obj/item/proc/GetBankCard() + return null + /obj/proc/text2access(access_text) . = list() if(!access_text) diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index 20ad6e0897307..f850eded96d4d 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -122,7 +122,7 @@ if(!H) return FALSE if(!visualsOnly) - var/datum/bank_account/bank_account = new(H.real_name, src) + var/datum/bank_account/bank_account = new(H.real_name, H.age) bank_account.adjust_money(officer ? 250 : 100, "starting_money") //just a little bit of money for you H.account_id = bank_account.account_id @@ -179,7 +179,9 @@ var/jobtype = null uniform = /obj/item/clothing/under/color/grey + wallet = /obj/item/storage/wallet id = /obj/item/card/id + bank_card = /obj/item/card/bank back = /obj/item/storage/backpack shoes = /obj/item/clothing/shoes/sneakers/black box = /obj/item/storage/box/survival @@ -268,7 +270,7 @@ if(!J) J = GLOB.name_occupations[H.job] - var/obj/item/card/id/C = H.wear_id + var/obj/item/card/id/C = H.get_idcard(TRUE) if(istype(C)) C.access = J.get_access() shuffle_inplace(C.access) // Shuffle access list to make NTNet passkeys less predictable @@ -285,14 +287,17 @@ if(id_assignment) C.assignment = id_assignment C.update_label() - for(var/A in SSeconomy.bank_accounts) - var/datum/bank_account/B = A - if(B.account_id == H.account_id) - C.registered_account = B - B.bank_cards += C - break H.sec_hud_set_ID() + var/obj/item/card/bank/bank_card = H.get_bankcard() + if(istype(bank_card)) + for(var/account in SSeconomy.bank_accounts) + var/datum/bank_account/bank_account = account + if(bank_account.account_id == H.account_id) + bank_card.registered_account = bank_account + bank_account.bank_cards += bank_card + break + var/obj/item/pda/PDA = H.get_item_by_slot(pda_slot) if(istype(PDA)) PDA.owner = H.real_name diff --git a/code/modules/jobs/job_types/bartender.dm b/code/modules/jobs/job_types/bartender.dm index 9c5d28e693e8a..994f34404efc7 100644 --- a/code/modules/jobs/job_types/bartender.dm +++ b/code/modules/jobs/job_types/bartender.dm @@ -27,7 +27,7 @@ /datum/outfit/job/bartender/post_equip(mob/living/carbon/human/H, visualsOnly) . = ..() - var/obj/item/card/id/W = H.wear_id + var/obj/item/card/id/W = H.get_idcard() if(H.age < AGE_MINOR) W.registered_age = AGE_MINOR to_chat(H, "You're not technically old enough to access or serve alcohol, but your ID has been discreetly modified to display your age as [AGE_MINOR]. Try to keep that a secret!") diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index d0704887b4ea4..2b3e379691c98 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -249,7 +249,7 @@ switch(action) if("Claim") var/mob/M = usr - var/obj/item/card/id/I = M.get_idcard(TRUE) + var/obj/item/card/bank/I = M.get_bankcard() if(points) if(I) I.mining_points += points diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index 11eeef8b4a8e5..d692e36345cb9 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -21,7 +21,6 @@ bubble_icon = "alien" type_of_meat = /obj/item/reagent_containers/food/snacks/meat/slab/xeno - var/obj/item/card/id/wear_id = null // Fix for station bounced radios -- Skie var/has_fine_manipulation = FALSE status_flags = CANUNCONSCIOUS|CANPUSH diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index a7dc41b307c41..8743fe33289e8 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -27,6 +27,7 @@ var/obj/item/tank/internal = null var/obj/item/clothing/head = null + var/obj/item/wear_id = null //only used by humans var/obj/item/clothing/gloves = null ///only used by humans var/obj/item/clothing/shoes/shoes = null ///only used by humans. var/obj/item/clothing/glasses/glasses = null ///only used by humans. diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 6556335c2bdb4..567523c11d792 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -54,7 +54,6 @@ var/obj/item/clothing/wear_suit = null var/obj/item/clothing/w_uniform = null var/obj/item/belt = null - var/obj/item/wear_id = null var/obj/item/r_store = null var/obj/item/l_store = null var/obj/item/s_store = null diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 5d8264c14ac3c..9e2cfe4f1556e 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -101,6 +101,22 @@ if(id_card) return id_card +/mob/living/carbon/human/get_bankcard() + //Check hands + var/list/items_to_check = list() + if(get_active_held_item()) + items_to_check += get_active_held_item() + if(get_inactive_held_item()) + items_to_check += get_inactive_held_item() + if(wear_id) + items_to_check += wear_id + if(belt) + items_to_check += belt + for(var/obj/item/i in items_to_check) + var/obj/item/card/bank/bank_card = i.GetBankCard() + if(bank_card) + return bank_card + /mob/living/carbon/human/get_id_in_hand() var/obj/item/held_item = get_active_held_item() if(!held_item) @@ -137,10 +153,10 @@ to_chat(src, "You can't bring yourself to use a ranged weapon!") return FALSE -/mob/living/carbon/human/proc/get_bank_account() +/mob/living/carbon/proc/get_bank_account() RETURN_TYPE(/datum/bank_account) var/datum/bank_account/account - var/obj/item/card/id/I = get_idcard() + var/obj/item/card/bank/I = get_bankcard() if(I && I.registered_account) account = I.registered_account diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index e061cd5c9793d..e2a01d29540cb 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1179,7 +1179,9 @@ GLOBAL_LIST_EMPTY(roundstart_races) return FALSE return equip_delay_self_check(I, H, bypass_equip_delay_self) if(ITEM_SLOT_ID) - if(H.wear_id && !swap) + if(H.wear_id) + if(SEND_SIGNAL(H.wear_id, COMSIG_TRY_STORAGE_CAN_INSERT, I, H, TRUE)) + return TRUE return FALSE var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST) diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index 7a995dea28dae..d5b97a942da2b 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -84,6 +84,9 @@ if(ITEM_SLOT_BACKPACK) if(!back || !SEND_SIGNAL(back, COMSIG_TRY_STORAGE_INSERT, I, src, TRUE)) not_handled = TRUE + if(ITEM_SLOT_ID) + if(!wear_id || !SEND_SIGNAL(wear_id, COMSIG_TRY_STORAGE_INSERT, I, src, TRUE)) + not_handled = TRUE else not_handled = TRUE diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index c7070a66bcdfd..06c7a9af52d85 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1202,6 +1202,7 @@ var/list/searching = GetAllContents() var/search_id = 1 var/search_pda = 1 + var/search_bankcard = 1 for(var/A in searching) if(search_id && istype(A, /obj/item/card/id)) @@ -1209,18 +1210,24 @@ if(ID.registered_name == oldname) ID.registered_name = newname ID.update_label() - if(ID.registered_account?.account_holder == oldname) - ID.registered_account.account_holder = newname - if(!search_pda) + if(!search_pda || !search_bankcard) break search_id = 0 + if(search_bankcard && istype(A, /obj/item/card/bank)) + var/obj/item/card/bank/bank_card = A + if(bank_card.registered_account?.account_holder == oldname) + bank_card.registered_account.account_holder = newname + if(!search_id || !search_pda) + break + search_bankcard = 0 + else if(search_pda && istype(A, /obj/item/pda)) var/obj/item/pda/PDA = A if(PDA.owner == oldname) PDA.owner = newname PDA.update_label() - if(!search_id) + if(!search_id || !search_bankcard) break search_pda = 0 @@ -1303,6 +1310,9 @@ /mob/proc/get_idcard(hand_first) return +/mob/proc/get_bankcard() + return + /mob/proc/get_id_in_hand() return diff --git a/code/modules/modular_computers/file_system/programs/bounty_board.dm b/code/modules/modular_computers/file_system/programs/bounty_board.dm index 496011cfddddf..b3b9051e5b8f0 100644 --- a/code/modules/modular_computers/file_system/programs/bounty_board.dm +++ b/code/modules/modular_computers/file_system/programs/bounty_board.dm @@ -25,8 +25,8 @@ if(!networked) GLOB.allbountyboards += computer networked = TRUE - if(card_slot && card_slot.stored_card && card_slot.stored_card.registered_account) - current_user = card_slot.stored_card.registered_account + if(card_slot && card_slot.bank_card && card_slot.bank_card.registered_account) + current_user = card_slot.bank_card.registered_account for(var/i in GLOB.request_list) if(!i) continue diff --git a/code/modules/modular_computers/file_system/programs/cargoship.dm b/code/modules/modular_computers/file_system/programs/cargoship.dm index 1bfe53b215f2c..2aa9b68565cab 100644 --- a/code/modules/modular_computers/file_system/programs/cargoship.dm +++ b/code/modules/modular_computers/file_system/programs/cargoship.dm @@ -35,21 +35,21 @@ // Get components var/obj/item/computer_hardware/card_slot/card_slot = computer.all_components[MC_CARD] var/obj/item/computer_hardware/printer/printer = computer.all_components[MC_PRINT] - var/obj/item/card/id/id_card = card_slot ? card_slot.stored_card : null + var/obj/item/card/bank/bank_card = card_slot ? card_slot.stored_card : null if(!card_slot || !printer) //We need both to successfully use this app. return switch(action) if("ejectid") - if(id_card) + if(bank_card) card_slot.try_eject(TRUE, usr) if("selectid") - if(!id_card) + if(!bank_card) return - if(!id_card.registered_account) + if(!bank_card.registered_account) playsound(get_turf(ui_host()), 'sound/machines/buzz-sigh.ogg', 50, TRUE, -1) return - payments_acc = id_card.registered_account + payments_acc = bank_card.registered_account playsound(get_turf(ui_host()), 'sound/machines/ping.ogg', 50, TRUE, -1) if("resetid") payments_acc = null diff --git a/code/modules/modular_computers/hardware/card_slot.dm b/code/modules/modular_computers/hardware/card_slot.dm index 1acdb72f400e9..1ef62b7617f33 100644 --- a/code/modules/modular_computers/hardware/card_slot.dm +++ b/code/modules/modular_computers/hardware/card_slot.dm @@ -8,6 +8,7 @@ var/obj/item/card/id/stored_card var/obj/item/card/id/stored_card2 + var/obj/item/card/bank/bank_card /obj/item/computer_hardware/card_slot/Exited(atom/ejected, atom/newloc) if(!(ejected == stored_card || ejected == stored_card2)) diff --git a/code/modules/modular_computers/laptop_vendor.dm b/code/modules/modular_computers/laptop_vendor.dm index eb363de157921..b1ec3d3edc16f 100644 --- a/code/modules/modular_computers/laptop_vendor.dm +++ b/code/modules/modular_computers/laptop_vendor.dm @@ -248,10 +248,10 @@ visible_message("[user] inserts a [HC.credits] cr holocredit chip into [src].") qdel(HC) return - else if(istype(I, /obj/item/card/id)) + else if(istype(I, /obj/item/card/bank)) if(state != 2) return - var/obj/item/card/id/ID = I + var/obj/item/card/bank/ID = I var/datum/bank_account/account = ID.registered_account var/target_credits = total_price - credits if(!account.adjust_money(-target_credits, "laptop_vendor")) diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 77525a1f309e4..96e027a55476a 100644 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -388,8 +388,8 @@ /obj/item/sales_tagger/attackby(obj/item/I, mob/living/user, params) . = ..() - if(istype(I, /obj/item/card/id)) - var/obj/item/card/id/potential_acc = I + if(isbankcard(I)) + var/obj/item/card/bank/potential_acc = I if(potential_acc.registered_account) payments_acc = potential_acc.registered_account playsound(src, 'sound/machines/ping.ogg', 40, TRUE) diff --git a/code/modules/research/bepis.dm b/code/modules/research/bepis.dm index a033b59b56ae5..bb56a69adf2bb 100644 --- a/code/modules/research/bepis.dm +++ b/code/modules/research/bepis.dm @@ -58,11 +58,11 @@ say("Deposited [deposit_value] credits into storage.") update_icon_state() return - if(istype(O, /obj/item/card/id)) - var/obj/item/card/id/Card = O - if(Card.registered_account) - account = Card.registered_account - account_name = Card.registered_name + if(istype(O, /obj/item/card/bank)) + var/obj/item/card/bank/bank_card = O + if(bank_card.registered_account) + account = bank_card.registered_account + account_name = bank_card.registered_name say("New account detected. Console Updated.") else say("No account detected on card. Aborting.") diff --git a/code/modules/shuttle/shuttle_rotate.dm b/code/modules/shuttle/shuttle_rotate.dm index d0b4b49a92f6e..31e650a90a318 100644 --- a/code/modules/shuttle/shuttle_rotate.dm +++ b/code/modules/shuttle/shuttle_rotate.dm @@ -70,10 +70,6 @@ If ever any of these procs are useful for non-shuttles, rename it to proc/rotate new_dpdir = new_dpdir | angle2dir(rotation+dir2angle(D)) dpdir = new_dpdir -/obj/structure/table/wood/bar/shuttleRotate(rotation, params) - . = ..() - boot_dir = angle2dir(rotation + dir2angle(boot_dir)) - /obj/structure/alien/weeds/shuttleRotate(rotation, params) params &= ~ROTATE_OFFSET return ..() diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm deleted file mode 100644 index 1ddb26efba883..0000000000000 --- a/code/modules/shuttle/special.dm +++ /dev/null @@ -1,257 +0,0 @@ -// Special objects for shuttle templates go here if nowhere else - -// Bar staff, GODMODE mobs(as long as they stay in the shuttle) that just want to make sure people have drinks -// and a good time. - -/mob/living/simple_animal/drone/snowflake/bardrone - name = "Bardrone" - desc = "A barkeeping drone, a robot built to tend bars." - hacked = TRUE - laws = "1. Serve drinks.\n\ - 2. Talk to patrons.\n\ - 3. Don't get messed up in their affairs." - unique_name = FALSE // disables the (123) number suffix - initial_language_holder = /datum/language_holder/universal - -/mob/living/simple_animal/drone/snowflake/bardrone/Initialize() - . = ..() - access_card.access |= ACCESS_CENT_BAR - become_area_sensitive(ROUNDSTART_TRAIT) - RegisterSignal(src, COMSIG_ENTER_AREA, PROC_REF(check_barstaff_godmode)) - check_barstaff_godmode() - -/mob/living/simple_animal/drone/snowflake/bardrone/Destroy() - lose_area_sensitivity(ROUNDSTART_TRAIT) - return ..() - -/mob/living/simple_animal/hostile/alien/maid/barmaid - gold_core_spawnable = NO_SPAWN - name = "Barmaid" - desc = "A barmaid, a maiden found in a bar." - pass_flags = PASSTABLE - unique_name = FALSE - AIStatus = AI_OFF - stop_automated_movement = TRUE - initial_language_holder = /datum/language_holder/universal - -/mob/living/simple_animal/hostile/alien/maid/barmaid/Initialize() - . = ..() - access_card = new /obj/item/card/id(src) - var/datum/job/captain/C = new /datum/job/captain - access_card.access = C.get_access() - access_card.access |= ACCESS_CENT_BAR - ADD_TRAIT(access_card, TRAIT_NODROP, ABSTRACT_ITEM_TRAIT) - become_area_sensitive(ROUNDSTART_TRAIT) - RegisterSignal(src, COMSIG_ENTER_AREA, PROC_REF(check_barstaff_godmode)) - check_barstaff_godmode() - -/mob/living/simple_animal/hostile/alien/maid/barmaid/Destroy() - qdel(access_card) - lose_area_sensitivity(ROUNDSTART_TRAIT) - return ..() - -/mob/living/simple_animal/proc/check_barstaff_godmode() - SIGNAL_HANDLER - - if(istype(get_area(loc), /area/shuttle/escape)) - status_flags |= GODMODE - else - status_flags &= ~GODMODE - -// Bar table, a wooden table that kicks you in a direction if you're not -// barstaff (defined as someone who was a roundstart bartender or someone -// with CENTCOM_BARSTAFF) - -/obj/structure/table/wood/bar - resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF - flags_1 = NODECONSTRUCT_1 - max_integrity = 1000 - var/boot_dir = 1 - -/obj/structure/table/wood/bar/Initialize() - . = ..() - var/static/list/loc_connections = list( - COMSIG_ATOM_ENTERED = PROC_REF(on_entered) - ) - AddElement(/datum/element/connect_loc, loc_connections) - -/obj/structure/table/wood/bar/proc/on_entered(datum/source, atom/movable/AM) - SIGNAL_HANDLER - if(isliving(AM) && !is_barstaff(AM)) - // No climbing on the bar please - var/mob/living/M = AM - var/throwtarget = get_edge_target_turf(src, boot_dir) - M.Paralyze(40) - M.throw_at(throwtarget, 5, 1) - to_chat(M, "No climbing on the bar please.") - -/obj/structure/table/wood/bar/proc/is_barstaff(mob/living/user) - . = FALSE - if(ishuman(user)) - var/mob/living/carbon/human/H = user - if(H.mind && H.mind.assigned_role == "Bartender") - return TRUE - - var/obj/item/card/id/ID = user.get_idcard(FALSE) - if(ID && (ACCESS_CENT_BAR in ID.access)) - return TRUE - -//Luxury Shuttle Blockers - -/obj/machinery/scanner_gate/luxury_shuttle - name = "luxury shuttle ticket field" - density = FALSE //allows shuttle airlocks to close, nothing but an approved passenger gets past CanPass - locked = TRUE - use_power = FALSE - var/threshold = 500 - var/static/list/approved_passengers = list() - var/static/list/check_times = list() - var/list/payees = list() - -/obj/machinery/scanner_gate/luxury_shuttle/CanAllowThrough(atom/movable/mover, border_dir) - . = ..() - - if(mover in approved_passengers) - set_scanline("scanning", 10) - return TRUE - - if(!isliving(mover)) //No stowaways - return FALSE - -/obj/machinery/scanner_gate/luxury_shuttle/auto_scan(atom/movable/AM) - return - -/obj/machinery/scanner_gate/luxury_shuttle/attackby(obj/item/W, mob/user, params) - return - -/obj/machinery/scanner_gate/luxury_shuttle/emag_act(mob/user) - return - -#define LUXURY_MESSAGE_COOLDOWN 100 -/obj/machinery/scanner_gate/luxury_shuttle/Bumped(atom/movable/AM) - if(!isliving(AM)) - alarm_beep() - return ..() - - var/datum/bank_account/account - if(istype(AM.pulling, /obj/item/card/id)) - var/obj/item/card/id/I = AM.pulling - if(I.registered_account) - account = I.registered_account - else if(!check_times[AM] || check_times[AM] < world.time) //Let's not spam the message - to_chat(AM, "This ID card doesn't have an owner associated with it!") - check_times[AM] = world.time + LUXURY_MESSAGE_COOLDOWN - else if(ishuman(AM)) - var/mob/living/carbon/human/H = AM - if(H.get_bank_account()) - account = H.get_bank_account() - - if(account) - if(account.account_balance < threshold - payees[AM]) - account.adjust_money(-account.account_balance, "luxury_shuttle") - payees[AM] += account.account_balance - else - var/money_owed = threshold - payees[AM] - account.adjust_money(-money_owed) - payees[AM] += money_owed - - var/list/counted_money = list() - - for(var/obj/item/coin/C in AM.GetAllContents()) - if(payees[AM] >= threshold) - break - payees[AM] += C.value - counted_money += C - for(var/obj/item/spacecash/bundle/S in AM.GetAllContents()) - if(payees[AM] >= threshold) - break - payees[AM] += S.value - 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(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(payees[AM] < threshold && istype(AM.pulling, /obj/item/spacecash/bundle)) - var/obj/item/spacecash/bundle/S = AM.pulling - payees[AM] += S.value - 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(payees[AM] < threshold) - var/armless - if(!ishuman(AM) && !istype(AM, /mob/living/simple_animal/slime)) - armless = TRUE - else - var/mob/living/carbon/human/H = AM - if(!H.get_bodypart(BODY_ZONE_L_ARM) && !H.get_bodypart(BODY_ZONE_R_ARM)) - armless = TRUE - - if(armless) - if(!AM.pulling || !iscash(AM.pulling) && !istype(AM.pulling, /obj/item/card/id)) - if(!check_times[AM] || check_times[AM] < world.time) //Let's not spam the message - to_chat(AM, "Try pulling a valid ID, space cash, holochip or coin into \the [src]!") - check_times[AM] = world.time + LUXURY_MESSAGE_COOLDOWN - - if(payees[AM] >= threshold) - for(var/obj/I in counted_money) - qdel(I) - payees[AM] -= threshold - - var/change = FALSE - if(payees[AM] > 0) - change = TRUE - var/obj/item/holochip/HC = new /obj/item/holochip(AM.loc) - HC.credits = payees[AM] - HC.name = "[HC.credits] credit holochip" - if(istype(AM, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = AM - if(!H.put_in_hands(HC)) - AM.pulling = HC - else - AM.pulling = HC - payees[AM] -= payees[AM] - - say("Welcome to first class, [AM]![change ? " Here is your change." : ""]") - approved_passengers += AM - - check_times -= AM - return - else if (payees[AM] > 0) - for(var/obj/I in counted_money) - qdel(I) - if(!check_times[AM] || check_times[AM] < world.time) //Let's not spam the message - to_chat(AM, "[payees[AM]] cr received. You need [threshold-payees[AM]] cr more.") - check_times[AM] = world.time + LUXURY_MESSAGE_COOLDOWN - alarm_beep() - return ..() - else - alarm_beep() - return ..() - -/mob/living/simple_animal/hostile/bear/fightpit - name = "fight pit bear" - desc = "This bear's trained through ancient Solarian secrets to fear the walls of its glass prison." - environment_smash = ENVIRONMENT_SMASH_NONE - -/obj/effect/decal/hammerandsickle - name = "hammer and sickle" - desc = "Communism powerful force." - icon = 'icons/effects/96x96.dmi' - icon_state = "communist" - layer = ABOVE_OPEN_TURF_LAYER - pixel_x = -32 - pixel_y = -32 - -/obj/effect/decal/hammerandsickle/shuttleRotate(rotation) - setDir(angle2dir(rotation+dir2angle(dir))) // No parentcall, rest of the rotate code breaks the pixel offset. diff --git a/code/modules/shuttle/white_ship.dm b/code/modules/shuttle/white_ship.dm deleted file mode 100644 index 71afa1c9bc72f..0000000000000 --- a/code/modules/shuttle/white_ship.dm +++ /dev/null @@ -1,5 +0,0 @@ -/obj/effect/spawner/lootdrop/whiteship_cere_ripley - name = "25% mech 75% wreckage ripley spawner" - loot = list(/obj/mecha/working/ripley/mining = 1, - /obj/structure/mecha_wreckage/ripley = 5) - lootdoubles = FALSE diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index 4c97b3f7eaa2f..6d73fad566f6e 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -714,15 +714,13 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/machinery/vending/ui_data(mob/user) . = list() var/mob/living/carbon/human/H - var/obj/item/card/id/card + var/obj/item/card/bank/card if(ishuman(user)) H = user - card = H.get_idcard(TRUE) + card = H.get_bankcard() if(card) .["user"] = list() .["user"]["points"] = card.mining_points - .["user"]["name"] = card.registered_name - .["user"]["job"] = card.assignment || "No Job" if(card.registered_account) .["user"]["name"] = card.registered_account.account_holder .["user"]["cash"] = card.registered_account.account_balance @@ -769,7 +767,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C return if(!all_items_free && ishuman(usr)) var/mob/living/carbon/human/H = usr - var/obj/item/card/id/C = H.get_idcard(TRUE) + var/obj/item/card/bank/C = H.get_bankcard() if(!C) say("No card found.") @@ -946,10 +944,10 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/machinery/vending/custom/compartmentLoadAccessCheck(mob/user) . = FALSE var/mob/living/carbon/human/H - var/obj/item/card/id/C + var/obj/item/card/bank/C if(ishuman(user)) H = user - C = H.get_idcard(FALSE) + C = H.get_bankcard(FALSE) if(C?.registered_account && C.registered_account == private_a) return TRUE @@ -1003,7 +1001,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C vend_ready = FALSE if(ishuman(usr)) var/mob/living/carbon/human/H = usr - var/obj/item/card/id/C = H.get_idcard(TRUE) + var/obj/item/card/bank/C = H.get_bankcard() if(!C) say("No card found.") @@ -1055,10 +1053,10 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C /obj/machinery/vending/custom/attackby(obj/item/I, mob/user, params) if(!private_a) var/mob/living/carbon/human/H - var/obj/item/card/id/C + var/obj/item/card/bank/C if(ishuman(user)) H = user - C = H.get_idcard(TRUE) + C = H.get_bankcard(TRUE) if(C?.registered_account) private_a = C.registered_account say("\The [src] has been linked to [C].") diff --git a/shiptest.dme b/shiptest.dme index 1d6ce93fbf22d..b29930a658ee7 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -866,7 +866,7 @@ #include "code\game\machinery\aug_manipulator.dm" #include "code\game\machinery\autolathe.dm" #include "code\game\machinery\bank_machine.dm" -#include "code\game\machinery\Beacon.dm" +#include "code\game\machinery\beacon.dm" #include "code\game\machinery\bounty_board.dm" #include "code\game\machinery\buttons.dm" #include "code\game\machinery\cell_charger.dm" @@ -879,7 +879,7 @@ #include "code\game\machinery\dish_drive.dm" #include "code\game\machinery\dna_scanner.dm" #include "code\game\machinery\doppler_array.dm" -#include "code\game\machinery\droneDispenser.dm" +#include "code\game\machinery\drone_dispenser.dm" #include "code\game\machinery\exp_cloner.dm" #include "code\game\machinery\firealarm.dm" #include "code\game\machinery\flasher.dm" @@ -910,7 +910,7 @@ #include "code\game\machinery\scan_gate.dm" #include "code\game\machinery\sheetifier.dm" #include "code\game\machinery\shieldgen.dm" -#include "code\game\machinery\Sleeper.dm" +#include "code\game\machinery\sleeper.dm" #include "code\game\machinery\slotmachine.dm" #include "code\game\machinery\spaceheater.dm" #include "code\game\machinery\stasis.dm" @@ -1114,6 +1114,7 @@ #include "code\game\objects\items\AI_modules.dm" #include "code\game\objects\items\airlock_painter.dm" #include "code\game\objects\items\apc_frame.dm" +#include "code\game\objects\items\bank_card.dm" #include "code\game\objects\items\bell.dm" #include "code\game\objects\items\binoculars.dm" #include "code\game\objects\items\blueprints.dm" @@ -3277,9 +3278,7 @@ #include "code\modules\shuttle\ripple.dm" #include "code\modules\shuttle\shuttle.dm" #include "code\modules\shuttle\shuttle_rotate.dm" -#include "code\modules\shuttle\special.dm" #include "code\modules\shuttle\supply.dm" -#include "code\modules\shuttle\white_ship.dm" #include "code\modules\spells\spell.dm" #include "code\modules\spells\spell_types\aimed.dm" #include "code\modules\spells\spell_types\area_teleport.dm"