Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion code/modules/hydroponics/seeds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,11 @@
seed_type = "goldapple"
vending_cat = "fruits"

/obj/item/seeds/crabappleseed
name = "packet of crab apple seeds"
seed_type = "crabapple"
vending_cat = "fruits"

/obj/item/seeds/ambrosiavulgarisseed
name = "packet of ambrosia vulgaris seeds"
seed_type = "ambrosia"
Expand Down Expand Up @@ -789,7 +794,7 @@
display_name = "apple tree"
plant_dmi = 'icons/obj/hydroponics/apple.dmi'
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/apple)
mutants = list("poisonapple","goldapple")
mutants = list("poisonapple","goldapple", "crabapple")
harvest_repeat = 1
chems = list(NUTRIMENT = list(1,10))

Expand All @@ -805,6 +810,7 @@
name = "poisonapple"
mutants = null
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/apple/poisoned)
mutants = null
chems = list(CYANIDE = list(1,5))

/datum/seed/apple/gold
Expand All @@ -820,6 +826,20 @@
production = 10
yield = 3

/datum/seed/apple/crab
name = "crabapple"
seed_name = "crab apple"
display_name = "crab apple tree"
plant_dmi = 'icons/obj/hydroponics/crabapple.dmi'
products = list(/obj/item/weapon/reagent_containers/food/snacks/grown/apple/crabapple)
mutants = null
chems = list(NUTRIMENT = list(1,10), TANNIC_ACID = list(1,30))

maturation = 4
production = 4
yield = 2
pest_tolerance = 75

//Ambrosia/varieties.
/datum/seed/ambrosia
name = "ambrosia"
Expand Down
Comment thread
vampirebat74 marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/mob/living/simple_animal/hostile/retaliate/crabapple
name = "crab apple"
desc = "No one likes crabs..."
icon_state = "crab_apple"
Comment thread
vampirebat74 marked this conversation as resolved.
icon_living = "crab_apple"
faction = "tomato"
speak_chance = 0
turns_per_move = 3
maxHealth = 5
health = 5
response_help = "prods the"
response_disarm = "pushes aside the"
response_harm = "snaps the"
attacktext = "pinches"
attack_sound = 'sound/weapons/bite.ogg'
harm_intent_damage = 1
melee_damage_lower = 1
melee_damage_upper = 1
environment_smash_flags = 0
var/obj/item/weapon/reagent_containers/food/snacks/grown/apple/crabapple/my_fruit

/mob/living/simple_animal/hostile/retaliate/crabapple/reagent_act(id, method, volume)
.=..()

switch(id)
if(PLANTBGONE)
death(FALSE)

/mob/living/simple_animal/hostile/retaliate/crabapple/death(var/gibbed = FALSE)
..(TRUE)
new /obj/item/weapon/reagent_containers/food/snacks/meat/crabmeat(src.loc)
if(!my_fruit)
my_fruit = new(loc)
my_fruit.forceMove(loc)
my_fruit.alive = FALSE
qdel(src)

/mob/living/simple_animal/hostile/retaliate/crabapple/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(O.is_wirecutter(user))
if(stat == DEAD)
return ..()
to_chat(user, "<span class='danger'>This kills the crab.</span>")
health -= 25
death()
else
return ..()
38 changes: 38 additions & 0 deletions code/modules/reagents/reagent_containers/food/snacks/grown.dm
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,44 @@ var/list/strange_seed_product_blacklist = subtypesof(/obj/item/weapon/reagent_co
filling_color = "#F5CB42"
plantname = "goldapple"

/obj/item/weapon/reagent_containers/food/snacks/grown/apple/crabapple
name = "crab apple"
desc = "An even smaller piece of Eden."
potency = 15
plantname = "crabapple"
var/alive = TRUE

/obj/item/weapon/reagent_containers/food/snacks/grown/apple/crabapple/after_consume(mob/living/carbon/eater)
if(!alive)
return ..()
to_chat(eater, "<span class='warning'>The [src] skitters away from your grip!</span>")
create_crab(eater, TRUE)

/obj/item/weapon/reagent_containers/food/snacks/grown/apple/crabapple/attack_self(mob/user as mob)
if(!alive)
return ..()
to_chat(user, "<span class='notice'>You plant the crab apple.</span>")
create_crab(user)


/obj/item/weapon/reagent_containers/food/snacks/grown/apple/crabapple/proc/create_crab(mob/user as mob, aggro = FALSE)
if(istype(user.loc, /turf/space))
return FALSE
Comment thread
vampirebat74 marked this conversation as resolved.
Outdated
alive = FALSE
var/mob/living/simple_animal/hostile/retaliate/crabapple/T = new(user.loc)
T.harm_intent_damage = clamp(potency/10, 1, 10)
T.melee_damage_lower = clamp(potency/20, 1, 5)
T.melee_damage_upper = clamp(potency/10, 1, 15)
T.health = clamp(potency/3, 5, 25)
T.maxHealth = clamp(potency/3, 5, 25)
T.my_fruit = new type(T)
T.my_fruit.seed = seed//doesn't work
if(aggro)
T.hostile = TRUE
T.health -= clamp(potency/6, 2, 12)
qdel(src)


/obj/item/weapon/reagent_containers/food/snacks/grown/watermelon
name = "watermelon"
desc = "It's full of watery goodness."
Expand Down
Binary file modified icons/mob/animal.dmi
Binary file not shown.
Binary file added icons/obj/hydroponics/crabapple.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions vgstation13.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2299,6 +2299,7 @@
#include "code\modules\mob\living\simple_animal\hostile\retaliate\clown.dm"
#include "code\modules\mob\living\simple_animal\hostile\retaliate\cluwne.dm"
#include "code\modules\mob\living\simple_animal\hostile\retaliate\cockatrice.dm"
#include "code\modules\mob\living\simple_animal\hostile\retaliate\crabapple.dm"
#include "code\modules\mob\living\simple_animal\hostile\retaliate\creatinecricket.dm"
#include "code\modules\mob\living\simple_animal\hostile\retaliate\drone.dm"
#include "code\modules\mob\living\simple_animal\hostile\retaliate\faguette.dm"
Expand Down
Loading