From 7e1cea12c210be6a8e7a964dbbb9cc03c72aa11c Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Mon, 4 Nov 2024 21:31:24 +0000 Subject: [PATCH 01/24] A start --- .../PreferencesMenu/antagonists/antagonists/infiltrator.ts | 2 +- .../code/game/objects/items/implants/implant_infiltrator.dm | 3 ++- yogstation/code/modules/events/infiltrators.dm | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/antagonists/infiltrator.ts b/tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/antagonists/infiltrator.ts index fae77d2500d3..ed055c8b2326 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/antagonists/infiltrator.ts +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/antagonists/infiltrator.ts @@ -19,7 +19,7 @@ const Infiltrator: Antagonist = { `, INFILTRATOR_MECHANICAL_DESCRIPTION, ], - category: Category.Roundstart, + category: Category.Midround, priority: -1, }; diff --git a/yogstation/code/game/objects/items/implants/implant_infiltrator.dm b/yogstation/code/game/objects/items/implants/implant_infiltrator.dm index d4738a22850b..8c04138945ea 100644 --- a/yogstation/code/game/objects/items/implants/implant_infiltrator.dm +++ b/yogstation/code/game/objects/items/implants/implant_infiltrator.dm @@ -9,7 +9,7 @@ . = ..() ADD_TRAIT(src, TRAIT_EMPPROOF_SELF, "innate_empproof") ADD_TRAIT(src, TRAIT_EMPPROOF_CONTENTS, "innate_empproof") - var/datum/component/uplink/uplink = AddComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, 20) + var/datum/component/uplink/uplink = AddComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, 14) uplink.set_antagonist(ROLE_INFILTRATOR) alert_radio = new(src) alert_radio.make_syndie() @@ -81,6 +81,7 @@ else pinpointer.scan_target = targets[pinpointer_chosen] to_chat(imp_in, span_notice("Pinpointer target set to [pinpointer.scan_target]")) + message_admins(pinpointer.scan_target) pinpointer.point_to_target() if ("Send Ship Away") alert_radio.talk_into(alert_radio, "The infiltration cruiser has been remotely sent to the base by [imp_in.real_name]") diff --git a/yogstation/code/modules/events/infiltrators.dm b/yogstation/code/modules/events/infiltrators.dm index d6f15582f106..0e6917722649 100644 --- a/yogstation/code/modules/events/infiltrators.dm +++ b/yogstation/code/modules/events/infiltrators.dm @@ -2,9 +2,9 @@ name = "Infiltrators" typepath = /datum/round_event/ghost_role/infiltrators - weight = 0 + weight = 5 max_occurrences = 1 - earliest_start = 30 MINUTES + earliest_start = 50 MINUTES track = EVENT_TRACK_MAJOR tags = list(TAG_COMBAT, TAG_EXTERNAL) description = "Infiltrators will... infiltrate." From b597cb955f2a74e1d51343099e0456bc3adc92a9 Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Wed, 6 Nov 2024 23:06:38 +0000 Subject: [PATCH 02/24] 10 TC --- .../code/game/objects/items/implants/implant_infiltrator.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yogstation/code/game/objects/items/implants/implant_infiltrator.dm b/yogstation/code/game/objects/items/implants/implant_infiltrator.dm index 8c04138945ea..d5d5f1b55d95 100644 --- a/yogstation/code/game/objects/items/implants/implant_infiltrator.dm +++ b/yogstation/code/game/objects/items/implants/implant_infiltrator.dm @@ -9,7 +9,7 @@ . = ..() ADD_TRAIT(src, TRAIT_EMPPROOF_SELF, "innate_empproof") ADD_TRAIT(src, TRAIT_EMPPROOF_CONTENTS, "innate_empproof") - var/datum/component/uplink/uplink = AddComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, 14) + var/datum/component/uplink/uplink = AddComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, 10) uplink.set_antagonist(ROLE_INFILTRATOR) alert_radio = new(src) alert_radio.make_syndie() From b38711b941e09ae6379849a36cd83f193c7f7147 Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Fri, 8 Nov 2024 14:38:56 +0000 Subject: [PATCH 03/24] Fixes PDAs and gives them the rest of the chameleon kit --- .../computers/item/pda/pda_presets.dm | 8 ++- .../computers/item/tablet/tablet_presets.dm | 2 +- yogstation.dme | 1 - .../gamemodes/infiltration/infiltration.dm | 54 ------------------- .../modules/antagonists/infiltrator/outfit.dm | 5 +- 5 files changed, 12 insertions(+), 58 deletions(-) delete mode 100644 yogstation/code/game/gamemodes/infiltration/infiltration.dm diff --git a/code/modules/modular_computers/computers/item/pda/pda_presets.dm b/code/modules/modular_computers/computers/item/pda/pda_presets.dm index 3e564abba1c1..f35a6db335a2 100644 --- a/code/modules/modular_computers/computers/item/pda/pda_presets.dm +++ b/code/modules/modular_computers/computers/item/pda/pda_presets.dm @@ -233,11 +233,17 @@ ) return ..() -//for inside one of the nukie lockers +//for inside one of the nukie lockers and the ones infiltrators spawn with /obj/item/modular_computer/tablet/pda/preset/syndicate desc = "Based off Nanotrasen's PDAs, this one has been reverse-engineered and loaded with illegal software provided by the Syndicate." greyscale_config = /datum/greyscale_config/tablet/stripe_thick greyscale_colors = "#A80001#5C070F#000000" + starting_components = list( /obj/item/computer_hardware/processor_unit/small, + /obj/item/stock_parts/cell/computer, + /obj/item/computer_hardware/hard_drive/small/syndicate, + /obj/item/computer_hardware/network_card/advanced, + /obj/item/computer_hardware/card_slot, + /obj/item/computer_hardware/printer/mini) /obj/item/modular_computer/tablet/pda/preset/syndicate/Initialize(mapload) obj_flags |= EMAGGED //starts emagged diff --git a/code/modules/modular_computers/computers/item/tablet/tablet_presets.dm b/code/modules/modular_computers/computers/item/tablet/tablet_presets.dm index 49f2ab88c79e..f2b9830bd3f1 100644 --- a/code/modules/modular_computers/computers/item/tablet/tablet_presets.dm +++ b/code/modules/modular_computers/computers/item/tablet/tablet_presets.dm @@ -69,7 +69,7 @@ starting_components = list( /obj/item/computer_hardware/processor_unit/small, /obj/item/stock_parts/cell/computer, /obj/item/computer_hardware/hard_drive/small/nukeops, - /obj/item/computer_hardware/network_card) + /obj/item/computer_hardware/network_card/advanced) starting_files = list(new /datum/computer_file/program/radar/fission360) initial_program = /datum/computer_file/program/radar/fission360 diff --git a/yogstation.dme b/yogstation.dme index 58551705d9d9..3f3def6cdc29 100644 --- a/yogstation.dme +++ b/yogstation.dme @@ -4086,7 +4086,6 @@ #include "yogstation\code\game\gamemodes\clean_this_shit_up\blood_cult.dm" #include "yogstation\code\game\gamemodes\clean_this_shit_up\clock_cult.dm" #include "yogstation\code\game\gamemodes\clean_this_shit_up\other.dm" -#include "yogstation\code\game\gamemodes\infiltration\infiltration.dm" #include "yogstation\code\game\machinery\suit_storage_unit.dm" #include "yogstation\code\game\machinery\computer\arcade.dm" #include "yogstation\code\game\machinery\computer\atmos_sim.dm" diff --git a/yogstation/code/game/gamemodes/infiltration/infiltration.dm b/yogstation/code/game/gamemodes/infiltration/infiltration.dm deleted file mode 100644 index 06b940dc295a..000000000000 --- a/yogstation/code/game/gamemodes/infiltration/infiltration.dm +++ /dev/null @@ -1,54 +0,0 @@ -// /datum/game_mode/infiltration -// name = "infiltration" -// config_tag = "infiltration" -// false_report_weight = 10 -// required_players = 25 -// required_enemies = 3 -// recommended_enemies = 5 -// enemy_minimum_age = 21 -// antag_flag = ROLE_INFILTRATOR - -// var/agents_possible = 5 -// var/agents_left = 1 -// var/list/pre_sit = list() - -// var/datum/team/infiltrator/sit_team - -// var/static/list/areas_that_can_finish = typecacheof(list(/area/shuttle/yogs/stealthcruiser, /area/yogs/infiltrator_base)) - -// /datum/game_mode/infiltration/pre_setup() -// var/n_agents = min(max(CEILING(num_players() / 7, 1), 1), antag_candidates.len, agents_possible) -// if(GLOB.Debug2 || n_agents >= required_enemies) -// for(var/i = 0, i < n_agents, ++i) -// var/datum/mind/new_sit = pick_n_take(antag_candidates) -// pre_sit += new_sit -// new_sit.assigned_role = "Syndicate Infiltrator" -// new_sit.special_role = "Syndicate Infiltrator" -// log_game("[key_name(new_sit)] has been selected as a syndicate infiltrator") -// return TRUE -// setup_error = "Not enough infiltrator candidates" -// message_admins("Not enough infiltrator candidates! Was making [n_agents], but we need [required_enemies]!") -// return FALSE - -// /datum/game_mode/infiltration/post_setup() -// sit_team = new /datum/team/infiltrator -// for(var/datum/mind/sit_mind in pre_sit) -// sit_mind.add_antag_datum(ANTAG_DATUM_INFILTRATOR, sit_team) -// sit_team.update_objectives() -// return ..() - -// /datum/game_mode/infiltration/generate_report() //make this less shit -// return "Reports show that the Syndicate is rounding up it's elite agents, possibly for a raid on a Nanotrasen-controlled station. Keep an eye out for unusual people." - -// /datum/game_mode/infiltration/set_round_result() -// ..() -// var/result = sit_team.get_result() -// switch(result) -// if(INFILTRATION_ALLCOMPLETE) -// SSticker.mode_result = "major win - objectives complete" -// if(INFILTRATION_MOSTCOMPLETE) -// SSticker.mode_result = "minor win - most objectives complete" -// if(INFILTRATION_SOMECOMPLETE) -// SSticker.mode_result = "neutral - some objectives complete" -// else -// SSticker.mode_result = "loss - no objectives complete" diff --git a/yogstation/code/modules/antagonists/infiltrator/outfit.dm b/yogstation/code/modules/antagonists/infiltrator/outfit.dm index f3881e535af0..a4af35415c82 100644 --- a/yogstation/code/modules/antagonists/infiltrator/outfit.dm +++ b/yogstation/code/modules/antagonists/infiltrator/outfit.dm @@ -1,13 +1,16 @@ -/datum/outfit/infiltrator // RIP +/datum/outfit/infiltrator // We're so back name = "Syndicate Infiltrator" uniform = /obj/item/clothing/under/chameleon/syndicate + suit = /obj/item/clothing/suit/chameleon/syndicate + glasses = /obj/item/clothing/glasses/chameleon/syndicate shoes = /obj/item/clothing/shoes/chameleon/noslip/syndicate gloves = /obj/item/clothing/gloves/chameleon/syndicate back = /obj/item/storage/backpack/chameleon/syndicate ears = /obj/item/radio/headset/chameleon/syndicate id = /obj/item/card/id/syndicate mask = /obj/item/clothing/mask/chameleon/syndicate + head = /obj/item/clothing/head/chameleon/syndicate belt = /obj/item/modular_computer/tablet/pda/preset/syndicate box = /obj/item/storage/box/survival/engineer backpack_contents = list(/obj/item/kitchen/knife/combat/survival=1,\ From 8994341711fc61c1dd2217a0b38104eaf0035999 Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Sat, 9 Nov 2024 02:28:11 +0000 Subject: [PATCH 04/24] Fixes chameleon hardsuits and them unduly calling their own proc hundreds of times --- code/modules/clothing/chameleon.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 3a830612c3ca..75ae62fbd02d 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -277,7 +277,6 @@ var/obj/item/clothing/suit/space/hardsuit/HS = picked_item var/obj/item/clothing/head/helmet/helmet = initial(HS.helmettype) I.head_piece.initial_state = initial(helmet.icon_state) - update_item(helmet, I.head_piece) I.head_piece.update_appearance(UPDATE_ICON) qdel(helmet) //YOGS END From 3a76e3ac0238c8374e01771f8e4c87ceb23149b8 Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Sat, 9 Nov 2024 23:23:21 +0000 Subject: [PATCH 05/24] Helmet light respects sprites --- code/modules/clothing/chameleon.dm | 9 ++++- .../antagonists/infiltrator/items/hardsuit.dm | 35 +++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 75ae62fbd02d..d923f45dd575 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -275,9 +275,16 @@ if(istype(atom_target, /obj/item/clothing/suit/space/hardsuit/infiltration)) //YOGS START var/obj/item/clothing/suit/space/hardsuit/infiltration/I = target var/obj/item/clothing/suit/space/hardsuit/HS = picked_item - var/obj/item/clothing/head/helmet/helmet = initial(HS.helmettype) + var/obj/item/clothing/head/helmet/space/hardsuit/helmet = initial(HS.helmettype) I.head_piece.initial_state = initial(helmet.icon_state) I.head_piece.update_appearance(UPDATE_ICON) + I.head_piece.current_disguise = picked_item + I.head_piece.new_type = helmet.hardsuit_type + var/datum/action/A + for(var/X in I.actions) + A = X + A.build_all_button_icons() + qdel(helmet) //YOGS END diff --git a/yogstation/code/modules/antagonists/infiltrator/items/hardsuit.dm b/yogstation/code/modules/antagonists/infiltrator/items/hardsuit.dm index f54efc3426ab..1525f9fa9d3b 100644 --- a/yogstation/code/modules/antagonists/infiltrator/items/hardsuit.dm +++ b/yogstation/code/modules/antagonists/infiltrator/items/hardsuit.dm @@ -4,6 +4,27 @@ item_state = "eng_helm" armor = list(MELEE = 35, BULLET = 15, LASER = 30,ENERGY = 10, BOMB = 10, BIO = 100, RAD = 50, FIRE = 75, ACID = 75) syndicate = TRUE + var/current_disguise = /obj/item/clothing/suit/space/hardsuit/infiltration + var/new_type = "engineering" + var/list/bad_hardsuits = list( + /obj/item/clothing/suit/space/hardsuit/darktemplar, + /obj/item/clothing/suit/space/hardsuit/darktemplar/chap, + /obj/item/clothing/suit/space/hardsuit/cult, + /obj/item/clothing/suit/space/hardsuit/syndi, + /obj/item/clothing/suit/space/hardsuit/syndi/elite, + /obj/item/clothing/suit/space/hardsuit/syndi/owl, + /obj/item/clothing/suit/space/hardsuit/syndi/debug, + /obj/item/clothing/suit/space/hardsuit/carp, + /obj/item/clothing/suit/space/hardsuit/carp/dragon, + /obj/item/clothing/suit/space/hardsuit/swat, + /obj/item/clothing/suit/space/hardsuit/swat/captain, + /obj/item/clothing/suit/space/hardsuit/ert/paranormal, + /obj/item/clothing/suit/space/hardsuit/ert/paranormal/inquisitor, + /obj/item/clothing/suit/space/hardsuit/ert/paranormal/beserker, + /obj/item/clothing/suit/space/hardsuit/shielded/swat, + /obj/item/clothing/suit/space/hardsuit/shielded/swat/honk, + /obj/item/clothing/suit/space/hardsuit/deathsquad + ) /obj/item/clothing/head/helmet/space/hardsuit/infiltration/Initialize(mapload) . = ..() @@ -11,6 +32,20 @@ var/obj/item/clothing/suit/space/hardsuit/infiltration/I = loc I.head_piece = src +/obj/item/clothing/head/helmet/space/hardsuit/infiltration/attack_self(mob/user) + if(bad_hardsuits.Find(current_disguise)) + to_chat(user, span_warning("You can't use the hardsuit's helmet light with this current disguise, change to another one!")) + else //Copied from original hardsuit attack_self and modified slightly + on = !on + icon_state = "[basestate][on]-[new_type]" + user.update_inv_head() //so our mob-overlays update + + set_light_on(on) + + for(var/X in actions) + var/datum/action/A = X + A.build_all_button_icons() + /obj/item/clothing/suit/space/hardsuit/infiltration name = "engineering hardsuit" icon_state = "hardsuit-engineering" From d552719659794ec5fd2712adb73d4c3b4c6a115c Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Sun, 10 Nov 2024 17:26:09 +0000 Subject: [PATCH 06/24] Surgery dufflebag --- _maps/shuttles/infiltrator_cutter.dmm | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/_maps/shuttles/infiltrator_cutter.dmm b/_maps/shuttles/infiltrator_cutter.dmm index a37ff62f9cc3..3821dfab6671 100644 --- a/_maps/shuttles/infiltrator_cutter.dmm +++ b/_maps/shuttles/infiltrator_cutter.dmm @@ -204,13 +204,6 @@ /area/shuttle/yogs/stealthcruiser) "aC" = ( /obj/structure/table, -/obj/item/circular_saw, -/obj/item/scalpel{ - pixel_y = 12 - }, -/obj/item/cautery{ - pixel_x = 4 - }, /obj/machinery/light/small{ dir = 8 }, @@ -312,8 +305,7 @@ /area/shuttle/yogs/stealthcruiser) "aN" = ( /obj/structure/table, -/obj/item/retractor, -/obj/item/hemostat, +/obj/item/storage/backpack/duffelbag/med/surgery, /obj/effect/decal/cleanable/dirt, /turf/open/floor/plasteel, /area/shuttle/yogs/stealthcruiser) From e855a6d8cef0301f5f00fadb905362cee0657646 Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Sun, 10 Nov 2024 22:53:55 +0000 Subject: [PATCH 07/24] Fixes the infiltrator cutter's bolt airlocks button --- _maps/shuttles/infiltrator_cutter.dmm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_maps/shuttles/infiltrator_cutter.dmm b/_maps/shuttles/infiltrator_cutter.dmm index 3821dfab6671..f2a3b0126e7e 100644 --- a/_maps/shuttles/infiltrator_cutter.dmm +++ b/_maps/shuttles/infiltrator_cutter.dmm @@ -7,7 +7,7 @@ dir = 2 }, /obj/machinery/door/airlock/external{ - id_tag = "syndicatecutter_bolt_port" + id_tag = "bolt_port" }, /obj/docking_port/mobile{ callTime = 150; @@ -69,7 +69,7 @@ dir = 1 }, /obj/machinery/door/airlock/external{ - id_tag = "syndicatecutter_bolt_port" + id_tag = "bolt_port" }, /obj/effect/mapping_helpers/airlock/access/all/syndicate/general, /turf/open/floor/plating, @@ -749,7 +749,7 @@ }, /obj/effect/mapping_helpers/airlock/locked, /obj/machinery/door/airlock/external{ - id_tag = "syndicatecutter_bolt_starboard" + id_tag = "bolt_starboard" }, /obj/effect/mapping_helpers/airlock/access/all/syndicate/general, /turf/open/floor/plating, @@ -772,7 +772,7 @@ }, /obj/effect/mapping_helpers/airlock/locked, /obj/machinery/door/airlock/external{ - id_tag = "syndicatecutter_bolt_starboard" + id_tag = "bolt_starboard" }, /obj/effect/mapping_helpers/airlock/access/all/syndicate/general, /turf/open/floor/plating, From 624d14889bcf0e83c8085bff9f4cb914681aff65 Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Tue, 12 Nov 2024 19:41:04 +0000 Subject: [PATCH 08/24] Puts it back to the old preview --- .../modules/antagonists/infiltrator/infiltrator.dm | 2 +- .../code/modules/antagonists/infiltrator/outfit.dm | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/yogstation/code/modules/antagonists/infiltrator/infiltrator.dm b/yogstation/code/modules/antagonists/infiltrator/infiltrator.dm index 6b96bc266696..d4e216f5178c 100644 --- a/yogstation/code/modules/antagonists/infiltrator/infiltrator.dm +++ b/yogstation/code/modules/antagonists/infiltrator/infiltrator.dm @@ -10,7 +10,7 @@ var/always_new_team = FALSE //If not assigned a team by default ops will try to join existing ones, set this to TRUE to always create new team. var/send_to_spawnpoint = TRUE //Should the user be moved to default spawnpoint. var/dress_up = TRUE - preview_outfit = /datum/outfit/infiltrator + preview_outfit = /datum/outfit/infiltrator_preview /datum/antagonist/infiltrator/apply_innate_effects(mob/living/mob_override) var/mob/living/M = mob_override || owner.current diff --git a/yogstation/code/modules/antagonists/infiltrator/outfit.dm b/yogstation/code/modules/antagonists/infiltrator/outfit.dm index a4af35415c82..4133f65ed53a 100644 --- a/yogstation/code/modules/antagonists/infiltrator/outfit.dm +++ b/yogstation/code/modules/antagonists/infiltrator/outfit.dm @@ -45,3 +45,15 @@ var/obj/item/modular_computer/worn_computer = H.belt if(istype(worn_computer)) worn_computer.update_label(card) + +/datum/outfit/infiltrator_preview + name = "Syndicate Infiltrator (Preview)" + uniform = /obj/item/clothing/under/chameleon/syndicate + glasses = /obj/item/clothing/glasses/chameleon/syndicate + shoes = /obj/item/clothing/shoes/chameleon/noslip/syndicate + gloves = /obj/item/clothing/gloves/chameleon/syndicate + back = /obj/item/storage/backpack/chameleon/syndicate + ears = /obj/item/radio/headset/chameleon/syndicate + id = /obj/item/card/id/syndicate + mask = /obj/item/clothing/mask/chameleon/syndicate + belt = /obj/item/modular_computer/tablet/pda/preset/syndicate From 901ec4fc10fe1a1d3a453693bad2c739f101e2b1 Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Wed, 13 Nov 2024 18:45:12 +0000 Subject: [PATCH 09/24] Escape disguised objective --- .../antagonists/infiltrator/objectives.dm | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/yogstation/code/modules/antagonists/infiltrator/objectives.dm b/yogstation/code/modules/antagonists/infiltrator/objectives.dm index d149d7affce5..da3b271a9c28 100644 --- a/yogstation/code/modules/antagonists/infiltrator/objectives.dm +++ b/yogstation/code/modules/antagonists/infiltrator/objectives.dm @@ -113,3 +113,59 @@ GLOBAL_LIST_INIT(infiltrator_kidnap_areas, typecacheof(list(/area/shuttle/yogs/s /datum/objective/infiltrator/kidnap/check_completion() var/target_area = get_area(target.current) return QDELETED(target) || (target.current && (!target.current.ckey || target.current.suiciding)) || (considered_alive(target) && is_type_in_typecache(target_area, GLOB.infiltrator_kidnap_areas)) + +/datum/objective/infiltrator/escape_disguised //Sort of based on the escape with identity objective for changelings, most of the code is from that with modifications + explanation_text = "Have one member of your team disguise as a crewmember using your chameleon kit, and escape on the shuttle while wearing their identification card." + var/target_real_name + var/target_missing_id + +/datum/objective/infiltrator/escape_disguised/proc/potential_targets() + var/list/possible_targets = list() + for(var/datum/mind/M in SSticker.minds) + if(!M || !considered_alive(M) || considered_afk(M) || !M.current || !M.current.client || !ishuman(M.current) || M.quiet_round) + continue + if(M.has_antag_datum(/datum/antagonist/infiltrator) || M.has_antag_datum(/datum/antagonist/traitor) || M.has_antag_datum(/datum/antagonist/nukeop)) + continue + if(M.assigned_role in GLOB.command_positions) + possible_targets[M] = 25 + else //Either command or crew, stealing IDs from security officers and then having to impersonate them on shuttle simply doesn't work well + possible_targets[M] = 5 + return possible_targets + +/datum/objective/infiltrator/escape_disguised/is_possible() + return LAZYLEN(potential_targets()) + +/datum/objective/infiltrator/escape_disguised/find_target(dupe_search_range, blacklist) + target = pickweight(potential_targets()) + update_explanation_text() + return target + +/datum/objective/infiltrator/escape_disguised/update_explanation_text() + if(target && target.current) + target_real_name = target.current.real_name + explanation_text = "Have one member of your team disguise as [target.name], the [target.assigned_role] using your chameleon kit, and escape on the shuttle or an escape pod" + var/mob/living/carbon/human/H + if(ishuman(target.current)) + H = target.current + if(H && H.get_id_name() != target_real_name) + target_missing_id = 1 + else + explanation_text += " while wearing their identification card" + explanation_text += "." + else + explanation_text = "Free Objective" + +/datum/objective/infiltrator/escape_disguised/check_completion() + . = ..() + if(completed) + return TRUE + if(!target || !target_real_name) + return TRUE + var/list/infiltrators = get_antag_minds(/datum/antagonist/infiltrator, TRUE) + for(var/datum/mind/M in infiltrators) + if(!considered_escaped(M)) + continue + var/mob/living/carbon/human/H = M.current + if(H.get_id_name() == target_real_name || target_missing_id) + return TRUE + return FALSE From 5d2d2489e8b50a0e288cf98c58ea2dcf1261f7ac Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:56:40 +0000 Subject: [PATCH 10/24] Chameleon copying --- code/modules/clothing/chameleon.dm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index d923f45dd575..79c2a7d367f7 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -142,6 +142,16 @@ qdel(O) return TRUE +/datum/action/chameleon_copy + name = "Copy person" + button_icon_state = "chameleon_outfit" //Temporary, just to test it works + var/syndicate = FALSE + +/datum/action/chameleon_copy/Grant(mob/user) + if(syndicate) + owner_has_control = is_syndicate(user) + return ..() + /datum/action/item_action/chameleon/change name = "Chameleon Change" From e342e6f5dfae1db937f13cd795602e4f57f94dfa Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Thu, 14 Nov 2024 22:36:18 +0000 Subject: [PATCH 11/24] Revert "Chameleon copying" This reverts commit 5d2d2489e8b50a0e288cf98c58ea2dcf1261f7ac. --- code/modules/clothing/chameleon.dm | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 79c2a7d367f7..d923f45dd575 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -142,16 +142,6 @@ qdel(O) return TRUE -/datum/action/chameleon_copy - name = "Copy person" - button_icon_state = "chameleon_outfit" //Temporary, just to test it works - var/syndicate = FALSE - -/datum/action/chameleon_copy/Grant(mob/user) - if(syndicate) - owner_has_control = is_syndicate(user) - return ..() - /datum/action/item_action/chameleon/change name = "Chameleon Change" From 00cea31347ea479f5d57223d0d9710717a6646d3 Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Mon, 18 Nov 2024 00:13:42 +0000 Subject: [PATCH 12/24] Do not go to the base to end the round --- yogstation/code/modules/antagonists/infiltrator/infiltrator.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/yogstation/code/modules/antagonists/infiltrator/infiltrator.dm b/yogstation/code/modules/antagonists/infiltrator/infiltrator.dm index d4e216f5178c..4862f26bdd0c 100644 --- a/yogstation/code/modules/antagonists/infiltrator/infiltrator.dm +++ b/yogstation/code/modules/antagonists/infiltrator/infiltrator.dm @@ -24,7 +24,6 @@ to_chat(owner, span_notice("You also have an internal radio, for communicating with your team-mates at all times.")) to_chat(owner, span_notice("You have a dusting implant, to ensure that Nanotrasen does not get their hands on Syndicate gear. Only activate it, if you are compromised.")) to_chat(owner, span_boldnotice(span_italics("Do NOT kill or destroy needlessly, as this defeats the purpose of an 'infiltration'!"))) - to_chat(owner, span_boldnotice("Once your objectives are complete, return to base, with all living infiltrators, to end the round.")) owner.announce_objectives() /datum/antagonist/infiltrator/on_gain() From 8c907d82ae40459aa5288fdfa7145e75699b97e8 Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Tue, 19 Nov 2024 00:22:15 +0000 Subject: [PATCH 13/24] Back to chameleon copying, I guess --- code/modules/clothing/chameleon.dm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index d923f45dd575..44c8be511514 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -142,6 +142,26 @@ qdel(O) return TRUE +/datum/action/chameleon_copy + name = "Copy person" + button_icon_state = "default" //Temporary, just to test it works + var/syndicate = FALSE + var/active = FALSE + var/copying = FALSE + +/datum/action/chameleon_copy/Grant(mob/M) + if(syndicate) + owner_has_control = is_syndicate(M) + return ..() + +/datum/action/chameleon_copy/Trigger(trigger_flags, atom/target) + if(active) + active = !active + build_all_button_icons() + return FALSE + to_chat(owner, span_announce("Whom shall your chameleon kit copy?")) //Bad wording, need to improve it + active = !active + build_all_button_icons() /datum/action/item_action/chameleon/change name = "Chameleon Change" @@ -160,6 +180,9 @@ var/datum/action/chameleon_outfit/O = new /datum/action/chameleon_outfit() O.syndicate = syndicate O.Grant(M) + var/datum/action/chameleon_copy/C = new /datum/action/chameleon_copy() + C.syndicate = syndicate + C.Grant(M) else M.chameleon_item_actions |= src if(syndicate) From 8b682efc84880f0a299769f097f5224b8b3f6379 Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:14:00 +0000 Subject: [PATCH 14/24] Actually make it do something --- code/modules/clothing/chameleon.dm | 54 ++++++++++++++++--- .../items/implants/implant_infiltrator.dm | 1 - 2 files changed, 48 insertions(+), 7 deletions(-) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 44c8be511514..22475190c4e6 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -142,26 +142,68 @@ qdel(O) return TRUE -/datum/action/chameleon_copy +/datum/action/cooldown/chameleon_copy name = "Copy person" button_icon_state = "default" //Temporary, just to test it works + var/target_range = 3 var/syndicate = FALSE var/active = FALSE var/copying = FALSE + var/in_use = FALSE -/datum/action/chameleon_copy/Grant(mob/M) +/datum/action/cooldown/chameleon_copy/Grant(mob/M) if(syndicate) owner_has_control = is_syndicate(M) return ..() -/datum/action/chameleon_copy/Trigger(trigger_flags, atom/target) +/datum/action/cooldown/chameleon_copy/Trigger(trigger_flags, atom/target) if(active) - active = !active + active = FALSE build_all_button_icons() return FALSE to_chat(owner, span_announce("Whom shall your chameleon kit copy?")) //Bad wording, need to improve it - active = !active + active = TRUE build_all_button_icons() + if(target) + return InterceptClickOn(owner, null, target) + +/datum/action/cooldown/chameleon_copy/proc/CheckValidTarget(atom/target_atom) + if(target_atom == owner) + return FALSE + return TRUE + +/datum/action/cooldown/chameleon_copy/proc/CheckCanTarget(atom/target_atom) + if(target_range) + if(!(target_atom in view(target_range, owner))) + return FALSE + return istype(target_atom) + +/datum/action/cooldown/chameleon_copy/proc/click_with_power(atom/target_atom) + if(in_use || !CheckValidTarget(target_atom)) + return FALSE + if(!CheckCanTarget(target_atom)) + return TRUE + in_use = TRUE + FireTargetedPower(target_atom) + in_use = FALSE + return TRUE + +/datum/action/cooldown/chameleon_copy/proc/FireTargetedPower(atom/target_atom) + . = ..() + var/mob/living/target = target_atom + var/mob/living/user = owner + var/datum/outfit/O = new() + to_chat(owner, span_notice("Attempting to copy [target]...")) + if(!do_after(user, 5 SECONDS, target)) + return + for(var/item in target.contents) + message_admins(item) + to_chat(owner, span_notice("Successfully copied [target]!")) + active = FALSE + + +/datum/action/cooldown/chameleon_copy/InterceptClickOn(/mob/living/caller, params, atom/target) + click_with_power() /datum/action/item_action/chameleon/change name = "Chameleon Change" @@ -180,7 +222,7 @@ var/datum/action/chameleon_outfit/O = new /datum/action/chameleon_outfit() O.syndicate = syndicate O.Grant(M) - var/datum/action/chameleon_copy/C = new /datum/action/chameleon_copy() + var/datum/action/cooldown/chameleon_copy/C = new /datum/action/cooldown/chameleon_copy() C.syndicate = syndicate C.Grant(M) else diff --git a/yogstation/code/game/objects/items/implants/implant_infiltrator.dm b/yogstation/code/game/objects/items/implants/implant_infiltrator.dm index d5d5f1b55d95..7c4507d8f6cc 100644 --- a/yogstation/code/game/objects/items/implants/implant_infiltrator.dm +++ b/yogstation/code/game/objects/items/implants/implant_infiltrator.dm @@ -81,7 +81,6 @@ else pinpointer.scan_target = targets[pinpointer_chosen] to_chat(imp_in, span_notice("Pinpointer target set to [pinpointer.scan_target]")) - message_admins(pinpointer.scan_target) pinpointer.point_to_target() if ("Send Ship Away") alert_radio.talk_into(alert_radio, "The infiltration cruiser has been remotely sent to the base by [imp_in.real_name]") From bc4e49d2fae229b681fc22edd549e01db63c873e Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:18:06 +0000 Subject: [PATCH 15/24] This is why I need to think sometimes --- code/modules/clothing/chameleon.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 22475190c4e6..dad2674340dc 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -189,7 +189,6 @@ return TRUE /datum/action/cooldown/chameleon_copy/proc/FireTargetedPower(atom/target_atom) - . = ..() var/mob/living/target = target_atom var/mob/living/user = owner var/datum/outfit/O = new() From 69d76d1a9e3e28908efffa0933738259a6ce289c Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Wed, 20 Nov 2024 23:23:39 +0000 Subject: [PATCH 16/24] Even more of a mess --- code/modules/clothing/chameleon.dm | 46 ++++++++++++++++-------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index dad2674340dc..89ef567214b2 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -156,53 +156,57 @@ owner_has_control = is_syndicate(M) return ..() -/datum/action/cooldown/chameleon_copy/Trigger(trigger_flags, atom/target) +/datum/action/cooldown/chameleon_copy/Trigger(trigger_flags, mob/living/copy_target) if(active) active = FALSE + background_icon_state = "bg_default" build_all_button_icons() + unset_click_ability(owner) return FALSE to_chat(owner, span_announce("Whom shall your chameleon kit copy?")) //Bad wording, need to improve it active = TRUE + background_icon_state = "bg_default_on" build_all_button_icons() - if(target) - return InterceptClickOn(owner, null, target) + if(copy_target) + return InterceptClickOn(owner, null, copy_target) + return set_click_ability(owner) -/datum/action/cooldown/chameleon_copy/proc/CheckValidTarget(atom/target_atom) - if(target_atom == owner) +/datum/action/cooldown/chameleon_copy/proc/CheckValidTarget(mob/living/copy_target) + if(copy_target == owner) return FALSE return TRUE -/datum/action/cooldown/chameleon_copy/proc/CheckCanTarget(atom/target_atom) +/datum/action/cooldown/chameleon_copy/proc/CheckCanTarget(mob/living/copy_target) + var/mob/living/carbon/human/user = owner if(target_range) - if(!(target_atom in view(target_range, owner))) + if(!(get_dist(user, copy_target) <= target_range)) //get_dist really hates datums for some reason return FALSE - return istype(target_atom) + return istype(target) -/datum/action/cooldown/chameleon_copy/proc/click_with_power(atom/target_atom) - if(in_use || !CheckValidTarget(target_atom)) +/datum/action/cooldown/chameleon_copy/proc/click_with_power(mob/living/copy_target) + if(in_use || !CheckValidTarget(copy_target)) return FALSE - if(!CheckCanTarget(target_atom)) + if(!CheckCanTarget(copy_target)) return TRUE in_use = TRUE - FireTargetedPower(target_atom) + FireTargetedPower(copy_target) in_use = FALSE return TRUE -/datum/action/cooldown/chameleon_copy/proc/FireTargetedPower(atom/target_atom) - var/mob/living/target = target_atom - var/mob/living/user = owner - var/datum/outfit/O = new() - to_chat(owner, span_notice("Attempting to copy [target]...")) - if(!do_after(user, 5 SECONDS, target)) +/datum/action/cooldown/chameleon_copy/proc/FireTargetedPower(mob/living/copy_target) + //var/datum/outfit/O = new() + to_chat(owner, span_notice("Attempting to copy [copy_target]...")) + if(!do_after(owner, 5 SECONDS, copy_target)) return - for(var/item in target.contents) + for(var/item in copy_target.contents) message_admins(item) - to_chat(owner, span_notice("Successfully copied [target]!")) + to_chat(owner, span_notice("Successfully copied [copy_target]!")) active = FALSE /datum/action/cooldown/chameleon_copy/InterceptClickOn(/mob/living/caller, params, atom/target) - click_with_power() + var/mob/living/copy_target = target + click_with_power(copy_target) /datum/action/item_action/chameleon/change name = "Chameleon Change" From f0afe832893d57d27c0e8c3768b2324bf65b2d82 Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Thu, 21 Nov 2024 14:02:37 +0000 Subject: [PATCH 17/24] Semi working but still not working --- code/modules/clothing/chameleon.dm | 41 +++++++++++++++++------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 89ef567214b2..a091cf37a13a 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -157,6 +157,8 @@ return ..() /datum/action/cooldown/chameleon_copy/Trigger(trigger_flags, mob/living/copy_target) + message_admins("Trigger called") + message_admins("Trigger: [copy_target]") if(active) active = FALSE background_icon_state = "bg_default" @@ -172,41 +174,46 @@ return set_click_ability(owner) /datum/action/cooldown/chameleon_copy/proc/CheckValidTarget(mob/living/copy_target) + message_admins("CheckValidTarget called") if(copy_target == owner) return FALSE return TRUE -/datum/action/cooldown/chameleon_copy/proc/CheckCanTarget(mob/living/copy_target) - var/mob/living/carbon/human/user = owner - if(target_range) - if(!(get_dist(user, copy_target) <= target_range)) //get_dist really hates datums for some reason - return FALSE - return istype(target) +/datum/action/cooldown/chameleon_copy/proc/CheckCanTarget(atom/target) + return !isnull(target) -/datum/action/cooldown/chameleon_copy/proc/click_with_power(mob/living/copy_target) - if(in_use || !CheckValidTarget(copy_target)) +/datum/action/cooldown/chameleon_copy/proc/click_with_power(atom/target) + message_admins("click_with_power called") + message_admins("Click: [target]") + if(in_use || !CheckValidTarget(target)) + message_admins("Failed click_with_power 1") return FALSE - if(!CheckCanTarget(copy_target)) + if(!CheckCanTarget(target)) + message_admins("Failed click_with_power 2") return TRUE in_use = TRUE - FireTargetedPower(copy_target) + FireTargetedPower(target) in_use = FALSE return TRUE -/datum/action/cooldown/chameleon_copy/proc/FireTargetedPower(mob/living/copy_target) +/datum/action/cooldown/chameleon_copy/proc/FireTargetedPower(atom/target) + message_admins("FireTargetedPower called") + var/mob/M = target + message_admins("Mob: [M]") //var/datum/outfit/O = new() - to_chat(owner, span_notice("Attempting to copy [copy_target]...")) - if(!do_after(owner, 5 SECONDS, copy_target)) + to_chat(owner, span_notice("Attempting to copy [M]...")) + if(!do_after(owner, 5 SECONDS, target)) return - for(var/item in copy_target.contents) + for(var/item in target.contents) message_admins(item) - to_chat(owner, span_notice("Successfully copied [copy_target]!")) + to_chat(owner, span_notice("Successfully copied [M]!")) active = FALSE /datum/action/cooldown/chameleon_copy/InterceptClickOn(/mob/living/caller, params, atom/target) - var/mob/living/copy_target = target - click_with_power(copy_target) + message_admins("InterceptClickOn called") + message_admins("Intercept: [target]") + click_with_power(target) /datum/action/item_action/chameleon/change name = "Chameleon Change" From 397575c414bee96a132810a942747db2148dac7c Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Thu, 21 Nov 2024 20:55:21 +0000 Subject: [PATCH 18/24] Back to atoms I guess --- code/modules/clothing/chameleon.dm | 31 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index a091cf37a13a..14dd0fd097f7 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -156,9 +156,9 @@ owner_has_control = is_syndicate(M) return ..() -/datum/action/cooldown/chameleon_copy/Trigger(trigger_flags, mob/living/copy_target) +/datum/action/cooldown/chameleon_copy/Trigger(trigger_flags, atom/target) message_admins("Trigger called") - message_admins("Trigger: [copy_target]") + message_admins("Trigger: [target]") if(active) active = FALSE background_icon_state = "bg_default" @@ -169,42 +169,43 @@ active = TRUE background_icon_state = "bg_default_on" build_all_button_icons() - if(copy_target) - return InterceptClickOn(owner, null, copy_target) - return set_click_ability(owner) + if(target) + return InterceptClickOn(owner, null, target) + set_click_ability(owner) -/datum/action/cooldown/chameleon_copy/proc/CheckValidTarget(mob/living/copy_target) +/datum/action/cooldown/chameleon_copy/proc/CheckValidTarget(atom/target) message_admins("CheckValidTarget called") - if(copy_target == owner) + if(target == owner) return FALSE return TRUE /datum/action/cooldown/chameleon_copy/proc/CheckCanTarget(atom/target) return !isnull(target) -/datum/action/cooldown/chameleon_copy/proc/click_with_power(atom/target) +/datum/action/cooldown/chameleon_copy/proc/click_with_power(atom/target_atom) message_admins("click_with_power called") - message_admins("Click: [target]") - if(in_use || !CheckValidTarget(target)) + message_admins("Click: [target_atom]") + if(in_use || !CheckValidTarget(target_atom)) message_admins("Failed click_with_power 1") return FALSE - if(!CheckCanTarget(target)) + if(!CheckCanTarget(target_atom)) message_admins("Failed click_with_power 2") return TRUE in_use = TRUE - FireTargetedPower(target) + FireTargetedPower(target_atom) in_use = FALSE return TRUE -/datum/action/cooldown/chameleon_copy/proc/FireTargetedPower(atom/target) +/datum/action/cooldown/chameleon_copy/proc/FireTargetedPower(atom/target_atom) message_admins("FireTargetedPower called") var/mob/M = target + message_admins("Atom: [target_atom]") message_admins("Mob: [M]") //var/datum/outfit/O = new() to_chat(owner, span_notice("Attempting to copy [M]...")) - if(!do_after(owner, 5 SECONDS, target)) + if(!do_after(owner, 5 SECONDS, target_atom)) return - for(var/item in target.contents) + for(var/item in target_atom.contents) message_admins(item) to_chat(owner, span_notice("Successfully copied [M]!")) active = FALSE From 7acb94a674b3a17a9c63dd6493623fb91dd55a58 Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Thu, 21 Nov 2024 22:36:34 +0000 Subject: [PATCH 19/24] Just to confirm it isn't this --- code/modules/clothing/chameleon.dm | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 14dd0fd097f7..3666e1dd3c54 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -169,8 +169,6 @@ active = TRUE background_icon_state = "bg_default_on" build_all_button_icons() - if(target) - return InterceptClickOn(owner, null, target) set_click_ability(owner) /datum/action/cooldown/chameleon_copy/proc/CheckValidTarget(atom/target) From 13851bf1c89e756e60d8b3c1bdec31cfc6f83b85 Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Sat, 23 Nov 2024 18:45:40 +0000 Subject: [PATCH 20/24] Finally works --- code/modules/clothing/chameleon.dm | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 3666e1dd3c54..d515d18c694a 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -142,6 +142,7 @@ qdel(O) return TRUE + /datum/action/cooldown/chameleon_copy name = "Copy person" button_icon_state = "default" //Temporary, just to test it works @@ -151,10 +152,15 @@ var/copying = FALSE var/in_use = FALSE +/datum/action/cooldown/chameleon_copy/InterceptClickOn(mob/living/caller, params, atom/target) + message_admins("InterceptClickOn called") + message_admins("Intercept: [target]") + click_with_power(target) + /datum/action/cooldown/chameleon_copy/Grant(mob/M) if(syndicate) owner_has_control = is_syndicate(M) - return ..() + . = ..() /datum/action/cooldown/chameleon_copy/Trigger(trigger_flags, atom/target) message_admins("Trigger called") @@ -177,18 +183,12 @@ return FALSE return TRUE -/datum/action/cooldown/chameleon_copy/proc/CheckCanTarget(atom/target) - return !isnull(target) - /datum/action/cooldown/chameleon_copy/proc/click_with_power(atom/target_atom) message_admins("click_with_power called") message_admins("Click: [target_atom]") if(in_use || !CheckValidTarget(target_atom)) message_admins("Failed click_with_power 1") return FALSE - if(!CheckCanTarget(target_atom)) - message_admins("Failed click_with_power 2") - return TRUE in_use = TRUE FireTargetedPower(target_atom) in_use = FALSE @@ -196,7 +196,7 @@ /datum/action/cooldown/chameleon_copy/proc/FireTargetedPower(atom/target_atom) message_admins("FireTargetedPower called") - var/mob/M = target + var/mob/M = target_atom message_admins("Atom: [target_atom]") message_admins("Mob: [M]") //var/datum/outfit/O = new() @@ -207,12 +207,7 @@ message_admins(item) to_chat(owner, span_notice("Successfully copied [M]!")) active = FALSE - -/datum/action/cooldown/chameleon_copy/InterceptClickOn(/mob/living/caller, params, atom/target) - message_admins("InterceptClickOn called") - message_admins("Intercept: [target]") - click_with_power(target) /datum/action/item_action/chameleon/change name = "Chameleon Change" From 7b55b8c7aade7c0c5079eb85b7086f9e731111bd Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Mon, 25 Nov 2024 07:11:05 +0000 Subject: [PATCH 21/24] Chameleon working, but badly --- code/modules/clothing/chameleon.dm | 106 ++++++++++++++++++----------- 1 file changed, 65 insertions(+), 41 deletions(-) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index d515d18c694a..395ccbf794da 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -99,30 +99,45 @@ /datum/action/chameleon_outfit/Trigger() return select_outfit(owner) -/datum/action/chameleon_outfit/proc/select_outfit(mob/user) +/datum/action/chameleon_outfit/proc/select_outfit(mob/user, datum/outfit/outfit = null) + message_admins("select_outfit called") if(!user || !IsAvailable(feedback = FALSE)) return FALSE - var/selected = tgui_input_list(user, "Select outfit to change into", "Chameleon Outfit", outfit_options) - if(!IsAvailable(feedback = FALSE) || QDELETED(src) || QDELETED(user)) - return FALSE - var/outfit_type = outfit_options[selected] - if(!outfit_type) - return FALSE - var/datum/outfit/O = new outfit_type() - var/list/outfit_types = O.get_chameleon_disguise_info() - - for(var/V in user.chameleon_item_actions) - var/datum/action/item_action/chameleon/change/A = V - var/done = FALSE - for(var/T in outfit_types) - for(var/name in A.chameleon_list) - if(A.chameleon_list[name] == T) - A.update_look(user, T) - outfit_types -= T - done = TRUE + var/datum/outfit/O + if(isnull(outfit)) //If no outfit is passed, get the user to decide + var/selected = tgui_input_list(user, "Select outfit to change into", "Chameleon Outfit", outfit_options) + if(!IsAvailable(feedback = FALSE) || QDELETED(src) || QDELETED(user)) + return FALSE + var/outfit_type = outfit_options[selected] + if(!outfit_type) + return FALSE + message_admins(outfit_type) + O = new outfit_type() + message_admins(O) + var/list/outfit_types = O.get_chameleon_disguise_info() + for(var/V in user.chameleon_item_actions) + var/datum/action/item_action/chameleon/change/A = V + var/done = FALSE + for(var/T in outfit_types) + for(var/name in A.chameleon_list) + if(A.chameleon_list[name] == T) + message_admins("List: [A.chameleon_list[name]], T: [T]") + A.update_look(user, T) + outfit_types -= T + done = TRUE + break + if(done) break - if(done) - break + else //If a specific outfit is passed through + var/list/types = outfit.get_chameleon_disguise_info() + message_admins(outfit) + message_admins("Uniform: [outfit.uniform]") + message_admins("Suit: [outfit.suit]") + for(var/i in 1 to types.len) + var/datum/action/item_action/chameleon/change/A = user.chameleon_item_actions[i] + message_admins("T: [types[i]]") + A.update_look(user, types[i]) + return TRUE //hardsuit helmets/suit hoods if(O.toggle_helmet && (ispath(O.suit, /obj/item/clothing/suit/space/hardsuit) || ispath(O.suit, /obj/item/clothing/suit/hooded)) && ishuman(user)) var/mob/living/carbon/human/H = user @@ -153,8 +168,6 @@ var/in_use = FALSE /datum/action/cooldown/chameleon_copy/InterceptClickOn(mob/living/caller, params, atom/target) - message_admins("InterceptClickOn called") - message_admins("Intercept: [target]") click_with_power(target) /datum/action/cooldown/chameleon_copy/Grant(mob/M) @@ -162,32 +175,35 @@ owner_has_control = is_syndicate(M) . = ..() -/datum/action/cooldown/chameleon_copy/Trigger(trigger_flags, atom/target) - message_admins("Trigger called") - message_admins("Trigger: [target]") +/datum/action/cooldown/chameleon_copy/proc/toggle_button() if(active) active = FALSE background_icon_state = "bg_default" build_all_button_icons() unset_click_ability(owner) return FALSE - to_chat(owner, span_announce("Whom shall your chameleon kit copy?")) //Bad wording, need to improve it active = TRUE background_icon_state = "bg_default_on" build_all_button_icons() set_click_ability(owner) +/datum/action/cooldown/chameleon_copy/Trigger(trigger_flags, atom/target) + if(active) + toggle_button() + else + to_chat(owner, span_announce("Whom shall your chameleon kit copy?")) //Bad wording, need to improve it + toggle_button() + + /datum/action/cooldown/chameleon_copy/proc/CheckValidTarget(atom/target) - message_admins("CheckValidTarget called") if(target == owner) return FALSE + if(!ishuman(target)) + return FALSE return TRUE /datum/action/cooldown/chameleon_copy/proc/click_with_power(atom/target_atom) - message_admins("click_with_power called") - message_admins("Click: [target_atom]") if(in_use || !CheckValidTarget(target_atom)) - message_admins("Failed click_with_power 1") return FALSE in_use = TRUE FireTargetedPower(target_atom) @@ -195,18 +211,24 @@ return TRUE /datum/action/cooldown/chameleon_copy/proc/FireTargetedPower(atom/target_atom) - message_admins("FireTargetedPower called") - var/mob/M = target_atom - message_admins("Atom: [target_atom]") - message_admins("Mob: [M]") - //var/datum/outfit/O = new() - to_chat(owner, span_notice("Attempting to copy [M]...")) + var/mob/living/carbon/human/T = target_atom + var/datum/outfit/O = new() + to_chat(owner, span_notice("Attempting to copy [T]...")) if(!do_after(owner, 5 SECONDS, target_atom)) return - for(var/item in target_atom.contents) - message_admins(item) - to_chat(owner, span_notice("Successfully copied [M]!")) - active = FALSE + O.uniform = T.w_uniform + O.suit = T.wear_suit + O.head = T.head + O.shoes = T.shoes + O.gloves = T.gloves + O.ears = T.ears + O.glasses = T.glasses + O.mask = T.wear_mask + O.neck = T.wear_neck + var/datum/action/chameleon_outfit/select = locate(/datum/action/chameleon_outfit) in owner.actions + select.select_outfit(owner, O) + to_chat(owner, span_notice("Successfully copied [T]!")) + toggle_button() /datum/action/item_action/chameleon/change @@ -691,6 +713,8 @@ chameleon_action.emp_randomise(INFINITY) /obj/item/clothing/mask/chameleon/attack_self(mob/user) + if(!is_syndicate(user)) //Wouldn't want someone to randomly find a switch on a mask, would we? + return vchange = !vchange to_chat(user, span_notice("The voice changer is now [vchange ? "on" : "off"]!")) if(vchange) From 89461c755c92c816882e442318b5102ffbc8c1b6 Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:03:04 +0000 Subject: [PATCH 22/24] Might be more reasonable --- code/modules/clothing/chameleon.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 395ccbf794da..ce3dbb57eeb5 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -134,9 +134,11 @@ message_admins("Uniform: [outfit.uniform]") message_admins("Suit: [outfit.suit]") for(var/i in 1 to types.len) - var/datum/action/item_action/chameleon/change/A = user.chameleon_item_actions[i] - message_admins("T: [types[i]]") - A.update_look(user, types[i]) + for(var/V in user.chameleon_item_actions) + var/datum/action/item_action/chameleon/change/A = V + if(istype(types[i], A.chameleon_type)) + message_admins("T: [types[i]]") + A.update_look(user, types[i]) return TRUE //hardsuit helmets/suit hoods if(O.toggle_helmet && (ispath(O.suit, /obj/item/clothing/suit/space/hardsuit) || ispath(O.suit, /obj/item/clothing/suit/hooded)) && ishuman(user)) From 7c2d2c7ca538808f36030ca304659f0b7769c2a3 Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:56:00 +0000 Subject: [PATCH 23/24] Moves it to 10 seconds instead --- code/modules/clothing/chameleon.dm | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index ce3dbb57eeb5..5deddf6deeb9 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -100,7 +100,6 @@ return select_outfit(owner) /datum/action/chameleon_outfit/proc/select_outfit(mob/user, datum/outfit/outfit = null) - message_admins("select_outfit called") if(!user || !IsAvailable(feedback = FALSE)) return FALSE var/datum/outfit/O @@ -111,9 +110,7 @@ var/outfit_type = outfit_options[selected] if(!outfit_type) return FALSE - message_admins(outfit_type) O = new outfit_type() - message_admins(O) var/list/outfit_types = O.get_chameleon_disguise_info() for(var/V in user.chameleon_item_actions) var/datum/action/item_action/chameleon/change/A = V @@ -121,7 +118,6 @@ for(var/T in outfit_types) for(var/name in A.chameleon_list) if(A.chameleon_list[name] == T) - message_admins("List: [A.chameleon_list[name]], T: [T]") A.update_look(user, T) outfit_types -= T done = TRUE @@ -130,15 +126,11 @@ break else //If a specific outfit is passed through var/list/types = outfit.get_chameleon_disguise_info() - message_admins(outfit) - message_admins("Uniform: [outfit.uniform]") - message_admins("Suit: [outfit.suit]") - for(var/i in 1 to types.len) + for(var/T in types) for(var/V in user.chameleon_item_actions) var/datum/action/item_action/chameleon/change/A = V - if(istype(types[i], A.chameleon_type)) - message_admins("T: [types[i]]") - A.update_look(user, types[i]) + if(istype(T, A.chameleon_type)) + A.update_look(user, T) return TRUE //hardsuit helmets/suit hoods if(O.toggle_helmet && (ispath(O.suit, /obj/item/clothing/suit/space/hardsuit) || ispath(O.suit, /obj/item/clothing/suit/hooded)) && ishuman(user)) @@ -216,7 +208,7 @@ var/mob/living/carbon/human/T = target_atom var/datum/outfit/O = new() to_chat(owner, span_notice("Attempting to copy [T]...")) - if(!do_after(owner, 5 SECONDS, target_atom)) + if(!do_after(owner, 10 SECONDS, target_atom)) return O.uniform = T.w_uniform O.suit = T.wear_suit @@ -226,7 +218,6 @@ O.ears = T.ears O.glasses = T.glasses O.mask = T.wear_mask - O.neck = T.wear_neck var/datum/action/chameleon_outfit/select = locate(/datum/action/chameleon_outfit) in owner.actions select.select_outfit(owner, O) to_chat(owner, span_notice("Successfully copied [T]!")) From ac064eb26038c45638ea7df193968d6805c869de Mon Sep 17 00:00:00 2001 From: Oblisk234 <61151679+Oblisk234@users.noreply.github.com> Date: Wed, 27 Nov 2024 17:19:57 +0000 Subject: [PATCH 24/24] Keeps chameleon copy to one proc --- code/modules/clothing/chameleon.dm | 65 ++++++++++--------- .../antagonists/infiltrator/objectives.dm | 11 ++++ 2 files changed, 45 insertions(+), 31 deletions(-) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 5deddf6deeb9..324b419f6c09 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -99,39 +99,30 @@ /datum/action/chameleon_outfit/Trigger() return select_outfit(owner) -/datum/action/chameleon_outfit/proc/select_outfit(mob/user, datum/outfit/outfit = null) +/datum/action/chameleon_outfit/proc/select_outfit(mob/user) if(!user || !IsAvailable(feedback = FALSE)) return FALSE var/datum/outfit/O - if(isnull(outfit)) //If no outfit is passed, get the user to decide - var/selected = tgui_input_list(user, "Select outfit to change into", "Chameleon Outfit", outfit_options) - if(!IsAvailable(feedback = FALSE) || QDELETED(src) || QDELETED(user)) - return FALSE - var/outfit_type = outfit_options[selected] - if(!outfit_type) - return FALSE - O = new outfit_type() - var/list/outfit_types = O.get_chameleon_disguise_info() - for(var/V in user.chameleon_item_actions) - var/datum/action/item_action/chameleon/change/A = V - var/done = FALSE - for(var/T in outfit_types) - for(var/name in A.chameleon_list) - if(A.chameleon_list[name] == T) - A.update_look(user, T) - outfit_types -= T - done = TRUE - break - if(done) - break - else //If a specific outfit is passed through - var/list/types = outfit.get_chameleon_disguise_info() - for(var/T in types) - for(var/V in user.chameleon_item_actions) - var/datum/action/item_action/chameleon/change/A = V - if(istype(T, A.chameleon_type)) + var/selected = tgui_input_list(user, "Select outfit to change into", "Chameleon Outfit", outfit_options) + if(!IsAvailable(feedback = FALSE) || QDELETED(src) || QDELETED(user)) + return FALSE + var/outfit_type = outfit_options[selected] + if(!outfit_type) + return FALSE + O = new outfit_type() + var/list/outfit_types = O.get_chameleon_disguise_info() + for(var/V in user.chameleon_item_actions) + var/datum/action/item_action/chameleon/change/A = V + var/done = FALSE + for(var/T in outfit_types) + for(var/name in A.chameleon_list) + if(A.chameleon_list[name] == T) A.update_look(user, T) - return TRUE + outfit_types -= T + done = TRUE + break + if(done) + break //hardsuit helmets/suit hoods if(O.toggle_helmet && (ispath(O.suit, /obj/item/clothing/suit/space/hardsuit) || ispath(O.suit, /obj/item/clothing/suit/hooded)) && ishuman(user)) var/mob/living/carbon/human/H = user @@ -218,8 +209,17 @@ O.ears = T.ears O.glasses = T.glasses O.mask = T.wear_mask - var/datum/action/chameleon_outfit/select = locate(/datum/action/chameleon_outfit) in owner.actions - select.select_outfit(owner, O) + O.back = T.back + var/list/types = O.get_chameleon_disguise_info() + for(var/Y in types) + for(var/V in owner.chameleon_item_actions) + var/datum/action/item_action/chameleon/change/A = V + if(A.chameleon_blacklist[Y]) + continue + if(istype(Y, A.chameleon_type)) //Need to make sure it's the right type, wouldn't want to wear an armour vest on your head. + A.update_look(owner, Y) + A.copying = TRUE + A.copy_target = T to_chat(owner, span_notice("Successfully copied [T]!")) toggle_button() @@ -233,6 +233,8 @@ var/emp_timer var/current_disguise = null var/syndicate = FALSE + var/copying = FALSE + var/mob/living/copy_target /datum/action/item_action/chameleon/change/Grant(mob/M) if(M && (owner != M)) @@ -279,6 +281,7 @@ if(!picked_item) return update_look(user, picked_item) + copying = FALSE /datum/action/item_action/chameleon/change/proc/random_look(mob/user) var/picked_name = pick(chameleon_list) diff --git a/yogstation/code/modules/antagonists/infiltrator/objectives.dm b/yogstation/code/modules/antagonists/infiltrator/objectives.dm index da3b271a9c28..f5edd488b21d 100644 --- a/yogstation/code/modules/antagonists/infiltrator/objectives.dm +++ b/yogstation/code/modules/antagonists/infiltrator/objectives.dm @@ -166,6 +166,17 @@ GLOBAL_LIST_INIT(infiltrator_kidnap_areas, typecacheof(list(/area/shuttle/yogs/s if(!considered_escaped(M)) continue var/mob/living/carbon/human/H = M.current + var/clothing = H.chameleon_item_actions.len //8 possible clothes: Head, suit, ears, glasses, uniform, shoes, gloves, backpack + var/copied = TRUE + for(var/datum/action/item_action/chameleon/change/V in H.chameleon_item_actions) + if(!V.copying) + clothing -= 1 + if(V.copy_target != target) + clothing -= 1 + if(clothing<3) //Some leniency if you don't have the required clothes or your target isn't wearing many, but not complete leniency + copied = FALSE + if(!copied) + continue if(H.get_id_name() == target_real_name || target_missing_id) return TRUE return FALSE