-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
122c09c
commit 62b2776
Showing
26 changed files
with
714 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#define BATON_ALL_UPGRADE (1<<0) | ||
#define BATON_CUFF_UPGRADE (1<<1) | ||
#define BATON_MUTE_UPGRADE (1<<2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
//this file contains extra stuff we have for uplink components like contractors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
monkestation/code/modules/antagonists/contractor/datums/contractor_datum.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Proc detailing contract kit buys/completed contracts/additional info | ||
/datum/antagonist/traitor/proc/contractor_round_end() | ||
var/result = "" | ||
var/total_spent_rep = 0 | ||
|
||
var/contractor_item_icons = "" // Icons of purchases | ||
var/contractor_support_unit = "" // Set if they had a support unit - and shows appended to their contracts completed | ||
|
||
/// Get all the icons/total cost for all our items bought | ||
for (var/datum/contractor_item/contractor_purchase in contractor_hub.purchased_items) | ||
contractor_item_icons += "<span class='tooltip_container'>\[ <i class=\"fas [contractor_purchase.item_icon]\"></i><span class='tooltip_hover'><b>[contractor_purchase.name] - [contractor_purchase.cost] Rep</b><br><br>[contractor_purchase.desc]</span> \]</span>" | ||
|
||
total_spent_rep += contractor_purchase.cost | ||
|
||
/// Special case for reinforcements, we want to show their ckey and name on round end. | ||
if (istype(contractor_purchase, /datum/contractor_item/contractor_partner)) | ||
var/datum/contractor_item/contractor_partner/partner = contractor_purchase | ||
contractor_support_unit += "<br><b>[partner.partner_mind.key]</b> played <b>[partner.partner_mind.current.name]</b>, their contractor support unit." | ||
|
||
if (contractor_hub.purchased_items.len) | ||
result += "<br>(used [total_spent_rep] Rep) " | ||
result += contractor_item_icons | ||
result += "<br>" | ||
|
||
return result |
4 changes: 4 additions & 0 deletions
4
monkestation/code/modules/antagonists/contractor/datums/contractor_hub.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/datum/contractor_hub | ||
var/contract_rep = 0 | ||
var/static/list/hub_items = list() | ||
var/list/purchased_items = list() |
172 changes: 172 additions & 0 deletions
172
monkestation/code/modules/antagonists/contractor/datums/contractor_items.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
/datum/contractor_item | ||
var/name // Name of item | ||
var/desc // description of item | ||
var/item // item path, no item path means the purchase needs it's own handle_purchase() | ||
var/item_icon = "broadcast-tower" // fontawesome icon to use inside the hub - https://fontawesome.com/icons/ | ||
var/stock = -1 // Any number above 0 for how many times it can be bought in a round for a single traitor. -1 is unlimited. | ||
var/cost // Cost of the item in contract rep. | ||
|
||
/datum/contractor_item/contractor_pinpointer | ||
name = "Contractor Pinpointer" | ||
desc = "A pinpointer that finds targets even without active suit sensors. Due to taking advantage of an exploit within the system, \ | ||
it can't pinpoint to the same accuracy as the traditional models. Becomes permanently locked to the user that first activates it." | ||
item = /obj/item/pinpointer/crew/contractor | ||
item_icon = "search-location" | ||
stock = 2 | ||
cost = 1 | ||
|
||
/datum/contractor_item/fulton_extraction_kit | ||
name = "Fulton Extraction Kit" | ||
desc = "For getting your target across the station to those difficult dropoffs. Place the beacon somewhere secure, and link the pack. \ | ||
Activating the pack on your target will send them over to the beacon - make sure they're not just going to run away though!" | ||
item = /obj/item/storage/box/contractor/fulton_extraction | ||
item_icon = "parachute-box" | ||
stock = 1 | ||
cost = 1 | ||
|
||
/datum/contractor_item/contractor_partner | ||
name = "Reinforcements" | ||
desc = "Upon purchase we'll contact available units in the area. Should there be an agent free, we'll send them down to assist you immediately. \ | ||
If no units are free, we give a full refund." | ||
item_icon = "user-friends" | ||
stock = 1 | ||
cost = 2 | ||
var/datum/mind/partner_mind = null | ||
|
||
/datum/contractor_item/contractor_partner/handle_purchase(datum/contractor_hub/hub, mob/living/user) | ||
. = ..() | ||
if(!.) | ||
return | ||
|
||
to_chat(user, span_notice("The uplink vibrates quietly, connecting to nearby agents...")) | ||
|
||
var/list/mob/dead/observer/candidates = poll_ghost_candidates("Do you want to play as the Contractor Support Unit for [user.real_name]?", ROLE_TRAITOR, FALSE, 100, \ | ||
POLL_IGNORE_CONTRACTOR_SUPPORT) | ||
|
||
if(LAZYLEN(candidates)) | ||
var/mob/dead/observer/candidate = pick(candidates) | ||
spawn_contractor_partner(user, candidate.key) | ||
else | ||
to_chat(user, span_notice("No available agents at this time, please try again later.")) | ||
|
||
// refund and add the limit back. | ||
stock += 1 | ||
hub.contract_rep += cost | ||
hub.purchased_items -= src | ||
|
||
/datum/contractor_item/contractor_partner/proc/spawn_contractor_partner(mob/living/user, key) | ||
var/mob/living/carbon/human/partner = new() | ||
var/datum/outfit/contractor_partner/partner_outfit = new() | ||
|
||
partner_outfit.equip(partner) | ||
|
||
var/obj/structure/closet/supplypod/arrival_pod = new(null, STYLE_SYNDICATE) | ||
arrival_pod.explosionSize = list(0,0,0,0) | ||
arrival_pod.bluespace = TRUE | ||
|
||
var/turf/free_location = find_obstruction_free_location(2, user) | ||
|
||
// We really want to send them - if we can't find a nice location just land it on top of them. | ||
if(!free_location) | ||
free_location = get_turf(user) | ||
|
||
partner.forceMove(arrival_pod) | ||
partner.ckey = key | ||
|
||
/// We give a reference to the mind that'll be the support unit | ||
partner_mind = partner.mind | ||
partner_mind.make_contractor_support() | ||
|
||
to_chat(partner_mind.current, "\n[span_alertwarning("[user.real_name] is your superior. Follow any, and all orders given by them. You're here to support their mission only.")]") | ||
to_chat(partner_mind.current, "[span_alertwarning("Should they perish, or be otherwise unavailable, \ | ||
you're to assist other active agents in this mission area to the best of your ability.")]\n\n") | ||
|
||
new /obj/effect/pod_landingzone(free_location, arrival_pod) | ||
|
||
//this can be bought for TC, might have to be removed/replaced | ||
/datum/contractor_item/blackout | ||
name = "Blackout" | ||
desc = "Request Syndicate Command to distrupt the station's powernet. Disables power across the station for a short duration." | ||
item_icon = "bolt" | ||
stock = 2 | ||
cost = 3 | ||
|
||
/datum/contractor_item/blackout/handle_purchase(datum/contractor_hub/hub) | ||
. = ..() | ||
|
||
if (.) | ||
power_fail(35, 50) | ||
priority_announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", \ | ||
"Critical Power Failure", ANNOUNCER_POWEROFF) | ||
|
||
// Subtract cost, and spawn if it's an item. | ||
/datum/contractor_item/proc/handle_purchase(datum/contractor_hub/hub, mob/living/user) | ||
|
||
if (hub.contract_rep >= cost) | ||
hub.contract_rep -= cost | ||
else | ||
return FALSE | ||
|
||
if (stock >= 1) | ||
stock -= 1 | ||
else if (stock == 0) | ||
return FALSE | ||
|
||
hub.purchased_items.Add(src) | ||
|
||
user.playsound_local(user, 'sound/machines/uplinkpurchase.ogg', 100) | ||
|
||
if (item && ispath(item)) | ||
var/atom/item_to_create = new item(get_turf(user)) | ||
|
||
if(user.put_in_hands(item_to_create)) | ||
to_chat(user, span_notice("Your purchase materializes into your hands!")) | ||
else | ||
to_chat(user, span_notice("Your purchase materializes onto the floor.")) | ||
|
||
return item_to_create | ||
return TRUE | ||
|
||
/obj/item/pinpointer/crew/contractor | ||
name = "contractor pinpointer" | ||
desc = "A handheld tracking device that locks onto certain signals. Ignores suit sensors, but is much less accurate." | ||
icon_state = "pinpointer_syndicate" | ||
worn_icon_state = "pinpointer_black" | ||
minimum_range = 25 | ||
has_owner = TRUE | ||
ignore_suit_sensor_level = TRUE | ||
|
||
/obj/item/storage/box/contractor/fulton_extraction | ||
name = "Fulton Extraction Kit" | ||
icon_state = "syndiebox" | ||
illustration = "writing_syndie" | ||
|
||
/obj/item/storage/box/contractor/fulton_extraction/PopulateContents() | ||
new /obj/item/extraction_pack(src) | ||
new /obj/item/fulton_core(src) | ||
|
||
/datum/contractor_item/baton_holster | ||
name = "Baton Holster Module" | ||
desc = "Never worry about dropping your baton again with this holster module! Simply insert your baton into the module, put it in your MODsuit, \ | ||
and the baton will retract whenever dropped." | ||
item = /obj/item/mod/module/baton_holster | ||
item_icon = "arrow-up-from-arc" //I cannot find anything better, replace if you find something more fitting | ||
stock = 1 | ||
cost = 1 | ||
|
||
/datum/contractor_item/baton_upgrade_cuff | ||
name = "Baton Cuff Upgrade" | ||
desc = "Using technology reverse-engineered from some alien batons we had lying around, you can now cuff people using your baton with the secondary attack. \ | ||
Due to technical limitations, only cable cuffs and zipties work, and they need to be loaded into the baton manually." | ||
item = /obj/item/baton_upgrade/cuff | ||
item_icon = "handcuff" | ||
stock = 1 | ||
cost = 1 | ||
|
||
/datum/contractor_item/baton_upgrade_mute | ||
name = "Baton Mute Upgrade" | ||
desc = "A relatively new advancement in completely proprietary baton technology, this baton upgrade will mute anyone hit for ten seconds, maximizing at twenty seconds." | ||
item = /obj/item/baton_upgrade/mute | ||
item_icon = "comment-slash" | ||
stock = 1 | ||
cost = 2 |
54 changes: 54 additions & 0 deletions
54
monkestation/code/modules/antagonists/contractor/datums/contractor_support.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/datum/antagonist/traitor/contractor_support | ||
name = "Contractor Support Unit" | ||
antag_moodlet = /datum/mood_event/focused | ||
|
||
show_in_roundend = FALSE // We're already adding them in to the contractor's roundend. | ||
give_objectives = TRUE // We give them their own custom objective. | ||
show_in_antagpanel = FALSE // Not a proper/full antag. | ||
give_uplink = FALSE // Don't give them an uplink. | ||
give_secondary_objectives = FALSE | ||
/// Team datum that contains the contractor and the support unit | ||
var/datum/team/contractor_team/contractor_team | ||
|
||
/// Team for storing both the contractor and their support unit - only really for the HUD and admin logging. | ||
/datum/team/contractor_team | ||
show_roundend_report = FALSE | ||
|
||
/datum/antagonist/traitor/contractor_support/forge_traitor_objectives() | ||
var/datum/objective/generic_objective = new | ||
|
||
generic_objective.name = "Follow the Contractor's Orders" | ||
generic_objective.explanation_text = "Follow your orders. Assist agents in this mission area." | ||
|
||
generic_objective.completed = TRUE | ||
|
||
objectives += generic_objective | ||
|
||
/datum/outfit/contractor_partner | ||
name = "Contractor Support Unit" | ||
|
||
uniform = /obj/item/clothing/under/chameleon | ||
suit = /obj/item/clothing/suit/chameleon | ||
back = /obj/item/storage/backpack | ||
belt = /obj/item/modular_computer/pda/chameleon | ||
mask = /obj/item/clothing/mask/cigarette/syndicate | ||
shoes = /obj/item/clothing/shoes/chameleon/noslip | ||
ears = /obj/item/radio/headset/chameleon | ||
id = /obj/item/card/id/advanced/chameleon | ||
r_hand = /obj/item/storage/toolbox/syndicate | ||
id_trim = /datum/id_trim/chameleon/operative | ||
|
||
backpack_contents = list( | ||
/obj/item/storage/box/survival, | ||
/obj/item/implanter/uplink, | ||
/obj/item/clothing/mask/chameleon, | ||
/obj/item/storage/fancy/cigarettes/cigpack_syndicate, | ||
/obj/item/lighter | ||
) | ||
|
||
/datum/outfit/contractor_partner/post_equip(mob/living/carbon/human/partner, visualsOnly) | ||
. = ..() | ||
var/obj/item/clothing/mask/cigarette/syndicate/cig = partner.get_item_by_slot(ITEM_SLOT_MASK) | ||
|
||
// pre-light their cig | ||
cig.light() |
4 changes: 4 additions & 0 deletions
4
monkestation/code/modules/antagonists/contractor/datums/mind_datum.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/datum/mind/proc/make_contractor_support() | ||
if(has_antag_datum(/datum/antagonist/traitor/contractor_support)) | ||
return | ||
add_antag_datum(/datum/antagonist/traitor/contractor_support) |
Oops, something went wrong.