From b9c78afd6d1c2d61247be7e287c2a4bb27ac444a Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Mon, 26 Feb 2024 18:51:06 -0500 Subject: [PATCH] [MIRROR] deathmatch ui qol and deathmatch plasmamen are made humans (#1146) * deathmatch ui qol and deathmatch plasmamen are made humans (#81629) ## About The Pull Request ![2024-02-22 18_33_26-Space Station 13](https://github.com/tgstation/tgstation/assets/70376633/3eeb086a-ce07-4677-8ac0-a319ba3e47f6) there is a new option in the loadout dropdown "Randomize", using it picks a random loadout also the UI scrolls now so it can survive more players and plasmamen are set into humans as to not need to create more plasmaman specific outfits ## Why It's Good For The Game player list going out of its section = bug bad plasmamen getting lit on fire instantly and dying = bad Closes #81622 ## Changelog :cl: add: Added an option to deathmatch loadout dropdown that allows you to pick a random loadout fix: In deathmatch, plasmamen are made humans and the UI supports more players /:cl: --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> * deathmatch ui qol and deathmatch plasmamen are made humans --------- Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --- .../modules/deathmatch/deathmatch_loadouts.dm | 42 ++++++++++--------- code/modules/deathmatch/deathmatch_lobby.dm | 10 ++++- code/modules/deathmatch/deathmatch_maps.dm | 2 +- .../tgui/interfaces/DeathmatchLobby.tsx | 7 ++-- 4 files changed, 36 insertions(+), 25 deletions(-) diff --git a/code/modules/deathmatch/deathmatch_loadouts.dm b/code/modules/deathmatch/deathmatch_loadouts.dm index 480e1975fb9..f994987427e 100644 --- a/code/modules/deathmatch/deathmatch_loadouts.dm +++ b/code/modules/deathmatch/deathmatch_loadouts.dm @@ -17,6 +17,8 @@ if(!isnull(species_override)) user.set_species(species_override) + else if (istype(user.dna.species.outfit_important_for_life)) //plasmamen get lit on fire and die + user.set_species(/datum/species/human) for(var/datum/action/act as anything in granted_spells) var/datum/action/new_ability = new act(user) new_ability.Grant(user) @@ -31,7 +33,7 @@ name = "Deathmatch: Assistant loadout" display_name = "Assistant" desc = "A simple assistant loadout: greyshirt and a toolbox" - + l_hand = /obj/item/storage/toolbox/mechanical uniform = /obj/item/clothing/under/color/grey back = /obj/item/storage/backpack @@ -48,7 +50,7 @@ name = "Deathmatch: Operative" display_name = "Operative" desc = "A syndicate operative." - + uniform = /obj/item/clothing/under/syndicate shoes = /obj/item/clothing/shoes/combat gloves = /obj/item/clothing/gloves/combat @@ -59,7 +61,7 @@ name = "Deathmatch: Ranged Operative" display_name = "Ranged Operative" desc = "A syndicate operative with a gun and a knife." - + l_hand = /obj/item/gun/ballistic/automatic/pistol l_pocket = /obj/item/knife/combat backpack_contents = list(/obj/item/ammo_box/magazine/m9mm = 5) @@ -68,7 +70,7 @@ name = "Deathmatch: Melee Operative" display_name = "Melee Operative" desc = "A syndicate operative with multiple knives." - + gloves = /obj/item/clothing/gloves/tackler/combat/insulated suit = /obj/item/clothing/suit/armor/vest head = /obj/item/clothing/head/helmet @@ -80,7 +82,7 @@ name = "Deathmatch: Security Officer" display_name = "Security Officer" desc = "A security officer." - + uniform = /datum/outfit/job/security::uniform suit = /datum/outfit/job/security::suit suit_store = /datum/outfit/job/security::suit_store @@ -100,7 +102,7 @@ name = "DM: Instagib" display_name = "Instagib" desc = "Assistant with an instakill rifle." - + l_hand = /obj/item/gun/energy/laser/instakill /datum/outfit/deathmatch_loadout/operative/sniper @@ -143,7 +145,7 @@ name = "Deathmatch: Battler Base" display_name = "Battler" desc = "What is a battler whith out weapone?." - + shoes = /obj/item/clothing/shoes/combat uniform = /obj/item/clothing/under/syndicate gloves = /obj/item/clothing/gloves/combat @@ -154,14 +156,14 @@ name = "Deathmatch: Soldier" display_name = "Soldier" desc = "Ready for combat." - + l_hand = /obj/item/gun/ballistic/rifle/boltaction l_pocket = /obj/item/knife/combat uniform = /obj/item/clothing/under/syndicate/rus_army suit = /obj/item/clothing/suit/armor/vest head = /obj/item/clothing/head/helmet/rus_helmet gloves = /obj/item/clothing/gloves/tackler/combat/insulated - + backpack_contents = list( /obj/item/grenade/smokebomb = 2, /obj/item/ammo_box/strilka310 = 2, @@ -199,7 +201,7 @@ name = "Deathmatch: North Star" display_name = "North Star" desc = "flip flip flip" - + uniform = /obj/item/clothing/under/suit/carpskin head = /obj/item/clothing/head/fedora/carpskin gloves = /obj/item/clothing/gloves/rapid @@ -212,7 +214,7 @@ name = "Deathmatch: Janitor" display_name = "Janitor" desc = "Regular work" - + uniform = /obj/item/clothing/under/rank/civilian/janitor suit = /obj/item/clothing/suit/caution head = /obj/item/reagent_containers/cup/bucket @@ -229,7 +231,7 @@ name = "Deathmatch: Surgeon" display_name = "Surgeon" desc = "Treatment has come" - + uniform = /obj/item/clothing/under/rank/medical/scrubs/blue suit = /obj/item/clothing/suit/apron/surgical head = /obj/item/clothing/head/utility/surgerycap @@ -238,7 +240,7 @@ l_pocket = /obj/item/reagent_containers/hypospray/combat r_pocket = /obj/item/reagent_containers/hypospray/medipen/penthrite l_hand = /obj/item/chainsaw - + backpack_contents = list( /obj/item/storage/medkit/tactical, /obj/item/reagent_containers/hypospray/medipen/stimulants, @@ -248,7 +250,7 @@ name = "Deathmatch: Raider" display_name = "Raider" desc = "Not from Shadow Legends" - + l_hand = /obj/item/nullrod/claymore/chainsaw_sword r_pocket = /obj/item/switchblade uniform = /obj/item/clothing/under/costume/jabroni @@ -260,7 +262,7 @@ name = "DM: Clown" display_name = "Clown (Man Of Honk)" desc = "Who called this honking clown" - + uniform = /datum/outfit/job/clown::uniform belt = /datum/outfit/job/clown::belt shoes = /datum/outfit/job/clown::shoes @@ -285,7 +287,7 @@ name = "Deathmatch: Coder" display_name = "Coder" desc = "What" - + l_hand = /obj/item/toy/katana uniform = /obj/item/clothing/under/costume/schoolgirl suit = /obj/item/clothing/suit/costume/joker @@ -299,7 +301,7 @@ name = "Deathmatch: Engineer" display_name = "Engineer" desc = "Meet the engineer" - + l_hand = /obj/item/storage/toolbox/emergency/turret uniform = /obj/item/clothing/under/rank/engineering/engineer shoes = /obj/item/clothing/shoes/magboots @@ -311,7 +313,7 @@ name = "Deathmatch: Scientist" display_name = "Scientist" desc = "What a nerd" - + uniform = /obj/item/clothing/under/rank/rnd/scientist suit = /obj/item/clothing/suit/armor/reactive/stealth mask = /obj/item/clothing/mask/gas @@ -353,7 +355,7 @@ name = "Deathmatch: Ripper" display_name = "Ripper" desc = "Die die die!!!" - + l_hand = /obj/item/gun/ballistic/shotgun/hook r_hand = /obj/item/gun/ballistic/shotgun/hook uniform = /obj/item/clothing/under/costume/skeleton @@ -366,7 +368,7 @@ name = "Deathmatch: Cowboy" display_name = "Cowboy" desc = "Yeehaw partner" - + r_hand = /obj/item/clothing/mask/cigarette/cigar l_hand = /obj/item/melee/curator_whip l_pocket = /obj/item/lighter diff --git a/code/modules/deathmatch/deathmatch_lobby.dm b/code/modules/deathmatch/deathmatch_lobby.dm index 138f639a0a6..e498f662b5e 100644 --- a/code/modules/deathmatch/deathmatch_lobby.dm +++ b/code/modules/deathmatch/deathmatch_lobby.dm @@ -295,6 +295,11 @@ /datum/deathmatch_lobby/ui_state(mob/user) return GLOB.observer_state +/// fills the lobby with fake players for the sake of UI debug, can only be called via VV +/datum/deathmatch_lobby/proc/fakefill(count) + for(var/i = 1 to count) + players["[rand(1,999)]"] = list("mob" = usr, "host" = FALSE, "ready" = FALSE, "loadout" = pick(loadouts)) + /datum/deathmatch_lobby/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, null) if(!ui) @@ -314,7 +319,7 @@ .["admin"] = check_rights_for(user.client, R_ADMIN) .["global_chat"] = global_chat .["playing"] = playing - .["loadouts"] = list() + .["loadouts"] = list("Randomize") for (var/datum/outfit/deathmatch_loadout/loadout as anything in loadouts) .["loadouts"] += initial(loadout.display_name) .["map"] = list() @@ -371,6 +376,9 @@ return FALSE if (params["player"] != usr.ckey && host != usr.ckey) return FALSE + if (params["loadout"] == "Randomize") + players[params["player"]]["loadout"] = pick(loadouts) + return TRUE for (var/datum/outfit/deathmatch_loadout/possible_loadout as anything in loadouts) if (params["loadout"] != initial(possible_loadout.display_name)) continue diff --git a/code/modules/deathmatch/deathmatch_maps.dm b/code/modules/deathmatch/deathmatch_maps.dm index 60594d903bb..d437bffbb3c 100644 --- a/code/modules/deathmatch/deathmatch_maps.dm +++ b/code/modules/deathmatch/deathmatch_maps.dm @@ -107,6 +107,7 @@ desc = "Choose your battler!" max_players = 10 allowed_loadouts = list( + /datum/outfit/deathmatch_loadout/battler/soldier, // First because its a good and easy loadout and is picked by default /datum/outfit/deathmatch_loadout/battler/bloodminer, /datum/outfit/deathmatch_loadout/battler/clown, /datum/outfit/deathmatch_loadout/battler/cowboy, @@ -117,7 +118,6 @@ /datum/outfit/deathmatch_loadout/battler/raider, /datum/outfit/deathmatch_loadout/battler/ripper, /datum/outfit/deathmatch_loadout/battler/scientist, - /datum/outfit/deathmatch_loadout/battler/soldier, /datum/outfit/deathmatch_loadout/battler/surgeon, /datum/outfit/deathmatch_loadout/battler/tgcoder, /datum/outfit/deathmatch_loadout/naked, diff --git a/tgui/packages/tgui/interfaces/DeathmatchLobby.tsx b/tgui/packages/tgui/interfaces/DeathmatchLobby.tsx index 6c1a2221a4d..2e9b8018187 100644 --- a/tgui/packages/tgui/interfaces/DeathmatchLobby.tsx +++ b/tgui/packages/tgui/interfaces/DeathmatchLobby.tsx @@ -44,11 +44,11 @@ type Data = { export const DeathmatchLobby = (props) => { const { act, data } = useBackend(); return ( - + - -
+ +
@@ -148,6 +148,7 @@ export const DeathmatchLobby = (props) => { {data.map.desc} + Maximum Play Time: {`${data.map.time / 600}min`}