mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Frog Basic Mob Refactor (#72044)
## About The Pull Request Refactors the frog into a basic mob. The frog now does the same as the old frog and can now properly be commanded by the regal rats. ## Why It's Good For The Game ## Changelog 🆑 refactor: Refractors the frog into a basic mob /🆑
This commit is contained in:
@@ -667,7 +667,7 @@
|
||||
pixel_x = 15;
|
||||
pixel_y = 14
|
||||
},
|
||||
/mob/living/simple_animal/hostile/retaliate/frog{
|
||||
/mob/living/basic/frog{
|
||||
name = "Peter Jr."
|
||||
},
|
||||
/turf/open/floor/plating/icemoon,
|
||||
|
||||
@@ -886,7 +886,7 @@
|
||||
/area/shuttle/escape)
|
||||
"Iw" = (
|
||||
/obj/item/reagent_containers/cup/bucket,
|
||||
/mob/living/simple_animal/hostile/retaliate/frog,
|
||||
/mob/living/basic/frog,
|
||||
/turf/open/floor/grass,
|
||||
/area/shuttle/escape)
|
||||
"Iz" = (
|
||||
|
||||
@@ -48,6 +48,10 @@
|
||||
emote_hear = list("squeaks.")
|
||||
emote_see = list("runs in a circle.", "shakes.")
|
||||
|
||||
/datum/ai_planning_subtree/random_speech/frog
|
||||
speech_chance = 3
|
||||
emote_see = list("jumps in a circle.", "shakes.")
|
||||
|
||||
/datum/ai_planning_subtree/random_speech/sheep
|
||||
speech_chance = 5
|
||||
speak = list("baaa","baaaAAAAAH!","baaah")
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
loot = list( // This spawner will scatter water related items around a moist site.
|
||||
/obj/item/clothing/head/cone = 7,
|
||||
/obj/item/clothing/suit/caution = 3,
|
||||
/mob/living/simple_animal/hostile/retaliate/frog = 2,
|
||||
/mob/living/basic/frog = 2,
|
||||
/obj/item/reagent_containers/cup/rag = 2,
|
||||
/obj/item/reagent_containers/cup/bucket = 2,
|
||||
/obj/effect/decal/cleanable/blood/old = 2,
|
||||
|
||||
+43
-11
@@ -1,18 +1,20 @@
|
||||
/mob/living/simple_animal/hostile/retaliate/frog
|
||||
/mob/living/basic/frog
|
||||
name = "frog"
|
||||
desc = "They seem a little sad."
|
||||
icon_state = "frog"
|
||||
icon_living = "frog"
|
||||
icon_dead = "frog_dead"
|
||||
mob_biotypes = MOB_ORGANIC|MOB_BEAST
|
||||
speak = list("ribbit","croak")
|
||||
emote_see = list("hops in a circle.", "shakes.")
|
||||
speak_chance = 1
|
||||
turns_per_move = 5
|
||||
verb_say = "ribbits"
|
||||
verb_ask = "ribbits inquisitively"
|
||||
verb_exclaim = "croaks"
|
||||
verb_yell = "croaks loudly"
|
||||
maxHealth = 15
|
||||
health = 15
|
||||
speed = 1.1
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 5
|
||||
obj_damage = 10
|
||||
attack_verb_continuous = "bites"
|
||||
attack_verb_simple = "bite"
|
||||
response_help_continuous = "pets"
|
||||
@@ -32,13 +34,18 @@
|
||||
held_w_class = WEIGHT_CLASS_TINY
|
||||
worn_slot_flags = ITEM_SLOT_HEAD
|
||||
head_icon = 'icons/mob/clothing/head/pets_head.dmi'
|
||||
|
||||
habitable_atmos = list("min_oxy" = 3, "max_oxy" = 0, "min_plas" = 0, "max_plas" = 15, "min_co2" = 0, "max_co2" = 15, "min_n2" = 0, "max_n2" = 0)
|
||||
|
||||
ai_controller = /datum/ai_controller/basic_controller/frog
|
||||
|
||||
var/stepped_sound = 'sound/effects/huuu.ogg'
|
||||
///How much of a reagent the mob injects on attack
|
||||
var/poison_per_bite = 3
|
||||
///What reagent the mob injects targets with
|
||||
var/poison_type = /datum/reagent/drug/space_drugs
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/frog/Initialize(mapload)
|
||||
/mob/living/basic/frog/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
ADD_TRAIT(src, TRAIT_VENTCRAWLER_ALWAYS, INNATE_TRAIT)
|
||||
@@ -57,15 +64,40 @@
|
||||
)
|
||||
AddElement(/datum/element/connect_loc, loc_connections)
|
||||
AddElement(/datum/element/venomous, poison_type, poison_per_bite)
|
||||
add_cell_sample()
|
||||
AddElement(/datum/element/ai_retaliate)
|
||||
AddElement(/datum/element/swabable, CELL_LINE_TABLE_FROG, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5)
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/frog/proc/on_entered(datum/source, AM as mob|obj)
|
||||
/mob/living/basic/frog/proc/on_entered(datum/source, AM as mob|obj)
|
||||
SIGNAL_HANDLER
|
||||
if(!stat && isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
if(L.mob_size > MOB_SIZE_TINY)
|
||||
playsound(src, stepped_sound, 50, TRUE)
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/frog/add_cell_sample()
|
||||
. = ..()
|
||||
AddElement(/datum/element/swabable, CELL_LINE_TABLE_FROG, CELL_VIRUS_TABLE_GENERIC_MOB, 1, 5)
|
||||
/datum/ai_controller/basic_controller/frog
|
||||
blackboard = list(
|
||||
BB_TARGETTING_DATUM = new /datum/targetting_datum/basic(),
|
||||
BB_PET_TARGETTING_DATUM = new /datum/targetting_datum/not_friends(),
|
||||
)
|
||||
|
||||
ai_movement = /datum/ai_movement/basic_avoidance
|
||||
idle_behavior = /datum/idle_behavior/idle_random_walk
|
||||
planning_subtrees = list(
|
||||
/datum/ai_planning_subtree/target_retaliate,
|
||||
/datum/ai_planning_subtree/random_speech/frog,
|
||||
/datum/ai_planning_subtree/basic_melee_attack_subtree/frog,
|
||||
)
|
||||
|
||||
/datum/ai_planning_subtree/basic_melee_attack_subtree/frog
|
||||
melee_attack_behavior = /datum/ai_behavior/basic_melee_attack/frog
|
||||
|
||||
/datum/ai_behavior/basic_melee_attack/frog
|
||||
action_cooldown = 2.5 SECONDS
|
||||
|
||||
/datum/ai_controller/basic_controller/frog/trash
|
||||
planning_subtrees = list(
|
||||
/datum/ai_planning_subtree/pet_planning,
|
||||
/datum/ai_planning_subtree/random_speech/frog,
|
||||
/datum/ai_planning_subtree/simple_find_target,
|
||||
/datum/ai_planning_subtree/basic_melee_attack_subtree/frog,
|
||||
)
|
||||
@@ -288,7 +288,7 @@
|
||||
return
|
||||
|
||||
var/uplifted_frog = FALSE
|
||||
for (var/mob/living/simple_animal/hostile/retaliate/frog/nearby_frog in oview(owner, range))
|
||||
for (var/mob/living/basic/frog/nearby_frog in oview(owner, range))
|
||||
uplifted_frog = convert_frog(nearby_frog, converted_check_list) || uplifted_frog
|
||||
if (uplifted_frog)
|
||||
owner.visible_message(span_warning("[owner] commands their army to action, mutating them into trash frogs!"))
|
||||
@@ -303,7 +303,7 @@
|
||||
|
||||
/// Makes a passed mob into our minion
|
||||
/datum/action/cooldown/riot/proc/make_minion(mob/living/new_minion, minion_desc, list/command_list = mouse_commands)
|
||||
if (isbasicmob(new_minion)) // One day this will work for frogs too
|
||||
if (isbasicmob(new_minion))
|
||||
new_minion.AddComponent(/datum/component/obeys_commands, command_list)
|
||||
qdel(new_minion.GetComponent(/datum/component/tameable)) // Rats don't share
|
||||
new_minion.befriend(owner)
|
||||
@@ -361,11 +361,12 @@
|
||||
return TRUE
|
||||
|
||||
/// Turns a frog into a crazy frog. This doesn't do anything interesting and should when it becomes a basic mob.
|
||||
/datum/action/cooldown/riot/proc/convert_frog(mob/living/simple_animal/hostile/retaliate/frog/nearby_frog, list/converted_check_list)
|
||||
/datum/action/cooldown/riot/proc/convert_frog(mob/living/basic/frog/nearby_frog, list/converted_check_list)
|
||||
// No need to convert when not on the same team.
|
||||
if(faction_check(nearby_frog.faction, converted_check_list))
|
||||
if(faction_check(nearby_frog.faction, converted_check_list) || nearby_frog.stat == DEAD)
|
||||
return FALSE
|
||||
|
||||
var/list/minion_commands = mouse_commands
|
||||
if (!findtext(nearby_frog.name, "trash"))
|
||||
nearby_frog.name = replacetext(nearby_frog.name, "frog", "trash frog")
|
||||
|
||||
@@ -376,8 +377,10 @@
|
||||
nearby_frog.health += 10
|
||||
nearby_frog.melee_damage_lower += 1
|
||||
nearby_frog.melee_damage_upper += 5
|
||||
nearby_frog.obj_damage += 10
|
||||
nearby_frog.ai_controller = new /datum/ai_controller/basic_controller/frog/trash(nearby_frog)
|
||||
var/crazy_frog_desc = " ...[findtext(nearby_frog.name, "rare") ? "even though" : "perhaps because"] they live in a trash bag."
|
||||
make_minion(nearby_frog, crazy_frog_desc)
|
||||
make_minion(nearby_frog, crazy_frog_desc, minion_commands)
|
||||
return TRUE
|
||||
|
||||
// Command you can give to a mouse to make it kill someone
|
||||
|
||||
@@ -581,7 +581,7 @@
|
||||
/datum/reagent/toxin = -1)
|
||||
|
||||
virus_suspectibility = 0.5
|
||||
resulting_atoms = list(/mob/living/simple_animal/hostile/retaliate/frog = 1)
|
||||
resulting_atoms = list(/mob/living/basic/frog = 1)
|
||||
|
||||
/datum/micro_organism/cell_line/walking_mushroom
|
||||
desc = "motile fungal hyphae"
|
||||
|
||||
@@ -275,7 +275,6 @@
|
||||
/mob/living/simple_animal/hostile/retaliate/clown/mutant,
|
||||
/mob/living/simple_animal/hostile/retaliate/clown/mutant/glutton,
|
||||
/mob/living/simple_animal/hostile/retaliate/clown/mutant/slow,
|
||||
/mob/living/simple_animal/hostile/retaliate/frog,
|
||||
/mob/living/simple_animal/hostile/retaliate/ghost,
|
||||
/mob/living/simple_animal/hostile/retaliate/goat,
|
||||
/mob/living/simple_animal/hostile/retaliate/goose,
|
||||
|
||||
+1
-1
@@ -3661,6 +3661,7 @@
|
||||
#include "code\modules\mob\living\basic\syndicate\syndicate_ai.dm"
|
||||
#include "code\modules\mob\living\basic\vermin\axolotl.dm"
|
||||
#include "code\modules\mob\living\basic\vermin\cockroach.dm"
|
||||
#include "code\modules\mob\living\basic\vermin\frog.dm"
|
||||
#include "code\modules\mob\living\basic\vermin\mothroach.dm"
|
||||
#include "code\modules\mob\living\basic\vermin\mouse.dm"
|
||||
#include "code\modules\mob\living\brain\brain.dm"
|
||||
@@ -3935,7 +3936,6 @@
|
||||
#include "code\modules\mob\living\simple_animal\hostile\mining_mobs\elites\pandora.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\retaliate\bat.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\retaliate\clown.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\retaliate\frog.dm"
|
||||
#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"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/mob/living/simple_animal/hostile/retaliate/frog : /mob/living/basic/frog{@OLD}
|
||||
Reference in New Issue
Block a user