Skip to content

Commit 1289ff8

Browse files
Moving birds into their own modpack.
1 parent 62c031d commit 1289ff8

21 files changed

Lines changed: 67 additions & 41 deletions

File tree

code/datums/ai/hunter.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,5 @@
8686
consume_prey(prey)
8787

8888
// Stub for hawks to return to their handler and dock with the mothership.
89-
/datum/mob_controller/passive/hunter/proc/handle_friend_hunting(mob/friend)
89+
/datum/mob_controller/passive/hunter/proc/handle_friend_hunting(mob/user)
9090
return FALSE

code/datums/storage/subtypes_backpack.dm

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,3 @@
2525
max_w_class = ITEM_SIZE_NORMAL
2626
max_storage_space = 15
2727
cant_hold = list(/obj/item/backpack/satchel/flat) //muh recursive backpacks
28-
29-
/datum/storage/backpack/crow
30-
storage_slots = 7
31-
max_w_class = ITEM_SIZE_SMALL

code/modules/mob/living/simple_animal/crow/crow.dm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/datum/storage/backpack/crow
2+
storage_slots = 7
3+
max_w_class = ITEM_SIZE_SMALL
4+
15
/obj/item/backpack/messenger/corvid_couriers
26
name = "corvid messenger bag"
37
desc = "A small green-grey messenger bag with a blue Corvid Couriers logo on it."

code/modules/mob_holder/holder_mobs.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
var/obj/item/holder/H = new holder_type(get_turf(src))
2323
H.w_class = get_object_size()
2424
if(initiator == src)
25-
if(!target.equip_to_slot_if_possible(H, slot_back_str, del_on_fail=0, disable_warning=1))
25+
if(!target.equip_to_slot_if_possible(H, slot_back_str, del_on_fail=0, disable_warning=1) && !target.put_in_hands(H))
2626
if(!silent)
2727
to_chat(initiator, SPAN_WARNING("You can't climb onto [target]!"))
2828
return FALSE

maps/karzerfeste/karzerfeste.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "../../mods/content/mouse_highlights/_mouse_highlight.dme"
66
#include "../../mods/content/scaling_descriptors.dm"
77
#include "../../mods/species/drakes/_drakes.dme" // include before _fantasy.dme so overrides work
8+
#include "../../mods/content/birds/_birds.dme"
89
#include "../../mods/content/fantasy/_fantasy.dme"
910
#include "../../mods/pyrelight/_pyrelight.dme" // include after _fantasy.dme so overrides work
1011

mods/content/birds/_birds.dm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/decl/modpack/birds
2+
name = "Birds"

mods/content/birds/_birds.dme

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#ifndef MODPACK_BIRDS
2+
#define MODPACK_BIRDS
3+
// BEGIN_INCLUDE
4+
#include "_birds.dm"
5+
#include "bird_crow.dm"
6+
#include "bird_hawk.dm"
7+
#include "bird_pigeon.dm"
8+
#include "bird.dm"
9+
#include "hutch.dm"
10+
// END_INCLUDE
11+
#endif
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@
1212
return TRUE
1313
return ..()
1414

15-
/obj/item/holder/bird/end_throw(datum/thrownthing/TT)
15+
/obj/item/holder/bird/afterattack(atom/target, mob/user, proximity)
16+
if(proximity)
17+
return ..()
1618
var/mob/living/bird = locate() in contents
1719
. = ..()
18-
if(!TT.thrower || !bird || QDELETED(src) || bird.loc != src)
20+
if(!user || !bird || QDELETED(src) || bird.loc != src)
1921
return
2022
bird.dropInto(loc)
2123
qdel(src) // This will happen shortly regardless, but might as well skip the 1ds delay.
22-
if(isturf(TT.target))
23-
bird.visible_message(SPAN_NOTICE("\The [TT.thrower] releases \a [bird]!"))
24+
if(isturf(target))
25+
bird.visible_message(SPAN_NOTICE("\The [user] releases \a [bird]!"))
2426
else
25-
bird.visible_message(SPAN_NOTICE("\The [TT.thrower] indicates \the [TT.target] and releases \a [bird]!"))
26-
27+
bird.visible_message(SPAN_NOTICE("\The [user] indicates \the [target] and releases \a [bird]!"))
2728
if(istype(bird.ai))
28-
bird.ai.process_handler_target(TT.thrower, TT.target, TT.thrower.get_intent()?.intent_flags)
29+
bird.ai.process_handler_target(user, target, user.get_intent()?.intent_flags)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55

66
/mob/living/simple_animal/trained_bird/crow
77
name = "crow"
8-
icon = 'mods/pyrelight/icons/mobs/crow.dmi'
8+
icon = 'mods/content/birds/icons/crow.dmi'
99
ai = /datum/mob_controller/passive/crow
Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,53 @@
11
/mob/living/simple_animal/trained_bird/hawk
22
name = "hawk"
3-
icon = 'mods/pyrelight/icons/mobs/hawk.dmi'
3+
icon = 'mods/content/birds/icons/hawk.dmi'
44
ai = /datum/mob_controller/passive/hunter/hawk
55

66
/datum/mob_controller/passive/hunter/hawk
77
emote_speech = list("Skree!","SKREE!","Skree!?")
88
emote_hear = list("screeches", "screams")
99
emote_see = list("preens its feathers", "flicks its wings", "looks sharply around")
10+
var/handler_set_target = FALSE
11+
var/handling_skill = SKILL_BOTANY
12+
var/handling_difficulty = SKILL_ADEPT
13+
14+
/datum/mob_controller/passive/hunter/hawk/set_target(atom/new_target)
15+
. = ..()
16+
handler_set_target = FALSE
1017

1118
/datum/mob_controller/passive/hunter/hawk/process_handler_target(mob/handler, atom/target)
1219
if((. = ..()))
1320
set_target(target)
21+
handler_set_target = TRUE
22+
23+
/datum/mob_controller/passive/hunter/hawk/can_hunt(mob/living/victim)
24+
return handler_set_target || ..()
25+
26+
/datum/mob_controller/passive/hunter/hawk/check_handler_can_order(mob/handler, atom/target, intent_flags)
27+
if(!(. = ..()) && handler.skill_check(handling_skill, handling_difficulty))
28+
add_friend(handler)
29+
return ..()
1430

1531
/datum/mob_controller/passive/hunter/hawk/process_handler_failure(mob/handler, atom/target)
1632
body?.visible_message("\The [body] ignores \the [target] in favour of attacking \the [handler]!")
1733
return ..()
1834

19-
/datum/mob_controller/passive/hunter/hawk/handle_friend_hunting(mob/friend)
35+
/datum/mob_controller/passive/hunter/hawk/handle_friend_hunting(mob/user)
2036
..()
2137
set_target(null)
2238
if(!body)
2339
return
24-
if(body.scoop_check(friend) && body.get_scooped(friend, body))//, silent = TRUE))
25-
body.visible_message(SPAN_NOTICE("\The [body] alights on \the [friend]."))
40+
if(body.scoop_check(user) && body.get_scooped(user, body, silent = TRUE))
41+
body.visible_message(SPAN_NOTICE("\The [body] alights on \the [user]."))
2642
else
27-
body.visible_message(SPAN_NOTICE("\The [body] lands beside \the [friend]."))
43+
body.visible_message(SPAN_NOTICE("\The [body] lands beside \the [user]."))
2844

2945
for(var/obj/item/thing in body) //.get_equipped_items())
3046
thing.dropInto(body.loc)
31-
friend.put_in_hands(thing)
47+
user.put_in_hands(thing)
3248

3349
return TRUE
3450

35-
// Placeholder for husbandry check
36-
/datum/mob_controller/passive/hunter/hawk/process_holder_interaction(mob/handler)
37-
. = ..()
38-
// TODO: check animal husbandry skill
39-
if(is_friend(handler))
40-
to_chat(handler, SPAN_WARNING("You have already befriended \the [body]."))
41-
else
42-
add_friend(handler)
43-
to_chat(handler, SPAN_NOTICE("You preen \the [body], and [body.get_pronouns().he] nibbles your fingers affectionately."))
44-
4551
/datum/mob_controller/passive/hunter/hawk/process_hunting(atom/target)
4652
// Handles pathing to the target, and attacking the target if it's a mob.
4753
if(!(. = ..()))

0 commit comments

Comments
 (0)