Let's say I have code that runs like so:
Obj/item/Urist/dropped()
Check for the presence of Urist in the jumpsuit slot
If the removal of Urist from the jumpsuit slot triggere the call to dropped, will the check return true or false?
Dropped() question
- Drynwyn
- Joined: Fri Apr 18, 2014 5:09 pm
- Byond Username: Drynwyn
Dropped() question
In game, I play the A.I Firmware, the French cyborg C.U.R.I.E, Aubrie Allen, and the lizard scum Skulks-Through-Maintenance.
- Remie Richards
- Joined: Thu Apr 17, 2014 7:11 pm
- Byond Username: CrimsonVision
- Location: England, UK, Earth, Sol, Milky Way, Local Group, Virgo Supercluster, Known Universe
- Contact:
Re: Dropped() question
Without looking (I'll look in a sec and stick an Edit)
I'd Say it'd return false.
I'm fairly certain an item's dropped() is always called immediately after it is removed/dropped.
EDIT:
All drop procs filter down to unEquip:
Which changes the item's Loc and then calls dropped()
Not sure if this is what you meant though.
I'd Say it'd return false.
I'm fairly certain an item's dropped() is always called immediately after it is removed/dropped.
EDIT:
All drop procs filter down to unEquip:
Code: Select all
/mob/proc/unEquip(obj/item/I, force) //Force overrides NODROP for things like wizarditis and admin undress.
if(!I) //If there's nothing to drop, the drop is automatically succesfull. If(unEquip) should generally be used to check for NODROP.
return 1
if((I.flags & NODROP) && !force)
return 0
if(I == r_hand)
r_hand = null
update_inv_r_hand()
else if(I == l_hand)
l_hand = null
update_inv_l_hand()
if(I)
if(client)
client.screen -= I
I.loc = loc
I.dropped(src)
if(I)
I.layer = initial(I.layer)
return 1
Not sure if this is what you meant though.
私は完璧
- Drynwyn
- Joined: Fri Apr 18, 2014 5:09 pm
- Byond Username: Drynwyn
Re: Dropped() question
That's exactly what I needed. Thanks!
In game, I play the A.I Firmware, the French cyborg C.U.R.I.E, Aubrie Allen, and the lizard scum Skulks-Through-Maintenance.
Who is online
Users browsing this forum: No registered users