Another Big Technomancer PR

See PR for details.
This commit is contained in:
Neerti
2016-10-22 11:25:47 -04:00
parent 67330d1df6
commit 8bf97faaef
53 changed files with 433 additions and 102 deletions

View File

@@ -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."