Makes anomalies deadlier (#18836)

* Makes anomalies deadlier

* Apply suggestions from code review

Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>

* undodgeable to dodgeable

* requested changes

Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
Qwertytoforty
2022-08-21 16:32:12 +01:00
committed by GitHub
co-authored by Sirryan2002
parent d6e24aa850
commit afbae8af1b
6 changed files with 30 additions and 9 deletions
+4 -1
View File
@@ -67,6 +67,8 @@ SUBSYSTEM_DEF(throwing)
var/paused = FALSE
var/delayed_time = 0
var/last_move = 0
///When this variable is false, non dense mobs will be hit by a thrown item. useful for things that you dont want to be cheesed by crawling, EG. gravitational anomalies
var/dodgeable = TRUE
/datum/thrownthing/proc/tick()
var/atom/movable/AM = thrownthing
@@ -90,6 +92,7 @@ SUBSYSTEM_DEF(throwing)
var/tilestomove = CEILING(min(((((world.time + world.tick_lag) - start_time + delayed_time) * speed) - (dist_travelled ? dist_travelled : -1)), speed * MAX_TICKS_TO_MAKE_UP) * (world.tick_lag * SSthrowing.wait), 1)
while(tilestomove-- > 0)
if((dist_travelled >= maxrange || AM.loc == target_turf) && has_gravity(AM, AM.loc))
hitcheck() //Just to be sure
finalize()
return
@@ -148,6 +151,6 @@ SUBSYSTEM_DEF(throwing)
var/atom/movable/AM = thing
if(AM == thrownthing || AM == thrower)
continue
if(AM.density && !(AM.pass_flags & LETPASSTHROW) && !(AM.flags & ON_BORDER))
if((AM.density || isliving(AM) && !dodgeable) && !(AM.pass_flags & LETPASSTHROW) && !(AM.flags & ON_BORDER))
finalize(hit = TRUE, target = AM)
return TRUE