mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Another Big Technomancer PR
See PR for details.
This commit is contained in:
@@ -97,7 +97,8 @@
|
||||
var/i = 1
|
||||
for(var/obj/screen/ability/ability in ability_objects)
|
||||
ability.update_icon(forced)
|
||||
ability.maptext = "[i]" // Slot number
|
||||
ability.index = i
|
||||
ability.maptext = "[ability.index]" // Slot number
|
||||
i++
|
||||
|
||||
/obj/screen/movable/ability_master/update_icon()
|
||||
@@ -195,6 +196,7 @@
|
||||
maptext_x = 3
|
||||
var/background_base_state = "grey"
|
||||
var/ability_icon_state = null
|
||||
var/index = 0
|
||||
|
||||
// var/spell/spell = null
|
||||
var/obj/screen/movable/ability_master/ability_master
|
||||
@@ -260,6 +262,16 @@
|
||||
// spell.perform(usr)
|
||||
activate()
|
||||
|
||||
/obj/screen/ability/MouseDrop(var/atom/A)
|
||||
if(!A || A == src)
|
||||
return
|
||||
if(istype(A, /obj/screen/ability))
|
||||
var/obj/screen/ability/ability = A
|
||||
if(ability.ability_master && ability.ability_master == src.ability_master)
|
||||
ability_master.ability_objects.Swap(src.index, ability.index)
|
||||
ability_master.toggle_open(2) // To update the UI.
|
||||
|
||||
|
||||
// Makes the ability be triggered. The subclasses of this are responsible for carrying it out in whatever way it needs to.
|
||||
/obj/screen/ability/proc/activate()
|
||||
world << "[src] had activate() called."
|
||||
|
||||
Reference in New Issue
Block a user