diff --git a/code/game/objects/structures/gym.dm b/code/game/objects/structures/gym.dm index d835184b3ab..c07c4de762c 100644 --- a/code/game/objects/structures/gym.dm +++ b/code/game/objects/structures/gym.dm @@ -21,16 +21,25 @@ L.apply_status_effect(/datum/status_effect/exercised) /obj/structure/weightmachine - name = "weight machine" desc = "Just looking at this thing makes you feel tired." density = TRUE anchored = TRUE blocks_emissive = EMISSIVE_BLOCK_UNIQUE - var/icon_state_inuse + icon = 'icons/obj/weightmachine.dmi' /obj/structure/weightmachine/proc/AnimateMachine(mob/living/user) return +/obj/structure/weightmachine/update_icon_state() + . = ..() + icon_state = (obj_flags & IN_USE) ? "[base_icon_state]-u" : base_icon_state + +/obj/structure/weightmachine/update_overlays() + . = ..() + + if(obj_flags & IN_USE) + . += mutable_appearance(icon, "[base_icon_state]-o", plane = GAME_PLANE_UPPER, layer = ABOVE_MOB_LAYER, alpha = src.alpha) + /obj/structure/weightmachine/attack_hand(mob/living/user, list/modifiers) . = ..() if(.) @@ -42,7 +51,7 @@ return else obj_flags |= IN_USE - icon_state = icon_state_inuse + update_appearance() user.setDir(SOUTH) user.Stun(80) user.forceMove(src.loc) @@ -52,17 +61,17 @@ playsound(user, 'sound/machines/click.ogg', 60, TRUE) obj_flags &= ~IN_USE + update_appearance() user.pixel_y = user.base_pixel_y var/finishmessage = pick("You feel stronger!","You feel like you can take on the world!","You feel robust!","You feel indestructible!") SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "exercise", /datum/mood_event/exercise) - icon_state = initial(icon_state) to_chat(user, finishmessage) user.apply_status_effect(/datum/status_effect/exercised) /obj/structure/weightmachine/stacklifter - icon = 'goon/icons/obj/fitness.dmi' - icon_state = "fitnesslifter" - icon_state_inuse = "fitnesslifter2" + name = "chest press machine" + icon_state = "stacklifter" + base_icon_state = "stacklifter" /obj/structure/weightmachine/stacklifter/AnimateMachine(mob/living/user) var/lifts = 0 @@ -73,28 +82,24 @@ animate(user, pixel_y = -2, time = 3) sleep(3) animate(user, pixel_y = -4, time = 3) - sleep(3) + sleep(2) playsound(user, 'sound/machines/creak.ogg', 60, TRUE) /obj/structure/weightmachine/weightlifter - icon = 'goon/icons/obj/fitness.dmi' - icon_state = "fitnessweight" - icon_state_inuse = "fitnessweight-c" + name = "inline bench press" + icon_state = "benchpress" + base_icon_state = "benchpress" /obj/structure/weightmachine/weightlifter/AnimateMachine(mob/living/user) - var/mutable_appearance/swole_overlay = mutable_appearance(icon, "fitnessweight-w", WALL_OBJ_LAYER) - swole_overlay.plane = GAME_PLANE_UPPER - add_overlay(swole_overlay) var/reps = 0 user.pixel_y = 5 while (reps++ < 6) if (user.loc != src.loc) break for (var/innerReps = max(reps, 1), innerReps > 0, innerReps--) - sleep(3) + sleep(4) animate(user, pixel_y = (user.pixel_y == 3) ? 5 : 3, time = 3) playsound(user, 'sound/machines/creak.ogg', 60, TRUE) sleep(3) animate(user, pixel_y = 2, time = 3) sleep(3) - cut_overlay(swole_overlay) diff --git a/goon/icons/obj/fitness.dmi b/goon/icons/obj/fitness.dmi index e2675cbda49..2376a39024e 100644 Binary files a/goon/icons/obj/fitness.dmi and b/goon/icons/obj/fitness.dmi differ diff --git a/icons/obj/weightmachine.dmi b/icons/obj/weightmachine.dmi new file mode 100644 index 00000000000..cecd3e63ca9 Binary files /dev/null and b/icons/obj/weightmachine.dmi differ