From b553977a3d0209c5f2047baecf78263a07cc7a20 Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Thu, 4 Jul 2024 08:21:55 -0400 Subject: [PATCH] [MIRROR] some deathmatch fixes [MDB IGNORE] --- _maps/deathmatch/OSHA_Violator.dmm | 43 +++- code/__DEFINES/_flags.dm | 2 + .../modules/deathmatch/deathmatch_loadouts.dm | 204 ++++++++++++++++++ code/modules/deathmatch/deathmatch_lobby.dm | 33 ++- code/modules/deathmatch/deathmatch_mapping.dm | 4 +- .../mob/living/carbon/human/human_say.dm | 3 + .../modules/mob/living/silicon/silicon_say.dm | 3 + .../power/singularity/field_generator.dm | 25 ++- 8 files changed, 296 insertions(+), 21 deletions(-) diff --git a/_maps/deathmatch/OSHA_Violator.dmm b/_maps/deathmatch/OSHA_Violator.dmm index fc8291d1814..6678446c433 100644 --- a/_maps/deathmatch/OSHA_Violator.dmm +++ b/_maps/deathmatch/OSHA_Violator.dmm @@ -20,11 +20,18 @@ /obj/structure/closet/secure_closet/engineering_welding, /turf/open/indestructible, /area/deathmatch) +"cl" = ( +/obj/effect/turf_decal/stripes/line{ + dir = 10 + }, +/obj/structure/cable, +/turf/open/indestructible, +/area/deathmatch) "cA" = ( /turf/open/indestructible, /area/deathmatch) "cR" = ( -/obj/machinery/field/generator/starts_on, +/obj/machinery/field/generator/starts_on/magic, /obj/effect/turf_decal/bot, /obj/structure/cable, /turf/open/indestructible, @@ -36,7 +43,7 @@ "dt" = ( /obj/machinery/light/no_nightlight/directional/north, /obj/effect/turf_decal/stripes/line, -/obj/machinery/field/generator/starts_on, +/obj/machinery/field/generator/starts_on/magic, /obj/structure/cable, /turf/open/indestructible, /area/deathmatch) @@ -581,7 +588,7 @@ /area/deathmatch) "Bv" = ( /obj/effect/turf_decal/stripes/line, -/obj/machinery/field/generator/starts_on, +/obj/machinery/field/generator/starts_on/magic, /obj/structure/cable, /turf/open/indestructible, /area/deathmatch) @@ -685,6 +692,13 @@ /obj/machinery/light/no_nightlight/directional/west, /turf/open/indestructible, /area/deathmatch) +"Gw" = ( +/obj/effect/turf_decal/stripes/line{ + dir = 5 + }, +/obj/structure/cable, +/turf/open/indestructible, +/area/deathmatch) "Gx" = ( /obj/machinery/conveyor/auto, /obj/structure/cable, @@ -849,7 +863,7 @@ /turf/open/indestructible, /area/deathmatch) "Pg" = ( -/obj/machinery/field/generator/starts_on, +/obj/machinery/field/generator, /obj/machinery/light/no_nightlight/directional/north, /turf/open/indestructible, /area/deathmatch) @@ -980,7 +994,7 @@ /obj/effect/turf_decal/stripes/line{ dir = 1 }, -/obj/machinery/field/generator/starts_on, +/obj/machinery/field/generator/starts_on/magic, /obj/structure/cable, /turf/open/indestructible, /area/deathmatch) @@ -1042,8 +1056,11 @@ /turf/open/indestructible, /area/deathmatch) "YA" = ( +/obj/effect/turf_decal/stripes/line{ + dir = 9 + }, /obj/structure/cable, -/turf/closed/indestructible/fakeglass, +/turf/open/indestructible, /area/deathmatch) "YJ" = ( /obj/structure/cable, @@ -1062,7 +1079,7 @@ /obj/effect/turf_decal/stripes/line{ dir = 1 }, -/obj/machinery/field/generator/starts_on, +/obj/machinery/field/generator/starts_on/magic, /obj/structure/cable, /turf/open/indestructible, /area/deathmatch) @@ -1073,6 +1090,12 @@ }, /turf/open/indestructible, /area/deathmatch) +"Zq" = ( +/obj/effect/turf_decal/stripes/line{ + dir = 6 + }, +/turf/open/indestructible, +/area/deathmatch) "Zr" = ( /obj/item/storage/backpack/duffelbag/syndie/med/medicalbundle, /turf/open/space/basic, @@ -1387,7 +1410,7 @@ sa sa je ai -YA +cl ai gN cA @@ -2008,7 +2031,7 @@ sa sa je ai -bl +Zq ai ai Bf @@ -2026,7 +2049,7 @@ Bf Bf ai ai -bl +Gw ai je sa diff --git a/code/__DEFINES/_flags.dm b/code/__DEFINES/_flags.dm index a9b42840fdb..72d28ca6bca 100644 --- a/code/__DEFINES/_flags.dm +++ b/code/__DEFINES/_flags.dm @@ -132,6 +132,8 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define QUIET_LOGS (1<<15) /// This area does not allow virtual entities to enter. #define VIRTUAL_SAFE_AREA (1<<16) +/// This area does not allow the Binary channel +#define BINARY_JAMMING (1<<17) /* These defines are used specifically with the atom/pass_flags bitmask diff --git a/code/modules/deathmatch/deathmatch_loadouts.dm b/code/modules/deathmatch/deathmatch_loadouts.dm index ae5f22975a0..c9267b7aea6 100644 --- a/code/modules/deathmatch/deathmatch_loadouts.dm +++ b/code/modules/deathmatch/deathmatch_loadouts.dm @@ -543,3 +543,207 @@ granted_spells = list( /datum/action/cooldown/spell/conjure/simian, ) +<<<<<<< HEAD +======= + +/datum/outfit/deathmatch_loadout/head_of_security + name = "Deathmatch: Head of Security" + display_name = "Head of Security" + desc = "Finally, nobody to stop the power from going to your head." + + head = /datum/outfit/job/hos::head + ears = /datum/outfit/job/hos::ears + uniform = /obj/item/clothing/under/rank/security/head_of_security/alt + shoes = /datum/outfit/job/hos::shoes + neck = /datum/outfit/job/hos::neck + glasses = /datum/outfit/job/hos::glasses + suit = /obj/item/clothing/suit/armor/hos/hos_formal + suit_store = /obj/item/gun/ballistic/shotgun/automatic/combat/compact + gloves = /obj/item/clothing/gloves/tackler/combat + belt = /obj/item/gun/energy/e_gun/hos + r_hand = /obj/item/melee/baton/security/loaded + l_hand = /obj/item/shield/riot/tele + l_pocket = /obj/item/grenade/flashbang + r_pocket = /obj/item/restraints/legcuffs/bola/energy + +/datum/outfit/deathmatch_loadout/captain + name = "Deathmatch: Captain" + display_name = "Captain" + desc = "Draw your sword and show the syndicate scum no quarter." + + head = /obj/item/clothing/head/hats/caphat/parade + ears = /obj/item/radio/headset/heads/captain/alt + uniform = /obj/item/clothing/under/rank/captain + suit = /obj/item/clothing/suit/armor/vest/capcarapace/captains_formal + suit_store = /obj/item/gun/energy/e_gun + shoes = /obj/item/clothing/shoes/laceup + neck = /obj/item/bedsheet/captain + glasses = /obj/item/clothing/glasses/sunglasses + gloves = /obj/item/clothing/gloves/captain + belt = /obj/item/storage/belt/sabre + l_hand = /obj/item/gun/energy/laser/captain + r_pocket = /obj/item/assembly/flash + l_pocket = /obj/item/melee/baton/telescopic + +/datum/outfit/deathmatch_loadout/traitor + name = "Deathmatch: Traitor" + display_name = "Traitor" + desc = "The classic; energy sword & energy bow, donning a reflector trenchcoat (stolen)." + + head = /obj/item/clothing/head/chameleon + uniform = /obj/item/clothing/under/chameleon + mask = /obj/item/clothing/mask/chameleon + suit = /obj/item/clothing/suit/hooded/ablative + shoes = /obj/item/clothing/shoes/chameleon/noslip + glasses = /obj/item/clothing/glasses/thermal/syndi + gloves = /obj/item/clothing/gloves/combat + suit_store = /obj/item/gun/energy/recharge/ebow + l_hand = /obj/item/melee/energy/sword + r_pocket = /obj/item/reagent_containers/hypospray/medipen/stimulants + l_pocket = /obj/item/soap/syndie + belt = /obj/item/gun/ballistic/revolver/syndicate + +/datum/outfit/deathmatch_loadout/nukie + name = "Deathmatch: Nuclear Operative" + display_name = "Nuclear Operative" + desc = "Gear afforded to Lone Operatives. Your mission is simple." + + uniform = /obj/item/clothing/under/syndicate/tacticool + back = /obj/item/mod/control/pre_equipped/nuclear + r_hand = /obj/item/gun/ballistic/shotgun/bulldog/unrestricted + belt = /obj/item/gun/ballistic/automatic/pistol/clandestine + r_pocket = /obj/item/reagent_containers/hypospray/medipen/stimulants + l_pocket = /obj/item/grenade/syndieminibomb + implants = list(/obj/item/implant/explosive) + + backpack_contents = list( + /obj/item/ammo_box/c10mm, + /obj/item/ammo_box/magazine/m12g = 2, + /obj/item/pen/edagger, + /obj/item/reagent_containers/hypospray/medipen/atropine, + ) + +/datum/outfit/deathmatch_loadout/pete + name = "Deathmatch: Cuban Pete" + display_name = "Disciple of Pete" + desc = "You took a lesson from Cuban Pete." + + back = /obj/item/storage/backpack/santabag + head = /obj/item/clothing/head/collectable/petehat + uniform = /obj/item/clothing/under/pants/camo + suit = /obj/item/clothing/suit/costume/poncho + belt = /obj/item/storage/belt/grenade/full + shoes = /obj/item/clothing/shoes/workboots + l_hand = /obj/item/reagent_containers/cup/glass/bottle/rum + r_hand = /obj/item/sbeacondrop/bomb + l_pocket = /obj/item/grenade/syndieminibomb + r_pocket = /obj/item/grenade/syndieminibomb + implants = list(/obj/item/implanter/explosive_macro) + backpack_contents = list( + /obj/item/assembly/signaler = 10, + ) + +/datum/outfit/deathmatch_loadout/tider + name = "Deathmatch: Tider" + display_name = "Tider" + desc = "A very high power level Assistant." + + back = /obj/item/melee/baton/security/cattleprod + r_hand = /obj/item/fireaxe + uniform = /obj/item/clothing/under/color/grey/ancient + mask = /obj/item/clothing/mask/gas + shoes = /obj/item/clothing/shoes/sneakers/black + gloves = /obj/item/clothing/gloves/cut + l_pocket = /obj/item/reagent_containers/hypospray/medipen/methamphetamine + r_pocket = /obj/item/stock_parts/power_store/cell/high + belt = /obj/item/storage/belt/utility/full + +/datum/outfit/deathmatch_loadout/abductor + name = "Deathmatch: Abductor" + display_name = "Abductor" + desc = "We come in peace." + + species_override = /datum/species/abductor + uniform = /obj/item/clothing/under/abductor + head = /obj/item/clothing/head/helmet/abductor + suit = /obj/item/clothing/suit/armor/abductor/vest + l_pocket = /obj/item/reagent_containers/hypospray/medipen/atropine + r_pocket = /obj/item/grenade/gluon + l_hand = /obj/item/gun/energy/alien + r_hand = /obj/item/gun/energy/alien + belt = /obj/item/gun/energy/shrink_ray + +/datum/outfit/deathmatch_loadout/battler/clown/upgraded + name = "Deathmatch: Clown (Syndicate Gear)" + display_name = "Clown Commando" + desc = "They were bound to show up sooner or later." + + shoes = /obj/item/clothing/shoes/clown_shoes/combat + r_hand = /obj/item/pneumatic_cannon/pie/selfcharge + l_hand = /obj/item/bikehorn/golden + box = /obj/item/storage/box/hug/reverse_revolver + + backpack_contents = list( + /obj/item/paperplane/syndicate = 1, + /obj/item/restraints/legcuffs/bola/tactical = 1, + /obj/item/restraints/legcuffs/beartrap = 1, + /obj/item/food/grown/banana = 1, + /obj/item/food/pie/cream = 1, + /obj/item/dnainjector/clumsymut, + /obj/item/sbeacondrop/clownbomb, + ) + +/datum/outfit/deathmatch_loadout/mime + name = "Deathmatch: Mime" + display_name = "Mime" + desc = "..." + + uniform = /datum/outfit/job/mime::uniform + belt = /obj/item/food/baguette/combat + head = /datum/outfit/job/mime::head + shoes = /datum/outfit/job/mime::shoes + mask = /datum/outfit/job/mime::mask + back = /datum/outfit/job/mime::backpack + box = /datum/outfit/job/mime::box + l_pocket = /obj/item/toy/crayon/spraycan/mimecan + r_pocket = /obj/item/food/grown/banana/mime + neck = /datum/outfit/job/mime::neck + gloves = /datum/outfit/job/mime::gloves + + backpack_contents = list( + /obj/item/reagent_containers/cup/glass/bottle/bottleofnothing, + /obj/item/gun/ballistic/automatic/pistol, + /obj/item/suppressor, + /obj/item/ammo_box/c9mm, + /obj/item/food/croissant/throwing = 2, + ) + + granted_spells = list( + /datum/action/cooldown/spell/vow_of_silence, + /datum/action/cooldown/spell/conjure_item/invisible_box, + /datum/action/cooldown/spell/conjure/invisible_chair, + /datum/action/cooldown/spell/conjure/invisible_wall, + /datum/action/cooldown/spell/forcewall/mime, + /datum/action/cooldown/spell/pointed/projectile/finger_guns, + ) + +/datum/outfit/deathmatch_loadout/chef/upgraded + name = "Deathmatch: Master Chef" + display_name = "Master Chef" + desc = "Let him cook." + + belt = /obj/item/gun/magic/hook + uniform = /obj/item/clothing/under/costume/buttondown/slacks/service + suit = /obj/item/clothing/suit/toggle/chef + suit_store = /obj/item/knife/kitchen + head = /obj/item/clothing/head/utility/chefhat + mask = /obj/item/clothing/mask/fakemoustache/italian + gloves = /obj/item/clothing/gloves/the_sleeping_carp + back = /obj/item/storage/backpack + + backpack_contents = list( + /obj/item/pizzabox/bomb/armed = 3, + /obj/item/knife/butcher, + /obj/item/sharpener, + ) +>>>>>>> 952f9c8c6cd... [MIRROR] some deathmatch fixes [MDB IGNORE] (#3501) diff --git a/code/modules/deathmatch/deathmatch_lobby.dm b/code/modules/deathmatch/deathmatch_lobby.dm index d8665965d55..ee5185cfe1f 100644 --- a/code/modules/deathmatch/deathmatch_lobby.dm +++ b/code/modules/deathmatch/deathmatch_lobby.dm @@ -21,6 +21,8 @@ var/list/modifiers = list() /// Is the modifiers modal menu open (for the host) var/mod_menu_open = FALSE + /// artificial time padding when we start loading to give lighting a breather (admin starts will set this to 0) + var/start_time = 8 SECONDS /datum/deathmatch_lobby/New(mob/player) . = ..() @@ -79,7 +81,7 @@ UnregisterSignal(source, COMSIG_LAZY_TEMPLATE_LOADED) map.template_in_use = FALSE - addtimer(CALLBACK(src, PROC_REF(start_game_after_delay)), 8 SECONDS) + addtimer(CALLBACK(src, PROC_REF(start_game_after_delay)), start_time) /datum/deathmatch_lobby/proc/start_game_after_delay() if (!length(player_spawns) || length(player_spawns) < length(players)) @@ -158,6 +160,14 @@ if(istype(synth_brain)) synth_brain.drop_when_organ_spilling = FALSE // NOVA EDIT ADDITION END + register_player_signals(new_player) + +/datum/deathmatch_lobby/proc/register_player_signals(new_player) + RegisterSignals(new_player, list(COMSIG_LIVING_DEATH, COMSIG_QDELETING, COMSIG_MOB_GHOSTIZED), PROC_REF(player_died)) + RegisterSignal(new_player, COMSIG_LIVING_ON_WABBAJACKED, PROC_REF(player_wabbajacked)) + +/datum/deathmatch_lobby/proc/unregister_player_signals(new_player) + UnregisterSignal(new_player, list(COMSIG_LIVING_DEATH, COMSIG_QDELETING, COMSIG_MOB_GHOSTIZED, COMSIG_LIVING_ON_WABBAJACKED)) /datum/deathmatch_lobby/proc/game_took_too_long() if (!location || QDELING(src)) @@ -178,9 +188,9 @@ for(var/ckey in players) var/mob/loser = players[ckey]["mob"] - UnregisterSignal(loser, list(COMSIG_MOB_GHOSTIZED, COMSIG_QDELETING)) + unregister_player_signals(loser) players[ckey]["mob"] = null - loser.ghostize() + loser.ghostize(can_reenter_corpse = FALSE) qdel(loser) for(var/datum/deathmatch_modifier/modifier in modifiers) @@ -190,12 +200,18 @@ GLOB.deathmatch_game.remove_lobby(host) log_game("Deathmatch game [host] ended.") +/datum/deathmatch_lobby/proc/player_wabbajacked(mob/living/player, mob/living/new_mob) + SIGNAL_HANDLER + unregister_player_signals(player) + players[player.ckey]["mob"] = new_mob + register_player_signals(new_mob) + /datum/deathmatch_lobby/proc/player_died(mob/living/player, gibbed) SIGNAL_HANDLER - if(isnull(player) || QDELING(src)) + if(isnull(player) || QDELING(src) || HAS_TRAIT_FROM(player, TRAIT_NO_TRANSFORM, MAGIC_TRAIT)) //this trait check fixes polymorphing return - var/ckey = player.ckey + var/ckey = player.ckey ? player.ckey : player.mind?.key if(!islist(players[ckey])) // potentially the player info could hold a reference to this mob so we can figure the ckey out without worrying about ghosting and suicides n such for(var/potential_ckey in players) var/list/player_info = players[potential_ckey] @@ -214,8 +230,9 @@ announce(span_reallybig("[player.real_name] HAS DIED.
[players.len] REMAIN.")) - if(!gibbed && !QDELING(player)) + if(!gibbed && !QDELING(player) && !isdead(player)) if(!HAS_TRAIT(src, TRAIT_DEATHMATCH_EXPLOSIVE_IMPLANTS)) + unregister_player_signals(player) player.dust(TRUE, TRUE, TRUE) if (players.len <= 1) end_game() @@ -343,6 +360,7 @@ .["maps"] = list() for (var/map_key in GLOB.deathmatch_game.maps) .["maps"] += map_key + .["maps"] = sort_list(.["maps"]) /datum/deathmatch_lobby/ui_data(mob/user) @@ -506,12 +524,13 @@ if ("admin") // Admin functions if (!check_rights(R_ADMIN)) - message_admins("[usr.key] has attempted to use admin functions in a deathmatch lobby!") + message_admins("[usr.key] has attempted to use admin functions in a deathmatch lobby without being an admin!") log_admin("[key_name(usr)] tried to use the deathmatch lobby admin functions without authorization.") return switch (params["func"]) if ("Force start") log_admin("[key_name(usr)] force started deathmatch lobby [host].") + start_time = 0 start_game() return FALSE diff --git a/code/modules/deathmatch/deathmatch_mapping.dm b/code/modules/deathmatch/deathmatch_mapping.dm index 320b87d2fd1..9f006e15242 100644 --- a/code/modules/deathmatch/deathmatch_mapping.dm +++ b/code/modules/deathmatch/deathmatch_mapping.dm @@ -2,7 +2,7 @@ name = "Deathmatch Arena" requires_power = FALSE has_gravity = STANDARD_GRAVITY - area_flags = UNIQUE_AREA | NOTELEPORT | EVENT_PROTECTED | QUIET_LOGS + area_flags = UNIQUE_AREA | NOTELEPORT | EVENT_PROTECTED | QUIET_LOGS | NO_DEATH_MESSAGE | BINARY_JAMMING /area/deathmatch/fullbright static_lighting = FALSE @@ -12,7 +12,7 @@ name = "Deathmatch Player Spawner" /area/deathmatch/teleport //Prevent access to cross-z teleportation in the map itself (no wands of safety/teleportation scrolls). Cordons should prevent same-z teleportations outside of the arena. - area_flags = UNIQUE_AREA | EVENT_PROTECTED | QUIET_LOGS + area_flags = /area/deathmatch::area_flags & ~NOTELEPORT // for the illusion of a moving train /turf/open/chasm/true/no_smooth/fake_motion_sand diff --git a/code/modules/mob/living/carbon/human/human_say.dm b/code/modules/mob/living/carbon/human/human_say.dm index ae41bad2cf3..00b703c6c71 100644 --- a/code/modules/mob/living/carbon/human/human_say.dm +++ b/code/modules/mob/living/carbon/human/human_say.dm @@ -69,6 +69,9 @@ var/obj/item/radio/headset/dongle = ears if(!istype(dongle)) return FALSE + var/area/our_area = get_area(src) + if(our_area.area_flags & BINARY_JAMMING) + return FALSE return dongle.translate_binary /mob/living/carbon/human/radio(message, list/message_mods = list(), list/spans, language) //Poly has a copy of this, lazy bastard diff --git a/code/modules/mob/living/silicon/silicon_say.dm b/code/modules/mob/living/silicon/silicon_say.dm index b1b8b4bc880..80ff1fe6ff9 100644 --- a/code/modules/mob/living/silicon/silicon_say.dm +++ b/code/modules/mob/living/silicon/silicon_say.dm @@ -70,6 +70,9 @@ ) /mob/living/silicon/binarycheck() + var/area/our_area = get_area(src) + if(our_area.area_flags & BINARY_JAMMING) + return FALSE return TRUE /mob/living/silicon/radio(message, list/message_mods = list(), list/spans, language) diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index 376401bd3a4..31550282b21 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -51,6 +51,8 @@ no power level overlay is currently in the overlays list. var/list/obj/machinery/field/generator/connected_gens = list() ///Check for asynk cleanups for this and the connected gens var/clean_up = FALSE + /// we warm up and cool down instantly + var/instantenous = FALSE /datum/armor/field_generator melee = 25 @@ -207,8 +209,11 @@ no power level overlay is currently in the overlays list. can_atmos_pass = ATMOS_PASS_YES air_update_turf(TRUE, FALSE) INVOKE_ASYNC(src, PROC_REF(cleanup)) - addtimer(CALLBACK(src, PROC_REF(cool_down)), 5 SECONDS) RemoveElement(/datum/element/give_turf_traits, string_list(list(TRAIT_CONTAINMENT_FIELD))) + if(instantenous) + warming_up = 0 + return + addtimer(CALLBACK(src, PROC_REF(cool_down)), 5 SECONDS) /obj/machinery/field/generator/proc/cool_down() if(active || warming_up <= 0) @@ -219,9 +224,14 @@ no power level overlay is currently in the overlays list. addtimer(CALLBACK(src, PROC_REF(cool_down)), 5 SECONDS) /obj/machinery/field/generator/proc/turn_on() + AddElement(/datum/element/give_turf_traits, string_list(list(TRAIT_CONTAINMENT_FIELD))) + if(instantenous) + active = FG_ONLINE + warming_up = 3 + start_fields() + return active = FG_CHARGING addtimer(CALLBACK(src, PROC_REF(warm_up)), 5 SECONDS) - AddElement(/datum/element/give_turf_traits, string_list(list(TRAIT_CONTAINMENT_FIELD))) /obj/machinery/field/generator/proc/warm_up() if(!active) @@ -420,9 +430,20 @@ no power level overlay is currently in the overlays list. state = FG_WELDED /obj/machinery/field/generator/starts_on/Initialize(mapload) + . = ..() + return INITIALIZE_HINT_LATELOAD + +/obj/machinery/field/generator/starts_on/post_machine_initialize() . = ..() turn_on() +/obj/machinery/field/generator/starts_on/magic + power_level = 6 //forces the highest level overlay + instantenous = TRUE + +/obj/machinery/field/generator/starts_on/magic/process() + return PROCESS_KILL // this is the only place calc_power is called, and doing it here avoids one unnecessary proc call + #undef FG_UNSECURED #undef FG_SECURED #undef FG_WELDED