Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zinc Saucier Crate #33520

Merged
merged 4 commits into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion code/modules/food/recipes_microwave.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2799,7 +2799,7 @@

/datum/recipe/sweetandsourpork
reagents = list(SOYSAUCE = 10, SUGARS = 10) //Will require trading with humans to get soy, but they can make their own acid.
items = (
items = list(
/obj/item/weapon/reagent_containers/food/snacks/meat/box
)
result = /obj/item/weapon/reagent_containers/food/snacks/sweetandsourpork
Expand Down
3 changes: 2 additions & 1 deletion code/modules/hydroponics/hydro_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
return

form_title = "[grown_seed.seed_name] (#[grown_seed.uid])"
user.visible_message("<span class='notice'>[user] runs the scanner over [target].</span>")
if(loc == user) //Don't show this message if we are not inhand
user.visible_message("<span class='notice'>[user] runs the scanner over [target].</span>")

var/dat = list()
dat += "<h3>Plant data for [form_title]</h3>"
Expand Down
13 changes: 12 additions & 1 deletion code/modules/hydroponics/hydro_tray.dm
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@
to_chat(user, "[src] is full of dead plant matter.")
else
to_chat(user, "[src] has nothing planted.")
if (Adjacent(user) || isobserver(user) || issilicon(user))
if (Adjacent(user) || isobserver(user) || issilicon(user) || hydrovision(user))
to_chat(user, "Water: [get_waterlevel()]/100")
if(seed && seed.toxin_affinity >= 5)
to_chat(user, "Toxin: [get_toxinlevel()]/100")
Expand Down Expand Up @@ -489,6 +489,17 @@

to_chat(user, "The tray's sensor suite is reporting a light level of [round(light_available, 0.1)] lumens and a temperature of [environment.temperature]K.")

if(hydrovision(user))
var/mob/living/carbon/human/H = user
to_chat(user, "<span class='good'>Would you like to know more?</span> <a href='?src=\ref[H.glasses];scan=\ref[src]'>\[Scan\]</a>")

/obj/machinery/portable_atmospherics/hydroponics/proc/hydrovision(mob/user)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.is_wearing_item(/obj/item/clothing/glasses/hud/hydro))
return TRUE
return FALSE

/obj/machinery/portable_atmospherics/hydroponics/verb/close_lid()
set name = "Toggle Tray Lid"
set category = "Object"
Expand Down
131 changes: 131 additions & 0 deletions code/modules/mob/living/simple_animal/cricket.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
/mob/living/simple_animal/cricket
name = "space cricket"
desc = "Much larger than its Earth cousin due to low gravity. Unlike in the case of bush crickets, Katy didn't."

size = SIZE_TINY

icon_state = "cricket"
icon_living = "cricket"
icon_dead = "cricket-dead"

emote_hear = list("chirps")
emote_sound = list("sound/effects/cricket_chirp.ogg")

pass_flags = PASSTABLE | PASSGRILLE | PASSMACHINE

speak_chance = 5

maxHealth = 4
health = 4

response_help = "pets"
response_disarm = "pokes"
response_harm = "stomps on"

faction = "neutral"

density = 0

minbodytemp = 273.15 //Can't survive at below 0 C
maxbodytemp = INFINITY

min_oxy = 0
max_oxy = 0
min_tox = 0
max_tox = 0
min_co2 = 0
max_co2 = 0
min_n2 = 0
max_n2 = 0

plane = HIDING_MOB_PLANE

treadmill_speed = 0
turns_per_move = 2 //2 life ticks / move

size = SIZE_TINY
stop_automated_movement_when_pulled = 0

meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/cricket
held_items = list()

/mob/living/simple_animal/cricket/New()
..()

pixel_x = rand(-20, 20) * PIXEL_MULTIPLIER
pixel_y = rand(-20, 20) * PIXEL_MULTIPLIER

maxHealth = rand(1,6)
health = maxHealth

/mob/living/simple_animal/cricket/death(var/gore = 1)
global_cricket_population--
if(gore)

var/obj/effect/decal/remains = new /obj/effect/decal/cleanable/cricket_remains(loc)
remains.dir = dir
remains.pixel_x = pixel_x
remains.pixel_y = pixel_y
remains.icon_state = "cricket_remains[pick(1,2)]"

playsound(src, pick('sound/effects/gib1.ogg','sound/effects/gib2.ogg','sound/effects/gib3.ogg'), 40, 1) //Splat

..()

qdel(src)

else

return ..()

/mob/living/simple_animal/cricket/Crossed(mob/living/O)
if(!istype(O))
return
if(O.a_intent == I_HELP)
return //Must be on harm intent to stomp
if(O.isUnconscious())
return

if(prob(15))
death(gore = 1)

/mob/living/simple_animal/cricket/wander_move(turf/dest)
..()
var/halfway = rand(-10,10)
//- moving left. + moving right.
do_flick(src, "cricket-hop", 5)
animate(src, pixel_x = pixel_x - halfway, pixel_y = pixel_y + 4 * PIXEL_MULTIPLIER, 2, 1, ELASTIC_EASING)
animate(src, pixel_x = pixel_x - halfway, pixel_y = pixel_y - 4 * PIXEL_MULTIPLIER, 3, 1, ELASTIC_EASING)


/mob/living/simple_animal/cricket/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/newspaper))
user.visible_message("<span class='danger'>[user] swats \the [src] with \the [W]!</span>", "<span class='danger'>You swat \the [src] with \the [W].</span>")
W.desc = "[initial(W.desc)] <span class='notice'>There is a splattered [src] on the back.</span>"

adjustBruteLoss(5)
else
return ..()

/mob/living/simple_animal/cricket/reagent_act(id, method, volume)
if(isDead())
return

.=..()

switch(id)
if(TOXIN, INSECTICIDE)
if(method != INGEST)
death(gore = 0)

/mob/living/simple_animal/cricket/bite_act(mob/living/carbon/human/H)
if(size >= H.size)
return

playsound(H,'sound/items/eatfood.ogg', rand(10,50), 1)
H.visible_message("<span class='notice'>[H] eats \the [src]!</span>", "<span class='notice'>You eat \the [src]!</span>")

death(gore = 1)
qdel(src)

H.vomit()
Loading