Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reworks infiltrators and converts them into a midround antagonist #22802

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions _maps/shuttles/infiltrator_cutter.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
},
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -757,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,
Expand All @@ -780,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,
Expand Down
138 changes: 115 additions & 23 deletions code/modules/clothing/chameleon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,30 +99,39 @@
/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)
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
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
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))
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))
var/mob/living/carbon/human/H = user
Expand All @@ -143,6 +152,78 @@
return TRUE


/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/cooldown/chameleon_copy/InterceptClickOn(mob/living/caller, params, atom/target)
click_with_power(target)

/datum/action/cooldown/chameleon_copy/Grant(mob/M)
if(syndicate)
owner_has_control = is_syndicate(M)
. = ..()

/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
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)
if(target == owner)
return FALSE
if(!ishuman(target))
return FALSE
return TRUE

/datum/action/cooldown/chameleon_copy/proc/click_with_power(atom/target_atom)
if(in_use || !CheckValidTarget(target_atom))
return FALSE
in_use = TRUE
FireTargetedPower(target_atom)
in_use = FALSE
return TRUE

/datum/action/cooldown/chameleon_copy/proc/FireTargetedPower(atom/target_atom)
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, 10 SECONDS, target_atom))
return
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
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
name = "Chameleon Change"
var/list/chameleon_blacklist = list() //This is a typecache
Expand All @@ -160,6 +241,9 @@
var/datum/action/chameleon_outfit/O = new /datum/action/chameleon_outfit()
O.syndicate = syndicate
O.Grant(M)
var/datum/action/cooldown/chameleon_copy/C = new /datum/action/cooldown/chameleon_copy()
C.syndicate = syndicate
C.Grant(M)
else
M.chameleon_item_actions |= src
if(syndicate)
Expand Down Expand Up @@ -275,10 +359,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)
update_item(helmet, I.head_piece)
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

Expand Down Expand Up @@ -616,6 +706,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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Infiltrator: Antagonist = {
`,
INFILTRATOR_MECHANICAL_DESCRIPTION,
],
category: Category.Roundstart,
category: Category.Midround,
priority: -1,
};

Expand Down
1 change: 0 additions & 1 deletion yogstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
54 changes: 0 additions & 54 deletions yogstation/code/game/gamemodes/infiltration/infiltration.dm

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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, 10)
uplink.set_antagonist(ROLE_INFILTRATOR)
alert_radio = new(src)
alert_radio.make_syndie()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down
Loading
Loading