From 62daecbf1e99c301efc5fe90f9ec6441d411dc48 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Thu, 19 Jul 2018 05:15:58 -0400 Subject: [PATCH] minor cleanup --- .../living/carbon/human/species/abductor.dm | 1 - .../mob/living/carbon/human/species/golem.dm | 1 - .../mob/living/carbon/human/species/monkey.dm | 1 - .../mob/living/carbon/human/species/shadow.dm | 1 - .../living/carbon/human/species/skeleton.dm | 2 - .../living/carbon/human/species/species.dm | 64 ++++++++----------- .../living/carbon/human/species/station.dm | 24 ------- 7 files changed, 28 insertions(+), 66 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/abductor.dm b/code/modules/mob/living/carbon/human/species/abductor.dm index 16fcd34d315..d50be2e73e8 100644 --- a/code/modules/mob/living/carbon/human/species/abductor.dm +++ b/code/modules/mob/living/carbon/human/species/abductor.dm @@ -3,7 +3,6 @@ name_plural = "Abductors" icobase = 'icons/mob/human_races/r_abductor.dmi' deform = 'icons/mob/human_races/r_abductor.dmi' - path = /mob/living/carbon/human/abductor language = "Abductor Mindlink" default_language = "Abductor Mindlink" eyes = "blank_eyes" diff --git a/code/modules/mob/living/carbon/human/species/golem.dm b/code/modules/mob/living/carbon/human/species/golem.dm index 74f3e97d879..772a5ca5ba6 100644 --- a/code/modules/mob/living/carbon/human/species/golem.dm +++ b/code/modules/mob/living/carbon/human/species/golem.dm @@ -5,7 +5,6 @@ icobase = 'icons/mob/human_races/r_golem.dmi' deform = 'icons/mob/human_races/r_golem.dmi' - default_language = "Galactic Common" species_traits = list(NO_BREATHE, NO_BLOOD, RADIMMUNE, VIRUSIMMUNE, NOGUNS) oxy_mod = 0 diff --git a/code/modules/mob/living/carbon/human/species/monkey.dm b/code/modules/mob/living/carbon/human/species/monkey.dm index eb766633b97..4128024a8c9 100644 --- a/code/modules/mob/living/carbon/human/species/monkey.dm +++ b/code/modules/mob/living/carbon/human/species/monkey.dm @@ -8,7 +8,6 @@ damage_overlays = 'icons/mob/human_races/masks/dam_monkey.dmi' damage_mask = 'icons/mob/human_races/masks/dam_mask_monkey.dmi' blood_mask = 'icons/mob/human_races/masks/blood_monkey.dmi' - path = /mob/living/carbon/human/monkey language = null default_language = "Chimpanzee" species_traits = list(NO_EXAMINE) diff --git a/code/modules/mob/living/carbon/human/species/shadow.dm b/code/modules/mob/living/carbon/human/species/shadow.dm index 7480d7e3a66..0e8bd2e91e2 100644 --- a/code/modules/mob/living/carbon/human/species/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/shadow.dm @@ -5,7 +5,6 @@ icobase = 'icons/mob/human_races/r_shadow.dmi' deform = 'icons/mob/human_races/r_shadow.dmi' - default_language = "Galactic Common" unarmed_type = /datum/unarmed_attack/claws ignored_by = list(/mob/living/simple_animal/hostile/faithless) diff --git a/code/modules/mob/living/carbon/human/species/skeleton.dm b/code/modules/mob/living/carbon/human/species/skeleton.dm index 572ff91a7d7..8afc35f743a 100644 --- a/code/modules/mob/living/carbon/human/species/skeleton.dm +++ b/code/modules/mob/living/carbon/human/species/skeleton.dm @@ -6,8 +6,6 @@ icobase = 'icons/mob/human_races/r_skeleton.dmi' deform = 'icons/mob/human_races/r_skeleton.dmi' - path = /mob/living/carbon/human/skeleton - default_language = "Galactic Common" blood_color = "#FFFFFF" flesh_color = "#E6E6C6" diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 22becd820a4..6ce91d80ddd 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -1,11 +1,6 @@ -/* - Datum-based species. Should make for much cleaner and easier to maintain mutantrace code. -*/ - /datum/species var/name // Species name. var/name_plural // Pluralized name (since "[name]s" is not always valid) - var/path // Species path 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. @@ -95,6 +90,7 @@ //Used in icon caching. var/race_key = 0 var/icon/icon_template + var/is_small var/show_ssd = 1 var/can_revive_by_healing // Determines whether or not this species can be revived by simply healing them @@ -166,11 +162,11 @@ unarmed = new unarmed_type() -/datum/species/proc/get_random_name(var/gender) +/datum/species/proc/get_random_name(gender) var/datum/language/species_language = all_languages[language] return species_language.get_random_name(gender) -/datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs. +/datum/species/proc/create_organs(mob/living/carbon/human/H) //Handles creation of mob organs. QDEL_LIST(H.internal_organs) QDEL_LIST(H.bodyparts) @@ -263,28 +259,24 @@ . -= 2 return . -/datum/species/proc/handle_post_spawn(var/mob/living/carbon/C) //Handles anything not already covered by basic species assignment. +/datum/species/proc/handle_post_spawn(mob/living/carbon/C) //Handles anything not already covered by basic species assignment. grant_abilities(C) + +/datum/species/proc/updatespeciescolor(mob/living/carbon/human/H) //Handles changing icobase for species that have multiple skin colors. return -/datum/species/proc/updatespeciescolor(var/mob/living/carbon/human/H) //Handles changing icobase for species that have multiple skin colors. - return - -/datum/species/proc/grant_abilities(var/mob/living/carbon/human/H) +/datum/species/proc/grant_abilities(mob/living/carbon/human/H) for(var/proc/ability in species_abilities) H.verbs += ability - return -/datum/species/proc/handle_pre_change(var/mob/living/carbon/human/H) - if(H.butcher_results)//clear it out so we don't butcher a actual human. +/datum/species/proc/handle_pre_change(mob/living/carbon/human/H) + if(H.butcher_results) //clear it out so we don't butcher a actual human. H.butcher_results = null remove_abilities(H) - return -/datum/species/proc/remove_abilities(var/mob/living/carbon/human/H) +/datum/species/proc/remove_abilities(mob/living/carbon/human/H) for(var/proc/ability in species_abilities) H.verbs -= ability - return // Do species-specific reagent handling here // Return 1 if it should do normal processing too @@ -295,37 +287,37 @@ if(R.id == exotic_blood) H.blood_volume = min(H.blood_volume + round(R.volume, 0.1), BLOOD_VOLUME_NORMAL) H.reagents.del_reagent(R.id) - return 0 - return 1 + return FALSE + return TRUE // For special snowflake species effects // (Slime People changing color based on the reagents they consume) -/datum/species/proc/handle_life(var/mob/living/carbon/human/H) +/datum/species/proc/handle_life(mob/living/carbon/human/H) if((NO_BREATHE in species_traits) || (BREATHLESS in H.mutations)) H.setOxyLoss(0) H.SetLoseBreath(0) -/datum/species/proc/handle_dna(var/mob/living/carbon/C, var/remove) //Handles DNA mutations, as that doesn't work at init. Make sure you call genemutcheck on any blocks changed here +/datum/species/proc/handle_dna(mob/living/carbon/C, remove) //Handles DNA mutations, as that doesn't work at init. Make sure you call genemutcheck on any blocks changed here return -/datum/species/proc/handle_death(var/mob/living/carbon/human/H) //Handles any species-specific death events (such as dionaea nymph spawns). +/datum/species/proc/handle_death(mob/living/carbon/human/H) //Handles any species-specific death events (such as dionaea nymph spawns). return /datum/species/proc/help(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) if(attacker_style && attacker_style.help_act(user, target))//adminfu only... - return 1 + return TRUE if(target.health >= config.health_threshold_crit) target.help_shake_act(user) - return 1 + return TRUE else user.do_cpr(target) /datum/species/proc/grab(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) if(attacker_style && attacker_style.grab_act(user, target)) - return 1 + return TRUE else target.grabbedby(user) - return 1 + return TRUE /datum/species/proc/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) //Vampire code @@ -348,7 +340,7 @@ return //end vampire codes if(attacker_style && attacker_style.harm_act(user, target)) - return 1 + return TRUE else var/datum/unarmed_attack/attack = user.dna.species.unarmed @@ -365,7 +357,7 @@ if(!damage) playsound(target.loc, attack.miss_sound, 25, 1, -1) target.visible_message("[user] tried to [pick(attack.attack_verb)] [target]!") - return 0 + return FALSE var/obj/item/organ/external/affecting = target.get_organ(ran_zone(user.zone_sel.selecting)) @@ -386,7 +378,7 @@ /datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) if(attacker_style && attacker_style.disarm_act(user, target)) - return 1 + return TRUE else add_attack_logs(user, target, "Disarmed", ATKLOG_ALL) user.do_attack_animation(target, ATTACK_EFFECT_DISARM) @@ -459,7 +451,7 @@ if((M != H) && M.a_intent != INTENT_HELP && H.check_shields(0, M.name, attack_type = UNARMED_ATTACK)) add_attack_logs(M, H, "Melee attacked with fists (miss/block)") H.visible_message("[M] attempted to touch [H]!") - return 0 + return FALSE switch(M.a_intent) if(INTENT_HELP) @@ -483,11 +475,11 @@ /datum/species/proc/after_equip_job(datum/job/J, mob/living/carbon/human/H, visualsOnly = FALSE) return -/datum/species/proc/can_understand(var/mob/other) +/datum/species/proc/can_understand(mob/other) return // Called in life() when the mob has no client. -/datum/species/proc/handle_npc(var/mob/living/carbon/human/H) +/datum/species/proc/handle_npc(mob/living/carbon/human/H) return //Species unarmed attacks @@ -521,7 +513,7 @@ damage = 6 /datum/species/proc/handle_can_equip(obj/item/I, slot, disable_warning = 0, mob/living/carbon/human/user) - return 0 + return FALSE /datum/species/proc/handle_vision(mob/living/carbon/human/H) // Right now this just handles blind, blurry, and similar states @@ -627,7 +619,7 @@ Returns the path corresponding to the corresponding organ It'll return null if the organ doesn't correspond, so include null checks when using this! */ //Fethas Todo:Do i need to redo this? -/datum/species/proc/return_organ(var/organ_slot) +/datum/species/proc/return_organ(organ_slot) if(!(organ_slot in has_organ)) return null return has_organ[organ_slot] @@ -725,4 +717,4 @@ It'll return null if the organ doesn't correspond, so include null checks when u /datum/species/proc/water_act(mob/living/carbon/human/M, volume, temperature, source) if(abs(temperature - M.bodytemperature) > 10) //If our water and mob temperature varies by more than 10K, cool or/ heat them appropriately - M.bodytemperature = (temperature + M.bodytemperature) * 0.5 //Approximation for gradual heating or cooling + M.bodytemperature = (temperature + M.bodytemperature) * 0.5 //Approximation for gradual heating or cooling \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index 55502649373..e3e9c2d2915 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -4,7 +4,6 @@ icobase = 'icons/mob/human_races/r_human.dmi' deform = 'icons/mob/human_races/r_def_human.dmi' primitive_form = /datum/species/monkey - path = /mob/living/carbon/human language = "Sol Common" species_traits = list(LIPS, CAN_BE_FAT) skinned_type = /obj/item/stack/sheet/animalhide/human @@ -25,8 +24,6 @@ name_plural = "Unathi" icobase = 'icons/mob/human_races/r_lizard.dmi' deform = 'icons/mob/human_races/r_def_lizard.dmi' - path = /mob/living/carbon/human/unathi - default_language = "Galactic Common" language = "Sinta'unathi" tail = "sogtail" skinned_type = /obj/item/stack/sheet/animalhide/lizard @@ -120,8 +117,6 @@ name_plural = "Tajaran" icobase = 'icons/mob/human_races/r_tajaran.dmi' deform = 'icons/mob/human_races/r_def_tajaran.dmi' - path = /mob/living/carbon/human/tajaran - default_language = "Galactic Common" language = "Siik'tajr" tail = "tajtail" skinned_type = /obj/item/stack/sheet/fur @@ -181,8 +176,6 @@ name_plural = "Vulpkanin" icobase = 'icons/mob/human_races/r_vulpkanin.dmi' deform = 'icons/mob/human_races/r_vulpkanin.dmi' - path = /mob/living/carbon/human/vulpkanin - default_language = "Galactic Common" language = "Canilunzt" primitive_form = /datum/species/monkey/vulpkanin tail = "vulptail" @@ -236,8 +229,6 @@ name_plural = "Skrell" icobase = 'icons/mob/human_races/r_skrell.dmi' deform = 'icons/mob/human_races/r_def_skrell.dmi' - path = /mob/living/carbon/human/skrell - default_language = "Galactic Common" language = "Skrellian" primitive_form = /datum/species/monkey/skrell @@ -285,9 +276,6 @@ name_plural = "Vox" icobase = 'icons/mob/human_races/vox/r_vox.dmi' deform = 'icons/mob/human_races/vox/r_def_vox.dmi' - path = /mob/living/carbon/human/vox - - default_language = "Galactic Common" language = "Vox-pidgin" tail = "voxtail" speech_sounds = list('sound/voice/shriek1.ogg') @@ -435,7 +423,6 @@ name_plural = "Vox Armalis" icobase = 'icons/mob/human_races/r_armalis.dmi' deform = 'icons/mob/human_races/r_armalis.dmi' - path = /mob/living/carbon/human/voxarmalis unarmed_type = /datum/unarmed_attack/claws/armalis warning_low_pressure = 50 @@ -491,8 +478,6 @@ name_plural = "Kidan" icobase = 'icons/mob/human_races/r_kidan.dmi' deform = 'icons/mob/human_races/r_def_kidan.dmi' - path = /mob/living/carbon/human/kidan - default_language = "Galactic Common" language = "Chittin" unarmed_type = /datum/unarmed_attack/claws @@ -533,11 +518,9 @@ /datum/species/slime name = "Slime People" name_plural = "Slime People" - default_language = "Galactic Common" language = "Bubblish" icobase = 'icons/mob/human_races/r_slime.dmi' deform = 'icons/mob/human_races/r_slime.dmi' - path = /mob/living/carbon/human/slime remains_type = /obj/effect/decal/remains/slime // More sensitive to the cold @@ -738,7 +721,6 @@ name_plural = "Greys" icobase = 'icons/mob/human_races/r_grey.dmi' deform = 'icons/mob/human_races/r_def_grey.dmi' - default_language = "Galactic Common" language = "Psionic Communication" eyes = "grey_eyes_s" butt_sprite = "grey" @@ -795,8 +777,6 @@ name_plural = "Dionaea" icobase = 'icons/mob/human_races/r_diona.dmi' deform = 'icons/mob/human_races/r_def_plant.dmi' - path = /mob/living/carbon/human/diona - default_language = "Galactic Common" language = "Rootspeak" speech_sounds = list('sound/voice/dionatalk1.ogg') //Credit https://www.youtube.com/watch?v=ufnvlRjsOTI [0:13 - 0:16] speech_chance = 20 @@ -919,8 +899,6 @@ icobase = 'icons/mob/human_races/r_machine.dmi' deform = 'icons/mob/human_races/r_machine.dmi' - path = /mob/living/carbon/human/machine - default_language = "Galactic Common" language = "Trinary" remains_type = /obj/effect/decal/remains/robot skinned_type = /obj/item/stack/sheet/metal // Let's grind up IPCs for station resources! @@ -1003,8 +981,6 @@ name_plural = "Drask" icobase = 'icons/mob/human_races/r_drask.dmi' deform = 'icons/mob/human_races/r_drask.dmi' - path = /mob/living/carbon/human/drask - default_language = "Galactic Common" language = "Orluum" eyes = "drask_eyes_s"