mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Petting more animals now causes floating hearts and a moodlet, borgs can now pet animals. (#52594)
* Petting. * Oops. * Update code/modules/mob/living/simple_animal/friendly/penguin.dm Co-authored-by: Fikou <piotrbryla@onet.pl> * Working on underlying redo. * More. * Fixing to work with new emote system. * Move proc and defines to living instead of mob. * ...Moves it to simple_animal instead. * Revert cat crate fix (other PR handling), fixes emote thing. * Appveyor did not care for that. * Comment typo. * Very descriptive var name. * Borgs can now commit pet. * sweeps up missing manual_emotes, adds a hop to link for ghosts, and moves the name preface to ghost only * More descriptive vars and proc name. * Better descriptive vars. * Making the borg code slightly nicer. Co-authored-by: Fikou <piotrbryla@onet.pl> Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
This commit is contained in:
co-authored by
Fikou
LemonInTheDark
parent
4ca2f75d49
commit
358e549229
@@ -323,7 +323,7 @@ All foods are distributed among various categories. Use common sense.
|
||||
if(bitecount >= 5)
|
||||
var/sattisfaction_text = pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where \the [src] was")
|
||||
if(sattisfaction_text)
|
||||
M.emote(sattisfaction_text)
|
||||
M.manual_emote(sattisfaction_text)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
@@ -49,6 +49,8 @@
|
||||
icon_prefix = "rabbit"
|
||||
feedMessages = list("It nibbles happily.","It noms happily.")
|
||||
layMessage = list("hides an egg.","scampers around suspiciously.","begins making a huge racket.","begins shuffling.")
|
||||
pet_bonus = TRUE
|
||||
pet_bonus_emote = "hops around happily!"
|
||||
|
||||
/mob/living/simple_animal/chicken/rabbit/space
|
||||
icon_prefix = "s_rabbit"
|
||||
|
||||
@@ -4,11 +4,14 @@
|
||||
..()
|
||||
switch(M.a_intent)
|
||||
if("help")
|
||||
if (health > 0)
|
||||
visible_message("<span class='notice'>[M] [response_help_continuous] [src].</span>", \
|
||||
"<span class='notice'>[M] [response_help_continuous] you.</span>", null, null, M)
|
||||
to_chat(M, "<span class='notice'>You [response_help_simple] [src].</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
||||
if (stat == DEAD)
|
||||
return
|
||||
visible_message("<span class='notice'>[M] [response_help_continuous] [src].</span>", \
|
||||
"<span class='notice'>[M] [response_help_continuous] you.</span>", null, null, M)
|
||||
to_chat(M, "<span class='notice'>You [response_help_simple] [src].</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
|
||||
if(pet_bonus)
|
||||
funpet(M)
|
||||
|
||||
if("grab")
|
||||
grabbedby(M)
|
||||
@@ -27,6 +30,16 @@
|
||||
updatehealth()
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
*This is used to make certain mobs (pet_bonus == TRUE) emote when pet, make a heart emoji at their location, and give the petter a moodlet.
|
||||
*
|
||||
*/
|
||||
/mob/living/simple_animal/proc/funpet(mob/petter)
|
||||
new /obj/effect/temp_visual/heart(loc)
|
||||
if(prob(33))
|
||||
manual_emote("[pet_bonus_emote]")
|
||||
SEND_SIGNAL(petter, COMSIG_ADD_MOOD_EVENT, src, /datum/mood_event/pet_animal, src)
|
||||
|
||||
/mob/living/simple_animal/attack_hulk(mob/living/carbon/human/user)
|
||||
. = ..()
|
||||
if(!.)
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
collar_type = "cat"
|
||||
can_be_held = TRUE
|
||||
held_state = "cat2"
|
||||
pet_bonus = TRUE
|
||||
pet_bonus_emote = "purrs!"
|
||||
|
||||
footstep_type = FOOTSTEP_MOB_CLAW
|
||||
|
||||
@@ -240,27 +242,6 @@
|
||||
stop_automated_movement = 1
|
||||
walk_to(src,movement_target,0,3)
|
||||
|
||||
/mob/living/simple_animal/pet/cat/attack_hand(mob/living/carbon/human/M)
|
||||
. = ..()
|
||||
switch(M.a_intent)
|
||||
if("help")
|
||||
wuv(1, M)
|
||||
if("harm")
|
||||
wuv(-1, M)
|
||||
|
||||
/mob/living/simple_animal/pet/cat/proc/wuv(change, mob/M)
|
||||
if(change)
|
||||
if(change > 0)
|
||||
if(M && stat != DEAD)
|
||||
new /obj/effect/temp_visual/heart(loc)
|
||||
manual_emote("purrs!")
|
||||
if(flags_1 & HOLOGRAM_1)
|
||||
return
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, src, /datum/mood_event/pet_animal, src)
|
||||
else
|
||||
if(M && stat != DEAD)
|
||||
manual_emote("hisses!")
|
||||
|
||||
/mob/living/simple_animal/pet/cat/cak //I told you I'd do it, Remie
|
||||
name = "Keeki"
|
||||
desc = "It's a cat made out of cake."
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
speak_chance = 1
|
||||
turns_per_move = 10
|
||||
can_be_held = TRUE
|
||||
pet_bonus = TRUE
|
||||
pet_bonus_emote = "woofs happily!"
|
||||
var/turns_since_scan = 0
|
||||
var/obj/movement_target
|
||||
|
||||
@@ -630,22 +632,3 @@
|
||||
..()
|
||||
|
||||
make_babies()
|
||||
|
||||
/mob/living/simple_animal/pet/dog/attack_hand(mob/living/carbon/human/M)
|
||||
. = ..()
|
||||
switch(M.a_intent)
|
||||
if("help")
|
||||
wuv(1,M)
|
||||
if("harm")
|
||||
wuv(-1,M)
|
||||
|
||||
/mob/living/simple_animal/pet/dog/proc/wuv(change, mob/M)
|
||||
if(change)
|
||||
if(change > 0)
|
||||
if(M && stat != DEAD) // Added check to see if this mob (the dog) is dead to fix issue 2454
|
||||
new /obj/effect/temp_visual/heart(loc)
|
||||
manual_emote("yaps happily!")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, src, /datum/mood_event/pet_animal, src)
|
||||
else
|
||||
if(M && stat != DEAD) // Same check here, even though emote checks it as well (poor form to check it only in the help case)
|
||||
manual_emote("growls!")
|
||||
|
||||
@@ -144,6 +144,8 @@
|
||||
tame_chance = 25
|
||||
bonus_tame_chance = 15
|
||||
footstep_type = FOOTSTEP_MOB_SHOE
|
||||
pet_bonus = TRUE
|
||||
pet_bonus_emote = "moos happily!"
|
||||
|
||||
/mob/living/simple_animal/cow/Initialize()
|
||||
udder = new()
|
||||
@@ -263,6 +265,8 @@
|
||||
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
|
||||
mob_size = MOB_SIZE_TINY
|
||||
gold_core_spawnable = FRIENDLY_SPAWN
|
||||
pet_bonus = TRUE
|
||||
pet_bonus_emote = "chirps!"
|
||||
|
||||
footstep_type = FOOTSTEP_MOB_CLAW
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
gold_core_spawnable = FRIENDLY_SPAWN
|
||||
can_be_held = TRUE
|
||||
held_state = "fox"
|
||||
pet_bonus = TRUE
|
||||
pet_bonus_emote = "pants and yaps happily!"
|
||||
|
||||
footstep_type = FOOTSTEP_MOB_CLAW
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
maxHealth = 200
|
||||
health = 200
|
||||
del_on_death = TRUE
|
||||
pet_bonus = TRUE
|
||||
pet_bonus_emote = "smiles!"
|
||||
|
||||
//Gondolas don't make footstep sounds
|
||||
|
||||
@@ -62,6 +64,7 @@
|
||||
/mob/living/simple_animal/pet/gondola/IsVocal() //Gondolas are the silent walker.
|
||||
return FALSE
|
||||
|
||||
|
||||
#undef GONDOLA_HEIGHT
|
||||
#undef GONDOLA_COLOR
|
||||
#undef GONDOLA_MOUSTACHE
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
obj_damage = 0
|
||||
environment_smash = ENVIRONMENT_SMASH_NONE
|
||||
var/static/list/edibles = typecacheof(list(/mob/living/simple_animal/butterfly, /mob/living/simple_animal/hostile/cockroach)) //list of atoms, however turfs won't affect AI, but will affect consumption.
|
||||
pet_bonus = TRUE
|
||||
pet_bonus_emote = "sticks its tongue out contentedly!"
|
||||
|
||||
/mob/living/simple_animal/hostile/lizard/CanAttack(atom/the_target)//Can we actually attack a possible target?
|
||||
if(see_invisible < the_target.invisibility)//Target's invisible to us, forget it
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
turns_per_move = 10
|
||||
icon = 'icons/mob/penguins.dmi'
|
||||
butcher_results = list(/obj/item/organ/ears/penguin = 1, /obj/item/reagent_containers/food/snacks/meat/slab/penguin = 3)
|
||||
pet_bonus = TRUE
|
||||
pet_bonus_emote = "honks happily!"
|
||||
|
||||
footstep_type = FOOTSTEP_MOB_BAREFOOT
|
||||
|
||||
@@ -55,3 +57,4 @@
|
||||
pass_flags = PASSMOB
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
butcher_results = list(/obj/item/organ/ears/penguin = 1, /obj/item/reagent_containers/food/snacks/meat/slab/penguin = 1)
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
speed = 10
|
||||
glide_size = 2
|
||||
held_state = "sloth"
|
||||
pet_bonus = TRUE
|
||||
pet_bonus_emote = "slowly smiles!"
|
||||
|
||||
footstep_type = FOOTSTEP_MOB_CLAW
|
||||
|
||||
|
||||
@@ -335,7 +335,7 @@
|
||||
/mob/living/simple_animal/hostile/proc/Aggro()
|
||||
vision_range = aggro_vision_range
|
||||
if(target && emote_taunt.len && prob(taunt_chance))
|
||||
emote("[pick(emote_taunt)] at [target].")
|
||||
manual_emote("[pick(emote_taunt)] at [target].")
|
||||
taunt_chance = max(taunt_chance-7,2)
|
||||
|
||||
|
||||
|
||||
@@ -154,6 +154,12 @@
|
||||
///Generic flags
|
||||
var/simple_mob_flags = NONE
|
||||
|
||||
/// Used for making mobs show a heart emoji and give a mood boost when pet.
|
||||
var/pet_bonus = FALSE
|
||||
/// A string for an emote used when pet_bonus == true for the mob being pet.
|
||||
var/pet_bonus_emote = ""
|
||||
|
||||
|
||||
/mob/living/simple_animal/Initialize()
|
||||
. = ..()
|
||||
GLOB.simple_animals[AIStatus] += src
|
||||
|
||||
Reference in New Issue
Block a user