Skip to content

Commit

Permalink
[MIRROR] Flowers from hydroponics can be made into hair pins
Browse files Browse the repository at this point in the history
  • Loading branch information
rootoo807 authored and SuhEugene committed Nov 27, 2023
1 parent 076917d commit b8a35e6
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 22 deletions.
2 changes: 1 addition & 1 deletion code/datums/supplypacks/nonessent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
/obj/item/clothing/head/pirate,
/obj/item/clothing/head/hasturhood,
/obj/item/clothing/head/powdered_wig,
/obj/item/clothing/head/hairflower,
/obj/item/clothing/head/hairflower/red,
/obj/item/clothing/head/hairflower/yellow,
/obj/item/clothing/head/hairflower/blue,
/obj/item/clothing/head/hairflower/pink,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
return list(
/obj/item/clothing/head/that = 2,
/obj/item/device/radio/headset/headset_service = 2,
/obj/item/clothing/head/hairflower,
/obj/item/clothing/head/hairflower/red,
/obj/item/clothing/head/hairflower/pink,
/obj/item/clothing/head/hairflower/yellow,
/obj/item/clothing/head/hairflower/blue,
Expand Down
10 changes: 1 addition & 9 deletions code/modules/client/preference_setup/loadout/lists/headwear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,7 @@
/datum/gear/head/hairflower
display_name = "hair flower pin"
path = /obj/item/clothing/head/hairflower

/datum/gear/head/hairflower/New()
..()
var/pins = list()
pins["blue pin"] = /obj/item/clothing/head/hairflower/blue
pins["pink pin"] = /obj/item/clothing/head/hairflower/pink
pins["red pin"] = /obj/item/clothing/head/hairflower
pins["yellow pin"] = /obj/item/clothing/head/hairflower/yellow
gear_tweaks += new/datum/gear_tweak/path(pins)
flags = GEAR_HAS_COLOR_SELECTION

/datum/gear/head/hardhat
display_name = "hardhat selection"
Expand Down
11 changes: 7 additions & 4 deletions code/modules/clothing/head/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,21 @@
/obj/item/clothing/head/hairflower
name = "hair flower pin"
icon_state = "hairflower"
desc = "Smells nice."
desc = "A floral pin with a clip on the back to attach to hair."
slot_flags = SLOT_HEAD | SLOT_EARS
body_parts_covered = 0

/obj/item/clothing/head/hairflower/red
color = COLOR_RED

/obj/item/clothing/head/hairflower/blue
icon_state = "hairflower_blue"
color = COLOR_BLUE

/obj/item/clothing/head/hairflower/pink
icon_state = "hairflower_pink"
color = COLOR_PINK

/obj/item/clothing/head/hairflower/yellow
icon_state = "hairflower_yellow"
color = COLOR_YELLOW

/obj/item/clothing/head/hairflower/bow
icon_state = "bow"
Expand Down
30 changes: 24 additions & 6 deletions code/modules/hydroponics/grown.dm
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,32 @@
/obj/item/reagent_containers/food/snacks/grown/attackby(obj/item/W, mob/user)

if(seed)
if(seed.get_trait(TRAIT_PRODUCES_POWER) && isCoil(W))
if(isCoil(W))
var/obj/item/stack/cable_coil/C = W
if(C.use(5))
//TODO: generalize this.
if(seed.get_trait(TRAIT_PRODUCT_ICON) in list("flower2","flower3","flower4","flower5","flower6"))
if(!C.can_use(1))
USE_FEEDBACK_STACK_NOT_ENOUGH(C, 1, "to make a pin out of \the [src.name].")
return
C.use(1)
to_chat(user, SPAN_NOTICE("You add some wire to the [src.name] and make a pin."))
var/obj/item/clothing/head/hairflower/pin = new /obj/item/clothing/head/hairflower(get_turf(src))
pin.name = "[src.name] pin"
pin.icon = 'icons/obj/flora/hydroponics_products.dmi'
pin.icon_state = "[seed.get_trait(TRAIT_PRODUCT_ICON)]-product"
if("[seed.get_trait(TRAIT_PRODUCT_ICON)]-leaf" in icon_states('icons/obj/flora/hydroponics_products.dmi'))
var/image/fruit_leaves = image('icons/obj/flora/hydroponics_products.dmi',"[seed.get_trait(TRAIT_PRODUCT_ICON)]-leaf")
fruit_leaves.color = seed.get_trait(TRAIT_PLANT_COLOUR)
pin.AddOverlays(fruit_leaves)
pin.item_state = "hairflower"
pin.color = src.color
qdel(src)
return
else if(seed.get_trait(TRAIT_PRODUCES_POWER))
if(!C.can_use(5))
USE_FEEDBACK_STACK_NOT_ENOUGH(C, 5, "to wire \the [src.name].")
return
to_chat(user, SPAN_NOTICE("You add some cable to the [src.name] and slide it inside the battery casing."))
var/obj/item/cell/potato/pocell = new /obj/item/cell/potato(get_turf(user))
if(src.loc == user && user.HasFreeHand() && istype(user,/mob/living/carbon/human))
user.put_in_hands(pocell)
var/obj/item/cell/potato/pocell = new /obj/item/cell/potato(get_turf(src))
pocell.maxcharge = src.potency * 10
pocell.charge = pocell.maxcharge
qdel(src)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/hydroponics/seed_datums.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,7 @@

/datum/seed/ximikoa
name = "ximikoa"
seed_name = "ximi'koa stalks"
seed_name = "ximi'koa"
display_name = "ximi'koa patch"
chems = list(/datum/reagent/nutriment = list(1,2), /datum/reagent/sugar = list(4,5))
fruit_size = ITEM_SIZE_TINY
Expand Down
Binary file modified icons/mob/onmob/onmob_ears.dmi
Binary file not shown.
Binary file modified icons/mob/onmob/onmob_head.dmi
Binary file not shown.
Binary file modified icons/mob/species/unathi/onmob_ears_unathi.dmi
Binary file not shown.
Binary file modified icons/mob/species/unathi/onmob_head_unathi.dmi
Binary file not shown.
Binary file modified icons/obj/clothing/obj_head.dmi
Binary file not shown.

0 comments on commit b8a35e6

Please sign in to comment.