mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 00:21:11 +01:00
Fixes table alignment once and for all plus borg item teleportation fix. (#10939)
This commit is contained in:
@@ -187,21 +187,18 @@ var/list/slot_equipment_priority = list( \
|
||||
|
||||
// Removes an item from inventory and places it in the target atom.
|
||||
// If canremove or other conditions need to be checked then use unEquip instead.
|
||||
/mob/proc/drop_from_inventory(var/obj/item/W, var/atom/target, var/click_params)
|
||||
/mob/proc/drop_from_inventory(var/obj/item/W, var/atom/target)
|
||||
if(W)
|
||||
if(!target)
|
||||
target = loc
|
||||
remove_from_mob(W)
|
||||
if(!(W && W.loc))
|
||||
return 1
|
||||
INVOKE_ASYNC(W, /atom/movable/proc/do_putdown_animation, target, src, click_params)
|
||||
if(istype(target, /obj/structure/table))
|
||||
W.forceMove(target.loc)
|
||||
else
|
||||
W.forceMove(target)
|
||||
return TRUE
|
||||
W.do_putdown_animation(target, src)
|
||||
W.forceMove(target)
|
||||
update_icon()
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
//Drops the item in our left hand
|
||||
/mob/proc/drop_l_hand(var/atom/target)
|
||||
@@ -283,10 +280,10 @@ var/list/slot_equipment_priority = list( \
|
||||
return slot
|
||||
|
||||
//This differs from remove_from_mob() in that it checks if the item can be unequipped first.
|
||||
/mob/proc/unEquip(obj/item/I, force = 0, var/atom/target, var/click_params) //Force overrides NODROP for things like wizarditis and admin undress.
|
||||
/mob/proc/unEquip(obj/item/I, force = 0, var/atom/target) //Force overrides NODROP for things like wizarditis and admin undress.
|
||||
if(!(force || canUnEquip(I)))
|
||||
return
|
||||
drop_from_inventory(I, target, click_params)
|
||||
drop_from_inventory(I, target)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -231,24 +231,24 @@
|
||||
to_chat(src, "<span class='notice'>You need to disable a module first!</span>")
|
||||
|
||||
/mob/living/silicon/robot/put_in_hands(var/obj/item/W) // Maybe hands.
|
||||
var/obj/item/gripper/G = null
|
||||
var/obj/item/gripper/G
|
||||
if (istype(module_state_1, /obj/item/gripper))
|
||||
|
||||
G = module_state_1
|
||||
if (!G.wrapped && G.grip_item(W, src, 1))
|
||||
return 1
|
||||
return TRUE
|
||||
else if (istype(module_state_2, /obj/item/gripper))
|
||||
G = module_state_2
|
||||
if (!G.wrapped && G.grip_item(W, src, 0))
|
||||
return 1
|
||||
return TRUE
|
||||
else if (istype(module_state_3, /obj/item/gripper))
|
||||
G = module_state_3
|
||||
if (!G.wrapped && G.grip_item(W, src, 0))
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
W.forceMove(get_turf(src))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
|
||||
/mob/living/silicon/robot/drop_item()
|
||||
@@ -257,11 +257,8 @@
|
||||
if (G.wrapped)
|
||||
G.drop_item()
|
||||
return
|
||||
|
||||
uneq_active()
|
||||
|
||||
|
||||
|
||||
/mob/living/silicon/robot/drop_from_inventory(var/obj/item/W, var/atom/target = null)
|
||||
if(W)
|
||||
if(!target)
|
||||
@@ -269,17 +266,15 @@
|
||||
if (istype(W.loc, /obj/item/gripper))
|
||||
var/obj/item/gripper/G = W.loc
|
||||
G.drop(target)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/robot/canUnEquip(obj/item/I)
|
||||
if(!I) //If there's nothing to drop, the drop is automatically successful.
|
||||
return 1
|
||||
return TRUE
|
||||
if (I.loc != src)
|
||||
return 1//Allows objects inside grippers
|
||||
return 0//don't allow dropping our modules
|
||||
|
||||
return TRUE //Allows objects inside grippers
|
||||
return FALSE //don't allow dropping our modules
|
||||
|
||||
/mob/living/silicon/robot/proc/describe_module(var/slot)
|
||||
var/list/index_module = list(module_state_1,module_state_2,module_state_3)
|
||||
|
||||
@@ -112,6 +112,7 @@
|
||||
if(wrapped.loc == src)
|
||||
if(force_holder)
|
||||
wrapped.force = force_holder
|
||||
wrapped.do_putdown_animation(target, loc)
|
||||
wrapped.forceMove(target)
|
||||
force_holder = null
|
||||
to_chat(loc, SPAN_NOTICE("You release \the [wrapped].")) // loc will always be the cyborg
|
||||
@@ -122,16 +123,16 @@
|
||||
/obj/item/gripper/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(wrapped) //The force of the wrapped obj gets set to zero during the attack() and afterattack().
|
||||
force_holder = wrapped.force
|
||||
wrapped.force = 0.0
|
||||
wrapped.force = 0
|
||||
wrapped.attack(M,user)
|
||||
if(QDELETED(wrapped))
|
||||
wrapped = null
|
||||
return TRUE
|
||||
else // mob interactions
|
||||
switch(user.a_intent)
|
||||
if("help")
|
||||
if(I_HELP)
|
||||
user.visible_message("\The [user] [pick("boops", "squeezes", "pokes", "prods", "strokes", "bonks")] \the [M] with \the [src]")
|
||||
if("harm")
|
||||
if(I_HURT)
|
||||
M.attack_generic(user, user.mob_size, "crushed")//about 16 dmg for a cyborg
|
||||
//Attack generic does a visible message so we dont need one here
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN * 3)
|
||||
|
||||
Reference in New Issue
Block a user