Skip to content

Commit

Permalink
another day, another exploit fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
SapphicOverload committed Dec 25, 2024
1 parent d4fb826 commit 06d9159
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 0 additions & 3 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,6 @@ GLOBAL_LIST_EMPTY(species_list)
. = FALSE
break

if(skill_check) // get better at things by practicing them
user.add_exp(skill_check, delay)

if(!QDELETED(progbar))
progbar.end_progress()

Expand Down
5 changes: 5 additions & 0 deletions code/datums/progressbar.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
var/listindex = 0
///Whether progress has already been ended.
var/progress_ended = FALSE
///Which skill this uses
var/skill_check


/datum/progressbar/New(mob/User, goal_number, atom/target, timed_action_flags = NONE, datum/callback/extra_checks, skill_check)
Expand All @@ -49,6 +51,7 @@
skill_icon = image('icons/mob/skills.dmi', bar_loc, "[skill_check]_small", pixel_x = SKILL_ICON_OFFSET_X)
SET_PLANE_EXPLICIT(skill_icon, ABOVE_HUD_PLANE, User)
skill_icon.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
src.skill_check = skill_check
user = User
src.extra_checks = extra_checks

Expand Down Expand Up @@ -184,6 +187,8 @@

if(last_progress != goal)
bar.icon_state = "[bar.icon_state]_fail"
else if(skill_check) // get better at things by practicing them
user.add_exp(skill_check, goal)

animate(bar, alpha = 0, time = PROGRESSBAR_ANIMATION_TIME)
if(skill_icon)
Expand Down

0 comments on commit 06d9159

Please sign in to comment.