diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm index 6569969487e2..cc7e948d605e 100644 --- a/code/_globalvars/lists/objects.dm +++ b/code/_globalvars/lists/objects.dm @@ -69,6 +69,7 @@ var/global/list/intercom_list = list() var/global/list/all_designs = list() var/global/list/all_supply_pack = list() var/global/list/all_command_microphones = list() +var/global/list/global_objectives = list() //objectives that need to be completed by several factions or roles var/global/list/spells_by_aspects = list() var/global/list/rites_by_aspects = list() diff --git a/code/controllers/subsystem/explosions.dm b/code/controllers/subsystem/explosions.dm index 0a11b8e5a990..3cf731b5acab 100644 --- a/code/controllers/subsystem/explosions.dm +++ b/code/controllers/subsystem/explosions.dm @@ -455,5 +455,5 @@ SUBSYSTEM_DEF(explosions) continue EX_ACT(movable_thing, EXPLODE_LIGHT) cost_low_mov_atom = MC_AVERAGE(cost_low_mov_atom, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer)) - + currentpart = SSEXPLOSIONS_TURFS diff --git a/code/game/gamemodes/objectives/bomb.dm b/code/game/gamemodes/objectives/bomb.dm new file mode 100644 index 000000000000..ad2c7e4e6ed4 --- /dev/null +++ b/code/game/gamemodes/objectives/bomb.dm @@ -0,0 +1,34 @@ +/datum/objective/bomb + explanation_text = "Detonate a bomb in one of the following compartments: Captain's office, armory, toxin storage, EVA, telecommunications, atmospherics." + required_equipment = /obj/item/device/radio/beacon/syndicate_bomb/objective + global_objective = TRUE + var/already_completed = FALSE + var/list/areas_for_objective = list(/area/station/bridge/captain_quarters, + /area/station/security/armoury, + /area/station/rnd/storage, + /area/station/ai_monitored/eva, + /area/station/tcommsat, + /area/station/engineering/atmos) + +/datum/objective/bomb/New() + ..() + RegisterSignal(SSexplosions, COMSIG_EXPLOSIONS_EXPLODE, PROC_REF(react)) + +/datum/objective/bomb/proc/react(datum/source, turf/epicenter, devastation_range, heavy_impact_range, light_impact_range) + var/area/A = get_area(epicenter) + for(var/area in areas_for_objective) + if(istype(A, area) && devastation_range >= 1) + already_completed = TRUE + UnregisterSignal(SSexplosions, COMSIG_EXPLOSIONS_EXPLODE) + +/datum/objective/bomb/check_completion() + if(!already_completed) + return OBJECTIVE_LOSS + return OBJECTIVE_WIN + +/obj/item/device/radio/beacon/syndicate_bomb/objective + bomb_type = /obj/machinery/syndicatebomb/objective + +/obj/machinery/syndicatebomb/objective + min_timer = 120 + timer = 120 diff --git a/code/game/gamemodes/objectives/objectives.dm b/code/game/gamemodes/objectives/objectives.dm index 14ea3a1419f7..4f6070756582 100644 --- a/code/game/gamemodes/objectives/objectives.dm +++ b/code/game/gamemodes/objectives/objectives.dm @@ -8,8 +8,11 @@ var/target_amount = 0 //If they are focused on a particular number. Steal objectives have their own counter. var/auto_target = TRUE //Whether we pick a target automatically on PostAppend() var/required_equipment = null + var/global_objective = FALSE /datum/objective/New(text, _auto_target = TRUE) + if(global_objective) + global_objectives += src auto_target = _auto_target if(text) explanation_text = text diff --git a/code/game/gamemodes/objectives/sabotage_research.dm b/code/game/gamemodes/objectives/sabotage_research.dm index 49aed5bc4e86..c7ce18a884e9 100644 --- a/code/game/gamemodes/objectives/sabotage_research.dm +++ b/code/game/gamemodes/objectives/sabotage_research.dm @@ -1,6 +1,7 @@ /datum/objective/research_sabotage explanation_text = "Sabotage the R&D servers and systems. Insert the diskette you were given into the R&D Server Controller to complete the objective." required_equipment = /obj/item/weapon/disk/data/syndi + global_objective = TRUE var/already_completed = FALSE /datum/objective/research_sabotage/check_completion() diff --git a/code/game/gamemodes/objectives/steal.dm b/code/game/gamemodes/objectives/steal.dm index 0d2ad791602f..d7c8905c6700 100644 --- a/code/game/gamemodes/objectives/steal.dm +++ b/code/game/gamemodes/objectives/steal.dm @@ -17,7 +17,6 @@ ADD_TO_POIFS_LIST(/obj/item/clothing/under/rank/head_of_security) ADD_TO_POIFS_LIST(/obj/item/clothing/under/rank/head_of_personnel) ADD_TO_POIFS_LIST(/obj/item/weapon/reagent_containers/hypospray/cmo) ADD_TO_POIFS_LIST(/obj/item/weapon/pinpointer) -ADD_TO_POIFS_LIST(/obj/item/clothing/suit/armor/laserproof) ADD_TO_POIFS_LIST(/obj/item/weapon/reagent_containers/spray/extinguisher/golden) ADD_TO_POIFS_LIST(/obj/item/weapon/gun/energy/gun/nuclear) ADD_TO_POIFS_LIST(/obj/item/weapon/pickaxe/drill/diamond_drill) @@ -43,7 +42,6 @@ ADD_TO_POIFS_LIST(/obj/item/stack/sheet/mineral/uranium) "the hypospray" = /obj/item/weapon/reagent_containers/hypospray/cmo, "a Research Director's teleport armor" = /obj/item/clothing/suit/armor/vest/reactive, "the captain's pinpointer" = /obj/item/weapon/pinpointer, - "an ablative armor vest" = /obj/item/clothing/suit/armor/laserproof, "the golden fire extinguisher" = /obj/item/weapon/reagent_containers/spray/extinguisher/golden, ) diff --git a/code/game/gamemodes/roles/traitor.dm b/code/game/gamemodes/roles/traitor.dm index 1a19b9573581..392908878131 100644 --- a/code/game/gamemodes/roles/traitor.dm +++ b/code/game/gamemodes/roles/traitor.dm @@ -25,8 +25,10 @@ switch(rand(1,120)) if(1 to 20) AppendObjective(/datum/objective/target/assassinate, TRUE) - if(21 to 30) + if(21 to 25) AppendObjective(/datum/objective/target/harm, TRUE) + if(26 to 30) + AppendObjective(/datum/objective/bomb, FALSE) if(31 to 40) AppendObjective(/datum/objective/download_telecommunications_data, FALSE) if(41 to 50) diff --git a/code/game/machinery/syndie_big_bomb.dm b/code/game/machinery/syndie_big_bomb.dm index 5e7ef82246ad..94548e531c57 100644 --- a/code/game/machinery/syndie_big_bomb.dm +++ b/code/game/machinery/syndie_big_bomb.dm @@ -2,11 +2,12 @@ name = "suspicious beacon" desc = "A label on it reads: Warning: Activating this device will send a high-ordinance explosive to your location." origin_tech = "bluespace=1;syndicate=7" + var/bomb_type = /obj/machinery/syndicatebomb /obj/item/device/radio/beacon/syndicate_bomb/attack_self(mob/user) if(user) to_chat(user, "Locked In") - new /obj/machinery/syndicatebomb( user.loc ) + new bomb_type( user.loc ) playsound(src, 'sound/effects/pop.ogg', VOL_EFFECTS_MASTER) qdel(src) return @@ -24,12 +25,12 @@ use_power = NO_POWER_USE var/datum/wires/syndicatebomb/wires = null + var/min_timer = 60 var/timer = 60 var/open_panel = FALSE //are the wires exposed? var/active = FALSE //is the bomb counting down? var/defused = FALSE //is the bomb capable of exploding? var/degutted = FALSE //is the bomb even a bomb anymore? - required_skills = list(/datum/skill/engineering = SKILL_LEVEL_PRO) /obj/machinery/syndicatebomb/proc/try_detonate(ignore_active = FALSE) @@ -67,7 +68,7 @@ /obj/machinery/syndicatebomb/examine(mob/user) ..() - to_chat(user, "A digital display on it reads \"[timer]\".") + to_chat(user, "A digital display on it reads \"[timer]\".") /obj/machinery/syndicatebomb/attackby(obj/item/I, mob/user) if(iswrenching(I)) @@ -75,10 +76,12 @@ if(!isturf(src.loc) || isspaceturf(src.loc)) to_chat(user, "The bomb must be placed on solid ground to attach it") else + add_fingerprint(user) if(!do_skill_checks(user)) return to_chat(user, "You firmly wrench the bomb to the floor") anchored = TRUE + playsound(src, 'sound/items/Ratchet.ogg', VOL_EFFECTS_MASTER) if(active) to_chat(user, "The bolts lock in place") else @@ -87,6 +90,7 @@ return to_chat(user, "You wrench the bomb from the floor") anchored = FALSE + playsound(src, 'sound/items/Ratchet.ogg', VOL_EFFECTS_MASTER) else to_chat(user, "The bolts are locked down!") @@ -135,28 +139,23 @@ return if(degutted) to_chat(user, "The bomb's explosives have been removed, the [open_panel ? "wires" : "buttons"] are useless now.") - return 1 - if(anchored) - if(!active) - settings(user) - else - to_chat(user, "The bomb is bolted to the floor!") - return 1 - else if(!active) - settings(user) + return TRUE + settings(user) /obj/machinery/syndicatebomb/proc/settings(mob/user) var/newtime = input(user, "Please set the timer.", "Timer", "[timer]") as num - newtime = clamp(newtime, 60, 60000) - if(Adjacent(user) && isliving(user) || isobserver(user)) //No running off and setting bombs from across the station + newtime = clamp(newtime, min_timer, 60000) + if(!active && Adjacent(user) && isliving(user) || isobserver(user)) //No running off and setting bombs from across the station timer = newtime loc.visible_message("[bicon(src)] timer set for [timer] seconds.") if(tgui_alert(user, "Would you like to start the countdown now?",, list("Yes","No")) == "Yes" && Adjacent(user) && isliving(user)) - if(defused || active || degutted) + if(defused || degutted || !anchored) if(degutted) - loc.visible_message("[bicon(src)] Device error: Payload missing") + loc.visible_message("[bicon(src)] Device error: Payload missing.") else if(defused) - loc.visible_message("[bicon(src)] Device error: User intervention required") + loc.visible_message("[bicon(src)] Device error: User intervention required.") + else if(!anchored) + loc.visible_message("[bicon(src)] Device error: Device must be anchored.") return else loc.visible_message("[bicon(src)] [timer] seconds until detonation, please clear the area.") diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index c3808a5a4ba4..4a7f016ffecb 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -332,10 +332,8 @@ for(var/obj/machinery/computer/rdconsole/c in RDcomputer_list) if(c.sabotagable) explosion(c.loc, 0, 1, 3) - var/datum/faction/traitor/faction = find_faction_by_type(/datum/faction/traitor) - for(var/datum/role/traitor/T in faction.members) - for(var/datum/objective/research_sabotage/rs in T.objectives.objectives) - rs.already_completed = TRUE + for(var/datum/objective/research_sabotage/rs in global.global_objectives) + rs.already_completed = TRUE add_fingerprint(user) playsound(src, 'sound/machines/ping.ogg', VOL_EFFECTS_MASTER) to_chat(user, "Готово!") diff --git a/taucetistation.dme b/taucetistation.dme index fa5b91d7c202..69e6a39293f8 100644 --- a/taucetistation.dme +++ b/taucetistation.dme @@ -697,6 +697,7 @@ #include "code\game\gamemodes\objectives\absorb.dm" #include "code\game\gamemodes\objectives\blob_takeover.dm" #include "code\game\gamemodes\objectives\block.dm" +#include "code\game\gamemodes\objectives\bomb.dm" #include "code\game\gamemodes\objectives\capture.dm" #include "code\game\gamemodes\objectives\custom.dm" #include "code\game\gamemodes\objectives\download.dm"