Grab movespeed modifier (#47728)

* Migrates grab move delay to a movemod

Doesn't work until all grab state changes are hooked in

* Replaces grab_state sets with proc

`\bgrab_state\s*?=\s*?(\w+)` => `setGrabState($1)`
Check over the results, this will catch a couple false positives

* Catches a missed increment and fixes a bug
This commit is contained in:
Emmett Gaines
2019-11-13 06:30:28 -05:00
committed by Rob Bailey
parent 6ee01f2977
commit d8d1abadd1
8 changed files with 23 additions and 10 deletions

View File

@@ -128,7 +128,7 @@
D.grabbedby(A, 1)
if(old_grab_state == GRAB_PASSIVE)
D.drop_all_held_items()
A.grab_state = GRAB_AGGRESSIVE //Instant agressive grab if on grab intent
A.setGrabState(GRAB_AGGRESSIVE) //Instant agressive grab if on grab intent
log_combat(A, D, "grabbed", addition="aggressively")
D.visible_message("<span class='warning'>[A] violently grabs [D]!</span>", \
"<span class='userdanger'>You're grabbed violently by [A]!</span>", "<span class='hear'>You hear sounds of aggressive fondling!</span>", COMBAT_MESSAGE_RANGE, A)
@@ -201,7 +201,7 @@
D.SetSleeping(400)
restraining = FALSE
if(A.grab_state < GRAB_NECK)
A.grab_state = GRAB_NECK
A.setGrabState(GRAB_NECK)
else
restraining = FALSE
return FALSE

View File

@@ -34,10 +34,10 @@
D.visible_message("<span class='warning'>[A] violently grabs [D]!</span>", \
"<span class='userdanger'>You're violently grabbed by [A]!</span>", "<span class='hear'>You hear sounds of aggressive fondling!</span>", null, A)
to_chat(A, "<span class='danger'>You violently grab [D]!</span>")
A.grab_state = GRAB_AGGRESSIVE //Instant aggressive grab
A.setGrabState(GRAB_AGGRESSIVE) //Instant aggressive grab
else
log_combat(A, D, "grabbed", addition="passively")
A.grab_state = GRAB_PASSIVE
A.setGrabState(GRAB_PASSIVE)
if(4)
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
atk_verb = "headbutt"

View File

@@ -120,7 +120,7 @@
D.grabbedby(A, 1)
if(old_grab_state == GRAB_PASSIVE)
D.drop_all_held_items()
A.grab_state = GRAB_AGGRESSIVE //Instant agressive grab if on grab intent
A.setGrabState(GRAB_AGGRESSIVE) //Instant agressive grab if on grab intent
log_combat(A, D, "grabbed", addition="aggressively")
D.visible_message("<span class='warning'>[A] violently grabs [D]!</span>", \
"<span class='userdanger'>You're violently grabbed by [A]!</span>", "<span class='hear'>You hear aggressive shuffling!</span>", null, A)