Places advancedtoolchecks and fixes two-handed weapons for simple_mobs

Modernizes code to today's standards.

Also makes it so that simple_mobs that have hands can use two handed weapons and guns correctly.

Bonus of making it so scugs can now mine and put ointment and bruise packs on.
This commit is contained in:
C.L
2022-07-24 21:06:42 -04:00
parent 93d17d7495
commit d2778bb97f
8 changed files with 13 additions and 8 deletions
+4
View File
@@ -159,6 +159,10 @@
var/obj/item/organ/external/hand = H.organs_by_name[check_hand]
if(istype(hand) && hand.is_usable())
return TRUE
var/mob/living/simple_mob/S = M
if(istype(S) && S.has_hands) //Are they a mob? And do they have hands?
return TRUE
return FALSE
@@ -23,7 +23,7 @@
/obj/item/device/analyzer/attack_self(mob/user as mob)
if (user.stat)
return
if (!(ishuman(user) || ticker) && ticker.mode.name != "monkey")
if (!user.IsAdvancedToolUser())
to_chat(usr, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
@@ -41,7 +41,7 @@
dat += "Body Temperature: ???"
user.show_message("<span class='notice'>[dat]</span>", 1)
return
if (!(ishuman(user) || ticker) && ticker.mode.name != "monkey")
if (!user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
@@ -30,7 +30,7 @@
/obj/item/device/mass_spectrometer/attack_self(mob/user as mob)
if (user.stat)
return
if (!(ishuman(user) || ticker) && ticker.mode.name != "monkey")
if (!user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(reagents.total_volume)
+2 -3
View File
@@ -20,8 +20,7 @@
to_chat(user, "<span class='warning'>\The [src] cannot be applied to [M]!</span>")
return 1
if ( ! (istype(user, /mob/living/carbon/human) || \
istype(user, /mob/living/silicon)) )
if (!M.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return 1
@@ -129,7 +128,7 @@
if(used >= available)
to_chat(user, "<span class='warning'>You run out of [src]!</span>")
break
if (W.current_stage <= W.max_bleeding_stage)
user.visible_message("<b>\The [user]</b> bandages \a [W.desc] on [M]'s [affecting.name].", \
"<span class='notice'>You bandage \a [W.desc] on [M]'s [affecting.name].</span>" )
+1 -1
View File
@@ -19,7 +19,7 @@
user.setClickCooldown(user.get_attack_speed(src))
user.do_attack_animation(M)
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
if (!user.IsAdvancedToolUser())
to_chat(user, "<span class='danger'>You don't have the dexterity to do this!</span>")
return