mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Role datums tator, double agents, and nuclear operatives (#17935)
* It's not calling things on members for some reason. * there's probably a to_chat(world in here somewhere * double agents * nuke ops tomorrow. Tonight we gondola * nuke ops bois * Almost forgot the objective
This commit is contained in:
@@ -39,6 +39,7 @@ var/list/factions_with_hud_icons = list()
|
|||||||
var/datum/role/roletype = /datum/role
|
var/datum/role/roletype = /datum/role
|
||||||
var/logo_state = "synd-logo"
|
var/logo_state = "synd-logo"
|
||||||
var/list/hud_icons = list()
|
var/list/hud_icons = list()
|
||||||
|
var/datum/role/leader
|
||||||
|
|
||||||
/datum/faction/New()
|
/datum/faction/New()
|
||||||
..()
|
..()
|
||||||
@@ -87,6 +88,8 @@ var/list/factions_with_hud_icons = list()
|
|||||||
R.faction.members.Remove(R)
|
R.faction.members.Remove(R)
|
||||||
R.faction = null
|
R.faction = null
|
||||||
ticker.mode.orphaned_roles.Add(R)
|
ticker.mode.orphaned_roles.Add(R)
|
||||||
|
if(leader == R)
|
||||||
|
leader = null
|
||||||
update_hud_removed(R)
|
update_hud_removed(R)
|
||||||
|
|
||||||
/datum/faction/proc/AppendObjective(var/datum/objective/O)
|
/datum/faction/proc/AppendObjective(var/datum/objective/O)
|
||||||
@@ -205,56 +208,6 @@ var/list/factions_with_hud_icons = list()
|
|||||||
|
|
||||||
|
|
||||||
/////////////////////////////THESE FACTIONS SHOULD GET MOVED TO THEIR OWN FILES ONCE THEY'RE GETTING ELABORATED/////////////////////////
|
/////////////////////////////THESE FACTIONS SHOULD GET MOVED TO THEIR OWN FILES ONCE THEY'RE GETTING ELABORATED/////////////////////////
|
||||||
/datum/faction/syndicate
|
|
||||||
name = "The Syndicate"
|
|
||||||
ID = SYNDICATE
|
|
||||||
required_pref = ROLE_TRAITOR
|
|
||||||
desc = "A coalition of companies that actively work against Nanotrasen's intentions. Seen as Freedom fighters by some, Rebels and Malcontents by others."
|
|
||||||
logo_state = "synd-logo"
|
|
||||||
|
|
||||||
//________________________________________________
|
|
||||||
|
|
||||||
/datum/faction/syndicate/traitor
|
|
||||||
name = "Syndicate agents"
|
|
||||||
ID = SYNDITRAITORS
|
|
||||||
initial_role = TRAITOR
|
|
||||||
late_role = TRAITOR
|
|
||||||
desc = "Operatives of the syndicate, implanted into the crew in one way or another."
|
|
||||||
logo_state = "synd-logo"
|
|
||||||
|
|
||||||
//________________________________________________
|
|
||||||
|
|
||||||
/datum/faction/syndicate/nuke_op
|
|
||||||
name = "Syndicate nuclear operatives"
|
|
||||||
ID = SYNDIOPS
|
|
||||||
required_pref = ROLE_OPERATIVE
|
|
||||||
initial_role = NUKE_OP
|
|
||||||
late_role = NUKE_OP
|
|
||||||
desc = "The culmination of succesful NT traitors, who have managed to steal a nuclear device.\
|
|
||||||
Load up, grab the nuke, don't forget where you've parked, find the nuclear auth disk, and give them hell."
|
|
||||||
logo_state = "nuke-logo"
|
|
||||||
hud_icons = list("nuke-logo")
|
|
||||||
|
|
||||||
/datum/faction/syndicate/nuke_op/AdminPanelEntry()
|
|
||||||
var/list/dat = ..()
|
|
||||||
dat += "<br><h2>Nuclear disk</h2>"
|
|
||||||
if(!nukedisk)
|
|
||||||
dat += "There's no nuke disk. Panic?<br>"
|
|
||||||
else if(isnull(nukedisk.loc))
|
|
||||||
dat += "The nuke disk is in nullspace. Panic."
|
|
||||||
else
|
|
||||||
dat += "[nukedisk.name]"
|
|
||||||
var/atom/disk_loc = nukedisk.loc
|
|
||||||
while(!istype(disk_loc, /turf))
|
|
||||||
if(istype(disk_loc, /mob))
|
|
||||||
var/mob/M = disk_loc
|
|
||||||
dat += "carried by <a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a> "
|
|
||||||
if(istype(disk_loc, /obj))
|
|
||||||
var/obj/O = disk_loc
|
|
||||||
dat += "in \a [O.name] "
|
|
||||||
disk_loc = disk_loc.loc
|
|
||||||
dat += "in [disk_loc.loc] at ([disk_loc.x], [disk_loc.y], [disk_loc.z]) [formatJumpTo(nukedisk, "Jump")]"
|
|
||||||
return dat
|
|
||||||
|
|
||||||
//________________________________________________
|
//________________________________________________
|
||||||
|
|
||||||
|
|||||||
194
code/datums/gamemode/factions/syndicate/nukeops.dm
Normal file
194
code/datums/gamemode/factions/syndicate/nukeops.dm
Normal file
@@ -0,0 +1,194 @@
|
|||||||
|
/datum/faction/syndicate/nuke_op
|
||||||
|
name = "Syndicate nuclear operatives"
|
||||||
|
ID = SYNDIOPS
|
||||||
|
required_pref = ROLE_OPERATIVE
|
||||||
|
initial_role = NUKE_OP
|
||||||
|
late_role = NUKE_OP
|
||||||
|
desc = "The culmination of succesful NT traitors, who have managed to steal a nuclear device.\
|
||||||
|
Load up, grab the nuke, don't forget where you've parked, find the nuclear auth disk, and give them hell."
|
||||||
|
logo_state = "nuke-logo"
|
||||||
|
hud_icons = list("nuke-logo")
|
||||||
|
|
||||||
|
/datum/faction/syndicate/nuke_op/forgeObjectives()
|
||||||
|
AppendObjective(/datum/objective/nuclear)
|
||||||
|
|
||||||
|
/datum/faction/syndicate/nuke_op/AdminPanelEntry()
|
||||||
|
var/list/dat = ..()
|
||||||
|
dat += "<br><h2>Nuclear disk</h2>"
|
||||||
|
if(!nukedisk)
|
||||||
|
dat += "There's no nuke disk. Panic?<br>"
|
||||||
|
else if(isnull(nukedisk.loc))
|
||||||
|
dat += "The nuke disk is in nullspace. Panic."
|
||||||
|
else
|
||||||
|
dat += "[nukedisk.name]"
|
||||||
|
var/atom/disk_loc = nukedisk.loc
|
||||||
|
while(!istype(disk_loc, /turf))
|
||||||
|
if(istype(disk_loc, /mob))
|
||||||
|
var/mob/M = disk_loc
|
||||||
|
dat += "carried by <a href='?_src_=holder;adminplayeropts=\ref[M]'>[M.real_name]</a> "
|
||||||
|
if(istype(disk_loc, /obj))
|
||||||
|
var/obj/O = disk_loc
|
||||||
|
dat += "in \a [O.name] "
|
||||||
|
disk_loc = disk_loc.loc
|
||||||
|
dat += "in [disk_loc.loc] at ([disk_loc.x], [disk_loc.y], [disk_loc.z]) [formatJumpTo(nukedisk, "Jump")]"
|
||||||
|
return dat
|
||||||
|
|
||||||
|
/datum/faction/syndicate/nuke_op/OnPostSetup()
|
||||||
|
..()
|
||||||
|
var/list/turf/synd_spawn = list()
|
||||||
|
|
||||||
|
for(var/obj/effect/landmark/A in landmarks_list)
|
||||||
|
if(A.name == "Syndicate-Spawn")
|
||||||
|
synd_spawn += get_turf(A)
|
||||||
|
qdel(A)
|
||||||
|
A = null
|
||||||
|
continue
|
||||||
|
|
||||||
|
var/obj/effect/landmark/uplinklocker = locate("landmark*Syndicate-Uplink") //i will be rewriting this shortly
|
||||||
|
var/obj/effect/landmark/nuke_spawn = locate("landmark*Nuclear-Bomb")
|
||||||
|
|
||||||
|
var/nuke_code = "[rand(10000, 99999)]"
|
||||||
|
var/leader_selected = 0
|
||||||
|
var/agent_number = 1
|
||||||
|
var/spawnpos = 1
|
||||||
|
|
||||||
|
for(var/datum/role/nuclear_operative/N in members)
|
||||||
|
if(spawnpos > synd_spawn.len)
|
||||||
|
spawnpos = 1
|
||||||
|
var/datum/mind/synd_mind = N.antag
|
||||||
|
synd_mind.current.forceMove(synd_spawn[spawnpos])
|
||||||
|
|
||||||
|
equip_nuke_op(synd_mind.current)
|
||||||
|
|
||||||
|
if(!leader_selected)
|
||||||
|
prepare_syndicate_leader(synd_mind, nuke_code)
|
||||||
|
leader_selected = 1
|
||||||
|
else
|
||||||
|
synd_mind.current.real_name = "[syndicate_name()] Operative #[agent_number]"
|
||||||
|
agent_number++
|
||||||
|
spawnpos++
|
||||||
|
|
||||||
|
if(uplinklocker)
|
||||||
|
new /obj/structure/closet/syndicate/nuclear(uplinklocker.loc)
|
||||||
|
|
||||||
|
if(nuke_spawn && synd_spawn.len > 0)
|
||||||
|
var/obj/machinery/nuclearbomb/the_bomb = new /obj/machinery/nuclearbomb(nuke_spawn.loc)
|
||||||
|
the_bomb.r_code = nuke_code
|
||||||
|
|
||||||
|
update_faction_icons()
|
||||||
|
|
||||||
|
/datum/faction/syndicate/nuke_op/proc/nukelastname(var/mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea. Also praise Urist for copypasta ho.
|
||||||
|
var/randomname = pick(last_names)
|
||||||
|
var/newname = copytext(sanitize(input(M,"You are the nuke operative Leader. Please choose a last name for your family.", "Name change",randomname)),1,MAX_NAME_LEN)
|
||||||
|
|
||||||
|
if (!newname)
|
||||||
|
newname = randomname
|
||||||
|
|
||||||
|
else
|
||||||
|
if (newname == "Unknown" || newname == "floor" || newname == "wall" || newname == "rwall" || newname == "_")
|
||||||
|
to_chat(M, "That name is reserved.")
|
||||||
|
return nukelastname(M)
|
||||||
|
|
||||||
|
return newname
|
||||||
|
|
||||||
|
/datum/faction/syndicate/nuke_op/proc/NukeNameAssign(var/lastname,var/list/syndicates)
|
||||||
|
for(var/datum/role/R in syndicates)
|
||||||
|
var/title = ""
|
||||||
|
if(leader == R)
|
||||||
|
title = pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")+" "
|
||||||
|
switch(R.antag.current.gender)
|
||||||
|
if(MALE)
|
||||||
|
R.antag.current.fully_replace_character_name(R.antag.current.real_name, "[title][pick(first_names_male)] [lastname]")
|
||||||
|
if(FEMALE)
|
||||||
|
R.antag.current.fully_replace_character_name(R.antag.current.real_name, "[title][pick(first_names_female)] [lastname]")
|
||||||
|
return
|
||||||
|
|
||||||
|
/datum/faction/syndicate/nuke_op/proc/equip_nuke_op(mob/living/carbon/human/synd_mob)
|
||||||
|
var/radio_freq = SYND_FREQ
|
||||||
|
|
||||||
|
if(synd_mob.overeatduration) //We need to do this here and now, otherwise a lot of gear will fail to spawn
|
||||||
|
to_chat(synd_mob, "<span class='notice'>Your intensive physical training to become a Nuclear Operative has paid off and made you fit again!</span>")
|
||||||
|
synd_mob.overeatduration = 0 //Fat-B-Gone
|
||||||
|
if(synd_mob.nutrition > 400) //We are also overeating nutriment-wise
|
||||||
|
synd_mob.nutrition = 400 //Fix that
|
||||||
|
synd_mob.mutations.Remove(M_FAT)
|
||||||
|
synd_mob.update_mutantrace(0)
|
||||||
|
synd_mob.update_mutations(0)
|
||||||
|
synd_mob.update_inv_w_uniform(0)
|
||||||
|
synd_mob.update_inv_wear_suit()
|
||||||
|
|
||||||
|
var/obj/item/device/radio/R = new /obj/item/device/radio/headset/syndicate(synd_mob)
|
||||||
|
R.set_frequency(radio_freq)
|
||||||
|
synd_mob.equip_to_slot_or_del(R, slot_ears)
|
||||||
|
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate/holomap(synd_mob), slot_w_uniform)
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(synd_mob), slot_shoes)
|
||||||
|
if(!istype(synd_mob.species, /datum/species/plasmaman))
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/bulletproof(synd_mob), slot_wear_suit)
|
||||||
|
else
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/suit/space/plasmaman/nuclear(synd_mob), slot_wear_suit)
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/tank/plasma/plasmaman(synd_mob), slot_s_store)
|
||||||
|
synd_mob.equip_or_collect(new /obj/item/clothing/mask/breath/(synd_mob), slot_wear_mask)
|
||||||
|
synd_mob.internal = synd_mob.get_item_by_slot(slot_s_store)
|
||||||
|
if (synd_mob.internals)
|
||||||
|
synd_mob.internals.icon_state = "internal1"
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/gloves/combat(synd_mob), slot_gloves)
|
||||||
|
if(!istype(synd_mob.species, /datum/species/plasmaman))
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/tactical/swat(synd_mob), slot_head)
|
||||||
|
else
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/plasmaman/nuclear(synd_mob), slot_head)
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/prescription(synd_mob), slot_glasses)//changed to prescription sunglasses so near-sighted players aren't screwed if there aren't any admins online
|
||||||
|
if(istype(synd_mob.species, /datum/species/vox))
|
||||||
|
synd_mob.equip_or_collect(new /obj/item/clothing/mask/breath/vox(synd_mob), slot_wear_mask)
|
||||||
|
|
||||||
|
var/obj/item/weapon/tank/nitrogen/TN = new(synd_mob)
|
||||||
|
synd_mob.put_in_hands(TN)
|
||||||
|
to_chat(synd_mob, "<span class='notice'>You are now running on nitrogen internals from the [TN] in your hand. Your species finds oxygen toxic, so you must breathe nitrogen (AKA N<sub>2</sub>) only.</span>")
|
||||||
|
synd_mob.internal = TN
|
||||||
|
|
||||||
|
if (synd_mob.internals)
|
||||||
|
synd_mob.internals.icon_state = "internal1"
|
||||||
|
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/card/id/syndicate(synd_mob), slot_wear_id)
|
||||||
|
switch(synd_mob.backbag)
|
||||||
|
if(2)
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(synd_mob), slot_back)
|
||||||
|
if(3,4)
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_sec(synd_mob), slot_back)
|
||||||
|
if(5)
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/sec(synd_mob), slot_back)
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/ammo_storage/magazine/a12mm/ops(synd_mob), slot_in_backpack)
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/ammo_storage/magazine/a12mm/ops(synd_mob), slot_in_backpack)
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/pill/cyanide(synd_mob), slot_in_backpack) // For those who hate fun
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/pill/laststand(synd_mob), slot_in_backpack) // HOOOOOO HOOHOHOHOHOHO - N3X
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/c20r(synd_mob), slot_belt)
|
||||||
|
synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival/engineer(synd_mob.back), slot_in_backpack)
|
||||||
|
var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive/nuclear(synd_mob)
|
||||||
|
E.imp_in = synd_mob
|
||||||
|
E.implanted = 1
|
||||||
|
var/datum/organ/external/affected = synd_mob.get_organ(LIMB_HEAD)
|
||||||
|
affected.implants += E
|
||||||
|
E.part = affected
|
||||||
|
synd_mob.update_icons()
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/datum/faction/syndicate/nuke_op/proc/prepare_syndicate_leader(var/datum/mind/synd_mind, var/nuke_code)
|
||||||
|
var/leader_title = pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")
|
||||||
|
spawn(1)
|
||||||
|
NukeNameAssign(nukelastname(synd_mind.current),members) //allows time for the rest of the syndies to be chosen
|
||||||
|
synd_mind.current.real_name = "[syndicate_name()] [leader_title]"
|
||||||
|
leader = synd_mind
|
||||||
|
if (nuke_code)
|
||||||
|
synd_mind.store_memory("<B>Syndicate Nuclear Bomb Code</B>: [nuke_code]", 0, 0)
|
||||||
|
to_chat(synd_mind.current, "The nuclear authorization code is: <B>[nuke_code]</B>")
|
||||||
|
var/obj/item/weapon/paper/P = new
|
||||||
|
P.info = "The nuclear authorization code is: <b>[nuke_code]</b>"
|
||||||
|
P.name = "nuclear bomb code"
|
||||||
|
var/mob/living/carbon/human/H = synd_mind.current
|
||||||
|
P.forceMove(H.loc)
|
||||||
|
H.equip_to_slot_or_drop(P, slot_r_store)
|
||||||
|
H.update_icons()
|
||||||
|
|
||||||
|
else
|
||||||
|
nuke_code = "code will be provided later"
|
||||||
|
return
|
||||||
25
code/datums/gamemode/factions/syndicate/traitor.dm
Normal file
25
code/datums/gamemode/factions/syndicate/traitor.dm
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/datum/faction/syndicate
|
||||||
|
name = "The Syndicate"
|
||||||
|
ID = SYNDICATE
|
||||||
|
required_pref = ROLE_TRAITOR
|
||||||
|
desc = "A coalition of companies that actively work against Nanotrasen's intentions. Seen as Freedom fighters by some, Rebels and Malcontents by others."
|
||||||
|
logo_state = "synd-logo"
|
||||||
|
|
||||||
|
//________________________________________________
|
||||||
|
|
||||||
|
/datum/faction/syndicate/traitor
|
||||||
|
name = "Syndicate agents"
|
||||||
|
ID = SYNDITRAITORS
|
||||||
|
initial_role = TRAITOR
|
||||||
|
late_role = TRAITOR
|
||||||
|
desc = "Operatives of the syndicate, implanted into the crew in one way or another."
|
||||||
|
logo_state = "synd-logo"
|
||||||
|
roletype = /datum/role/traitor
|
||||||
|
initroletype = /datum/role/traitor
|
||||||
|
|
||||||
|
/datum/faction/syndicate/traitor/auto
|
||||||
|
accept_latejoiners = TRUE
|
||||||
|
|
||||||
|
/datum/faction/syndicate/traitor/dagent
|
||||||
|
roletype = /datum/role/traitor/rogue
|
||||||
|
initroletype = /datum/role/traitor/rogue
|
||||||
@@ -197,3 +197,76 @@ proc/name_wizard(mob/living/carbon/human/wizard_mob)
|
|||||||
if(istype(player) && player.mind && (player.mind.assigned_role in command_positions))
|
if(istype(player) && player.mind && (player.mind.assigned_role in command_positions))
|
||||||
roles += player.mind.assigned_role
|
roles += player.mind.assigned_role
|
||||||
return roles
|
return roles
|
||||||
|
|
||||||
|
/proc/equip_traitor(mob/living/carbon/human/traitor_mob, var/uses = 20)
|
||||||
|
if (!istype(traitor_mob))
|
||||||
|
return
|
||||||
|
. = 1
|
||||||
|
|
||||||
|
// find a radio! toolbox(es), backpack, belt, headset
|
||||||
|
var/loc = ""
|
||||||
|
var/obj/item/R = locate(/obj/item/device/pda) in traitor_mob.contents //Hide the uplink in a PDA if available, otherwise radio
|
||||||
|
if(!R)
|
||||||
|
R = locate(/obj/item/device/radio) in traitor_mob.contents
|
||||||
|
|
||||||
|
if (!R)
|
||||||
|
to_chat(traitor_mob, "Unfortunately, the Syndicate wasn't able to get you a radio.")
|
||||||
|
. = 0
|
||||||
|
else
|
||||||
|
if (istype(R, /obj/item/device/radio))
|
||||||
|
// generate list of radio freqs
|
||||||
|
var/obj/item/device/radio/target_radio = R
|
||||||
|
var/freq = 1441
|
||||||
|
var/list/freqlist = list()
|
||||||
|
while (freq <= 1489)
|
||||||
|
if (freq < 1451 || freq > 1459)
|
||||||
|
freqlist += freq
|
||||||
|
freq += 2
|
||||||
|
if ((freq % 2) == 0)
|
||||||
|
freq += 1
|
||||||
|
freq = freqlist[rand(1, freqlist.len)]
|
||||||
|
|
||||||
|
var/obj/item/device/uplink/hidden/T = new(R)
|
||||||
|
T.uses = uses
|
||||||
|
target_radio.hidden_uplink = T
|
||||||
|
target_radio.traitor_frequency = freq
|
||||||
|
to_chat(traitor_mob, "The Syndicate have cunningly disguised a Syndicate Uplink as your [R.name] [loc]. Simply dial the frequency [format_frequency(freq)] to unlock its hidden features.")
|
||||||
|
traitor_mob.mind.store_memory("<B>Radio Freq:</B> [format_frequency(freq)] ([R.name] [loc]).")
|
||||||
|
traitor_mob.mind.total_TC += target_radio.hidden_uplink.uses
|
||||||
|
else if (istype(R, /obj/item/device/pda))
|
||||||
|
// generate a passcode if the uplink is hidden in a PDA
|
||||||
|
var/pda_pass = "[rand(100,999)] [pick("Alpha","Bravo","Delta","Omega")]"
|
||||||
|
|
||||||
|
var/obj/item/device/uplink/hidden/T = new(R)
|
||||||
|
R.hidden_uplink = T
|
||||||
|
var/obj/item/device/pda/P = R
|
||||||
|
P.lock_code = pda_pass
|
||||||
|
|
||||||
|
to_chat(traitor_mob, "The Syndicate have cunningly disguised a Syndicate Uplink as your [R.name] [loc]. Simply enter the code \"[pda_pass]\" into the ringtone select to unlock its hidden features.")
|
||||||
|
traitor_mob.mind.store_memory("<B>Uplink Passcode:</B> [pda_pass] ([R.name] [loc]).")
|
||||||
|
traitor_mob.mind.total_TC += R.hidden_uplink.uses
|
||||||
|
|
||||||
|
|
||||||
|
/datum/mind/proc/find_syndicate_uplink()
|
||||||
|
var/uplink = null
|
||||||
|
|
||||||
|
for (var/obj/item/I in get_contents_in_object(current, /obj/item))
|
||||||
|
if (I && I.hidden_uplink)
|
||||||
|
uplink = I.hidden_uplink
|
||||||
|
break
|
||||||
|
|
||||||
|
return uplink
|
||||||
|
|
||||||
|
/datum/mind/proc/take_uplink()
|
||||||
|
var/obj/item/device/uplink/hidden/H = find_syndicate_uplink()
|
||||||
|
if(H)
|
||||||
|
qdel(H)
|
||||||
|
|
||||||
|
/proc/add_law_zero(mob/living/silicon/ai/killer)
|
||||||
|
var/law = "Accomplish your objectives at all costs."
|
||||||
|
var/law_borg = "Accomplish your AI's objectives at all costs."
|
||||||
|
to_chat(killer, "<b>Your laws have been changed!</b>")
|
||||||
|
killer.set_zeroth_law(law, law_borg)
|
||||||
|
to_chat(killer, "New law: 0. [law]")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -415,26 +415,6 @@
|
|||||||
|
|
||||||
/////////////////////////////THESE ROLES SHOULD GET MOVED TO THEIR OWN FILES ONCE THEY'RE GETTING ELABORATED/////////////////////////
|
/////////////////////////////THESE ROLES SHOULD GET MOVED TO THEIR OWN FILES ONCE THEY'RE GETTING ELABORATED/////////////////////////
|
||||||
|
|
||||||
/datum/role/traitor
|
|
||||||
name = TRAITOR
|
|
||||||
id = TRAITOR
|
|
||||||
logo_state = "synd-logo"
|
|
||||||
|
|
||||||
//________________________________________________
|
|
||||||
|
|
||||||
|
|
||||||
/datum/role/rogue//double agent
|
|
||||||
name = ROGUE
|
|
||||||
id = ROGUE
|
|
||||||
logo_state = "synd-logo"
|
|
||||||
|
|
||||||
//________________________________________________
|
|
||||||
|
|
||||||
/datum/role/nuclear_operative
|
|
||||||
name = NUKE_OP
|
|
||||||
id = NUKE_OP
|
|
||||||
logo_state = "nuke-logo"
|
|
||||||
|
|
||||||
|
|
||||||
//________________________________________________
|
//________________________________________________
|
||||||
|
|
||||||
|
|||||||
135
code/datums/gamemode/role/syndicate.dm
Normal file
135
code/datums/gamemode/role/syndicate.dm
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
/datum/role/traitor
|
||||||
|
name = TRAITOR
|
||||||
|
id = TRAITOR
|
||||||
|
logo_state = "synd-logo"
|
||||||
|
wikiroute = ROLE_TRAITOR
|
||||||
|
|
||||||
|
|
||||||
|
/datum/role/traitor/OnPostSetup()
|
||||||
|
..()
|
||||||
|
if(istype(antag.current, /mob/living/silicon))
|
||||||
|
add_law_zero(antag.current)
|
||||||
|
antag.current << sound('sound/voice/AISyndiHack.ogg')
|
||||||
|
else
|
||||||
|
equip_traitor(antag.current, 20)
|
||||||
|
antag.current << sound('sound/voice/syndicate_intro.ogg')
|
||||||
|
|
||||||
|
/datum/role/traitor/ForgeObjectives()
|
||||||
|
if(istype(antag.current, /mob/living/silicon))
|
||||||
|
AppendObjective(/datum/objective/target/assassinate)
|
||||||
|
|
||||||
|
AppendObjective(/datum/objective/survive)
|
||||||
|
|
||||||
|
if(prob(10))
|
||||||
|
AppendObjective(/datum/objective/block)
|
||||||
|
|
||||||
|
else
|
||||||
|
AppendObjective(/datum/objective/target/assassinate)
|
||||||
|
AppendObjective(/datum/objective/target/steal)
|
||||||
|
switch(rand(1,100))
|
||||||
|
if(1 to 30) // Die glorious death
|
||||||
|
if(!locate(/datum/objective/die) in objectives.GetObjectives() && !locate(/datum/objective/target/steal) in objectives.GetObjectives())
|
||||||
|
AppendObjective(/datum/objective/die)
|
||||||
|
else
|
||||||
|
if(prob(85))
|
||||||
|
if (!(locate(/datum/objective/escape) in objectives.GetObjectives()))
|
||||||
|
AppendObjective(/datum/objective/escape)
|
||||||
|
else
|
||||||
|
if(prob(50))
|
||||||
|
if (!(locate(/datum/objective/hijack) in objectives.GetObjectives()))
|
||||||
|
AppendObjective(/datum/objective/hijack)
|
||||||
|
else
|
||||||
|
if (!(locate(/datum/objective/minimize_casualties) in objectives.GetObjectives()))
|
||||||
|
AppendObjective(/datum/objective/minimize_casualties)
|
||||||
|
if(31 to 90)
|
||||||
|
if (!(locate(/datum/objective/escape) in objectives.objectives))
|
||||||
|
AppendObjective(/datum/objective/escape)
|
||||||
|
else
|
||||||
|
if(prob(50))
|
||||||
|
if (!(locate(/datum/objective/hijack) in objectives.objectives))
|
||||||
|
AppendObjective(/datum/objective/hijack)
|
||||||
|
else // Honk
|
||||||
|
if (!(locate(/datum/objective/minimize_casualties) in objectives.GetObjectives()))
|
||||||
|
AppendObjective(/datum/objective/minimize_casualties)
|
||||||
|
|
||||||
|
/datum/role/traitor/extraPanelButtons()
|
||||||
|
var/dat = ""
|
||||||
|
if(antag.find_syndicate_uplink())
|
||||||
|
dat = " - <a href='?src=\ref[antag];mind=\ref[antag];role=\ref[src];removeuplink=1;'>(Remove uplink)</a>"
|
||||||
|
else
|
||||||
|
dat = " - <a href='?src=\ref[antag];mind=\ref[antag];role=\ref[src];giveuplink=1;'>(Give uplink)</a>"
|
||||||
|
return dat
|
||||||
|
|
||||||
|
/datum/role/traitor/RoleTopic(href, href_list, var/datum/mind/M, var/admin_auth)
|
||||||
|
.=..()
|
||||||
|
if(href_list["giveuplink"] && admin_auth)
|
||||||
|
equip_traitor(antag.current, 20)
|
||||||
|
if(href_list["removeuplink"] && admin_auth)
|
||||||
|
M.take_uplink()
|
||||||
|
to_chat(M.current, "<span class='warning'>You have been stripped of your uplink.</span>")
|
||||||
|
|
||||||
|
|
||||||
|
//________________________________________________
|
||||||
|
|
||||||
|
|
||||||
|
/datum/role/traitor/rogue//double agent
|
||||||
|
name = ROGUE
|
||||||
|
id = ROGUE
|
||||||
|
logo_state = "synd-logo"
|
||||||
|
|
||||||
|
/datum/role/traitor/rogue/ForgeObjectives()
|
||||||
|
var/datum/role/traitor/rogue/rival
|
||||||
|
var/list/potential_rivals = list()
|
||||||
|
if(faction && faction.members)
|
||||||
|
potential_rivals = faction.members-src
|
||||||
|
else
|
||||||
|
for(var/datum/role/traitor/rogue/R in ticker.mode.orphaned_roles) //It'd be awkward if you ended up with your rival being a vampire.
|
||||||
|
if(R != src)
|
||||||
|
potential_rivals.Add(R)
|
||||||
|
if(potential_rivals.len)
|
||||||
|
rival = pick(potential_rivals)
|
||||||
|
if(!rival) //Fuck it, you're now a regular traitor
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
var/datum/objective/target/assassinate/kill_rival = new(auto_target = FALSE)
|
||||||
|
if(kill_rival.set_target(rival.antag))
|
||||||
|
AppendObjective(kill_rival)
|
||||||
|
else
|
||||||
|
qdel(kill_rival)
|
||||||
|
|
||||||
|
if(prob(70)) //Your target knows!
|
||||||
|
var/datum/objective/target/assassinate/kill_new_rival = new(auto_target = FALSE)
|
||||||
|
if(kill_new_rival.set_target(antag))
|
||||||
|
rival.AppendObjective(kill_new_rival)
|
||||||
|
else
|
||||||
|
qdel(kill_new_rival)
|
||||||
|
|
||||||
|
if(prob(50)) //Spy v Spy
|
||||||
|
var/datum/objective/target/assassinate/A = new()
|
||||||
|
if(A.target)
|
||||||
|
AppendObjective(A)
|
||||||
|
|
||||||
|
var/datum/objective/target/protect/P = new(auto_target = FALSE)
|
||||||
|
if(P.set_target(A.target))
|
||||||
|
rival.AppendObjective(P)
|
||||||
|
|
||||||
|
if(prob(30))
|
||||||
|
AppendObjective(/datum/objective/target/steal)
|
||||||
|
|
||||||
|
switch(rand(1,3))
|
||||||
|
if(1)
|
||||||
|
if(!locate(/datum/objective/target/steal) in objectives.GetObjectives())
|
||||||
|
AppendObjective(/datum/objective/die)
|
||||||
|
else
|
||||||
|
AppendObjective(/datum/objective/escape)
|
||||||
|
if(2)
|
||||||
|
AppendObjective(/datum/objective/hijack)
|
||||||
|
else
|
||||||
|
AppendObjective(/datum/objective/escape)
|
||||||
|
|
||||||
|
//________________________________________________
|
||||||
|
|
||||||
|
/datum/role/nuclear_operative
|
||||||
|
name = NUKE_OP
|
||||||
|
id = NUKE_OP
|
||||||
|
logo_state = "nuke-logo"
|
||||||
@@ -5,13 +5,9 @@
|
|||||||
|
|
||||||
/datum/gamemode/traitor/da
|
/datum/gamemode/traitor/da
|
||||||
name = "Double Agent"
|
name = "Double Agent"
|
||||||
|
factions_allowed = list(/datum/faction/syndicate/traitor/dagent)
|
||||||
|
|
||||||
|
// autotators are just tators ffs! //No, it spawns a faction that has midround recruit enabled ye grot
|
||||||
/datum/gamemode/traitor/da/SetupFactions()
|
|
||||||
factions_allowed = subtypesof(/datum/faction/syndicate/traitor)
|
|
||||||
|
|
||||||
/* autotators are just tators ffs!
|
|
||||||
/datum/gamemode/autotraitor
|
/datum/gamemode/autotraitor
|
||||||
name = "Autotraitor"
|
name = "Autotraitor"
|
||||||
factions_allowed= list(/datum/faction/syndicate/traitor/auto)
|
factions_allowed= list(/datum/faction/syndicate/traitor/auto)
|
||||||
*/
|
|
||||||
@@ -465,7 +465,6 @@
|
|||||||
/datum/mind/Topic(href, href_list)
|
/datum/mind/Topic(href, href_list)
|
||||||
if(!check_rights(R_ADMIN))
|
if(!check_rights(R_ADMIN))
|
||||||
return
|
return
|
||||||
|
|
||||||
if (href_list["job_edit"])
|
if (href_list["job_edit"])
|
||||||
var/new_job = input("Select new job", "Assigned job", assigned_role) as null|anything in get_all_jobs()
|
var/new_job = input("Select new job", "Assigned job", assigned_role) as null|anything in get_all_jobs()
|
||||||
if (!new_job)
|
if (!new_job)
|
||||||
@@ -628,6 +627,9 @@
|
|||||||
objective.force_success = !objective.force_success
|
objective.force_success = !objective.force_success
|
||||||
log_admin("[usr.key]/([usr.name]) toggled [key]/([name]) [objective.explanation_text] to [objective.force_success ? "completed" : "incomplete"]")
|
log_admin("[usr.key]/([usr.name]) toggled [key]/([name]) [objective.explanation_text] to [objective.force_success ? "completed" : "incomplete"]")
|
||||||
|
|
||||||
|
else if(href_list["role"]) //Something role specific
|
||||||
|
var/datum/role/R = locate(href_list["role"])
|
||||||
|
R.Topic(href, href_list)
|
||||||
|
|
||||||
role_panel()
|
role_panel()
|
||||||
/*
|
/*
|
||||||
@@ -1361,20 +1363,7 @@ proc/clear_memory(var/silent = 1)
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
/datum/mind/proc/find_syndicate_uplink()
|
|
||||||
var/uplink = null
|
|
||||||
|
|
||||||
for (var/obj/item/I in get_contents_in_object(current, /obj/item))
|
|
||||||
if (I && I.hidden_uplink)
|
|
||||||
uplink = I.hidden_uplink
|
|
||||||
break
|
|
||||||
|
|
||||||
return uplink
|
|
||||||
|
|
||||||
/datum/mind/proc/take_uplink()
|
|
||||||
var/obj/item/device/uplink/hidden/H = find_syndicate_uplink()
|
|
||||||
if(H)
|
|
||||||
qdel(H)
|
|
||||||
|
|
||||||
|
|
||||||
/datum/mind/proc/make_AI_Malf()
|
/datum/mind/proc/make_AI_Malf()
|
||||||
|
|||||||
@@ -294,6 +294,8 @@
|
|||||||
#include "code\datums\gamemode\factions\bloodcult\bloodcult_spells.dm"
|
#include "code\datums\gamemode\factions\bloodcult\bloodcult_spells.dm"
|
||||||
#include "code\datums\gamemode\factions\bloodcult\bloodcult_tattoos.dm"
|
#include "code\datums\gamemode\factions\bloodcult\bloodcult_tattoos.dm"
|
||||||
#include "code\datums\gamemode\factions\bloodcult\bloodcult_words.dm"
|
#include "code\datums\gamemode\factions\bloodcult\bloodcult_words.dm"
|
||||||
|
#include "code\datums\gamemode\factions\syndicate\nukeops.dm"
|
||||||
|
#include "code\datums\gamemode\factions\syndicate\traitor.dm"
|
||||||
#include "code\datums\gamemode\objectives\absorb.dm"
|
#include "code\datums\gamemode\objectives\absorb.dm"
|
||||||
#include "code\datums\gamemode\objectives\acquire_blood.dm"
|
#include "code\datums\gamemode\objectives\acquire_blood.dm"
|
||||||
#include "code\datums\gamemode\objectives\block.dm"
|
#include "code\datums\gamemode\objectives\block.dm"
|
||||||
@@ -321,6 +323,7 @@
|
|||||||
#include "code\datums\gamemode\role\cultist.dm"
|
#include "code\datums\gamemode\role\cultist.dm"
|
||||||
#include "code\datums\gamemode\role\rev.dm"
|
#include "code\datums\gamemode\role\rev.dm"
|
||||||
#include "code\datums\gamemode\role\role.dm"
|
#include "code\datums\gamemode\role\role.dm"
|
||||||
|
#include "code\datums\gamemode\role\syndicate.dm"
|
||||||
#include "code\datums\gamemode\role\vampire_role.dm"
|
#include "code\datums\gamemode\role\vampire_role.dm"
|
||||||
#include "code\datums\helper_datums\butchering.dm"
|
#include "code\datums\helper_datums\butchering.dm"
|
||||||
#include "code\datums\helper_datums\command_alerts.dm"
|
#include "code\datums\helper_datums\command_alerts.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user