Skip to content

Commit 33fb5d1

Browse files
Adding various trained birds to Pyrelight.
1 parent c8875c2 commit 33fb5d1

File tree

11 files changed

+146
-0
lines changed

11 files changed

+146
-0
lines changed

mods/pyrelight/_pyrelight.dme

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
#include "datum\factions.dm"
1313
#include "datum\locations.dm"
1414
#include "datum\religions.dm"
15+
#include "mobs\birds\_bird.dm"
16+
#include "mobs\birds\crow.dm"
17+
#include "mobs\birds\hawk.dm"
18+
#include "mobs\birds\pigeon.dm"
1519
#include "plants\_plants.dm"
1620
#include "plants\_plot.dm"
1721
#include "plants\_subsystem.dm"
@@ -20,6 +24,7 @@
2024
#include "plants\plants_fruit_template.dm"
2125
#include "plants\fruit_subtypes\nightweave.dm"
2226
#include "plants\plant_subtypes\nightweave.dm"
27+
#include "structures\hutch.dm"
2328
#include "undead\undead.dm"
2429
#include "undead\undead_skeleton.dm"
2530
#include "undead\undead_zombie.dm"

mods/pyrelight/icons/mobs/crow.dmi

2.71 KB
Binary file not shown.

mods/pyrelight/icons/mobs/hawk.dmi

6.1 KB
Binary file not shown.
3.02 KB
Binary file not shown.
718 Bytes
Binary file not shown.
641 Bytes
Binary file not shown.

mods/pyrelight/mobs/birds/_bird.dm

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/mob/living/simple_animal/trained_bird
2+
mob_size = MOB_SIZE_SMALL
3+
abstract_type = /mob/living/simple_animal/trained_bird
4+
holder_type = /obj/item/holder/bird
5+
6+
/mob/living/simple_animal/trained_bird/proc/handle_holder_interaction(mob/user)
7+
return FALSE
8+
9+
/mob/living/simple_animal/trained_bird/proc/process_target(mob/thrower, atom/target)
10+
visible_message("\The [src] follows [thrower]'s directions and attacks [target]!")
11+
return FALSE
12+
13+
/mob/living/simple_animal/trained_bird/proc/process_handler_failure(mob/thrower, atom/target)
14+
visible_message("\The [src] ignores [target] in favour of attacking [thrower]!")
15+
return FALSE
16+
17+
/obj/item/holder/bird
18+
w_class = MOB_SIZE_SMALL
19+
20+
/obj/item/holder/bird/attack_self(mob/user)
21+
var/mob/living/simple_animal/trained_bird/bird = locate() in contents
22+
if(bird?.handle_holder_interaction(user))
23+
return TRUE
24+
return ..()
25+
26+
/obj/item/holder/bird/end_throw(datum/thrownthing/TT)
27+
var/mob/living/simple_animal/trained_bird/bird = locate() in contents
28+
. = ..()
29+
if(!TT.thrower || !bird || QDELETED(src) || bird.loc != src)
30+
return
31+
bird.dropInto(loc)
32+
qdel(src) // This will happen shortly regardless, but might as well skip the 1ds delay.
33+
bird.visible_message("\The [bird] was thrown by \the [TT.thrower] at \the [TT.target].")
34+
if(bird.ai)
35+
if(bird.ai.is_friend(TT.thrower))
36+
bird.process_target(TT.thrower, TT.target)
37+
else
38+
bird.process_handler_failure(TT.thrower, TT.target)

mods/pyrelight/mobs/birds/crow.dm

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/datum/mob_controller/passive/crow
2+
emote_speech = list("Caw.","Caw!","Caw...")
3+
emote_hear = list("croaks", "caws")
4+
emote_see = list("preens its feathers", "hops around")
5+
6+
/mob/living/simple_animal/trained_bird/crow
7+
name = "crow"
8+
icon = 'mods/pyrelight/icons/mobs/crow.dmi'
9+
ai = /datum/mob_controller/passive/crow

mods/pyrelight/mobs/birds/hawk.dm

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/mob/living/simple_animal/trained_bird/hawk
2+
name = "hawk"
3+
icon = 'mods/pyrelight/icons/mobs/hawk.dmi'
4+
ai = /datum/mob_controller/passive/hunter/hawk
5+
6+
/datum/mob_controller/passive/hunter/hawk
7+
emote_speech = list("Skree!","SKREE!","Skree!?")
8+
emote_hear = list("screeches", "screams")
9+
emote_see = list("preens its feathers", "flicks its wings", "looks sharply around")
10+
11+
// Throw bird at target/afterattack on holder:
12+
// Pass husbandry check
13+
// Item: retrieves
14+
// Mob: attacks
15+
// Fail husbandry check
16+
// Attacks you (for a short time, like goats)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/mob/living/simple_animal/trained_bird/pigeon
2+
name = "pigeon"
3+
icon = 'mods/pyrelight/icons/mobs/pigeon.dmi'
4+
ai = /datum/mob_controller/passive/pigeon
5+
6+
/datum/mob_controller/passive/pigeon
7+
emote_speech = list("Oo-ooo.","Oo-ooo?","Oo-ooo...")
8+
emote_hear = list("coos")
9+
emote_see = list("preens its feathers", "puffs out its neck", "ruffles its wings")

0 commit comments

Comments
 (0)