mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 15:37:36 +01:00
Adds cult action bar (#26052)
* cult actions list * moved blood spear a little to the side * pixel offset * Update code/__DEFINES/action_button_defines.dm Co-authored-by: Spaghetti-bit <yumyumkillkill@gmail.com> Signed-off-by: HMBGERDO <61080616+HMBGERDO@users.noreply.github.com> * review * eh, why not --------- Signed-off-by: HMBGERDO <61080616+HMBGERDO@users.noreply.github.com> Co-authored-by: Spaghetti-bit <yumyumkillkill@gmail.com>
This commit is contained in:
co-authored by
Spaghetti-bit
parent
f64932f1f3
commit
bc303a85bd
@@ -3,32 +3,15 @@
|
||||
name = "Prepare Blood Magic"
|
||||
button_overlay_icon_state = "carve"
|
||||
desc = "Prepare blood magic by carving runes into your flesh. This is easier with an <b>empowering rune</b>."
|
||||
default_button_position = DEFAULT_BLOODSPELLS
|
||||
var/list/spells = list()
|
||||
var/channeling = FALSE
|
||||
default_button_position = DEFAULT_BLOODSPELLS
|
||||
|
||||
/datum/action/innate/cult/blood_magic/Remove()
|
||||
for(var/X in spells)
|
||||
qdel(X)
|
||||
..()
|
||||
|
||||
/datum/action/innate/cult/blood_magic/proc/Positioning()
|
||||
for(var/datum/hud/hud as anything in viewers)
|
||||
var/our_view = hud.mymob?.client?.view || "15x15"
|
||||
var/atom/movable/screen/movable/action_button/button = viewers[hud]
|
||||
var/position = screen_loc_to_offset(button.screen_loc)
|
||||
var/spells_iterated = 0
|
||||
for(var/datum/action/innate/cult/blood_spell/blood_spell in spells)
|
||||
spells_iterated += 1
|
||||
if(blood_spell.positioned)
|
||||
continue
|
||||
var/atom/movable/screen/movable/action_button/moving_button = blood_spell.viewers[hud]
|
||||
if(!moving_button)
|
||||
continue
|
||||
var/our_x = position[1] + spells_iterated * world.icon_size // Offset any new buttons into our list
|
||||
hud.position_action(moving_button, offset_to_screen_loc(our_x, position[2], our_view))
|
||||
blood_spell.positioned = TRUE
|
||||
|
||||
/datum/action/innate/cult/blood_magic/Activate()
|
||||
var/rune = FALSE
|
||||
var/limit = RUNELESS_MAX_BLOODCHARGE
|
||||
@@ -93,6 +76,7 @@
|
||||
name = "Blood Magic"
|
||||
button_overlay_icon_state = "telerune"
|
||||
desc = "Fear the Old Blood."
|
||||
default_button_position = SCRN_OBJ_CULT_LIST
|
||||
var/charges = 1
|
||||
var/magic_path = null
|
||||
var/obj/item/melee/blood_magic/hand_magic
|
||||
@@ -129,10 +113,6 @@
|
||||
// button.ordered = FALSE
|
||||
..()
|
||||
|
||||
/datum/action/innate/cult/blood_spell/override_location()
|
||||
// button.locked = TRUE
|
||||
all_magic.Positioning()
|
||||
|
||||
/datum/action/innate/cult/blood_spell/Remove()
|
||||
if(all_magic)
|
||||
all_magic.spells -= src
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
name = "Draw Blood Rune"
|
||||
desc = "Use the ritual dagger to create a powerful blood rune"
|
||||
button_overlay_icon_state = "blood_dagger"
|
||||
default_button_position = "6:157,4:-2"
|
||||
default_button_position = "10:29,4:-2"
|
||||
|
||||
/datum/action/innate/cult/use_dagger/Grant()
|
||||
button_overlay_icon_state = GET_CULT_DATA(dagger_icon, "blood_dagger")
|
||||
|
||||
@@ -647,9 +647,9 @@
|
||||
desc = "Call the blood spear back to your hand!"
|
||||
button_background_icon_state = "bg_cult"
|
||||
button_overlay_icon_state = "bloodspear"
|
||||
default_button_position = "11:31,4:-2"
|
||||
var/obj/item/cult_spear/spear
|
||||
var/cooldown = 0
|
||||
default_button_position = "6:157,4:-2"
|
||||
|
||||
/datum/action/innate/cult/spear/Grant(mob/user, obj/blood_spear)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user