Skip to content

Commit

Permalink
2
Browse files Browse the repository at this point in the history
  • Loading branch information
BeagleGaming1 committed Oct 29, 2023
1 parent 9bac1bb commit c04cc9e
Show file tree
Hide file tree
Showing 11 changed files with 285 additions and 72 deletions.
4 changes: 4 additions & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1072,3 +1072,7 @@ cases. Override_icon_state should be a list.*/
///Called by /mob/living/carbon/swap_hand() when hands are swapped
/obj/item/proc/hands_swapped(mob/living/carbon/swapper_of_hands)
return

///Any additional effects to when an item is stored in a shoe in /obj/item/clothing/shoes/attackby(). Also cancels storing in shoe if returning FALSE
/obj/item/proc/additional_shoe_store_behavior(mob/user, obj/item/clothing/shoes/shoes, obj/item/stored_item)
return
4 changes: 2 additions & 2 deletions code/game/objects/items/tools/flame_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM

/obj/item/clothing/mask/electronic_cigarette
name = "electronic cigarette"
desc = "An electronic cigarette from the company that made Lucky Strikes, that contains no nicotine after complaints about the consequences."
desc = "An electronic cigarette by The American Tobacco Company, who also made Lucky Strikes."
icon_state = "cigoff"
item_state = "cigoff"
w_class = SIZE_SMALL
Expand Down Expand Up @@ -673,7 +673,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM

/obj/item/clothing/mask/electronic_cigarette/cigar
name = "electronic cigar"
desc = "An electronic cigarette designed to look like a cigar, for those who care about health and style."
desc = "A luxury electronic cigar, with its labels scratched off. Where could this be from?"
icon_state = "cigar_off"
item_state = "cigar_off"
icon_on = "cigar_on"
Expand Down
114 changes: 59 additions & 55 deletions code/game/objects/items/toys/toys.dm
Original file line number Diff line number Diff line change
Expand Up @@ -489,112 +489,75 @@
COOLDOWN_START(src, last_hug_time, 2.5 SECONDS)

/obj/item/toy/plush/farwa
name = "Farwa plush doll"
name = "Farwa plush"
desc = "A Farwa plush doll. It's soft and comforting!"
icon_state = "farwaplush"
icon_state = "farwa"
black_market_value = 25

/obj/item/toy/plush/yautja
name = "strange plush doll"
desc = "A plush doll depicting some sort of tall humanoid biped..?"
icon_state = "predplush"
black_market_value = 100

/obj/item/toy/plush/barricade
name = "plushie barricade"
desc = "Great for squeezing whenever you're scared. Or lightly hurt. Or in any other situation."
icon_state = "barricade"
item_state = "cade_plush"

/obj/item/toy/plush/shark //A few more generic plushies to increase the size of the plushie loot pool
name = "shark plush doll"
name = "shark plush"
desc = "A plushie depicting a somewhat cartoonish shark. The tag notes that it was made by an obscure furniture manufacturer in Scandinavia."
icon_state = "shark"

/obj/item/toy/plush/bee
name = "bee plush doll"
desc = "A cute toy that resembles an even cuter bee."
name = "bee plush"
desc = "A cute toy that awakens the warrior spirit in the most reserved marine."
icon_state = "bee"

/obj/item/toy/plush/moth
name = "moth plush doll"
name = "moth plush"
desc = "A plush doll of a bug."
icon_state = "moth"

/obj/item/toy/plush/rock
name = "rock plush doll"
name = "rock plush"
desc = "It says it is a plush on the tag, at least."
icon_state = "rock"

/obj/item/toy/plush/runner
name = "\improper XX-121 therapy doll"
desc = "Don't be sad! Be glad (that you're alive)!"
icon_state = "runner"
/// If the runner is wearing a beret
var/beret = FALSE

/obj/item/toy/plush/runner/Initialize(mapload, ...)
. = ..()
if(beret)
update_icon()

/obj/item/toy/plush/runner/attackby(obj/item/attacking_object, mob/user)
. = ..()
if(beret)
return ..()
if(!istypestrict(attacking_object, /obj/item/clothing/head/beret/marine/mp))
return ..()
var/beret_attack = attacking_object
to_chat(user, SPAN_NOTICE("You put [beret_attack] on [src]."))
qdel(beret_attack)
beret = TRUE
update_icon()

/obj/item/toy/plush/runner/update_icon()
. = ..()
if(beret)
icon_state = "runner_beret"
return
icon_state = "runner"

/obj/item/toy/plush/therapy
name = "therapy doll"
name = "therapy plush"
desc = "A therapeutic toy to assist marines in recovering from mental and behavioral disorders after experiencing the trauma of battles."
icon_state = "therapy"

/obj/item/toy/plush/therapy/red
name = "red therapy doll"
name = "red therapy plush"
color = "#FC5274"

/obj/item/toy/plush/therapy/blue
name = "blue therapy doll"
name = "blue therapy plush"
color = "#9EBAE0"

/obj/item/toy/plush/therapy/green
name = "green therapy doll"
name = "green therapy plush"
color = "#A3C940"

/obj/item/toy/plush/therapy/orange
name = "orange therapy doll"
name = "orange therapy plush"
color = "#FD8535"

/obj/item/toy/plush/therapy/purple
name = "purple therapy doll"
name = "purple therapy plush"
color = "#A26AC7"

/obj/item/toy/plush/therapy/yellow
name = "yellow therapy doll"
name = "yellow therapy plush"
color = "#FFE492"

/obj/item/toy/plush/therapy/random_color
///Hexadecimal 0-F (0-15)
var/static/list/hex = list("0", "1", "2", "3" , "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")
var/static/list/hexadecimal = list("0", "1", "2", "3" , "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")

/obj/item/toy/plush/therapy/random_color/New(loc, ...)
. = ..()
var/color_hex = "#[pick(hex)][pick(hex)][pick(hex)][pick(hex)][pick(hex)][pick(hex)]" //This is dumb and I hope theres a better way I'm missing
color = color_hex
desc = "A custom therapy doll, in a unique color. This one is labeled \"[color_hex]\"."
var/color_code = "#[pick(hexadecimal)][pick(hexadecimal)][pick(hexadecimal)][pick(hexadecimal)][pick(hexadecimal)][pick(hexadecimal)]" //This is dumb and I hope theres a better way I'm missing
color = color_code
desc = "A custom therapy plush, in a unique color. This one is labeled with \"#[color_code]\"."

/obj/item/toy/plush/random_plushie //Not using an effect so it can fit into storage from loadout
name = "random plushie spawner"
Expand Down Expand Up @@ -634,3 +597,44 @@
var/random_plushie = pick(plush_list_variety)
new random_plushie(loc)
qdel(src)

//Admin plushies
/obj/item/toy/plush/yautja
name = "strange plush"
desc = "A plush doll depicting some sort of tall humanoid biped..?"
icon_state = "yautja"
black_market_value = 100

/obj/item/toy/plush/runner
name = "\improper XX-121 therapy plush"
desc = "Don't be sad! Be glad (that you're alive)!"
icon_state = "runner"
/// If the runner is wearing a beret
var/beret = FALSE

/obj/item/toy/plush/runner/Initialize(mapload, ...)
. = ..()
if(beret)
update_icon()

/obj/item/toy/plush/runner/attackby(obj/item/attacking_object, mob/user)
. = ..()
if(beret)
return ..()
if(!istypestrict(attacking_object, /obj/item/clothing/head/beret/marine/mp))
return ..()
var/beret_attack = attacking_object
to_chat(user, SPAN_NOTICE("You put [beret_attack] on [src]."))
qdel(beret_attack)
beret = TRUE
update_icon()

/obj/item/toy/plush/runner/update_icon()
. = ..()
if(beret)
icon_state = "runner_beret"
return
icon_state = "runner"

/obj/item/toy/plush/shark/alt
icon_state = "shark_alt"
135 changes: 135 additions & 0 deletions code/game/objects/items/weapons/blades.dm
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,138 @@
WEAR_L_HAND = 'icons/mob/humans/onmob/items_lefthand_64.dmi',
WEAR_R_HAND = 'icons/mob/humans/onmob/items_righthand_64.dmi'
)

/obj/item/weapon/straight_razor
name = "straight razor"
desc = "The commandant's favorite weapon against marines who dare break the grooming standards."
icon_state = "razor"
hitsound = 'sound/weapons/genhit3.ogg'
force = MELEE_FORCE_TIER_1
throwforce = MELEE_FORCE_TIER_1
throw_speed = SPEED_VERY_FAST
throw_range = 6
///Icon state for opened razor
var/enabled_icon = "razor"
///Icon state for closed razor
var/disabled_icon = "razor_off"
///If the razor is able to be used
var/razor_opened = FALSE
///Time taken to open/close the razor
var/interaction_time = 3 SECONDS

/obj/item/weapon/straight_razor/Initialize(mapload, ...)
. = ..()
change_razor_state(razor_opened)
if(prob(1))
desc += " There is phrase etched into it, \"<i>It can guarantee the closest shave you'll ever know.</i>\"..."

/obj/item/weapon/straight_razor/update_icon()
. = ..()
if(razor_opened)
icon_state = enabled_icon
return
icon_state = disabled_icon

/obj/item/weapon/straight_razor/attack_hand(mob/user)
if(loc != user) //Only do unique stuff if you are holding it
return ..()

if(!do_after(user, interaction_time, INTERRUPT_INCAPACITATED, BUSY_ICON_HOSTILE))
return
playsound(user, 'sound/weapons/flipblade.ogg', 15, 1)
change_razor_state(!razor_opened)
to_chat(user, SPAN_NOTICE("You [razor_opened ? "reveal" : "hide"] [src]'s blade."))

/obj/item/weapon/straight_razor/additional_shoe_store_behavior(mob/user, obj/item/clothing/shoes/shoes, obj/item/stored_item)
if(!razor_opened)
return TRUE
to_chat(user, SPAN_NOTICE("You cannot store [src] in [shoes] until the blade is hidden."))

///Changes all the vars for the straight razor
/obj/item/weapon/straight_razor/proc/change_razor_state(opening = FALSE)
razor_opened = opening
update_icon()
if(opening)
force = MELEE_FORCE_NORMAL
throwforce = MELEE_FORCE_NORMAL
sharp = IS_SHARP_ITEM_ACCURATE
edge = TRUE
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/slash.ogg'
if(!(flags_item & CAN_DIG_SHRAPNEL))
flags_item |= CAN_DIG_SHRAPNEL
return
force = MELEE_FORCE_TIER_1
throwforce = MELEE_FORCE_TIER_1
sharp = FALSE
edge = FALSE
attack_verb = list("smashed", "beaten", "slammed", "struck", "smashed", "battered", "cracked")
hitsound = 'sound/weapons/genhit3.ogg'
if(flags_item & CAN_DIG_SHRAPNEL)
flags_item &= ~CAN_DIG_SHRAPNEL

/obj/item/weapon/straight_razor/verb/change_hair_style()
set name = "Change Hair Style"
set desc = "Change your hair style"
set category = "Object"
set src in usr

var/mob/living/carbon/human/human_user = usr
if(!istype(human_user))
return

if(!razor_opened)
to_chat(human_user, SPAN_NOTICE("You need to reveal [src]'s blade to change your hairstyle."))
return

var/list/species_facial_hair = GLOB.facial_hair_styles_list
var/list/species_hair = GLOB.hair_styles_list

if(human_user.species) //Facial hair
species_facial_hair = list()
for(var/current_style in GLOB.facial_hair_styles_list)
var/datum/sprite_accessory/facial_hair/temp_beard_style = GLOB.facial_hair_styles_list[current_style]
if(!(human_user.species.name in temp_beard_style.species_allowed))
continue
if(!temp_beard_style.selectable)
continue
species_facial_hair += current_style

if(human_user.species) //Hair
species_hair = list()
for(var/current_style in GLOB.hair_styles_list)
var/datum/sprite_accessory/hair/temp_hair_style = GLOB.hair_styles_list[current_style]
if(!(human_user.species.name in temp_hair_style.species_allowed))
continue
if(!temp_hair_style.selectable)
continue
species_hair += current_style

var/new_beard_style
var/new_hair_style
if(human_user.gender == MALE)
new_beard_style = input(human_user, "Select a facial hair style", "Grooming") as null|anything in species_facial_hair
new_hair_style = input(human_user, "Select a hair style", "Grooming") as null|anything in species_hair

if(loc != human_user)
to_chat(human_user, SPAN_NOTICE("You are too far from [src] to change your hair styles."))
return

if(!new_beard_style && !new_hair_style)
return

if(!do_after(human_user, interaction_time, INTERRUPT_ALL, BUSY_ICON_GENERIC))
return

if(!razor_opened)
to_chat(human_user, SPAN_NOTICE("You need to reveal [src]'s blade to change your hairstyle."))
return

if(new_beard_style)
human_user.f_style = new_beard_style
if(new_hair_style)
human_user.h_style = new_hair_style

human_user.apply_damage(rand(1,5), BRUTE, "head", src)
human_user.update_hair()

Loading

0 comments on commit c04cc9e

Please sign in to comment.