From d3739c41751255e3f2c60a10c77f6f8ac88eb92d Mon Sep 17 00:00:00 2001 From: wraith-54321 <69217972+wraith-54321@users.noreply.github.com> Date: Tue, 17 Oct 2023 17:27:49 -0700 Subject: [PATCH] neat --- _maps/map_files/generic/CentCom.dmm | 155 +++++++++++------- .../ghost_players/arena/arena_items.dm | 5 + .../ghost_players/arena/fight_button.dm | 17 ++ .../ghost_players/centcom_teleporter.dm | 62 +++++++ .../job_helpers/_centcom_item_spawner.dm | 26 +++ .../job_helpers/firing_range_helper.dm | 56 +++++++ tgstation.dme | 4 + 7 files changed, 269 insertions(+), 56 deletions(-) create mode 100644 monkestation/code/modules/ghost_players/arena/arena_items.dm create mode 100644 monkestation/code/modules/ghost_players/centcom_teleporter.dm create mode 100644 monkestation/code/modules/ghost_players/job_helpers/_centcom_item_spawner.dm create mode 100644 monkestation/code/modules/ghost_players/job_helpers/firing_range_helper.dm diff --git a/_maps/map_files/generic/CentCom.dmm b/_maps/map_files/generic/CentCom.dmm index 02154262d717..c60c9ba38930 100644 --- a/_maps/map_files/generic/CentCom.dmm +++ b/_maps/map_files/generic/CentCom.dmm @@ -794,6 +794,13 @@ }, /turf/open/floor/wood/large, /area/centcom/central_command_areas/borbop) +"cX" = ( +/obj/effect/turf_decal/siding/blue{ + dir = 9 + }, +/obj/machinery/smartfridge/chemistry/preloaded, +/turf/open/floor/iron/dark/diagonal, +/area/centcom/central_command_areas/medical) "cY" = ( /obj/structure/fake_stairs/wood/directional/east, /turf/open/floor/wood/large, @@ -2327,6 +2334,10 @@ }, /turf/open/floor/iron, /area/centcom/central_command_areas/supply) +"jM" = ( +/obj/machinery/door/airlock/centcom, +/turf/open/floor/iron/dark/herringbone, +/area/centcom/central_command_areas/medical) "jP" = ( /obj/structure/hedge, /turf/open/floor/carpet, @@ -3439,6 +3450,11 @@ /obj/machinery/light/floor/has_bulb, /turf/open/floor/iron/dark, /area/centcom/tdome/observation) +"pr" = ( +/obj/structure/table/reinforced, +/obj/item/storage/medkit/tactical, +/turf/open/floor/iron/dark, +/area/centcom/central_command_areas/medical) "pt" = ( /obj/structure/table/reinforced/plastitaniumglass, /obj/machinery/fax, @@ -4434,9 +4450,21 @@ /turf/open/floor/iron/dark/herringbone, /area/centcom/central_command_areas/hall) "tD" = ( +/obj/structure/table/reinforced, +/obj/item/reagent_containers/cup/beaker/bluespace, +/obj/item/reagent_containers/cup/beaker/bluespace, +/obj/item/reagent_containers/cup/beaker/bluespace, +/obj/item/reagent_containers/cup/beaker/bluespace, +/obj/item/reagent_containers/cup/beaker/bluespace, +/obj/item/reagent_containers/cup/beaker/bluespace, +/obj/item/reagent_containers/cup/beaker/bluespace, +/obj/item/reagent_containers/cup/beaker/bluespace, +/obj/item/reagent_containers/cup/beaker/bluespace, +/obj/item/reagent_containers/cup/beaker/bluespace, /obj/effect/turf_decal/siding/blue{ dir = 1 }, +/obj/machinery/door/window/right/directional/south, /turf/open/floor/iron/dark/diagonal, /area/centcom/central_command_areas/medical) "tH" = ( @@ -5126,10 +5154,13 @@ /turf/open/floor/wood/large, /area/centcom/central_command_areas/ghost_spawn) "wI" = ( -/obj/effect/turf_decal/siding/wood{ +/obj/effect/turf_decal/siding/blue{ dir = 4 }, -/turf/open/floor/wood/large, +/obj/structure/railing/wood{ + dir = 1 + }, +/turf/open/floor/iron/dark/diagonal, /area/centcom/central_command_areas/medical) "wK" = ( /obj/effect/turf_decal/siding/blue/corner{ @@ -5462,10 +5493,12 @@ /turf/open/floor/wood/large, /area/centcom/central_command_areas/kitchen) "xV" = ( -/obj/effect/turf_decal/siding/wood{ - dir = 8 +/obj/effect/turf_decal/siding/blue{ + dir = 5 }, -/turf/open/floor/wood/large, +/obj/structure/window/reinforced/spawner/directional/south, +/obj/machinery/chem_heater/debug, +/turf/open/floor/iron/dark/diagonal, /area/centcom/central_command_areas/medical) "yb" = ( /obj/effect/turf_decal/siding/wood{ @@ -6359,6 +6392,10 @@ /obj/effect/turf_decal/stripes/line, /turf/open/floor/iron, /area/centcom/central_command_areas/ferry) +"Bo" = ( +/obj/structure/table/reinforced, +/turf/open/floor/iron/dark, +/area/centcom/central_command_areas/botany) "Br" = ( /obj/structure/railing/wood{ dir = 8 @@ -6463,6 +6500,7 @@ "Ca" = ( /obj/structure/railing/wood, /obj/structure/table/reinforced, +/obj/item/storage/medkit/tactical, /turf/open/floor/iron/dark, /area/centcom/central_command_areas/medical) "Cc" = ( @@ -6701,6 +6739,7 @@ /area/centcom/central_command_areas/admin_hangout) "Dr" = ( /obj/structure/table/reinforced, +/obj/item/storage/box/material, /turf/open/floor/iron/dark, /area/centcom/central_command_areas/medical) "Dt" = ( @@ -7972,6 +8011,7 @@ /area/centcom/central_command_areas/borbop) "IA" = ( /obj/machinery/light/floor/has_bulb, +/obj/effect/turf_decal/siding/wood, /turf/open/floor/wood/large, /area/centcom/central_command_areas/medical) "IB" = ( @@ -8334,20 +8374,11 @@ /turf/open/floor/wood/large, /area/centcom/central_command_areas/admin_hangout) "JY" = ( -/obj/structure/table/reinforced, -/obj/item/reagent_containers/cup/beaker/bluespace, -/obj/item/reagent_containers/cup/beaker/bluespace, -/obj/item/reagent_containers/cup/beaker/bluespace, -/obj/item/reagent_containers/cup/beaker/bluespace, -/obj/item/reagent_containers/cup/beaker/bluespace, -/obj/item/reagent_containers/cup/beaker/bluespace, -/obj/item/reagent_containers/cup/beaker/bluespace, -/obj/item/reagent_containers/cup/beaker/bluespace, -/obj/item/reagent_containers/cup/beaker/bluespace, -/obj/item/reagent_containers/cup/beaker/bluespace, -/obj/effect/turf_decal/siding/wood, -/turf/open/floor/wood/large, -/area/centcom/central_command_areas/medical) +/obj/effect/turf_decal/trimline/green/line, +/obj/structure/reagent_dispensers/watertank/high, +/obj/structure/railing/wood, +/turf/open/floor/iron/dark, +/area/centcom/central_command_areas/botany) "Ka" = ( /obj/effect/turf_decal/siding/wood{ dir = 1 @@ -10961,6 +10992,15 @@ /obj/machinery/door/airlock/centcom, /turf/open/floor/iron/dark, /area/centcom/central_command_areas/kitchen) +"UQ" = ( +/obj/effect/turf_decal/siding/blue{ + dir = 8 + }, +/obj/structure/railing/wood{ + dir = 1 + }, +/turf/open/floor/iron/dark/diagonal, +/area/centcom/central_command_areas/medical) "US" = ( /obj/structure/window/plasma/spawner/directional/north, /turf/open/indestructible/hotelwood, @@ -10986,7 +11026,9 @@ /turf/open/floor/carpet/neon/simple/cyan, /area/centcom/central_command_areas/admin) "Vb" = ( -/obj/machinery/door/airlock/centcom, +/obj/structure/railing/wood{ + dir = 1 + }, /turf/open/floor/iron/dark/diagonal, /area/centcom/central_command_areas/medical) "Vc" = ( @@ -11803,7 +11845,8 @@ /turf/open/floor/carpet, /area/centcom/central_command_areas/admin) "YB" = ( -/obj/structure/reagent_dispensers/watertank/high, +/obj/structure/table/reinforced, +/obj/item/storage/box/material, /turf/open/floor/iron/dark, /area/centcom/central_command_areas/botany) "YC" = ( @@ -50088,7 +50131,7 @@ rL dS pG pG -pG +rj rj Xb uQ @@ -51103,7 +51146,7 @@ yG dS dS LK -RX +JY Wi XE tv @@ -52131,7 +52174,7 @@ NJ ms dS LK -RX +JY Wi XE tv @@ -53172,7 +53215,7 @@ et dS pG pG -pG +rj rj Xb uQ @@ -53413,7 +53456,7 @@ aa aa aa gL -YB +Bo LK LK RX @@ -57525,7 +57568,7 @@ aa aa aa dl -Dr +pr Nb Nb YL @@ -57798,7 +57841,7 @@ cR we pG pG -pG +rj rj Xb uQ @@ -58045,11 +58088,11 @@ Nb Nb yj Qm -zp -dl -Kq +vR +Rq +cX wG -UY +Vb UY zH we @@ -58302,11 +58345,11 @@ Nb Nb yj CW +vS zp -Vb tD tk -UY +Vb tk zI WW @@ -58559,11 +58602,11 @@ Nb YL yo NR -zp -dl -OJ -cK +vT +xq +xV cK +wI cK HI WW @@ -59070,12 +59113,12 @@ Nb Zz dl Nb -FF +Ca ux vS vR -xV -Rq +lH +jM rP pw gz @@ -59327,12 +59370,12 @@ Nb XW Cx Nb -Ca +FF Re vS vS IA -JY +dl rP kQ zk @@ -59588,8 +59631,8 @@ Ca ux vS vT -wI -xq +vW +jM rP pw HW @@ -60101,11 +60144,11 @@ Nb YL eK hM -zp -dl -Kq -mr +vR +Rq +cX mr +UQ mr hm WW @@ -60358,11 +60401,11 @@ Nb Nb yj CW +vS zp -Vb tD tk -UY +Vb tk zI WW @@ -60615,11 +60658,11 @@ Nb Nb yj Qm -zp -dl -OJ +vT +xq +xV wK -UY +Vb UY zH we @@ -60882,7 +60925,7 @@ us we pG pG -pG +rj rj Xb uQ diff --git a/monkestation/code/modules/ghost_players/arena/arena_items.dm b/monkestation/code/modules/ghost_players/arena/arena_items.dm new file mode 100644 index 000000000000..7f8b85f43425 --- /dev/null +++ b/monkestation/code/modules/ghost_players/arena/arena_items.dm @@ -0,0 +1,5 @@ +//variant that grants CQC as soon as it is used +/obj/item/book/granter/martial/cqc/fast_read/attack_self(mob/living/user) + uses-- + on_reading_finished(user) + . = ..() diff --git a/monkestation/code/modules/ghost_players/arena/fight_button.dm b/monkestation/code/modules/ghost_players/arena/fight_button.dm index 5bcbb6f429c2..e4324586ec83 100644 --- a/monkestation/code/modules/ghost_players/arena/fight_button.dm +++ b/monkestation/code/modules/ghost_players/arena/fight_button.dm @@ -15,12 +15,23 @@ var/obj/item/weapon_of_choice = /obj/item/storage/toolbox ///the wager in monkecoins thats paid out to the winner var/payout = 0 + ///list of weakrefs to spawned weapons for deletion on duel end + var/list/spawned_weapons = list() + ///what weapons can players choose to duel with var/list/weapon_choices = list( /obj/item/storage/toolbox, /obj/item/knife/shiv, /obj/item/grenade/clusterbuster, /obj/item/spear/bamboospear, + /obj/item/reagent_containers/spray/chemsprayer/magical, //unsure if this would cause issues but they do already have access to a full chem lab so it should be fine + /obj/item/gun/energy/laser/instakill, //first to hit the other wins, very fast matches + /obj/item/melee/baton/security/loaded, + /obj/item/chainsaw, + /obj/item/melee/energy/sword/saber, + /obj/item/book/granter/martial/cqc/fast_read, + /obj/item/gravity_gun, + /obj/item/melee/energy/axe, ) /obj/structure/fight_button/Initialize(mapload) @@ -138,6 +149,7 @@ player_two.fully_heal() var/obj/item/one_weapon = new weapon_of_choice(src) + spawned_weapons += WEAKREF(one_weapon) var/turf/one_spot = locate(148, 34, SSmapping.levels_by_trait(ZTRAIT_CENTCOM)[1]) player_one.forceMove(one_spot) player_one.equipOutfit(/datum/outfit/job/assistant) @@ -145,6 +157,7 @@ player_one.dueling = TRUE var/obj/item/two_weapon = new weapon_of_choice(src) + spawned_weapons += WEAKREF(two_weapon) var/turf/two_spot = locate(164, 34, SSmapping.levels_by_trait(ZTRAIT_CENTCOM)[1]) player_two.forceMove(two_spot) player_two.equipOutfit(/datum/outfit/job/assistant) @@ -168,3 +181,7 @@ payout = 0 update_maptext() + for(var/datum/weakref/weapon in spawned_weapons) + var/obj/item/spawned_weapon = weapon?.resolve() + if(spawned_weapon) + qdel(spawned_weapon) diff --git a/monkestation/code/modules/ghost_players/centcom_teleporter.dm b/monkestation/code/modules/ghost_players/centcom_teleporter.dm new file mode 100644 index 000000000000..fafac17213dc --- /dev/null +++ b/monkestation/code/modules/ghost_players/centcom_teleporter.dm @@ -0,0 +1,62 @@ +#define RIGHTS_NONE "none" +//can be used to teleport to any other centcom_teleporter(admin teleporters can only be used by people with R_ADMIN) +/obj/structure/centcom_teleporter + name = "centcom teleporter" + desc = "Can teleport you to any other centcom teleporter you have access to." + + resistance_flags = INDESTRUCTIBLE + anchored = TRUE + + icon = 'icons/obj/money_machine.dmi' + icon_state = "bogdanoff" + ///static assoc list of lists of centcom teleporters, keyed to strings of what rights they require to use + var/static/list/all_teleporters = list() + ///what rights do we need to be used + var/needed_rights = RIGHTS_NONE + +/obj/structure/centcom_teleporter/Initialize(mapload) + . = ..() + if(!all_teleporters["[needed_rights]"]) + all_teleporters["[needed_rights]"] = list(src) + else + all_teleporters["[needed_rights]"] += src + +/obj/structure/centcom_teleporter/Destroy() + all_teleporters["[needed_rights]"] -= src + return ..() + +/obj/structure/centcom_teleporter/attack_hand(mob/living/user, list/modifiers) + . = ..() + if(!user.client || !check_rights_for(user.client, needed_rights)) + return + + var/list/choice_list = list() + for(var/teleporter_list in all_teleporters) + if((teleporter_list == RIGHTS_NONE) || check_rights_for(user.client, text2num(teleporter_list))) + choice_list += all_teleporters[teleporter_list] + + var/obj/structure/centcom_teleporter/choice = tgui_input_list(user, "Where do you want to teleport to?", "Teleporter", choice_list) + if((choice.needed_rights != RIGHTS_NONE) && !check_rights_for(user.client, choice.needed_rights)) + to_chat(user, span_warning("You dont have the admin rights to teleport here.")) + message_admins("[user][ADMIN_LOOKUPFLW(user)] is trying to use a centcom teleporter they dont have access to.") //these should not be visible to them so tell admins + return + + do_teleport(user, get_turf(choice), no_effects = TRUE, forced = TRUE) + +/obj/structure/centcom_teleporter/spawn_area + name = "spawn area teleporter" + +/obj/structure/centcom_teleporter/arena + name = "arena teleporter" + +/obj/structure/centcom_teleporter/cargo + name = "centcom cargo teleporter" + needed_rights = R_ADMIN + +/obj/structure/centcom_teleporter/admin_offices + name = "admin offices teleporter" + +/obj/structure/centcom_teleporter/firing_range + name = "firing range teleporter" + +#undef RIGHTS_NONE diff --git a/monkestation/code/modules/ghost_players/job_helpers/_centcom_item_spawner.dm b/monkestation/code/modules/ghost_players/job_helpers/_centcom_item_spawner.dm new file mode 100644 index 000000000000..361dbb92089a --- /dev/null +++ b/monkestation/code/modules/ghost_players/job_helpers/_centcom_item_spawner.dm @@ -0,0 +1,26 @@ +/obj/structure/centcom_item_spawner + name = "centcom item spawner" + desc = "This is the abstract type of an object, you should not see this." + resistance_flags = INDESTRUCTIBLE + anchored = TRUE + icon = 'icons/obj/money_machine.dmi' + icon_state = "bogdanoff" + ///types this spawner will not be able to spawn + var/list/blacklisted_items = list() + ///assoc list of category name stings as keys with lists of what types they can spawn as values + var/list/items_to_spawn = list() + +/obj/structure/centcom_item_spawner/Initialize(mapload) + . = ..() + build_items_to_spawn() + +/obj/structure/centcom_item_spawner/attack_hand(mob/living/user, list/modifiers) + . = ..() + var/choice = tgui_input_list(user, "What do you wish to fabricate?", "[src.name]", items_to_spawn) + if(!choice) + return + var/list/choice_list = + +///build our items to spawn, override this +/obj/structure/centcom_item_spawner/proc/build_items_to_spawn() + return diff --git a/monkestation/code/modules/ghost_players/job_helpers/firing_range_helper.dm b/monkestation/code/modules/ghost_players/job_helpers/firing_range_helper.dm new file mode 100644 index 000000000000..769ee0869519 --- /dev/null +++ b/monkestation/code/modules/ghost_players/job_helpers/firing_range_helper.dm @@ -0,0 +1,56 @@ +/obj/structure/gun_and_ammo_creator + name = "firing range fabrication device" + desc = "Able to print most guns and ammo your heart could ever desire.(not liable for any damages)" + resistance_flags = INDESTRUCTIBLE + anchored = TRUE + icon = 'icons/obj/money_machine.dmi' + icon_state = "bogdanoff" + blacklisted_items = list( + /obj/item/gun/blastcannon, + /obj/item/gun/medbeam, + /obj/item/gun/energy/e_gun/dragnet, + /obj/item/gun/energy/laser/instakill, + /obj/item/gun/energy/meteorgun, + /obj/item/gun/energy/minigun, //might runtime + /obj/item/gun/energy/pulse/prize, //dont spam ghosts + /obj/item/gun/energy/shrink_ray, + /obj/item/gun/energy/xray, + /obj/item/gun/energy/mindflayer, + /obj/item/gun/magic/bloodchill, + /obj/item/gun/magic/wand/safety, + /obj/item/gun/magic/wand/teleport, + /obj/item/gun/magic/wand/polymorph, + /obj/item/gun/magic/wand/death, + /obj/item/gun/magic/tentacle, + /obj/item/gun/magic/wand/door, + /obj/item/gun/magic/staff/change, + /obj/item/gun/magic/staff/chaos, + /obj/item/gun/magic/staff/door, + /obj/item/gun/magic/staff/flying, + /obj/item/gun/magic/staff/honk, + /obj/item/gun/magic/staff/necropotence, + /obj/item/gun/magic/staff/wipe, + /obj/item/ammo_box/magazine/internal, + /obj/item/ammo_box/c38/trac, + /obj/item/ammo_box/magazine/m556/phasic, + /obj/item/ammo_box/magazine/sniper_rounds/penetrator + ) +/obj/item/ammo_box/magazine +/obj/item/ammo_box/magazine/toy +//blocks passage if you have a gun +/obj/effect/gun_check_blocker + name = "anti gun barrier" + desc = "\"No guns outside the designated area\" is printed below it." + icon = 'goon/icons/obj/meteor_shield.dmi' + icon_state = "shieldw" + color = COLOR_RED + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + +/obj/effect/gun_check_blocker/CanPass(atom/movable/mover, border_dir) + if(istype(mover, /obj/item/gun)) + return FALSE + for(var/object in mover.get_all_contents()) + if(istype(object, /obj/item/gun)) + return FALSE + return ..() + diff --git a/tgstation.dme b/tgstation.dme index 43a71fe4e469..1fcbbf7a2446 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -5854,8 +5854,10 @@ #include "monkestation\code\modules\events\wizard\summon_gifts.dm" #include "monkestation\code\modules\food_and_drinks\recipes\boiling.dm" #include "monkestation\code\modules\ghost_players\area_changes.dm" +#include "monkestation\code\modules\ghost_players\centcom_teleporter.dm" #include "monkestation\code\modules\ghost_players\ghost_player.dm" #include "monkestation\code\modules\ghost_players\arena\arena_cleanser.dm" +#include "monkestation\code\modules\ghost_players\arena\arena_items.dm" #include "monkestation\code\modules\ghost_players\arena\fight_button.dm" #include "monkestation\code\modules\ghost_players\arena\map_templates.dm" #include "monkestation\code\modules\ghost_players\arena\arena_assets\alien.dm" @@ -5865,6 +5867,8 @@ #include "monkestation\code\modules\ghost_players\arena\arena_assets\fish.dm" #include "monkestation\code\modules\ghost_players\arena\arena_assets\statues.dm" #include "monkestation\code\modules\ghost_players\arena\arena_assets\water.dm" +#include "monkestation\code\modules\ghost_players\job_helpers\_centcom_item_spawner.dm" +#include "monkestation\code\modules\ghost_players\job_helpers\firing_range_helper.dm" #include "monkestation\code\modules\ghost_players\job_helpers\food_machine.dm" #include "monkestation\code\modules\ghost_players\job_helpers\hydroponics_helper.dm" #include "monkestation\code\modules\ghost_players\job_helpers\injured_spawner.dm"