Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Races port #1056

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__DEFINES/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define SPECIES_ARACHNID "arachnid"
#define SPECIES_TESHARI "teshari"
#define SPECIES_VOX "vox"
#define SPECIES_DIONA "diona"
#define SPECIES_XENOCHIMERA "xenochimera"
#define SPECIES_INSECT "insect"
#define SPECIES_UINSECT "undead_insect"
Expand Down
4 changes: 2 additions & 2 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2247,7 +2247,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")

if("age")
var/new_age = tgui_input_number(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX_INPUT])", "Character Preference", null, AGE_MAX_INPUT, AGE_MIN)
var/new_age = tgui_input_number(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX_INPUT])", "Character Preference", null, pref_species.max_age, pref_species.min_age)
if(new_age)
age = max(min( round(text2num(new_age)), AGE_MAX_INPUT),AGE_MIN)

Expand Down Expand Up @@ -2469,7 +2469,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
features["mcolor2"] = pref_species.default_color
if(features["mcolor3"] == "#000000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3]))
features["mcolor3"] = pref_species.default_color

age = clamp(age, pref_species.max_age, pref_species.min_age)
//switch to the type of eyes the species uses
eye_type = pref_species.eye_type

Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
* They also allow for faster '[]' list access versus 'in'. Other than that, they are useless right now.
* Layer hiding is handled by [/datum/species/proc/handle_mutant_bodyparts] below.
*/

var/list/mutant_bodyparts = list()
///Internal organs that are unique to this race, like a tail.
var/list/mutant_organs = list()
Expand Down
1 change: 1 addition & 0 deletions config/entries/general.txt
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ ROUNDSTART_RACES spectre_bot
ROUNDSTART_RACES vampire_roundstart
ROUNDSTART_RACES shadekin
ROUNDSTART_RACES teshari
ROUNDSTART_RACES diona
ROUNDSTART_RACES vox
ROUNDSTART_RACES xenochimera
ROUNDSTART_RACES undead_mammal
Expand Down
Binary file modified icons/mob/alien.dmi
Binary file not shown.
Binary file modified icons/mob/eyes.dmi
Binary file not shown.
3 changes: 3 additions & 0 deletions modular_splurt/code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
/mob/living/carbon/human/species/mammal/vox
race = /datum/species/vox

/mob/living/carbon/human/species/mammal/diona
race = /datum/species/diona

/mob/living/carbon/human/is_literate()
// Check for D4C craving
if(HAS_TRAIT(src, TRAIT_DUMB_CUM_CRAVE))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
var/icon_neck
var/icon_suit
var/icon_uniform

var/min_age = AGE_MIN
var/max_age = AGE_MAX

/datum/species/althelp(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(user == target && istype(user))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
/datum/species/diona
name = "Diona"
id = SPECIES_DIONA
override_bp_icon = 'modular_splurt/icons/mob/diona.dmi'
species_language_holder = /datum/language_holder/diona

species_traits = list(
NO_UNDERWEAR
)

exotic_blood_color = "#004400"
//flesh_color = "#808D11"

min_age = 18
max_age = 300

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undefine min_age and max_age, as 1 would be below 18 (our minimum age) for species.

I don't care if they can't have genitals due to the fact you forgot to do ANY adjustment; we do not allow people with characters below the age of 18 on the server.

say_mod = "chirrups"
eye_type = "diona"
allowed_limb_ids = null
damage_overlay_type = "diona"

/datum/species/diona/check_roundstart_eligible()
return TRUE

/datum/language_holder/diona
understood_languages = list(/datum/language/common = list(LANGUAGE_ATOM),
/datum/language/diona = list(LANGUAGE_ATOM))
spoken_languages = list(/datum/language/common = list(LANGUAGE_ATOM),
/datum/language/diona = list(LANGUAGE_ATOM))

/datum/language/diona

/datum/species/diona/on_species_gain(mob/living/carbon/human/C, datum/species/old_species, pref_load)
if(ishuman(C))
C.add_movespeed_modifier(/datum/movespeed_modifier/diona)
C.verbs += /mob/living/carbon/human/proc/regenerate
C.verbs += /mob/living/carbon/human/proc/diona_split_nymph
..()

/datum/movespeed_modifier/diona
multiplicative_slowdown = 2

/datum/species/diona/spec_life(mob/living/carbon/human/H)
var/turf/T = get_turf(H)
if(T)
var/light_amount = T.get_lumcount()*10

if((H.nutrition + light_amount) < initial(H.nutrition))
H.adjust_nutrition(light_amount)

if(light_amount >= 3) //if there's enough light, heal
H.adjustBruteLoss(-(round(light_amount/2)))
H.adjustFireLoss(-(round(light_amount/2)))
H.adjustToxLoss(-(light_amount))
H.adjustOxyLoss(-(light_amount))
//TODO: heal wounds, heal broken limbs.
if(H.nutrition < 200)
H.take_overall_damage(2,0)

/mob/living/carbon/human
var/active_regen = FALSE //Used for the regenerate proc in human_powers.dm
var/active_regen_delay = 300

/mob/living/carbon/human/proc/regenerate()
set name = "Regenerate"
set desc = "Allows you to regrow limbs and heal organs after a period of rest."
set category = "Abilities"

if(nutrition < 250)
to_chat(src, span_warning("You lack the biomass to begin regeneration!"))
return

if(active_regen)
to_chat(src, span_warning("You are already regenerating tissue!"))
return
else
active_regen = TRUE
src.visible_message(span_warning("<B>[src]</B>'s flesh begins to mend..."))

var/delay_length = round(active_regen_delay * 1)
if(do_after(src,delay_length))
adjust_nutrition(-200)

regenerate_limbs()
regenerate_organs()
remove_all_embedded_objects()
set_heartattack(FALSE)

handle_organs() // Update everything

active_regen = FALSE
else
to_chat(src, span_userdanger("Your regeneration is interrupted!"))
adjust_nutrition(-75)
active_regen = FALSE


/mob/living/carbon/human/proc/diona_split_nymph()
set name = "Split"
set desc = "Split your humanoid form into its constituent nymphs."
set category = "Abilities"
var/turf/T = get_turf(src)

var/mob/living/carbon/alien/diona/S = new(T)

if(mind)
mind.transfer_to(S)

for(var/obj/item/W in src)
dropItemToGround(W)

visible_message(span_warning("\The [src] quivers slightly, then splits apart with a wet slithering noise."))
qdel(src)


Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/mob/living/carbon/alien/diona
name = "diona nymph"
var/adult_form = /mob/living/carbon/human/species/mammal/diona
var/can_namepick_as_adult = 1
var/adult_name = "diona gestalt"
icon_state = "nymph"
//race = /datum/species/diona
var/amount_grown = 0
var/max_grown = 325
verb_say = "chirrups"
initial_language_holder = /datum/language_holder/diona

/mob/living/carbon/alien/diona/proc/handle_npc(var/mob/living/carbon/alien/diona/D)
if(D.stat != CONSCIOUS)
return
if(prob(33) && isturf(D.loc) && !D.pulledby) //won't move if being pulled
step(D, pick(NORTH, SOUTH, EAST, WEST))
if(prob(1))
D.emote(pick("scratch","jump","chirp","roll"))

/mob/living/carbon/alien/diona/ComponentInitialize()
. = ..()
AddElement(/datum/element/mob_holder, worn_state = "diona", inv_slots = ITEM_SLOT_HEAD)

/mob/living/carbon/alien/diona/Life()
..()
if(amount_grown < max_grown)
amount_grown++

/mob/living/carbon/alien/diona/movement_delay()
return 2

/mob/living/carbon/alien/diona/verb/evolve()

set name = "Evolve"
set desc = "Evolve into your adult form."
set category = "Abilities"

if(stat != CONSCIOUS)
return

if(!adult_form)
verbs -= /mob/living/carbon/alien/diona/verb/evolve
return

if(amount_grown < max_grown)
to_chat(src, "<font color='red'>You are not fully grown.</font>")
return
var/mob/living/carbon/human/adult = new adult_form(get_turf(src))


if(mind)
mind.transfer_to(adult)
if (can_namepick_as_adult)
var/newname = sanitize(tgui_input_text(adult, "You have become an adult. Choose a name for yourself.", "Adult Name", null, MAX_NAME_LEN), MAX_NAME_LEN)

if(!newname)
adult.fully_replace_character_name(name, "[src.adult_name]")
else
adult.fully_replace_character_name(name, newname)
else
adult.key = src.key

for (var/obj/item/W in src.contents)
dropItemToGround(W)

qdel(src)
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@

/datum/language_holder/vox
understood_languages = list(/datum/language/common = list(LANGUAGE_ATOM),
/datum/language/schechi = list(LANGUAGE_ATOM))
/datum/language/vox = list(LANGUAGE_ATOM))
spoken_languages = list(/datum/language/common = list(LANGUAGE_ATOM),
/datum/language/schechi = list(LANGUAGE_ATOM))
/datum/language/vox = list(LANGUAGE_ATOM))

/datum/language/vox

Expand Down
Binary file added modular_splurt/icons/mob/diona.dmi
Binary file not shown.
4 changes: 3 additions & 1 deletion tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -4514,8 +4514,8 @@
#include "modular_splurt\code\game\objects\items\armor_kits.dm"
#include "modular_splurt\code\game\objects\items\cards_ids.dm"
#include "modular_splurt\code\game\objects\items\cosmetics.dm"
#include "modular_splurt\code\game\objects\items\gift.dm"
#include "modular_splurt\code\game\objects\items\fluff.dm"
#include "modular_splurt\code\game\objects\items\gift.dm"
#include "modular_splurt\code\game\objects\items\granters.dm"
#include "modular_splurt\code\game\objects\items\holy_weapons.dm"
#include "modular_splurt\code\game\objects\items\manuals.dm"
Expand Down Expand Up @@ -4893,6 +4893,8 @@
#include "modular_splurt\code\modules\mob\living\carbon\human\species.dm"
#include "modular_splurt\code\modules\mob\living\carbon\human\species_types\arachnid.dm"
#include "modular_splurt\code\modules\mob\living\carbon\human\species_types\ashwalker.dm"
#include "modular_splurt\code\modules\mob\living\carbon\human\species_types\diona.dm"
#include "modular_splurt\code\modules\mob\living\carbon\human\species_types\diona_nymph.dm"
#include "modular_splurt\code\modules\mob\living\carbon\human\species_types\ipc.dm"
#include "modular_splurt\code\modules\mob\living\carbon\human\species_types\podpeople.dm"
#include "modular_splurt\code\modules\mob\living\carbon\human\species_types\shadekin.dm"
Expand Down