mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +01:00
Ports weapons cleaving and reaching features from polaris (#3969)
-axes, chainswords and longswords can now cleave, hitting targets around the user, ported from polaris -added support for melee weapons that can hit targets two titles away, as well ported from polaris
This commit is contained in:
@@ -125,7 +125,7 @@
|
||||
// A is a turf or is on a turf, or in something on a turf (pen in a box); but not something in something on a turf (pen in a box in a backpack)
|
||||
sdepth = A.storage_depth_turf()
|
||||
if(isturf(A) || isturf(A.loc) || (sdepth != -1 && sdepth <= 1))
|
||||
if(A.Adjacent(src)) // see adjacent.dm
|
||||
if(A.Adjacent(src) || (W && W.attack_can_reach(src, A, W.reach)) ) // see adjacent.dm
|
||||
setMoveCooldown(5)
|
||||
|
||||
if(W)
|
||||
|
||||
@@ -23,8 +23,13 @@ avoid code duplication. This includes items that may sometimes act as a standard
|
||||
/obj/item/proc/attack_self(mob/user)
|
||||
return
|
||||
|
||||
// Called at the start of resolve_attackby(), before the actual attack.
|
||||
/obj/item/proc/pre_attack(atom/a, mob/user)
|
||||
return
|
||||
|
||||
//I would prefer to rename this to attack(), but that would involve touching hundreds of files.
|
||||
/obj/item/proc/resolve_attackby(atom/A, mob/user)
|
||||
pre_attack(A, user)
|
||||
add_fingerprint(user)
|
||||
return A.attackby(src, user)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user