mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
[MIRROR] some istype to macros (#9802)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
73486c399b
commit
ed79946ade
@@ -56,7 +56,7 @@
|
||||
data["path_name"] = M.name
|
||||
data["desc"] = M.desc
|
||||
data["flavor_text"] = M.flavor_text
|
||||
if(istype(M, /mob/living))
|
||||
if(isliving(M))
|
||||
var/mob/living/L = M
|
||||
|
||||
// AI Stuff
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
data["max_health"] = L.maxHealth
|
||||
data["health"] = L.health
|
||||
if(istype(L, /mob/living/simple_mob))
|
||||
if(isanimal(L))
|
||||
var/mob/living/simple_mob/S = L
|
||||
data["melee_damage_lower"] = S.melee_damage_lower ? S.melee_damage_lower : 0
|
||||
data["melee_damage_upper"] = S.melee_damage_upper ? S.melee_damage_upper : 0
|
||||
@@ -142,13 +142,13 @@
|
||||
M.name = sanitize(name)
|
||||
M.desc = sanitize(params["desc"])
|
||||
M.flavor_text = sanitize(params["flavor_text"])
|
||||
if(istype(M, /mob/living))
|
||||
if(isliving(M))
|
||||
var/mob/living/L = M
|
||||
if(isnum(params["max_health"]))
|
||||
L.maxHealth = params["max_health"]
|
||||
if(isnum(params["health"]))
|
||||
L.health = params["health"]
|
||||
if(istype(M, /mob/living/simple_mob))
|
||||
if(isanimal(M))
|
||||
var/mob/living/simple_mob/S = L
|
||||
if(isnum(params["melee_damage_lower"]))
|
||||
S.melee_damage_lower = params["melee_damage_lower"]
|
||||
|
||||
Reference in New Issue
Block a user