mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
Meteor turfs typecache (#78152)
## About The Pull Request When looking why meteors randomly explode sometimes, the check has it taking damage and exploding from turfs that it should just be flying over. This creates a typecache of turfs the meteor shouldn't deplete health from flying over. Most commonly openspace and asteroid baseturf. ## Why It's Good For The Game Meteor is more likely to explode when it actually hits something vs flying into an openspace tile. ## Changelog 🆑 LT3 fix: Meteors no longer take damage from crossing certain unoccupied turfs /🆑 --------- Co-authored-by: san7890 <the@san7890.com>
This commit is contained in:
@@ -64,6 +64,15 @@ GLOBAL_LIST_INIT(turfs_openspace, typecacheof(list(
|
||||
|
||||
#define iscliffturf(A) (istype(A, /turf/open/cliff))
|
||||
|
||||
GLOBAL_LIST_INIT(turfs_pass_meteor, typecacheof(list(
|
||||
/turf/closed/mineral,
|
||||
/turf/open/misc/asteroid,
|
||||
/turf/open/openspace,
|
||||
/turf/open/space
|
||||
)))
|
||||
|
||||
#define ispassmeteorturf(A) (is_type_in_typecache(A, GLOB.turfs_pass_meteor))
|
||||
|
||||
//Mobs
|
||||
#define isliving(A) (istype(A, /mob/living))
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
var/turf/T = get_turf(loc)
|
||||
ram_turf(T)
|
||||
|
||||
if(prob(10) && !isspaceturf(T))//randomly takes a 'hit' from ramming
|
||||
if(prob(10) && !ispassmeteorturf(T))//randomly takes a 'hit' from ramming
|
||||
get_hit()
|
||||
|
||||
if(z != z_original || loc == get_turf(dest))
|
||||
|
||||
Reference in New Issue
Block a user