Vast array of changes to replace mutantrace with species datum

This commit is contained in:
Zuhayr
2013-08-03 15:08:54 -07:00
parent 11621e3f8c
commit b875ff021b
16 changed files with 179 additions and 180 deletions

View File

@@ -880,6 +880,7 @@
#include "code\modules\mob\living\carbon\carbon_defines.dm"
#include "code\modules\mob\living\carbon\give.dm"
#include "code\modules\mob\living\carbon\shock.dm"
#include "code\modules\mob\living\carbon\species.dm"
#include "code\modules\mob\living\carbon\alien\alien.dm"
#include "code\modules\mob\living\carbon\alien\death.dm"
#include "code\modules\mob\living\carbon\alien\login.dm"
@@ -934,7 +935,6 @@
#include "code\modules\mob\living\carbon\human\life.dm"
#include "code\modules\mob\living\carbon\human\login.dm"
#include "code\modules\mob\living\carbon\human\say.dm"
#include "code\modules\mob\living\carbon\human\species.dm"
#include "code\modules\mob\living\carbon\human\update_icons.dm"
#include "code\modules\mob\living\carbon\human\whisper.dm"
#include "code\modules\mob\living\carbon\metroid\death.dm"

View File

@@ -116,7 +116,7 @@
//Clonepod
//Start growing a human clone in the pod!
/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/mrace)
/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/datum/species/mrace)
if(mess || attempting)
return 0
var/datum/mind/clonemind = locate(mindref)
@@ -191,13 +191,11 @@
randmutb(H) //Sometimes the clones come out wrong.
H.f_style = "Shaved"
if(mrace == "none") //no more xenos losing ears/tentacles
if(mrace.name != "Human") //no more xenos losing ears/tentacles
H.h_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
if(H.dna)
H.dna.mutantrace = mrace
H.update_mutantrace()
H.update_mutantrace_languages()
H.species = mrace
H.update_mutantrace()
H.suiciding = 0
src.attempting = 0
return 1

View File

@@ -443,10 +443,7 @@
subject.dna.check_integrity()
var/datum/data/record/R = new /datum/data/record( )
if(subject.dna)
R.fields["mrace"] = subject.dna.mutantrace
else
R.fields["mrace"] = null
R.fields["mrace"] = subject.species
R.fields["ckey"] = subject.ckey
R.fields["name"] = subject.real_name
R.fields["id"] = copytext(md5(subject.real_name), 2, 6)

View File

@@ -117,6 +117,7 @@ Growing it to term with nothing injected will grab a ghost from the observers. *
podman.gender = NEUTER
podman.dna = new /datum/dna()
podman.dna.real_name = podman.real_name
podman.set_species(new /datum/species/diona)
podman.dna.mutantrace = "plant"
podman.update_mutantrace()

View File

@@ -513,7 +513,7 @@ client/proc/one_click_antag()
new_vox.age = rand(12,20)
new_vox.dna.ready_dna(new_vox) // Creates DNA.
new_vox.dna.mutantrace = "vox" // Actually makes the vox! How about that.
new_vox.set_species(new /datum/species/vox) // Actually makes the vox! How about that.
new_vox.mind_initialize()
new_vox.mind.assigned_role = "MODE"
new_vox.mind.special_role = "Vox Raider"

View File

@@ -820,22 +820,14 @@
return
/mob/living/carbon/human/get_species()
if(dna)
switch(dna.mutantrace)
if("lizard")
return "Unathi"
if("tajaran")
return "Tajaran"
if("skrell")
return "Skrell"
if("vox")
return "Vox"
if("plant")
return "Mobile vegetation"
if("golem")
return "Animated Construct"
else
return "Human"
if(!species)
set_species()
if(dna && dna.mutantrace == "golem")
return "Animated Construct"
return species.name
/mob/living/carbon/get_species()
if(src.dna)
@@ -848,17 +840,6 @@
else if(src.dna.mutantrace == "vox")
return "vox"
/mob/living/carbon/proc/update_mutantrace_languages()
if(src.dna)
if(src.dna.mutantrace == "lizard")
src.languages += new /datum/language/unathi
else if(src.dna.mutantrace == "skrell")
src.languages += new /datum/language/skrell
else if(src.dna.mutantrace == "tajaran")
src.languages += new /datum/language/tajaran
else if(src.dna.mutantrace == "vox")
src.languages += new /datum/language/vox
/mob/living/carbon/human/proc/play_xylophone()
if(!src.xylophone)
visible_message("\red [src] begins playing his ribcage like a xylophone. It's quite spooky.","\blue You begin to play a spooky refrain on your ribcage.","\red You hear a spooky xylophone melody.")
@@ -1295,4 +1276,4 @@ mob/living/carbon/human/yank_out_object()
update_icons()
return 1
else
return 0
return 0

View File

@@ -103,34 +103,19 @@
if("hurt")
var/attack_verb
if(M.dna)
switch(M.dna.mutantrace)
if("lizard")
attack_verb = "scratch"
if("tajaran")
attack_verb = "scratch"
if("plant")
attack_verb = "slash"
else
attack_verb = "punch"
M.attack_log += text("\[[time_stamp()]\] <font color='red'>[M.species.attack_verb]ed [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [M.species.attack_verb]ed by [M.name] ([M.ckey])</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>[attack_verb]ed [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been [attack_verb]ed by [M.name] ([M.ckey])</font>")
log_attack("<font color='red'>[M.name] ([M.ckey]) [attack_verb]ed [src.name] ([src.ckey])</font>")
log_attack("<font color='red'>[M.name] ([M.ckey]) [M.species.attack_verb]ed [src.name] ([src.ckey])</font>")
var/damage = rand(0, 5)//BS12 EDIT
if(!damage)
switch(attack_verb)
if("slash")
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
if("scratch")
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
if(M.species.attack_verb == "punch")
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
visible_message("\red <B>[M] has attempted to [attack_verb] [src]!</B>")
visible_message("\red <B>[M] has attempted to [M.species.attack_verb] [src]!</B>")
return 0
@@ -140,21 +125,18 @@
if(HULK in M.mutations) damage += 5
switch(attack_verb)
if("slash")
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
if("scratch")
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
else
playsound(loc, "punch", 25, 1, -1)
if(M.species.attack_verb == "punch")
playsound(loc, "punch", 25, 1, -1)
else
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
visible_message("\red <B>[M] has [attack_verb]ed [src]!</B>")
visible_message("\red <B>[M] has [M.species.attack_verb]ed [src]!</B>")
//Rearranged, so claws don't increase weaken chance.
if(damage >= 5 && prob(50))
visible_message("\red <B>[M] has weakened [src]!</B>")
apply_effect(2, WEAKEN, armor_block)
if(attack_verb == "scratch") damage += 5
if(M.species.attack_verb != "punch") damage += 5
apply_damage(damage, BRUTE, affecting, armor_block)

View File

@@ -492,7 +492,7 @@
if( (abs(310.15 - breath.temperature) > 50) && !(COLD_RESISTANCE in mutations)) // Hot air hurts :(
if(status_flags & GODMODE) return 1 //godmode
if(breath.temperature < species.cold_level_1 && dna.mutantrace != "vox") //Vox are resistant to cold.
if(breath.temperature < species.cold_level_1)
if(prob(20))
src << "\red You feel your face freezing and an icicle forming in your lungs!"
else if(breath.temperature > species.heat_level_1)

View File

@@ -220,14 +220,12 @@ proc/get_damage_icon_part(damage_state, body_part)
var/husk_color_mod = rgb(96,88,80)
var/hulk_color_mod = rgb(48,224,40)
//var/plant_color_mod = rgb(144,224,144)
var/necrosis_color_mod = rgb(10,50,0)
var/husk = (HUSK in src.mutations) //100% unnecessary -Agouri //nope, do you really want to iterate through src.mutations repeatedly? -Pete
var/fat = (FAT in src.mutations)
var/hulk = (HULK in src.mutations)
var/skeleton = (SKELETON in src.mutations)
var/plant = (PLANT in src.mutations || (dna && dna.mutantrace == "plant"))
var/g = "m"
if(gender == FEMALE) g = "f"
@@ -240,8 +238,6 @@ proc/get_damage_icon_part(damage_state, body_part)
else if(hulk)
var/list/TONE = ReadRGB(hulk_color_mod)
stand_icon.MapColors(rgb(TONE[1],0,0),rgb(0,TONE[2],0),rgb(0,0,TONE[3]))
//else if(plant)
// stand_icon.ColorTone(plant_color_mod)
var/datum/organ/external/head = get_organ("head")
var/has_head = 0
@@ -269,8 +265,6 @@ proc/get_damage_icon_part(damage_state, body_part)
else if(hulk)
var/list/TONE = ReadRGB(hulk_color_mod)
temp.MapColors(rgb(TONE[1],0,0),rgb(0,TONE[2],0),rgb(0,0,TONE[3]))
//else if(plant)
// temp.ColorTone(plant_color_mod)
//That part makes left and right legs drawn topmost and lowermost when human looks WEST or EAST
//And no change in rendering for other parts (they icon_position is 0, so goes to 'else' part)
@@ -293,7 +287,7 @@ proc/get_damage_icon_part(damage_state, body_part)
stand_icon.Blend(temp, ICON_OVERLAY)
//Skin tone
if(!skeleton && !husk && !hulk && !plant)
if(!skeleton && !husk && !hulk && (species.flags & HAS_SKIN_TONE))
if(s_tone >= 0)
stand_icon.Blend(rgb(s_tone, s_tone, s_tone), ICON_ADD)
else
@@ -309,18 +303,16 @@ proc/get_damage_icon_part(damage_state, body_part)
if(has_head)
//Eyes
if(!skeleton)
var/icon/eyes_s = new/icon('icons/mob/human_face.dmi', "eyes_s")
if(src.get_species()=="Vox")
eyes_s = new/icon('icons/mob/human_face.dmi', "vox_eyes_s")
eyes_s.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
stand_icon.Blend(eyes_s, ICON_OVERLAY)
var/icon/eyes = new/icon('icons/mob/human_face.dmi', species.eyes)
eyes.Blend(rgb(r_eyes, g_eyes, b_eyes), ICON_ADD)
stand_icon.Blend(eyes, ICON_OVERLAY)
//Mouth (lipstick!)
if(lip_style) //skeletons are allowed to wear lipstick no matter what you think, agouri.
stand_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[lip_style]_s"), ICON_OVERLAY)
//Mouth (lipstick!)
if(lip_style && (species && species.flags & HAS_LIPS)) //skeletons are allowed to wear lipstick no matter what you think, agouri.
stand_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[lip_style]_s"), ICON_OVERLAY)
//Underwear
if(underwear >0 && underwear < 12 && (src.dna.mutantrace != "vox" && src.dna.mutantrace != "plant" && src.dna.mutantrace != "kidan"))
if(underwear >0 && underwear < 12 && species.flags & HAS_UNDERWEAR)
if(!fat && !skeleton)
stand_icon.Blend(new /icon('icons/mob/human.dmi', "underwear[underwear]_[g]_s"), ICON_OVERLAY)
@@ -429,58 +421,23 @@ proc/get_damage_icon_part(damage_state, body_part)
var/skeleton = (SKELETON in src.mutations)
if(skeleton)
race_icon = 'icons/mob/human_races/r_skeleton.dmi'
//Icon data is kept in species datums within the mob.
race_icon = 'icons/mob/human_races/r_human.dmi'
deform_icon = 'icons/mob/human_races/r_def_human.dmi'
if(species.icobase)
race_icon = species.icobase
if(species.deform)
deform_icon = species.deform
/*else if(dna)
switch(dna.mutantrace)
if("tajaran")
race_icon = 'icons/mob/human_races/r_tajaran.dmi'
deform_icon = 'icons/mob/human_races/r_def_tajaran.dmi'
if("lizard")
race_icon = 'icons/mob/human_races/r_lizard.dmi'
deform_icon = 'icons/mob/human_races/r_def_lizard.dmi'
if("skrell")
race_icon = 'icons/mob/human_races/r_skrell.dmi'
deform_icon = 'icons/mob/human_races/r_def_skrell.dmi'
if("vox")
race_icon = 'icons/mob/human_races/r_vox.dmi'
deform_icon = 'icons/mob/human_races/r_def_vox.dmi'
if("plant")
race_icon = 'icons/mob/human_races/r_plant.dmi'
deform_icon = 'icons/mob/human_races/r_def_plant.dmi'
else
race_icon = 'icons/mob/human_races/r_human.dmi'
deform_icon = 'icons/mob/human_races/r_def_human.dmi'
else
icon = 'icons/mob/human_races/r_human.dmi' */
//Icon data is kept in species datums within the mob.
race_icon = species.icobase
deform_icon = species.deform
if(dna)
switch(dna.mutantrace)
if("golem","slime","shadow","adamantine")
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l")
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s")
// if("lizard","tajaran","skrell")
// overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[gender]_l")
// overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[gender]_s")
// if("plant")
// if(stat == DEAD) //TODO
// overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace]_d")
// else
// overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l")
// overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s")
else
overlays_lying[MUTANTRACE_LAYER] = null
overlays_standing[MUTANTRACE_LAYER] = null
if(!dna || !(dna.mutantrace in list("golem","metroid")))
update_body(0)
update_hair(0)
if(update_icons) update_icons()
@@ -817,15 +774,11 @@ proc/get_damage_icon_part(damage_state, body_part)
/mob/living/carbon/human/proc/update_tail_showing(var/update_icons=1)
overlays_lying[TAIL_LAYER] = null
overlays_standing[TAIL_LAYER] = null
var/cur_species = get_species()
if( cur_species == "Tajaran")
if(species.tail && species.flags & HAS_TAIL)
if(!wear_suit || !(wear_suit.flags_inv & HIDEJUMPSUIT) && !istype(wear_suit, /obj/item/clothing/suit/space))
overlays_lying[TAIL_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "tajtail_l")
overlays_standing[TAIL_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "tajtail_s")
else if( cur_species == "Unathi")
if(!wear_suit || !(wear_suit.flags_inv & HIDEJUMPSUIT) && !istype(wear_suit, /obj/item/clothing/suit/space))
overlays_lying[TAIL_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "sogtail_l")
overlays_standing[TAIL_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "sogtail_s")
overlays_lying[TAIL_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_l")
overlays_standing[TAIL_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_s")
if(update_icons)
update_icons()

View File

@@ -0,0 +1,100 @@
#define NO_EAT 1
#define NO_BREATHE 2
#define NO_SLEEP 4
#define NO_SHOCK 8
#define NO_SCAN 16
#define NON_GENDERED 32
#define REQUIRE_LIGHT 64
#define WHITELISTED 128
#define HAS_SKIN_TONE 256
#define HAS_LIPS 512
#define HAS_UNDERWEAR 1024
#define HAS_TAIL 2048
#define IS_PLANT 4096
/*
Datum-based species. Should make for much cleaner and easier to maintain mutantrace code.
*/
/datum/species
var/name // Species name.
var/icobase = 'icons/mob/human_races/r_human.dmi' // Normal icon set.
var/deform = 'icons/mob/human_races/r_def_human.dmi' // Mutated icon set.
var/eyes = "eyes_s" // Icon for eyes.
var/tail // Name of tail image in species effects icon file.
var/primitive // Lesser form, if any (ie. monkey for humans)
var/datum/language/language // Default racial language, if any.
var/attack_verb = "punch" // Empty hand hurt intent verb.
var/breath_type // Non-oxygen gas breathed, if any.
var/cold_level_1 = 260 // Cold damage level 1 below this point.
var/cold_level_2 = 200 // Cold damage level 2 below this point.
var/cold_level_3 = 120 // Cold damage level 3 below this point.
var/heat_level_1 = 360 // Heat damage level 1 above this point.
var/heat_level_2 = 400 // Heat damage level 2 above this point.
var/heat_level_3 = 1000 // Heat damage level 2 above this point.
var/hazard_high_pressure = 550 // Dangerously high pressure.
var/warning_high_pressure = 325 // High pressure warning.
var/hazard_low_pressure = 50 // Dangerously low pressure.
var/warning_low_pressure = 20 // Low pressure warning.
var/brute_resist // Physical damage reduction.
var/burn_resist // Burn damage reduction.
var/flags = 0 // Various specific features.
/datum/species/human
name = "Human"
flags = HAS_LIPS | HAS_UNDERWEAR
/datum/species/unathi
name = "Unathi"
icobase = 'icons/mob/human_races/r_lizard.dmi'
deform = 'icons/mob/human_races/r_def_lizard.dmi'
language = new /datum/language/unathi
tail = "sogtail"
attack_verb = "scratch"
flags = WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | HAS_TAIL
/datum/species/tajaran
name = "Tajara"
icobase = 'icons/mob/human_races/r_tajaran.dmi'
deform = 'icons/mob/human_races/r_def_tajaran.dmi'
language = new /datum/language/tajaran
tail = "tajtail"
attack_verb = "scratch"
flags = WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | HAS_TAIL
/datum/species/skrell
name = "Skrell"
icobase = 'icons/mob/human_races/r_skrell.dmi'
deform = 'icons/mob/human_races/r_def_skrell.dmi'
language = new /datum/language/skrell
flags = WHITELISTED | HAS_LIPS | HAS_UNDERWEAR
/datum/species/vox
name = "Vox"
icobase = 'icons/mob/human_races/r_vox.dmi'
deform = 'icons/mob/human_races/r_def_vox.dmi'
language = new /datum/language/vox
eyes = "vox_eyes_s"
breath_type = "nitrogen"
flags = NO_SCAN
/datum/species/diona
name = "Diona"
icobase = 'icons/mob/human_races/r_plant.dmi'
deform = 'icons/mob/human_races/r_def_plant.dmi'
attack_verb = "slash"
flags = NO_EAT | NO_BREATHE | REQUIRE_LIGHT | NON_GENDERED | NO_SCAN | IS_PLANT

View File

@@ -101,7 +101,7 @@
M << "\blue Like lead slabs crashing into the ocean, alien thoughts drop into your mind: [text]"
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.dna.mutantrace == "vox")
if(H.species.name == "Vox")
return
H << "\red Your nose begins to bleed..."
H.drip(1)

View File

@@ -349,17 +349,14 @@
if(client.prefs.species == "Tajaran") //This is like the worst, but it works, so meh. - Erthilo
if(is_alien_whitelisted(src, "Tajaran") || !config.usealienwhitelist)
new_character.dna.mutantrace = "tajaran"
new_character.set_species(new /datum/species/tajaran)
new_character.languages += new /datum/language/tajaran
if(client.prefs.species == "Unathi")
if(is_alien_whitelisted(src, "Soghun") || !config.usealienwhitelist)
new_character.dna.mutantrace = "lizard"
new_character.set_species(new /datum/species/unathi)
new_character.languages += new /datum/language/unathi
if(client.prefs.species == "Skrell")
if(is_alien_whitelisted(src, "Skrell") || !config.usealienwhitelist)
new_character.dna.mutantrace = "skrell"
new_character.set_species(new /datum/species/skrell)
new_character.languages += new /datum/language/skrell

View File

@@ -738,20 +738,7 @@ obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
//Setting base icon for this mob's race
if(ishuman(H) && H.dna)
var/icon/base
switch(H.dna.mutantrace)
if("tajaran")
base = new('icons/mob/human_races/r_tajaran.dmi')
if("lizard")
base = new('icons/mob/human_races/r_lizard.dmi')
if("skrell")
base = new('icons/mob/human_races/r_skrell.dmi')
if("vox")
base = new('icons/mob/human_races/r_vox.dmi')
else
base = new('icons/mob/human_races/r_human.dmi')
var/icon/base = new H.species.icobase
if(base)
icon = base.MakeLying()
else

View File

@@ -73,8 +73,8 @@
A.randomize_appearance_for(new_mob)
var/mob/living/carbon/human/H = new_mob
if(H.dna)
H.dna.mutantrace = pick("lizard","tajaran","skrell","golem","slime","plant","vox",4;"")
var/newspecies = pick(typesof(/datum/species)-/datum/species)
H.set_species(new newspecies)
else
return

View File

@@ -80,26 +80,28 @@
on_hit(var/atom/target, var/blocked = 0)
var/mob/living/M = target
// if(ishuman(target) && M.dna && M.dna.mutantrace == "plant") //Plantmen possibly get mutated and damaged by the rays.
if(ishuman(target) && (PLANT in M.mutations)) //Plantmen possibly get mutated and damaged by the rays.
if(prob(15))
M.apply_effect((rand(30,80)),IRRADIATE)
M.Weaken(5)
for (var/mob/V in viewers(src))
V.show_message("\red [M] writhes in pain as \his vacuoles boil.", 3, "\red You hear the crunching of leaves.", 2)
if(prob(35))
// for (var/mob/V in viewers(src)) //Public messages commented out to prevent possible metaish genetics experimentation and stuff. - Cheridan
// V.show_message("\red [M] is mutated by the radiation beam.", 3, "\red You hear the snapping of twigs.", 2)
if(prob(80))
randmutb(M)
domutcheck(M,null)
if(ishuman(target))
var/mob/living/carbon/human/H = M
if((H.species.flags & IS_PLANT) && (M.nutrition < 500))
if(prob(15))
M.apply_effect((rand(30,80)),IRRADIATE)
M.Weaken(5)
for (var/mob/V in viewers(src))
V.show_message("\red [M] writhes in pain as \his vacuoles boil.", 3, "\red You hear the crunching of leaves.", 2)
if(prob(35))
// for (var/mob/V in viewers(src)) //Public messages commented out to prevent possible metaish genetics experimentation and stuff. - Cheridan
// V.show_message("\red [M] is mutated by the radiation beam.", 3, "\red You hear the snapping of twigs.", 2)
if(prob(80))
randmutb(M)
domutcheck(M,null)
else
randmutg(M)
domutcheck(M,null)
else
randmutg(M)
domutcheck(M,null)
else
M.adjustFireLoss(rand(5,15))
M.show_message("\red The radiation beam singes you!")
// for (var/mob/V in viewers(src))
// V.show_message("\red [M] is singed by the radiation beam.", 3, "\red You hear the crackle of burning leaves.", 2)
M.adjustFireLoss(rand(5,15))
M.show_message("\red The radiation beam singes you!")
// for (var/mob/V in viewers(src))
// V.show_message("\red [M] is singed by the radiation beam.", 3, "\red You hear the crackle of burning leaves.", 2)
else if(istype(target, /mob/living/carbon/))
// for (var/mob/V in viewers(src))
// V.show_message("The radiation beam dissipates harmlessly through [M]", 3)
@@ -118,8 +120,9 @@
on_hit(var/atom/target, var/blocked = 0)
var/mob/M = target
// if(ishuman(target) && M.dna && M.dna.mutantrace == "plant") //These rays make plantmen fat.
if(ishuman(target) && (PLANT in M.mutations)) //These rays make plantmen fat.
if(M.nutrition < 500) //sanity check
if(ishuman(target)) //These rays make plantmen fat.
var/mob/living/carbon/human/H = M
if((H.species.flags & IS_PLANT) && (M.nutrition < 500))
M.nutrition += 30
else if (istype(target, /mob/living/carbon/))
M.show_message("\blue The radiation beam dissipates harmlessly through your body.")

View File

@@ -1257,7 +1257,7 @@ datum
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.dna)
if(H.dna.mutantrace == "plant") //plantmen take a LOT of damage
if(H.species.flags & IS_PLANT) //plantmen take a LOT of damage
H.adjustToxLoss(10)
plasma
@@ -3463,4 +3463,4 @@ datum
else if(data >= 115 && prob(33))
M.confused = max(M.confused+15,15)
..()
return
return