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

[Port] Slime Rancher-Ifies Xenobiology #11329

Closed
wants to merge 5 commits into from
Closed
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
59 changes: 44 additions & 15 deletions beestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
#include "code\__DEFINES\say.dm"
#include "code\__DEFINES\shuttles.dm"
#include "code\__DEFINES\sight.dm"
#include "code\__DEFINES\slimes.dm"
#include "code\__DEFINES\sound.dm"
#include "code\__DEFINES\space.dm"
#include "code\__DEFINES\spaceman_dmm.dm"
Expand Down Expand Up @@ -715,6 +716,13 @@
#include "code\datums\components\plumbing\filter.dm"
#include "code\datums\components\plumbing\reaction_chamber.dm"
#include "code\datums\components\plumbing\splitter.dm"
#include "code\datums\components\slime\basic_scared_of_item.dm"
#include "code\datums\components\slime\emotion_buffer.dm"
#include "code\datums\components\slime\generic_mob_hunger.dm"
#include "code\datums\components\slime\latch_feeding.dm"
#include "code\datums\components\slime\liquid_secretion.dm"
#include "code\datums\components\slime\mob_stacker.dm"
#include "code\datums\components\slime\vac_tagged.dm"
#include "code\datums\components\storage\storage.dm"
#include "code\datums\components\storage\concrete\_concrete.dm"
#include "code\datums\components\storage\concrete\bag_of_holding.dm"
Expand Down Expand Up @@ -1080,6 +1088,7 @@
#include "code\game\machinery\cell_charger.dm"
#include "code\game\machinery\cloning.dm"
#include "code\game\machinery\constructable_frame.dm"
#include "code\game\machinery\corral_corner.dm"
#include "code\game\machinery\cryopod.dm"
#include "code\game\machinery\dance_machine.dm"
#include "code\game\machinery\defibrillator_mount.dm"
Expand Down Expand Up @@ -2656,7 +2665,6 @@
#include "code\modules\food_and_drinks\kitchen_machinery\grill.dm"
#include "code\modules\food_and_drinks\kitchen_machinery\icecream_vat.dm"
#include "code\modules\food_and_drinks\kitchen_machinery\microwave.dm"
#include "code\modules\food_and_drinks\kitchen_machinery\monkeyrecycler.dm"
#include "code\modules\food_and_drinks\kitchen_machinery\processor.dm"
#include "code\modules\food_and_drinks\kitchen_machinery\smartfridge.dm"
#include "code\modules\food_and_drinks\recipes\drinks_recipes.dm"
Expand Down Expand Up @@ -3285,13 +3293,6 @@
#include "code\modules\mob\living\simple_animal\hostile\retaliate\ghost.dm"
#include "code\modules\mob\living\simple_animal\hostile\retaliate\retaliate.dm"
#include "code\modules\mob\living\simple_animal\hostile\retaliate\spaceman.dm"
#include "code\modules\mob\living\simple_animal\slime\death.dm"
#include "code\modules\mob\living\simple_animal\slime\emote.dm"
#include "code\modules\mob\living\simple_animal\slime\life.dm"
#include "code\modules\mob\living\simple_animal\slime\powers.dm"
#include "code\modules\mob\living\simple_animal\slime\say.dm"
#include "code\modules\mob\living\simple_animal\slime\slime.dm"
#include "code\modules\mob\living\simple_animal\slime\subtypes.dm"
#include "code\modules\modular_computers\laptop_vendor.dm"
#include "code\modules\modular_computers\computers\_modular_computer_shared.dm"
#include "code\modules\modular_computers\computers\item\computer.dm"
Expand Down Expand Up @@ -3738,6 +3739,7 @@
#include "code\modules\research\designs\misc_designs.dm"
#include "code\modules\research\designs\nanite_designs.dm"
#include "code\modules\research\designs\power_designs.dm"
#include "code\modules\research\designs\slime_designs.dm"
#include "code\modules\research\designs\smelting_designs.dm"
#include "code\modules\research\designs\stock_parts_designs.dm"
#include "code\modules\research\designs\telecomms_designs.dm"
Expand Down Expand Up @@ -3779,31 +3781,25 @@
#include "code\modules\research\techweb\_techweb.dm"
#include "code\modules\research\techweb\_techweb_node.dm"
#include "code\modules\research\techweb\all_nodes.dm"
#include "code\modules\research\xenobiology\xenobio_camera.dm"
#include "code\modules\research\xenobiology\xenobiology.dm"
#include "code\modules\research\xenobiology\crossbreeding\__corecross.dm"
#include "code\modules\research\xenobiology\crossbreeding\_clothing.dm"
#include "code\modules\research\xenobiology\crossbreeding\_misc.dm"
#include "code\modules\research\xenobiology\crossbreeding\_mobs.dm"
#include "code\modules\research\xenobiology\crossbreeding\_potions.dm"
#include "code\modules\research\xenobiology\crossbreeding\_status_effects.dm"
#include "code\modules\research\xenobiology\crossbreeding\_structures.dm"
#include "code\modules\research\xenobiology\crossbreeding\_weapons.dm"
#include "code\modules\research\xenobiology\crossbreeding\burning.dm"
#include "code\modules\research\xenobiology\crossbreeding\charged.dm"
#include "code\modules\research\xenobiology\crossbreeding\chilling.dm"
#include "code\modules\research\xenobiology\crossbreeding\consuming.dm"
#include "code\modules\research\xenobiology\crossbreeding\crystalized.dm"
#include "code\modules\research\xenobiology\crossbreeding\gentle.dm"
#include "code\modules\research\xenobiology\crossbreeding\industrial.dm"
#include "code\modules\research\xenobiology\crossbreeding\prismatic.dm"
#include "code\modules\research\xenobiology\crossbreeding\recurring.dm"
#include "code\modules\research\xenobiology\crossbreeding\regenerative.dm"
#include "code\modules\research\xenobiology\crossbreeding\reproductive.dm"
#include "code\modules\research\xenobiology\crossbreeding\selfsustaining.dm"
#include "code\modules\research\xenobiology\crossbreeding\stabilized.dm"
#include "code\modules\research\xenobiology\crossbreeding\transformative.dm"
#include "code\modules\research\xenobiology\crossbreeding\warping.dm"
#include "code\modules\ruins\lavaland_ruin_code.dm"
#include "code\modules\ruins\lavalandruin_code\biodome_clown_planet.dm"
#include "code\modules\ruins\lavalandruin_code\pizzaparty.dm"
Expand Down Expand Up @@ -3911,6 +3907,40 @@
#include "code\modules\shuttle\super_cruise\shuttle_components\plasma_refiner.dm"
#include "code\modules\shuttle\super_cruise\shuttle_components\shuttle_console.dm"
#include "code\modules\shuttle\super_cruise\shuttle_components\shuttle_docking.dm"
#include "code\modules\slimecore\slime_effects.dm"
#include "code\modules\slimecore\corral\corral_data.dm"
#include "code\modules\slimecore\corral\upgrades\_base_upgrade.dm"
#include "code\modules\slimecore\corral\upgrades\human_docility_upgrade.dm"
#include "code\modules\slimecore\corral\upgrades\obliteration_upgrade.dm"
#include "code\modules\slimecore\mobs\_base_slime.dm"
#include "code\modules\slimecore\mobs\feeding_flora.dm"
#include "code\modules\slimecore\mobs\ai_controller\controller.dm"
#include "code\modules\slimecore\mobs\ai_controller\behaviours\clean_target.dm"
#include "code\modules\slimecore\mobs\ai_controller\behaviours\feed.dm"
#include "code\modules\slimecore\mobs\ai_controller\behaviours\find_target_without_trait.dm"
#include "code\modules\slimecore\mobs\ai_controller\behaviours\flee_from_item.dm"
#include "code\modules\slimecore\mobs\ai_controller\behaviours\slime_stacker.dm"
#include "code\modules\slimecore\mobs\ai_controller\subtrees\basic_melee_tree.dm"
#include "code\modules\slimecore\mobs\ai_controller\subtrees\cleaning_tree.dm"
#include "code\modules\slimecore\mobs\ai_controller\subtrees\find_target_slime.dm"
#include "code\modules\slimecore\mobs\ai_controller\subtrees\flee_with_item.dm"
#include "code\modules\slimecore\mobs\pet_commands\latch_feed.dm"
#include "code\modules\slimecore\mobs\pet_commands\stop_feeding.dm"
#include "code\modules\slimecore\slime_color_mutations\_base_color.dm"
#include "code\modules\slimecore\slime_color_mutations\colors.dm"
#include "code\modules\slimecore\slime_color_mutations\mutations\_base_mutation.dm"
#include "code\modules\slimecore\slime_color_mutations\mutations\colors.dm"
#include "code\modules\slimecore\slime_traits\_base_trait.dm"
#include "code\modules\slimecore\slime_traits\beer_slime.dm"
#include "code\modules\slimecore\slime_traits\cleaner.dm"
#include "code\modules\slimecore\slime_traits\docility.dm"
#include "code\modules\slimecore\slime_traits\endisnigh.dm"
#include "code\modules\slimecore\slime_traits\never_ooze.dm"
#include "code\modules\slimecore\slime_traits\never_split.dm"
#include "code\modules\slimecore\slime_traits\polluter.dm"
#include "code\modules\slimecore\slime_traits\radioactive.dm"
#include "code\modules\slimecore\slime_traits\slime_cat.dm"
#include "code\modules\slimecore\slime_traits\soda_slime.dm"
#include "code\modules\spells\spell.dm"
#include "code\modules\spells\spell_types\aimed.dm"
#include "code\modules\spells\spell_types\area_teleport.dm"
Expand Down Expand Up @@ -3969,7 +3999,6 @@
#include "code\modules\surgery\brain_recalibration.dm"
#include "code\modules\surgery\cauterize.dm"
#include "code\modules\surgery\cavity_implant.dm"
#include "code\modules\surgery\core_removal.dm"
#include "code\modules\surgery\coronary_bypass.dm"
#include "code\modules\surgery\dental_implant.dm"
#include "code\modules\surgery\eye_surgery.dm"
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,6 @@
#define BB_BASIC_MOB_CURRENT_TARGET "BB_basic_current_target"
#define BB_BASIC_MOB_CURRENT_TARGET_HIDING_LOCATION "BB_basic_current_target_hiding_location"
#define BB_TARGETTING_DATUM "targetting_datum"

/// Flag to set on if you want your mob to STOP running away
#define BB_BASIC_MOB_STOP_FLEEING "BB_basic_stop_fleeing"
32 changes: 32 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,35 @@
///Called after a client connects to a mob and all UI elements have been setup
#define COMSIG_MOB_CLIENT_LOGIN "comsig_mob_client_login"
#define COMSIG_MOB_MOUSE_SCROLL_ON "comsig_mob_mouse_scroll_on" //! from base of /mob/MouseWheelOn(): (atom/A, delta_x, delta_y, params)

#define COMSIG_MOB_STOP_HUNGER "stop_hunger_mob"
#define COMSIG_MOB_START_HUNGER "start_hunger_mob"
#define COMSIG_MOB_FEED "feed_hunger_mob"
#define COMSIG_MOB_FED_ON "fed_on_mob"
#define COMSIG_MOB_RETURN_HUNGER "return_hunger_mob"
#define COMSIG_MOB_REFUSED_EAT "refused_hunger_mob"
#define COMSIG_MOB_OVERATE "overate_hunger_mob"
#define COMSIG_MOB_EAT_NORMAL "normal_eat_hunger_mob"
#define COMSIG_MOB_STARVING "starving_hunger_mob"
#define COMSIG_MOB_FULLY_STARVING "full_starve_hunger_mob"
#define COMSIG_SECRETION_UPDATE "secretion_update"
#define COMSIG_FEEDING_CHECK "latch_check"
#define COMSIG_HUNGER_UPDATED "update_hunger_mob"
#define COMSIG_LIVING_ATE "living_ate_object"
#define COMSIG_MOB_ADJUST_HUNGER "adjust_hunger_mob"

#define COMSIG_EMOTION_STORE "store_emotion"
#define EMOTION_BUFFER_SPEAK_FROM_BUFFER "release_emotion"
#define COMSIG_EMOTION_HEARD "heard_emotion"
#define EMOTION_BUFFER_UPDATE_OVERLAY_STATES "update_emotion_overlay"

#define COMSIG_ATOM_JOIN_STACK "join_stack"
#define COMSIG_STACK_MOVE "stack_move"
#define COMSIG_CHECK_CAN_ADD_NEW_STACK "check_stack_add"
#define COMSIG_MOBSTACKER_DESTROY "mobstack_destroy_stack"

/// Signal sent when a blackboard key is set to a new value
#define COMSIG_AI_BLACKBOARD_KEY_SET(blackboard_key) "ai_blackboard_key_set_[blackboard_key]"

/// Signal sent when a blackboard key is cleared
#define COMSIG_AI_BLACKBOARD_KEY_CLEARED(blackboard_key) "ai_blackboard_key_clear_[blackboard_key]"
2 changes: 1 addition & 1 deletion code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(

#define ismouse(A) (istype(A, /mob/living/simple_animal/mouse))

#define isslime(A) (istype(A, /mob/living/simple_animal/slime))
#define isslime(A) (istype(A, /mob/living/basic/slime))

#define isdrone(A) (istype(A, /mob/living/simple_animal/drone))

Expand Down
5 changes: 5 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -603,3 +603,8 @@ GLOBAL_LIST_INIT(available_random_trauma_list, list(
#define STANDING_UP 0
/// Mob is lying down, usually associated with lying_angle values of 90 or 270.
#define LYING_DOWN 1

/// Default minimum body temperature mobs can exist in before taking damage
#define NPC_DEFAULT_MIN_TEMP 250
/// Default maximum body temperature mobs can exist in before taking damage
#define NPC_DEFAULT_MAX_TEMP 350
97 changes: 97 additions & 0 deletions code/__DEFINES/slimes.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
#define ADULT_SLIME (1<<0)
#define PASSIVE_SLIME (1<<1)
#define STORED_SLIME (1<<2)
#define MUTATING_SLIME (1<<3)
#define SPLITTING_SLIME (1<<4)
#define CLEANER_SLIME (1<<5)
#define OVERWRITES_COLOR (1<<6)
#define NOEVOLVE_SLIME (1<<7)
#define NOOOZE_SLIME (1<<8)

#define TRAIT_ON_DEATH (1<<0)
#define TRAIT_VISUAL (1<<1)

#define TRAIT_MUTATOR_USED "mutator_trait"
#define TRAIT_IN_STACK "inside_mob_stack"
#define TRAIT_FEEDING "feeding_trait"
#define LATCH_TRAIT "latch_trait"
#define TRAIT_LATCH_FEEDERED "feeder_targetted"

#define BB_BASIC_MOB_SCARED_ITEM "BB_basic_mob_scared_item"
#define BB_WONT_TARGET_CLIENTS "BB_wont_target_clients"

#define TRAIT_CAREFUL_STEPS "careful_steps"
#define TRAIT_SLIME_STASIS "slime_stasis"
#define TRAIT_SLIME_RABID "slime_rabid"
#define TRAIT_SLIME_DUST_IMMUNE "slime_dust_immune"
#define COMSIG_ATOM_SUCKED "atom_sucked"

#define TRAIT_OVERFED "overfed_trait"
#define VACPACK_THROW "vacpack_throw"

///from obj/item/vacuum_nozzle/afterattack(atom/movable/target, mob/user, proximity, params): (obj/item/vacuum_nozzle/nozzle, mob/user)
#define COMSIG_LIVING_VACUUM_PRESUCK "living_vacuum_presuck"
#define COMPONENT_LIVING_VACUUM_CANCEL_SUCK (1<<0)

#define SLIME_VALUE_TIER_1 200
#define SLIME_VALUE_TIER_2 400
#define SLIME_VALUE_TIER_3 800
#define SLIME_VALUE_TIER_4 1600
#define SLIME_VALUE_TIER_5 3200
#define SLIME_VALUE_TIER_6 6400
#define SLIME_VALUE_TIER_7 12800

#define SLIME_SELL_MODIFIER_MIN -0.08
#define SLIME_SELL_MODIFIER_MAX -0.01
#define SLIME_SELL_OTHER_MODIFIER_MIN 0.005
#define SLIME_SELL_OTHER_MODIFIER_MAX 0.01
#define SLIME_SELL_MAXIMUM_MODIFIER 2
#define SLIME_SELL_MINIMUM_MODIFIER 0.1
#define SLIME_RANDOM_MODIFIER_MIN -0.0003
#define SLIME_RANDOM_MODIFIER_MAX 0.0003


#define EMOTION_HAPPY "happy"
#define EMOTION_SAD "sad"
#define EMOTION_SCARED "scared"
#define EMOTION_FUNNY "funny"
#define EMOTION_ANGER "anger"
#define EMOTION_SUPRISED "suprised"
#define EMOTION_HUNGRY "hungry"

///key that holds decals we hunt
#define BB_CLEANABLE_DECALS "cleanable_decals"
///key that holds blood we hunt
#define BB_CLEANABLE_BLOOD "cleanable_blood"
///key that holds pests we hunt
#define BB_HUNTABLE_PESTS "huntable_pests"
///key that holds drawings we hunt
#define BB_CLEANABLE_DRAWINGS "cleanable_drawings"
///Key that holds our clean target
#define BB_CLEAN_TARGET "clean_target"
///key that holds trash we will burn
#define BB_HUNTABLE_TRASH "huntable_trash"


#define FOOD_CHANGE "food_change"
#define ENVIRONMENT_CHANGE "enviro_change"
#define BEHAVIOUR_CHANGE "behaviour_change"
#define DANGEROUS_CHANGE "dangerous_change"
#define DOCILE_CHANGE "docile_change"

#define FRIENDSHIP_HATED "hated"
#define FRIENDSHIP_DISLIKED "disliked"
#define FRIENDSHIP_STRANGER "stranger"
#define FRIENDSHIP_NEUTRAL "neutral"
#define FRIENDSHIP_ACQUAINTANCES "acquaintances"
#define FRIENDSHIP_FRIEND "friend"
#define FRIENDSHIP_BESTFRIEND "bestfriend"

#define COMSIG_FRIENDSHIP_CHECK_LEVEL "friendship_check_level"
#define COMSIG_FRIENDSHIP_CHANGE "friendship_change"
#define COMSIG_FRIENDSHIP_PASS_FRIENDSHIP "friendship_passfriends"

#define TRAIT_RAINBOWED "rainbowed"

#define COMSIG_ATOM_MOUSE_ENTERED "mouse_entered"
#define COMSIG_CLIENT_HOVER_NEW "client_new_hover"
2 changes: 1 addition & 1 deletion code/_onclick/hud/slime.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/datum/hud/slime
ui_style = 'icons/mob/screen_slime.dmi'

/datum/hud/slime/New(mob/living/simple_animal/slime/owner)
/datum/hud/slime/New(mob/living/basic/slime/owner)
..()
healths = new /atom/movable/screen/healths/slime()
healths.hud = src
Expand Down
13 changes: 0 additions & 13 deletions code/_onclick/other_mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -176,19 +176,6 @@
/atom/proc/attack_larva(mob/user)
return


/*
Slimes
Nothing happening here
*/
/mob/living/simple_animal/slime/UnarmedAttack(atom/A)
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
return
A.attack_slime(src)

/atom/proc/attack_slime(mob/user)
return

/*
Drones
*/
Expand Down
27 changes: 27 additions & 0 deletions code/controllers/subsystem/research.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ SUBSYSTEM_DEF(research)
//[88nodes * 5000points/node] / [1.5hr * 90min/hr * 60s/min]
//Around 450000 points max???

///our total xenobiology points
var/xenobio_points
var/list/slime_core_prices = list()
var/static/list/default_core_prices = list(
SLIME_VALUE_TIER_1,
SLIME_VALUE_TIER_2,
SLIME_VALUE_TIER_3,
SLIME_VALUE_TIER_4,
SLIME_VALUE_TIER_5,
SLIME_VALUE_TIER_6,
SLIME_VALUE_TIER_7,
)

/datum/controller/subsystem/research/Initialize()
point_types = TECHWEB_POINT_TYPE_LIST_ASSOCIATIVE_NAMES
initialize_all_techweb_designs()
Expand All @@ -50,6 +63,7 @@ SUBSYSTEM_DEF(research)
autosort_categories()
error_design = new
error_node = new
initialize_slime_prices()
return SS_INIT_SUCCESS

/datum/controller/subsystem/research/fire()
Expand All @@ -74,6 +88,19 @@ SUBSYSTEM_DEF(research)
science_tech.add_point_list(bitcoins)
last_income = world.time

for(var/core_type in slime_core_prices)
var/obj/item/slime_extract/core = core_type
var/price_mod = rand(SLIME_RANDOM_MODIFIER_MIN * 1000000, SLIME_RANDOM_MODIFIER_MAX * 1000000) / 1000000
var/price_limiter = 1 - ((default_core_prices[initial(core.tier)] * SLIME_SELL_MINIMUM_MODIFIER) / slime_core_prices[core_type])
slime_core_prices[core_type] = (1 + price_mod * price_limiter) * slime_core_prices[core_type]

/datum/controller/subsystem/research/proc/initialize_slime_prices()
for(var/core_type in subtypesof(/obj/item/slime_extract))
var/obj/item/slime_extract/core = core_type
if(!initial(core.tier))
continue
slime_core_prices[core_type] = default_core_prices[initial(core.tier)]

/datum/controller/subsystem/research/proc/calculate_server_coefficient() //Diminishing returns.
var/list/obj/machinery/rnd/server/active = new()
for(var/obj/machinery/rnd/server/miner in servers)
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/traumas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ SUBSYSTEM_DEF(traumas)
)),
"aliens" = typecacheof(list(
/mob/living/carbon/alien,
/mob/living/simple_animal/slime
/mob/living/basic/slime
)),
"conspiracies" = typecacheof(list(
/mob/living/simple_animal/bot/secbot,
Expand Down
Loading
Loading