Fixes various small issues with moodlets; adds one for exercise. (#39437)

Adds a slight positive moodlet for working out, the same effect as reading a book

In the process refactors weight machines so they are actually object oriented, this creates map edits to Delta and Pubby as well as one ruin

Changes the message "Nothing special has happened to me" to something that is hopefully less immersion-demolishing.

Moodlet text for eating disgusting food no longer appears in positive green text
    Other various grammar fixes
This commit is contained in:
bgobandit
2018-07-31 11:15:59 +12:00
committed by oranges
parent 101bf4a3ba
commit 7df3ffb4db
8 changed files with 66 additions and 76 deletions
+1 -1
View File
@@ -77,7 +77,7 @@
var/datum/mood_event/event = mood_events[i]
msg += event.description
else
msg += "<span class='nicegreen'>Nothing special has happened to me lately!<span>\n"
msg += "<span class='nicegreen'>I don't have much of a reaction to anything right now.<span>\n"
to_chat(user || parent, msg)
/datum/component/mood/proc/update_mood() //Called whenever a mood event is added or removed
@@ -1,5 +1,5 @@
/datum/mood_event/handcuffed
description = "<span class='warning'>I guess my antics have finally caught up with me..</span>\n"
description = "<span class='warning'>I guess my antics have finally caught up with me.</span>\n"
mood_change = -1
/datum/mood_event/broken_vow //Used for when mimes break their vow of silence
@@ -18,6 +18,11 @@
mood_change = 3
timeout = 3000
/datum/mood_event/exercise
description = "<span class='nicegreen'>Working out releases those endorphins!</span>\n"
mood_change = 3
timeout = 3000
/datum/mood_event/pet_corgi
description = "<span class='nicegreen'>Corgis are adorable! I can't stop petting them!</span>\n"
mood_change = 3
+2 -2
View File
@@ -39,12 +39,12 @@
timeout = 2400
/datum/mood_event/gross_food
description = "<span class='nicegreen'>I really didn't like that food.</span>\n"
description = "<span class='warning'>I really didn't like that food.</span>\n"
mood_change = -2
timeout = 2400
/datum/mood_event/disgusting_food
description = "<span class='nicegreen'>That food was disgusting!</span>\n"
description = "<span class='warning'>That food was disgusting!</span>\n"
mood_change = -4
timeout = 2400
+46 -61
View File
@@ -16,17 +16,20 @@
playsound(loc, pick(hit_sounds), 25, 1, -1)
if(isliving(user))
var/mob/living/L = user
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "exercise", /datum/mood_event/exercise)
L.apply_status_effect(STATUS_EFFECT_EXERCISED)
/obj/structure/stacklifter
/obj/structure/weightmachine
name = "Weight Machine"
desc = "Just looking at this thing makes you feel tired."
icon = 'goon/icons/obj/fitness.dmi'
icon_state = "fitnesslifter"
density = TRUE
anchored = TRUE
var/icon_state_inuse
/obj/structure/stacklifter/attack_hand(mob/living/user)
/obj/structure/weightmachine/proc/AnimateMachine(mob/living/user)
return
/obj/structure/weightmachine/attack_hand(mob/living/user)
. = ..()
if(.)
return
@@ -35,76 +38,58 @@
return
else
obj_flags |= IN_USE
icon_state = "fitnesslifter2"
icon_state = icon_state_inuse
user.setDir(SOUTH)
user.Stun(80)
user.forceMove(src.loc)
var/bragmessage = pick("pushing it to the limit","going into overdrive","burning with determination","rising up to the challenge", "getting strong now","getting ripped")
user.visible_message("<B>[user] is [bragmessage]!</B>")
var/lifts = 0
while (lifts++ < 6)
if (user.loc != src.loc)
break
sleep(3)
animate(user, pixel_y = -2, time = 3)
sleep(3)
animate(user, pixel_y = -4, time = 3)
sleep(3)
playsound(user, 'goon/sound/effects/spring.ogg', 60, 1)
AnimateMachine(user)
playsound(user, 'sound/machines/click.ogg', 60, 1)
obj_flags &= ~IN_USE
user.pixel_y = 0
var/finishmessage = pick("You feel stronger!","You feel like you can take on the world!","You feel robust!","You feel indestructible!")
icon_state = "fitnesslifter"
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(STATUS_EFFECT_EXERCISED)
/obj/structure/weightlifter
name = "Weight Machine"
desc = "Just looking at this thing makes you feel tired."
/obj/structure/weightmachine/stacklifter
icon = 'goon/icons/obj/fitness.dmi'
icon_state = "fitnesslifter"
icon_state_inuse = "fitnesslifter2"
/obj/structure/weightmachine/stacklifter/AnimateMachine(mob/living/user)
var/lifts = 0
while (lifts++ < 6)
if (user.loc != src.loc)
break
sleep(3)
animate(user, pixel_y = -2, time = 3)
sleep(3)
animate(user, pixel_y = -4, time = 3)
sleep(3)
playsound(user, 'goon/sound/effects/spring.ogg', 60, 1)
/obj/structure/weightmachine/weightlifter
icon = 'goon/icons/obj/fitness.dmi'
icon_state = "fitnessweight"
density = TRUE
anchored = TRUE
icon_state_inuse = "fitnessweight-c"
/obj/structure/weightlifter/attack_hand(mob/living/user)
. = ..()
if(.)
return
if(obj_flags & IN_USE)
to_chat(user, "It's already in use - wait a bit.")
return
else
obj_flags |= IN_USE
icon_state = "fitnessweight-c"
user.setDir(SOUTH)
user.Stun(80)
user.forceMove(src.loc)
var/mutable_appearance/swole_overlay = mutable_appearance(icon, "fitnessweight-w", WALL_OBJ_LAYER)
add_overlay(swole_overlay)
var/bragmessage = pick("pushing it to the limit","going into overdrive","burning with determination","rising up to the challenge", "getting strong now","getting ripped")
user.visible_message("<B>[user] is [bragmessage]!</B>")
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)
animate(user, pixel_y = (user.pixel_y == 3) ? 5 : 3, time = 3)
playsound(user, 'goon/sound/effects/spring.ogg', 60, 1)
sleep(3)
animate(user, pixel_y = 2, time = 3)
sleep(3)
playsound(user, 'sound/machines/click.ogg', 60, 1)
obj_flags &= ~IN_USE
animate(user, pixel_y = 0, time = 3)
var/finishmessage = pick("You feel stronger!","You feel like you can take on the world!","You feel robust!","You feel indestructible!")
icon_state = "fitnessweight"
cut_overlay(swole_overlay)
to_chat(user, "[finishmessage]")
user.apply_status_effect(STATUS_EFFECT_EXERCISED)
/obj/structure/weightmachine/weightlifter/AnimateMachine(mob/living/user)
var/mutable_appearance/swole_overlay = mutable_appearance(icon, "fitnessweight-w", WALL_OBJ_LAYER)
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)
animate(user, pixel_y = (user.pixel_y == 3) ? 5 : 3, time = 3)
playsound(user, 'goon/sound/effects/spring.ogg', 60, 1)
sleep(3)
animate(user, pixel_y = 2, time = 3)
sleep(3)
cut_overlay(swole_overlay)