mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Botany Rework
This commit is contained in:
@@ -14,16 +14,9 @@
|
||||
/mob/living/simple_animal/hostile/poison/bees/bee_friendly()
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/bot/bee_friendly()
|
||||
if(paicard)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/diona/bee_friendly()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/bee_friendly()
|
||||
if(get_species() == "Diona") //bees pollinate plants, duh.
|
||||
if(dna && dna.species && dna.species.id == "pod") //bees pollinate plants, duh.
|
||||
return 1
|
||||
if((wear_suit && (wear_suit.flags & THICKMATERIAL)) && (head && (head.flags & THICKMATERIAL)))
|
||||
return 1
|
||||
@@ -33,7 +26,7 @@
|
||||
/obj/structure/beebox
|
||||
name = "apiary"
|
||||
desc = "Dr Miles Manners is just your average Wasp themed super hero by day, but by night he becomes DR BEES!"
|
||||
icon = 'icons/obj/apiary_bees.dmi'
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "beebox"
|
||||
anchored = 1
|
||||
density = 1
|
||||
@@ -82,7 +75,7 @@
|
||||
honey_frames += HF
|
||||
|
||||
for(var/i in 1 to get_max_bees())
|
||||
var/mob/living/simple_animal/hostile/poison/bees/worker/B = new(src)
|
||||
var/mob/living/simple_animal/hostile/poison/bees/B = new(src)
|
||||
bees += B
|
||||
B.beehome = src
|
||||
B.assign_reagent(R)
|
||||
@@ -109,7 +102,7 @@
|
||||
if((bee_resources >= BEE_RESOURCE_NEW_BEE_COST && prob(BEE_PROB_NEW_BEE)) || freebee)
|
||||
if(!freebee)
|
||||
bee_resources = max(bee_resources - BEE_RESOURCE_NEW_BEE_COST, 0)
|
||||
var/mob/living/simple_animal/hostile/poison/bees/worker/B = new(src)
|
||||
var/mob/living/simple_animal/hostile/poison/bees/B = new(src)
|
||||
B.beehome = src
|
||||
B.assign_reagent(queen_bee.beegent)
|
||||
bees += B
|
||||
@@ -154,7 +147,7 @@
|
||||
if(honey_frames.len < BEEBOX_MAX_FRAMES)
|
||||
visible_message("<span class='notice'>[user] adds a frame to the apiary.</span>")
|
||||
user.unEquip(HF)
|
||||
HF.forceMove(src)
|
||||
HF.loc = src
|
||||
honey_frames += HF
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There's no room for anymore frames in the apiary!</span>")
|
||||
@@ -171,7 +164,7 @@
|
||||
var/obj/item/queen_bee/qb = I
|
||||
user.unEquip(qb)
|
||||
|
||||
qb.queen.forceMove(src)
|
||||
qb.queen.loc = src
|
||||
bees += qb.queen
|
||||
queen_bee = qb.queen
|
||||
qb.queen = null
|
||||
@@ -180,12 +173,12 @@
|
||||
visible_message("<span class='notice'>[user] sets [qb] down inside the apiary, making it their new home.</span>")
|
||||
var/relocated = 0
|
||||
for(var/b in bees)
|
||||
var/mob/living/simple_animal/hostile/poison/bees/worker/B = b
|
||||
var/mob/living/simple_animal/hostile/poison/bees/B = b
|
||||
if(B.reagent_incompatible(queen_bee))
|
||||
bees -= B
|
||||
B.beehome = null
|
||||
if(B.loc == src)
|
||||
B.forceMove(get_turf(src))
|
||||
B.loc = get_turf(src)
|
||||
relocated++
|
||||
if(relocated)
|
||||
to_chat(user, "<span class='warning'>This queen has a different reagent to some of the bees who live here, those bees will not return to this apiary!</span>")
|
||||
@@ -197,58 +190,57 @@
|
||||
|
||||
|
||||
/obj/structure/beebox/attack_hand(mob/user)
|
||||
if(ishuman(user))
|
||||
if(!user.bee_friendly())
|
||||
//Time to get stung!
|
||||
var/bees = FALSE
|
||||
for(var/b in bees) //everyone who's ever lived here now instantly hates you, suck it assistant!
|
||||
var/mob/living/simple_animal/hostile/poison/bees/B = b
|
||||
if(B.isqueen)
|
||||
continue
|
||||
if(B.loc == src)
|
||||
B.forceMove(get_turf(src))
|
||||
B.target = user
|
||||
bees = TRUE
|
||||
if(bees)
|
||||
visible_message("<span class='danger'>[user] disturbs the bees!</span>")
|
||||
else
|
||||
var/option = input(user, "What Action do you wish to perform?", "Apiary") as null|anything in list("Remove a Honey Frame","Remove the Queen Bee")
|
||||
if(!Adjacent(user) || !option)
|
||||
return
|
||||
switch(option)
|
||||
if("Remove a Honey Frame")
|
||||
if(!honey_frames.len)
|
||||
to_chat(user, "<span class='warning'>There are no honey frames to remove!</span>")
|
||||
return
|
||||
if(!user.bee_friendly())
|
||||
//Time to get stung!
|
||||
var/bees = FALSE
|
||||
for(var/b in bees) //everyone who's ever lived here now instantly hates you, suck it assistant!
|
||||
var/mob/living/simple_animal/hostile/poison/bees/B = b
|
||||
if(B.isqueen)
|
||||
continue
|
||||
if(B.loc == src)
|
||||
B.loc = get_turf(src)
|
||||
B.target = user
|
||||
bees = TRUE
|
||||
if(bees)
|
||||
visible_message("<span class='danger'>[user] disturbs the bees!</span>")
|
||||
else
|
||||
var/option = alert(user, "What Action do you wish to perform?","Apiary","Remove a Honey Frame","Remove the Queen Bee")
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
switch(option)
|
||||
if("Remove a Honey Frame")
|
||||
if(!honey_frames.len)
|
||||
to_chat(user, "<span class='warning'>There are no honey frames to remove!</span>")
|
||||
return
|
||||
|
||||
var/obj/item/honey_frame/HF = pick_n_take(honey_frames)
|
||||
if(HF)
|
||||
if(!user.put_in_active_hand(HF))
|
||||
HF.forceMove(get_turf(src))
|
||||
visible_message("<span class='notice'>[user] removes a frame from the apiary.</span>")
|
||||
var/obj/item/honey_frame/HF = pick_n_take(honey_frames)
|
||||
if(HF)
|
||||
if(!user.put_in_active_hand(HF))
|
||||
HF.loc = get_turf(src)
|
||||
visible_message("<span class='notice'>[user] removes a frame from the apiary.</span>")
|
||||
|
||||
var/amtH = HF.honeycomb_capacity
|
||||
var/fallen = 0
|
||||
while(honeycombs.len && amtH) //let's pretend you always grab the frame with the most honeycomb on it
|
||||
var/obj/item/weapon/reagent_containers/honeycomb/HC = pick_n_take(honeycombs)
|
||||
if(HC)
|
||||
HC.forceMove(get_turf(src))
|
||||
amtH--
|
||||
fallen++
|
||||
if(fallen)
|
||||
var/multiple = fallen > 1
|
||||
visible_message("<span class='notice'>[user] scrapes [multiple ? "[fallen]" : "a"] honeycomb[multiple ? "s" : ""] off of the frame.</span>")
|
||||
var/amtH = HF.honeycomb_capacity
|
||||
var/fallen = 0
|
||||
while(honeycombs.len && amtH) //let's pretend you always grab the frame with the most honeycomb on it
|
||||
var/obj/item/weapon/reagent_containers/honeycomb/HC = pick_n_take(honeycombs)
|
||||
if(HC)
|
||||
HC.loc = get_turf(user)
|
||||
amtH--
|
||||
fallen++
|
||||
if(fallen)
|
||||
var/multiple = fallen > 1
|
||||
visible_message("<span class='notice'>[user] scrapes [multiple ? "[fallen]" : "a"] honeycomb[multiple ? "s" : ""] off of the frame.</span>")
|
||||
|
||||
if("Remove the Queen Bee")
|
||||
if(!queen_bee || queen_bee.loc != src)
|
||||
to_chat(user, "<span class='warning'>There is no queen bee to remove!</span>")
|
||||
return
|
||||
var/obj/item/queen_bee/QB = new()
|
||||
queen_bee.forceMove(QB)
|
||||
bees -= queen_bee
|
||||
QB.queen = queen_bee
|
||||
QB.name = queen_bee.name
|
||||
if(!user.put_in_active_hand(QB))
|
||||
QB.forceMove(get_turf(src))
|
||||
visible_message("<span class='notice'>[user] removes the queen from the apiary.</span>")
|
||||
queen_bee = null
|
||||
if("Remove the Queen Bee")
|
||||
if(!queen_bee || queen_bee.loc != src)
|
||||
to_chat(user, "<span class='warning'>There is no queen bee to remove!</span>")
|
||||
return
|
||||
var/obj/item/queen_bee/QB = new()
|
||||
queen_bee.loc = QB
|
||||
bees -= queen_bee
|
||||
QB.queen = queen_bee
|
||||
QB.name = queen_bee.name
|
||||
if(!user.put_in_active_hand(QB))
|
||||
QB.loc = get_turf(src)
|
||||
visible_message("<span class='notice'>[user] removes the queen from the apiary.</span>")
|
||||
queen_bee = null
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/obj/item/clothing/head/beekeeper_head
|
||||
name = "beekeeper hat"
|
||||
desc = "Keeps the li'l buzzing buggers out of your eyes."
|
||||
desc = "Keeps the lil buzzing buggers out of your eyes."
|
||||
icon_state = "beekeeper"
|
||||
item_state = "beekeeper"
|
||||
flags = THICKMATERIAL
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
/obj/item/clothing/suit/beekeeper_suit
|
||||
name = "beekeeper suit"
|
||||
desc = "Keeps the li'l buzzing buggers away from your squishy bits."
|
||||
desc = "Keeps the lil buzzing buggers away from your squishy bits."
|
||||
icon_state = "beekeeper"
|
||||
item_state = "beekeeper"
|
||||
flags = THICKMATERIAL
|
||||
allowed = list (/obj/item/weapon/reagent_containers/spray/plantbgone,/obj/item/device/analyzer/plant_analyzer,/obj/item/seeds,/obj/item/weapon/reagent_containers/glass/bottle/fertilizer,/obj/item/weapon/minihoe)
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
/obj/item/honey_frame
|
||||
name = "honey frame"
|
||||
desc = "a scaffold for bees to build honeycomb on"
|
||||
icon = 'icons/obj/apiary_bees.dmi'
|
||||
desc = "A scaffold for bees to build honeycomb on."
|
||||
icon = 'icons/obj/hydroponics/equipment.dmi'
|
||||
icon_state = "honey_frame"
|
||||
var/honeycomb_capacity = 10 //10 Honeycomb per frame by default, researchable frames perhaps?
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
/obj/item/weapon/reagent_containers/honeycomb
|
||||
name = "honeycomb"
|
||||
desc = "a hexagonal mesh of honeycomb"
|
||||
icon = 'icons/obj/apiary_bees.dmi'
|
||||
desc = "A hexagonal mesh of honeycomb."
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "honeycomb"
|
||||
possible_transfer_amounts = list()
|
||||
disease_amount = 0
|
||||
@@ -22,10 +22,10 @@
|
||||
overlays.Cut()
|
||||
var/image/honey
|
||||
if(honey_color)
|
||||
honey = image(icon = 'icons/obj/apiary_bees.dmi', icon_state = "greyscale_honey")
|
||||
honey = image(icon = 'icons/obj/hydroponics/harvest.dmi', icon_state = "greyscale_honey")
|
||||
honey.color = honey_color
|
||||
else
|
||||
honey = image(icon = 'icons/obj/apiary_bees.dmi', icon_state = "honey")
|
||||
honey = image(icon = 'icons/obj/hydroponics/harvest.dmi', icon_state = "honey")
|
||||
overlays += honey
|
||||
|
||||
|
||||
@@ -37,4 +37,4 @@
|
||||
reagents.add_reagent(R.id,5)
|
||||
else
|
||||
honey_color = ""
|
||||
update_icon()
|
||||
update_icon()
|
||||
Reference in New Issue
Block a user