mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 15:39:57 +01:00
Adds the electric razor (#5415)
-adds the electric razor, that allow you to shave the hair or beard of your target -fixes #5228 and any species transformation keeping the old hair in
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
/obj/item/weapon/lipstick/black
|
||||
name = "black lipstick"
|
||||
colour = "black"
|
||||
|
||||
|
||||
/obj/item/weapon/lipstick/pink
|
||||
name = "pink lipstick"
|
||||
colour = "pink"
|
||||
@@ -82,3 +82,105 @@
|
||||
|
||||
/obj/item/weapon/haircomb/attack_self(mob/user)
|
||||
user.visible_message("<span class='notice'>[user] uses [src] to comb their hair with incredible style and sophistication. What a [user.gender == FEMALE ? "lady" : "guy"].</span>")
|
||||
|
||||
/obj/item/weapon/razor
|
||||
name = "electric razor"
|
||||
desc = "The latest and greatest power razor born from the science of shaving."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "razor"
|
||||
w_class = 2
|
||||
|
||||
/obj/item/weapon/razor/proc/shave(mob/living/carbon/human/H, location)
|
||||
if(location == "head")
|
||||
H.h_style = H.species.default_h_style
|
||||
else
|
||||
H.f_style = H.species.default_f_style
|
||||
|
||||
H.update_hair()
|
||||
playsound(H, 'sound/items/welder2.ogg', 20, 1)
|
||||
|
||||
|
||||
/obj/item/weapon/razor/attack(mob/M, mob/user, var/target_zone)
|
||||
if(!ishuman(M))
|
||||
return ..()
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/E = H.get_organ(target_zone)
|
||||
|
||||
if(!E || E.is_stump())
|
||||
to_chat(user, "<span class='danger'>They are missing that limb!</span>")
|
||||
return FALSE
|
||||
|
||||
if(!ishuman_species(H) && !istajara(H)) //you can only shave humans and tajara for obvious reasons
|
||||
return FALSE
|
||||
|
||||
|
||||
if(target_zone == "head")
|
||||
if(H.head && (H.head.body_parts_covered & HEAD))
|
||||
to_chat(user, "<span class='warning'>\The [H.head] is in the way!</span>")
|
||||
return FALSE
|
||||
|
||||
if(H.h_style == "Bald" || H.h_style == "Balding Hair" || H.h_style == "Skinhead" || H.h_style == "Tajaran Ears")
|
||||
to_chat(user, "<span class='warning'>There is not enough hair left to shave!</span>")
|
||||
return FALSE
|
||||
|
||||
if(H == user) //shaving yourself
|
||||
user.visible_message("\The [user] starts to shave \his head with \the [src].", \
|
||||
"<span class='notice'>You start to shave your head with \the [src].</span>")
|
||||
if(do_mob(user, user, 20))
|
||||
user.visible_message("\The [user] shaves \his head with \the [src].", \
|
||||
"<span class='notice'>You finish shaving with \the [src].</span>")
|
||||
shave(H, target_zone)
|
||||
|
||||
return TRUE
|
||||
|
||||
else
|
||||
user.visible_message("<span class='warning'>\The [user] tries to shave \the [H]'s head with \the [src]!</span>", \
|
||||
"<span class='notice'>You start shaving [H]'s head.</span>")
|
||||
if(do_mob(user, H, 20))
|
||||
user.visible_message("<span class='warning'>\The [user] shaves \the [H]'s head bald with \the [src]!</span>", \
|
||||
"<span class='notice'>You shave \the [H]'s head bald.</span>")
|
||||
shave(H, target_zone)
|
||||
|
||||
return TRUE
|
||||
|
||||
else if(target_zone == "mouth")
|
||||
|
||||
if(H.head && (H.head.body_parts_covered & FACE))
|
||||
to_chat(user, "<span class='warning'>\The [H.head] is in the way!</span>")
|
||||
return FALSE
|
||||
|
||||
if(H.wear_mask && (H.wear_mask.body_parts_covered & FACE))
|
||||
to_chat(user, "<span class='warning'>\The [H.wear_mask] is in the way!</span>")
|
||||
return FALSE
|
||||
|
||||
if(H.f_style == "Shaved")
|
||||
to_chat(user, "<span class='warning'>There is not enough facial hair left to shave!</span>")
|
||||
return FALSE
|
||||
|
||||
if(H == user) //shaving yourself
|
||||
user.visible_message("<span class='warning'>\The [user] starts to shave \his facial hair with \the [src].</span>", \
|
||||
"<span class='notice'>You take a moment to shave your facial hair with \the [src].</span>")
|
||||
if(do_mob(user, user, 20))
|
||||
user.visible_message("<span class='warning'>\The [user] shaves \his facial hair clean with \the [src].</span>", \
|
||||
"<span class='notice'>You finish shaving with \the [src].</span>")
|
||||
shave(H, target_zone)
|
||||
|
||||
return TRUE
|
||||
|
||||
else
|
||||
user.visible_message("<span class='warning'>\The [user] tries to shave \the [H]'s facial hair with \the [src].</span>", \
|
||||
"<span class='notice'>You start shaving [H]'s facial hair.</span>")
|
||||
if(do_mob(user, H, 20))
|
||||
user.visible_message("<span class='warning'>\The [user] shaves off \the [H]'s facial hair with \the [src].</span>", \
|
||||
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
|
||||
shave(H, target_zone)
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to target the mouth or head to shave \the [H]!</span>")
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -823,7 +823,8 @@
|
||||
/obj/item/weapon/reagent_containers/inhaler/hyperzine = 0.1,
|
||||
/obj/item/weapon/storage/box/pineapple = 0.1,
|
||||
/obj/item/weapon/flag/america = 0.1,
|
||||
/obj/item/weapon/flag/america/l = 0.1
|
||||
/obj/item/weapon/flag/america/l = 0.1,
|
||||
/obj/item/weapon/razor = 0.5
|
||||
)
|
||||
|
||||
/obj/random/hoodie
|
||||
|
||||
@@ -94,8 +94,7 @@
|
||||
spawn(1)
|
||||
var/newname = sanitizeSafe(input(vox,"Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN)
|
||||
if(!newname || newname == "")
|
||||
var/datum/language/L = all_languages[vox.species.default_language]
|
||||
newname = L.get_random_name()
|
||||
newname = user.species.get_random_name()
|
||||
vox.real_name = newname
|
||||
vox.name = vox.real_name
|
||||
raiders.update_access(vox)
|
||||
@@ -149,10 +148,6 @@
|
||||
|
||||
var/newname = sanitizeSafe(input(user,"Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN)
|
||||
if(!newname || newname == "")
|
||||
var/datum/language/L = all_languages[user.species.default_language]
|
||||
newname = L.get_random_name()
|
||||
newname = user.species.get_random_name()
|
||||
user.fully_replace_character_name(user.real_name,newname)
|
||||
user.h_style = "Short Vox Quills"
|
||||
user.f_style = "Shaved"
|
||||
user.update_hair(0)
|
||||
..()
|
||||
@@ -1319,7 +1319,9 @@
|
||||
|
||||
nutrition_loss = HUNGER_FACTOR * species.nutrition_loss_factor
|
||||
hydration_loss = THIRST_FACTOR * species.hydration_loss_factor
|
||||
|
||||
|
||||
species.set_default_hair(src)
|
||||
|
||||
if(species)
|
||||
return 1
|
||||
else
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
icobase = 'icons/mob/human_races/r_vox.dmi'
|
||||
deform = 'icons/mob/human_races/r_def_vox.dmi'
|
||||
language = LANGUAGE_VOX
|
||||
name_language = LANGUAGE_VOX
|
||||
num_alternate_languages = 1
|
||||
unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws/strong, /datum/unarmed_attack/bite/strong)
|
||||
rarity_value = 4
|
||||
@@ -67,9 +68,7 @@
|
||||
|
||||
move_trail = /obj/effect/decal/cleanable/blood/tracks/claw
|
||||
|
||||
/datum/species/vox/get_random_name(var/gender)
|
||||
var/datum/language/species_language = all_languages[default_language]
|
||||
return species_language.get_random_name(gender)
|
||||
default_h_style = "Short Vox Quills"
|
||||
|
||||
/datum/species/vox/equip_survival_gear(var/mob/living/carbon/human/H)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/mask/breath(H), slot_wear_mask)
|
||||
|
||||
@@ -196,6 +196,9 @@
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/tracks/move_trail = /obj/effect/decal/cleanable/blood/tracks/footprints // What marks are left when walking
|
||||
|
||||
var/default_h_style = "Bald"
|
||||
var/default_f_style = "Shaved"
|
||||
|
||||
/datum/species/proc/get_eyes(var/mob/living/carbon/human/H)
|
||||
return
|
||||
|
||||
@@ -507,4 +510,9 @@
|
||||
return move_trail
|
||||
|
||||
/datum/species/proc/bullet_act(var/obj/item/projectile/P, var/def_zone, var/mob/living/carbon/human/H)
|
||||
return 0
|
||||
return 0
|
||||
|
||||
/datum/species/proc/set_default_hair(var/mob/living/carbon/human/H)
|
||||
H.h_style = H.species.default_h_style
|
||||
H.f_style = H.species.default_f_style
|
||||
H.update_hair()
|
||||
@@ -189,6 +189,8 @@
|
||||
|
||||
move_trail = /obj/effect/decal/cleanable/blood/tracks/paw
|
||||
|
||||
default_h_style = "Tajaran Ears"
|
||||
|
||||
/datum/species/tajaran/equip_survival_gear(var/mob/living/carbon/human/H)
|
||||
..()
|
||||
var/obj/item/clothing/shoes/sandal/S = new /obj/item/clothing/shoes/sandal(H)
|
||||
@@ -249,6 +251,13 @@
|
||||
/datum/species/skrell/can_breathe_water()
|
||||
return TRUE
|
||||
|
||||
/datum/species/skrell/set_default_hair(var/mob/living/carbon/human/H)
|
||||
if(H.gender == MALE)
|
||||
H.h_style = "Skrell Male Tentacles"
|
||||
else
|
||||
H.h_style = "Skrell Female Tentacles"
|
||||
H.update_hair()
|
||||
|
||||
/datum/species/diona
|
||||
name = "Diona"
|
||||
short_name = "dio"
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
author: Alberyk
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- rscadd: "Added an electric razor, you can find one in the locker room."
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
@@ -13763,6 +13763,7 @@
|
||||
icon_state = "corner_white_diagonal";
|
||||
dir = 4
|
||||
},
|
||||
/obj/item/weapon/razor,
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/crew_quarters/locker)
|
||||
"zs" = (
|
||||
|
||||
Reference in New Issue
Block a user