Fixes Slow Action Buttons, Removes Verbs

This commit is contained in:
Fox-McCloud
2016-07-20 02:44:34 -04:00
parent f5324665ac
commit eaf82cd423
11 changed files with 100 additions and 143 deletions
@@ -374,6 +374,9 @@ Congratulations! You are now trained for xenobiology research!"}
to_chat(usr, "<span class='notice'>You switch the baton to [txt] mode.</span>")
update_icon()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/weapon/abductor_baton/update_icon()
switch(mode)
+6 -10
View File
@@ -463,6 +463,9 @@ BLIND // can't see anything
flavour = "[copytext(adjust_flavour, 3, lentext(adjust_flavour) + 1)] up" //Trims off the 'un' at the beginning of the word. unzip -> zip, unbutton->button.
to_chat(user, "You [flavour] \the [src].")
suit_adjusted = 0 //Suit is no longer adjusted.
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
else
var/flavour = "open"
icon_state += "_open"
@@ -471,6 +474,9 @@ BLIND // can't see anything
flavour = "[adjust_flavour]"
to_chat(user, "You [flavour] \the [src].")
suit_adjusted = 1 //Suit's adjusted.
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
else
if(user.canUnEquip(src)) //Checks to see if the item can be unequipped. If so, lets shred. Otherwise, struggle and fail.
if(contents) //If the suit's got any storage capability...
@@ -502,16 +508,6 @@ BLIND // can't see anything
if(!(initial(flags_inv) & HIDETAIL) && (flags_inv & HIDETAIL)) //Otherwise, remove the HIDETAIL flag if it wasn't already in the flags_inv to start with.
flags_inv &= ~HIDETAIL
/obj/item/clothing/suit/verb/openjacket(var/mob/user) //The verb you can use to adjust jackets.
set name = "Open/Close Jacket"
set category = "Object"
set src in usr
if(!isliving(usr))
return
if(usr.stat)
return
adjustsuit(user)
/obj/item/clothing/suit/ui_action_click(mob/user) //This is what happens when you click the HUD action button to adjust your suit.
if(!ignore_suitadjust)
adjustsuit(user)
+22 -28
View File
@@ -281,10 +281,7 @@
/obj/item/clothing/glasses/sunglasses/yeah/attack_self()
pun()
/obj/item/clothing/glasses/sunglasses/yeah/verb/pun()
set category = "Object"
set name = "YEAH!"
set src in usr
/obj/item/clothing/glasses/sunglasses/yeah/proc/pun()
if(!punused)//one per round
punused = 1
playsound(src.loc, 'sound/misc/yeah.ogg', 100, 0)
@@ -340,31 +337,28 @@
/obj/item/clothing/glasses/welding/attack_self()
toggle()
/obj/item/clothing/glasses/welding/proc/toggle()
if(up)
up = !up
flags |= GLASSESCOVERSEYES
flags_inv |= HIDEEYES
icon_state = initial(icon_state)
to_chat(usr, "You flip the [src] down to protect your eyes.")
flash_protect = 2
tint = initial(tint) //better than istype
else
up = !up
flags &= ~HEADCOVERSEYES
flags_inv &= ~HIDEEYES
icon_state = "[initial(icon_state)]up"
to_chat(usr, "You push the [src] up out of your face.")
flash_protect = 0
tint = 0
usr.update_inv_glasses()
/obj/item/clothing/glasses/welding/verb/toggle()
set category = "Object"
set name = "Adjust welding goggles"
set src in usr
if(usr.canmove && !usr.stat && !usr.restrained())
if(src.up)
src.up = !src.up
src.flags |= GLASSESCOVERSEYES
flags_inv |= HIDEEYES
icon_state = initial(icon_state)
to_chat(usr, "You flip the [src] down to protect your eyes.")
flash_protect = 2
tint = initial(tint) //better than istype
else
src.up = !src.up
src.flags &= ~HEADCOVERSEYES
flags_inv &= ~HIDEEYES
icon_state = "[initial(icon_state)]up"
to_chat(usr, "You push the [src] up out of your face.")
flash_protect = 0
tint = 0
usr.update_inv_glasses()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/clothing/glasses/welding/superior
name = "superior welding goggles"
+1 -8
View File
@@ -355,14 +355,7 @@
/obj/item/clothing/head/griffin/attack_self()
caw()
/obj/item/clothing/head/griffin/verb/caw()
set category = "Object"
set name = "Caw"
set src in usr
if(!istype(usr, /mob/living)) return
if(usr.stat) return
/obj/item/clothing/head/griffin/proc/caw()
if(cooldown < world.time - 20) // A cooldown, to stop people being jerks
playsound(src.loc, "sound/misc/caw.ogg", 50, 1)
cooldown = world.time
+21 -19
View File
@@ -50,26 +50,28 @@
toggle()
/obj/item/clothing/head/welding/proc/toggle()
set src in usr
if(up)
up = !up
flags |= (HEADCOVERSEYES | HEADCOVERSMOUTH)
flags_inv |= (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
icon_state = initial(icon_state)
to_chat(usr, "You flip the [src] down to protect your eyes.")
flash_protect = 2
tint = 2
else
up = !up
flags &= ~(HEADCOVERSEYES | HEADCOVERSMOUTH)
flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
icon_state = "[initial(icon_state)]up"
to_chat(usr, "You push the [src] up out of your face.")
flash_protect = 0
tint = 0
usr.update_inv_head() //so our mob-overlays update
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
if(usr.canmove && !usr.stat && !usr.restrained())
if(src.up)
src.up = !src.up
src.flags |= (HEADCOVERSEYES | HEADCOVERSMOUTH)
flags_inv |= (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
icon_state = initial(icon_state)
to_chat(usr, "You flip the [src] down to protect your eyes.")
flash_protect = 2
tint = 2
else
src.up = !src.up
src.flags &= ~(HEADCOVERSEYES | HEADCOVERSMOUTH)
flags_inv &= ~(HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
icon_state = "[initial(icon_state)]up"
to_chat(usr, "You push the [src] up out of your face.")
flash_protect = 0
tint = 0
usr.update_inv_head() //so our mob-overlays update
/*
+23 -38
View File
@@ -34,30 +34,28 @@
/obj/item/clothing/mask/gas/welding/attack_self()
toggle()
/obj/item/clothing/mask/gas/welding/proc/toggle()
if(up)
up = !src.up
flags |= (MASKCOVERSEYES)
flags_inv |= (HIDEEYES)
icon_state = initial(icon_state)
to_chat(usr, "You flip the [src] down to protect your eyes.")
flash_protect = 2
tint = 2
else
up = !up
flags &= ~(MASKCOVERSEYES)
flags_inv &= ~(HIDEEYES)
icon_state = "[initial(icon_state)]up"
to_chat(usr, "You push the [src] up out of your face.")
flash_protect = 0
tint = 0
usr.update_inv_wear_mask() //so our mob-overlays update
/obj/item/clothing/mask/gas/welding/verb/toggle()
set category = "Object"
set name = "Adjust welding mask"
set src in usr
if(usr.canmove && !usr.stat && !usr.restrained())
if(src.up)
src.up = !src.up
src.flags |= (MASKCOVERSEYES)
flags_inv |= (HIDEEYES)
icon_state = initial(icon_state)
to_chat(usr, "You flip the [src] down to protect your eyes.")
flash_protect = 2
tint = 2
else
src.up = !src.up
src.flags &= ~(MASKCOVERSEYES)
flags_inv &= ~(HIDEEYES)
icon_state = "[initial(icon_state)]up"
to_chat(usr, "You push the [src] up out of your face.")
flash_protect = 0
tint = 0
usr.update_inv_wear_mask() //so our mob-overlays update
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
//Bane gas mask
/obj/item/clothing/mask/banemask
@@ -171,14 +169,7 @@
/obj/item/clothing/mask/gas/owl_mask/attack_self()
hoot()
/obj/item/clothing/mask/gas/owl_mask/verb/hoot()
set category = "Object"
set name = "Hoot"
set src in usr
if(!istype(usr, /mob/living)) return
if(usr.stat) return
/obj/item/clothing/mask/gas/owl_mask/proc/hoot()
if(cooldown < world.time - 35) // A cooldown, to stop people being jerks
playsound(src.loc, "sound/misc/hoot.ogg", 50, 1)
cooldown = world.time
@@ -270,13 +261,7 @@
else
return
/obj/item/clothing/mask/gas/sechailer/verb/halt()
set category = "Object"
set name = "HALT"
set src in usr
if(!istype(usr, /mob/living)) return
if(usr.stat) return
/obj/item/clothing/mask/gas/sechailer/proc/halt()
var/phrase = 0 //selects which phrase to use
var/phrase_text = null
var/phrase_sound = null
+3
View File
@@ -22,6 +22,9 @@
to_chat(user, "You [magpulse ? "enable" : "disable"] the mag-pulse traction system.")
user.update_inv_shoes() //so our mob-overlays update
user.update_gravity(user.mob_has_gravity())
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/clothing/shoes/magboots/negates_gravity()
return flags & NOSLIP
+3 -1
View File
@@ -250,7 +250,6 @@
unacidable = 1
hit_reaction_chance = 50
/obj/item/clothing/suit/armor/reactive/attack_self(mob/user)
active = !(active)
if(active)
@@ -263,6 +262,9 @@
item_state = "reactiveoff"
add_fingerprint(user)
user.update_inv_wear_suit()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/clothing/suit/armor/reactive/emp_act(severity)
active = 0
-11
View File
@@ -7,7 +7,6 @@
/obj/item/clothing/suit/hooded/New()
MakeHood()
verbs -= /obj/item/clothing/suit/verb/openjacket //you can't unbutton those, deal with it
..()
/obj/item/clothing/suit/hooded/Destroy()
@@ -47,16 +46,6 @@
..()
RemoveHood()
/obj/item/clothing/suit/hooded/verb/Hooderize(var/mob/user)
set name = "Adjust the hood"
set category = "Object"
set src in usr
if(!isliving(usr))
return
if(usr.stat)
return
ToggleHood()
/obj/item/clothing/suit/hooded/proc/ToggleHood()
if(!suit_adjusted)
if(ishuman(loc))
@@ -800,6 +800,9 @@
icon_state = initial(icon_state)
item_state = initial(item_state)
usr.update_inv_wear_suit()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/clothing/suit/lordadmiral
name = "Lord Admiral's Coat"
+15 -28
View File
@@ -495,22 +495,21 @@
/obj/item/clothing/head/fluff/chronx/ui_action_click()
adjust()
/obj/item/clothing/head/fluff/chronx/verb/adjust()
set name = "Transform Hood"
set category = "Object"
set src in usr
if(isliving(usr) && !usr.incapacitated())
if(adjusted)
icon_state = initial(icon_state)
item_state = initial(item_state)
to_chat(usr, "You untransform \the [src].")
adjusted = 0
else
icon_state += "_open"
item_state += "_open"
to_chat(usr, "You transform \the [src].")
adjusted = 1
usr.update_inv_head()
/obj/item/clothing/head/fluff/chronx/proc/adjust()
if(adjusted)
icon_state = initial(icon_state)
item_state = initial(item_state)
to_chat(usr, "You untransform \the [src].")
adjusted = 0
else
icon_state += "_open"
item_state += "_open"
to_chat(usr, "You transform \the [src].")
adjusted = 1
usr.update_inv_head()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/clothing/suit/chaplain_hoodie/fluff/chronx //chronx100: Hughe O'Splash
name = "Cthulhu's Robes"
@@ -523,18 +522,6 @@
adjust_flavour = "untransform"
ignore_suitadjust = 0
/obj/item/clothing/suit/chaplain_hoodie/fluff/chronx/New()
..()
verbs -= /obj/item/clothing/suit/verb/openjacket
/obj/item/clothing/suit/chaplain_hoodie/fluff/chronx/verb/adjust()
set name = "Transform Robes"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living))
return
adjustsuit(usr)
/obj/item/clothing/shoes/black/fluff/chronx //chronx100: Hughe O'Splash
name = "Cthulhu's Boots"
desc = "Boots worn by the worshipers of Cthulhu. You see a name inscribed in blood on the inside: Hughe O'Splash"