Skip to content

Commit

Permalink
add: biker helmet
Browse files Browse the repository at this point in the history
  • Loading branch information
Etrnlmelancholy committed Nov 16, 2024
1 parent b295619 commit c0bee81
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/game/machinery/vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2419,7 +2419,8 @@
/obj/item/clothing/head/fedora = 10,
/obj/item/clothing/head/fez = 10,
/obj/item/clothing/head/beret = 10)
contraband = list(/obj/item/clothing/head/bearpelt = 5)
contraband = list(/obj/item/clothing/head/bearpelt = 5,
/obj/item/clothing/head/helmet/biker = 3)
premium = list(/obj/item/clothing/head/soft/rainbow = 1)
refill_canister = /obj/item/vending_refill/hatdispenser

Expand Down
1 change: 1 addition & 0 deletions code/game/objects/effects/spawners/lootdrop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
/obj/item/stack/tape_roll = 10,
/obj/item/storage/bag/plasticbag = 20,
/obj/item/caution = 10,
/obj/item/clothing/head/helmet/biker = 2,
////////////////CONTRABAND STUFF//////////////////
/obj/item/grenade/clown_grenade = 3,
/obj/item/seeds/ambrosia/cruciatus = 3,
Expand Down
44 changes: 44 additions & 0 deletions code/modules/clothing/head/helmet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -471,3 +471,47 @@
SPECIES_NEARA = 'icons/mob/clothing/species/monkey/head.dmi',
SPECIES_STOK = 'icons/mob/clothing/species/monkey/head.dmi'
)
/obj/item/clothing/head/helmet/biker
name = "Motorcycle helmet"
desc = "Самый обычный мотоциклетный шлем."
armor = list("melee" = 25, "bullet" = 10, "laser" = 30, "energy" = 30, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 30, "acid" = 0)
icon_state = "biker"
item_state = "biker"
flags_inv = HIDEMASK|HIDEHEADSETS|HIDEGLASSES|HIDEHAIR
flags_cover = HEADCOVERSEYES|HEADCOVERSMOUTH
var/paintable = TRUE
sprite_sheets = list(
SPECIES_MONKEY = 'icons/mob/clothing/species/monkey/head.dmi'
)
species_restricted = list(SPECIES_HUMAN, SPECIES_SLIMEPERSON, SPECIES_SKELETON, SPECIES_NUCLEATION, SPECIES_MACNINEPERSON, SPECIES_DIONA, SPECIES_SHADOW_BASIC, SPECIES_MONKEY)

obj/item/clothing/head/helmet/biker/Initialize(mapload)

Check warning on line 488 in code/modules/clothing/head/helmet.dm

View workflow job for this annotation

GitHub Actions / Run Linters

relatively pathed proc defined here
. = ..()
if(!color && paintable)
color = "#161515"
update_icon(UPDATE_OVERLAYS)


/obj/item/clothing/head/helmet/biker/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/toy/crayon/spraycan))
var/obj/item/toy/crayon/spraycan/can = I
if(!paintable)
to_chat(user, span_warning("You cannot paint [src]."))
return ATTACK_CHAIN_PROCEED|ATTACK_CHAIN_NO_AFTERATTACK
if(can.capped)
to_chat(user, span_warning("The cap on [can] is sealed."))
return ATTACK_CHAIN_PROCEED|ATTACK_CHAIN_NO_AFTERATTACK
to_chat(user, span_notice("You paint [src]."))
playsound(user.loc, 'sound/effects/spray.ogg', 20, TRUE)
color = can.colour
update_icon(UPDATE_OVERLAYS)
return ATTACK_CHAIN_PROCEED_SUCCESS|ATTACK_CHAIN_NO_AFTERATTACK

return ..()


/obj/item/clothing/head/helmet/biker/update_overlays()
. = ..()
if(color)
var/mutable_appearance/biker_overlay = mutable_appearance(icon='icons/obj/clothing/hats.dmi', icon_state = "biker_overlay")
. += biker_overlay
Binary file modified icons/mob/clothing/head.dmi
Binary file not shown.
Binary file modified icons/mob/clothing/species/monkey/head.dmi
Binary file not shown.
Binary file modified icons/obj/clothing/hats.dmi
Binary file not shown.

0 comments on commit c0bee81

Please sign in to comment.