[MIRROR] Book patches [MDB IGNORE] (#21321)

* Book patches (#75565)

## About The Pull Request
1. Fixes #75555 knives already have their `sharpness = SHARP_EDGED` so
there's no need to explicitly type check for them and overall that if
condition was just a mind blender, so it's better now
2. Fixes #75577 bibles can convert other bibles again and will not
attempt to store it inside. Carrying over the fix that was implemented
in #73137

## Changelog
🆑
fix: wire cutter's can carve out book's again.
fix: bibles can convert other bibles
/🆑

---------

Co-authored-by: carlarctg <53100513+carlarctg@ users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* Book patches

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: carlarctg <53100513+carlarctg@ users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-05-21 22:07:43 +01:00
committed by GitHub
co-authored by carlarctg Mothblocks SyncIt21
parent be44c0824f
commit 4c0da7d43b
2 changed files with 12 additions and 9 deletions
+3
View File
@@ -246,6 +246,9 @@ GLOBAL_LIST_INIT(bibleitemstates, list(
playsound(target_mob, SFX_PUNCH, 25, TRUE, -1)
log_combat(user, target_mob, "attacked", src)
/obj/item/book/bible/attackby_storage_insert(datum/storage, atom/storage_holder, mob/user)
return !istype(storage_holder, /obj/item/book/bible)
/obj/item/book/bible/afterattack(atom/bible_smacked, mob/user, proximity_flag, click_parameters)
. = ..()
if(!proximity_flag)
+9 -9
View File
@@ -177,15 +177,15 @@
return FALSE
if(!user.combat_mode)
return FALSE
if(!((carving_item.sharpness & SHARP_EDGED) && (carving_item.tool_behaviour != TOOL_KNIFE) && (carving_item.tool_behaviour != TOOL_WIRECUTTER)))
return FALSE
//i hate balloon alerts i hate them so god damn much
balloon_alert(user, "carving out...")
if(!do_after(user, 3 SECONDS, target = src))
balloon_alert(user, "interrupted!")
return FALSE
carve_out(carving_item, user)
return TRUE
//special check for wirecutter's because they don't have a sharp edge
if((carving_item.sharpness & SHARP_EDGED) || (carving_item.tool_behaviour == TOOL_WIRECUTTER))
balloon_alert(user, "carving out...")
if(!do_after(user, 3 SECONDS, target = src))
balloon_alert(user, "interrupted!")
return FALSE
carve_out(carving_item, user)
return TRUE
return FALSE
/// Called when the book gets carved successfully
/obj/item/book/proc/carve_out(obj/item/carving_item, mob/living/user)