Renames is_hot and is_sharp to get_temperature and get_sharpness (#46680)

This commit is contained in:
nemvar
2019-09-23 23:02:59 +02:00
committed by Rob Bailey
parent cfc7a263ac
commit dc783795db
63 changed files with 100 additions and 98 deletions

View File

@@ -767,7 +767,7 @@ GLOBAL_LIST_INIT(can_embed_types, typecacheof(list(
/obj/item/pipe)))
/proc/can_embed(obj/item/W)
if(W.is_sharp())
if(W.get_sharpness())
return 1
if(is_pointed(W))
return 1
@@ -1478,7 +1478,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
#define TRAIT_CALLBACK_REMOVE(target, trait, source) CALLBACK(GLOBAL_PROC, /proc/___TraitRemove, ##target, ##trait, ##source)
///DO NOT USE ___TraitAdd OR ___TraitRemove as a replacement for ADD_TRAIT / REMOVE_TRAIT defines. To be used explicitly for callback.
/proc/___TraitAdd(target,trait,source)
/proc/___TraitAdd(target,trait,source)
if(!target || !trait || !source)
return
if(islist(target))

View File

@@ -24,7 +24,7 @@
/datum/component/butchering/proc/onItemAttack(obj/item/source, mob/living/M, mob/living/user)
if(user.a_intent == INTENT_HARM && M.stat == DEAD && (M.butcher_results || M.guaranteed_butcher_results)) //can we butcher it?
if(butchering_enabled && (can_be_blunt || source.is_sharp()))
if(butchering_enabled && (can_be_blunt || source.get_sharpness()))
INVOKE_ASYNC(src, .proc/startButcher, source, M, user)
return COMPONENT_ITEM_NO_ATTACK

View File

@@ -5,7 +5,7 @@
var/light_impact_range = 2
var/flash_range = 3
var/equipped_slot //For items, lets us determine where things should be hit.
/datum/component/explodable/Initialize(devastation_range_override, heavy_impact_range_override, light_impact_range_override, flash_range_override)
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
@@ -20,8 +20,8 @@
RegisterSignal(parent, list(COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_OBJ, COMSIG_ITEM_HIT_REACT), .proc/explodable_attack)
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/on_equip)
RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/on_drop)
if(devastation_range_override)
devastation_range = devastation_range_override
@@ -45,14 +45,14 @@
/datum/component/explodable/proc/explodable_attack(datum/source, atom/movable/target, mob/living/user)
check_if_detonate(target)
///Called when you attack a specific body part of the thing this is equipped on. Useful for exploding pants.
///Called when you attack a specific body part of the thing this is equipped on. Useful for exploding pants.
/datum/component/explodable/proc/explodable_attack_zone(datum/source, damage, damagetype, def_zone)
if(!def_zone)
return
if(damagetype != BURN) //Don't bother if it's not fire.
return
if(!is_hitting_zone(def_zone)) //You didn't hit us! ha!
return
return
detonate()
/datum/component/explodable/proc/on_equip(datum/source, mob/equipper, slot)
@@ -87,13 +87,13 @@
if(I.body_parts_covered & bodypart.body_part)
return TRUE
return FALSE
/datum/component/explodable/proc/check_if_detonate(target)
if(!isitem(target))
return
var/obj/item/I = target
if(!I.is_hot())
if(!I.get_temperature())
return
detonate() //If we're touching a hot item we go boom

View File

@@ -45,7 +45,7 @@
var/knockdown_chance = (target_buckled? mounted_knockdown_chance_per_tile : unmounted_knockdown_chance_per_tile) * current
var/knockdown_time = (target_buckled? mounted_knockdown_time : unmounted_knockdown_time)
var/damage = (target_buckled? mounted_damage_boost_per_tile : unmounted_damage_boost_per_tile) * current
var/sharp = I.is_sharp()
var/sharp = I.get_sharpness()
var/msg
if(damage)
msg += "[user] [sharp? "impales" : "slams into"] [target] [sharp? "on" : "with"] their [parent]"

View File

@@ -88,5 +88,5 @@
thermite_melt()
/datum/component/thermite/proc/attackby_react(datum/source, obj/item/thing, mob/user, params)
if(thing.is_hot())
if(thing.get_temperature())
thermite_melt(user)

View File

@@ -234,10 +234,10 @@
return 0
/obj/machinery/door/airlock/plasma/attackby(obj/item/C, mob/user, params)
if(C.is_hot() > 300)//If the temperature of the object is over 300, then ignite
if(C.get_temperature() > 300)//If the temperature of the object is over 300, then ignite
message_admins("Plasma airlock ignited by [ADMIN_LOOKUPFLW(user)] in [ADMIN_VERBOSEJMP(src)]")
log_game("Plasma airlock ignited by [key_name(user)] in [AREACOORD(src)]")
ignite(C.is_hot())
ignite(C.get_temperature())
else
return ..()

View File

@@ -54,11 +54,11 @@
if(!reagents.total_volume) //scooped up all of it
qdel(src)
return
if(W.is_hot()) //todo: make heating a reagent holder proc
if(W.get_temperature()) //todo: make heating a reagent holder proc
if(istype(W, /obj/item/clothing/mask/cigarette))
return
else
var/hotness = W.is_hot()
var/hotness = W.get_temperature()
reagents.expose_temperature(hotness)
to_chat(user, "<span class='notice'>You heat [name] with [W]!</span>")
else

View File

@@ -55,7 +55,7 @@
reagents.add_reagent(/datum/reagent/oil, 30)
/obj/effect/decal/cleanable/oil/attackby(obj/item/I, mob/living/user)
var/attacked_by_hot_thing = I.is_hot()
var/attacked_by_hot_thing = I.get_temperature()
if(attacked_by_hot_thing)
visible_message("<span class='warning'>[user] tries to ignite [src] with [I]!</span>", "<span class='warning'>You try to ignite [src] with [I].</span>")
log_combat(user, src, (attacked_by_hot_thing < 480) ? "tried to ignite" : "ignited", I)

View File

@@ -14,7 +14,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
///Icon file for right inhand overlays
var/righthand_file = 'icons/mob/inhands/items_righthand.dmi'
///Icon file for mob worn overlays.
///Icon file for mob worn overlays.
///no var for state because it should *always* be the same as icon_state
var/icon/mob_overlay_icon
//Forced mob worn layer instead of the standard preferred ssize.
@@ -548,7 +548,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
/obj/item/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(hit_atom && !QDELETED(hit_atom))
SEND_SIGNAL(src, COMSIG_MOVABLE_IMPACT, hit_atom, throwingdatum)
if(is_hot() && isliving(hit_atom))
if(get_temperature() && isliving(hit_atom))
var/mob/living/L = hit_atom
L.IgniteMob()
var/itempush = 1
@@ -611,10 +611,12 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
if(flags & ITEM_SLOT_NECK)
owner.update_inv_neck()
/obj/item/proc/is_hot()
///Returns the temperature of src. If you want to know if an item is hot use this proc.
/obj/item/proc/get_temperature()
return heat
/obj/item/proc/is_sharp()
///Returns the sharpness of src. If you want to get the sharpness of an item use this.
/obj/item/proc/get_sharpness()
return sharpness
/obj/item/proc/get_dismemberment_chance(obj/item/bodypart/affecting)
@@ -641,7 +643,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
location.hotspot_expose(flame_heat, 5)
/obj/item/proc/ignition_effect(atom/A, mob/user)
if(is_hot())
if(get_temperature())
. = "<span class='notice'>[user] lights [A] with [src].</span>"
else
. = ""

View File

@@ -34,7 +34,7 @@
light() //honk
return ..()
/obj/item/candle/is_hot()
/obj/item/candle/get_temperature()
return lit * heat
/obj/item/candle/proc/light(show_message)

View File

@@ -94,7 +94,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(istype(mask_item, /obj/item/clothing/mask/cigarette))
return mask_item
/obj/item/match/is_hot()
/obj/item/match/get_temperature()
return lit * heat
/obj/item/match/firebrand
@@ -298,7 +298,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/cigarette/fire_act(exposed_temperature, exposed_volume)
light()
/obj/item/clothing/mask/cigarette/is_hot()
/obj/item/clothing/mask/cigarette/get_temperature()
return lit * heat
// Cigarette brands.
@@ -583,7 +583,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
add_overlay(lighter_overlay)
/obj/item/lighter/ignition_effect(atom/A, mob/user)
if(is_hot())
if(get_temperature())
. = "<span class='rose'>With a single flick of [user.p_their()] wrist, [user] smoothly lights [A] with [src]. Damn [user.p_theyre()] cool.</span>"
/obj/item/lighter/proc/set_lit(new_lit)
@@ -661,7 +661,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/lighter/process()
open_flame()
/obj/item/lighter/is_hot()
/obj/item/lighter/get_temperature()
return lit * heat
@@ -710,7 +710,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
add_overlay(lighter_overlay)
/obj/item/lighter/greyscale/ignition_effect(atom/A, mob/user)
if(is_hot())
if(get_temperature())
. = "<span class='notice'>After some fiddling, [user] manages to light [A] with [src].</span>"

View File

@@ -317,7 +317,7 @@
damtype = "fire"
START_PROCESSING(SSobj, src)
/obj/item/flashlight/flare/is_hot()
/obj/item/flashlight/flare/get_temperature()
return on * heat
/obj/item/flashlight/flare/torch

View File

@@ -54,5 +54,5 @@
var/obj/item/tank/T = W
blow(T, user)
return
if (W.is_sharp() || W.is_hot() || is_pointed(W))
if (W.get_sharpness() || W.get_temperature() || is_pointed(W))
burst()

View File

@@ -27,7 +27,7 @@
/obj/item/melee/transforming/energy/add_blood_DNA(list/blood_dna)
return FALSE
/obj/item/melee/transforming/energy/is_sharp()
/obj/item/melee/transforming/energy/get_sharpness()
return active * sharpness
/obj/item/melee/transforming/energy/process()
@@ -45,7 +45,7 @@
STOP_PROCESSING(SSobj, src)
set_light(0)
/obj/item/melee/transforming/energy/is_hot()
/obj/item/melee/transforming/energy/get_temperature()
return active * heat
/obj/item/melee/transforming/energy/ignition_effect(atom/A, mob/user)

View File

@@ -114,7 +114,7 @@
to_chat(user, "<span class='notice'>You try to pet [src], but it has no stuffing. Aww...</span>")
/obj/item/toy/plush/attackby(obj/item/I, mob/living/user, params)
if(I.is_sharp())
if(I.get_sharpness())
if(!grenade)
if(!stuffed)
to_chat(user, "<span class='warning'>You already murdered it!</span>")

View File

@@ -18,7 +18,7 @@
if(I.force >= max || I.throwforce >= max)//no esword sharpening
to_chat(user, "<span class='warning'>[I] is much too powerful to sharpen further!</span>")
return
if(requires_sharpness && !I.is_sharp())
if(requires_sharpness && !I.get_sharpness())
to_chat(user, "<span class='warning'>You can only sharpen items that are already sharp, such as knives!</span>")
return
if(istype(I, /obj/item/melee/transforming/energy))

View File

@@ -99,7 +99,7 @@
to_chat(user, "<span class='warning'>You can not use \the [src] on [M]!</span>")
/obj/item/stack/medical/gauze/attackby(obj/item/I, mob/user, params)
if(I.tool_behaviour == TOOL_WIRECUTTER || I.is_sharp())
if(I.tool_behaviour == TOOL_WIRECUTTER || I.get_sharpness())
if(get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least two gauzes to do this!</span>")
return

View File

@@ -218,7 +218,7 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \
//Step one - dehairing.
/obj/item/stack/sheet/animalhide/attackby(obj/item/W, mob/user, params)
if(W.is_sharp())
if(W.get_sharpness())
playsound(loc, 'sound/weapons/slice.ogg', 50, TRUE, -1)
user.visible_message("<span class='notice'>[user] starts cutting hair off \the [src].</span>", "<span class='notice'>You start cutting the hair off \the [src]...</span>", "<span class='hear'>You hear the sound of a knife rubbing against flesh.</span>")
if(do_after(user, 50, target = src))

View File

@@ -177,11 +177,11 @@ GLOBAL_LIST_INIT(plasma_recipes, list ( \
. = ..()
/obj/item/stack/sheet/mineral/plasma/attackby(obj/item/W as obj, mob/user as mob, params)
if(W.is_hot() > 300)//If the temperature of the object is over 300, then ignite
if(W.get_temperature() > 300)//If the temperature of the object is over 300, then ignite
var/turf/T = get_turf(src)
message_admins("Plasma sheets ignited by [ADMIN_LOOKUPFLW(user)] in [ADMIN_VERBOSEJMP(T)]")
log_game("Plasma sheets ignited by [key_name(user)] in [AREACOORD(T)]")
fire_act(W.is_hot())
fire_act(W.get_temperature())
else
return ..()

View File

@@ -879,7 +879,7 @@
if(SMILEY)
desc = "A paper sack with a crude smile etched onto the side."
return 0
else if(W.is_sharp())
else if(W.get_sharpness())
if(!contents.len)
if(item_state == "paperbag_None")
user.show_message("<span class='notice'>You cut eyeholes into [src].</span>", MSG_VISUAL)

View File

@@ -223,7 +223,7 @@
. = ..()
. += "It contains [get_fuel()] unit\s of fuel out of [max_fuel]."
/obj/item/weldingtool/is_hot()
/obj/item/weldingtool/get_temperature()
return welding * heat
//Returns whether or not the welding tool is currently on.

View File

@@ -78,7 +78,7 @@
to_chat(user, "<span class='notice'>You fill the balloon with the contents of [I].</span>")
I.reagents.trans_to(src, 10, transfered_by = user)
update_icon()
else if(I.is_sharp())
else if(I.get_sharpness())
balloon_burst()
else
return ..()

View File

@@ -45,7 +45,7 @@ LINEN BINS
return
/obj/item/bedsheet/attackby(obj/item/I, mob/user, params)
if(I.tool_behaviour == TOOL_WIRECUTTER || I.is_sharp())
if(I.tool_behaviour == TOOL_WIRECUTTER || I.get_sharpness())
var/obj/item/stack/sheet/cloth/C = new (get_turf(src), 3)
transfer_fingerprints_to(C)
C.add_fingerprint(user)

View File

@@ -234,7 +234,7 @@
canSmoothWith = list(/obj/structure/falsewall/plasma, /turf/closed/wall/mineral/plasma)
/obj/structure/falsewall/plasma/attackby(obj/item/W, mob/user, params)
if(W.is_hot() > 300)
if(W.get_temperature() > 300)
var/turf/T = get_turf(src)
message_admins("Plasma falsewall ignited by [ADMIN_LOOKUPFLW(user)] in [ADMIN_VERBOSEJMP(T)]")
log_game("Plasma falsewall ignited by [key_name(user)] in [AREACOORD(T)]")

View File

@@ -14,7 +14,7 @@
/obj/structure/flora/tree/attackby(obj/item/W, mob/user, params)
if(log_amount && (!(flags_1 & NODECONSTRUCT_1)))
if(W.is_sharp() && W.force > 0)
if(W.get_sharpness() && W.force > 0)
if(W.hitsound)
playsound(get_turf(src), W.hitsound, 100, FALSE, FALSE)
user.visible_message("<span class='notice'>[user] begins to cut down [src] with [W].</span>","<span class='notice'>You begin to cut down [src] with [W].</span>", "<span class='hear'>You hear the sound of sawing.</span>")

View File

@@ -250,7 +250,7 @@
return
/obj/structure/mineral_door/transparent/plasma/attackby(obj/item/W, mob/user, params)
if(W.is_hot())
if(W.get_temperature())
var/turf/T = get_turf(src)
message_admins("Plasma mineral door ignited by [ADMIN_LOOKUPFLW(user)] in [ADMIN_VERBOSEJMP(T)]")
log_game("Plasma mineral door ignited by [key_name(user)] in [AREACOORD(T)]")
@@ -293,8 +293,8 @@
return crowbar_door(user, I)
/obj/structure/mineral_door/wood/attackby(obj/item/I, mob/living/user)
if(I.is_hot())
fire_act(I.is_hot())
if(I.get_temperature())
fire_act(I.get_temperature())
return
return ..()
@@ -328,8 +328,8 @@
return crowbar_door(user, I)
/obj/structure/mineral_door/paperframe/attackby(obj/item/I, mob/living/user)
if(I.is_hot()) //BURN IT ALL DOWN JIM
fire_act(I.is_hot())
if(I.get_temperature()) //BURN IT ALL DOWN JIM
fire_act(I.get_temperature())
return
if((user.a_intent != INTENT_HARM) && istype(I, /obj/item/paper) && (obj_integrity < max_integrity))

View File

@@ -125,11 +125,11 @@
. = ..()
/obj/structure/statue/plasma/attackby(obj/item/W, mob/user, params)
if(W.is_hot() > 300 && !QDELETED(src))//If the temperature of the object is over 300, then ignite
if(W.get_temperature() > 300 && !QDELETED(src))//If the temperature of the object is over 300, then ignite
var/turf/T = get_turf(src)
message_admins("Plasma statue ignited by [ADMIN_LOOKUPFLW(user)] in [ADMIN_VERBOSEJMP(T)]")
log_game("Plasma statue ignited by [key_name(user)] in [AREACOORD(T)]")
ignite(W.is_hot())
ignite(W.get_temperature())
else
return ..()

View File

@@ -859,8 +859,8 @@
/obj/structure/window/paperframe/attackby(obj/item/W, mob/user)
if(W.is_hot())
fire_act(W.is_hot())
if(W.get_temperature())
fire_act(W.get_temperature())
return
if(user.a_intent == INTENT_HARM)
return ..()

View File

@@ -43,10 +43,10 @@
PlasmaBurn(exposed_temperature)
/turf/open/floor/mineral/plasma/attackby(obj/item/W, mob/user, params)
if(W.is_hot() > 300)//If the temperature of the object is over 300, then ignite
if(W.get_temperature() > 300)//If the temperature of the object is over 300, then ignite
message_admins("Plasma flooring was ignited by [ADMIN_LOOKUPFLW(user)] in [ADMIN_VERBOSEJMP(src)]")
log_game("Plasma flooring was ignited by [key_name(user)] in [AREACOORD(src)]")
ignite(W.is_hot())
ignite(W.get_temperature())
return
..()

View File

@@ -94,10 +94,10 @@
canSmoothWith = list(/turf/closed/wall/mineral/plasma, /obj/structure/falsewall/plasma)
/turf/closed/wall/mineral/plasma/attackby(obj/item/W, mob/user, params)
if(W.is_hot() > 300)//If the temperature of the object is over 300, then ignite
if(W.get_temperature() > 300)//If the temperature of the object is over 300, then ignite
message_admins("Plasma wall ignited by [ADMIN_LOOKUPFLW(user)] in [ADMIN_VERBOSEJMP(src)]")
log_game("Plasma wall ignited by [key_name(user)] in [AREACOORD(src)]")
ignite(W.is_hot())
ignite(W.get_temperature())
return
..()
@@ -133,7 +133,7 @@
canSmoothWith = list(/turf/closed/wall/mineral/wood, /obj/structure/falsewall/wood, /turf/closed/wall/mineral/wood/nonmetal)
/turf/closed/wall/mineral/wood/attackby(obj/item/W, mob/user)
if(W.is_sharp() && W.force)
if(W.get_sharpness() && W.force)
var/duration = (48/W.force) * 2 //In seconds, for now.
if(istype(W, /obj/item/hatchet) || istype(W, /obj/item/twohanded/fireaxe))
duration /= 4 //Much better with hatchets and axes.

View File

@@ -326,7 +326,7 @@
/obj/item/projectile/tentacle/proc/tentacle_stab(mob/living/carbon/human/H, mob/living/carbon/C)
if(H.Adjacent(C))
for(var/obj/item/I in H.held_items)
if(I.is_sharp())
if(I.get_sharpness())
C.visible_message("<span class='danger'>[H] impales [C] with [H.p_their()] [I.name]!</span>", "<span class='userdanger'>[H] impales you with [H.p_their()] [I.name]!</span>")
C.apply_damage(I.force, BRUTE, BODY_ZONE_CHEST)
H.do_item_attack_animation(C, used_item = I)

View File

@@ -289,7 +289,7 @@
/obj/item/voodoo/attackby(obj/item/I, mob/user, params)
if(target && cooldown < world.time)
if(I.is_hot())
if(I.get_temperature())
to_chat(target, "<span class='userdanger'>You suddenly feel very hot</span>")
target.adjust_bodytemperature(50)
GiveHint(target)

View File

@@ -17,7 +17,7 @@
name = "welding helmet"
desc = "A head-mounted face cover designed to protect the wearer completely from space-arc eye."
icon_state = "welding"
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
item_state = "welding"
materials = list(/datum/material/iron=1750, /datum/material/glass=400)
flash_protect = 2
@@ -85,7 +85,7 @@
hitsound = hitsound_off
STOP_PROCESSING(SSobj, src)
/obj/item/clothing/head/hardhat/cakehat/is_hot()
/obj/item/clothing/head/hardhat/cakehat/get_temperature()
return on * heat
/obj/item/clothing/head/hardhat/cakehat/energycake

View File

@@ -251,7 +251,7 @@
holder.obj_integrity = holder.max_integrity
/datum/spacevine_mutation/woodening/on_hit(obj/structure/spacevine/holder, mob/living/hitter, obj/item/I, expected_damage)
if(I.is_sharp())
if(I.get_sharpness())
. = expected_damage * 0.5
else
. = expected_damage
@@ -331,7 +331,7 @@
/obj/structure/spacevine/attacked_by(obj/item/I, mob/living/user)
var/damage_dealt = I.force
if(I.is_sharp())
if(I.get_sharpness())
damage_dealt *= 4
if(I.damtype == BURN)
damage_dealt *= 4

View File

@@ -98,7 +98,7 @@
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the contents of [target].</span>")
/obj/item/reagent_containers/food/drinks/attackby(obj/item/I, mob/user, params)
var/hotness = I.is_hot()
var/hotness = I.get_temperature()
if(hotness && reagents)
reagents.expose_temperature(hotness)
to_chat(user, "<span class='notice'>You heat [name] with [I]!</span>")

View File

@@ -462,7 +462,7 @@
..()
/obj/item/reagent_containers/food/drinks/bottle/molotov/attackby(obj/item/I, mob/user, params)
if(I.is_hot() && !active)
if(I.get_temperature() && !active)
active = TRUE
log_bomber(user, "has primed a", src, "for detonation")

View File

@@ -184,7 +184,7 @@ All foods are distributed among various categories. Use common sense.
var/obj/item/reagent_containers/food/snacks/customizable/C = new custom_food_type(get_turf(src))
C.initialize_custom_food(src, S, user)
return 0
var/sharp = W.is_sharp()
var/sharp = W.get_sharpness()
if(sharp)
if(slice(sharp, W, user))
return 1
@@ -357,7 +357,7 @@ All foods are distributed among various categories. Use common sense.
/obj/item/reagent_containers/food/snacks/store/attackby(obj/item/W, mob/user, params)
..()
if(W.w_class <= WEIGHT_CLASS_SMALL & !istype(W, /obj/item/reagent_containers/food/snacks)) //can't slip snacks inside, they're used for custom foods.
if(W.is_sharp())
if(W.get_sharpness())
return 0
if(stored_item)
return 0

View File

@@ -40,7 +40,7 @@
throw_range = 7
/obj/item/grown/corncob/attackby(obj/item/grown/W, mob/user, params)
if(W.is_sharp())
if(W.get_sharpness())
to_chat(user, "<span class='notice'>You use [W] to fashion a pipe out of the corn cob!</span>")
new /obj/item/clothing/mask/cigarette/pipe/cobpipe (user.loc)
qdel(src)

View File

@@ -38,7 +38,7 @@
/obj/item/reagent_containers/food/snacks/grown/potato/attackby(obj/item/W, mob/user, params)
if(W.is_sharp())
if(W.get_sharpness())
to_chat(user, "<span class='notice'>You cut the potato into wedges with [W].</span>")
var/obj/item/reagent_containers/food/snacks/grown/potato/wedges/Wedges = new /obj/item/reagent_containers/food/snacks/grown/potato/wedges
remove_item_from_storage(user)

View File

@@ -28,7 +28,7 @@
wine_power = 20
/obj/item/reagent_containers/food/snacks/grown/pumpkin/attackby(obj/item/W as obj, mob/user as mob, params)
if(W.is_sharp())
if(W.get_sharpness())
user.show_message("<span class='notice'>You carve a face into [src]!</span>", MSG_VISUAL)
new /obj/item/clothing/head/hardhat/pumpkinhead(user.loc)
qdel(src)

View File

@@ -26,7 +26,7 @@
wine_power = 30
/obj/item/reagent_containers/food/snacks/grown/carrot/attackby(obj/item/I, mob/user, params)
if(I.is_sharp())
if(I.get_sharpness())
to_chat(user, "<span class='notice'>You sharpen the carrot into a shiv with [I].</span>")
var/obj/item/kitchen/knife/carrotshiv/Shiv = new /obj/item/kitchen/knife/carrotshiv
remove_item_from_storage(user)

View File

@@ -50,7 +50,7 @@
/obj/item/reagent_containers/food/snacks/grown/wheat))
/obj/item/grown/log/attackby(obj/item/W, mob/user, params)
if(W.is_sharp())
if(W.get_sharpness())
user.show_message("<span class='notice'>You make [plank_name] out of \the [src]!</span>", MSG_VISUAL)
var/seed_modifier = 0
if(seed)
@@ -191,7 +191,7 @@
add_overlay("bonfire_grill")
else
return ..()
if(W.is_hot())
if(W.get_temperature())
StartBurning()
if(grill)
if(user.a_intent != INTENT_HARM && !(W.item_flags & ABSTRACT))

View File

@@ -58,7 +58,7 @@
harvested = FALSE
/obj/structure/flora/ash/attackby(obj/item/W, mob/user, params)
if(!harvested && needs_sharp_harvest && W.is_sharp())
if(!harvested && needs_sharp_harvest && W.get_sharpness())
user.visible_message("<span class='notice'>[user] starts to harvest from [src] with [W].</span>","<span class='notice'>You begin to harvest from [src] with [W].</span>")
if(do_after(user, harvest_time, target = src))
harvest(user)

View File

@@ -1490,7 +1490,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
switch(hit_area)
if(BODY_ZONE_HEAD)
if(!I.is_sharp() && armor_block < 50)
if(!I.get_sharpness() && armor_block < 50)
if(prob(I.force))
H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 20)
if(H.stat == CONSCIOUS)
@@ -1520,7 +1520,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
H.update_inv_glasses()
if(BODY_ZONE_CHEST)
if(H.stat == CONSCIOUS && !I.is_sharp() && armor_block < 50)
if(H.stat == CONSCIOUS && !I.get_sharpness() && armor_block < 50)
if(prob(I.force))
H.visible_message("<span class='danger'>[H] is knocked down!</span>", \
"<span class='userdanger'>You're knocked down!</span>")

View File

@@ -791,7 +791,7 @@
if(resistance_flags & ON_FIRE)
return
if(P.is_hot())
if(P.get_temperature())
visible_message("<span class='danger'>[src] bursts into flames!</span>")
fire_act()

View File

@@ -119,7 +119,7 @@
. += "<span class='warning'>It's dripping with fuel and smells terrible.</span>"
/obj/item/reagent_containers/food/snacks/deadmouse/attackby(obj/item/I, mob/user, params)
if(I.is_sharp() && user.a_intent == INTENT_HARM)
if(I.get_sharpness() && user.a_intent == INTENT_HARM)
if(isturf(loc))
new /obj/item/reagent_containers/food/snacks/meat/slab/mouse(loc)
to_chat(user, "<span class='notice'>You butcher [src].</span>")

View File

@@ -420,7 +420,7 @@ Difficulty: Very Hard
ActivationReaction(user, ACTIVATE_TOUCH)
/obj/machinery/anomalous_crystal/attackby(obj/item/I, mob/user, params)
if(I.is_hot())
if(I.get_temperature())
ActivationReaction(user, ACTIVATE_HEAT)
else
ActivationReaction(user, ACTIVATE_WEAPON)

View File

@@ -173,7 +173,7 @@
attempt_signature(user)
else if(istype(P, /obj/item/stamp))
to_chat(user, "<span class='notice'>You stamp the paper with your rubber stamp, however the ink ignites as you release the stamp.</span>")
else if(P.is_hot())
else if(P.get_temperature())
user.visible_message("<span class='danger'>[user] brings [P] next to [src], but [src] does not catch fire!</span>", "<span class='danger'>[src] refuses to ignite!</span>")
else
return ..()

View File

@@ -315,7 +315,7 @@
to_chat(user, "<span class='notice'>You stamp the paper with your rubber stamp.</span>")
if(P.is_hot())
if(P.get_temperature())
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(10))
user.visible_message("<span class='warning'>[user] accidentally ignites [user.p_them()]self!</span>", \
"<span class='userdanger'>You miss the paper and accidentally light yourself on fire!</span>")

View File

@@ -156,7 +156,7 @@
qdel(src)
/obj/item/paper_bin/bundlenatural/attackby(obj/item/W, mob/user)
if(W.is_sharp())
if(W.get_sharpness())
to_chat(user, "<span class='notice'>You snip \the [src], spilling paper everywhere.</span>")
var/turf/T = get_turf(src.loc)
while(total_paper > 0)

View File

@@ -84,7 +84,7 @@
internalPaper.attackby(P, user) //spoofed attack to update internal paper.
update_icon()
else if(P.is_hot())
else if(P.get_temperature())
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(10))
user.visible_message("<span class='warning'>[user] accidentally ignites [user.p_them()]self!</span>", \
"<span class='userdanger'>You miss [src] and accidentally light yourself on fire!</span>")

View File

@@ -181,7 +181,7 @@
. = ..()
AddComponent(/datum/component/butchering, 60, 100, 0, 'sound/weapons/blade1.ogg')
/obj/item/pen/edagger/is_sharp()
/obj/item/pen/edagger/get_sharpness()
return on * sharpness
/obj/item/pen/edagger/suicide_act(mob/user)

View File

@@ -214,7 +214,7 @@
/obj/item/ticket_machine_ticket/attackby(obj/item/P, mob/living/carbon/human/user, params) //Stolen from papercode
..()
if(P.is_hot())
if(P.get_temperature())
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(10))
user.visible_message("<span class='warning'>[user] accidentally ignites [user.p_them()]self!</span>", \
"<span class='userdanger'>You miss the paper and accidentally light yourself on fire!</span>")

View File

@@ -442,7 +442,7 @@ GLOBAL_LIST_INIT(gun_saw_types, typecacheof(list(
///Handles all the logic of sawing off guns,
/obj/item/gun/ballistic/proc/sawoff(mob/user, obj/item/saw)
if(!saw.is_sharp() || !is_type_in_typecache(saw, GLOB.gun_saw_types)) //needs to be sharp. Otherwise turned off eswords can cut this.
if(!saw.get_sharpness() || !is_type_in_typecache(saw, GLOB.gun_saw_types)) //needs to be sharp. Otherwise turned off eswords can cut this.
return
if(sawn_off)
to_chat(user, "<span class='warning'>\The [src] is already shortened!</span>")

View File

@@ -91,7 +91,7 @@
reagents.clear_reagents()
/obj/item/reagent_containers/glass/attackby(obj/item/I, mob/user, params)
var/hotness = I.is_hot()
var/hotness = I.get_temperature()
if(hotness && reagents)
reagents.expose_temperature(hotness)
to_chat(user, "<span class='notice'>You heat [name] with [I]!</span>")

View File

@@ -122,7 +122,7 @@
to_chat(user, "<span class='notice'>You switch the nozzle setting to [stream_mode ? "\"stream\"":"\"spray\""]. You'll now use [amount_per_transfer_from_this] units per use.</span>")
/obj/item/reagent_containers/spray/attackby(obj/item/I, mob/user, params)
var/hotness = I.is_hot()
var/hotness = I.get_temperature()
if(hotness && reagents)
reagents.expose_temperature(hotness)
to_chat(user, "<span class='notice'>You heat [name] with [I]!</span>")

View File

@@ -562,7 +562,7 @@ datum/status_effect/stabilized/blue/on_remove()
name = "burning fingertips"
desc = "You shouldn't see this."
/obj/item/hothands/is_hot()
/obj/item/hothands/get_temperature()
return 290 //Below what's required to ignite plasma.
/datum/status_effect/stabilized/darkpurple

View File

@@ -28,7 +28,7 @@
time = 100
/datum/surgery_step/lobotomize/tool_check(mob/user, obj/item/tool)
if(implement_type == /obj/item && !tool.is_sharp())
if(implement_type == /obj/item && !tool.get_sharpness())
return FALSE
return TRUE

View File

@@ -26,7 +26,7 @@
/datum/surgery_step/viral_bond/tool_check(mob/user, obj/item/tool)
if(implement_type == TOOL_WELDER || implement_type == /obj/item)
return tool.is_hot()
return tool.get_temperature()
return TRUE

View File

@@ -99,7 +99,7 @@
..()
/obj/item/bodypart/attackby(obj/item/W, mob/user, params)
if(W.is_sharp())
if(W.get_sharpness())
add_fingerprint(user)
if(!contents.len)
to_chat(user, "<span class='warning'>There is nothing left inside [src]!</span>")

View File

@@ -17,7 +17,7 @@
/datum/surgery_step/handle_cavity/tool_check(mob/user, obj/item/tool)
if(istype(tool, /obj/item/cautery) || istype(tool, /obj/item/gun/energy/laser))
return FALSE
return !tool.is_hot()
return !tool.get_temperature()
/datum/surgery_step/handle_cavity/preop(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery)
var/obj/item/bodypart/chest/CH = target.get_bodypart(BODY_ZONE_CHEST)

View File

@@ -14,7 +14,7 @@
"<span class='notice'>[user] begins to unscrew the shell of [target]'s [parse_zone(target_zone)].</span>")
/datum/surgery_step/mechanic_incise/tool_check(mob/user, obj/item/tool)
if(implement_type == /obj/item && !tool.is_sharp())
if(implement_type == /obj/item && !tool.get_sharpness())
return FALSE
return TRUE
@@ -35,7 +35,7 @@
"<span class='notice'>[user] begins to screw the shell of [target]'s [parse_zone(target_zone)].</span>")
/datum/surgery_step/mechanic_close/tool_check(mob/user, obj/item/tool)
if(implement_type == /obj/item && !tool.is_sharp())
if(implement_type == /obj/item && !tool.get_sharpness())
return FALSE
return TRUE

View File

@@ -12,7 +12,7 @@
"<span class='notice'>[user] begins to make an incision in [target]'s [parse_zone(target_zone)].</span>")
/datum/surgery_step/incise/tool_check(mob/user, obj/item/tool)
if(implement_type == /obj/item && !tool.is_sharp())
if(implement_type == /obj/item && !tool.get_sharpness())
return FALSE
return TRUE
@@ -83,7 +83,7 @@
/datum/surgery_step/close/tool_check(mob/user, obj/item/tool)
if(implement_type == TOOL_WELDER || implement_type == /obj/item)
return tool.is_hot()
return tool.get_temperature()
return TRUE