Charging the clockwork slab now uses overlays

This commit is contained in:
CitadelStationBot
2017-07-19 10:57:09 -05:00
parent 6fe243b647
commit 79fcbfece6
7 changed files with 20 additions and 8 deletions

View File

@@ -6,6 +6,7 @@
Clockwork slabs will only make components if held or if inside an item held by a human, and when making a component will prevent all other slabs held from making components.\n\
Hitting a slab, a Servant with a slab, or a cache will <b>transfer</b> this slab's components into the target, the target's slab, or the global cache, respectively."
icon_state = "dread_ipad"
var/inhand_overlay //If applicable, this overlay will be applied to the slab's inhand
slot_flags = SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
var/list/stored_components = list(BELLIGERENT_EYE = 0, VANGUARD_COGWHEEL = 0, GEIS_CAPACITOR = 0, REPLICANT_ALLOY = 0, HIEROPHANT_ANSIBLE = 0)
@@ -105,6 +106,12 @@
. = ..()
addtimer(CALLBACK(src, .proc/check_on_mob, user), 1) //dropped is called before the item is out of the slot, so we need to check slightly later
/obj/item/clockwork/slab/worn_overlays(isinhands = FALSE, icon_file)
. = list()
if(isinhands && item_state && inhand_overlay)
var/mutable_appearance/M = mutable_appearance(icon_file, "slab_[inhand_overlay]")
. += M
/obj/item/clockwork/slab/proc/check_on_mob(mob/user)
if(user && !(src in user.held_items) && slab_ability && slab_ability.ranged_ability_user) //if we happen to check and we AREN'T in user's hands, remove whatever ability we have
slab_ability.remove_ranged_ability()

View File

@@ -259,7 +259,7 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or
//Uses a ranged slab ability, returning only when the ability no longer exists(ie, when interrupted) or finishes.
/datum/clockwork_scripture/ranged_ability
var/slab_icon = "dread_ipad"
var/slab_overlay
var/ranged_type = /obj/effect/proc_holder/slab
var/ranged_message = "This is a huge goddamn bug, how'd you cast this?"
var/timeout_time = 0
@@ -271,7 +271,10 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or
return ..()
/datum/clockwork_scripture/ranged_ability/scripture_effects()
slab.icon_state = slab_icon
if(slab_overlay)
slab.add_overlay(slab_overlay)
slab.item_state = "clockwork_slab"
slab.inhand_overlay = slab_overlay
slab.slab_ability = new ranged_type(slab)
slab.slab_ability.slab = slab
slab.slab_ability.add_ranged_ability(invoker, ranged_message)
@@ -294,7 +297,9 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or
successful = slab.slab_ability.successful
if(!slab.slab_ability.finished)
slab.slab_ability.remove_ranged_ability()
slab.icon_state = "dread_ipad"
slab.cut_overlays()
slab.item_state = initial(slab.item_state)
slab.inhand_overlay = null
if(invoker)
invoker.update_inv_hands()
return successful //slab doesn't look like a word now.

View File

@@ -9,7 +9,7 @@
channel_time = 30
primary_component = VANGUARD_COGWHEEL
quickbind_desc = "Allows you to grant a Servant and yourself stun immunity, as the Vanguard scripture.<br><b>Click your slab to disable.</b>"
slab_icon = "vanguard"
slab_overlay = "vanguard"
ranged_type = /obj/effect/proc_holder/slab/vanguard
ranged_message = "<span class='inathneq_small'><i>You charge the clockwork slab with defensive strength.</i>\n\
<b>Left-click a fellow Servant or yourself to grant Vanguard!\n\
@@ -38,7 +38,7 @@
channel_time = 30
primary_component = BELLIGERENT_EYE
quickbind_desc = "Allows you to place a Judicial Marker to knock down and damage non-Servants in an area.<br><b>Click your slab to disable.</b>"
slab_icon = "judicial"
slab_overlay = "judicial"
ranged_type = /obj/effect/proc_holder/slab/judicial
ranged_message = "<span class='neovgre_small'><i>You charge the clockwork slab with judicial force.</i>\n\
<b>Left-click a target to place a Judicial Marker!\n\

View File

@@ -90,7 +90,7 @@
sort_priority = 4
quickbind = TRUE
quickbind_desc = "Allows you to convert a Servant's brute, burn, and oxygen damage to half toxin damage.<br><b>Click your slab to disable.</b>"
slab_icon = "compromise"
slab_overlay = "compromise"
ranged_type = /obj/effect/proc_holder/slab/compromise
ranged_message = "<span class='inathneq_small'><i>You charge the clockwork slab with healing power.</i>\n\
<b>Left-click a fellow Servant or yourself to heal!\n\
@@ -111,7 +111,7 @@
sort_priority = 5
quickbind = TRUE
quickbind_desc = "Allows you to bind and start converting an adjacent target non-Servant.<br><b>Click your slab to disable.</b>"
slab_icon = "geis"
slab_overlay = "geis"
ranged_type = /obj/effect/proc_holder/slab/geis
ranged_message = "<span class='sevtug_small'><i>You charge the clockwork slab with divine energy.</i>\n\
<b>Left-click a target within melee range to convert!\n\

View File

@@ -386,7 +386,7 @@
/datum/clockwork_scripture/ranged_ability/volt_ray
name = "Volt Ray"
slab_icon = "volt"
slab_overlay = "volt"
allow_mobility = FALSE
ranged_type = /obj/effect/proc_holder/slab/volt
ranged_message = "<span class='nzcrentr_small'><i>You charge the clockwork slab with shocking might.</i>\n\

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 128 KiB