Tg port 2 15 (#230)

* defines/helpers

* globalvars, onclick, controllers

* datums and game

* woooooooooorld. Uh. dm

* modules sans mobs client admin

* modules/admin

* pref shit

* modules/mob

* icon updates

* extra things

* Cherrypicked fixes from open PRs

* metastation.tgm fix

* a better meta fix

* reverts async breakings
This commit is contained in:
Poojawa
2017-02-15 03:35:32 -06:00
committed by GitHub
parent fd3923d684
commit fc2dbcd9fe
192 changed files with 10451 additions and 160669 deletions
+17 -5
View File
@@ -148,15 +148,16 @@
/mob/proc/can_equip(obj/item/I, slot, disable_warning = 0)
return FALSE
/mob/proc/put_in_hand(obj/item/I, hand_index)
/mob/proc/can_put_in_hand(I, hand_index)
if(!put_in_hand_check(I))
return FALSE
if(!has_hand_for_held_index(hand_index))
return FALSE
var/obj/item/curr = held_items[hand_index]
if(!curr)
I.loc = src
return !held_items[hand_index]
/mob/proc/put_in_hand(obj/item/I, hand_index)
if(can_put_in_hand(I, hand_index))
I.forceMove(src)
held_items[hand_index] = I
I.layer = ABOVE_HUD_LAYER
I.plane = ABOVE_HUD_PLANE
@@ -255,6 +256,17 @@
return FALSE
return TRUE
/mob/proc/putItemFromInventoryInHandIfPossible(obj/item/I, hand_index, force_removal = FALSE)
if(!can_put_in_hand(I, hand_index))
return FALSE
if(!temporarilyRemoveItemFromInventory(I, force_removal))
return FALSE
I.remove_item_from_storage(src)
if(!put_in_hand(I, hand_index))
qdel(I)
CRASH("Assertion failure: putItemFromInventoryInHandIfPossible") //should never be possible
return TRUE
//The following functions are the same save for one small difference
//for when you want the item to end up on the ground