Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 06d9159

Browse files
another day, another exploit fixed
1 parent d4fb826 commit 06d9159

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

code/__HELPERS/mobs.dm

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,6 @@ GLOBAL_LIST_EMPTY(species_list)
355355
. = FALSE
356356
break
357357

358-
if(skill_check) // get better at things by practicing them
359-
user.add_exp(skill_check, delay)
360-
361358
if(!QDELETED(progbar))
362359
progbar.end_progress()
363360

code/datums/progressbar.dm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
var/listindex = 0
2525
///Whether progress has already been ended.
2626
var/progress_ended = FALSE
27+
///Which skill this uses
28+
var/skill_check
2729

2830

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

@@ -184,6 +187,8 @@
184187

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

188193
animate(bar, alpha = 0, time = PROGRESSBAR_ANIMATION_TIME)
189194
if(skill_icon)

0 commit comments

Comments
 (0)