From c0645ab04ce2df59e37b77c12a84e9c12d6abd7a Mon Sep 17 00:00:00 2001 From: forest2001 Date: Sat, 9 Mar 2024 17:29:56 +0000 Subject: [PATCH] proc to var --- code/modules/cm_tech/tech.dm | 8 ++++---- code/modules/cm_tech/techs/abstract/transitory.dm | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/code/modules/cm_tech/tech.dm b/code/modules/cm_tech/tech.dm index 3472ac5b3df5..1750f7e7dbbf 100644 --- a/code/modules/cm_tech/tech.dm +++ b/code/modules/cm_tech/tech.dm @@ -24,6 +24,8 @@ var/announce_name = "ALMAYER SPECIAL ASSETS AUTHORIZED" var/announce_message + var/is_tier_changer = FALSE + /datum/tech/proc/can_unlock(mob/M) SHOULD_CALL_PARENT(TRUE) @@ -58,8 +60,6 @@ return TRUE -/datum/tech/proc/is_tier_tech() - return FALSE /** Called when a tech is unlocked. Usually, benefits can be applied here * however, the purchase can still be cancelled by returning FALSE @@ -72,12 +72,12 @@ unlocked = TRUE to_chat(user, SPAN_HELPFUL("You have purchased the '[name]' tech node.")) log_admin("[key_name_admin(user)] has bought '[name]' via tech points.") - if(!is_tier_tech()) + if(!is_tier_changer) var/log_details = announce_message if(!log_details) log_details = name var/current_points = holder.points - log_ares_tech(user.real_name, is_tier_tech(), announce_name, log_details, required_points, current_points) + log_ares_tech(user.real_name, is_tier_changer, announce_name, log_details, required_points, current_points) holder.spend_points(required_points) update_icon(node) diff --git a/code/modules/cm_tech/techs/abstract/transitory.dm b/code/modules/cm_tech/techs/abstract/transitory.dm index b7c5775fd6b2..1737b6b21ee6 100644 --- a/code/modules/cm_tech/techs/abstract/transitory.dm +++ b/code/modules/cm_tech/techs/abstract/transitory.dm @@ -7,6 +7,7 @@ var/datum/tier/next var/techs_to_unlock = 0 + is_tier_changer = TRUE /datum/tech/transitory/check_tier_level(mob/M) if(before && before != holder.tier.type) @@ -22,9 +23,6 @@ return TRUE -/datum/tech/transitory/is_tier_tech() - return TRUE - /datum/tech/transitory/on_unlock(mob/user) . = ..() if(!next) @@ -37,7 +35,7 @@ if(flags & TREE_FLAG_MARINE) /// Due to calling parent, points will have already been spent by now. var/current_points = holder.points + required_points - log_ares_tech(user.real_name, is_tier_tech(), "ALMAYER DEFCON LEVEL INCREASED", "THREAT ASSESSMENT LEVEL INCREASED TO LEVEL [next_tier.tier].\n\nLEVEL [next_tier.tier] assets have been authorised to handle the situation.", required_points, current_points) + log_ares_tech(user.real_name, is_tier_changer, "ALMAYER DEFCON LEVEL INCREASED", "THREAT ASSESSMENT LEVEL INCREASED TO LEVEL [next_tier.tier].\n\nLEVEL [next_tier.tier] assets have been authorised to handle the situation.", required_points, current_points) /datum/tech/transitory/get_tier_overlay() if(!next)