diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm index e874075aec2..42644981f32 100644 --- a/code/game/objects/items/weapons/cosmetics.dm +++ b/code/game/objects/items/weapons/cosmetics.dm @@ -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("[user] uses [src] to comb their hair with incredible style and sophistication. What a [user.gender == FEMALE ? "lady" : "guy"].") + +/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, "They are missing that limb!") + 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, "\The [H.head] is in the way!") + return FALSE + + if(H.h_style == "Bald" || H.h_style == "Balding Hair" || H.h_style == "Skinhead" || H.h_style == "Tajaran Ears") + to_chat(user, "There is not enough hair left to shave!") + return FALSE + + if(H == user) //shaving yourself + user.visible_message("\The [user] starts to shave \his head with \the [src].", \ + "You start to shave your head with \the [src].") + if(do_mob(user, user, 20)) + user.visible_message("\The [user] shaves \his head with \the [src].", \ + "You finish shaving with \the [src].") + shave(H, target_zone) + + return TRUE + + else + user.visible_message("\The [user] tries to shave \the [H]'s head with \the [src]!", \ + "You start shaving [H]'s head.") + if(do_mob(user, H, 20)) + user.visible_message("\The [user] shaves \the [H]'s head bald with \the [src]!", \ + "You shave \the [H]'s head bald.") + shave(H, target_zone) + + return TRUE + + else if(target_zone == "mouth") + + if(H.head && (H.head.body_parts_covered & FACE)) + to_chat(user, "\The [H.head] is in the way!") + return FALSE + + if(H.wear_mask && (H.wear_mask.body_parts_covered & FACE)) + to_chat(user, "\The [H.wear_mask] is in the way!") + return FALSE + + if(H.f_style == "Shaved") + to_chat(user, "There is not enough facial hair left to shave!") + return FALSE + + if(H == user) //shaving yourself + user.visible_message("\The [user] starts to shave \his facial hair with \the [src].", \ + "You take a moment to shave your facial hair with \the [src].") + if(do_mob(user, user, 20)) + user.visible_message("\The [user] shaves \his facial hair clean with \the [src].", \ + "You finish shaving with \the [src].") + shave(H, target_zone) + + return TRUE + + else + user.visible_message("\The [user] tries to shave \the [H]'s facial hair with \the [src].", \ + "You start shaving [H]'s facial hair.") + if(do_mob(user, H, 20)) + user.visible_message("\The [user] shaves off \the [H]'s facial hair with \the [src].", \ + "You shave [H]'s facial hair clean off.") + shave(H, target_zone) + + return TRUE + + + else + to_chat(user, "You need to target the mouth or head to shave \the [H]!") + return + + diff --git a/code/game/objects/random/random.dm b/code/game/objects/random/random.dm index 609135cfc40..3e92ff3ff85 100644 --- a/code/game/objects/random/random.dm +++ b/code/game/objects/random/random.dm @@ -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 diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index e6fab23344f..c6256068c33 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -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) ..() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index d6049c69055..8af640fe128 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/species/outsider/vox.dm b/code/modules/mob/living/carbon/human/species/outsider/vox.dm index 4a2d3a64ac2..99e1f68b2dc 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/vox.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/vox.dm @@ -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) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index f2c54d73e55..82464b91966 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -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 \ No newline at end of file + 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() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index bd90a4c06fe..68f73f3e739 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -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" diff --git a/html/changelogs/alberyk-razor.yml b/html/changelogs/alberyk-razor.yml new file mode 100644 index 00000000000..91d6220df59 --- /dev/null +++ b/html/changelogs/alberyk-razor.yml @@ -0,0 +1,6 @@ +author: Alberyk + +delete-after: True + +changes: + - rscadd: "Added an electric razor, you can find one in the locker room." diff --git a/icons/obj/weapons.dmi b/icons/obj/weapons.dmi index c870b0d5837..0f3fbc54df8 100644 Binary files a/icons/obj/weapons.dmi and b/icons/obj/weapons.dmi differ diff --git a/maps/aurora/aurora-6_surface.dmm b/maps/aurora/aurora-6_surface.dmm index a85c8f64354..e9e91b801c4 100644 --- a/maps/aurora/aurora-6_surface.dmm +++ b/maps/aurora/aurora-6_surface.dmm @@ -13763,6 +13763,7 @@ icon_state = "corner_white_diagonal"; dir = 4 }, +/obj/item/weapon/razor, /turf/simulated/floor/tiled, /area/crew_quarters/locker) "zs" = (