basic gutlunchers and ashwalker ranching (#79508)

## About The Pull Request
this pr transforms gutlunchers into basic mobs and gives them a small
ranch that ashwalkers can manage. gutlunches come in various colors and
sizes! female gutlunches will come in different shades of red and males
will come in shades of blue. the child born will have a mix of his
parent's colors.
![the
farm](https://github.com/tgstation/tgstation/assets/138636438/41fdb1ed-e567-4c8d-bb83-b296f878c862)
female gutlunches can make various healing milk and medicine from its
udder. but it will need to consume ores before it can start making milk,
u can either feed it by hand or u can put ores in the wooden trough and
they will go eat from it whenever they get hungry. feeding it gold or
bluespace ore will improve the healing quality of the milk for a short
while

![trough](https://github.com/tgstation/tgstation/assets/138636438/b9c84d18-fdd8-476b-b779-bdfe49dd7e88)
the male gutlunchers are obedient pets. their stats vary from one
another in speed, attack and health. a male gutlunchers stats will
depend on the stats of his parents, the higher his parent's stats are
the better chances he has at rolling higher stats. so u can selectively
breed them to make sure they have the best stats possible. they will
listen to all ur commands and can mine walls or attack enemies if given
the command. also i wanted the farm to have wood fences so i added them
to the game, they cost 5 wood planks to make



## Why It's Good For The Game
refactors gutlunches into basic mobs. also i turned breeding into a
component so it can be applied to all animals and created a breed
command, pets that have this command and the component will go breed
with a partner u point at.

## Changelog
🆑
refactor: gutlunches have been refactored into basic mobs. please report
any bugs
add: ashwalkers have a small ranch they can manage
fix: wall tearer compnent wont runtime when interacting with mineral
walls
/🆑
This commit is contained in:
Ben10Omintrix
2023-11-13 10:20:19 +02:00
committed by GitHub
parent 10deb0f8cb
commit 7a44f10993
39 changed files with 1261 additions and 377 deletions
@@ -0,0 +1,62 @@
///structure to contain ores
/obj/structure/ore_container
/obj/structure/ore_container/attackby(obj/item/ore, mob/living/carbon/human/user, list/modifiers)
if(istype(ore, /obj/item/stack/ore) && !user.combat_mode)
ore.forceMove(src)
return
return ..()
/obj/structure/ore_container/Entered(atom/movable/mover)
. = ..()
update_appearance(UPDATE_OVERLAYS)
/obj/structure/ore_container/Exited(atom/movable/mover)
. = ..()
update_appearance(UPDATE_OVERLAYS)
/obj/structure/ore_container/ui_interact(mob/user, datum/tgui/ui)
. = ..()
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "OreContainer")
ui.open()
/obj/structure/ore_container/ui_data(mob/user)
var/list/data = list()
data["ores"] = list()
for(var/obj/item/stack/ore/ore_item in contents)
data["ores"] += list(list(
"id" = REF(ore_item),
"name" = ore_item.name,
"amount" = ore_item.amount,
))
return data
/obj/structure/ore_container/ui_static_data(mob/user)
var/list/data = list()
data["ore_images"] = list()
for(var/obj/item/stack/ore_item as anything in subtypesof(/obj/item/stack/ore))
data["ore_images"] += list(list(
"name" = initial(ore_item.name),
"icon" = icon2base64(getFlatIcon(image(icon = initial(ore_item.icon), icon_state = initial(ore_item.icon_state)), no_anim=TRUE))
))
return data
/obj/structure/ore_container/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..()
if(. || !isliving(ui.user))
return TRUE
var/mob/living/customer = ui.user
var/obj/item/stack_to_move
switch(action)
if("withdraw")
if(isnull(params["reference"]))
return TRUE
stack_to_move = locate(params["reference"]) in contents
if(isnull(stack_to_move))
return TRUE
stack_to_move.forceMove(get_turf(customer))
return TRUE
+39 -7
View File
@@ -17,6 +17,8 @@
var/climbable = TRUE
///Initial direction of the railing.
var/ini_dir
///item released when deconstructed
var/item_deconstruct = /obj/item/stack/rods
/datum/armor/structure_railing
melee = 35
@@ -98,13 +100,11 @@
return TRUE
/obj/structure/railing/deconstruct(disassembled)
if(!(flags_1 & NODECONSTRUCT_1))
if (istype(src,/obj/structure/railing/corner)) // Corner railings only cost 1 rod
var/obj/item/stack/rods/rod = new /obj/item/stack/rods(drop_location(), 1)
transfer_fingerprints_to(rod)
else
var/obj/item/stack/rods/rod = new /obj/item/stack/rods(drop_location(), 2)
transfer_fingerprints_to(rod)
if((flags_1 & NODECONSTRUCT_1))
return ..()
var/rods_to_make = istype(src,/obj/structure/railing/corner) ? 1 : 2
var/obj/rod = new item_deconstruct(drop_location(), rods_to_make)
transfer_fingerprints_to(rod)
return ..()
///Implements behaviour that makes it possible to unanchor the railing.
@@ -156,3 +156,35 @@
/obj/structure/railing/proc/check_anchored(checked_anchored)
if(anchored == checked_anchored)
return TRUE
/obj/structure/railing/wooden_fence
name = "wooden fence"
desc = "wooden fence meant to keep animals in."
icon = 'icons/obj/structures.dmi'
icon_state = "wooden_railing"
item_deconstruct = /obj/item/stack/sheet/mineral/wood
plane = GAME_PLANE_FOV_HIDDEN
layer = ABOVE_MOB_LAYER
/obj/structure/railing/wooden_fence/Initialize(mapload)
. = ..()
RegisterSignal(src, COMSIG_ATOM_DIR_CHANGE, PROC_REF(on_change_layer))
adjust_dir_layer(dir)
/obj/structure/railing/wooden_fence/proc/on_change_layer(datum/source, old_dir, new_dir)
SIGNAL_HANDLER
adjust_dir_layer(new_dir)
/obj/structure/railing/wooden_fence/proc/adjust_dir_layer(direction)
var/new_layer = (direction & NORTH) ? MOB_LAYER : ABOVE_MOB_LAYER
layer = new_layer
/obj/structure/railing/corner/end/wooden_fence
icon = 'icons/obj/structures.dmi'
icon_state = "wooden_railing_corner"
/obj/structure/railing/corner/end/flip/wooden_fence
icon = 'icons/obj/structures.dmi'
icon_state = "wooden_railing_corner_flipped"