From f425c5496f56796cf3f253985da7f9c0684357db Mon Sep 17 00:00:00 2001 From: coiax Date: Tue, 23 Jan 2018 07:40:48 +0000 Subject: [PATCH 1/3] Fake nuclear disks are even more convincing --- _maps/map_files/PubbyStation/PubbyStation.dmm | 4 +- code/datums/antagonists/nukeop.dm | 2 +- code/game/gamemodes/nuclear/nuclearbomb.dm | 58 +++++++++++++------ code/game/gamemodes/objective_items.dm | 3 + code/modules/uplink/uplink_items.dm | 4 +- 5 files changed, 49 insertions(+), 22 deletions(-) diff --git a/_maps/map_files/PubbyStation/PubbyStation.dmm b/_maps/map_files/PubbyStation/PubbyStation.dmm index 82515d3bd2..d97e460e07 100644 --- a/_maps/map_files/PubbyStation/PubbyStation.dmm +++ b/_maps/map_files/PubbyStation/PubbyStation.dmm @@ -7657,7 +7657,7 @@ /obj/item/bikehorn/golden, /obj/item/ammo_box/a357, /obj/item/tank/internals/plasma/full, -/obj/item/disk/fakenucleardisk, +/obj/item/disk/nuclear/fake, /obj/item/ore/diamond, /obj/item/gun/energy/disabler, /turf/open/floor/plasteel/vault{ @@ -50503,7 +50503,7 @@ /area/library) "czp" = ( /obj/structure/table/wood, -/obj/item/disk/fakenucleardisk, +/obj/item/disk/nuclear/fake, /obj/item/barcodescanner, /turf/open/floor/plasteel/dark, /area/library) diff --git a/code/datums/antagonists/nukeop.dm b/code/datums/antagonists/nukeop.dm index 5fac18c6f7..843b142c08 100644 --- a/code/datums/antagonists/nukeop.dm +++ b/code/datums/antagonists/nukeop.dm @@ -67,7 +67,7 @@ /datum/antagonist/nukeop/proc/assign_nuke() if(nuke_team && !nuke_team.tracked_nuke) nuke_team.memorized_code = random_nukecode() - var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in GLOB.nuke_list + var/obj/machinery/nuclearbomb/syndicate/nuke = locate() in GLOB.nuke_list if(nuke) nuke_team.tracked_nuke = nuke if(nuke.r_code == "ADMIN") diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 37b87ce6de..c0ca4cf567 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -79,17 +79,8 @@ anchored = TRUE //stops it being moved /obj/machinery/nuclearbomb/syndicate - datum_flags = DF_USE_TAG //ui_style = "syndicate" // actually the nuke op bomb is a stole nt bomb -/obj/machinery/nuclearbomb/syndicate/GenerateTag() - var/obj/machinery/nuclearbomb/existing = locate("syndienuke") in GLOB.nuke_list - if(existing) - stack_trace("Attempted to spawn a syndicate nuke while one already exists at [COORD(existing.loc)]") - datum_flags &= ~DF_USE_TAG - return - tag = "syndienuke" - /obj/machinery/nuclearbomb/syndicate/get_cinematic_type(off_station) var/datum/game_mode/nuclear/NM = SSticker.mode switch(off_station) @@ -104,8 +95,17 @@ return CINEMATIC_NUKE_FAR return CINEMATIC_NUKE_FAR +/obj/machinery/nuclearbomb/proc/disk_check(obj/item/disk/nuclear/D) + if(D.fake) + say("Authentication failure; disk not recognised.") + return FALSE + else + return TRUE + /obj/machinery/nuclearbomb/attackby(obj/item/I, mob/user, params) if (istype(I, /obj/item/disk/nuclear)) + if(!disk_check(I)) + return if(!user.transferItemToLoc(I, src)) return auth = I @@ -313,7 +313,7 @@ if("insert_disk") if(!auth) var/obj/item/I = usr.is_holding_item_of_type(/obj/item/disk/nuclear) - if(I && usr.transferItemToLoc(I, src)) + if(I && disk_check(I) && usr.transferItemToLoc(I, src)) auth = I . = TRUE if("keypad") @@ -519,18 +519,37 @@ This is here to make the tiles around the station mininuke change when it's arme name = "nuclear authentication disk" desc = "Better keep this safe." icon_state = "nucleardisk" - persistence_replacement = /obj/item/disk/fakenucleardisk + persistence_replacement = /obj/item/disk/nuclear/fake max_integrity = 250 armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 30, bio = 0, rad = 0, fire = 100, acid = 100) resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF + var/fake = FALSE -/obj/item/disk/nuclear/New() - ..() - GLOB.poi_list |= src - set_stationloving(TRUE, inform_admins=TRUE) +/obj/item/disk/nuclear/Initialize() + . = ..() + var/tell_the_admins + // Only tell the admins if a REAL nuke disk is relocated + if(fake) + tell_the_admins = FALSE + else + GLOB.poi_list |= src + tell_the_admins = TRUE + + set_stationloving(TRUE, inform_admins=tell_the_admins) + +/obj/item/disk/nuclear/examine(mob/user) + . = ..() + if(!fake) + return + + var/ghost = isobserver(user) + var/captain = user.mind && user.mind.assigned_role == "Captain" + var/nukie = user.mind && user.mind.has_antag_datum(/datum/antagonist/nukeop) + if(ghost || captain || nukie) + to_chat(user, "The serial numbers on [src] are incorrect.") /obj/item/disk/nuclear/attackby(obj/item/I, mob/living/user, params) - if(istype(I, /obj/item/claymore/highlander)) + if(istype(I, /obj/item/claymore/highlander) && !fake) var/obj/item/claymore/highlander/H = I if(H.nuke_disk) to_chat(user, "Wait... what?") @@ -557,12 +576,13 @@ This is here to make the tiles around the station mininuke change when it's arme addtimer(CALLBACK(src, .proc/manual_suicide, user), 101) return MANUAL_SUICIDE -/obj/item/disk/proc/manual_suicide(mob/living/user) +/obj/item/disk/nuclear/proc/manual_suicide(mob/living/user) user.remove_atom_colour(ADMIN_COLOUR_PRIORITY) user.visible_message("[user] was destroyed by the nuclear blast!") user.adjustOxyLoss(200) user.death(0) +<<<<<<< HEAD /obj/item/disk/fakenucleardisk name = "nuclear authentication disk" desc = "Better keep this safe." @@ -578,3 +598,7 @@ This is here to make the tiles around the station mininuke change when it's arme ..() if(Adjacent(user)) to_chat(user, "Wait, this is a fake!") +======= +/obj/item/disk/nuclear/fake + fake = TRUE +>>>>>>> cbd5aec... Fake nuclear disks are even more convincing (#34466) diff --git a/code/game/gamemodes/objective_items.dm b/code/game/gamemodes/objective_items.dm index 2dc8692294..f56ca61584 100644 --- a/code/game/gamemodes/objective_items.dm +++ b/code/game/gamemodes/objective_items.dm @@ -73,6 +73,9 @@ difficulty = 5 excludefromjob = list("Captain") +/datum/objective_item/steal/nukedisc/check_special_completion(obj/item/disk/nuclear/N) + return !N.fake + /datum/objective_item/steal/reflector name = "a reflector vest." targetitem = /obj/item/clothing/suit/armor/laserproof diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index 54514689cb..d686600974 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -814,8 +814,8 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once. /datum/uplink_item/stealthy_tools/fakenucleardisk name = "Decoy Nuclear Authentication Disk" - desc = "It's just a normal disk. Visually it's identical to the real deal, but it won't hold up under closer scrutiny. Don't try to give this to us to complete your objective, we know better!" - item = /obj/item/disk/fakenucleardisk + desc = "It's just a normal disk. Visually it's identical to the real deal, but it won't hold up under closer scrutiny by the Captain. Don't try to give this to us to complete your objective, we know better!" + item = /obj/item/disk/nuclear/fake cost = 1 surplus = 1 From d540b69adc9c2bd5f26151c87c1b7533fc13d19b Mon Sep 17 00:00:00 2001 From: LetterJay Date: Tue, 23 Jan 2018 08:20:52 -0600 Subject: [PATCH 2/3] Update nuclearbomb.dm --- code/game/gamemodes/nuclear/nuclearbomb.dm | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index c0ca4cf567..b32a8f69e8 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -582,23 +582,5 @@ This is here to make the tiles around the station mininuke change when it's arme user.adjustOxyLoss(200) user.death(0) -<<<<<<< HEAD -/obj/item/disk/fakenucleardisk - name = "nuclear authentication disk" - desc = "Better keep this safe." - icon_state = "nucleardisk" - -/obj/item/disk/fakenucleardisk/suicide_act(mob/user) - user.visible_message("[user] is pretending to go delta! It looks like [user.p_theyre()] trying to commit suicide!") - playsound(src, 'sound/machines/alarm.ogg', 30, -1, 1) - addtimer(CALLBACK(src, .proc/manual_suicide, user), 101) - return MANUAL_SUICIDE - -/obj/item/disk/fakenucleardisk/examine(mob/user) - ..() - if(Adjacent(user)) - to_chat(user, "Wait, this is a fake!") -======= /obj/item/disk/nuclear/fake fake = TRUE ->>>>>>> cbd5aec... Fake nuclear disks are even more convincing (#34466) From 069972b3a0c93035293b957d79e6d1945a78b31b Mon Sep 17 00:00:00 2001 From: LetterJay Date: Thu, 25 Jan 2018 12:59:30 -0600 Subject: [PATCH 3/3] map --- _maps/cit_map_files/PubbyStation/PubbyStation.dmm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_maps/cit_map_files/PubbyStation/PubbyStation.dmm b/_maps/cit_map_files/PubbyStation/PubbyStation.dmm index 8fa1cc9a02..f48fff1bbd 100644 --- a/_maps/cit_map_files/PubbyStation/PubbyStation.dmm +++ b/_maps/cit_map_files/PubbyStation/PubbyStation.dmm @@ -7662,7 +7662,7 @@ /obj/item/bikehorn/golden, /obj/item/ammo_box/a357, /obj/item/tank/internals/plasma/full, -/obj/item/disk/fakenucleardisk, +/obj/item/disk/nuclear/fake, /obj/item/ore/diamond, /obj/item/gun/energy/disabler, /turf/open/floor/plasteel/vault{ @@ -50545,7 +50545,7 @@ /area/library) "czp" = ( /obj/structure/table/wood, -/obj/item/disk/fakenucleardisk, +/obj/item/disk/nuclear/fake, /obj/item/barcodescanner, /turf/open/floor/plasteel/dark, /area/library)