mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 02:56:14 +01:00
Done with the tweaks and shit.
-Gurgled items no longer drop their invisible pocket space holder thingies while dumping their contents. -IDs and probably some other special items shouldn't randomly vanish now. -Transfering contents from gut to another now also transfers their preserved status and cleans up the list entries from source gut. -Ejection, single and complete, now properly clears the lists from ejected stuff. -Some other cleanups yadda yadda. -Added a commented example part hinting that the system is pretty much ready for a trait based item-weak gurgle option. -All should be well now unless you try to gurgle a synth expecting a preserved brain on borgo gut right now. I just remembered I forgot to steal the posibrain yankage bits from the voreorgan code. Oh well it's not like you could've done that with the old code either :v
This commit is contained in:
@@ -121,11 +121,10 @@
|
||||
|
||||
M.forceMove(owner.loc) // Move the belly contents into the same location as belly's owner.
|
||||
internal_contents -= M // Remove from the belly contents
|
||||
|
||||
var/datum/belly/B = check_belly(owner) // This makes sure that the mob behaves properly if released into another mob
|
||||
if(B)
|
||||
B.internal_contents += M
|
||||
|
||||
items_preserved.Cut()
|
||||
owner.visible_message("<font color='green'><b>[owner] expels everything from their [lowertext(name)]!</b></font>")
|
||||
return 1
|
||||
|
||||
@@ -138,6 +137,8 @@
|
||||
|
||||
M.forceMove(owner.loc) // Move the belly contents into the same location as belly's owner.
|
||||
src.internal_contents -= M // Remove from the belly contents
|
||||
if(M in items_preserved)
|
||||
src.items_preserved -= M
|
||||
|
||||
if(istype(M,/mob/living))
|
||||
var/mob/living/ML = M
|
||||
@@ -321,15 +322,12 @@
|
||||
internal_contents += W
|
||||
|
||||
else
|
||||
if(istype(W, /obj/item/weapon/storage/internal))
|
||||
for (var/obj/item/SubItem in W)
|
||||
_handle_digested_item(SubItem,M)
|
||||
qdel(W)
|
||||
for (var/obj/item/SubItem in W)
|
||||
for(var/obj/item/SubItem in W)
|
||||
_handle_digested_item(SubItem,M)
|
||||
if(!istype(W,/obj/item/organ))
|
||||
M.remove_from_mob(W,owner)
|
||||
internal_contents += W
|
||||
if(!istype(W,/obj/item/organ))// Don't drop organs or pocket spaces.
|
||||
if(!istype(W,/obj/item/weapon/storage/internal))
|
||||
M.remove_from_mob(W,owner)
|
||||
internal_contents += W
|
||||
|
||||
/datum/belly/proc/_is_digestable(var/obj/item/I)
|
||||
if(is_type_in_list(I,important_items))
|
||||
@@ -459,7 +457,10 @@
|
||||
if(!(content in internal_contents))
|
||||
return
|
||||
internal_contents -= content
|
||||
target.internal_contents |= content
|
||||
target.internal_contents += content
|
||||
if(content in items_preserved)
|
||||
items_preserved -= content
|
||||
target.items_preserved += content
|
||||
if(isliving(content))
|
||||
var/mob/living/M = content
|
||||
if(target.inside_flavor)
|
||||
|
||||
@@ -77,18 +77,28 @@
|
||||
else
|
||||
owner.nutrition += (10/difference)
|
||||
|
||||
//if(owner.weakgurgles < 1) // An example for possible trait modifier. (Not existing currently)
|
||||
//The "Handle leftovers" spaghetti below should be moved here if above gets done.
|
||||
|
||||
// Handle leftovers.
|
||||
var/obj/item/T = pick(internal_contents)
|
||||
if(istype(T, /obj/item))
|
||||
if(istype(T, /obj/item) && _is_digestable(T) && !(T in items_preserved))
|
||||
for(var/obj/item/SubItem in T.contents)
|
||||
SubItem.forceMove(internal_contents)
|
||||
if(T in items_preserved)// Doublecheck just in case.
|
||||
return
|
||||
for(var/obj/item/SubItem in T)
|
||||
if(istype(SubItem,/obj/item/weapon/storage/internal))
|
||||
var/obj/item/weapon/storage/internal/SI = SubItem
|
||||
for(var/obj/item/SubSubItem in SI)
|
||||
SubSubItem.forceMove(internal_contents)
|
||||
qdel(SI)
|
||||
else
|
||||
SubItem.forceMove(internal_contents)
|
||||
owner.nutrition += (1 * T.w_class)
|
||||
internal_contents -= T
|
||||
qdel(T)
|
||||
else
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
//////////////////////////// DM_ABSORB ////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user