forked from NebulaSS13/Nebula
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Adding various trained birds to Pyrelight.
1 parent
2e90d19
commit c23d7f0
Showing
15 changed files
with
161 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/mob/living/simple_animal/trained_bird | ||
mob_size = MOB_SIZE_SMALL | ||
abstract_type = /mob/living/simple_animal/trained_bird | ||
holder_type = /obj/item/holder/bird | ||
|
||
/mob/living/simple_animal/trained_bird/proc/handle_holder_interaction(mob/user) | ||
return FALSE | ||
|
||
/mob/living/simple_animal/trained_bird/proc/process_target(mob/thrower, atom/target) | ||
visible_message("\The [src] follows [thrower]'s directions and attacks [target]!") | ||
return FALSE | ||
|
||
/mob/living/simple_animal/trained_bird/proc/process_handler_failure(mob/thrower, atom/target) | ||
visible_message("\The [src] ignores [target] in favour of attacking [thrower]!") | ||
return FALSE | ||
|
||
/obj/item/holder/bird | ||
w_class = MOB_SIZE_SMALL | ||
|
||
/obj/item/holder/bird/attack_self(mob/user) | ||
var/mob/living/simple_animal/trained_bird/bird = locate() in contents | ||
if(bird?.handle_holder_interaction(user)) | ||
return TRUE | ||
return ..() | ||
|
||
/obj/item/holder/bird/end_throw(datum/thrownthing/TT) | ||
var/mob/living/simple_animal/trained_bird/bird = locate() in contents | ||
. = ..() | ||
if(!TT.thrower || !bird || QDELETED(src) || bird.loc != src) | ||
return | ||
bird.dropInto(loc) | ||
qdel(src) // This will happen shortly regardless, but might as well skip the 1ds delay. | ||
bird.visible_message("\The [bird] was thrown by \the [TT.thrower] at \the [TT.target].") | ||
if(bird.ai) | ||
if(bird.ai.is_friend(TT.thrower)) | ||
bird.process_target(TT.thrower, TT.target) | ||
else | ||
bird.process_handler_failure(TT.thrower, TT.target) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/datum/mob_controller/passive/crow | ||
emote_speech = list("Caw.","Caw!","Caw...") | ||
emote_hear = list("croaks", "caws") | ||
emote_see = list("preens its feathers", "hops around") | ||
|
||
/mob/living/simple_animal/trained_bird/crow | ||
name = "crow" | ||
icon = 'mods/pyrelight/icons/mobs/crow.dmi' | ||
ai = /datum/mob_controller/passive/crow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/mob/living/simple_animal/trained_bird/hawk | ||
name = "hawk" | ||
icon = 'mods/pyrelight/icons/mobs/hawk.dmi' | ||
ai = /datum/mob_controller/passive/hunter/hawk | ||
|
||
/datum/mob_controller/passive/hunter/hawk | ||
emote_speech = list("Skree!","SKREE!","Skree!?") | ||
emote_hear = list("screeches", "screams") | ||
emote_see = list("preens its feathers", "flicks its wings", "looks sharply around") | ||
|
||
// Throw bird at target/afterattack on holder: | ||
// Pass husbandry check | ||
// Item: retrieves | ||
// Mob: attacks | ||
// Fail husbandry check | ||
// Attacks you (for a short time, like goats) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/mob/living/simple_animal/trained_bird/pigeon | ||
name = "pigeon" | ||
icon = 'mods/pyrelight/icons/mobs/pigeon.dmi' | ||
ai = /datum/mob_controller/passive/pigeon | ||
|
||
/datum/mob_controller/passive/pigeon | ||
emote_speech = list("Oo-ooo.","Oo-ooo?","Oo-ooo...") | ||
emote_hear = list("coos") | ||
emote_see = list("preens its feathers", "puffs out its neck", "ruffles its wings") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/datum/storage/hutch | ||
can_hold = list(/obj/item/holder) | ||
max_w_class = MOB_SIZE_SMALL | ||
storage_slots = 10 | ||
|
||
/datum/storage/hutch/open(mob/user) | ||
. = ..() | ||
var/atom/hutch = holder | ||
if(istype(hutch)) | ||
hutch.queue_icon_update() | ||
|
||
/datum/storage/hutch/close(mob/user) | ||
. = ..() | ||
var/atom/hutch = holder | ||
if(istype(hutch)) | ||
hutch.queue_icon_update() | ||
|
||
/obj/structure/hutch | ||
name = "hutch" | ||
icon = 'mods/pyrelight/icons/structures/hutch.dmi' | ||
desc = "A hutch for containing small animals like rabbits." | ||
icon_state = ICON_STATE_WORLD | ||
material = /decl/material/solid/organic/wood | ||
storage = /datum/storage/hutch | ||
var/initial_animal_count = 5 | ||
var/decl/material/door_material = /decl/material/solid/organic/plantmatter/grass/dry | ||
var/initial_animal_type | ||
|
||
/obj/structure/hutch/Initialize(ml, _mat, _reinf_mat) | ||
. = ..() | ||
|
||
if(ispath(door_material)) | ||
door_material = GET_DECL(door_material) | ||
|
||
if(initial_animal_type && initial_animal_count) | ||
for(var/i = 1 to initial_animal_count) | ||
var/obj/item/holder/bird/bird_item = new(src) | ||
var/bird_type = islist(initial_animal_type) ? pick(initial_animal_type) : initial_animal_type | ||
bird_item.sync(new bird_type(bird_item)) | ||
else | ||
update_icon() | ||
|
||
/obj/structure/hutch/on_update_icon() | ||
. = ..() | ||
if(door_material) | ||
add_overlay(overlay_image(icon, "[icon_state]-doors-[storage?.opened ? "open" : "closed"]", door_material.color, RESET_COLOR)) | ||
|
||
// Bird subtypes. | ||
/obj/structure/hutch/aviary | ||
name = "aviary" | ||
desc = "A hutch for containing birds like hawks or crows." | ||
icon = 'mods/pyrelight/icons/structures/aviary.dmi' | ||
|
||
/obj/structure/hutch/aviary/crow | ||
initial_animal_type = /mob/living/simple_animal/trained_bird/crow | ||
|
||
/obj/structure/hutch/aviary/pigeon | ||
initial_animal_type = /mob/living/simple_animal/trained_bird/pigeon | ||
|
||
/obj/structure/hutch/aviary/hawk | ||
initial_animal_type = /mob/living/simple_animal/trained_bird/hawk | ||
|
||
// Rabbits are a kind of bird, right? | ||
/obj/structure/hutch/rabbit | ||
initial_animal_type = list( | ||
/mob/living/simple_animal/passive/rabbit, | ||
/mob/living/simple_animal/passive/rabbit/black, | ||
/mob/living/simple_animal/passive/rabbit/brown | ||
) |