Ports "Renames is_hot and is_sharp to get_temperature and get_sharpness"

This commit is contained in:
Ghommie
2019-11-05 05:37:28 +01:00
parent 4e8c8ad335
commit a650e1e411
55 changed files with 78 additions and 78 deletions

View File

@@ -334,7 +334,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

@@ -255,7 +255,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

@@ -77,7 +77,7 @@
hitsound = 'sound/weapons/tap.ogg'
STOP_PROCESSING(SSobj, src)
/obj/item/clothing/head/hardhat/cakehat/is_hot()
/obj/item/clothing/head/hardhat/cakehat/get_temperature()
return on * heat
/*
* Ushanka

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

@@ -95,7 +95,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

@@ -455,7 +455,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 = 1
var/message = "[ADMIN_LOOKUP(user)] has primed a [name] for detonation at [ADMIN_VERBOSEJMP(user)]."
GLOB.bombers += message

View File

@@ -181,7 +181,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
@@ -337,7 +337,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>", 1)
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

@@ -120,7 +120,7 @@
/obj/structure/bonfire/prelit/Initialize()
. = ..()
StartBurning()
/obj/structure/bonfire/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && (mover.pass_flags & PASSTABLE))
return TRUE
@@ -148,7 +148,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

@@ -1755,7 +1755,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
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)
@@ -1788,7 +1788,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
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] has been knocked down!</span>", \
"<span class='userdanger'>[H] has been knocked down!</span>")

View File

@@ -796,7 +796,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

@@ -388,7 +388,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

@@ -323,7 +323,7 @@
to_chat(user, "<span class='notice'>You stamp the paper with your rubber stamp.</span>")
ui.render_all()
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

@@ -154,7 +154,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

@@ -76,7 +76,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

@@ -89,7 +89,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

@@ -125,7 +125,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

@@ -563,7 +563,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

@@ -25,7 +25,7 @@
/obj/item/shard = 25, /obj/item = 20)
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

@@ -24,7 +24,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
/datum/surgery_step/viral_bond/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)

View File

@@ -15,7 +15,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)
IC = CH.cavity_item

View File

@@ -14,7 +14,7 @@
"[user] begins to unscrew the shell of [target]'s [parse_zone(target_zone)].")
/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
//close shell
@@ -33,7 +33,7 @@
"[user] begins to screw the shell of [target]'s [parse_zone(target_zone)].")
/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
//prepare electronics

View File

@@ -11,7 +11,7 @@
"[user] begins to make an incision in [target]'s [parse_zone(target_zone)].")
/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
/datum/surgery_step/incise/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
@@ -79,7 +79,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
/datum/surgery_step/close/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(locate(/datum/surgery_step/saw) in surgery.steps)