mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 04:57:47 +01:00
Twohanded weapons are now more generalized. You can make any weapon twohanded just by setting twohanded = 1. Also fixed the throwing of twohanded weapons as well as dropping. The offhand thing should no longer cause problems. Report any bugs.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1615 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -159,6 +159,38 @@
|
||||
src.loc = P
|
||||
O.amount -= 1
|
||||
|
||||
/obj/item/attack_self(mob/user as mob)
|
||||
..()
|
||||
if(twohanded)
|
||||
if(wielded) //Trying to unwield it
|
||||
wielded = 0
|
||||
force = force_unwielded
|
||||
src.name = "[initial(name)] (Unwielded)"
|
||||
src.update_icon() //If needed by the particular item
|
||||
user << "\blue You are now carrying the [initial(name)] with one hand."
|
||||
|
||||
if(istype(user.get_inactive_hand(),/obj/item/weapon/offhand))
|
||||
del user.get_inactive_hand()
|
||||
return
|
||||
else //Trying to wield it
|
||||
if(user.get_inactive_hand())
|
||||
user << "\red You need your other hand to be empty"
|
||||
return
|
||||
wielded = 1
|
||||
force = force_wielded
|
||||
src.name = "[initial(name)] (Wielded)"
|
||||
src.update_icon() //If needed by the particular item
|
||||
user << "\blue You grab the [initial(name)] with both hands, It is ready for use."
|
||||
|
||||
var/obj/item/weapon/offhand/O = new /obj/item/weapon/offhand(user) ////Let's reserve his other hand~
|
||||
O.name = text("[initial(src.name)] - Offhand")
|
||||
O.desc = "Your second grip on the [initial(src.name)]"
|
||||
if(user.hand)
|
||||
user.r_hand = O ///Place dat offhand in the opposite hand
|
||||
else
|
||||
user.l_hand = O
|
||||
O.layer = 20
|
||||
return
|
||||
|
||||
/obj/item/proc/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
|
||||
|
||||
@@ -340,7 +372,6 @@
|
||||
src.add_fingerprint(user)
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/proc/eyestab(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
@@ -25,45 +25,4 @@
|
||||
//welp, all is good, now to see if he's trying do twohandedly wield it or unwield it
|
||||
|
||||
|
||||
if(src.wielded == 0) //He's trying to wield it!!
|
||||
|
||||
if( user.hand ) ///User hand appears to be 1 if you're using the Left one and 0 if you're using the right? I don't even KNOW
|
||||
if(user.r_hand != null)
|
||||
user << "\red You need your right hand to be empty"
|
||||
return
|
||||
else
|
||||
if(user.l_hand != null)
|
||||
user << "\red You need your left hand to be empty"
|
||||
return
|
||||
user << "\blue You grab the hilt of the axe and raise it to your torso, readying it for use."
|
||||
src.wielded = !src.wielded
|
||||
src.force = 30
|
||||
src.name = "Fire axe (Wielded)"
|
||||
src.update_icon()
|
||||
|
||||
var/obj/item/weapon/offhand/O = new /obj/item/weapon/offhand(user) ////Let's reserve his other hand~
|
||||
O.name = text("[]-Offhand",src.name)
|
||||
O.desc = "Your second grip on the Fire axe"
|
||||
|
||||
if(user.hand)
|
||||
user.r_hand = O ///Place dat offhand in the opposite hand
|
||||
else
|
||||
user.l_hand = O
|
||||
O.layer = 20
|
||||
return
|
||||
|
||||
|
||||
if(src.wielded == 1) //Guy's bored of robusting and now wants to carry it
|
||||
src.wielded = !src.wielded
|
||||
src.force = 5
|
||||
src.name = "Fire axe (Unwielded)"
|
||||
src.update_icon()
|
||||
user << "\blue You are now carrying the axe with one hand."
|
||||
|
||||
if(user.hand) //Now let's free up his other hand
|
||||
var/obj/item/weapon/offhand/O = user.r_hand
|
||||
del O
|
||||
else
|
||||
var/obj/item/weapon/offhand/O = user.l_hand
|
||||
del O
|
||||
return
|
||||
..()
|
||||
Reference in New Issue
Block a user