From b538a52da5854f9b2dd66afeaf54293c72fee765 Mon Sep 17 00:00:00 2001 From: datlo Date: Mon, 11 Feb 2019 13:09:56 +0000 Subject: [PATCH] Prevent ERT/Abductors/ETC from stealing the NAD --- code/game/area/Space Station 13 areas.dm | 16 +++++++++++++++- code/game/gamemodes/nuclear/nuclearbomb.dm | 19 +++++++++++++++++-- code/modules/admin/verbs/striketeam.dm | 2 +- .../admin/verbs/striketeam_syndicate.dm | 2 +- 4 files changed, 34 insertions(+), 5 deletions(-) diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index ac2b07ad243..067223c0285 100644 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -61,6 +61,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station var/outdoors = 0 //For space, the asteroid, lavaland, etc. Used with blueprints to determine if we are adding a new area (vs editing a station room) var/xenobiology_compatible = FALSE //Can the Xenobio management console transverse this area by default? + var/nad_allowed = FALSE //is the station NAD allowed on this area? /*Adding a wizard area teleport list because motherfucking lag -- Urist*/ /*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/ @@ -168,31 +169,36 @@ var/list/ghostteleportlocs = list() name = "\improper Emergency Shuttle" music = "music/escape.ogg" icon_state = "shuttle2" + nad_allowed = TRUE /area/shuttle/pod_1 name = "\improper Escape Pod One" music = "music/escape.ogg" icon_state = "shuttle" + nad_allowed = TRUE /area/shuttle/pod_2 name = "\improper Escape Pod Two" music = "music/escape.ogg" icon_state = "shuttle" + nad_allowed = TRUE /area/shuttle/pod_3 name = "\improper Escape Pod Three" music = "music/escape.ogg" icon_state = "shuttle" + nad_allowed = TRUE /area/shuttle/pod_4 name = "\improper Escape Pod Four" music = "music/escape.ogg" icon_state = "shuttle" - + nad_allowed = TRUE /area/shuttle/escape_pod1 name = "\improper Escape Pod One" music = "music/escape.ogg" + nad_allowed = TRUE /area/shuttle/escape_pod1/station icon_state = "shuttle2" @@ -206,6 +212,7 @@ var/list/ghostteleportlocs = list() /area/shuttle/escape_pod2 name = "\improper Escape Pod Two" music = "music/escape.ogg" + nad_allowed = TRUE /area/shuttle/escape_pod2/station icon_state = "shuttle2" @@ -219,6 +226,7 @@ var/list/ghostteleportlocs = list() /area/shuttle/escape_pod3 name = "\improper Escape Pod Three" music = "music/escape.ogg" + nad_allowed = TRUE /area/shuttle/escape_pod3/station icon_state = "shuttle2" @@ -232,6 +240,7 @@ var/list/ghostteleportlocs = list() /area/shuttle/escape_pod5 //Pod 4 was lost to meteors name = "\improper Escape Pod Five" music = "music/escape.ogg" + nad_allowed = TRUE /area/shuttle/escape_pod5/station icon_state = "shuttle2" @@ -304,6 +313,7 @@ var/list/ghostteleportlocs = list() /area/shuttle/syndicate_elite name = "\improper Syndicate Elite Shuttle" icon_state = "shuttlered" + nad_allowed = TRUE /area/shuttle/syndicate_elite/mothership name = "\improper Syndicate Elite Shuttle" @@ -316,6 +326,7 @@ var/list/ghostteleportlocs = list() /area/shuttle/syndicate_sit name = "\improper Syndicate SIT Shuttle" icon_state = "shuttlered" + nad_allowed = TRUE /area/shuttle/assault_pod name = "Steel Rain" @@ -451,6 +462,7 @@ var/list/ghostteleportlocs = list() /area/shuttle/syndicate name = "Syndicate Nuclear Team Shuttle" icon_state = "shuttle" + nad_allowed = TRUE /area/shuttle/trade name = "Trade Shuttle" @@ -491,6 +503,7 @@ var/list/ghostteleportlocs = list() icon_state = "centcom" requires_power = 0 dynamic_lighting = 0 + nad_allowed = TRUE /area/centcom/control name = "\improper Centcom Control" @@ -537,6 +550,7 @@ var/list/ghostteleportlocs = list() name = "\improper Syndicate Forward Base" icon_state = "syndie-ship" requires_power = 0 + nad_allowed = TRUE /area/syndicate_mothership/control name = "\improper Syndicate Control Room" diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 776652a3d6b..94190149848 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -402,19 +402,34 @@ var/bomb_set icon_state = "nucleardisk" armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 30, bio = 0, rad = 0) +/obj/item/disk/nuclear/unrestricted + desc = "Seems to have been stripped of its safeties, you better not lose it." + /obj/item/disk/nuclear/New() ..() processing_objects.Add(src) GLOB.poi_list |= src /obj/item/disk/nuclear/process() - var/turf/disk_loc = get_turf(src) - if(!is_secure_level(disk_loc.z)) + if(!check_disk_loc()) var/holder = get(src, /mob) if(holder) to_chat(holder, "You can't help but feel that you just lost something back there...") qdel(src) + //station disk is allowed on z1, escape shuttle/pods, CC, and syndicate shuttles/base, reset otherwise +/obj/item/disk/nuclear/proc/check_disk_loc() + var/turf/T = get_turf(src) + var/area/A = get_area(src) + if(is_station_level(T.z)) + return TRUE + if(A.nad_allowed) + return TRUE + return FALSE + +/obj/item/disk/nuclear/unrestricted/check_disk_loc() + return TRUE + /obj/item/disk/nuclear/Destroy(force) var/turf/diskturf = get_turf(src) diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index 0a481460344..e745f532af8 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -178,7 +178,7 @@ var/global/sent_strike_team = 0 equip_to_slot_or_del(new /obj/item/flashlight(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/pinpointer(src), slot_in_backpack) if(is_leader) - equip_to_slot_or_del(new /obj/item/disk/nuclear(src), slot_in_backpack) + equip_to_slot_or_del(new /obj/item/disk/nuclear/unrestricted(src), slot_in_backpack) else equip_to_slot_or_del(new /obj/item/grenade/plastic/x4(src), slot_in_backpack) diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm index 735d42ad71a..886315e465f 100644 --- a/code/modules/admin/verbs/striketeam_syndicate.dm +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -139,7 +139,7 @@ var/global/sent_syndicate_strike_team = 0 equip_to_slot_or_del(new /obj/item/grenade/plastic/x4(src), slot_in_backpack) if(is_leader) equip_to_slot_or_del(new /obj/item/pinpointer(src), slot_in_backpack) - equip_to_slot_or_del(new /obj/item/disk/nuclear(src), slot_in_backpack) + equip_to_slot_or_del(new /obj/item/disk/nuclear/unrestricted(src), slot_in_backpack) else equip_to_slot_or_del(new /obj/item/grenade/plastic/x4(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/card/emag(src), slot_r_store)