Skip to content

Commit

Permalink
Display reputation and fix nukies
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerfulBacon committed Apr 11, 2024
1 parent 6508273 commit 02a9ac9
Show file tree
Hide file tree
Showing 8 changed files with 126 additions and 42 deletions.
2 changes: 2 additions & 0 deletions code/__DEFINES/antagonists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@
/// Access to anything your heart could ever desire
#define REPUTATION_MAX 1000

#define REPUTATION_TRAITOR_START 300

/// How much reputation is gained per completed directive
#define REPUTATION_GAIN_PER_DIRECTIVE 200

Expand Down
6 changes: 4 additions & 2 deletions code/controllers/subsystem/priority_directives.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SUBSYSTEM_DEF(directives)

/datum/controller/subsystem/directives/Initialize(start_timeofday)
. = ..()
next_directive_time = world.time + rand(10 MINUTES, 15 MINUTES)
next_directive_time = world.time + 10 MINUTES
for (var/directive_type in subtypesof(/datum/priority_directive))
directives += new directive_type()

Expand Down Expand Up @@ -102,7 +102,9 @@ SUBSYSTEM_DEF(directives)
"track_x" = track_turf?.x,
"track_y" = track_turf?.y,
"track_z" = track_turf?.z,
"action" = active_directive.get_special_action()?.action_name
"action" = active_directive.get_special_action()?.action_name,
"rep_loss" = active_directive.reputation_loss,
"rep_gain" = active_directive.reputation_reward,
))
data["objectives"] = known_objectives
return data
Expand Down
4 changes: 2 additions & 2 deletions code/datums/components/uplink.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ GLOBAL_LIST_EMPTY(uplinks)
var/non_traitor_allowed = TRUE
// Tied to uplink rather than mind since generally traitors only have 1 uplink
// and tying it to anything else is difficult due to how much uses an uplink
var/reputation = 200
var/reputation = REPUTATION_TRAITOR_START

var/list/previous_attempts

Expand All @@ -42,7 +42,7 @@ GLOBAL_LIST_EMPTY(uplinks)
_enabled = FALSE,
uplink_flag = UPLINK_TRAITORS,
starting_tc = TELECRYSTALS_DEFAULT,
_reputation = 200,
_reputation = REPUTATION_TRAITOR_START,
)
if(!isitem(parent))
return COMPONENT_INCOMPATIBLE
Expand Down
5 changes: 4 additions & 1 deletion code/game/gamemodes/nuclear/nuclear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
/obj/item/knife/combat/survival)

var/tc = 25
var/reputation = REPUTATION_EXCELLENT
var/command_radio = FALSE
var/uplink_type = /obj/item/uplink/nuclear

Expand All @@ -139,6 +140,7 @@
gloves = /obj/item/clothing/gloves/krav_maga/combatglovesplus
r_hand = /obj/item/nuclear_challenge
command_radio = TRUE
reputation = REPUTATION_ELITE

/datum/outfit/syndicate/no_crystals
name = "Syndicate Operative - Reinforcement"
Expand All @@ -153,7 +155,7 @@
R.use_command = TRUE

if(ispath(uplink_type, /obj/item/uplink/nuclear) || tc) // /obj/item/uplink/nuclear understands 0 tc
var/obj/item/U = new uplink_type(H, H, tc)
var/obj/item/U = new uplink_type(H, H, tc, reputation)
H.equip_to_slot_or_del(U, ITEM_SLOT_BACKPACK)

var/obj/item/implant/explosive/E = new/obj/item/implant/explosive(H)
Expand All @@ -177,6 +179,7 @@
/obj/item/tank/jetpack/oxygen/harness=1,\
/obj/item/gun/ballistic/automatic/pistol=1,\
/obj/item/knife/combat/survival)
reputation = REPUTATION_ELITE


/datum/game_mode/nuclear/generate_credit_text()
Expand Down
12 changes: 6 additions & 6 deletions code/modules/uplink/uplink_devices.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@

var/uplink_flag = UPLINK_TRAITORS

/obj/item/uplink/Initialize(mapload, mob/owner, tc_amount = 20)
/obj/item/uplink/Initialize(mapload, mob/owner, tc_amount = 20, rep_amount = TRAITOR_REPUTATION_START)
. = ..()
AddComponent(/datum/component/uplink, owner?.mind, FALSE, TRUE, uplink_flag, tc_amount)

/obj/item/uplink/debug
name = "debug uplink"

/obj/item/uplink/debug/Initialize(mapload, mob/owner, tc_amount = 9000)
/obj/item/uplink/debug/Initialize(mapload, mob/owner, tc_amount = 9000, rep_amount = REPUTATION_MAX)
. = ..()
var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink)
hidden_uplink.name = "debug uplink"
Expand All @@ -41,7 +41,7 @@
name = "debug nuclear uplink"
uplink_flag = UPLINK_NUKE_OPS

/obj/item/uplink/nuclear/debug/Initialize(mapload, mob/owner, tc_amount = 9000)
/obj/item/uplink/nuclear/debug/Initialize(mapload, mob/owner, tc_amount = 9000, rep_amount = REPUTATION_MAX)
. = ..()
var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink)
hidden_uplink.name = "debug nuclear uplink"
Expand All @@ -62,17 +62,17 @@
name = "dusty radio"
desc = "A dusty looking radio."

/obj/item/uplink/old/Initialize(mapload, mob/owner, tc_amount = 10)
/obj/item/uplink/old/Initialize(mapload, mob/owner, tc_amount = 10, rep_amount = REPUTATION_LOW)
. = ..()
var/datum/component/uplink/hidden_uplink = GetComponent(/datum/component/uplink, owner?.mind)
hidden_uplink.name = "dusty radio"

// Multitool uplink
/obj/item/multitool/uplink/Initialize(mapload, mob/owner, tc_amount = 20)
/obj/item/multitool/uplink/Initialize(mapload, mob/owner, tc_amount = 20, rep_amount = TRAITOR_REPUTATION_START)
. = ..()
AddComponent(/datum/component/uplink, owner?.mind, FALSE, TRUE, UPLINK_TRAITORS, tc_amount)

// Pen uplink
/obj/item/pen/uplink/Initialize(mapload, mob/owner, tc_amount = 20)
/obj/item/pen/uplink/Initialize(mapload, mob/owner, tc_amount = 20, rep_amount = TRAITOR_REPUTATION_START)
. = ..()
AddComponent(/datum/component/uplink, owner?.mind, TRUE, FALSE, UPLINK_TRAITORS, tc_amount)
Loading

0 comments on commit 02a9ac9

Please sign in to comment.