diff --git a/code/__defines/map.dm b/code/__defines/map.dm new file mode 100644 index 0000000000..9419415e1c --- /dev/null +++ b/code/__defines/map.dm @@ -0,0 +1,8 @@ +// Z-level flags bitfield - Set these flags to determine the z level's purpose +#define MAP_LEVEL_STATION 0x001 // Z-levels the station exists on +#define MAP_LEVEL_ADMIN 0x002 // Z-levels for admin functionality (Centcom, shuttle transit, etc) +#define MAP_LEVEL_CONTACT 0x004 // Z-levels that can be contacted from the station, for eg announcements +#define MAP_LEVEL_PLAYER 0x008 // Z-levels a character can typically reach +#define MAP_LEVEL_SEALED 0x010 // Z-levels that don't allow random transit at edge +#define MAP_LEVEL_EMPTY 0x020 // Empty Z-levels that may be used for various things (currently used by bluespace jump) +#define MAP_LEVEL_CONSOLES 0x040 // Z-levels available to various consoles, such as the crew monitor (when that gets coded in). Defaults to station_levels if unset. diff --git a/code/datums/repositories/crew.dm b/code/datums/repositories/crew.dm index 6fbe1863da..ae73c98c8d 100644 --- a/code/datums/repositories/crew.dm +++ b/code/datums/repositories/crew.dm @@ -7,12 +7,12 @@ var/global/datum/repository/crew/crew_repository = new() cache_data = list() ..() -/datum/repository/crew/proc/health_data(var/turf/T) +/datum/repository/crew/proc/health_data(var/zLevel) var/list/crewmembers = list() - if(!T) + if(!zLevel) return crewmembers - var/z_level = "[T.z]" + var/z_level = "[zLevel]" var/datum/cache_entry/cache_entry = cache_data[z_level] if(!cache_entry) cache_entry = new/datum/cache_entry @@ -24,7 +24,7 @@ var/global/datum/repository/crew/crew_repository = new() var/tracked = scan() for(var/obj/item/clothing/under/C in tracked) var/turf/pos = get_turf(C) - if((C) && (C.has_sensor) && (pos) && (T && pos.z == T.z) && (C.sensor_mode != SUIT_SENSOR_OFF)) + if((C) && (C.has_sensor) && (pos) && (pos.z == zLevel) && (C.sensor_mode != SUIT_SENSOR_OFF)) if(istype(C.loc, /mob/living/carbon/human)) var/mob/living/carbon/human/H = C.loc if(H.w_uniform != C) @@ -51,6 +51,7 @@ var/global/datum/repository/crew/crew_repository = new() crewmemberData["area"] = sanitize(A.name) crewmemberData["x"] = pos.x crewmemberData["y"] = pos.y + crewmemberData["z"] = pos.z crewmembers[++crewmembers.len] = crewmemberData diff --git a/code/game/antagonist/station/traitor.dm b/code/game/antagonist/station/traitor.dm index 6bbc1d0606..4c96f5ce17 100644 --- a/code/game/antagonist/station/traitor.dm +++ b/code/game/antagonist/station/traitor.dm @@ -9,6 +9,8 @@ var/datum/antagonist/traitor/traitors /datum/antagonist/traitor/auto id = MODE_AUTOTRAITOR allow_latejoin = 1 + hard_cap = 4 + initial_spawn_target = 4 /datum/antagonist/traitor/New() ..() diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 32a58c5dbe..4a77ec2c84 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -266,9 +266,11 @@ var/list/mob/living/forced_ambiance_list = new if(istype(mob,/mob/living/carbon/human/)) var/mob/living/carbon/human/H = mob + if(H.buckled) + return // Being buckled to something solid keeps you in place. if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.item_flags & NOSLIP)) return - + if(H.m_intent == "run") H.AdjustStunned(6) H.AdjustWeakened(6) diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 244598ad09..36974b159f 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -35,7 +35,6 @@ return viewflag /obj/machinery/computer/security/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1) - if(src.z > 6) return if(stat & (NOPOWER|BROKEN)) return if(user.stat) return @@ -48,6 +47,7 @@ data["cameras"] = camera_repository.cameras_in_network(current_network) if(current_camera) switch_to_camera(user, current_camera) + data["map_levels"] = using_map.get_map_levels(src.z) ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) @@ -91,7 +91,7 @@ . = ..() /obj/machinery/computer/security/attack_hand(var/mob/user as mob) - if (src.z > 6) + if (using_map && !(src.z in using_map.contact_levels)) user << "Unable to establish a connection: You're too far away from the station!" return if(stat & (NOPOWER|BROKEN)) return diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 0703d9f7e1..a8b6ee2424 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -52,7 +52,7 @@ /obj/machinery/computer/communications/Topic(href, href_list) if(..()) return 1 - if (using_map && !(src.z in using_map.station_levels)) + if (using_map && !(src.z in using_map.contact_levels)) usr << "\red Unable to establish a connection: \black You're too far away from the station!" return usr.set_machine(src) @@ -274,7 +274,7 @@ /obj/machinery/computer/communications/attack_hand(var/mob/user as mob) if(..()) return - if (src.z > 6) + if (using_map && !(src.z in using_map.contact_levels)) user << "\red Unable to establish a connection: \black You're too far away from the station!" return diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm index abbf65b44f..8def6db394 100644 --- a/code/game/machinery/computer/law.dm +++ b/code/game/machinery/computer/law.dm @@ -26,7 +26,7 @@ attackby(obj/item/weapon/O as obj, mob/user as mob) - if (user.z > 6) + if (using_map && !(user.z in using_map.contact_levels)) user << "Unable to establish a connection: You're too far away from the station!" return if(istype(O, /obj/item/weapon/aiModule)) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 465884b2ca..1179d3a2b2 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -56,7 +56,7 @@ /obj/machinery/computer/secure_data/attack_hand(mob/user as mob) if(..()) return - if (src.z > 6) + if (using_map && !(src.z in using_map.contact_levels)) user << "Unable to establish a connection: You're too far away from the station!" return var/dat diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index bd9c66dbae..fb92e700ff 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -39,7 +39,7 @@ /obj/machinery/computer/skills/attack_hand(mob/user as mob) if(..()) return - if (src.z > 6) + if (using_map && !(src.z in using_map.contact_levels)) user << "Unable to establish a connection: You're too far away from the station!" return var/dat diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 013001e388..b3c2c23f64 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -19,18 +19,24 @@ /obj/machinery/computer/teleporter/initialize() ..() - var/obj/machinery/teleport/station/station = locate(/obj/machinery/teleport/station, get_step(src, dir)) + var/obj/machinery/teleport/station/station var/obj/machinery/teleport/hub/hub - if(station) - hub = locate(/obj/machinery/teleport/hub, get_step(station, dir)) + + // Search surrounding turfs for the station, and then search the station's surrounding turfs for the hub. + for(var/direction in cardinal) + station = locate(/obj/machinery/teleport/station, get_step(src, direction)) + if(station) + for(direction in cardinal) + hub = locate(/obj/machinery/teleport/hub, get_step(station, direction)) + if(hub) + break + break if(istype(station)) station.com = hub - station.set_dir(dir) if(istype(hub)) hub.com = src - hub.set_dir(dir) /obj/machinery/computer/teleporter/attackby(I as obj, mob/living/user as mob) if(istype(I, /obj/item/weapon/card/data/)) diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index f456a95d73..8dfe627030 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -42,6 +42,7 @@ M.facing_dir = null M.set_dir(buckle_dir ? buckle_dir : dir) M.update_canmove() + M.update_floating( M.Check_Dense_Object() ) buckled_mob = M post_buckle_mob(M) @@ -53,6 +54,7 @@ buckled_mob.buckled = null buckled_mob.anchored = initial(buckled_mob.anchored) buckled_mob.update_canmove() + buckled_mob.update_floating( buckled_mob.Check_Dense_Object() ) buckled_mob = null post_buckle_mob(.) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index a4a2197288..62d1399095 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -176,6 +176,7 @@ var/list/admin_verbs_debug = list( /client/proc/debug_controller, /client/proc/debug_antagonist_template, /client/proc/cmd_debug_mob_lists, + /client/proc/cmd_debug_using_map, /client/proc/cmd_admin_delete, /client/proc/cmd_debug_del_all, /client/proc/cmd_debug_tog_aliens, @@ -286,6 +287,7 @@ var/list/admin_verbs_hideable = list( /client/proc/debug_controller, /client/proc/startSinglo, /client/proc/cmd_debug_mob_lists, + /client/proc/cmd_debug_using_map, /client/proc/cmd_debug_del_all, /client/proc/cmd_debug_tog_aliens, /client/proc/air_report, diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index f06ab9ca33..82206fdc30 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -943,6 +943,15 @@ if("Clients") usr << jointext(clients,",") +/client/proc/cmd_debug_using_map() + set category = "Debug" + set name = "Debug Map Datum" + set desc = "Debug the map metadata about the currently compiled in map." + + if(!check_rights(R_DEBUG)) + return + debug_variables(using_map) + // DNA2 - Admin Hax /client/proc/cmd_admin_toggle_block(var/mob/M,var/block) if(!ticker) diff --git a/code/modules/busy_space/organizations.dm b/code/modules/busy_space/organizations.dm index 439e1f1b7f..84f694d2ef 100644 --- a/code/modules/busy_space/organizations.dm +++ b/code/modules/busy_space/organizations.dm @@ -326,12 +326,12 @@ // Military /datum/lore/organization/mil/sif_guard - name = "Sif Homeguard Forces" // Todo: Get better name from lorepeople. + name = "Sif Defense Force" // Todo: Get better name from lorepeople. short_name = "SifGuard" desc = "" history = "" work = "Sif Governmental Authority's military" - headquarters = "Sif" // Make this more specific later. + headquarters = "New Reykjavik, Sif" motto = "" autogenerate_destination_names = FALSE // Kinda weird if SifGuard goes to Nyx. diff --git a/code/modules/client/preference_setup/loadout/loadout_suit.dm b/code/modules/client/preference_setup/loadout/loadout_suit.dm index bc22cbad24..871c31ec34 100644 --- a/code/modules/client/preference_setup/loadout/loadout_suit.dm +++ b/code/modules/client/preference_setup/loadout/loadout_suit.dm @@ -383,4 +383,12 @@ /datum/gear/suit/miscellaneous/med_dep_jacket display_name = "department jacket, medical" - path = /obj/item/clothing/suit/storage/toggle/med_dep_jacket \ No newline at end of file + path = /obj/item/clothing/suit/storage/toggle/med_dep_jacket + +/datum/gear/suit/miscellaneous/peacoat + display_name = "peacoat" + path = /obj/item/clothing/suit/storage/toggle/peacoat + +/datum/gear/suit/miscellaneous/peacoat/New() + ..() + gear_tweaks = list(gear_tweak_free_color_choice) \ No newline at end of file diff --git a/code/modules/client/preference_setup/loadout/loadout_uniform.dm b/code/modules/client/preference_setup/loadout/loadout_uniform.dm index 9789da99d7..8974cc004d 100644 --- a/code/modules/client/preference_setup/loadout/loadout_uniform.dm +++ b/code/modules/client/preference_setup/loadout/loadout_uniform.dm @@ -446,4 +446,16 @@ /datum/gear/uniform/yogapants/New() ..() - gear_tweaks = list(gear_tweak_free_color_choice) \ No newline at end of file + gear_tweaks = list(gear_tweak_free_color_choice) + +/datum/gear/uniform/black_corset + display_name = "black corset" + path = /obj/item/clothing/under/dress/black_corset + +/datum/gear/uniform/flower_dress + display_name = "flower dress" + path = /obj/item/clothing/under/dress/flower_dress + +/datum/gear/uniform/red_swept_dress + display_name = "red swept dress" + path = /obj/item/clothing/under/dress/red_swept_dress \ No newline at end of file diff --git a/code/modules/clothing/head/solgov.dm b/code/modules/clothing/head/solgov.dm index f7d4c417b4..bd9ef27f4b 100644 --- a/code/modules/clothing/head/solgov.dm +++ b/code/modules/clothing/head/solgov.dm @@ -12,7 +12,7 @@ /obj/item/clothing/head/soft/sol/expedition name = "\improper SifGuard cap" - desc = "It's a black ballcap bearing a Sif Homeguard Corps crest." + desc = "It's a black ballcap bearing a Sif Defense Force crest." icon_state = "expeditionsoft" item_state_slots = list( slot_l_hand_str = "blacksoft", @@ -115,12 +115,12 @@ /obj/item/clothing/head/dress/expedition name = "\improper SifGuard dress cap" - desc = "A peaked grey dress uniform cap belonging to the Sif Homeguard Corps." + desc = "A peaked grey dress uniform cap belonging to the Sif Defense Force." icon_state = "greydresscap" /obj/item/clothing/head/dress/expedition/command name = "\improper SifGuard command dress cap" - desc = "A peaked grey dress uniform cap belonging to the Sif Homeguard Corps. This one is trimmed in gold." + desc = "A peaked grey dress uniform cap belonging to the Sif Defense Force. This one is trimmed in gold." icon_state = "greydresscap_com" /obj/item/clothing/head/dress/fleet @@ -150,11 +150,6 @@ desc = "A beret in Solar Confederate Government colors. For peacekeepers that are more inclined towards style than safety." icon_state = "beret_lightblue" -/obj/item/clothing/head/beret/sol/homeguard - name = "home guard beret" - desc = "A red beret denoting service in the Sol Home Guard. For personnel that are more inclined towards style than safety." - icon_state = "beret_red" - /obj/item/clothing/head/beret/sol/gateway name = "gateway administration beret" desc = "An orange beret denoting service in the Gateway Administration. For personnel that are more inclined towards style than safety." @@ -182,32 +177,32 @@ /obj/item/clothing/head/beret/sol/expedition name = "\improper SifGuard beret" - desc = "A black beret belonging to the Sif Homeguard Corps. For personnel that are more inclined towards style than safety." + desc = "A black beret belonging to the Sif Defense Force. For personnel that are more inclined towards style than safety." icon_state = "beret_black" /obj/item/clothing/head/beret/sol/expedition/security name = "\improper SifGuard security beret" - desc = "An Sif Homeguard Corps beret with a security crest. For personnel that are more inclined towards style than safety." + desc = "A Sif Defense Force beret with a security crest. For personnel that are more inclined towards style than safety." icon_state = "beret_black_security" /obj/item/clothing/head/beret/sol/expedition/medical name = "\improper SifGuard medical beret" - desc = "An Sif Homeguard Corps beret with a medical crest. For personnel that are more inclined towards style than safety." + desc = "A Sif Defense Force beret with a medical crest. For personnel that are more inclined towards style than safety." icon_state = "beret_black_medical" /obj/item/clothing/head/beret/sol/expedition/engineering name = "\improper SifGuard engineering beret" - desc = "An Sif Homeguard Corps beret with an engineering crest. For personnel that are more inclined towards style than safety." + desc = "A Sif Defense Force beret with an engineering crest. For personnel that are more inclined towards style than safety." icon_state = "beret_black_engineering" /obj/item/clothing/head/beret/sol/expedition/supply name = "\improper SifGuard supply beret" - desc = "An Sif Homeguard Corps beret with a supply crest. For personnel that are more inclined towards style than safety." + desc = "A Sif Defense Force beret with a supply crest. For personnel that are more inclined towards style than safety." icon_state = "beret_black_supply" /obj/item/clothing/head/beret/sol/expedition/command name = "\improper SifGuard command beret" - desc = "An Sif Homeguard Corps beret with a command crest. For personnel that are more inclined towards style than safety." + desc = "A Sif Defense Force beret with a command crest. For personnel that are more inclined towards style than safety." icon_state = "beret_black_command" /obj/item/clothing/head/beret/sol/fleet diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index cd345fc8aa..7ce74c610e 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -340,6 +340,12 @@ obj/item/clothing/suit/kimono item_state_slots = list(slot_r_hand_str = "leather_jacket", slot_l_hand_str = "leather_jacket") flags_inv = HIDEHOLSTER +obj/item/clothing/suit/storage/toggle/peacoat + name = "peacoat" + desc = "A well-tailored, stylish peacoat." + icon_state = "peacoat" + item_state_slots = list(slot_r_hand_str = "peacoat", slot_l_hand_str = "peacoat") + flags_inv = HIDEHOLSTER /* * stripper */ diff --git a/code/modules/clothing/suits/solgov.dm b/code/modules/clothing/suits/solgov.dm index 87e4ca02fb..154772fe68 100644 --- a/code/modules/clothing/suits/solgov.dm +++ b/code/modules/clothing/suits/solgov.dm @@ -14,47 +14,47 @@ /obj/item/clothing/suit/storage/service/expeditionary name = "\improper SifGuard jacket" - desc = "A uniform service jacket belonging to the Sif Homeguard Corps. It has silver buttons." + desc = "A uniform service jacket belonging to the Sif Defense Force. It has silver buttons." icon_state = "blackservice_crew" /obj/item/clothing/suit/storage/service/expeditionary/medical name = "\improper SifGuard medical jacket" - desc = "A uniform service jacket belonging to the Sif Homeguard Corps. It has silver buttons and blue trim." + desc = "A uniform service jacket belonging to the Sif Defense Force. It has silver buttons and blue trim." icon_state = "blackservice_med" /obj/item/clothing/suit/storage/service/expeditionary/medical/command name = "\improper SifGuard medical command jacket" - desc = "A uniform service jacket belonging to the Sif Homeguard Corps. It has gold buttons and blue trim." + desc = "A uniform service jacket belonging to the Sif Defense Force. It has gold buttons and blue trim." icon_state = "blackservice_medcom" /obj/item/clothing/suit/storage/service/expeditionary/engineering name = "\improper SifGuard engineering jacket" - desc = "A uniform service jacket belonging to the Sif Homeguard Corps. It has silver buttons and orange trim." + desc = "A uniform service jacket belonging to the Sif Defense Force. It has silver buttons and orange trim." icon_state = "blackservice_eng" /obj/item/clothing/suit/storage/service/expeditionary/engineering/command name = "\improper SifGuard engineering command jacket" - desc = "A uniform service jacket belonging to the Sif Homeguard Corps. It has gold buttons and orange trim." + desc = "A uniform service jacket belonging to the Sif Defense Force. It has gold buttons and orange trim." icon_state = "blackservice_engcom" /obj/item/clothing/suit/storage/service/expeditionary/supply name = "\improper SifGuard supply jacket" - desc = "A uniform service jacket belonging to the Sif Homeguard Corps. It has silver buttons and brown trim." + desc = "A uniform service jacket belonging to the Sif Defense Force. It has silver buttons and brown trim." icon_state = "blackservice_sup" /obj/item/clothing/suit/storage/service/expeditionary/security name = "\improper SifGuard security jacket" - desc = "A uniform service jacket belonging to the Sif Homeguard Corps. It has silver buttons and red trim." + desc = "A uniform service jacket belonging to the Sif Defense Force. It has silver buttons and red trim." icon_state = "blackservice_sec" /obj/item/clothing/suit/storage/service/expeditionary/security/command name = "\improper SifGuard security command jacket" - desc = "A uniform service jacket belonging to the Sif Homeguard Corps. It has gold buttons and red trim." + desc = "A uniform service jacket belonging to the Sif Defense Force. It has gold buttons and red trim." icon_state = "blackservice_seccom" /obj/item/clothing/suit/storage/service/expeditionary/command name = "\improper SifGuard command jacket" - desc = "A uniform service jacket belonging to the Sif Homeguard Corps. It has gold buttons and gold trim." + desc = "A uniform service jacket belonging to the Sif Defense Force. It has gold buttons and gold trim." icon_state = "blackservice_com" /obj/item/clothing/suit/storage/service/marine @@ -115,13 +115,13 @@ allowed = list(/obj/item/weapon/tank/emergency/oxygen,/obj/item/device/flashlight,/obj/item/clothing/head/soft,/obj/item/clothing/head/beret,/obj/item/device/radio,/obj/item/weapon/pen) /obj/item/clothing/suit/dress/expedition - name = "expeditionary dress jacket" - desc = "A silver and grey dress jacket belonging to the SCG Expeditionary Corps. Fashionable, for the 25th century at least." + name = "SifGuard dress jacket" + desc = "A silver and grey dress jacket belonging to the Sif Defense Force. Fashionable, for the 25th century at least." icon_state = "greydress" /obj/item/clothing/suit/dress/expedition/command - name = "expeditionary command dress jacket" - desc = "A gold and grey dress jacket belonging to the SCG Expeditionary Corps. The height of fashion." + name = "SifGuard command dress jacket" + desc = "A gold and grey dress jacket belonging to the Sif Defense Force. The height of fashion." icon_state = "greydress_com" /obj/item/clothing/suit/storage/toggle/dress @@ -136,7 +136,7 @@ desc = "A crisp white SCG Fleet dress jacket with blue and gold accents. Don't get near pasta sauce or vox." /obj/item/clothing/suit/storage/toggle/dress/fleet/command - name = "expeditionary command dress jacket" + name = "fleet command dress jacket" desc = "A crisp white SCG Fleet dress jacket dripping with gold accents. So bright it's blinding." icon_state = "whitedress_com" item_state = "labcoat" diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index 4dc7d78feb..6521bdf622 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -374,6 +374,21 @@ icon_state = "huresource" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS +/obj/item/clothing/under/dress/black_corset + name = "black corset" + desc = "A black corset and skirt for those fancy nights out." + icon_state = "black_corset" + +/obj/item/clothing/under/dress/flower_dress + name = "flower dress" + desc = "A beautiful dress with a skirt of flowers." + icon_state = "flower_dress" + +/obj/item/clothing/under/dress/red_swept_dress + name = "red swept dress" + desc = "A red dress that sweeps to the side." + icon_state = "red_swept_dress" + /* * wedding stuff */ diff --git a/code/modules/clothing/under/solgov.dm b/code/modules/clothing/under/solgov.dm index 114f386b76..040f7630b1 100644 --- a/code/modules/clothing/under/solgov.dm +++ b/code/modules/clothing/under/solgov.dm @@ -12,7 +12,7 @@ /obj/item/clothing/under/pt/expeditionary name = "\improper SifGuard pt uniform" - desc = "A baggy shirt bearing the seal of the Sif Homeguard Corps and some dorky looking blue shorts." + desc = "A baggy shirt bearing the seal of the Sif Defense Force and some dorky looking blue shorts." icon_state = "expeditionpt" worn_state = "expeditionpt" @@ -41,56 +41,56 @@ /obj/item/clothing/under/utility/expeditionary name = "\improper SifGuard uniform" - desc = "The utility uniform of the Sif Homeguard Corps, made from biohazard resistant material. This one has silver trim." + desc = "The utility uniform of the Sif Defense Force, made from biohazard resistant material. This one has silver trim." icon_state = "blackutility_crew" worn_state = "blackutility_crew" armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 10) /obj/item/clothing/under/utility/expeditionary/medical name = "\improper SifGuard medical uniform" - desc = "The utility uniform of the Sif Homeguard Corps, made from biohazard resistant material. This one has silver trim and blue blazes." + desc = "The utility uniform of the Sif Defense Force, made from biohazard resistant material. This one has silver trim and blue blazes." icon_state = "blackutility_med" worn_state = "blackutility_med" /obj/item/clothing/under/utility/expeditionary/medical/command name = "\improper SifGuard medical command uniform" - desc = "The utility uniform of the Sif Homeguard Corps, made from biohazard resistant material. This one has gold trim and blue blazes." + desc = "The utility uniform of the Sif Defense Force, made from biohazard resistant material. This one has gold trim and blue blazes." icon_state = "blackutility_medcom" worn_state = "blackutility_medcom" /obj/item/clothing/under/utility/expeditionary/engineering name = "\improper SifGuard engineering uniform" - desc = "The utility uniform of the Sif Homeguard Corps, made from biohazard resistant material. This one has silver trim and organge blazes." + desc = "The utility uniform of the Sif Defense Force, made from biohazard resistant material. This one has silver trim and organge blazes." icon_state = "blackutility_eng" worn_state = "blackutility_eng" /obj/item/clothing/under/utility/expeditionary/engineering/command name = "\improper SifGuard engineering command uniform" - desc = "The utility uniform of the Sif Homeguard Corps, made from biohazard resistant material. This one has gold trim and organge blazes." + desc = "The utility uniform of the Sif Defense Force, made from biohazard resistant material. This one has gold trim and organge blazes." icon_state = "blackutility_engcom" worn_state = "blackutility_engcom" /obj/item/clothing/under/utility/expeditionary/supply name = "\improper SifGuard supply uniform" - desc = "The utility uniform of the Sif Homeguard Corps, made from biohazard resistant material. This one has silver trim and brown blazes." + desc = "The utility uniform of the Sif Defense Force, made from biohazard resistant material. This one has silver trim and brown blazes." icon_state = "blackutility_sup" worn_state = "blackutility_sup" /obj/item/clothing/under/utility/expeditionary/security name = "\improper SifGuard security uniform" - desc = "The utility uniform of the Sif Homeguard Corps, made from biohazard resistant material. This one has silver trim and red blazes." + desc = "The utility uniform of the Sif Defense Force, made from biohazard resistant material. This one has silver trim and red blazes." icon_state = "blackutility_sec" worn_state = "blackutility_sec" /obj/item/clothing/under/utility/expeditionary/security/command name = "\improper SifGuard security command uniform" - desc = "The utility uniform of the Sif Homeguard Corps, made from biohazard resistant material. This one has gold trim and red blazes." + desc = "The utility uniform of the Sif Defense Force, made from biohazard resistant material. This one has gold trim and red blazes." icon_state = "blackutility_seccom" worn_state = "blackutility_seccom" /obj/item/clothing/under/utility/expeditionary/command name = "\improper SifGuard command uniform" - desc = "The utility uniform of the Sif Homeguard Corps, made from biohazard resistant material. This one has gold trim and gold blazes." + desc = "The utility uniform of the Sif Defense Force, made from biohazard resistant material. This one has gold trim and gold blazes." icon_state = "blackutility_com" worn_state = "blackutility_com" @@ -222,13 +222,13 @@ /obj/item/clothing/under/mildress/expeditionary name = "\improper SifGuard dress uniform" - desc = "The dress uniform of the Sif Homeguard Corps in silver trim." + desc = "The dress uniform of the Sif Defense Force in silver trim." icon_state = "greydress" worn_state = "greydress" /obj/item/clothing/under/mildress/expeditionary/command name = "\improper SifGuard command dress uniform" - desc = "The dress uniform of the Sif Homeguard Corps in gold trim." + desc = "The dress uniform of the Sif Defense Force in gold trim." icon_state = "greydress_com" worn_state = "greydress_com" diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 1924bd5e78..8a2513a54a 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -274,6 +274,9 @@ var/global/list/damage_icon_parts = list() if(part.robotic >= ORGAN_ROBOT) icon_key += "2[part.model ? "-[part.model]": ""]" + robolimb_count++ + if(part.organ_tag == BP_HEAD || part.organ_tag == BP_TORSO || part.organ_tag == BP_GROIN) + robobody_count ++ else if(part.status & ORGAN_DEAD) icon_key += "3" else diff --git a/code/modules/nano/modules/atmos_control.dm b/code/modules/nano/modules/atmos_control.dm index b84cacad0a..742696396b 100644 --- a/code/modules/nano/modules/atmos_control.dm +++ b/code/modules/nano/modules/atmos_control.dm @@ -32,15 +32,27 @@ /datum/nano_module/atmos_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state) var/data[0] var/alarms[0] + var/turf/T = get_turf(nano_host()) // TODO: Move these to a cache, similar to cameras for(var/obj/machinery/alarm/alarm in (monitored_alarms.len ? monitored_alarms : machines)) - alarms[++alarms.len] = list("name" = sanitize(alarm.name), "ref"= "\ref[alarm]", "danger" = max(alarm.danger_level, alarm.alarm_area.atmosalm)) + alarms[++alarms.len] = list( + "name" = sanitize(alarm.name), + "ref"= "\ref[alarm]", + "danger" = max(alarm.danger_level, alarm.alarm_area.atmosalm), + "x" = alarm.x, + "y" = alarm.y, + "z" = alarm.z) data["alarms"] = alarms + data["map_levels"] = using_map.get_map_levels(T.z) ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "atmos_control.tmpl", src.name, 625, 625, state = state) + // adding a template with the key "mapContent" enables the map ui functionality + ui.add_template("mapContent", "atmos_control_map_content.tmpl") + // adding a template with the key "mapHeader" replaces the map header content + ui.add_template("mapHeader", "atmos_control_map_header.tmpl") ui.set_initial_data(data) ui.open() ui.set_auto_update(1) diff --git a/code/modules/nano/modules/crew_monitor.dm b/code/modules/nano/modules/crew_monitor.dm index e71dc5ac7e..8a6ef7624e 100644 --- a/code/modules/nano/modules/crew_monitor.dm +++ b/code/modules/nano/modules/crew_monitor.dm @@ -20,7 +20,10 @@ var/turf/T = get_turf(nano_host()) data["isAI"] = isAI(user) - data["crewmembers"] = crew_repository.health_data(T) + data["map_levels"] = using_map.get_map_levels(T.z, FALSE) + data["crewmembers"] = list() + for(var/z in (data["map_levels"] | T.z)) // Always show crew from the current Z even if we can't show a map + data["crewmembers"] += crew_repository.health_data(z) ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) @@ -30,6 +33,8 @@ ui.add_template("mapContent", "crew_monitor_map_content.tmpl") // adding a template with the key "mapHeader" replaces the map header content ui.add_template("mapHeader", "crew_monitor_map_header.tmpl") + if(!(ui.map_z_level in data["map_levels"])) + ui.set_map_z_level(data["map_levels"][1]) ui.set_initial_data(data) ui.open() diff --git a/code/modules/nano/modules/power_monitor.dm b/code/modules/nano/modules/power_monitor.dm index 94223fc4ef..89e1dbda62 100644 --- a/code/modules/nano/modules/power_monitor.dm +++ b/code/modules/nano/modules/power_monitor.dm @@ -12,6 +12,7 @@ var/list/sensors = list() // Focus: If it remains null if no sensor is selected and UI will display sensor list, otherwise it will display sensor reading. var/obj/machinery/power/sensor/focus = null + var/turf/T = get_turf(nano_host()) // Build list of data from sensor readings. for(var/obj/machinery/power/sensor/S in grid_sensors) @@ -25,10 +26,15 @@ data["all_sensors"] = sensors if(focus) data["focus"] = focus.return_reading_data() + data["map_levels"] = using_map.get_map_levels(T.z) ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "power_monitor.tmpl", "Power Monitoring Console", 800, 500, state = state) + // adding a template with the key "mapContent" enables the map ui functionality + ui.add_template("mapContent", "power_monitor_map_content.tmpl") + // adding a template with the key "mapHeader" replaces the map header content + ui.add_template("mapHeader", "power_monitor_map_header.tmpl") ui.set_initial_data(data) ui.open() ui.set_auto_update(1) diff --git a/code/modules/power/sensors/powernet_sensor.dm b/code/modules/power/sensors/powernet_sensor.dm index 27e434b562..bfc8959139 100644 --- a/code/modules/power/sensors/powernet_sensor.dm +++ b/code/modules/power/sensors/powernet_sensor.dm @@ -163,6 +163,10 @@ // Cell Status APC_entry["cell_charge"] = A.cell ? round(A.cell.percent()) : "NO CELL" APC_entry["cell_status"] = A.cell ? chg[A.charging+1] : "N" + // Location + APC_entry["x"] = A.x + APC_entry["y"] = A.y + APC_entry["z"] = A.z // Other info APC_entry["total_load"] = reading_to_text(A.lastused_total) // Hopefully removes those goddamn \improper s which are screwing up the UI diff --git a/code/modules/projectiles/guns/projectile/boltaction.dm b/code/modules/projectiles/guns/projectile/boltaction.dm index b38ca554e0..cbc403c4e0 100644 --- a/code/modules/projectiles/guns/projectile/boltaction.dm +++ b/code/modules/projectiles/guns/projectile/boltaction.dm @@ -2,29 +2,29 @@ /obj/item/weapon/gun/projectile/shotgun/pump/rifle name = "bolt action rifle" - desc = "A reproduction of an almost ancient weapon design from the early 20th century. It's still popular among hunters and collectors due to its reliability. Uses 5.56mm rounds." + desc = "A reproduction of an almost ancient weapon design from the early 20th century. It's still popular among hunters and collectors due to its reliability. Uses 7.62mm rounds." item_state = "boltaction" icon_state = "boltaction" fire_sound = 'sound/weapons/rifleshot.ogg' max_shells = 5 - caliber = "a556" + caliber = "a762" origin_tech = list(TECH_COMBAT = 1)// Old as shit rifle doesn't have very good tech. - ammo_type = /obj/item/ammo_casing/a556 + ammo_type = /obj/item/ammo_casing/a762 load_method = SINGLE_CASING|SPEEDLOADER action_sound = 'sound/weapons/riflebolt.ogg' /obj/item/weapon/gun/projectile/shotgun/pump/rifle/practice // For target practice - desc = "A bolt-action rifle with a lightweight synthetic wood stock, designed for competitive shooting. Comes shipped with practice rounds pre-loaded into the gun. Popular among professional marksmen. Uses 5.56mm rounds." - ammo_type = /obj/item/ammo_casing/a556p + desc = "A bolt-action rifle with a lightweight synthetic wood stock, designed for competitive shooting. Comes shipped with practice rounds pre-loaded into the gun. Popular among professional marksmen. Uses 7.62mm rounds." + ammo_type = /obj/item/ammo_casing/a762p /obj/item/weapon/gun/projectile/shotgun/pump/rifle/ceremonial name = "ceremonial bolt-action rifle" desc = "A bolt-action rifle with a heavy, high-quality wood stock that has a beautiful finish. Clearly not intended to be used in combat. Uses 5.56mm rounds." - ammo_type = /obj/item/ammo_casing/a556/blank + ammo_type = /obj/item/ammo_casing/a762/blank /obj/item/weapon/gun/projectile/shotgun/pump/rifle/mosin name = "\improper Mosin Nagant" - desc = "Despite its age, the Mosin Nagant continues to be a favorite weapon among colonists, conscripts, and militias across the cosmos. Most today are built by Chen-Iltchenko Firearms, but it's hard to say who built this particular gun, considering the design has been ripped off by just about every arms manufacturer in the galaxy. Uses 5.56mm rounds." + desc = "Despite its age, the Mosin Nagant continues to be a favorite weapon among colonists, conscripts, and militias across the cosmos. Most today are built by Chen-Iltchenko Firearms, but it's hard to say who built this particular gun, considering the design has been ripped off by just about every arms manufacturer in the galaxy. Uses 7.62mm rounds." icon_state = "mosin" item_state = "mosin" diff --git a/html/changelogs/Leshana-gravity-thunk.yml b/html/changelogs/Leshana-gravity-thunk.yml new file mode 100644 index 0000000000..a5603bd050 --- /dev/null +++ b/html/changelogs/Leshana-gravity-thunk.yml @@ -0,0 +1,4 @@ +author: Leshana +delete-after: True +changes: + - tweak: "During the gravity failure event, you can now buckle yourself to a chair to prevent falling when gravity returns." diff --git a/html/changelogs/Leshana-mapz.yml b/html/changelogs/Leshana-mapz.yml new file mode 100644 index 0000000000..1b5544383c --- /dev/null +++ b/html/changelogs/Leshana-mapz.yml @@ -0,0 +1,4 @@ +author: Leshana +delete-after: True +changes: +- rscadd: "Added an admin verb to debug the map datum." diff --git a/html/changelogs/Leshana-multiz-consoles.yml b/html/changelogs/Leshana-multiz-consoles.yml new file mode 100644 index 0000000000..55e771e4d2 --- /dev/null +++ b/html/changelogs/Leshana-multiz-consoles.yml @@ -0,0 +1,32 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +author: Leshana +delete-after: True +changes: + - rscadd: "Added nanomap capability to the Power Monitoring Computer" + - rscadd: "Added nanomap capability to the Atmos Control Computer" + - tweak: "Expanded nanomap on Camera Console to all station z-levels by default." + - tweak: "Crew Monitoring nanomap will support crew monitors built on other station map z levels." + - imageadd: "Updated z1 nanomap for Northern Star" + - imageadd: "Generated z5 nanomap for Northern Star" diff --git a/icons/mob/items/lefthand_suits.dmi b/icons/mob/items/lefthand_suits.dmi index 3658248f88..fda150d16f 100644 Binary files a/icons/mob/items/lefthand_suits.dmi and b/icons/mob/items/lefthand_suits.dmi differ diff --git a/icons/mob/items/lefthand_uniforms.dmi b/icons/mob/items/lefthand_uniforms.dmi index 3eef346891..7deef45a4a 100644 Binary files a/icons/mob/items/lefthand_uniforms.dmi and b/icons/mob/items/lefthand_uniforms.dmi differ diff --git a/icons/mob/items/righthand_suits.dmi b/icons/mob/items/righthand_suits.dmi index 7b4f3eada5..6b88f909ed 100644 Binary files a/icons/mob/items/righthand_suits.dmi and b/icons/mob/items/righthand_suits.dmi differ diff --git a/icons/mob/items/righthand_uniforms.dmi b/icons/mob/items/righthand_uniforms.dmi index 3fa28bca6b..506482dee8 100644 Binary files a/icons/mob/items/righthand_uniforms.dmi and b/icons/mob/items/righthand_uniforms.dmi differ diff --git a/icons/mob/suit.dmi b/icons/mob/suit.dmi index b2eb9c72fe..c5464b5336 100644 Binary files a/icons/mob/suit.dmi and b/icons/mob/suit.dmi differ diff --git a/icons/mob/uniform.dmi b/icons/mob/uniform.dmi index 428ab27ad8..37c85a0837 100644 Binary files a/icons/mob/uniform.dmi and b/icons/mob/uniform.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index c1183a4e93..549f90747a 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ diff --git a/icons/obj/clothing/uniforms.dmi b/icons/obj/clothing/uniforms.dmi index a399164c59..a7fed692ad 100644 Binary files a/icons/obj/clothing/uniforms.dmi and b/icons/obj/clothing/uniforms.dmi differ diff --git a/maps/example/example_defines.dm b/maps/example/example_defines.dm index 3c7ae5d30e..a0a9967f5d 100644 --- a/maps/example/example_defines.dm +++ b/maps/example/example_defines.dm @@ -9,26 +9,7 @@ lobby_icon = 'icons/misc/title.dmi' lobby_screens = list("mockingjay00") - station_levels = list( - Z_LEVEL_FIRST_EXAMPLE, - Z_LEVEL_SECOND_EXAMPLE - ) - - admin_levels = list() - contact_levels = list( - Z_LEVEL_FIRST_EXAMPLE, - Z_LEVEL_SECOND_EXAMPLE - ) - - player_levels = list( - Z_LEVEL_FIRST_EXAMPLE, - Z_LEVEL_SECOND_EXAMPLE - ) - - sealed_levels = list() - empty_levels = list() - accessible_z_levels = list("1" = 50, "2" = 50) // The defines can't be used here sadly. - base_turf_by_z = list("2" = /turf/simulated/open) + zlevel_datum_type = /datum/map_z_level/example station_name = "The Funhouse" station_short = "Funhouse" @@ -46,4 +27,17 @@ emergency_shuttle_docked_message = "The Emergency Shuttle has docked with the station at docks one and two. You have approximately %ETD% to board the Emergency Shuttle." emergency_shuttle_leaving_dock = "The Emergency Shuttle has left the station. Estimate %ETA% until the shuttle docks at %dock_name%." emergency_shuttle_called_message = "An emergency evacuation shuttle has been called. It will arrive at docks one and two in approximately %ETA%" - emergency_shuttle_recall_message = "The emergency shuttle has been recalled." \ No newline at end of file + emergency_shuttle_recall_message = "The emergency shuttle has been recalled." + +/datum/map_z_level/example/first + z = Z_LEVEL_FIRST_EXAMPLE + name = "First Floor" + flags = MAP_LEVEL_STATION|MAP_LEVEL_CONTACT|MAP_LEVEL_PLAYER + transit_chance = 50 + +/datum/map_z_level/example/second + z = Z_LEVEL_SECOND_EXAMPLE + name = "Second Floor" + flags = MAP_LEVEL_STATION|MAP_LEVEL_CONTACT|MAP_LEVEL_PLAYER + transit_chance = 50 + base_turf = /turf/simulated/open diff --git a/maps/northern_star/northern_star_defines.dm b/maps/northern_star/northern_star_defines.dm index aeb1426de2..350026fbf4 100644 --- a/maps/northern_star/northern_star_defines.dm +++ b/maps/northern_star/northern_star_defines.dm @@ -14,34 +14,7 @@ lobby_icon = 'icons/misc/title.dmi' lobby_screens = list("mockingjay00") - station_levels = list( - Z_LEVEL_MAIN_NORTHERN_STAR, - Z_LEVEL_MINING_NORTHERN_STAR - ) - - admin_levels = list(Z_LEVEL_CENTCOM_NORTHERN_STAR) - contact_levels = list( - Z_LEVEL_MAIN_NORTHERN_STAR, - Z_LEVEL_CENTCOM_NORTHERN_STAR, - Z_LEVEL_MINING_NORTHERN_STAR - ) - - player_levels = list( - Z_LEVEL_MAIN_NORTHERN_STAR, - Z_LEVEL_TELECOMMS_NORTHERN_STAR, - Z_LEVEL_ABANDONED_ASTEROID_NORTHERN_STAR, - Z_LEVEL_MINING_NORTHERN_STAR, - Z_LEVEL_EMPTY_NORTHERN_STAR - ) - - sealed_levels = list() - empty_levels = list() - accessible_z_levels = list("1" = 5, "3" = 10, "4" = 15, "5" = 10, "6" = 60) // The defines can't be used here sadly. - base_turf_by_z = list( - "1" = /turf/simulated/mineral/floor, - "4" = /turf/simulated/mineral/floor, - "5" = /turf/simulated/mineral/floor - ) + zlevel_datum_type = /datum/map_z_level/northern_star station_name = "NCS Northern Star" station_short = "Northern Star" @@ -92,4 +65,42 @@ new /datum/random_map/automata/cave_system(null, 1, 1, Z_LEVEL_MINING_NORTHERN_STAR, world.maxx, world.maxy) // Create the mining Z-level. new /datum/random_map/noise/ore(null, 1, 1, Z_LEVEL_MINING_NORTHERN_STAR, 64, 64) // Create the mining ore distribution map. - return 1 \ No newline at end of file + return 1 + +/datum/map_z_level/northern_star/main + z = Z_LEVEL_MAIN_NORTHERN_STAR + name = "Main" + flags = MAP_LEVEL_STATION|MAP_LEVEL_CONTACT|MAP_LEVEL_PLAYER + transit_chance = 5 + base_turf = /turf/simulated/mineral/floor + +/datum/map_z_level/northern_star/centcomm + z = Z_LEVEL_CENTCOM_NORTHERN_STAR + name = "Centcomm" + flags = MAP_LEVEL_ADMIN|MAP_LEVEL_CONTACT + +/datum/map_z_level/northern_star/telecomms + z = Z_LEVEL_TELECOMMS_NORTHERN_STAR + name = "Telecomms" + flags = MAP_LEVEL_PLAYER + transit_chance = 10 + +/datum/map_z_level/northern_star/abandoned_asteroid + z = Z_LEVEL_ABANDONED_ASTEROID_NORTHERN_STAR + name = "Abandoned Asteroid" + flags = MAP_LEVEL_PLAYER + transit_chance = 15 + base_turf = /turf/simulated/mineral/floor + +/datum/map_z_level/northern_star/mining + z = Z_LEVEL_MINING_NORTHERN_STAR + name = "Mining" + flags = MAP_LEVEL_STATION|MAP_LEVEL_CONTACT|MAP_LEVEL_PLAYER + transit_chance = 10 + base_turf = /turf/simulated/mineral/floor + +/datum/map_z_level/northern_star/empty + z = Z_LEVEL_EMPTY_NORTHERN_STAR + name = "Empty" + flags = MAP_LEVEL_PLAYER + transit_chance = 60 diff --git a/maps/~map_system/maps.dm b/maps/~map_system/maps.dm index 0ee2316a4b..1a575b3578 100644 --- a/maps/~map_system/maps.dm +++ b/maps/~map_system/maps.dm @@ -22,6 +22,9 @@ var/list/all_maps = list() var/full_name = "Unnamed Map" var/path + var/list/zlevels = list() + var/zlevel_datum_type // If populated, all subtypes of this type will be instantiated and used to populate the *_levels lists. + var/list/station_levels = list() // Z-levels the station exists on var/list/admin_levels = list() // Z-levels for admin functionality (Centcom, shuttle transit, etc) var/list/contact_levels = list() // Z-levels that can be contacted from the station, for eg announcements @@ -73,6 +76,9 @@ var/list/all_maps = list() /datum/map/New() ..() + if(zlevel_datum_type) + for(var/type in subtypesof(zlevel_datum_type)) + new type(src) if(!map_levels) map_levels = station_levels.Copy() if(!allowed_jobs || !allowed_jobs.len) @@ -111,4 +117,49 @@ var/list/all_maps = list() if(empty_levels == null) world.maxz++ empty_levels = list(world.maxz) - return pick(empty_levels) \ No newline at end of file + return pick(empty_levels) + +// Get the list of zlevels that a computer on srcz can see maps of (for power/crew monitor, cameras, etc) +// The long_range parameter expands the coverage. Default is to return map_levels for long range otherwise just srcz. +// zLevels outside station_levels will return an empty list. +/datum/map/proc/get_map_levels(var/srcz, var/long_range = TRUE) + if (long_range && (srcz in map_levels)) + return map_levels + else if (srcz in station_levels) + return list(srcz) + else + return list() + +// Another way to setup the map datum that can be convenient. Just declare all your zlevels as subtypes of a common +// subtype of /datum/map_z_level and set zlevel_datum_type on /datum/map to have the lists auto-initialized. + +// Structure to hold zlevel info together in one nice convenient package. +/datum/map_z_level + var/z = 0 // Actual z-index of the zlevel. This had better be right! + var/name // Friendly name of the zlevel + var/flags = 0 // Bitflag of which *_levels lists this z should be put into. + var/turf/base_turf // Type path of the base turf for this z + var/transit_chance = 0 // Percentile chance this z will be chosen for map-edge space transit. + +// Default constructor applies itself to the parent map datum +/datum/map_z_level/New(var/datum/map/map) + if(!z) return + map.zlevels["[z]"] = src + if(flags & MAP_LEVEL_STATION) map.station_levels += z + if(flags & MAP_LEVEL_ADMIN) map.admin_levels += z + if(flags & MAP_LEVEL_CONTACT) map.contact_levels += z + if(flags & MAP_LEVEL_PLAYER) map.player_levels += z + if(flags & MAP_LEVEL_SEALED) map.sealed_levels += z + if(flags & MAP_LEVEL_EMPTY) + if(!map.empty_levels) map.empty_levels = list() + map.empty_levels += z + if(flags & MAP_LEVEL_CONSOLES) + if (!map.map_levels) map.map_levels = list() + map.map_levels += z + if(base_turf) + map.base_turf_by_z["[z]"] = base_turf + if(transit_chance) + map.accessible_z_levels["[z]"] = transit_chance + +/datum/map_z_level/Destroy() + return TRUE // No. diff --git a/nano/images/nanomap_z1.png b/nano/images/nanomap_z1.png index e4a045bf82..4a8d9d492f 100644 Binary files a/nano/images/nanomap_z1.png and b/nano/images/nanomap_z1.png differ diff --git a/nano/images/nanomap_z5.png b/nano/images/nanomap_z5.png new file mode 100644 index 0000000000..32ebfb0198 Binary files /dev/null and b/nano/images/nanomap_z5.png differ diff --git a/nano/templates/atmos_control.tmpl b/nano/templates/atmos_control.tmpl index 5e9a1acfe4..3d2a1203f7 100644 --- a/nano/templates/atmos_control.tmpl +++ b/nano/templates/atmos_control.tmpl @@ -1,3 +1,8 @@ +{{if data.map_levels.length}} +
+ {{:helper.link('Show Air Alrms On Map', 'pin-s', {'showMap' : 1})}} +
+{{/if}}
{{for data.alarms}} {{:helper.link(value.name, null, {'alarm' : value.ref}, null, value.danger == 2 ? 'redButton' : (value.danger == 1 ? 'yellowButton' : null))}} diff --git a/nano/templates/atmos_control_map_content.tmpl b/nano/templates/atmos_control_map_content.tmpl new file mode 100644 index 0000000000..931ddb974c --- /dev/null +++ b/nano/templates/atmos_control_map_content.tmpl @@ -0,0 +1,13 @@ + +{{for data.alarms}} + {{if value.z == config.mapZLevel}} +
+ +
+ {{/if}} +{{/for}} diff --git a/nano/templates/atmos_control_map_header.tmpl b/nano/templates/atmos_control_map_header.tmpl new file mode 100644 index 0000000000..7fea71a965 --- /dev/null +++ b/nano/templates/atmos_control_map_header.tmpl @@ -0,0 +1,20 @@ + +{{:helper.link('Show List', 'script', {'showMap' : 0})}} +{{if data.map_levels.length > 1}} +
+ Z Level:  + {{for data.map_levels }} + {{:helper.link(value, null, {'mapZLevel' : value}, null, config.mapZLevel == value ? 'selected' : null)}} + {{/for}} +
+{{/if}} +
+ Zoom Level:  + + + + +
diff --git a/nano/templates/crew_monitor.tmpl b/nano/templates/crew_monitor.tmpl index cd3a014652..74467e4b0f 100644 --- a/nano/templates/crew_monitor.tmpl +++ b/nano/templates/crew_monitor.tmpl @@ -16,7 +16,9 @@ Used In File(s): \code\game\machinery\computer\crew.dm } -{{:helper.link('Show Tracker Map', 'pin-s', {'showMap' : 1})}} +{{if data.map_levels.length}} + {{:helper.link('Show Tracker Map', 'pin-s', {'showMap' : 1})}} +{{/if}} {{for data.crewmembers}} {{if value.sensor_type == 1}} diff --git a/nano/templates/crew_monitor_map_content.tmpl b/nano/templates/crew_monitor_map_content.tmpl index 9f178406f8..432649926c 100644 --- a/nano/templates/crew_monitor_map_content.tmpl +++ b/nano/templates/crew_monitor_map_content.tmpl @@ -3,7 +3,7 @@ Title: Crew Monitoring Console (Map content) Used In File(s): \code\game\machinery\computer\crew.dm --> {{for data.crewmembers}} - {{if value.sensor_type == 3}} + {{if value.sensor_type == 3 && value.z == config.mapZLevel}}
{{/if}} {{/for}} - -
-
\ No newline at end of file diff --git a/nano/templates/crew_monitor_map_header.tmpl b/nano/templates/crew_monitor_map_header.tmpl index f9f5e2f707..2ec9485491 100644 --- a/nano/templates/crew_monitor_map_header.tmpl +++ b/nano/templates/crew_monitor_map_header.tmpl @@ -3,6 +3,14 @@ Title: Crew Monitoring Console (Map header) Used In File(s): \code\game\machinery\computer\crew.dm --> {{:helper.link('Show Detail List', 'script', {'showMap' : 0})}} +{{if data.map_levels.length > 1}} +
+ Z Level:  + {{for data.map_levels }} + {{:helper.link(value, null, {'mapZLevel' : value}, null, config.mapZLevel == value ? 'selected' : null)}} + {{/for}} +
+{{/if}}
Zoom Level:  diff --git a/nano/templates/power_monitor.tmpl b/nano/templates/power_monitor.tmpl index bf07238784..6c9e5eee34 100644 --- a/nano/templates/power_monitor.tmpl +++ b/nano/templates/power_monitor.tmpl @@ -2,6 +2,9 @@
{{:helper.link('Show List', 'cancel', { 'clear' : 1})}} Sensor selected: {{:data.focus.name}}
+ {{if data.map_levels.length}} + {{:helper.link('Show APCs On Map', 'pin-s', {'showMap' : 1})}} + {{/if}} {{if data.focus.error}} {{:data.focus.error}} {{else}} diff --git a/nano/templates/power_monitor_map_content.tmpl b/nano/templates/power_monitor_map_content.tmpl new file mode 100644 index 0000000000..291903144d --- /dev/null +++ b/nano/templates/power_monitor_map_content.tmpl @@ -0,0 +1,33 @@ + +{{if data.focus}} + {{for data.focus.apc_data}} + {{if value.z == config.mapZLevel}} +
+
+ + + + + + +
Equip.LightingEnv.
{{:value.s_equipment}}{{:value.s_lighting}}{{:value.s_environment}}
+
+ + {{/if}} + {{/for}} +{{/if}} \ No newline at end of file diff --git a/nano/templates/power_monitor_map_header.tmpl b/nano/templates/power_monitor_map_header.tmpl new file mode 100644 index 0000000000..171fd03429 --- /dev/null +++ b/nano/templates/power_monitor_map_header.tmpl @@ -0,0 +1,33 @@ + +{{:helper.link('Show Network Information', 'script', {'showMap' : 0})}} +{{if data.focus}}Sensor selected: {{:data.focus.name}}{{/if}} +{{if data.map_levels.length > 1}} +
+ Z Level:  + {{for data.map_levels }} + {{:helper.link(value, null, {'mapZLevel' : value}, null, config.mapZLevel == value ? 'selected' : null)}} + {{/for}} +
+{{/if}} +
+ Zoom Level:  + + + + +
+
+
Sensors:
+
+{{for data.all_sensors}} + {{if value.alarm}} + {{:helper.link(value.name, 'alert', { 'setsensor' : value.name})}} + {{else}} + {{:helper.link(value.name, '' , { 'setsensor' : value.name})}} + {{/if}} +{{empty}} + WARN: No Sensors Detected! +{{/for}} diff --git a/nano/templates/sec_camera.tmpl b/nano/templates/sec_camera.tmpl index 356bad1df3..1d46f1868f 100644 --- a/nano/templates/sec_camera.tmpl +++ b/nano/templates/sec_camera.tmpl @@ -2,7 +2,9 @@ Title: Security Camera Console (Main content) Used In File(s): \code\game\machinery\computer\camera.dm --> -{{:helper.link('Show Map', 'pin-s', {'showMap' : 1})}} +{{if data.map_levels.length}} + {{:helper.link('Show Map', 'pin-s', {'showMap' : 1})}} +{{/if}} {{:helper.link('Reset', 'refresh', {'reset' : 1})}}
diff --git a/nano/templates/sec_camera_map_content.tmpl b/nano/templates/sec_camera_map_content.tmpl index ebe409efc1..e9369c4b01 100644 --- a/nano/templates/sec_camera_map_content.tmpl +++ b/nano/templates/sec_camera_map_content.tmpl @@ -3,7 +3,7 @@ Title: Security Camera Console (Map content) Used In File(s): \code\game\machinery\computer\camera.dm --> {{for data.cameras}} - {{if value.z == 1}} + {{if value.z == config.mapZLevel}}
{{if data.current && value.name == data.current.name}} {{:helper.link("#", '', {'switch_camera' : value.camera}, 'selected')}} diff --git a/nano/templates/sec_camera_map_header.tmpl b/nano/templates/sec_camera_map_header.tmpl index 1fcfc02e09..0281c70cf5 100644 --- a/nano/templates/sec_camera_map_header.tmpl +++ b/nano/templates/sec_camera_map_header.tmpl @@ -14,6 +14,14 @@ Used In File(s): \code\game\machinery\computer\camera.dm {{/if}}
+{{if data.map_levels.length > 1}} +
+ Z Level:  + {{for data.map_levels }} + {{:helper.link(value, null, {'mapZLevel' : value}, null, config.mapZLevel == value ? 'selected' : null)}} + {{/for}} +
+{{/if}}
Zoom Level:  diff --git a/polaris.dme b/polaris.dme index f8f889a5d8..9f075b1d76 100644 --- a/polaris.dme +++ b/polaris.dme @@ -29,6 +29,7 @@ #include "code\__defines\items_clothing.dm" #include "code\__defines\lighting.dm" #include "code\__defines\machinery.dm" +#include "code\__defines\map.dm" #include "code\__defines\math_physics.dm" #include "code\__defines\misc.dm" #include "code\__defines\mobs.dm"