update butchering
This commit is contained in:
@@ -81,6 +81,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
|
||||
var/flags_cover = 0 //for flags such as GLASSESCOVERSEYES
|
||||
var/heat = 0
|
||||
///All items with sharpness of IS_SHARP or higher will automatically get the butchering component.
|
||||
var/sharpness = IS_BLUNT
|
||||
|
||||
var/tool_behaviour = NONE
|
||||
@@ -139,6 +140,9 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
else if (!istype(embedding, /datum/embedding_behavior))
|
||||
stack_trace("Invalid type [embedding.type] found in .embedding during /obj/item Initialize()")
|
||||
|
||||
if(sharpness) //give sharp objects butchering functionality, for consistency
|
||||
AddComponent(/datum/component/butchering, 80 * toolspeed)
|
||||
|
||||
/obj/item/Destroy()
|
||||
item_flags &= ~DROPDEL //prevent reqdels
|
||||
if(ismob(loc))
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
else
|
||||
if(attack_verb_off.len)
|
||||
attack_verb = attack_verb_off
|
||||
if(get_sharpness())
|
||||
AddComponent(/datum/component/butchering, 50, 100, 0, hitsound, !active)
|
||||
if(sharpness)
|
||||
AddComponent(/datum/component/butchering, 50, 100, 0, hitsound)
|
||||
|
||||
/obj/item/melee/transforming/attack_self(mob/living/carbon/user)
|
||||
if(transform_weapon(user))
|
||||
@@ -65,13 +65,6 @@
|
||||
icon_state = initial(icon_state)
|
||||
w_class = initial(w_class)
|
||||
total_mass = initial(total_mass)
|
||||
if(get_sharpness())
|
||||
var/datum/component/butchering/BT = LoadComponent(/datum/component/butchering)
|
||||
BT.butchering_enabled = TRUE
|
||||
else
|
||||
var/datum/component/butchering/BT = GetComponent(/datum/component/butchering)
|
||||
if(BT)
|
||||
BT.butchering_enabled = FALSE
|
||||
transform_messages(user, supress_message_text)
|
||||
add_fingerprint(user)
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user