Skip to content

Commit

Permalink
Removes Metacoins/Antag Tokens, Minor Loadout Rework (shiptest-ss13#729)
Browse files Browse the repository at this point in the history
* fuck loadout code fuck metacoins please save me

* whoops

* whoops 2

* Pain
  • Loading branch information
MarkSuckerberg authored Feb 6, 2022
1 parent 3a9db59 commit 65f2c87
Show file tree
Hide file tree
Showing 32 changed files with 65 additions and 581 deletions.
20 changes: 17 additions & 3 deletions SQL/database_changelog.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 0 additions & 2 deletions SQL/tgstation_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down
2 changes: 0 additions & 2 deletions SQL/tgstation_schema_prefixed.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down
14 changes: 0 additions & 14 deletions code/__DEFINES/~whitesands_defines/metacoin.dm

This file was deleted.

18 changes: 0 additions & 18 deletions code/__HELPERS/roundend.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
5 changes: 2 additions & 3 deletions code/_globalvars/lists/flavor_misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions code/controllers/configuration/entries/game_options.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 0 additions & 15 deletions code/modules/admin/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,6 @@
body += "<a href='?_src_=holder;[HrefToken()];modantagrep=subtract;mob=[REF(M)]'>-</a> "
body += "<a href='?_src_=holder;[HrefToken()];modantagrep=set;mob=[REF(M)]'>=</a> "
body += "<a href='?_src_=holder;[HrefToken()];modantagrep=zero;mob=[REF(M)]'>0</a>"
//WS Begin - Metacoins
var/metabalance = M.client.get_metabalance()
body += "<br><br><b>[CONFIG_GET(string/metacurrency_name)]s</b>: [metabalance] "
body += "<br><a href='?_src_=holder;[HrefToken()];modmetacoin=add;mob=[REF(M)]'>+</a> "
body += "<a href='?_src_=holder;[HrefToken()];modmetacoin=subtract;mob=[REF(M)]'>-</a> "
body += "<a href='?_src_=holder;[HrefToken()];modmetacoin=set;mob=[REF(M)]'>=</a> "
body += "<a href='?_src_=holder;[HrefToken()];modmetacoin=zero;mob=[REF(M)]'>0</a>"
//Antag Tokens
var/antag_tokens = M.client.get_antag_token_count()
body += "<br><br><b>Antag Tokens</b>: [antag_tokens]"
body += "<br><a href='?_src_=holder;[HrefToken()];modantagtokens=add;mob=[REF(M)]'>+</a> "
body += "<a href='?_src_=holder;[HrefToken()];modantagtokens=subtract;mob=[REF(M)]'>-</a> "
body += "<a href='?_src_=holder;[HrefToken()];modantagtokens=set;mob=[REF(M)]'>=</a> "
body += "<a href='?_src_=holder;[HrefToken()];modantagtokens=zero;mob=[REF(M)]'>0</a>"
//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"]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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)
Expand Down
7 changes: 0 additions & 7 deletions code/modules/client/loadout/loadout_accessories.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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
3 changes: 0 additions & 3 deletions code/modules/client/loadout/loadout_eyewear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
subtype_path = /datum/gear/eyewear
slot = ITEM_SLOT_EYES
sort_category = "Eyewear"
cost = 500

//Prescription glasses
/datum/gear/eyewear/glasses
Expand Down Expand Up @@ -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"
Expand Down
6 changes: 0 additions & 6 deletions code/modules/client/loadout/loadout_footwear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
subtype_path = /datum/gear/footwear
slot = ITEM_SLOT_FEET
sort_category = "Footwear"
cost = 1000

//pretty much everything else

Expand All @@ -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"
Expand Down
Loading

0 comments on commit 65f2c87

Please sign in to comment.