Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Операция по смене TTS #470

Merged
merged 14 commits into from
Aug 2, 2024
1 change: 1 addition & 0 deletions modular_bandastation/medical/_medical.dme
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "code/surgery/vocal_cords.dm"
57 changes: 57 additions & 0 deletions modular_bandastation/medical/code/surgery/vocal_cords.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Surgery to change TTS voice
Gaxeer marked this conversation as resolved.
Show resolved Hide resolved
/datum/surgery/vocal_cords
name = "Vocal cords surgery"

Boyarinov marked this conversation as resolved.
Show resolved Hide resolved
possible_locs = list(BODY_ZONE_PRECISE_MOUTH)
steps = list(
/datum/surgery_step/incise,
/datum/surgery_step/retract_skin,
/datum/surgery_step/tune_vocal_cords,
/datum/surgery_step/close,
)

/datum/surgery/vocal_cords/can_start(mob/user, mob/living/carbon/target)
// not sure about tts restrictions
return ..()

Boyarinov marked this conversation as resolved.
Show resolved Hide resolved
// tune vocal cords
Gaxeer marked this conversation as resolved.
Show resolved Hide resolved
/datum/surgery_step/tune_vocal_cords
name = "tune vocal cords (scalpel)"
implements = list(
TOOL_SCALPEL = 100,
/obj/item/kitchen/knife = 50,

Check failure on line 22 in modular_bandastation/medical/code/surgery/vocal_cords.dm

View workflow job for this annotation

GitHub Actions / Run Linters

OD0404: Type /obj/item/kitchen/knife does not exist
/obj/item/wirecutters = 35)
Boyarinov marked this conversation as resolved.
Show resolved Hide resolved
time = 64
Boyarinov marked this conversation as resolved.
Show resolved Hide resolved

Gaxeer marked this conversation as resolved.
Show resolved Hide resolved

/datum/surgery_step/tune_vocal_cords/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(
user,
target,
span_notice("You begin to tune [target]'s vocal cords..."),
span_notice("[user] begins to tune [target]'s vocal cords."),
span_notice("[user] begins to perform surgery on [target]'s vocal cords.")
)

/datum/surgery_step/tune_vocal_cords/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
display_results(
user,
target,
span_notice("You succeed in tuning [target]'s vocal cords."),
span_notice("[user] successfully tunes [target]'s vocal cords!"),
span_notice("[user] completes the surgery on [target]'s vocal cords."),
)
target.change_tts_seed(user, TRUE)
return ..()

/datum/surgery_step/tune_vocal_cords/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
display_results(
user,
target,
span_warning("You accidentally stab [target] right in the throat!"),
span_warning("[user] accidentally stabs [target] right in the throat!"),
span_warning("[user] accidentally stabs [target] right in the throat!"),
)
display_pain(target, "You feel a visceral stabbing pain right into your throat!")
target.apply_damage(20, BRUTE, BODY_ZONE_HEAD, sharpness=TRUE)
return FALSE
Boyarinov marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions modular_bandastation/modular_bandastation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "keybinding/_keybinding.dme"
#include "loadout/_loadout.dme"
#include "mapping/_mapping.dme"
#include "medical/_medical.dme"
#include "pixel_shift/_pixel_shift.dme"
#include "ru_jobs/_ru_jobs.dme"
#include "translations/_translations.dme"
Expand Down
Loading