From 65f2c87326a7749b4063c90bfc3fcfe7b6ffa24d Mon Sep 17 00:00:00 2001 From: Mark Suckerberg <29362068+MarkSuckerberg@users.noreply.github.com> Date: Sun, 6 Feb 2022 00:50:15 -0600 Subject: [PATCH] Removes Metacoins/Antag Tokens, Minor Loadout Rework (#729) * fuck loadout code fuck metacoins please save me * whoops * whoops 2 * Pain --- SQL/database_changelog.txt | 20 +++- SQL/tgstation_schema.sql | 2 - SQL/tgstation_schema_prefixed.sql | 2 - .../__DEFINES/~whitesands_defines/metacoin.dm | 14 --- code/__HELPERS/roundend.dm | 18 ---- code/_globalvars/lists/flavor_misc.dm | 5 +- .../configuration/entries/game_options.dm | 4 + code/controllers/subsystem/mapping.dm | 2 +- code/modules/admin/admin.dm | 15 --- .../loadout/{loadout.dm => _loadout.dm} | 12 +-- .../client/loadout/loadout_accessories.dm | 7 -- .../modules/client/loadout/loadout_eyewear.dm | 3 - .../client/loadout/loadout_footwear.dm | 6 -- .../modules/client/loadout/loadout_general.dm | 42 -------- code/modules/client/loadout/loadout_hat.dm | 6 -- code/modules/client/loadout/loadout_ooc.dm | 20 ---- code/modules/client/loadout/loadout_suit.dm | 5 - .../modules/client/loadout/loadout_uniform.dm | 12 --- code/modules/client/preferences.dm | 74 ++++---------- code/modules/client/preferences_savefile.dm | 17 +--- code/modules/jobs/job_exp.dm | 2 - code/modules/jobs/job_types/_job.dm | 91 +++--------------- .../modules/mob/dead/new_player/new_player.dm | 6 +- code/modules/mob/mob.dm | 25 ----- config/game_options.txt | 6 +- shiptest.dme | 9 +- .../configuration/entries/general.dm | 3 - whitesands/code/datums/achievements/scores.dm | 21 ---- whitesands/code/modules/admin/topic.dm | 20 ---- .../admin/verbs/modify_antag_tokens.dm | 44 --------- .../code/modules/client/antag_tokens.dm | 37 ------- whitesands/code/modules/metacoin/metacoin.dm | 96 ------------------- 32 files changed, 65 insertions(+), 581 deletions(-) delete mode 100644 code/__DEFINES/~whitesands_defines/metacoin.dm rename code/modules/client/loadout/{loadout.dm => _loadout.dm} (87%) delete mode 100644 code/modules/client/loadout/loadout_ooc.dm delete mode 100644 whitesands/code/datums/achievements/scores.dm delete mode 100644 whitesands/code/modules/admin/topic.dm delete mode 100644 whitesands/code/modules/admin/verbs/modify_antag_tokens.dm delete mode 100644 whitesands/code/modules/client/antag_tokens.dm delete mode 100644 whitesands/code/modules/metacoin/metacoin.dm diff --git a/SQL/database_changelog.txt b/SQL/database_changelog.txt index 1095a1ebafa7..a2ea220fb8c3 100644 --- a/SQL/database_changelog.txt +++ b/SQL/database_changelog.txt @@ -1,15 +1,29 @@ Any time you make a change to the schema files, remember to increment the database schema version. Generally increment the minor number, major should be reserved for significant changes to the schema. Both values go up to 255. -The latest database version is 5.10; The query to update the schema revision table is: +The latest database version is 5.12; The query to update the schema revision table is: -INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 11); +INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 12); or -INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 11); +INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 12); In any query remember to add a prefix to the table names if you use one. ----------------------------------------------------- +Version 5.12, 27 January 2022, by MarkSuckerberg + +Removes Metacoin and Antag Token columns introduced in 5.7.2 + +START TRANSACTION; + +ALTER TABLE `player` + DROP COLUMN `antag_tokens`, + DROP COLUMN `metacoins`; + +COMMIT; + +----------------------------------------------------- + Version 5.11, 25 June 2021, by MarkSuckerberg Increases mapname max value size in the round table slightly to accomodate larger map names. diff --git a/SQL/tgstation_schema.sql b/SQL/tgstation_schema.sql index 7388c9d728bf..0361061734a9 100644 --- a/SQL/tgstation_schema.sql +++ b/SQL/tgstation_schema.sql @@ -322,8 +322,6 @@ CREATE TABLE `player` ( `lastadminrank` varchar(32) NOT NULL DEFAULT 'Player', `accountjoindate` DATE DEFAULT NULL, `flags` smallint(5) unsigned DEFAULT '0' NOT NULL, - `antag_tokens` tinyint(4) unsigned DEFAULT '0', - `metacoins` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`ckey`), KEY `idx_player_cid_ckey` (`computerid`,`ckey`), KEY `idx_player_ip_ckey` (`ip`,`ckey`) diff --git a/SQL/tgstation_schema_prefixed.sql b/SQL/tgstation_schema_prefixed.sql index 8fe5081741a7..9944ee3e44cf 100644 --- a/SQL/tgstation_schema_prefixed.sql +++ b/SQL/tgstation_schema_prefixed.sql @@ -322,8 +322,6 @@ CREATE TABLE `SS13_player` ( `lastadminrank` varchar(32) NOT NULL DEFAULT 'Player', `accountjoindate` DATE DEFAULT NULL, `flags` smallint(5) unsigned DEFAULT '0' NOT NULL, - `antag_tokens` tinyint(4) unsigned DEFAULT '0', - `metacoins` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`ckey`), KEY `idx_player_cid_ckey` (`computerid`,`ckey`), KEY `idx_player_ip_ckey` (`ip`,`ckey`) diff --git a/code/__DEFINES/~whitesands_defines/metacoin.dm b/code/__DEFINES/~whitesands_defines/metacoin.dm deleted file mode 100644 index 46348f96c139..000000000000 --- a/code/__DEFINES/~whitesands_defines/metacoin.dm +++ /dev/null @@ -1,14 +0,0 @@ -/// Rewarded when you complete all your objectives as a traitor -#define METACOIN_GREENTEXT_REWARD(is_speed_round, round_duration) is_speed_round ? 250 : max(min(round(500 * (round_duration / 72000)), 250), 750) -/// Rewarded when you earn a medal -#define METACOIN_MEDAL_REWARD(is_speed_round, round_duration) is_speed_round ? 150 : max(min(round(300 * (round_duration / 72000)), 150), 450) -/// Rewarded when you complete a crew objective -#define METACOIN_CO_REWARD(is_speed_round, round_duration) is_speed_round ? 50 : max(min(round(100 * (round_duration / 72000)), 50), 150) -/// Rewarded when you escape on the shuttle -#define METACOIN_ESCAPE_REWARD(is_speed_round, round_duration) is_speed_round ? 100 : max(min(round(200 * (round_duration / 72000)), 100), 50) -/// Rewarded when you survive the round -#define METACOIN_SURVIVE_REWARD(is_speed_round, round_duration) is_speed_round ? 50 : max(min(round(100 * (round_duration / 72000)), 50), 150) -/// Rewarded when you don't survive the round, but stick around till the end -#define METACOIN_NOTSURVIVE_REWARD 25 -/// Rewarded when you are alive and active for 10 minutes -#define METACOIN_TENMINUTELIVING_REWARD 15 diff --git a/code/__HELPERS/roundend.dm b/code/__HELPERS/roundend.dm index 1832189d9430..d9397660e4bd 100644 --- a/code/__HELPERS/roundend.dm +++ b/code/__HELPERS/roundend.dm @@ -94,8 +94,6 @@ var/team_gid = 1 var/list/team_ids = list() - var/list/greentexters = list()//WS Edit - Metacoin - for(var/datum/antagonist/A in GLOB.antagonists) if(!A.owner) continue @@ -115,28 +113,13 @@ team_ids[T] = team_gid++ antag_info["team"]["id"] = team_ids[T] - var/greentexted = TRUE - if(A.objectives.len) for(var/datum/objective/O in A.objectives) var/result = O.check_completion() ? "SUCCESS" : "FAIL" - if (result == "FAIL") - greentexted = FALSE - antag_info["objectives"] += list(list("objective_type"=O.type,"text"=O.explanation_text,"result"=result)) SSblackbox.record_feedback("associative", "antagonists", 1, antag_info) - if (greentexted) - if (A.owner && A.owner.key) - if (A.type != /datum/antagonist/custom) - var/client/C = GLOB.directory[ckey(A.owner.key)] - if (C) - greentexters |= C - - for (var/client/C in greentexters) - C.process_greentext(world.time - SSticker.round_start_time <= 300 SECONDS, world.time - SSticker.round_start_time) - /datum/controller/subsystem/ticker/proc/record_nuke_disk_location() var/obj/item/disk/nuclear/N = locate() in GLOB.poi_list if(N) @@ -202,7 +185,6 @@ for(var/client/C in GLOB.clients) C.playtitlemusic(40) - C.process_endround_metacoin(speed_round, world.time - SSticker.round_start_time) if(speed_round) C.give_award(/datum/award/achievement/misc/speed_round, C.mob) diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index 06a8e052f311..b24f342e20af 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -170,11 +170,10 @@ GLOBAL_LIST_INIT(backpacklist, list(DBACKPACK, DSATCHEL, DCOURIERBAG, DDUFFELBAG #define PREF_SKIRT "Standard Jumpskirt" #define PREF_ALTSUIT "Alternate Jumpsuit" #define PREF_GREYSUIT "Grey Jumpsuit" -#define PREF_LOADOUT "Loadout uniform" -GLOBAL_LIST_INIT(jumpsuitlist, list(PREF_SUIT, PREF_SKIRT, PREF_ALTSUIT, PREF_GREYSUIT, PREF_LOADOUT)) +GLOBAL_LIST_INIT(jumpsuitlist, list(PREF_SUIT, PREF_SKIRT, PREF_ALTSUIT, PREF_GREYSUIT)) //Exowear -#define PREF_NOEXOWEAR "No Exowear/Loadout Exowear" +#define PREF_NOEXOWEAR "No Exowear" #define PREF_EXOWEAR "Standard Exowear" #define PREF_ALTEXOWEAR "Alternate Exowear" #define PREF_COATEXOWEAR "Departmental Winter Coat" diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index ce4a0936badb..4eee01f6b225 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -157,6 +157,10 @@ /datum/config_entry/flag/join_with_mutant_humans //players can pick mutant bodyparts for humans before joining the game +/datum/config_entry/number/max_loadout_items //maximum number of items that can be in a player's loadout + config_entry_value = 10 + min_val = 0 + /datum/config_entry/flag/no_summon_guns //No /datum/config_entry/flag/no_summon_magic //Fun diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index 2455af6c886f..6e25c2055549 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -225,7 +225,7 @@ SUBSYSTEM_DEF(mapping) S.job_slots[job_slot] = slots if(isnum(data["cost"])) S.cost = data["cost"] - ship_purchase_list["[S.name] ([S.cost] [CONFIG_GET(string/metacurrency_name)]s)"] = S + ship_purchase_list[S.name] = S if(isnum(data["limit"])) S.limit = data["limit"] shuttle_templates[S.file_name] = S diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index fa6169bac839..bfd855243eb4 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -66,21 +66,6 @@ body += "- " body += "= " body += "0" - //WS Begin - Metacoins - var/metabalance = M.client.get_metabalance() - body += "

[CONFIG_GET(string/metacurrency_name)]s: [metabalance] " - body += "
+ " - body += "- " - body += "= " - body += "0" - //Antag Tokens - var/antag_tokens = M.client.get_antag_token_count() - body += "

Antag Tokens: [antag_tokens]" - body += "
+ " - body += "- " - body += "= " - body += "0" - //WS End var/full_version = "Unknown" if(M.client.byond_version) full_version = "[M.client.byond_version].[M.client.byond_build ? M.client.byond_build : "xxx"]" diff --git a/code/modules/client/loadout/loadout.dm b/code/modules/client/loadout/_loadout.dm similarity index 87% rename from code/modules/client/loadout/loadout.dm rename to code/modules/client/loadout/_loadout.dm index 77774c3b7e9a..a0e5d6cab3c3 100644 --- a/code/modules/client/loadout/loadout.dm +++ b/code/modules/client/loadout/_loadout.dm @@ -23,9 +23,6 @@ GLOBAL_LIST_EMPTY(gear_datums) if(!use_name) WARNING("Loadout - Missing display name: [G]") continue - if(!initial(G.cost)) - WARNING("Loadout - Missing cost: [G]") - continue if(!initial(G.path) && use_category != "OOC") //OOC category does not contain actual items WARNING("Loadout - Missing path definition: [G]") continue @@ -49,8 +46,6 @@ GLOBAL_LIST_EMPTY(gear_datums) var/description ///Path to item. var/path - ///Number of metacoins - var/cost = 0 ///Slot to equip to. var/slot ///Roles that can spawn with this item. @@ -84,11 +79,10 @@ GLOBAL_LIST_EMPTY(gear_datums) path = npath location = nlocation -/datum/gear/proc/spawn_item(location, metadata, owner) +/datum/gear/proc/spawn_item(location, mob/owner) var/datum/gear_data/gd - if(ishuman(owner) && role_replacements) //If the owner is a human (should be one) and the item in question has a role replacement - var/mob/living/carbon/human/H = owner - var/job = H.job || H.mind?.assigned_role + if(role_replacements) //If the owner is a human (should be one) and the item in question has a role replacement + var/job = owner.job || owner.mind?.assigned_role if(job in role_replacements) //If the job has an applicable replacement gd = new(role_replacements[job], location) return new gd.path(gd.location) diff --git a/code/modules/client/loadout/loadout_accessories.dm b/code/modules/client/loadout/loadout_accessories.dm index bbac0d931bc6..4b1666962942 100644 --- a/code/modules/client/loadout/loadout_accessories.dm +++ b/code/modules/client/loadout/loadout_accessories.dm @@ -7,7 +7,6 @@ /datum/gear/accessory/scarf subtype_path = /datum/gear/accessory/scarf - cost = 500 /datum/gear/accessory/scarf/red display_name = "scarf, red" @@ -25,7 +24,6 @@ /datum/gear/accessory/scarf/striped subtype_path = /datum/gear/accessory/scarf/striped - cost = 750 /datum/gear/accessory/scarf/striped/red display_name = "striped scarf, red" @@ -43,7 +41,6 @@ /datum/gear/accessory/tie subtype_path = /datum/gear/accessory/tie - cost = 500 /datum/gear/accessory/tie/recolorable display_name = "tie, recolorable" @@ -55,22 +52,18 @@ display_name = "armband" path = /obj/item/clothing/accessory/armband slot = null - cost = 750 /datum/gear/accessory/stethoscope display_name = "stethoscope" path = /obj/item/clothing/neck/stethoscope allowed_roles = list("Medical Doctor", "Chief Medical Officer") - cost = 750 /datum/gear/accessory/collar display_name = "pet collar" description = "Only the truly insane would wear this around their neck." path = /obj/item/clothing/neck/petcollar - cost = 5000 /datum/gear/accessory/gloves/evening display_name = "evening gloves" description = "Excessively fancy elbow-length gloves." path = /obj/item/clothing/gloves/color/evening - cost = 750 diff --git a/code/modules/client/loadout/loadout_eyewear.dm b/code/modules/client/loadout/loadout_eyewear.dm index 0e5dc64e7231..abee37d75ebe 100644 --- a/code/modules/client/loadout/loadout_eyewear.dm +++ b/code/modules/client/loadout/loadout_eyewear.dm @@ -2,7 +2,6 @@ subtype_path = /datum/gear/eyewear slot = ITEM_SLOT_EYES sort_category = "Eyewear" - cost = 500 //Prescription glasses /datum/gear/eyewear/glasses @@ -33,12 +32,10 @@ /datum/gear/eyewear/blindfold display_name = "blindfold" path = /obj/item/clothing/glasses/blindfold - cost = 750 /datum/gear/eyewear/hipster_glasses display_name = "Hipster Glasses" path = /obj/item/clothing/glasses/regular/hipster - cost = 1250 /datum/gear/eyewear/glasses/cold display_name = "cold goggles" diff --git a/code/modules/client/loadout/loadout_footwear.dm b/code/modules/client/loadout/loadout_footwear.dm index 8b1c37fd2894..caaa98a05489 100644 --- a/code/modules/client/loadout/loadout_footwear.dm +++ b/code/modules/client/loadout/loadout_footwear.dm @@ -2,7 +2,6 @@ subtype_path = /datum/gear/footwear slot = ITEM_SLOT_FEET sort_category = "Footwear" - cost = 1000 //pretty much everything else @@ -17,27 +16,22 @@ /datum/gear/footwear/winterboots display_name = "winter boots" path = /obj/item/clothing/shoes/winterboots - cost = 4000 /datum/gear/footwear/jackboots display_name = "jackboots" path = /obj/item/clothing/shoes/jackboots - cost = 4000 /datum/gear/footwear/miningboots display_name = "mining boots" path = /obj/item/clothing/shoes/workboots/mining - cost = 4000 /datum/gear/footwear/workboots display_name = "work boots" path = /obj/item/clothing/shoes/workboots/mining - cost = 4000 //Sneakers /datum/gear/footwear/color subtype_path = /datum/gear/footwear/color - cost = 500 /datum/gear/footwear/color/black display_name = "black shoes" diff --git a/code/modules/client/loadout/loadout_general.dm b/code/modules/client/loadout/loadout_general.dm index 3db42c291bed..adbf6f24ea8f 100644 --- a/code/modules/client/loadout/loadout_general.dm +++ b/code/modules/client/loadout/loadout_general.dm @@ -1,154 +1,119 @@ /datum/gear/dice display_name = "d20" path = /obj/item/dice/d20 - cost = 300 /datum/gear/briefcase display_name = "briefcase" path = /obj/item/storage/briefcase - cost = 300 /datum/gear/lipstick display_name = "lipstick, black" path = /obj/item/lipstick/black - cost = 700 /datum/gear/lipstick/red display_name = "lipstick, red" path = /obj/item/lipstick - cost = 700 /datum/gear/balaclava display_name = "balaclava" path = /obj/item/clothing/mask/balaclava - cost = 700 /datum/gear/vape display_name = "vape" path = /obj/item/clothing/mask/vape - cost = 700 /datum/gear/bandana display_name = "bandana, red" path = /obj/item/clothing/mask/bandana/red - cost = 500 /datum/gear/bible display_name = "bible" path = /obj/item/storage/book/bible - cost = 750 /datum/gear/flask display_name = "flask" path = /obj/item/reagent_containers/food/drinks/flask - cost = 750 /datum/gear/mug display_name = "coffee mug" path = /obj/item/reagent_containers/food/drinks/britcup - cost = 500 /datum/gear/lighter display_name = "cheap lighter" path = /obj/item/lighter/greyscale - cost = 300 /datum/gear/zippo display_name = "zippo" path = /obj/item/lighter - cost = 500 /datum/gear/clockworkzippo display_name = "Clockwork Zippo" path = /obj/item/lighter/clockwork - cost = 750 /datum/gear/cards display_name = "toy, deck of cards" path = /obj/item/toy/cards/deck - cost = 500 /datum/gear/eightball display_name = "toy, magic eight ball" path = /obj/item/toy/eightball - cost = 750 - -/datum/gear/box - display_name = "box" - path = /obj/item/storage/box - description = "It never hurts to carry an extra box." - cost = 500 /datum/gear/wallet display_name = "wallet" path = /obj/item/storage/wallet - cost = 750 /datum/gear/pai display_name = "personal AI device" path = /obj/item/paicard - cost = 1000 /datum/gear/tablet display_name = "tablet computer" path = /obj/item/modular_computer/tablet - cost = 1500 /datum/gear/pen display_name = "pen, black" path = /obj/item/pen - cost = 250 /datum/gear/colorpen display_name = "pen, four-color" path = /obj/item/pen/fourcolor - cost = 500 /datum/gear/paperbin display_name = "paper bin" path = /obj/item/paper_bin - cost = 500 /datum/gear/cane display_name = "cane" path = /obj/item/cane - cost = 500 /datum/gear/radio display_name = "hand radio" path = /obj/item/radio - cost = 500 /datum/gear/lizard display_name = "toy, lizard plushie" path = /obj/item/toy/plush/lizardplushie - cost = 1500 /datum/gear/moth display_name = "toy, moth plushie" path = /obj/item/toy/plush/moth - cost = 1500 /datum/gear/hornet display_name = "toy, marketable hornet plushie" path = /obj/item/toy/plush/hornet - cost = 2000 /datum/gear/gayhornet display_name = "toy, gay hornet plushie" path = /obj/item/toy/plush/hornet/gay description = "Hornet says lesbian rights." - cost = 6969 /datum/gear/knight display_name = "toy, marketable knight plushie" path = /obj/item/toy/plush/knight - cost = 2000 //imagine not being able to afford the marketable plushes // Shiptest edit /datum/gear/amongus display_name = "toy, suspicious pill plushie" path = /obj/item/toy/plush/among - cost = 1000 /datum/gear/amongus/New() . = ..() @@ -159,36 +124,29 @@ /datum/gear/hairspray display_name = "hair dye" path = /obj/item/dyespray - cost = 700 /datum/gear/tablebell display_name = "table bell, brass" path = /obj/item/table_bell/brass - cost = 100000 //yes // End Shiptest /datum/gear/flashlight display_name = "tool, flashlight" path = /obj/item/flashlight - cost = 500 /datum/gear/crowbar display_name = "tool, emergency crowbar" path = /obj/item/crowbar/red - cost = 500 /datum/gear/balloon display_name = "toy, balloon" path = /obj/item/toy/balloon - cost = 500 /datum/gear/balloon/ian display_name = "toy, ian balloon" path = /obj/item/toy/balloon/corgi - cost = 2500 /datum/gear/surgical_mask display_name = "surgical mask" path = /obj/item/clothing/mask/surgical - cost = 1200 diff --git a/code/modules/client/loadout/loadout_hat.dm b/code/modules/client/loadout/loadout_hat.dm index cca0855066bd..9fbb40fb58ea 100644 --- a/code/modules/client/loadout/loadout_hat.dm +++ b/code/modules/client/loadout/loadout_hat.dm @@ -3,7 +3,6 @@ slot = ITEM_SLOT_HEAD sort_category = "Headwear" species_blacklist = list("plasmaman") //Their helmet takes up the head slot - cost = 1000 //Hardhats @@ -11,7 +10,6 @@ display_name = "hardhat, yellow" path = /obj/item/clothing/head/hardhat allowed_roles = list("Chief Engineer", "Engineer", "Atmospheric Technician") - cost = 900 /datum/gear/hat/hhat_orange display_name = "hardhat, orange" @@ -28,7 +26,6 @@ /datum/gear/hat/beret display_name = "beret, red" path = /obj/item/clothing/head/beret - cost = 2000 /datum/gear/hat/beret/departmental display_name = "beret, departmental" @@ -106,17 +103,14 @@ /datum/gear/hat/cowboy display_name = "cowboy hat" path = /obj/item/clothing/head/cowboy - cost = 1500 /datum/gear/hat/catears display_name = "cat ears" path = /obj/item/clothing/head/kitty - cost = 5000 /datum/gear/hat/horse display_name = "horse mask" path = /obj/item/clothing/mask/horsehead - cost = 5000 /datum/gear/hat/piratehat display_name = "pirate hat" diff --git a/code/modules/client/loadout/loadout_ooc.dm b/code/modules/client/loadout/loadout_ooc.dm deleted file mode 100644 index ed329c9170b2..000000000000 --- a/code/modules/client/loadout/loadout_ooc.dm +++ /dev/null @@ -1,20 +0,0 @@ -/datum/gear/ooc - subtype_path = /datum/gear/ooc - sort_category = "OOC" - -/datum/gear/ooc/char_slot - display_name = "extra character slot" - description = "An extra charslot. Pretty self-explanatory." - cost = 7500 - -/datum/gear/ooc/char_slot/purchase(var/client/C) - C?.prefs?.max_save_slots += 1 - -/datum/gear/ooc/custom_color - display_name = "custom ooc color" - sort_category = "OOC" - description = "If you can buy this, you deserve it." - cost = 25000 - -/datum/gear/ooc/custom_color/purchase(var/client/C) - C?.prefs?.custom_ooc = TRUE diff --git a/code/modules/client/loadout/loadout_suit.dm b/code/modules/client/loadout/loadout_suit.dm index e86026e70c06..f06c21b8d0f6 100644 --- a/code/modules/client/loadout/loadout_suit.dm +++ b/code/modules/client/loadout/loadout_suit.dm @@ -6,7 +6,6 @@ //WINTER COATS /datum/gear/suit/coat subtype_path = /datum/gear/suit/coat - cost = 2000 /datum/gear/suit/coat/plain display_name = "winter coat" @@ -15,7 +14,6 @@ //JACKETS /datum/gear/suit/jacket subtype_path = /datum/gear/suit/jacket - cost = 1000 /datum/gear/suit/jacket/bomber display_name = "bomber jacket" @@ -71,16 +69,13 @@ /datum/gear/suit/grponcho display_name = "poncho, green" path = /obj/item/clothing/suit/poncho/green - cost = 750 /datum/gear/suit/overalls display_name = "overalls" path = /obj/item/clothing/suit/apron/overalls - cost = 750 /datum/gear/suit/raincoat display_name = "Cybersun labcoat" description = "Designer lab safety equipment. You're pretty sure this is just a raincoat." path = /obj/item/clothing/suit/toggle/labcoat/raincoat - cost = 1000 diff --git a/code/modules/client/loadout/loadout_uniform.dm b/code/modules/client/loadout/loadout_uniform.dm index 99d1fa8ec024..fb8b74293b89 100644 --- a/code/modules/client/loadout/loadout_uniform.dm +++ b/code/modules/client/loadout/loadout_uniform.dm @@ -10,19 +10,16 @@ display_name = "jumpsuit, utility" path = /obj/item/clothing/under/utility description = "A cheaply manufactured jumpsuit made out of cheap materials designed for use by cheap labor." - cost = 1 /datum/gear/uniform/utility_skirt display_name = "jumpskirt, utility" path = /obj/item/clothing/under/utility/skirt description = "Does it being a skirt defeat the purpose of use in a hazardous work environment?" - cost = 1 //Colored jumpsuits /datum/gear/uniform/color subtype_path = /datum/gear/uniform/color - cost = 1000 /datum/gear/uniform/color/red display_name = "jumpsuit, red" @@ -55,30 +52,25 @@ /datum/gear/uniform/color/random display_name = "jumpsuit, random" path = /obj/item/clothing/under/color/random //literally useless if grey assistants is off - cost = 2500 /datum/gear/uniform/color/rainbow display_name = "jumpsuit, rainbow" path = /obj/item/clothing/under/color/rainbow - cost = 5000 //Shorts /datum/gear/uniform/athshortsred display_name = "athletic shorts, red" path = /obj/item/clothing/under/shorts/red - cost = 1000 /datum/gear/uniform/athshortsblack display_name = "athletic shorts, black" path = /obj/item/clothing/under/shorts/black - cost = 1000 //JUMPSUIT "SUITS" /datum/gear/uniform/suit subtype_path = /datum/gear/uniform/suit - cost = 1000 /datum/gear/uniform/suit/amish display_name = "suit, amish" @@ -115,7 +107,6 @@ /datum/gear/uniform/suit/galaxy display_name = "suit, galaxy" path = /obj/item/clothing/under/rank/civilian/lawyer/galaxy - cost = 7500 /datum/gear/uniform/suit/white/skirt display_name = "suitskirt, white shirt" @@ -129,14 +120,11 @@ /datum/gear/uniform/tacticool display_name = "tacticool turtleneck" path = /obj/item/clothing/under/syndicate/tacticool - cost = 10000 /datum/gear/uniform/psychedelic display_name = "psychedelic suit" path = /obj/item/clothing/under/misc/psyche - cost = 10000 /datum/gear/uniform/maid display_name = "maid outfit" path = /obj/item/clothing/under/costume/maid - cost = 10000 diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 083f279c50b9..ace97f02901f 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -131,9 +131,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/list/exp = list() var/list/menuoptions - ///Gear the CLIENT has purchased - var/list/purchased_gear = list() - ///Gear the CHARACTER has equipped + ///Gear the character has equipped var/list/equipped_gear = list() ///Gear tab currently being viewed var/gear_tab = "General" @@ -157,10 +155,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) max_save_slots = 15 var/loaded_preferences_successfully = load_preferences() if(loaded_preferences_successfully) - if("extra character slot" in purchased_gear) - max_save_slots += 1 - if("custom ooc color" in purchased_gear) - custom_ooc = TRUE if(load_character()) species_looking_at = pref_species.id return @@ -729,8 +723,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "" dat += "
" var/list/type_blacklist = list() - if(equipped_gear && equipped_gear.len) - for(var/i = 1, i <= equipped_gear.len, i++) + if(equipped_gear && length(equipped_gear)) + for(var/i = 1, i <= length(equipped_gear), i++) var/datum/gear/G = GLOB.gear_datums[equipped_gear[i]] if(G) if(G.subtype_path in type_blacklist) @@ -739,10 +733,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) else equipped_gear.Cut(i,i+1) - var/fcolor = "#3366CC" - var/metabalance = user.client.get_metabalance() dat += "" - dat += "" + dat += "" dat += "" var/datum/loadout_category/LC = GLOB.loadout_categories[gear_tab] - dat += "" - dat += "" - dat += "" + dat += "" + dat += "" + dat += "" - dat += "" + dat += "" dat += "" - dat += "" dat += "" - dat += "" - dat += "" + dat += "" + dat += "" for(var/gear_name in LC.gear) var/datum/gear/G = LC.gear[gear_name] - var/ticked = (G.display_name in equipped_gear) - - dat += "" - else - dat += "Equip" - else - dat += "Purchase" - dat += "
Current balance: [metabalance] [CONFIG_GET(string/metacurrency_name)]s. \[Clear Loadout\] | \[Toggle Loadout\]
Current loadout usage: [length(equipped_gear)]/[CONFIG_GET(number/max_loadout_items)] \[Clear Loadout\] | \[Toggle Loadout\]
" var/firstcat = 1 @@ -758,29 +750,18 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "

[LC.category]


[LC.category]



NameCostRestricted JobsDescription

Description

[G.display_name]\n" - if(G.display_name in purchased_gear) - if(G.sort_category == "OOC") - dat += "Purchased.[G.cost]" + dat += "
[G.display_name]" if(G.allowed_roles) dat += "" var/list/allowedroles = list() @@ -811,8 +792,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "PDA Color:     Change
" dat += "PDA Style: [pda_style]
" dat += "
" - dat += "Crew Objectives: [(crew_objectives) ? "Yes" : "No"]
" - dat += "
" dat += "Ghost Ears: [(chat_toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
" dat += "Ghost Radio: [(chat_toggles & CHAT_GHOSTRADIO) ? "All Messages":"No Messages"]
" dat += "Ghost Sight: [(chat_toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]
" @@ -1462,20 +1441,14 @@ GLOBAL_LIST_EMPTY(preferences_datums) return TRUE if(href_list["preference"] == "gear") - if(href_list["purchase_gear"]) - var/datum/gear/TG = GLOB.gear_datums[href_list["purchase_gear"]] - if(TG.cost < user.client.get_metabalance()) - purchased_gear += TG.display_name - TG.purchase(user.client) - user.client.inc_metabalance((TG.cost * -1), TRUE, "Purchased [TG.display_name].") - save_preferences() - else - to_chat(user, "You don't have enough [CONFIG_GET(string/metacurrency_name)]s to purchase \the [TG.display_name]!") if(href_list["toggle_gear"]) var/datum/gear/TG = GLOB.gear_datums[href_list["toggle_gear"]] if(TG.display_name in equipped_gear) equipped_gear -= TG.display_name else + if(length(equipped_gear) >= CONFIG_GET(number/max_loadout_items)) + alert(user, "You can't have more than [CONFIG_GET(number/max_loadout_items)] items in your loadout!") + return var/list/type_blacklist = list() var/list/slot_blacklist = list() for(var/gear_name in equipped_gear) @@ -1484,13 +1457,10 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(G.subtype_path in type_blacklist) continue type_blacklist += G.subtype_path - if((TG.display_name in purchased_gear)) - if(!(TG.subtype_path in type_blacklist) || !(TG.slot in slot_blacklist)) - equipped_gear += TG.display_name - else - to_chat(user, "Can't equip [TG.display_name]. It conflicts with an already-equipped item.") + if(!(TG.subtype_path in type_blacklist) || !(TG.slot in slot_blacklist)) + equipped_gear += TG.display_name else - log_href("[user] attempted a HREF exploit!") + alert(user, "Can't equip [TG.display_name]. It conflicts with an already-equipped item.") save_preferences() else if(href_list["select_category"]) @@ -2065,8 +2035,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) tgui_lock = !tgui_lock if("winflash") windowflashing = !windowflashing - if("crewobj") - crew_objectives = !crew_objectives //here lies the badmins if("hear_adminhelps") @@ -2278,11 +2246,11 @@ GLOBAL_LIST_EMPTY(preferences_datums) character.flavor_text = features["flavor_text"] //Let's update their flavor_text at least initially - if(loadout) //I have been told not to do this because it's too taxing on performance, but hey, I did it anyways! - for(var/gear in usr.client.prefs.equipped_gear) + if(loadout) //I have been told not to do this because it's too taxing on performance, but hey, I did it anyways! //I hate you old me + for(var/gear in equipped_gear) var/datum/gear/G = GLOB.gear_datums[gear] - if(G && G.slot) - if(!character.equip_to_slot_or_del(G.spawn_item(character, owner = character), G.slot)) + if(G?.slot) + if(!character.equip_to_slot_or_del(G.spawn_item(character, character), G.slot)) continue var/datum/species/chosen_species diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 8567ef46459c..1f66d251f44f 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -69,9 +69,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car if(key_bindings["ShiftQ"] == "quick_equip_suit_storage") key_bindings["ShiftQ"] = list("quick_equip_suit_storage") - if(current_version < 36.5) - READ_FILE(S["equipped_gear"], equipped_gear) - if(current_version < 37) if(clientfps == 0) clientfps = -1 @@ -203,8 +200,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car check_keybindings() //WS Begin - Custom Prefs - READ_FILE(S["purchased_gear"], purchased_gear) - READ_FILE(S["crew_objectives"], crew_objectives) READ_FILE(S["show_credits"], show_credits) //WS End @@ -248,11 +243,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car ghost_others = sanitize_inlist(ghost_others, GLOB.ghost_others_options, GHOST_OTHERS_DEFAULT_OPTION) menuoptions = SANITIZE_LIST(menuoptions) be_special = SANITIZE_LIST(be_special) - crew_objectives = sanitize_integer(crew_objectives, 0, 1, initial(crew_objectives)) show_credits = sanitize_integer(show_credits, 0, 1, initial(show_credits)) pda_style = sanitize_inlist(pda_style, GLOB.pda_styles, initial(pda_style)) pda_color = sanitize_hexcolor(pda_color, 6, 1, initial(pda_color)) key_bindings = sanitize_keybindings(key_bindings) + equipped_gear = SANITIZE_LIST(equipped_gear) if(needs_update >= 0) //save the updated version var/old_default_slot = default_slot @@ -272,9 +267,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car max_save_slots = old_max_save_slots save_preferences() - if(!purchased_gear) - purchased_gear = list() - return TRUE /datum/preferences/proc/save_preferences() @@ -305,7 +297,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["buttons_locked"], buttons_locked) WRITE_FILE(S["windowflash"], windowflashing) WRITE_FILE(S["be_special"], be_special) - WRITE_FILE(S["crew_objectives"], crew_objectives) WRITE_FILE(S["default_slot"], default_slot) WRITE_FILE(S["toggles"], toggles) WRITE_FILE(S["chat_toggles"], chat_toggles) @@ -329,7 +320,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["tip_delay"], tip_delay) WRITE_FILE(S["pda_style"], pda_style) WRITE_FILE(S["pda_color"], pda_color) - WRITE_FILE(S["purchased_gear"], purchased_gear) WRITE_FILE(S["show_credits"], show_credits) WRITE_FILE(S["key_bindings"], key_bindings) return TRUE @@ -394,8 +384,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car READ_FILE(S["feature_moth_wings"], features["moth_wings"]) READ_FILE(S["feature_moth_markings"], features["moth_markings"]) - //WS Begin - READ_FILE(S["equipped_gear"], equipped_gear) READ_FILE(S["jumpsuit_style"], jumpsuit_style) READ_FILE(S["exowear"], exowear) @@ -418,9 +406,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car if(!((alt_titles_preferences[job.title] in job.alt_titles) || (alt_titles_preferences[job.title] == job.senior_title))) alt_titles_preferences.Remove(job.title) - if(!equipped_gear) - equipped_gear = list() - //WS End if(!CONFIG_GET(flag/join_with_mutant_humans)) diff --git a/code/modules/jobs/job_exp.dm b/code/modules/jobs/job_exp.dm index 81e5b9c2f54b..fdd52edc12b1 100644 --- a/code/modules/jobs/job_exp.dm +++ b/code/modules/jobs/job_exp.dm @@ -150,8 +150,6 @@ GLOBAL_PROTECT(exp_to_update) var/rolefound = FALSE play_records[EXP_TYPE_LIVING] += minutes - process_ten_minute_living() - if(announce_changes) to_chat(src,"You got: [minutes] Living EXP!") if(mob.mind.assigned_role) diff --git a/code/modules/jobs/job_types/_job.dm b/code/modules/jobs/job_types/_job.dm index 7cb59b102c11..185b0d621718 100644 --- a/code/modules/jobs/job_types/_job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -83,73 +83,19 @@ for(var/i in roundstart_experience) experiencer.mind.adjust_experience(i, roundstart_experience[i], TRUE) - - if(!ishuman(H)) + if(!iscarbon(H)) return - var/mob/living/carbon/human/human = H - var/list/gear_leftovers - if(M.client && (M.client.prefs.equipped_gear && M.client.prefs.equipped_gear.len)) + var/mob/living/carbon/spawnee = H + if(M.client && (M.client.prefs.equipped_gear && length(M.client.prefs.equipped_gear))) + var/obj/item/storage/box/loadout_dumper = new() for(var/gear in M.client.prefs.equipped_gear) - var/datum/gear/G = GLOB.gear_datums[gear] - if(G) - var/permitted = FALSE - - if(G.allowed_roles && H.mind && (H.mind.assigned_role in G.allowed_roles)) - permitted = TRUE - else if(!G.allowed_roles) - permitted = TRUE - else - permitted = FALSE - - if(G.species_blacklist && (human.dna.species.id in G.species_blacklist)) - permitted = FALSE - - if(G.species_whitelist && !(human.dna.species.id in G.species_whitelist)) - permitted = FALSE - - if(!permitted) - to_chat(M, "Your current species or role does not permit you to spawn with [gear]!") - continue - //WS Edit - Fix Loadout Uniforms not spawning ID/PDA - if(G.slot == ITEM_SLOT_ICLOTHING) - continue // Handled in pre_equip - //EndWS Edit - Fix Loadout Uniforms not spawning ID/PDA - if(G.slot) - if(!H.equip_to_slot_or_del(G.spawn_item(H, owner = H), G.slot)) - LAZYADD(gear_leftovers, G) - else - LAZYADD(gear_leftovers, G) - else - M.client.prefs.equipped_gear -= gear - - if(gear_leftovers?.len) - for(var/datum/gear/G in gear_leftovers) - var/metadata = M.client.prefs.equipped_gear[G.display_name] - var/item = G.spawn_item(null, metadata, owner = H) - var/atom/placed_in = human.equip_or_collect(item) - - if(istype(placed_in)) - if(isturf(placed_in)) - to_chat(M, "Placing [G.display_name] on [placed_in]!") - else - to_chat(M, "Placing [G.display_name] in [placed_in.name]]") - continue - - if(H.equip_to_appropriate_slot(item)) - to_chat(M, "Placing [G.display_name] in your inventory!") - continue - if(H.put_in_hands(item)) - to_chat(M, "Placing [G.display_name] in your hands!") - continue - - var/obj/item/storage/B = (locate() in H) - if(B) - G.spawn_item(B, metadata, owner = H) - to_chat(M, "Placing [G.display_name] in [B.name]!") - continue - - to_chat(M, "Failed to locate a storage object on your mob, either you spawned with no hands free and no backpack or this is a bug.") - qdel(item) + var/datum/gear/new_gear = GLOB.gear_datums[gear] + new_gear.spawn_item(loadout_dumper, spawnee) + var/datum/component/storage/back_storage = spawnee.back.GetComponent(/datum/component/storage) + if(back_storage) + back_storage.handle_item_insertion(loadout_dumper, TRUE) + else if(!spawnee.put_in_hands(loadout_dumper, TRUE)) + to_chat("Unable to place loadout box.") /datum/job/proc/announce(mob/living/carbon/human/H) if(head_announce) @@ -365,21 +311,6 @@ holder = "[alt_uniform]" if(PREF_GREYSUIT) holder = "/obj/item/clothing/under/color/grey" - //WS Edit - Fix Loadout Uniforms not spawning ID/PDA - if(PREF_LOADOUT) - if (preference_source == null) - holder = "[uniform]" // Who are we getting the loadout pref from anyways? - else - var/datum/pref_loadout_uniform = null - for(var/gear in preference_source.prefs.equipped_gear) - var/datum/gear/G = GLOB.gear_datums[gear] - if (G.slot == ITEM_SLOT_ICLOTHING) - pref_loadout_uniform = G.path - if (pref_loadout_uniform == null) - holder = "[uniform]" - else - uniform = pref_loadout_uniform - // EndWS Edit - Fix Loadout Uniforms not spawning ID/PDA else holder = "[uniform]" diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index ab61e0a819ee..3af4f3209259 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -351,9 +351,6 @@ var/datum/map_template/shuttle/template = SSmapping.ship_purchase_list[tgui_input_list(src, "Please select ship to purchase!", "Welcome, [client.prefs.real_name].", SSmapping.ship_purchase_list)] if(!template) return LateChoices() - if(SSdbcore.IsConnected() && usr.client.get_metabalance() < template.cost) - alert(src, "You have insufficient metabalance to cover this purchase! (Price: [template.cost])") - return if(template.limit) var/count = 0 for(var/obj/structure/overmap/ship/simulated/X in SSovermap.simulated_ships) @@ -366,10 +363,9 @@ to_chat(usr, "Your [template.name] is being prepared. Please be patient!") var/obj/docking_port/mobile/target = SSshuttle.load_template(template) if(!istype(target)) - to_chat(usr, "There was an error loading the ship (You have not been charged). Please contact admins!") + to_chat(usr, "There was an error loading the ship. Please contact admins!") new_player_panel() return - usr.client.inc_metabalance(-template.cost, TRUE, "buying [template.name]") SSblackbox.record_feedback("tally", "ship_purchased", 1, template.name) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! if(!AttemptLateSpawn(target.current_ship.job_slots[1], target.current_ship)) //Try to spawn as the first listed job in the job slots (usually captain) to_chat(usr, "Ship spawned, but you were unable to be spawned. You can likely try to spawn in the ship through joining normally, but if not, please contact an admin.") diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 5c81cee45e0a..90947f1a3ed1 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -387,31 +387,6 @@ return 0 -// Convinience proc. Collects crap that fails to equip either onto the mob's back, or drops it. -// Used in job equipping so shit doesn't pile up at the start loc. -/mob/living/carbon/human/proc/equip_or_collect(var/obj/item/W, var/slot) - if(W.mob_can_equip(src, null, slot, TRUE, TRUE)) - //Mob can equip. Equip it. - equip_to_slot_or_del(W, slot) - else - //Mob can't equip it. Put it in a bag B. - // Do I have a backpack? - var/obj/item/storage/B - if(istype(back,/obj/item/storage)) - //Mob is wearing backpack - B = back - else - //not wearing backpack. Check if player holding box - if(!is_holding_item_of_type(/obj/item/storage/box)) //If not holding box, give box - B = new /obj/item/storage/box(null) // Null in case of failed equip. - if(!put_in_hands(B)) - return // box could not be placed in players hands. I don't know what to do here... - //Now, B represents a container we can insert W into. - var/datum/component/storage/STR = B.GetComponent(/datum/component/storage) - if(STR.can_be_inserted(W, stop_messages=TRUE)) - STR.handle_item_insertion(W,1) - return B - /** * Reset the attached clients perspective (viewpoint) * diff --git a/config/game_options.txt b/config/game_options.txt index 45f043f4de77..dc4253c22b19 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -482,6 +482,9 @@ ROUNDSTART_RACES jelly ## Uncomment to give players the choice of joining as a human with mutant bodyparts before they join the game #JOIN_WITH_MUTANT_HUMANS +## The amount of loadout items players are allowed to spawn with. Default 10 +MAX_LOADOUT_ITEMS 10 + ##Overflow job. Default is assistant OVERFLOW_JOB Assistant @@ -580,9 +583,6 @@ MAXFINE 2000 ## Enable the capitalist agenda on your server. ECONOMY -## Put the name of your custom currency here -METACURRENCY_NAME Metacoin - ## Overmap Settings ## ## Put max amount of different event clusters you want to spawn here diff --git a/shiptest.dme b/shiptest.dme index 3d071d9a429d..e99c603c6f8d 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -136,7 +136,6 @@ g// DM Environment file for shiptest.dme. #include "code\__DEFINES\~whitesands_defines\jobs.dm" #include "code\__DEFINES\~whitesands_defines\machines.dm" #include "code\__DEFINES\~whitesands_defines\maths.dm" -#include "code\__DEFINES\~whitesands_defines\metacoin.dm" #include "code\__DEFINES\~whitesands_defines\movespeed_modification.dm" #include "code\__DEFINES\~whitesands_defines\overmap.dm" #include "code\__DEFINES\~whitesands_defines\shuttles.dm" @@ -1746,13 +1745,12 @@ g// DM Environment file for shiptest.dme. #include "code\modules\client\preferences.dm" #include "code\modules\client\preferences_savefile.dm" #include "code\modules\client\preferences_toggles.dm" -#include "code\modules\client\loadout\loadout.dm" +#include "code\modules\client\loadout\_loadout.dm" #include "code\modules\client\loadout\loadout_accessories.dm" #include "code\modules\client\loadout\loadout_eyewear.dm" #include "code\modules\client\loadout\loadout_footwear.dm" #include "code\modules\client\loadout\loadout_general.dm" #include "code\modules\client\loadout\loadout_hat.dm" -#include "code\modules\client\loadout\loadout_ooc.dm" #include "code\modules\client\loadout\loadout_suit.dm" #include "code\modules\client\loadout\loadout_uniform.dm" #include "code\modules\client\verbs\etips.dm" @@ -3238,7 +3236,6 @@ g// DM Environment file for shiptest.dme. #include "whitesands\code\datums\ert.dm" #include "whitesands\code\datums\quixotejump.dm" #include "whitesands\code\datums\world_topic.dm" -#include "whitesands\code\datums\achievements\scores.dm" #include "whitesands\code\datums\brain_damage\brain_trauma.dm" #include "whitesands\code\datums\brain_damage\phobia.dm" #include "whitesands\code\datums\components\outline.dm" @@ -3342,10 +3339,8 @@ g// DM Environment file for shiptest.dme. #include "whitesands\code\game\turfs\open\floor\flooring_decals.dm" #include "whitesands\code\game\turfs\open\floor\hull.dm" #include "whitesands\code\game\turfs\open\floor\medians.dm" -#include "whitesands\code\modules\admin\topic.dm" #include "whitesands\code\modules\admin\verbs\mapping.dm" #include "whitesands\code\modules\admin\verbs\mentors_edit.dm" -#include "whitesands\code\modules\admin\verbs\modify_antag_tokens.dm" #include "whitesands\code\modules\admin\verbs\randomverbs.dm" #include "whitesands\code\modules\antagonists\_common\antag_spawner.dm" #include "whitesands\code\modules\antagonists\borer\borer.dm" @@ -3365,7 +3360,6 @@ g// DM Environment file for shiptest.dme. #include "whitesands\code\modules\cargo\blackmarket\blackmarket_items\weapons.dm" #include "whitesands\code\modules\cargo\bounties\engineering.dm" #include "whitesands\code\modules\cargo\exports\large_objects.dm" -#include "whitesands\code\modules\client\antag_tokens.dm" #include "whitesands\code\modules\clothing\glasses\_glasses.dm" #include "whitesands\code\modules\clothing\glasses\hud.dm" #include "whitesands\code\modules\clothing\gloves\tapegloves.dm" @@ -3429,7 +3423,6 @@ g// DM Environment file for shiptest.dme. #include "whitesands\code\modules\language\mouse.dm" #include "whitesands\code\modules\language\spider.dm" #include "whitesands\code\modules\library\lib_items.dm" -#include "whitesands\code\modules\metacoin\metacoin.dm" #include "whitesands\code\modules\mining\ores_coins.dm" #include "whitesands\code\modules\mining\deepcore\_deepcore.dm" #include "whitesands\code\modules\mining\deepcore\drill.dm" diff --git a/whitesands/code/controllers/configuration/entries/general.dm b/whitesands/code/controllers/configuration/entries/general.dm index 19886baa2498..bd12c89b626b 100644 --- a/whitesands/code/controllers/configuration/entries/general.dm +++ b/whitesands/code/controllers/configuration/entries/general.dm @@ -1,6 +1,3 @@ -/datum/config_entry/string/metacurrency_name - config_entry_value = "MetaCoin" - /datum/config_entry/number/whitesands_atmos_moles config_entry_value = 103 integer = FALSE diff --git a/whitesands/code/datums/achievements/scores.dm b/whitesands/code/datums/achievements/scores.dm deleted file mode 100644 index 498b7c40e358..000000000000 --- a/whitesands/code/datums/achievements/scores.dm +++ /dev/null @@ -1,21 +0,0 @@ -/datum/award/score/metacoins - name = "Currency" - desc = "Total accumulated \"wealth.\"" - -/datum/award/score/metacoins/New() - . = ..() - name = "[CONFIG_GET(string/metacurrency_name)]\s" - -/datum/award/score/metacoins/LoadHighScores() - var/datum/DBQuery/Q = SSdbcore.NewQuery( - "SELECT ckey,metacoins FROM [format_table_name("player")] ORDER BY metacoins DESC LIMIT 50" - ) - if(!Q.Execute(async = TRUE)) - qdel(Q) - return - else - while(Q.NextRow()) - var/key = Q.item[1] - var/score = text2num(Q.item[2]) - high_scores[key] = score - qdel(Q) diff --git a/whitesands/code/modules/admin/topic.dm b/whitesands/code/modules/admin/topic.dm deleted file mode 100644 index b28334a8b63d..000000000000 --- a/whitesands/code/modules/admin/topic.dm +++ /dev/null @@ -1,20 +0,0 @@ -/datum/admins/Topic(href, href_list) - ..() - - if(href_list["modantagtokens"]) - if(!check_rights(R_ADMIN)) - return - - var/mob/M = locate(href_list["mob"]) in GLOB.mob_list - var/client/C = M.client - usr.client.cmd_admin_mod_antag_tokens(C, href_list["modantagtokens"]) - show_player_panel(M) - - else if(href_list["modmetacoin"]) - if(!check_rights(R_ADMIN)) - return - - var/mob/M = locate(href_list["mob"]) in GLOB.mob_list - var/client/C = M.client - usr.client.cmd_admin_mod_metacoins(C, href_list["modmetacoin"]) - show_player_panel(M) diff --git a/whitesands/code/modules/admin/verbs/modify_antag_tokens.dm b/whitesands/code/modules/admin/verbs/modify_antag_tokens.dm deleted file mode 100644 index e63207d84671..000000000000 --- a/whitesands/code/modules/admin/verbs/modify_antag_tokens.dm +++ /dev/null @@ -1,44 +0,0 @@ -#define ANTAG_TOKENS_MAXIMUM 255 -#define ANTAG_TOKENS_MINIMUM 0 - -/client/proc/cmd_admin_mod_antag_tokens(client/C in GLOB.clients, var/operation) - set category = "Special Verbs" - set name = "Modify Antagonist Tokens" - - if(!check_rights(R_ADMIN)) - return - - var/msg = "" - var/log_text = "" - - if(operation == "zero") - log_text = "Set to 0" - C.set_antag_token_count(0) - else - var/prompt = "Please enter the amount of tokens to [operation]:" - - if(operation == "set") - prompt = "Please enter the new token amount:" - - msg = input("Message:", prompt) as num|null - - if (!msg) - return - - if(operation == "set") - log_text = "Set to [num2text(msg)]" - C.set_antag_token_count(max(ANTAG_TOKENS_MINIMUM, min(msg, ANTAG_TOKENS_MAXIMUM))) - else if(operation == "add") - log_text = "Added [num2text(msg)]" - C.inc_antag_token_count(msg) - else if(operation == "subtract") - log_text = "Subtracted [num2text(msg)]" - C.inc_antag_token_count(-msg) - else - to_chat(src, "Invalid operation for antag token modification: [operation] by user [key_name(usr)]") - return - - - log_admin("[key_name(usr)]: Modified [key_name(C)]'s antagonist tokens [log_text]") - message_admins("[key_name_admin(usr)]: Modified [key_name(C)]'s antagonist tokens ([log_text])") - SSblackbox.record_feedback("tally", "admin_verb", 1, "Modify Antagonist Tokens") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/whitesands/code/modules/client/antag_tokens.dm b/whitesands/code/modules/client/antag_tokens.dm deleted file mode 100644 index 364b30397643..000000000000 --- a/whitesands/code/modules/client/antag_tokens.dm +++ /dev/null @@ -1,37 +0,0 @@ -/client/proc/get_antag_token_count() - if(!SSdbcore.IsConnected()) - return 0 //Zero, not false. - var/datum/DBQuery/query_get_antag_tokens = SSdbcore.NewQuery("SELECT antag_tokens FROM [format_table_name("player")] WHERE ckey = '[ckey]'") - var/token_count = 0 - if(!query_get_antag_tokens.warn_execute()) - qdel(query_get_antag_tokens) - return text2num(token_count) - if(!query_get_antag_tokens.NextRow()) - qdel(query_get_antag_tokens) - return text2num(token_count) - else - token_count = query_get_antag_tokens.item[1] - qdel(query_get_antag_tokens) - return text2num(token_count) - -/client/proc/set_antag_token_count(token_count) - if(!SSdbcore.IsConnected()) - return - var/datum/DBQuery/query_set_antag_tokens = SSdbcore.NewQuery( - "UPDATE [format_table_name("player")] SET antag_tokens = :token_count WHERE ckey = :ckey", - list("token_count" = token_count, "ckey" = ckey)) - if(!query_set_antag_tokens.warn_execute()) - qdel(query_set_antag_tokens) - return - qdel(query_set_antag_tokens) - -/client/proc/inc_antag_token_count(token_count) - if(!SSdbcore.IsConnected()) - return - var/datum/DBQuery/query_inc_antag_tokens = SSdbcore.NewQuery( - "UPDATE [format_table_name("player")] SET antag_tokens = antag_tokens + :token_count WHERE ckey = :ckey", - list("token_count" = token_count, "ckey" = ckey)) - if(!query_inc_antag_tokens.warn_execute()) - qdel(query_inc_antag_tokens) - return - qdel(query_inc_antag_tokens) diff --git a/whitesands/code/modules/metacoin/metacoin.dm b/whitesands/code/modules/metacoin/metacoin.dm deleted file mode 100644 index b5fd86066062..000000000000 --- a/whitesands/code/modules/metacoin/metacoin.dm +++ /dev/null @@ -1,96 +0,0 @@ -/client/proc/cmd_admin_mod_metacoins(client/C in GLOB.clients, var/operation) - set category = "Special Verbs" - set name = "Modify [CONFIG_GET(string/metacurrency_name)]" - - if(!check_rights(R_ADMIN)) - return - - var/msg = "" - var/log_text = "" - var/metacoin_name = CONFIG_GET(string/metacurrency_name) - - if(operation == "zero") - log_text = "Set to 0" - C.set_antag_token_count(0) - else - var/prompt = "Please enter the amount of [metacoin_name] to [operation]:" - - if(operation == "set") - prompt = "Please enter the new [metacoin_name] amount:" - - msg = input("Message:", prompt) as num|null - - if (!msg) - return - - if(operation == "set") - log_text = "Set to [num2text(msg)]" - C.set_metacoin_count(msg) - else if(operation == "add") - log_text = "Added [num2text(msg)]" - C.inc_metabalance(msg) - else if(operation == "subtract") - log_text = "Subtracted [num2text(msg)]" - C.inc_metabalance(-msg) - else - to_chat(src, "Invalid operation for [metacoin_name] modification: [operation] by user [key_name(usr)]") - return - - log_admin("[key_name(usr)]: Modified [key_name(C)]'s [metacoin_name] [log_text]") - message_admins("[key_name_admin(usr)]: Modified [key_name(C)]'s [metacoin_name] ([log_text])") - SSblackbox.record_feedback("tally", "admin_verb", 1, "Modify Metabalance") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/process_endround_metacoin(is_speed_round, round_duration) - if(!mob) return - var/mob/M = mob - if(M.mind && !isnewplayer(M)) - if(M.stat != DEAD && !isbrain(M)) - inc_metabalance(METACOIN_ESCAPE_REWARD(is_speed_round, round_duration), reason="Survived the shift.") - else - inc_metabalance(METACOIN_NOTSURVIVE_REWARD, reason="You tried.") - -/client/proc/process_greentext(is_speed_round, round_duration) - inc_metabalance(METACOIN_GREENTEXT_REWARD(is_speed_round, round_duration), reason="Greentext!") - -/client/proc/process_ten_minute_living() - inc_metabalance(METACOIN_TENMINUTELIVING_REWARD, FALSE) - -/client/proc/get_metabalance() - if(!SSdbcore.IsConnected()) - return - var/datum/DBQuery/query_get_metacoins = SSdbcore.NewQuery( - "SELECT metacoins FROM [format_table_name("player")] WHERE ckey = :ckey", - list("ckey" = ckey)) - var/mc_count = 0 - if(query_get_metacoins.warn_execute()) - if(query_get_metacoins.NextRow()) - mc_count = query_get_metacoins.item[1] - - qdel(query_get_metacoins) - return text2num(mc_count) - -/client/proc/set_metacoin_count(mc_count, ann=TRUE) - if(!SSdbcore.IsConnected()) - return - var/datum/DBQuery/query_set_metacoins = SSdbcore.NewQuery( - "UPDATE [format_table_name("player")] SET metacoins = :mc_count WHERE ckey = :ckey", - list("ckey" = ckey, "mc_count" = mc_count)) - query_set_metacoins.warn_execute() - qdel(query_set_metacoins) - if(ann) - to_chat(src, "Your new metacoin balance is [mc_count]!") - -/client/proc/inc_metabalance(mc_count, ann=TRUE, reason=null) - if(!SSdbcore.IsConnected()) - return - var/datum/DBQuery/query_inc_metacoins = SSdbcore.NewQuery( - "UPDATE [format_table_name("player")] SET metacoins = metacoins + :mc_count WHERE ckey = :ckey", - list("ckey" = ckey, "mc_count" = mc_count)) - query_inc_metacoins.warn_execute() - qdel(query_inc_metacoins) - if(ann) - if(reason) - to_chat(src, "[abs(mc_count)] [CONFIG_GET(string/metacurrency_name)]\s have been [mc_count >= 0 ? "deposited to" : "withdrawn from"] your account! Reason: [reason]") - else - to_chat(src, "[abs(mc_count)] [CONFIG_GET(string/metacurrency_name)]\s have been [mc_count >= 0 ? "deposited to" : "withdrawn from"] your account!") -