-tg- pull refactor

This commit does the following:
 - Overhauls how pull works. It is now based on a mob verb,
   mob/verb/pulled()
 - Makes the pull icon much more responsive. It is now updated whenever a
   mob starts or stops pulling an object, and instantly updates.
   - This required HUD changes. God help me.
This commit is contained in:
Tigercat2000
2015-10-10 11:15:52 -07:00
parent 07770fdda7
commit ccdae149bb
40 changed files with 101 additions and 186 deletions
+15 -3
View File
@@ -170,6 +170,21 @@
overlays.Cut()
overlays += image('icons/mob/zone_sel.dmi', "[selecting]")
/obj/screen/pull
name = "stop pulling"
icon = 'icons/mob/screen1_Midnight.dmi'
icon_state = "pull"
/obj/screen/pull/Click()
usr.stop_pulling()
/obj/screen/pull/update_icon(mob/mymob)
if(!mymob) return
if(mymob.pulling)
icon_state = "pull"
else
icon_state = "pull0"
/obj/screen/Click(location, control, params)
if(!usr) return 1
@@ -347,9 +362,6 @@
if("disarm")
usr.a_intent = I_DISARM
usr.hud_used.action_intent.icon_state = "intent_disarm"
if("pull")
usr.stop_pulling()
if("throw")
if(!usr.stat && isturf(usr.loc) && !usr.restrained())
usr:toggle_throw_mode()