mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
[NO-GBP] Fixes highlander gibbing the whole server (#80263)
Highlander was just deleting or dropping everything, including your bodyparts and organs 🆑 fix: Highlander wont gib every person anymore /🆑
This commit is contained in:
@@ -174,14 +174,8 @@
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
|
||||
for(var/obj/item/W in M)
|
||||
if(!M.dropItemToGround(W))
|
||||
// I hate that this is necessary, but the code is literally just dropping or deleting everything otherwise
|
||||
// people should be allowed to keep their fucking organs
|
||||
if(istype(W, /obj/item/organ) || istype(W, /obj/item/bodypart))
|
||||
continue
|
||||
qdel(W)
|
||||
M.regenerate_icons()
|
||||
M.drop_everything(del_on_drop = FALSE, force = TRUE, del_if_nodrop = TRUE)
|
||||
M.regenerate_icons()
|
||||
|
||||
log_admin("[key_name(usr)] made [key_name(M)] drop everything!")
|
||||
var/msg = "[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] drop everything!"
|
||||
|
||||
@@ -52,9 +52,8 @@
|
||||
if(!istype(H))
|
||||
return
|
||||
|
||||
for(var/obj/item/I in H)
|
||||
if(!H.dropItemToGround(I))
|
||||
qdel(I)
|
||||
H.drop_everything(del_on_drop = FALSE, force = TRUE, del_if_nodrop = TRUE)
|
||||
|
||||
H.regenerate_icons()
|
||||
H.revive(ADMIN_HEAL_ALL)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/costume/kilt/highlander(H), ITEM_SLOT_ICLOTHING)
|
||||
|
||||
@@ -485,6 +485,19 @@
|
||||
|
||||
DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, PROC_REF(execute_quick_equip)))
|
||||
|
||||
/// Safely drop everything, without deconstructing the mob
|
||||
/mob/proc/drop_everything(del_on_drop, force, del_if_nodrop)
|
||||
. = list()
|
||||
for(var/obj/item/item in src)
|
||||
if(!dropItemToGround(item, force))
|
||||
if(del_if_nodrop && !(item.item_flags & ABSTRACT))
|
||||
qdel(item)
|
||||
if(del_on_drop)
|
||||
qdel(item)
|
||||
//Anything thats not deleted and isn't in the mob, so everything that is succesfully dropped to the ground, is returned
|
||||
if(!QDELETED(item) && !(item in src))
|
||||
. += item
|
||||
|
||||
///proc extender of [/mob/verb/quick_equip] used to make the verb queuable if the server is overloaded
|
||||
/mob/proc/execute_quick_equip()
|
||||
var/obj/item/I = get_active_held_item()
|
||||
@@ -505,8 +518,6 @@
|
||||
/mob/proc/getBeltSlot()
|
||||
return ITEM_SLOT_BELT
|
||||
|
||||
|
||||
|
||||
//Inventory.dm is -kind of- an ok place for this I guess
|
||||
|
||||
//This is NOT for dismemberment, as the user still technically has 2 "hands"
|
||||
|
||||
Reference in New Issue
Block a user