mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 11:05:16 +01:00
[MIRROR] Stabilized gold extracts can now summon basicmobs [MDB IGNORE] (#19917)
* Stabilized gold extracts can now summon basicmobs (#74020) ## About The Pull Request Stabilized gold extracts can now summon basicmobs, Also, summoned familiars become friendly to the owner, which stops stuff like mice running away. ## Why It's Good For The Game They can now make cool basicmob carp and stuff Fixes #74008 ## Changelog 🆑 fix: Stabilized gold extracts can now spawn basicmobs /🆑 * Stabilized gold extracts can now summon basicmobs --------- Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com>
This commit is contained in:
@@ -1034,7 +1034,12 @@
|
||||
if(QDELETED(familiar))
|
||||
familiar = new linked.mob_type(get_turf(owner.loc))
|
||||
familiar.name = linked.mob_name
|
||||
familiar.del_on_death = TRUE
|
||||
if(isanimal(familiar))
|
||||
familiar.del_on_death = TRUE
|
||||
else //we are a basicmob otherwise
|
||||
var/mob/living/basic/basic_familiar = familiar
|
||||
basic_familiar.basic_mob_flags |= DEL_ON_DEATH
|
||||
familiar.befriend(owner)
|
||||
familiar.copy_languages(owner, LANGUAGE_MASTER)
|
||||
if(linked.saved_mind)
|
||||
linked.saved_mind.transfer_to(familiar)
|
||||
|
||||
@@ -130,11 +130,12 @@ Stabilized extracts:
|
||||
/obj/item/slimecross/stabilized/gold/proc/generate_mobtype()
|
||||
var/static/list/mob_spawn_pets = list()
|
||||
if(!length(mob_spawn_pets))
|
||||
for(var/T in typesof(/mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/SA = T
|
||||
switch(initial(SA.gold_core_spawnable))
|
||||
if(FRIENDLY_SPAWN)
|
||||
mob_spawn_pets += T
|
||||
for(var/mob/living/simple_animal/animal as anything in subtypesof(/mob/living/simple_animal))
|
||||
if(initial(animal.gold_core_spawnable) == FRIENDLY_SPAWN)
|
||||
mob_spawn_pets += animal
|
||||
for(var/mob/living/basic/basicanimal as anything in subtypesof(/mob/living/basic))
|
||||
if(initial(basicanimal.gold_core_spawnable) == FRIENDLY_SPAWN)
|
||||
mob_spawn_pets += basicanimal
|
||||
mob_type = pick(mob_spawn_pets)
|
||||
|
||||
/obj/item/slimecross/stabilized/gold/Initialize(mapload)
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
/datum/unit_test/spawn_mobs
|
||||
|
||||
/datum/unit_test/spawn_mobs/Run()
|
||||
for(var/_animal in typesof(/mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/animal = _animal
|
||||
if (initial(animal.gold_core_spawnable) == HOSTILE_SPAWN || initial(animal.gold_core_spawnable) == FRIENDLY_SPAWN)
|
||||
allocate(_animal)
|
||||
for(var/mob/living/simple_animal/animal as anything in subtypesof(/mob/living/simple_animal))
|
||||
if (initial(animal.gold_core_spawnable))
|
||||
allocate(animal)
|
||||
for(var/mob/living/basic/basic_animal as anything in subtypesof(/mob/living/basic))
|
||||
if (initial(basic_animal.gold_core_spawnable))
|
||||
allocate(basic_animal)
|
||||
|
||||
Reference in New Issue
Block a user