diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index e430616467b..6109d63e186 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -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 diff --git a/code/game/objects/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm index 39d2e954db0..080ac73019f 100644 --- a/code/game/objects/effects/spawners/lootdrop.dm +++ b/code/game/objects/effects/spawners/lootdrop.dm @@ -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, diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index cc5bd1bacea..071b902d192 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -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) + . = ..() + 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 diff --git a/icons/mob/clothing/head.dmi b/icons/mob/clothing/head.dmi index 88b6f5bd058..f23e7b7b571 100644 Binary files a/icons/mob/clothing/head.dmi and b/icons/mob/clothing/head.dmi differ diff --git a/icons/mob/clothing/species/monkey/head.dmi b/icons/mob/clothing/species/monkey/head.dmi index e8c793b66d4..2e8e4278b5c 100644 Binary files a/icons/mob/clothing/species/monkey/head.dmi and b/icons/mob/clothing/species/monkey/head.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index 93a943f6ca5..eea75185ce8 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ