mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 09:08:30 +01:00
[MIRROR] His Grace Icon Refactor and Fixes (#3968)
* His Grace Icon Refactor (#57470) * His Grace Icon Refactor and Fixes Co-authored-by: Fox McCloud <Fox-McCloud@users.noreply.github.com>
This commit is contained in:
@@ -7,16 +7,18 @@
|
||||
/obj/item/his_grace
|
||||
name = "artistic toolbox"
|
||||
desc = "A toolbox painted bright green. Looking at it makes you feel uneasy."
|
||||
icon_state = "his_grace"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "green"
|
||||
inhand_icon_state = "artistic_toolbox"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/toolbox_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/toolbox_righthand.dmi'
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
w_class = WEIGHT_CLASS_GIGANTIC
|
||||
force = 12
|
||||
attack_verb_continuous = list("robusts")
|
||||
attack_verb_simple = list("robust")
|
||||
hitsound = 'sound/weapons/smash.ogg'
|
||||
drop_sound = 'sound/items/handling/toolbox_drop.ogg'
|
||||
pickup_sound = 'sound/items/handling/toolbox_pickup.ogg'
|
||||
var/awakened = FALSE
|
||||
var/bloodthirst = HIS_GRACE_SATIATED
|
||||
var/prev_bloodthirst = HIS_GRACE_SATIATED
|
||||
@@ -30,6 +32,7 @@
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
AddElement(/datum/element/point_of_interest)
|
||||
RegisterSignal(src, COMSIG_MOVABLE_POST_THROW, .proc/move_gracefully)
|
||||
update_appearance()
|
||||
|
||||
/obj/item/his_grace/Destroy()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
@@ -37,6 +40,20 @@
|
||||
L.forceMove(get_turf(src))
|
||||
return ..()
|
||||
|
||||
/obj/item/his_grace/update_icon_state()
|
||||
icon_state = ascended ? "gold" : "green"
|
||||
inhand_icon_state = ascended ? "toolbox_gold" : "artistic_toolbox"
|
||||
return ..()
|
||||
|
||||
/obj/item/his_grace/update_overlays()
|
||||
. = ..()
|
||||
if(ascended)
|
||||
. += "triple_latch"
|
||||
else if(awakened)
|
||||
. += "single_latch_open"
|
||||
else
|
||||
. += "single_latch"
|
||||
|
||||
/obj/item/his_grace/attack_self(mob/living/user)
|
||||
if(!awakened)
|
||||
INVOKE_ASYNC(src, .proc/awaken, user)
|
||||
@@ -132,7 +149,7 @@
|
||||
adjust_bloodthirst(1)
|
||||
force_bonus = HIS_GRACE_FORCE_BONUS * LAZYLEN(contents)
|
||||
playsound(user, 'sound/effects/pope_entry.ogg', 100)
|
||||
icon_state = "his_grace_awakened"
|
||||
update_appearance()
|
||||
move_gracefully()
|
||||
|
||||
/obj/item/his_grace/proc/move_gracefully()
|
||||
@@ -165,13 +182,13 @@
|
||||
playsound(loc, 'sound/weapons/batonextend.ogg', 100, TRUE)
|
||||
name = initial(name)
|
||||
desc = initial(desc)
|
||||
icon_state = initial(icon_state)
|
||||
animate(src, transform=matrix())
|
||||
gender = initial(gender)
|
||||
force = initial(force)
|
||||
force_bonus = initial(force_bonus)
|
||||
awakened = FALSE
|
||||
bloodthirst = 0
|
||||
update_appearance()
|
||||
|
||||
/obj/item/his_grace/proc/consume(mob/living/meal) //Here's your dinner, Mr. Grace.
|
||||
if(!meal)
|
||||
@@ -247,11 +264,11 @@
|
||||
var/mob/living/carbon/human/master = loc
|
||||
force_bonus += ascend_bonus
|
||||
desc = "A legendary toolbox and a distant artifact from The Age of Three Powers. On its three latches engraved are the words \"The Sun\", \"The Moon\", and \"The Stars\". The entire toolbox has the words \"The World\" engraved into its sides."
|
||||
icon_state = "his_grace_ascended"
|
||||
inhand_icon_state = "toolbox_gold"
|
||||
ascended = TRUE
|
||||
update_appearance()
|
||||
playsound(src, 'sound/effects/his_grace_ascend.ogg', 100)
|
||||
if(istype(master))
|
||||
master.update_inv_hands()
|
||||
master.visible_message("<span class='his_grace big bold'>Gods will be watching.</span>")
|
||||
name = "[master]'s mythical toolbox of three powers"
|
||||
master.client?.give_award(/datum/award/achievement/misc/ascension, master)
|
||||
|
||||
@@ -401,21 +401,34 @@
|
||||
/obj/item/toy/windup_toolbox
|
||||
name = "windup toolbox"
|
||||
desc = "A replica toolbox that rumbles when you turn the key."
|
||||
icon_state = "his_grace"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "green"
|
||||
inhand_icon_state = "artistic_toolbox"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/toolbox_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/toolbox_righthand.dmi'
|
||||
var/active = FALSE
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
hitsound = 'sound/weapons/smash.ogg'
|
||||
drop_sound = 'sound/items/handling/toolbox_drop.ogg'
|
||||
pickup_sound = 'sound/items/handling/toolbox_pickup.ogg'
|
||||
attack_verb_continuous = list("robusts")
|
||||
attack_verb_simple = list("robust")
|
||||
var/active = FALSE
|
||||
|
||||
/obj/item/toy/windup_toolbox/Initialize(mapload)
|
||||
. = ..()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/toy/windup_toolbox/update_overlays()
|
||||
. = ..()
|
||||
if(active)
|
||||
. += "single_latch_open"
|
||||
else
|
||||
. += "single_latch"
|
||||
|
||||
/obj/item/toy/windup_toolbox/attack_self(mob/user)
|
||||
if(!active)
|
||||
icon_state = "his_grace_awakened"
|
||||
to_chat(user, "<span class='notice'>You wind up [src], it begins to rumble.</span>")
|
||||
active = TRUE
|
||||
update_appearance()
|
||||
playsound(src, 'sound/effects/pope_entry.ogg', 100)
|
||||
Rumble()
|
||||
addtimer(CALLBACK(src, .proc/stopRumble), 600)
|
||||
@@ -440,9 +453,11 @@
|
||||
animate(transform=transforms[4], time=0.3)
|
||||
|
||||
/obj/item/toy/windup_toolbox/proc/stopRumble()
|
||||
icon_state = initial(icon_state)
|
||||
active = FALSE
|
||||
animate(src, transform=matrix())
|
||||
update_appearance()
|
||||
visible_message("<span class='warning'>[src] slowly stops rattling and falls still, its latch snapping shut.</span>") //subtle difference
|
||||
playsound(loc, 'sound/weapons/batonextend.ogg', 100, TRUE)
|
||||
animate(src, transform = matrix())
|
||||
|
||||
/*
|
||||
* Subtype of Double-Bladed Energy Swords
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 108 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
Reference in New Issue
Block a user