Initial work

This commit is contained in:
4DPlanner
2017-05-03 20:59:21 +01:00
parent d316719f01
commit eae2230bdd
5 changed files with 58 additions and 18 deletions
+1
View File
@@ -5,3 +5,4 @@
#define TRACK_OPERATIVES 4 //We track the closest operative, so we can regroup when we need to
#define TRACK_ATOM 5 //We track a specified atom, so admins can make us function for events
#define TRACK_COORDINATES 6 //We point towards the specified coordinates on our z-level, so we can navigate
#define TRACK_INTERNAL_AGENT_TARGET 7 //Acts as TRACK_ATOM for the most part
+24 -2
View File
@@ -17,6 +17,7 @@
var/atom/movable/constant_target = null //The thing we're always focused on, if we're in the right mode
var/target_x = 0 //The target coordinates if we're tracking those
var/target_y = 0
var/minimum_range = 0 //at what range the pinpointer declares you to be at your destination
var/nuke_warning = FALSE // If we've set off a miniature alarm about an armed nuke
var/mode = TRACK_NUKE_DISK //What are we looking for?
@@ -63,6 +64,8 @@
msg += "\"[initial(constant_target.name)]\"."
if(TRACK_COORDINATES)
msg += "\"([target_x], [target_y])\"."
if(TRACK_INTERNAL_AGENT_TARGET)
msg += "\"crime\""
else
msg = "Its tracking indicator is blank."
to_chat(user, msg)
@@ -111,7 +114,7 @@
var/mob/living/closest_operative = get_closest_atom(/mob/living/carbon/human, possible_targets, here)
if(closest_operative)
target = closest_operative
if(TRACK_ATOM)
if(TRACK_ATOM||TRACK_INTERNAL_AGENT_TARGET)
if(constant_target)
target = constant_target
if(TRACK_COORDINATES)
@@ -129,7 +132,7 @@
if(here.z != there.z)
icon_state = "pinon[nuke_warning ? "alert" : ""]null"
return
if(here == there)
if(get_dist_euclidian(here,there)<=minimum_range)
icon_state = "pinon[nuke_warning ? "alert" : ""]direct"
else
setDir(get_dir(here, there))
@@ -171,3 +174,22 @@
desc = "An integrated tracking device, jury-rigged to search for living Syndicate operatives."
mode = TRACK_OPERATIVES
flags = NODROP
/obj/item/weapon/pinpointer/internal //Internal agents pinpointers point towards your target, but are junk and malfunction at close range
name = "Internal agent pinpointer"
desc = "Tracks down crime"
mode = TRACK_INTERNAL_AGENT_TARGET
minimum_range = 10
var/datum/mind/owner = null
/obj/item/weapon/pinpointer/internal/scan_for_target()
constant_target = null
if(owner)
if(owner.objectives)
for(var/datum/objective/assassinate/internal/objective in owner.objectives)
var/mob/current = objective.target.current
if(current.stat!=DEAD)
constant_target = current
break
target = constant_target
+13 -11
View File
@@ -67,7 +67,14 @@
/datum/objective/proc/update_explanation_text()
//Default does nothing, override where needed
/datum/objective/proc/give_special_equipment()
/datum/objective/proc/give_special_equipment(special_equipment)
if(owner && owner.current)
if(ishuman(owner.current))
var/mob/living/carbon/human/H = owner.current
var/list/slots = list ("backpack" = slot_in_backpack)
for(var/eq_path in special_equipment)
var/obj/O = new eq_path
H.equip_in_one_of_slots(O, slots)
/datum/objective/assassinate
var/target_role_type=0
@@ -94,6 +101,10 @@
else
explanation_text = "Free Objective"
/datum/objective/assassinate/internal
/datum/objective/mutiny
var/target_role_type=0
@@ -468,7 +479,7 @@ GLOBAL_LIST_EMPTY(possible_items)
steal_target = targetinfo.targetitem
explanation_text = "Steal [targetinfo.name]."
dangerrating = targetinfo.difficulty
give_special_equipment()
give_special_equipment(targetinfo.special_equipment)
return steal_target
else
explanation_text = "Free objective"
@@ -511,15 +522,6 @@ GLOBAL_LIST_EMPTY(possible_items)
return 1
return 0
/datum/objective/steal/give_special_equipment()
if(owner && owner.current && targetinfo)
if(ishuman(owner.current))
var/mob/living/carbon/human/H = owner.current
var/list/slots = list ("backpack" = slot_in_backpack)
for(var/eq_path in targetinfo.special_equipment)
var/obj/O = new eq_path
H.equip_in_one_of_slots(O, slots)
GLOBAL_LIST_EMPTY(possible_items_special)
/datum/objective/steal/special //ninjas are so special they get their own subtype good for them
+19 -4
View File
@@ -2,8 +2,8 @@
name = "Internal Affairs"
config_tag = "internal_affairs"
employer = "Internal Affairs"
required_players = 25
required_enemies = 5
required_players = 1
required_enemies = 1
recommended_enemies = 8
reroll_friendly = 0
traitor_name = "Nanotrasen Internal Affairs Agent"
@@ -25,8 +25,21 @@
if(i + 1 > traitors.len)
i = 0
target_list[traitor] = traitors[i + 1]
if(traitor.current)
traitor.current.disabilities|=NOCLONE //makes things a little less messy
..()
/datum/objective/assassinate/internal/proc/give_pinpointer()
if(owner && owner.current)
if(ishuman(owner.current))
var/mob/living/carbon/human/H = owner.current
var/list/slots = list ("backpack" = slot_in_backpack)
var/obj/item/weapon/pinpointer/internal/pinpointer = new
pinpointer.owner=owner
H.equip_in_one_of_slots(pinpointer, slots)
/datum/game_mode/traitor/internal_affairs/forge_traitor_objectives(datum/mind/traitor)
if(target_list.len && target_list[traitor]) // Is a double agent
@@ -40,11 +53,13 @@
destroy_objective.update_explanation_text()
traitor.objectives += destroy_objective
else
var/datum/objective/assassinate/kill_objective = new
var/datum/objective/assassinate/internal/kill_objective = new
kill_objective.owner = traitor
kill_objective.target = target_mind
kill_objective.update_explanation_text()
traitor.objectives += kill_objective
if(!issilicon(traitor.current))
kill_objective.give_pinpointer()
// Escape
if(issilicon(traitor.current))
@@ -116,4 +131,4 @@
/datum/game_mode/traitor/internal_affairs/give_codewords(mob/living/traitor_mob)
return
return
+1 -1
View File
@@ -1 +1 @@
extended
internal_affairs