Adds an icon for non-abstract nodrop items (#29452)

This commit is contained in:
Contrabang
2025-06-07 13:25:01 +00:00
committed by GitHub
parent 74e1c13e64
commit f9e95a2b1d
35 changed files with 114 additions and 86 deletions
+2 -1
View File
@@ -144,7 +144,8 @@
new /obj/effect/hallucination/delusion(get_turf(victim), victim, 'icons/mob/mob.dmi', "daemon")
var/obj/item/chainsaw/doomslayer/chainsaw = new(victim.loc)
chainsaw.flags |= NODROP | DROPDEL
chainsaw.flags |= DROPDEL
chainsaw.set_nodrop(TRUE, victim)
victim.drop_l_hand()
victim.drop_r_hand()
victim.put_in_hands(chainsaw)
+12
View File
@@ -1068,3 +1068,15 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
/// Changes the speech verb when wearing this item if a value is returned
/obj/item/proc/change_speech_verb()
return
/obj/item/proc/set_nodrop(set_value, user)
switch(set_value)
if(TRUE)
flags |= NODROP
if(FALSE)
flags &= ~NODROP
if(NODROP_TOGGLE)
flags ^= NODROP
if(iscarbon(user))
var/mob/living/carbon/C = user
C.update_hands_hud()
@@ -63,7 +63,7 @@
user.put_in_hands(A)
A.add_fingerprint(user)
if(src.flags & NODROP)
A.flags |= NODROP
A.set_nodrop(TRUE)
/obj/item/electropack/proc/handle_shock()
+6 -6
View File
@@ -144,7 +144,7 @@
do_attack_animation(master, used_item = src)
master.emote("scream")
master.remove_status_effect(STATUS_EFFECT_HISGRACE)
flags &= ~NODROP
set_nodrop(FALSE, master)
master.Weaken(6 SECONDS)
master.adjustBruteLoss(1000)
playsound(master, 'sound/effects/splat.ogg', 100, FALSE)
@@ -251,25 +251,25 @@
update_stats()
/obj/item/his_grace/proc/update_stats()
var/mob/living/master = get_atom_on_turf(src, /mob/living)
if(ascended) // Ascended is set to a specific bloodthirst anyways
force = initial(force) + force_bonus
flags |= NODROP
set_nodrop(TRUE, master)
return
flags &= ~NODROP
var/mob/living/master = get_atom_on_turf(src, /mob/living)
set_nodrop(FALSE, master)
switch(bloodthirst)
if(HIS_GRACE_CONSUME_OWNER to HIS_GRACE_FALL_ASLEEP)
if(HIS_GRACE_CONSUME_OWNER > prev_bloodthirst)
master.visible_message("<span class='userdanger'>[src] enters a frenzy!</span>")
if(HIS_GRACE_STARVING to HIS_GRACE_CONSUME_OWNER)
flags |= NODROP
set_nodrop(TRUE, master)
if(HIS_GRACE_STARVING > prev_bloodthirst)
master.visible_message("<span class='boldwarning'>[src] is starving!</span>", "<span class='his_grace big'>[src]'s bloodlust overcomes you. [src] must be fed, or you will become His meal.\
[force_bonus < 15 ? " And still, His power grows.":""]</span>")
force_bonus = max(force_bonus, 15)
if(HIS_GRACE_FAMISHED to HIS_GRACE_STARVING)
flags |= NODROP
set_nodrop(TRUE, master)
if(HIS_GRACE_FAMISHED > prev_bloodthirst)
master.visible_message("<span class='warning'>[src] is very hungry!</span>", "<span class='his_grace big'>Spines sink into your hand. [src] must feed immediately.\
[force_bonus < 10 ? " His power grows.":""]</span>")
+5 -5
View File
@@ -349,26 +349,26 @@
/obj/item/rcd/suicide_act(mob/living/user)
user.Immobilize(10 SECONDS) // You cannot move.
flags |= NODROP // You cannot drop. You commit to die.
set_nodrop(TRUE, user)
if(mode == MODE_DECON)
user.visible_message("<span class='suicide'>[user] points [src] at [user.p_their()] chest and pulls the trigger. It looks like [user.p_theyre()] trying to commit suicide!</span>")
var/datum/rcd_act/remove_user/act = new()
if(!act.try_act(user, src, user))
flags &= ~NODROP
set_nodrop(FALSE, user)
return SHAME
user.visible_message("<span class='suicide'>[user] deconstructs [user.p_themselves()] with [src]!</span>")
for(var/obj/item/W in user) // Do not delete all their stuff.
user.drop_item_to_ground(W) // Dump everything on the floor instead.
flags &= ~NODROP // NODROP must be removed so the RCD doesn't get dusted along with them. Having this come after the unequipping puts the RCD on top of the pile of stuff.
set_nodrop(FALSE, user)
user.dust() // (held items fall to the floor when dusting).
return OBLITERATION
user.visible_message("<span class='suicide'>[user] puts the barrel of [src] into [user.p_their()] mouth and pulls the trigger. It looks like [user.p_theyre()] trying to commit suicide!</span>")
if(!interact_with_atom(get_turf(src), user, TRUE))
flags &= ~NODROP
set_nodrop(FALSE, user)
return SHAME
user.visible_message("<span class='suicide'>[user] explodes as [src] builds a structure inside [user.p_them()]!</span>")
flags &= ~NODROP
set_nodrop(FALSE, user)
user.gib()
return OBLITERATION
@@ -23,7 +23,7 @@
/obj/item/grenade/syndieminibomb/fake/attack_self__legacy__attackchain(mob/user)
if(!active)
flags |= NODROP
set_nodrop(TRUE, user)
to_chat(user, "<span class='userdanger'>As you activate the bomb, it emits a substance that sticks to your hand! It won't come off!</span>")
to_chat(user, "<span class='sans'>Uh oh.</span>")
. = ..()
@@ -114,7 +114,7 @@
icon_state = "disintegrate"
item_state = "disintegrate"
desc = "This hand of yours glows with an awesome power!"
flags = ABSTRACT | NODROP| DROPDEL
flags = ABSTRACT | NODROP | DROPDEL
w_class = WEIGHT_CLASS_HUGE
hitsound = 'sound/weapons/sear.ogg'
damtype = BURN
@@ -23,18 +23,18 @@
if(!gripped)
gripped = TRUE
to_chat(user, "You tighten your grip on [src], ensuring you won't drop it.")
flags |= NODROP
set_nodrop(TRUE, user)
ADD_TRAIT(src, TRAIT_SKIP_EXAMINE, "knuckledusters")
else
gripped = FALSE
to_chat(user, "You relax your grip on [src].")
flags &= ~NODROP
set_nodrop(FALSE, user)
REMOVE_TRAIT(src, TRAIT_SKIP_EXAMINE, "knuckledusters")
/obj/item/melee/knuckleduster/dropped(mob/user, silent)
. = ..()
gripped = FALSE
flags &= ~NODROP
set_nodrop(FALSE, user)
REMOVE_TRAIT(src, TRAIT_SKIP_EXAMINE, "knuckledusters")
/obj/item/melee/knuckleduster/attack__legacy__attackchain(mob/living/target, mob/living/user)
+2 -3
View File
@@ -71,7 +71,7 @@
to_chat(user, "<span class='notice'>[src] currently has no tank attached to it.</span>")
return
to_chat(user, "<span class='notice'>As you detach [thetank] from [src], the fist unlocks.</span>")
flags &= ~NODROP
set_nodrop(FALSE, user)
tank.forceMove(get_turf(user))
user.put_in_hands(tank)
tank = null
@@ -84,8 +84,7 @@
to_chat(user, "<span class='notice'>As you hook [thetank] up to [src], the fist locks into place around your arm.</span>")
tank = thetank
thetank.forceMove(src)
flags |= NODROP
set_nodrop(TRUE, user)
/obj/item/melee/powerfist/attack__legacy__attackchain(mob/living/target, mob/living/user)
if(HAS_TRAIT(user, TRAIT_PACIFISM))
@@ -430,7 +430,7 @@
if(zip_time)
slowdown = 1
if(antidrop_on_zip)
flags ^= NODROP
set_nodrop(NODROP_TOGGLE, user)
update_icon(UPDATE_ICON_STATE)
return
@@ -439,7 +439,7 @@
for(var/obj/item/storage/container in src)
container.hide_from_all() // Hide everything inside the bag too
if(antidrop_on_zip)
flags |= NODROP
set_nodrop(TRUE, user)
update_icon(UPDATE_ICON_STATE)
/obj/item/storage/backpack/duffel/update_icon_state()
+4 -4
View File
@@ -571,10 +571,10 @@
return ..()
/obj/item/butcher_chainsaw/proc/wield() //you can't disarm an active chainsaw, you crazy person.
flags |= NODROP
set_nodrop(TRUE, loc)
/obj/item/butcher_chainsaw/proc/unwield()
flags &= ~NODROP
set_nodrop(FALSE, loc)
// SINGULOHAMMER
/obj/item/singularityhammer
@@ -878,7 +878,7 @@
user.visible_message("<span class='warning'>[user] deploys [W] from [user.p_their()] wrists in a shower of sparks!</span>", "<span class='notice'>You deploy [W] from your wrists!</span>", "<span class='warning'>You hear the shower of sparks!</span>")
user.put_in_hands(W)
on_cooldown = TRUE
flags |= NODROP
set_nodrop(TRUE, user)
addtimer(CALLBACK(src, PROC_REF(reboot)), 2 MINUTES)
if(world.time > next_spark_time)
do_sparks(rand(1,6), 1, loc)
@@ -900,7 +900,7 @@
/obj/item/clothing/gloves/color/black/pyro_claws/proc/reboot()
on_cooldown = FALSE
flags &= ~NODROP
set_nodrop(FALSE, loc)
atom_say("Internal plasma canisters recharged. Gloves sufficiently cooled")
/// Max number of atoms a broom can sweep at once