mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-25 16:45:42 +00:00
## About The Pull Request We currently have 2 types of xenos in the codebase, simple animal and carbon. I'd like to unite them both under basic, and I thought I should go for simple animal first since it's more of a conversion than a remake. This helps set a base for a future basic-only xeno, which would require the following: - Basic mobs (or just anything than Carbon) to have Organs, which we can then use for things like referring to their plasma sac for egg-laying, etc. - All xeno types having a basic mob variant, preferably with an AI so they would work without a player. - Something be done about larva, either we'd split basic xenos into "larva" and "adult" (like carbon) or have it be a separate path that can also have organs so they can still have hivemind. Everything else seems to have been done overtime as simple animals have been converted to basic (HUDs and holding things now seem possible, etc.) Even if this doesn't work out, at least this cuts off a good chunk of the remaining simple animals to convert to basic. Sprites used (for mapping helpers): Fire medkit Toxin medkit Oingo Boingo punch face (i tried to shrink it down) ## Why It's Good For The Game This helps advance us move away from simple animals, and helps move carbon xenos to basic mob later too if that's what we want to go for. ## Changelog 🆑 refactor: Xenomorphs (Lavaland & Oldstation ones) are now basic mobs. /🆑
163 lines
3.7 KiB
Plaintext
163 lines
3.7 KiB
Plaintext
#define SPAWN_ALWAYS 100
|
|
#define SPAWN_LIKELY 85
|
|
#define SPAWN_UNLIKELY 35
|
|
#define SPAWN_RARE 10
|
|
|
|
/datum/modular_mob_segment
|
|
/// Spawn no more than this amount
|
|
var/max = 4
|
|
/// Set this to false if you want explicitly what's in the list to spawn
|
|
var/exact = FALSE
|
|
/// The list of mobs to spawn
|
|
var/list/mob/living/mobs = list()
|
|
/// The mobs spawned from this segment
|
|
var/list/spawned_mob_refs = list()
|
|
/// Chance this will spawn (1 - 100)
|
|
var/probability = SPAWN_LIKELY
|
|
|
|
/// Spawns mobs in a circle around the location
|
|
/datum/modular_mob_segment/proc/spawn_mobs(turf/origin)
|
|
if(!prob(probability))
|
|
return
|
|
|
|
var/total_amount = exact ? rand(1, max) : length(mobs)
|
|
|
|
shuffle_inplace(mobs)
|
|
|
|
|
|
var/list/turf/nearby = list()
|
|
for(var/turf/tile as anything in RANGE_TURFS(2, origin))
|
|
if(!tile.is_blocked_turf())
|
|
nearby += tile
|
|
|
|
if(!length(nearby))
|
|
stack_trace("Couldn't find any valid turfs to spawn on")
|
|
return
|
|
|
|
for(var/index in 1 to total_amount)
|
|
// For each of those, we need to find an open space
|
|
var/turf/destination = pick(nearby)
|
|
|
|
var/path // Either a random mob or the next mob in the list
|
|
if(exact)
|
|
path = mobs[index]
|
|
else
|
|
path = pick(mobs)
|
|
|
|
var/mob/living/mob = new path(destination)
|
|
nearby -= destination
|
|
spawned_mob_refs.Add(WEAKREF(mob))
|
|
|
|
// Some generic mob segments. If you want to add generic ones for any map, add them here
|
|
|
|
/datum/modular_mob_segment/gondolas
|
|
mobs = list(
|
|
/mob/living/simple_animal/pet/gondola,
|
|
)
|
|
|
|
/datum/modular_mob_segment/corgis
|
|
max = 2
|
|
mobs = list(
|
|
/mob/living/basic/pet/dog/corgi,
|
|
)
|
|
|
|
/datum/modular_mob_segment/monkeys
|
|
mobs = list(
|
|
/mob/living/carbon/human/species/monkey,
|
|
)
|
|
|
|
/datum/modular_mob_segment/syndicate_team
|
|
mobs = list(
|
|
/mob/living/basic/trooper/syndicate/ranged,
|
|
/mob/living/basic/trooper/syndicate/melee,
|
|
)
|
|
|
|
/datum/modular_mob_segment/abductor_agents
|
|
mobs = list(
|
|
/mob/living/basic/trooper/abductor/melee,
|
|
/mob/living/basic/trooper/abductor/ranged,
|
|
)
|
|
|
|
/datum/modular_mob_segment/syndicate_elite
|
|
mobs = list(
|
|
/mob/living/basic/trooper/syndicate/melee/sword/space/stormtrooper,
|
|
/mob/living/basic/trooper/syndicate/ranged/space/stormtrooper,
|
|
)
|
|
|
|
/datum/modular_mob_segment/bears
|
|
max = 2
|
|
mobs = list(
|
|
/mob/living/basic/bear,
|
|
)
|
|
|
|
/datum/modular_mob_segment/bees
|
|
exact = TRUE
|
|
mobs = list(
|
|
/mob/living/basic/bee,
|
|
/mob/living/basic/bee,
|
|
/mob/living/basic/bee,
|
|
/mob/living/basic/bee,
|
|
/mob/living/basic/bee/queen,
|
|
)
|
|
|
|
/datum/modular_mob_segment/bees_toxic
|
|
mobs = list(
|
|
/mob/living/basic/bee/toxin,
|
|
)
|
|
|
|
/datum/modular_mob_segment/blob_spores
|
|
mobs = list(
|
|
/mob/living/basic/blob_minion,
|
|
)
|
|
|
|
/datum/modular_mob_segment/carps
|
|
mobs = list(
|
|
/mob/living/basic/carp,
|
|
)
|
|
|
|
/datum/modular_mob_segment/hivebots
|
|
mobs = list(
|
|
/mob/living/basic/hivebot,
|
|
/mob/living/basic/hivebot/range,
|
|
)
|
|
|
|
/datum/modular_mob_segment/hivebots_strong
|
|
mobs = list(
|
|
/mob/living/basic/hivebot/strong,
|
|
/mob/living/basic/hivebot/range,
|
|
)
|
|
|
|
/datum/modular_mob_segment/lavaland_assorted
|
|
mobs = list(
|
|
/mob/living/basic/mining/basilisk,
|
|
/mob/living/basic/mining/goliath,
|
|
/mob/living/basic/mining/brimdemon,
|
|
/mob/living/basic/mining/lobstrosity,
|
|
)
|
|
|
|
/datum/modular_mob_segment/spiders
|
|
mobs = list(
|
|
/mob/living/basic/spider/giant/ambush,
|
|
/mob/living/basic/spider/giant/hunter,
|
|
/mob/living/basic/spider/giant/nurse,
|
|
/mob/living/basic/spider/giant/tarantula,
|
|
/mob/living/basic/spider/giant/midwife,
|
|
)
|
|
|
|
/datum/modular_mob_segment/venus_trap
|
|
mobs = list(
|
|
/mob/living/basic/venus_human_trap,
|
|
)
|
|
|
|
/datum/modular_mob_segment/xenos
|
|
mobs = list(
|
|
/mob/living/basic/alien,
|
|
/mob/living/basic/alien/sentinel,
|
|
/mob/living/basic/alien/drone,
|
|
)
|
|
|
|
#undef SPAWN_ALWAYS
|
|
#undef SPAWN_LIKELY
|
|
#undef SPAWN_UNLIKELY
|
|
#undef SPAWN_RARE
|