Merge pull request #5797 from Citadel-Station-13/upstream-merge-36071
[MIRROR] Advanced roasting sticks, for cooking sausages
This commit is contained in:
@@ -315,3 +315,112 @@
|
||||
H.drop_all_held_items()
|
||||
H.visible_message("<span class='danger'>[user] disarms [H]!</span>", "<span class='userdanger'>[user] disarmed you!</span>")
|
||||
..()
|
||||
|
||||
/obj/item/melee/roastingstick
|
||||
name = "advanced roasting stick"
|
||||
desc = "A telescopic roasting stick with a miniature shield generator designed to ensure entry into various high-tech shielded cooking ovens and firepits."
|
||||
icon_state = "roastingstick_0"
|
||||
item_state = "null"
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
item_flags = NONE
|
||||
force = 0
|
||||
attack_verb = list("hit", "poked")
|
||||
var/obj/item/reagent_containers/food/snacks/sausage/held_sausage
|
||||
var/static/list/ovens
|
||||
var/on = FALSE
|
||||
var/datum/beam/beam
|
||||
|
||||
/obj/item/melee/roastingstick/Initialize()
|
||||
. = ..()
|
||||
if (!ovens)
|
||||
ovens = typecacheof(list(/obj/singularity, /obj/machinery/power/supermatter_shard/crystal, /obj/structure/bonfire, /obj/structure/destructible/clockwork/massive/ratvar))
|
||||
|
||||
/obj/item/melee/roastingstick/attack_self(mob/user)
|
||||
on = !on
|
||||
if(on)
|
||||
extend(user)
|
||||
else
|
||||
if (held_sausage)
|
||||
to_chat(user, "<span class='warning'>You can't retract [src] while [held_sausage] is attached!</span>")
|
||||
return
|
||||
retract(user)
|
||||
|
||||
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/melee/roastingstick/attackby(atom/target, mob/user)
|
||||
..()
|
||||
if (istype(target, /obj/item/reagent_containers/food/snacks/sausage))
|
||||
if (!on)
|
||||
to_chat(user, "<span class='warning'>You must extend [src] to attach anything to it!</span>")
|
||||
return
|
||||
if (held_sausage)
|
||||
to_chat(user, "<span class='warning'>[held_sausage] is already attached to [src]!</span>")
|
||||
return
|
||||
if (user.transferItemToLoc(target, src))
|
||||
held_sausage = target
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[target] doesn't seem to want to get on [src]!</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/melee/roastingstick/attack_hand(mob/user)
|
||||
..()
|
||||
if (held_sausage)
|
||||
user.put_in_hands(held_sausage)
|
||||
held_sausage = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/melee/roastingstick/update_icon()
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
if (held_sausage)
|
||||
var/mutable_appearance/sausage = mutable_appearance(icon, "roastingstick_sausage")
|
||||
add_overlay(sausage)
|
||||
|
||||
/obj/item/melee/roastingstick/proc/extend(user)
|
||||
to_chat(user, "<span class ='warning'>You extend [src].</span>")
|
||||
icon_state = "roastingstick_1"
|
||||
item_state = "nullrod"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
|
||||
/obj/item/melee/roastingstick/proc/retract(user)
|
||||
to_chat(user, "<span class ='notice'>You collapse [src].</span>")
|
||||
icon_state = "roastingstick_0"
|
||||
item_state = null
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/obj/item/melee/roastingstick/handle_atom_del(atom/target)
|
||||
if (target == held_sausage)
|
||||
held_sausage = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/melee/roastingstick/afterattack(atom/target, mob/user, proximity)
|
||||
if (!on)
|
||||
return
|
||||
if (is_type_in_typecache(target, ovens))
|
||||
if (held_sausage && held_sausage.roasted)
|
||||
to_chat("Your [held_sausage] has already been cooked.")
|
||||
return
|
||||
if (istype(target, /obj/singularity) && get_dist(user, target) < 10)
|
||||
to_chat(user, "You send [held_sausage] towards [target].")
|
||||
playsound(src, 'sound/items/rped.ogg', 50, 1)
|
||||
beam = user.Beam(target,icon_state="rped_upgrade",time=100)
|
||||
else if (user.Adjacent(target))
|
||||
to_chat(user, "You extend [src] towards [target].")
|
||||
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
else
|
||||
return
|
||||
if(do_after(user, 100, target = user))
|
||||
finish_roasting(user, target)
|
||||
else
|
||||
QDEL_NULL(beam)
|
||||
playsound(src, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
|
||||
/obj/item/melee/roastingstick/proc/finish_roasting(user, atom/target)
|
||||
to_chat(user, "You finish roasting [held_sausage]")
|
||||
playsound(src,'sound/items/welder2.ogg',50,1)
|
||||
held_sausage.add_atom_colour(rgb(103,63,24), FIXED_COLOUR_PRIORITY)
|
||||
held_sausage.name = "[target.name]-roasted [held_sausage.name]"
|
||||
held_sausage.desc = "[held_sausage.desc] It has been cooked to perfection on \a [target]."
|
||||
update_icon()
|
||||
|
||||
@@ -113,6 +113,7 @@
|
||||
list_reagents = list("nutriment" = 6, "vitamin" = 1)
|
||||
tastes = list("meat" = 1)
|
||||
foodtype = MEAT
|
||||
var/roasted = FALSE
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/sausage/Initialize()
|
||||
. = ..()
|
||||
@@ -187,7 +188,7 @@
|
||||
visible_message("<span class='notice'>[src] expands!</span>")
|
||||
var/mob/spammer = get_mob_by_key(fingerprintslast)
|
||||
var/mob/living/carbon/monkey/bananas = new(drop_location())
|
||||
bananas.log_message("Spawned via [src] at [COORD(src)], Last attached mob: [key_name(spammer)].", INDIVIDUAL_ATTACK_LOG)
|
||||
bananas.log_message("Spawned via [src] at [COORD(src)], Last attached mob: [key_name(spammer)].", INDIVIDUAL_ATTACK_LOG)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/enchiladas
|
||||
|
||||
@@ -276,7 +276,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
|
||||
if(!removed || !removed.total_moles() || isspaceturf(T)) //we're in space or there is no gas to process
|
||||
if(takes_damage)
|
||||
damage += max((power / 1000) * DAMAGE_INCREASE_MULTIPLIER, 0.1) // always does at least some damage
|
||||
else
|
||||
else
|
||||
if(takes_damage)
|
||||
//causing damage
|
||||
damage = max(damage + (max(removed.temperature - ((T0C + HEAT_PENALTY_THRESHOLD)*dynamic_heat_resistance), 0) * mole_heat_penalty / 150 ) * DAMAGE_INCREASE_MULTIPLIER, 0)
|
||||
@@ -435,7 +435,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
|
||||
L.rad_act(rads)
|
||||
|
||||
explode()
|
||||
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/supermatter_shard/bullet_act(obj/item/projectile/Proj)
|
||||
@@ -530,6 +530,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
|
||||
/obj/machinery/power/supermatter_shard/attackby(obj/item/W, mob/living/user, params)
|
||||
if(!istype(W) || (W.flags_1 & ABSTRACT_1) || !istype(user))
|
||||
return
|
||||
if (istype(W, /obj/item/melee/roastingstick))
|
||||
return ..()
|
||||
if(istype(W, /obj/item/scalpel/supermatter))
|
||||
to_chat(user, "<span class='notice'>You carefully begin to scrape \the [src] with \the [W]...</span>")
|
||||
if(W.use_tool(src, user, 60, volume=100))
|
||||
|
||||
@@ -257,6 +257,16 @@
|
||||
category = list("Electronics")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
|
||||
|
||||
/datum/design/roastingstick
|
||||
name = "Advanced roasting stick"
|
||||
desc = "A roasting stick for cooking sausages in exotic ovens."
|
||||
id = "roastingstick"
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL=1000, MAT_GLASS=500, MAT_BLUESPACE = 250)
|
||||
build_path = /obj/item/melee/roastingstick
|
||||
category = list("Equipment")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_SERVICE
|
||||
|
||||
/////////////////////////////////////////
|
||||
////////////Janitor Designs//////////////
|
||||
/////////////////////////////////////////
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
display_name = "Applied Bluespace Research"
|
||||
description = "Using bluespace to make things faster and better."
|
||||
prereq_ids = list("bluespace_basic", "engineering")
|
||||
design_ids = list("bs_rped","minerbag_holding", "telesci_gps", "bluespacebeaker", "bluespacesyringe", "bluespacebodybag", "phasic_scanning")
|
||||
design_ids = list("bs_rped","minerbag_holding", "telesci_gps", "bluespacebeaker", "bluespacesyringe", "bluespacebodybag", "phasic_scanning", "roastingstick")
|
||||
research_cost = 5000
|
||||
export_price = 5000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user