Skip to content

Commit

Permalink
[MIRROR] New Quirk! Cyborg Lover! [MDB IGNORE] (#25762) (#1236)
Browse files Browse the repository at this point in the history
* New Quirk! Cyborg Lover! (#80023)

## About The Pull Request

This PR adds a new quirk for people, who want to play as
silicon-friendly crew.

Basic quirk info:
- It costs 2 points.
- It has minor additions to person's mail goodies list (cable coils,
basic cells, etc).
- It has a few simple mood events, when you pet a borg or being
touched/hugged by borg.

## Why It's Good For The Game

I think it is nice to have a chance to play as ~~robo-creep~~ person who
loves borgos.

## Changelog

:cl:
add: Added new quirk: Cyborg Lover!
/:cl:

---------



* New Quirk! Cyborg Lover!

---------

Co-authored-by: SkyratBot <[email protected]>
Co-authored-by: SSensum <[email protected]>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
  • Loading branch information
4 people authored Dec 21, 2023
1 parent a474668 commit b6aef2b
Show file tree
Hide file tree
Showing 7 changed files with 139 additions and 41 deletions.
8 changes: 8 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_silicon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@
#define COMSIG_PROCESS_BORGCHARGER_OCCUPANT "living_charge"
///sent from borg mobs to itself, for tools to catch an upcoming destroy() due to safe decon (rather than detonation)
#define COMSIG_BORG_SAFE_DECONSTRUCT "borg_safe_decon"
///called from /obj/item/borg/cyborghug/attack proc
#define COMSIG_BORG_TOUCH_MOB "borg_touch_mob"
///called from /obj/item/borg/cyborghug/attack proc
#define COMSIG_BORG_HUG_MOB "borg_hug_mob"
///returned if this action was handled by signal handler.
#define COMSIG_BORG_HUG_HANDLED 1
///called from /mob/living/silicon/attack_hand proc
#define COMSIG_MOB_PAT_BORG "mob_pat_borg"
6 changes: 0 additions & 6 deletions code/datums/mood_events/generic_positive_events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,6 @@
mood_change = 6
timeout = 5 MINUTES

/datum/mood_event/pet_borg
description = "I just love my robotic friends!"
mood_change = 3
timeout = 5 MINUTES
required_job = list(/datum/job/research_director, /datum/job/scientist, /datum/job/roboticist, /datum/job/geneticist)

/datum/mood_event/bottle_flip
description = "The bottle landing like that was satisfying."
mood_change = 2
Expand Down
2 changes: 1 addition & 1 deletion code/datums/quirks/negative_quirks/tin_man.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/datum/quirk/tin_man
name = "Tin Man"
desc = "Oops! All Prosthetics! Due to some truly cruel cosmic punishment, most of your internal organs have been replaced with surplus prosthetics."
icon = FA_ICON_ROBOT
icon = FA_ICON_USER_GEAR
value = -6
medical_record_text = "During physical examination, patient was found to have numerous low-budget prosthetic internal organs. \
<b>Removal of these organs is known to be dangerous to the patient as well as the practitioner.</b>"
Expand Down
45 changes: 45 additions & 0 deletions code/datums/quirks/positive_quirks/cyborg_lover.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/datum/quirk/cyborg_lover
name = "Cyborg Lover"
desc = "You find silicon life forms fascinating! You like inspecting and touching their hulls and robo-bodies, as well you like being touched by their manipulators."
icon = FA_ICON_ROBOT
value = 2
gain_text = span_notice("You are fascinated by silicon life forms.")
lose_text = span_danger("Cyborgs and other silicons aren't cool anymore.")
medical_record_text = "Patient reports being fascinated by silicon life forms."
mail_goodies = list(
/obj/item/stock_parts/cell/potato,
/obj/item/stack/cable_coil,
/obj/item/toy/talking/ai,
/obj/item/toy/figure/borg,
)

/datum/quirk/cyborg_lover/add(client/client_source)
var/datum/atom_hud/fan = GLOB.huds[DATA_HUD_FAN]
fan.show_to(quirk_holder)

/datum/quirk/cyborg_lover/add_to_holder(mob/living/new_holder, quirk_transfer, client/client_source)
. = ..()
RegisterSignal(new_holder, COMSIG_MOB_PAT_BORG, PROC_REF(pat_cyborg), override = TRUE)
RegisterSignal(new_holder, COMSIG_BORG_TOUCH_MOB, PROC_REF(touched_by_cyborg), override = TRUE)
RegisterSignal(new_holder, COMSIG_BORG_HUG_MOB, PROC_REF(hugged_by_cyborg), override = TRUE)

/datum/quirk/cyborg_lover/remove_from_current_holder(quirk_transfer)
UnregisterSignal(quirk_holder, list(COMSIG_MOB_PAT_BORG, COMSIG_BORG_TOUCH_MOB, COMSIG_BORG_HUG_MOB))
return ..()

/datum/quirk/cyborg_lover/proc/pat_cyborg()
SIGNAL_HANDLER
quirk_holder.add_mood_event("pat_borg", /datum/mood_event/pat_borg)

/datum/quirk/cyborg_lover/proc/touched_by_cyborg()
SIGNAL_HANDLER
quirk_holder.add_mood_event("borg_touch", /datum/mood_event/borg_touch)

/datum/quirk/cyborg_lover/proc/hugged_by_cyborg(borghugitem, mob/living/silicon/robot/hugger)
SIGNAL_HANDLER
hugger.visible_message(
span_notice("[hugger] hugs [quirk_holder] in a firm bear-hug! [quirk_holder] looks satisfied!"),
span_notice("You hug [quirk_holder] firmly to make [quirk_holder.p_them()] feel better! [quirk_holder] looks satisfied!"),
)
quirk_holder.add_mood_event("borg_hug", /datum/mood_event/borg_hug)
return COMSIG_BORG_HUG_HANDLED
116 changes: 83 additions & 33 deletions code/game/objects/items/robot/items/generic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@
#define HARM_ALARM_NO_SAFETY_COOLDOWN (60 SECONDS)
#define HARM_ALARM_SAFETY_COOLDOWN (20 SECONDS)

/datum/mood_event/borg_touch
description = "Being touched by those manipulators is nice."
mood_change = 2
timeout = 2 MINUTES

/datum/mood_event/borg_hug
description = "Those robo-hugs were really nice!"
mood_change = 4
timeout = 3 MINUTES

/datum/mood_event/pat_borg
description = "There is something really special about touching my robotic friends!"
mood_change = 4
timeout = 1 MINUTES

/obj/item/borg
icon = 'icons/mob/silicon/robot_items.dmi'

Expand Down Expand Up @@ -43,11 +58,15 @@
attacked_mob.set_jitter_if_lower(5 SECONDS)
if(issilicon(attacked_mob))
attacked_mob.emp_act(EMP_HEAVY)
attacked_mob.visible_message(span_danger("[user] shocks [attacked_mob] with [src]!"), \
span_userdanger("[user] shocks you with [src]!"))
attacked_mob.visible_message(
span_danger("[user] shocks [attacked_mob] with [src]!"),
span_userdanger("[user] shocks you with [src]!"),
)
else
attacked_mob.visible_message(span_danger("[user] prods [attacked_mob] with [src]!"), \
span_userdanger("[user] prods you with [src]!"))
attacked_mob.visible_message(
span_danger("[user] prods [attacked_mob] with [src]!"),
span_userdanger("[user] prods you with [src]!"),
)

playsound(loc, 'sound/weapons/egloves.ogg', 50, TRUE, -1)
cooldown_check = world.time + cooldown
Expand Down Expand Up @@ -102,41 +121,60 @@
attacked_mob.attack_hand(user, modifiers) //This enables borgs to get the floating heart icon and mob emote from simple_animal's that have petbonus == true.
return
if(user.zone_selected == BODY_ZONE_HEAD)
user.visible_message(span_notice("[user] playfully boops [attacked_mob] on the head!"), \
span_notice("You playfully boop [attacked_mob] on the head!"))
user.visible_message(
span_notice("[user] playfully boops [attacked_mob] on the head!"),
span_notice("You playfully boop [attacked_mob] on the head!"),
)
user.do_attack_animation(attacked_mob, ATTACK_EFFECT_BOOP)
SEND_SIGNAL(attacked_mob, COMSIG_BORG_TOUCH_MOB)
playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE, -1)
else if(ishuman(attacked_mob))
if(user.body_position == LYING_DOWN)
user.visible_message(span_notice("[user] shakes [attacked_mob] trying to get [attacked_mob.p_them()] up!"), \
span_notice("You shake [attacked_mob] trying to get [attacked_mob.p_them()] up!"))
user.visible_message(
span_notice("[user] shakes [attacked_mob] trying to get [attacked_mob.p_them()] up!"),
span_notice("You shake [attacked_mob] trying to get [attacked_mob.p_them()] up!"),
)
else
user.visible_message(span_notice("[user] hugs [attacked_mob] to make [attacked_mob.p_them()] feel better!"), \
span_notice("You hug [attacked_mob] to make [attacked_mob.p_them()] feel better!"))
user.visible_message(
span_notice("[user] hugs [attacked_mob] to make [attacked_mob.p_them()] feel better!"),
span_notice("You hug [attacked_mob] to make [attacked_mob.p_them()] feel better!"),
)
SEND_SIGNAL(attacked_mob, COMSIG_BORG_TOUCH_MOB)
if(attacked_mob.resting)
attacked_mob.set_resting(FALSE, TRUE)
else
user.visible_message(span_notice("[user] pets [attacked_mob]!"), \
span_notice("You pet [attacked_mob]!"))
user.visible_message(
span_notice("[user] pets [attacked_mob]!"),
span_notice("You pet [attacked_mob]!"),
)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
if(HUG_MODE_HUG)
if(ishuman(attacked_mob))
attacked_mob.adjust_status_effects_on_shake_up()
if(attacked_mob.body_position == LYING_DOWN)
user.visible_message(span_notice("[user] shakes [attacked_mob] trying to get [attacked_mob.p_them()] up!"), \
span_notice("You shake [attacked_mob] trying to get [attacked_mob.p_them()] up!"))
user.visible_message(
span_notice("[user] shakes [attacked_mob] trying to get [attacked_mob.p_them()] up!"),
span_notice("You shake [attacked_mob] trying to get [attacked_mob.p_them()] up!"),
)
else if(user.zone_selected == BODY_ZONE_HEAD)
user.visible_message(span_warning("[user] bops [attacked_mob] on the head!"), \
span_warning("You bop [attacked_mob] on the head!"))
user.visible_message(span_warning("[user] bops [attacked_mob] on the head!"),
span_warning("You bop [attacked_mob] on the head!"),
)
SEND_SIGNAL(attacked_mob, COMSIG_BORG_TOUCH_MOB)
user.do_attack_animation(attacked_mob, ATTACK_EFFECT_PUNCH)
else
user.visible_message(span_warning("[user] hugs [attacked_mob] in a firm bear-hug! [attacked_mob] looks uncomfortable..."), \
span_warning("You hug [attacked_mob] firmly to make [attacked_mob.p_them()] feel better! [attacked_mob] looks uncomfortable..."))
if(!(SEND_SIGNAL(attacked_mob, COMSIG_BORG_HUG_MOB, user) & COMSIG_BORG_HUG_HANDLED))
user.visible_message(
span_warning("[user] hugs [attacked_mob] in a firm bear-hug! [attacked_mob] looks uncomfortable..."),
span_warning("You hug [attacked_mob] firmly to make [attacked_mob.p_them()] feel better! [attacked_mob] looks uncomfortable..."),
)
if(attacked_mob.resting)
attacked_mob.set_resting(FALSE, TRUE)
else
user.visible_message(span_warning("[user] bops [attacked_mob] on the head!"), \
span_warning("You bop [attacked_mob] on the head!"))
user.visible_message(
span_warning("[user] bops [attacked_mob] on the head!"),
span_warning("You bop [attacked_mob] on the head!"),
)
playsound(loc, 'sound/weapons/tap.ogg', 50, TRUE, -1)
if(HUG_MODE_SHOCK)
if (!COOLDOWN_FINISHED(src, shock_cooldown))
Expand All @@ -145,28 +183,38 @@
attacked_mob.electrocute_act(5, "[user]", flags = SHOCK_NOGLOVES | SHOCK_NOSTUN)
attacked_mob.dropItemToGround(attacked_mob.get_active_held_item())
attacked_mob.dropItemToGround(attacked_mob.get_inactive_held_item())
user.visible_message(span_userdanger("[user] electrocutes [attacked_mob] with [user.p_their()] touch!"), \
span_danger("You electrocute [attacked_mob] with your touch!"))
user.visible_message(
span_userdanger("[user] electrocutes [attacked_mob] with [user.p_their()] touch!"),
span_danger("You electrocute [attacked_mob] with your touch!"),
)
else
if(!iscyborg(attacked_mob))
attacked_mob.adjustFireLoss(10)
user.visible_message(span_userdanger("[user] shocks [attacked_mob]!"), \
span_danger("You shock [attacked_mob]!"))
user.visible_message(
span_userdanger("[user] shocks [attacked_mob]!"),
span_danger("You shock [attacked_mob]!"),
)
else
user.visible_message(span_userdanger("[user] shocks [attacked_mob]. It does not seem to have an effect"), \
span_danger("You shock [attacked_mob] to no effect."))
user.visible_message(
span_userdanger("[user] shocks [attacked_mob]. It does not seem to have an effect"),
span_danger("You shock [attacked_mob] to no effect."),
)
playsound(loc, 'sound/effects/sparks2.ogg', 50, TRUE, -1)
user.cell.charge -= 500
COOLDOWN_START(src, shock_cooldown, HUG_SHOCK_COOLDOWN)
if(HUG_MODE_CRUSH)
if (!COOLDOWN_FINISHED(src, crush_cooldown))
return
if(ishuman(attacked_mob))
user.visible_message(span_userdanger("[user] crushes [attacked_mob] in [user.p_their()] grip!"), \
span_danger("You crush [attacked_mob] in your grip!"))
user.visible_message(
span_userdanger("[user] crushes [attacked_mob] in [user.p_their()] grip!"),
span_danger("You crush [attacked_mob] in your grip!"),
)
else
user.visible_message(span_userdanger("[user] crushes [attacked_mob]!"), \
span_danger("You crush [attacked_mob]!"))
user.visible_message(
span_userdanger("[user] crushes [attacked_mob]!"),
span_danger("You crush [attacked_mob]!"),
)
playsound(loc, 'sound/weapons/smash.ogg', 50, TRUE, -1)
attacked_mob.adjustBruteLoss(15)
user.cell.charge -= 300
Expand Down Expand Up @@ -337,9 +385,11 @@
safety = FALSE

if(safety == TRUE)
user.visible_message("<font color='red' size='2'>[user] blares out a near-deafening siren from its speakers!</font>", \
span_userdanger("Your siren blares around [iscyborg(user) ? "you" : "and confuses you"]!"), \
span_danger("The siren pierces your hearing!"))
user.visible_message(
"<font color='red' size='2'>[user] blares out a near-deafening siren from its speakers!</font>",
span_userdanger("Your siren blares around [iscyborg(user) ? "you" : "and confuses you"]!"),
span_danger("The siren pierces your hearing!"),
)
for(var/mob/living/carbon/carbon in get_hearers_in_view(9, user))
if(carbon.get_ear_protection())
continue
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/silicon/silicon_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
visible_message(span_notice("[user] pets [src]."), \
span_notice("[user] pets you."), null, null, user)
to_chat(user, span_notice("You pet [src]."))
user.add_mood_event("pet_borg", /datum/mood_event/pet_borg)
SEND_SIGNAL(user, COMSIG_MOB_PAT_BORG)

/mob/living/silicon/check_block(atom/hitby, damage, attack_text, attack_type, armour_penetration, damage_type, attack_flag)
. = ..()
Expand Down
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1766,6 +1766,7 @@
#include "code\datums\quirks\positive_quirks\apathetic.dm"
#include "code\datums\quirks\positive_quirks\bilingual.dm"
#include "code\datums\quirks\positive_quirks\clown_enjoyer.dm"
#include "code\datums\quirks\positive_quirks\cyborg_lover.dm"
#include "code\datums\quirks\positive_quirks\drunk_healing.dm"
#include "code\datums\quirks\positive_quirks\empath.dm"
#include "code\datums\quirks\positive_quirks\freerunning.dm"
Expand Down

0 comments on commit b6aef2b

Please sign in to comment.