Skip to content

Commit

Permalink
proc to var
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Mar 9, 2024
1 parent 5cd29ef commit c0645ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 4 additions & 4 deletions code/modules/cm_tech/tech.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand All @@ -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)

Expand Down
6 changes: 2 additions & 4 deletions code/modules/cm_tech/techs/abstract/transitory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -22,9 +23,6 @@

return TRUE

/datum/tech/transitory/is_tier_tech()
return TRUE

/datum/tech/transitory/on_unlock(mob/user)
. = ..()
if(!next)
Expand All @@ -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)
Expand Down

0 comments on commit c0645ab

Please sign in to comment.