mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
Adds TGMC Tactical maps to the game and to Nuclear Operatives! (#96068)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request Brought to you by Team Powercrèpe.(same group of people that delivered the Heretic Overhaul) This PR ports the TGMC Tacmaps and grants em to our NukeOps. Code by Me, @Xander3359, @Arturlang, @Absolucy. Mapping by @RipGrayson Sprites by @KillerOrcaCora Writing bits by @necromanceranne Tacmaps are essentially dynamically generated minimaps, <img width="1711" height="1335" alt="Tac map examples" src="https://github.com/user-attachments/assets/f936fac0-fb7c-4b84-970d-7195b4995ca7" /> <img width="1274" height="714" alt="Tac-Maps Icons" src="https://github.com/user-attachments/assets/0f04e388-af4b-4955-be7a-04650cfd746b" /> As you can see from the screenshots above, departments are classified by color, hovering your cursor over an area or a team mate, will display their name, the system does allow the user to switch between Multi-Z, and lastly you can draw and add labels to the map, although the last option is only available to the NukeOps Leader and OW agents. The functionality is tied to the Syndicate implants nukies start with, Cayenne, Syndie borgs and Mechs also have the ability to toggle the map. Likewise, the tacmaps will display the positioning of the following in real time! - Nuke ops agents - Syndie borgs and Mechs - Cayenne - Location of the nuclear fission device (and beer nuke) - Location of the Nuclear Authentication Disk. <img width="1274" height="714" alt="SkyBridge OFF" src="https://github.com/user-attachments/assets/3915e7d7-644a-4e9a-b213-997834dde2ea" /> <img width="1274" height="714" alt="SkyBridge ON" src="https://github.com/user-attachments/assets/13748290-fd16-42ba-a9c4-a6b4f7e69c79" /> <img width="566" height="459" alt="Holo table done" src="https://github.com/user-attachments/assets/1a43c5b7-ee51-4794-9c09-16b4fb50e2ad" /> https://github.com/user-attachments/assets/caf38538-ef04-4330-992c-3137a67ea0d0 Lastly The tactiical map implant cannot be be used on the nuke ops base,If the team wishes to interact with the map they'll have to Interact with the "Reconnaisance Platform" (Sprite by Orcacora) in the briefing room, which has seen some mapping changes (Brought to you by TheLastGrayson). <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> ## Why It's Good For The Game Originally this feature was planned for the Upcoming Contractor Rework our team is currently working on, but given the massive size of it all, we decided to atomize it. But without that consideration in mind, I think it makes sense for Nuclear operatives of all antagonists to have the means to Recon and plot an assault plan onto the station and actually be able to know the whereabouts of their teammates. Obviously this feature has a lot of other potential applications, we have wanted to have functional Maps for a very long time, if someone wants to give it a go once the feature is merged, by all means. <!-- Argue for the merits of your changes and how they benefit the game, especially if they are controversial and/or far reaching. If you can't actually explain WHY what you are doing will improve the game, then it probably isn't good for the game in the first place. --> ## Changelog <!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Be sure to properly mark your PRs to prevent unnecessary GBP loss. You can read up on GBP and its effects on PRs in the tgstation guides for contributors. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. --> 🆑 add: Tactical Maps have been added to the game! add: Nuclear Operatives implants now grant the ability to open a Minimap, this map will display and show the names of various areas of the station, and the positioning of the Nukeops team,borgs,mechs,Cayenne and the nuke disk in real time! add: Nukie leaders and OW agents can also draw and apply labels to the map. add: the "Recoinassance Platform" has been added to the Nukie Base, it allows displaying of the Tactical maps while on the Syndicate Base Z level. map: The briefing room in the NukeOps base has been remapped to better accomodate the new Holographic table. map: Changed the front shutters on the Syndicate Infiltrator to the more fitting Syndicate Shutters. /🆑 <!-- Both 🆑's are required for the changelog to work! You can put your name to the right of the first 🆑 if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. --> --------- Co-authored-by: Xander3359 <66163761+Xander3359@users.noreply.github.com> Co-authored-by: Artur Lang <24881678+Arturlang@users.noreply.github.com> Co-authored-by: Lucy <lucy@absolucy.moe> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: RipGrayson <49290523+RipGrayson@users.noreply.github.com> Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
This commit is contained in:
co-authored by
Xander3359
Artur Lang
Lucy
Copilot
RipGrayson
necromanceranne
parent
cd3f6184bd
commit
0bd4b0820f
@@ -0,0 +1,120 @@
|
||||
/obj/item/implant/tacmap
|
||||
name = "tactical map implant"
|
||||
desc = "provides you with a map"
|
||||
actions_types = list(/datum/action/minimap)
|
||||
var/wearer_icon_state = null
|
||||
/// Optional z-trait that resolves to the first z-level and locks the minimap there.
|
||||
var/minimap_fixed_z_trait
|
||||
/// Whether this implant allows drawing/labeling on the personal minimap HUD.
|
||||
var/can_draw_on_personal_minimap = FALSE
|
||||
var/static/list/minimap_refresh_signals = list(
|
||||
COMSIG_MOB_STATCHANGE,
|
||||
COMSIG_LIVING_REVIVE,
|
||||
COMSIG_MOB_GHOSTIZED,
|
||||
)
|
||||
|
||||
/obj/item/implant/tacmap/implant(mob/living/target, mob/user, silent, force)
|
||||
. = ..()
|
||||
if(.)
|
||||
configure_minimap_action()
|
||||
RegisterSignals(target, minimap_refresh_signals, PROC_REF(refresh_minimap_icon))
|
||||
addtimer(CALLBACK(src, PROC_REF(update_minimap_icon), target), 0.1 SECONDS) // Mobs are spawned inside nullspace sometimes so this avoids that hijinks.
|
||||
|
||||
/obj/item/implant/tacmap/removed(mob/living/source, silent, special)
|
||||
UnregisterSignal(source, minimap_refresh_signals)
|
||||
remove_minimap(source)
|
||||
return ..()
|
||||
|
||||
///Remove all action of type minimap from the wearer, and make him disappear from the minimap
|
||||
/obj/item/implant/tacmap/proc/remove_minimap(mob/user)
|
||||
remove_minimap_blip(MINIMAP_NUKEOP_BLIP, user)
|
||||
|
||||
/obj/item/implant/tacmap/proc/refresh_minimap_icon()
|
||||
SIGNAL_HANDLER
|
||||
if(imp_in)
|
||||
update_minimap_icon(imp_in)
|
||||
|
||||
/obj/item/implant/tacmap/proc/resolve_fixed_minimap_z_level()
|
||||
if(!isnull(minimap_fixed_z_trait))
|
||||
var/list/trait_levels = SSmapping.levels_by_trait(minimap_fixed_z_trait)
|
||||
if(length(trait_levels))
|
||||
return trait_levels[1]
|
||||
return null
|
||||
|
||||
/obj/item/implant/tacmap/proc/configure_minimap_action()
|
||||
var/datum/action/minimap/minimap_action = locate(/datum/action/minimap) in actions
|
||||
if(isnull(minimap_action))
|
||||
return
|
||||
minimap_action.fixed_z_level = resolve_fixed_minimap_z_level()
|
||||
minimap_action.can_draw = can_draw_on_personal_minimap
|
||||
|
||||
/obj/item/implant/tacmap/proc/get_minimap_icon_state(mob/living/wearer)
|
||||
return wearer_icon_state
|
||||
|
||||
///Updates the wearer's minimap icon
|
||||
/obj/item/implant/tacmap/proc/update_minimap_icon(mob/wearer)
|
||||
SIGNAL_HANDLER
|
||||
remove_minimap_blip(MINIMAP_NUKEOP_BLIP, wearer)
|
||||
add_minimap_blip(wearer, MINIMAP_NUKEOP_BLIP, get_minimap_icon_state(wearer))
|
||||
|
||||
/obj/item/implant/tacmap/nuclear // Nukie subtype, map shows you nuke disk, operatives, cayenne and the nuke
|
||||
actions_types = list(/datum/action/minimap/nuclear)
|
||||
wearer_icon_state = "syndicate"
|
||||
|
||||
/obj/item/implant/tacmap/nuclear/implant(mob/living/target, mob/user, silent, force)
|
||||
. = ..()
|
||||
if(.)
|
||||
RegisterSignal(target, COMSIG_MINIMAP_ACTION_TRIGGER, PROC_REF(deny_nukie_base_open))
|
||||
|
||||
/obj/item/implant/tacmap/nuclear/get_minimap_icon_state(mob/living/wearer)
|
||||
if(wearer.stat != DEAD && istype(wearer, /mob/living/basic/carp/pet/cayenne))
|
||||
return "cayenne"
|
||||
. = ..()
|
||||
|
||||
/obj/item/implant/tacmap/nuclear/removed(mob/living/source, silent, special)
|
||||
UnregisterSignal(source, COMSIG_MINIMAP_ACTION_TRIGGER)
|
||||
return ..()
|
||||
|
||||
/obj/item/implant/tacmap/nuclear/proc/deny_nukie_base_open(mob/living/user)
|
||||
var/turf/user_turf = get_turf(user)
|
||||
if(user_turf.onSyndieBase())
|
||||
user.balloon_alert(user, "can't use implant in the base, go to the holotable!")
|
||||
return COMSIG_MINIMAP_ACTION_TRIGGER_CANCEL
|
||||
|
||||
/obj/item/implant/tacmap/nuclear/cayenne // subtype used for cayenne and syndie sentience potions in general
|
||||
wearer_icon_state = "cayenne"
|
||||
|
||||
/obj/item/implant/tacmap/nuclear/leader // Leader subtype lets him draw on the map
|
||||
actions_types = list(/datum/action/minimap/nuclear)
|
||||
can_draw_on_personal_minimap = TRUE
|
||||
wearer_icon_state = "syndicate_leader"
|
||||
|
||||
/obj/item/implant/tacmap/nuclear/leader/implant(mob/living/target, mob/user, silent, force)
|
||||
. = ..()
|
||||
if(.)
|
||||
ADD_TRAIT(target, TRAIT_MINIMAP_TABLE_DRAW, REF(src))
|
||||
|
||||
/obj/item/implant/tacmap/nuclear/leader/removed(mob/living/source, silent, special)
|
||||
REMOVE_TRAIT(source, TRAIT_MINIMAP_TABLE_DRAW, REF(src))
|
||||
return ..()
|
||||
|
||||
// Subtype that just lets them open it off-base.
|
||||
/obj/item/implant/tacmap/nuclear/offbase
|
||||
minimap_fixed_z_trait = ZTRAIT_STATION
|
||||
can_draw_on_personal_minimap = TRUE
|
||||
|
||||
/obj/item/implant/tacmap/nuclear/offbase/deny_nukie_base_open(mob/living/user)
|
||||
return
|
||||
|
||||
/obj/item/implanter/tacmap
|
||||
name = "implanter (minimap)"
|
||||
imp_type = /obj/item/implant/tacmap
|
||||
|
||||
/obj/item/implanter/tacmap/nuclear
|
||||
name = "implanter (operative minimap)"
|
||||
imp_type = /obj/item/implant/tacmap/nuclear
|
||||
|
||||
/obj/item/implantcase/tacmap
|
||||
name = "implant case - 'Tactical Map'"
|
||||
desc = "A glass case containing an implant with a virtual map."
|
||||
imp_type = /obj/item/implant/tacmap
|
||||
@@ -764,6 +764,8 @@
|
||||
new /obj/item/book/manual/nuclear(src) // Very important
|
||||
// The most important part of the kit, the implant that gives them the syndicate faction.
|
||||
new /obj/item/implanter/induction_implant(src)
|
||||
// Tactical map implant so they can see the minimap with the rest of the team.
|
||||
new /obj/item/implanter/tacmap/nuclear(src)
|
||||
// All in all, 6+3+3+2+5+2+4 = ~25 TC of 'miscellaneous' items.
|
||||
// This is a lot of value for 10 TC, but you have to keep in mind that you NEED someone to get this stuff station-side.
|
||||
// Pretty much all of it is a bad deal for reinforcements or yourself as they already have similar or good-enough alternatives.
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
icon = 'icons/obj/fence.dmi'
|
||||
icon_state = "straight"
|
||||
tacmap_color = TACMAP_FENCE
|
||||
|
||||
var/cuttable = TRUE
|
||||
var/hole_size= NO_HOLE
|
||||
|
||||
@@ -165,6 +165,7 @@
|
||||
|
||||
down.up = null
|
||||
down.update_appearance(UPDATE_ICON_STATE)
|
||||
down.update_minimap_blip()
|
||||
down = null
|
||||
update_appearance(UPDATE_ICON_STATE)
|
||||
clear_base_transparency()
|
||||
@@ -188,6 +189,7 @@
|
||||
up.down = null
|
||||
up.clear_base_transparency()
|
||||
up.update_appearance(UPDATE_ICON_STATE)
|
||||
up.update_minimap_blip()
|
||||
up = null
|
||||
update_appearance(UPDATE_ICON_STATE)
|
||||
|
||||
@@ -196,6 +198,11 @@
|
||||
unlink_down()
|
||||
unlink_up()
|
||||
|
||||
/obj/structure/ladder/proc/update_minimap_blip()
|
||||
remove_minimap_blip(MINIMAP_LADDER_BLIP, src)
|
||||
if(up || down)
|
||||
add_minimap_blip(src, MINIMAP_LADDER_BLIP, "ladder")
|
||||
|
||||
/obj/structure/ladder/LateInitialize()
|
||||
// By default, discover ladders above and below us vertically
|
||||
var/turf/base = get_turf(src)
|
||||
@@ -213,6 +220,7 @@
|
||||
// Linking updates our icon, so if we failed both links we need a manual update
|
||||
if(isnull(down) && isnull(up))
|
||||
update_appearance(UPDATE_ICON_STATE)
|
||||
update_minimap_blip()
|
||||
|
||||
/obj/structure/ladder/update_icon_state()
|
||||
icon_state = "[base_icon_state][!!up][!!down]"
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
/// Range within which stair indicators will appear for approaching mobs
|
||||
#define STAIR_INDICATOR_RANGE 3
|
||||
/// Minimum tile spacing between stair minimap blips
|
||||
#define STAIR_BLIP_MIN_DISTANCE 2
|
||||
|
||||
// dir determines the direction of travel to go upwards
|
||||
// stairs require /turf/open/openspace as the tile above them to work, unless your stairs have 'force_open_above' set to TRUE
|
||||
@@ -27,6 +29,8 @@
|
||||
VAR_FINAL/turf/directly_above
|
||||
/// If TRUE, we have left/middle/right sprites.
|
||||
var/has_merged_sprites = TRUE
|
||||
/// Current atoms used as this stair's minimap blip targets.
|
||||
var/list/minimap_blip_targets
|
||||
/// Lazyassoc list of weakef to mob viewing stair indicators to their images
|
||||
VAR_PRIVATE/list/mob_to_image
|
||||
|
||||
@@ -63,6 +67,7 @@
|
||||
force_open_above()
|
||||
build_signal_listener()
|
||||
update_surrounding()
|
||||
update_minimap_blip()
|
||||
|
||||
var/static/list/exit_connections = list(
|
||||
COMSIG_ATOM_EXIT = PROC_REF(on_exit_stairs),
|
||||
@@ -78,6 +83,7 @@
|
||||
|
||||
|
||||
/obj/structure/stairs/Destroy()
|
||||
clear_minimap_blips()
|
||||
if(directly_above)
|
||||
UnregisterSignal(directly_above, COMSIG_TURF_MULTIZ_NEW)
|
||||
directly_above = null
|
||||
@@ -104,6 +110,47 @@
|
||||
|
||||
for(var/obj/structure/stairs/stair in get_step(src, turn(dir, -90)))
|
||||
stair.update_appearance()
|
||||
update_minimap_blip()
|
||||
|
||||
/obj/structure/stairs/proc/update_minimap_blip()
|
||||
var/bottom_state = isTerminator() ? "stairs_up" : "stairs_down"
|
||||
var/top_state = (bottom_state == "stairs_up") ? "stairs_down" : "stairs_up"
|
||||
var/turf/current_turf = get_turf(src)
|
||||
|
||||
clear_minimap_blips()
|
||||
if(isnull(current_turf))
|
||||
return
|
||||
|
||||
add_minimap_blip_if_valid(current_turf, bottom_state)
|
||||
add_minimap_blip_if_valid(get_step_multiz(current_turf, UP), top_state)
|
||||
|
||||
/obj/structure/stairs/proc/clear_minimap_blips()
|
||||
if(!islist(minimap_blip_targets))
|
||||
return
|
||||
for(var/atom/target as anything in minimap_blip_targets)
|
||||
remove_minimap_blip(MINIMAP_STAIR_BLIP, target)
|
||||
LAZYCLEARLIST(minimap_blip_targets)
|
||||
|
||||
/obj/structure/stairs/proc/add_minimap_blip_if_valid(atom/target, state)
|
||||
if(isnull(target))
|
||||
return
|
||||
if(!should_place_minimap_blip(target))
|
||||
return
|
||||
|
||||
var/atom/movable/screen/minimap_element/blip/blip = get_minimap_blip(MINIMAP_STAIR_BLIP, target)
|
||||
if(!isnull(blip))
|
||||
blip.icon_state = state
|
||||
else
|
||||
add_minimap_blip(target, MINIMAP_STAIR_BLIP, state)
|
||||
LAZYADD(minimap_blip_targets, target)
|
||||
|
||||
/obj/structure/stairs/proc/should_place_minimap_blip(atom/target)
|
||||
var/turf/target_turf = get_turf(target)
|
||||
if(isnull(target_turf))
|
||||
return FALSE
|
||||
if(length(get_minimap_blips_in_area(MINIMAP_STAIR_BLIP, target_turf, STAIR_BLIP_MIN_DISTANCE)))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/stairs/update_icon_state()
|
||||
. = ..()
|
||||
@@ -420,3 +467,4 @@
|
||||
#undef STAIR_TERMINATOR_YES
|
||||
|
||||
#undef STAIR_INDICATOR_RANGE
|
||||
#undef STAIR_BLIP_MIN_DISTANCE
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
flags_ricochet = RICOCHET_HARD
|
||||
receive_ricochet_chance_mod = 0.5
|
||||
custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT)
|
||||
tacmap_color = TACMAP_WINDOW
|
||||
var/state = WINDOW_OUT_OF_FRAME
|
||||
var/reinf = FALSE
|
||||
var/heat_resistance = 800
|
||||
|
||||
Reference in New Issue
Block a user