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

[MODULAR] ports species stuff #33

Merged
merged 22 commits into from
Aug 11, 2024
Merged
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
4 changes: 4 additions & 0 deletions code/__DEFINES/~~~splurt_defines/DNA.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
///arachnid organ slots
#define ORGAN_SLOT_EXTERNAL_MANDIBLES "mandibles"
#define ORGAN_SLOT_EXTERNAL_SPINNERET "spinneret"
#define ORGAN_SLOT_EXTERNAL_SPIDER_LEGS "spider_legs"
1 change: 1 addition & 0 deletions code/__DEFINES/~~~splurt_defines/mobs.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define SPECIES_ARACHNID "arachnid"
13 changes: 13 additions & 0 deletions code/__HELPERS/~splurt_helpers/mob.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@


/proc/random_unique_arachnid_name(attempts_to_find_unique_name=10)
for(var/i in 1 to attempts_to_find_unique_name)
. = capitalize(pick(GLOB.arachnid_first)) + " " + capitalize(pick(GLOB.arachnid_last))

if(!findname(.))
break

/proc/arachnid_name()
return "[pick(GLOB.arachnid_first)] [pick(GLOB.arachnid_last)]"


/proc/resolve_intent_name(intent)
switch(intent)
if(INTENT_HELP)
Expand Down
3 changes: 3 additions & 0 deletions code/_globalvars/lists/names.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ GLOBAL_LIST_INIT(greek_alphabet, world.file2list("strings/greek_alphabet.txt"))
GLOBAL_LIST_INIT(hive_names, world.file2list("strings/names/hive_names.txt"))
//loaded on startup because of "
//would include in rsc if ' was used
//splurt names
GLOBAL_LIST_INIT(arachnid_first, world.file2list("strings/names/arachnid_first.txt"))
GLOBAL_LIST_INIT(arachnid_last, world.file2list("strings/names/arachnid_last.txt"))
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions config/game_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,9 @@ ROUNDSTART_RACES shadekin
ROUNDSTART_RACES lesser_abductor
ROUNDSTART_RACES zombie

## SPLURT BANDWAGON DOWN HERE
ROUNDSTART_RACES arachnid

##-------------------------------------------------------------------------------------------

## Roundstart no-reset races
Expand Down
3 changes: 2 additions & 1 deletion modular_skyrat/modules/customization/_globalvars/lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ GLOBAL_LIST_INIT(robotic_styles_list, list(
"Xion Manufacturing Group" = 'modular_skyrat/master_files/icons/mob/augmentation/xmgipc.dmi',
"Xion Manufacturing Group 2.0" = 'modular_skyrat/master_files/icons/mob/augmentation/xm2ipc.dmi',
"Zeng-Hu Pharmaceuticals" = 'modular_skyrat/master_files/icons/mob/augmentation/zhpipc.dmi',
"Mariinsky Ballet Company" = 'modular_skyrat/master_files/icons/mob/augmentation/mariinskyipc.dmi' //Bubber Edit - It wouldn't let me make a modular file. I tried. I really tried.
"Mariinsky Ballet Company" = 'modular_skyrat/master_files/icons/mob/augmentation/mariinskyipc.dmi', //Bubber Edit - It wouldn't let me make a modular file. I tried. I really tried.
"BDR-01 Spectre" = 'modular_zzplurt/icons/mob/augmentation/spectre.dmi' //splurt edit - it can be done modularly. i wont pretend otherwise. but its 4:30 am and im tired.
))

//ghoul colors
Expand Down
54 changes: 54 additions & 0 deletions modular_zzplurt/code/modules/client/preferences/mutant_parts.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/datum/preference/toggle/mutant_toggle/mandibles
savefile_key = "mandibles_toggle"
relevant_mutant_bodypart = "mandibles"

/datum/preference/choiced/mutant_choice/mandibles
savefile_key = "feature_mandibles"
relevant_mutant_bodypart = "mandibles"
type_to_check = /datum/preference/toggle/mutant_toggle/mandibles
default_accessory_type = /datum/sprite_accessory/arachnid_mandibles/none

/datum/preference/tri_color/mandibles_color
savefile_key = "mandibles_color"
relevant_mutant_bodypart = "mandibles"
category = PREFERENCE_CATEGORY_SUPPLEMENTAL_FEATURES
savefile_identifier = PREFERENCE_CHARACTER
type_to_check = /datum/preference/toggle/mutant_toggle/mandibles



/datum/preference/toggle/mutant_toggle/spinneret
savefile_key = "spinneret_toggle"
relevant_mutant_bodypart = "spinneret"

/datum/preference/choiced/mutant_choice/spinneret
savefile_key = "feature_spinneret"
relevant_mutant_bodypart = "spinneret"
type_to_check = /datum/preference/toggle/mutant_toggle/spinneret
default_accessory_type = /datum/sprite_accessory/arachnid_mandibles/none

/datum/preference/tri_color/spinneret_color
category = PREFERENCE_CATEGORY_SUPPLEMENTAL_FEATURES
savefile_identifier = PREFERENCE_CHARACTER
savefile_key = "spinneret_color"
relevant_mutant_bodypart = "spinneret"
type_to_check = /datum/preference/toggle/mutant_toggle/spinneret



/datum/preference/toggle/mutant_toggle/arachnid_legs
savefile_key = "arachnid_legs_toggle"
relevant_mutant_bodypart = "arachnid_legs"

/datum/preference/choiced/mutant_choice/arachnid_legs
savefile_key = "feature_arachnid_legs"
relevant_mutant_bodypart = "arachnid_legs"
type_to_check = /datum/preference/toggle/mutant_toggle/arachnid_legs
default_accessory_type = /datum/sprite_accessory/arachnid_legs/none

/datum/preference/tri_color/arachnid_legs_color
category = PREFERENCE_CATEGORY_SUPPLEMENTAL_FEATURES
savefile_identifier = PREFERENCE_CHARACTER
savefile_key = "arachnid_legs_color"
relevant_mutant_bodypart = "arachnid_legs"
type_to_check = /datum/preference/toggle/mutant_toggle/spinneret
10 changes: 10 additions & 0 deletions modular_zzplurt/code/modules/language/_language_holder.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

/datum/language_holder/arachnid
understood_languages = list(
/datum/language/common = list(LANGUAGE_ATOM),
/datum/language/buzzwords = list(LANGUAGE_ATOM)
)
spoken_languages = list(
/datum/language/common = list(LANGUAGE_ATOM),
/datum/language/buzzwords = list(LANGUAGE_ATOM)
)
2 changes: 2 additions & 0 deletions modular_zzplurt/code/modules/language/buzzwords.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/datum/language/buzzwords/get_random_name(gender = NEUTER, name_count = default_name_count, syllable_min = default_name_syllable_min, syllable_max = default_name_syllable_max, force_use_syllables = FALSE)
return "[pick(GLOB.arachnid_first)][random_name_spacer][pick(GLOB.arachnid_last)]"
2 changes: 2 additions & 0 deletions modular_zzplurt/code/modules/species/_species.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/mob/living/carbon/human/species/arachnid
race = /datum/species/arachnid
194 changes: 194 additions & 0 deletions modular_zzplurt/code/modules/species/arachnid.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
/datum/species/arachnid
name = "Arachnid"
id = SPECIES_ARACHNID
inherent_traits = list(
TRAIT_NO_UNDERWEAR,
TRAIT_WEB_SURFER,
TRAIT_WEB_WEAVER,
)
bodypart_overrides = list(
BODY_ZONE_L_ARM = /obj/item/bodypart/arm/left/arachnid,
BODY_ZONE_R_ARM = /obj/item/bodypart/arm/right/arachnid,
BODY_ZONE_HEAD = /obj/item/bodypart/head/arachnid,
BODY_ZONE_L_LEG = /obj/item/bodypart/leg/left/arachnid,
BODY_ZONE_R_LEG = /obj/item/bodypart/leg/right/arachnid,
BODY_ZONE_CHEST = /obj/item/bodypart/chest/arachnid
)
mutanteyes = /obj/item/organ/internal/eyes/night_vision/arachnid
mutanttongue = /obj/item/organ/internal/tongue/arachnid
changesource_flags = MIRROR_MAGIC | MIRROR_PRIDE | RACE_SWAP | WABBAJACK | MIRROR_BADMIN | SLIME_EXTRACT

say_mod = "chitters"
inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BUG
external_organs = list(
/obj/item/organ/external/mandibles = "Plain",
/obj/item/organ/external/spinneret = "Plain",
/obj/item/organ/external/arachnid_legs = "Plain",
)
meat = /obj/item/food/meat/slab/spider
species_language_holder = /datum/language_holder/arachnid

//this took WAYYYY too long to find
//i hate this place
/datum/species/arachnid/get_default_mutant_bodyparts()
return list(
"mandibles" = list("Plain", TRUE),
"spinneret" = list("Plain", TRUE),
"arachnid_legs" = list("Plain", TRUE),
)

/datum/species/arachnid/on_species_gain(mob/living/carbon/human/human_who_gained_species, datum/species/old_species, pref_load)
. = ..()
RegisterSignal(human_who_gained_species, COMSIG_MOB_APPLY_DAMAGE_MODIFIERS, PROC_REF(damage_weakness))

/datum/species/arachnid/on_species_loss(mob/living/carbon/human/C, datum/species/new_species, pref_load)
. = ..()
UnregisterSignal(C, COMSIG_MOB_APPLY_DAMAGE_MODIFIERS)

/datum/species/arachnid/proc/damage_weakness(datum/source, list/damage_mods, damage_amount, damagetype, def_zone, sharpness, attack_direction, obj/item/attacking_item)
SIGNAL_HANDLER

if(istype(attacking_item, /obj/item/melee/flyswatter))
damage_mods += 10 // 10x damage modifier, little less than flypeople

/datum/species/arachnid/on_species_gain(mob/living/carbon/human/H, datum/species/old_species)
. = ..()
var/datum/action/innate/arachnid/spin_web/spin_web = new
var/datum/action/innate/arachnid/spin_cocoon/spin_cocoon = new
spin_web.Grant(H)
spin_cocoon.Grant(H)

/datum/species/arachnid/on_species_loss(mob/living/carbon/human/H)
. = ..()
var/datum/action/innate/arachnid/spin_web/spin_web = locate() in H.actions
var/datum/action/innate/arachnid/spin_cocoon/spin_cocoon = locate() in H.actions
spin_web?.Remove(H)
spin_cocoon?.Remove(H)


#define WEB_SPIN_NUTRITION_LOSS 25
#define COCOON_NUTRITION_LOSS 100

/datum/action/innate/arachnid
check_flags = AB_CHECK_HANDS_BLOCKED|AB_CHECK_INCAPACITATED|AB_CHECK_CONSCIOUS
button_icon = 'icons/mob/actions/actions_animal.dmi'

/datum/action/innate/arachnid/IsAvailable(feedback)
. = ..()
if(!.)
return

if(owner.has_status_effect(/datum/status_effect/web_cooldown))
if(feedback)
to_chat(owner, span_warning("You need to wait a while to regenerate web fluid."))
return FALSE


/datum/action/innate/arachnid/spin_web
name = "Spin Web"
button_icon_state = "spider_web"

/datum/action/innate/arachnid/spin_web/Activate()
if(DOING_INTERACTION(owner, SPECIES_ARACHNID))
return FALSE

if(owner.nutrition < WEB_SPIN_NUTRITION_LOSS)
to_chat(owner, span_warning("You're too hungry to spin web right now, eat something first!"))
return FALSE

var/turf/target_turf = get_turf(owner)
if(!target_turf)
to_chat(owner, span_warning("There's no room to spin your web here!"))
return FALSE

if(locate(/obj/structure/spider/stickyweb) in target_turf)
to_chat(owner, span_warning("There's already a web here!"))
return FALSE

// Should have some minimum amount of food before trying to activate
to_chat(owner, "<i>You begin spinning some web...</i>")
if(!do_after(owner, 10 SECONDS, target_turf, interaction_key = SPECIES_ARACHNID))
to_chat(owner, span_warning("Your web spinning was interrupted!"))
return FALSE

if(!IsAvailable(TRUE))
return FALSE

owner.adjust_nutrition(-WEB_SPIN_NUTRITION_LOSS)
owner:apply_status_effect(/datum/status_effect/web_cooldown)
to_chat(owner, "<i>You use up a fair amount of energy weaving a web on the ground with your spinneret!</i>")
new /obj/structure/spider/stickyweb(target_turf, owner)
return TRUE


/datum/action/innate/arachnid/spin_cocoon
name = "Spin Cocoon"
button_icon_state = "wrap_0"
enable_text = "You pull out a strand from your spinneret, ready to wrap a target.."
disable_text = "You discard the strand."
click_action = TRUE

/datum/action/innate/arachnid/spin_cocoon/set_ranged_ability(mob/living/on_who, text_to_show)
if(owner.nutrition < COCOON_NUTRITION_LOSS)
to_chat(owner, span_warning("You're too hungry to spin web right now, eat something first!"))
return FALSE

owner.adjust_nutrition(-COCOON_NUTRITION_LOSS * 0.25)
return ..()

/datum/action/innate/arachnid/spin_cocoon/do_ability(mob/living/caller, atom/movable/clicked_on)
if(!caller.Adjacent(clicked_on) || !istype(clicked_on) || DOING_INTERACTION(caller, SPECIES_ARACHNID))
return FALSE

. = TRUE
var/static/list/blacklisted_types
blacklisted_types ||= typecacheof(list(
/obj/effect, //no
/obj/structure/spider, //mmm double dips
/atom/movable/screen //???
))
if(is_type_in_typecache(clicked_on, blacklisted_types))
to_chat(caller, span_warning("You cannot wrap this!"))
return FALSE

if(!isliving(clicked_on) && clicked_on.anchored)
to_chat(caller, span_warning("[clicked_on] is bolted to the floor!"))
return FALSE

if(clicked_on == caller)
caller.visible_message(
span_danger("[caller] starts to wrap themselves into a cocoon!"),
span_danger("You start to wrap yourself into a cocoon!")
)
else
caller.visible_message(
span_danger("[caller] starts to wrap [clicked_on] into a cocoon!"),
span_warning("You start to wrap [clicked_on] into a cocoon.")
)

caller.apply_status_effect(/datum/status_effect/web_cooldown)
if(!do_after(caller, 10 SECONDS, clicked_on, interaction_key = SPECIES_ARACHNID))
to_chat(caller, span_warning("Your web spinning was interrupted!"))
return FALSE

caller.adjust_nutrition(-COCOON_NUTRITION_LOSS * 0.75)
caller.apply_status_effect(/datum/status_effect/web_cooldown)
var/obj/structure/spider/cocoon/casing = new(clicked_on.loc)

clicked_on.forceMove(casing)
if(clicked_on.density || ismob(clicked_on))
if(clicked_on == caller)
caller.visible_message(span_danger("[caller] wraps themselves into a large cocoon!"))
else
caller.visible_message(span_danger("[caller] wraps [clicked_on] into a large cocoon!"))
casing.icon_state = pick("cocoon_large1", "cocoon_large2", "cocoon_large3")
else
caller.visible_message(span_danger("[caller] wraps [clicked_on] into a cocoon!"))


/datum/status_effect/web_cooldown
duration = 20 SECONDS
alert_type = null
remove_on_fullheal = TRUE

#undef WEB_SPIN_NUTRITION_LOSS
70 changes: 70 additions & 0 deletions modular_zzplurt/code/modules/species/teshari.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/datum/species/teshari

/datum/species/teshari/on_species_gain(mob/living/carbon/human/new_teshari, datum/species/old_species, pref_load)
. = ..()
var/datum/action/cooldown/sonar_ping/sonar_ping = new(new_teshari)
sonar_ping.Grant(new_teshari)

new_teshari.setMaxHealth(50)
new_teshari.physiology.hunger_mod *= 2
new_teshari.add_movespeed_modifier(/datum/movespeed_modifier/teshari)


/datum/movespeed_modifier/teshari
multiplicative_slowdown = -0.2


/datum/action/cooldown/sonar_ping
name = "Listen In"
desc = "Allows you to listen in to movement and noises around you."
button_icon = 'icons/obj/medical/organs/organs.dmi'
button_icon_state = "ears"
cooldown_time = 10 SECONDS

/datum/action/cooldown/sonar_ping/IsAvailable(feedback)
var/mob/living/carbon/owner = src.owner
return ..() && owner.can_hear()


/datum/action/cooldown/sonar_ping/Activate(atom/target)
var/heard_something = FALSE
to_chat(owner, span_notice("You take a moment to listen in to your environment..."))
for(var/mob/living/living in range(owner.client?.view, owner))
if(living == owner || living.stat == DEAD)
continue

var/turf/source_turf = get_turf(living)
if(!source_turf)
continue

var/feedback = list()
feedback += "There are noises of movement "
var/direction = get_dir(owner, living)
if(direction)
feedback += "towards the [dir2text(direction)], "
switch(get_dist(owner, living) / 7)
if(0 to 0.2)
feedback += "very close by."
if(0.2 to 0.4)
feedback += "close by."
if(0.4 to 0.6)
feedback += "some distance away."
if(0.6 to 0.8)
feedback += "further away."
else
feedback += "far away."
else // No need to check distance if they're standing right on-top of us
feedback += "right on top of you."

heard_something = TRUE
to_chat(owner, span_notice(jointext(feedback, null)))

if(!heard_something)
to_chat(owner, span_notice("You hear no movement but your own."))

StartCooldown()
return TRUE




Loading
Loading