diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm
index 37c45ba954d..ab1357a5833 100644
--- a/code/__DEFINES/misc.dm
+++ b/code/__DEFINES/misc.dm
@@ -20,6 +20,11 @@
#define CLICK_CD_POINT 10
#define CLICK_CD_RESIST 20
+//Sizes of mobs, used by mob/living/var/mob_size
+#define MOB_SIZE_TINY 0
+#define MOB_SIZE_SMALL 1
+#define MOB_SIZE_HUMAN 2
+#define MOB_SIZE_LARGE 3
///
#define ROUNDSTART_LOGOUT_REPORT_TIME 6000 //Amount of time (in deciseconds) after the rounds starts, that the player disconnect report is issued.
@@ -160,6 +165,12 @@
#define MAX_STACK_SIZE 50
+//check_target_facings() return defines
+#define FACING_FAILED 0
+#define FACING_SAME_DIR 1
+#define FACING_EACHOTHER 2
+#define FACING_INIT_FACING_TARGET_TARGET_FACING_PERPENDICULAR 3 //Do I win the most informative but also most stupid define award?
+
//unmagic-strings for types of polls
#define POLLTYPE_OPTION "OPTION"
#define POLLTYPE_TEXT "TEXT"
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 6cd28a20a32..1e6aaa90a42 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -1355,20 +1355,19 @@ Standard way to write links -Sayu
return 1
-proc/check_target_facings(mob/living/initator, mob/living/target)
+/proc/check_target_facings(mob/living/initator, mob/living/target)
/*This can be used to add additional effects on interactions between mobs depending on how the mobs are facing each other, such as adding a crit damage to blows to the back of a guy's head.
Given how click code currently works (Nov '13), the initiating mob will be facing the target mob most of the time
That said, this proc should not be used if the change facing proc of the click code is overriden at the same time*/
- if(!!isliving(target) || target.lying || istype(target, /mob/living/silicon/pai))
+ if(!ismob(target) || target.lying)
//Make sure we are not doing this for things that can't have a logical direction to the players given that the target would be on their side
- return
-
+ return FACING_FAILED
if(initator.dir == target.dir) //mobs are facing the same direction
- return 1
- if(initator.dir + 4 == target.dir || initator.dir - 4 == target.dir) //mobs are facing each other
- return 2
+ return FACING_SAME_DIR
+ if(is_A_facing_B(initator, target) && is_A_facing_B(target, initator)) //mobs are facing each other
+ return FACING_EACHOTHER
if(initator.dir + 2 == target.dir || initator.dir - 2 == target.dir || initator.dir + 6 == target.dir || initator.dir - 6 == target.dir) //Initating mob is looking at the target, while the target mob is looking in a direction perpendicular to the 1st
- return 3
+ return FACING_INIT_FACING_TARGET_TARGET_FACING_PERPENDICULAR
atom/proc/GetTypeInAllContents(typepath)
@@ -1472,6 +1471,36 @@ var/mob/dview/dview_mob = new
return 1
return 0
+
+//Get the dir to the RIGHT of dir if they were on a clock
+//NORTH --> NORTHEAST
+/proc/get_clockwise_dir(dir)
+ . = angle2dir(dir2angle(dir)+45)
+
+//Get the dir to the LEFT of dir if they were on a clock
+//NORTH --> NORTHWEST
+/proc/get_anticlockwise_dir(dir)
+ . = angle2dir(dir2angle(dir)-45)
+
+
+//Compare A's dir, the clockwise dir of A and the anticlockwise dir of A
+//To the opposite dir of the dir returned by get_dir(B,A)
+//If one of them is a match, then A is facing B
+/proc/is_A_facing_B(atom/A, atom/B)
+ if(!istype(A) || !istype(B))
+ return 0
+ if(isliving(A))
+ var/mob/living/LA = A
+ if(LA.lying)
+ return 0
+ var/goal_dir = angle2dir(dir2angle(get_dir(B, A)+180))
+ var/clockwise_A_dir = get_clockwise_dir(A.dir)
+ var/anticlockwise_A_dir = get_anticlockwise_dir(B.dir)
+
+ if(A.dir == goal_dir || clockwise_A_dir == goal_dir || anticlockwise_A_dir == goal_dir)
+ return 1
+ return 0
+
//This is just so you can stop an orbit.
//orbit() can run without it (swap orbiting for A)
//but then you can never stop it and that's just silly.
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 7935e504e09..7c9d7f4a85c 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -1644,9 +1644,4 @@
/mob/living/simple_animal/construct/armoured/mind_initialize()
..()
mind.assigned_role = "Juggernaut"
- mind.special_role = SPECIAL_ROLE_CULTIST
-
-/mob/living/simple_animal/vox/armalis/mind_initialize()
- ..()
- mind.assigned_role = "Armalis"
- mind.special_role = SPECIAL_ROLE_RAIDER
+ mind.special_role = SPECIAL_ROLE_CULTIST
\ No newline at end of file
diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm
index 5b0884788b9..67229b51a1a 100644
--- a/code/game/gamemodes/blob/blobs/blob_mobs.dm
+++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm
@@ -160,6 +160,7 @@
minbodytemp = 0
maxbodytemp = 360
force_threshold = 10
+ mob_size = MOB_SIZE_LARGE
environment_smash = 3
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm
index 7bc3ce06c76..73694f9a5c2 100644
--- a/code/game/gamemodes/miniantags/borer/borer.dm
+++ b/code/game/gamemodes/miniantags/borer/borer.dm
@@ -76,7 +76,7 @@
attacktext = "nips"
friendly = "prods"
wander = 0
- small = 1
+ mob_size = MOB_SIZE_TINY
density = 0
pass_flags = PASSTABLE
ventcrawler = 2
diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
index 1f9f5ff115a..b2a4f56ec13 100644
--- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
+++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
@@ -60,6 +60,7 @@
faction = list("swarmer")
projectiletype = /obj/item/projectile/beam/disabler
pass_flags = PASSTABLE
+ mob_size = MOB_SIZE_TINY
ventcrawler = 2
ranged = 1
ranged_cooldown_cap = 1
diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm
index e8f3e9b5498..8356e5a9731 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant.dm
@@ -34,6 +34,7 @@
density = 0
flying = 1
anchored = 1
+ mob_size = MOB_SIZE_TINY
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
var/essence = 75 //The resource of revenants. Max health is equal to three times this amount
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 8c5a1fd85fc..18879cfdc9b 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -62,11 +62,11 @@
/obj/machinery/door/Bumped(atom/AM)
if(p_open || operating) return
- if(ismob(AM))
- var/mob/M = AM
+ if(isliving(AM))
+ var/mob/living/M = AM
if(world.time - M.last_bumped <= 10) return //Can bump-open one airlock per second. This is to prevent shock spam.
M.last_bumped = world.time
- if(!M.restrained() && !M.small)
+ if(!M.restrained() && M.mob_size > MOB_SIZE_SMALL)
bumpopen(M)
return
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index cbad06fab9c..76f6c7e94d3 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -52,8 +52,8 @@
return
if(!ticker)
return
- var/mob/M = AM
- if(!M.restrained() && !M.small)
+ var/mob/living/M = AM
+ if(!M.restrained() && M.mob_size > MOB_SIZE_SMALL)
bumpopen(M)
return
diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm
index 35ed65ad0df..62760324f76 100644
--- a/code/game/objects/effects/overlays.dm
+++ b/code/game/objects/effects/overlays.dm
@@ -64,6 +64,13 @@
duration = 8
randomdir = 0
+/obj/effect/overlay/temp/kinetic_blast
+ name = "kinetic explosion"
+ icon = 'icons/obj/projectiles.dmi'
+ icon_state = "kinetic_blast"
+ layer = 4.1
+ duration = 4
+
/obj/effect/overlay/palmtree_r
name = "Palm tree"
icon = 'icons/misc/beach2.dmi'
diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm
index da21397529d..8e9424c4997 100644
--- a/code/game/objects/items/weapons/twohanded.dm
+++ b/code/game/objects/items/weapons/twohanded.dm
@@ -82,13 +82,6 @@
user.put_in_inactive_hand(O)
return
-/obj/item/weapon/twohanded/mob_can_equip(mob/M, slot)
- //Cannot equip wielded items.
- if(wielded)
- to_chat(M, "Unwield the [name] first!")
- return 0
- return ..()
-
/obj/item/weapon/twohanded/dropped(mob/user)
..()
//handles unwielding a twohanded weapon when dropped as well as clearing up the offhand
@@ -108,6 +101,12 @@
else //Trying to wield it
wield(user)
+
+/obj/item/weapon/twohanded/equip_to_best_slot(mob/M)
+ if(..())
+ unwield(M)
+ return
+
///////////OFFHAND///////////////
/obj/item/weapon/twohanded/offhand
w_class = 5
@@ -130,8 +129,8 @@
return
/obj/item/weapon/twohanded/required/mob_can_equip(M as mob, slot)
- if(wielded)
- to_chat(M, "[src.name] is too cumbersome to carry with anything but your hands!")
+ if(wielded && !slot_flags)
+ to_chat(M, "[src] is too cumbersome to carry with anything but your hands!")
return 0
return ..()
@@ -140,12 +139,18 @@
if(get_dist(src,user) > 1)
return 0
if(H != null)
- to_chat(user, "[src.name] is too cumbersome to carry in one hand!")
+ to_chat(user, "[src] is too cumbersome to carry in one hand!")
return
- var/obj/item/weapon/twohanded/offhand/O = new(user)
- user.put_in_inactive_hand(O)
+ if(loc != user)
+ wield(user)
..()
- wielded = 1
+
+/obj/item/weapon/twohanded/required/equipped(mob/user, slot)
+ ..()
+ if(slot == slot_l_hand || slot == slot_r_hand)
+ wield(user)
+ else
+ unwield(user)
/*
* Fireaxe
diff --git a/code/modules/clothing/spacesuits/rig.dm b/code/modules/clothing/spacesuits/rig.dm
index 355b511c391..6fad0961ab4 100644
--- a/code/modules/clothing/spacesuits/rig.dm
+++ b/code/modules/clothing/spacesuits/rig.dm
@@ -30,6 +30,12 @@
"Vulpkanin" = 'icons/obj/clothing/species/vulpkanin/hats.dmi',
)
+/obj/item/clothing/head/helmet/space/rig/equip_to_best_slot(mob/M)
+ if(rig_restrict_helmet)
+ to_chat(M, "You must fasten the helmet to a hardsuit first. (Target the head and use on a hardsuit)") // Stop RIG helmet equipping
+ return 0
+ ..()
+
/obj/item/clothing/head/helmet/space/rig/attack_self(mob/user)
toggle_light(user)
diff --git a/code/modules/hydroponics/spreading/spreading_response.dm b/code/modules/hydroponics/spreading/spreading_response.dm
index 5de1ba34473..8145cb13ad4 100644
--- a/code/modules/hydroponics/spreading/spreading_response.dm
+++ b/code/modules/hydroponics/spreading/spreading_response.dm
@@ -7,7 +7,7 @@
if(!istype(M))
return
- if(!buckled_mob && !M.buckled && !M.anchored && (M.small || prob(round(seed.get_trait(TRAIT_POTENCY)/6))))
+ if(!buckled_mob && !M.buckled && !M.anchored && ((M.mob_size <= MOB_SIZE_SMALL) || prob(round(seed.get_trait(TRAIT_POTENCY)/6))))
//wait a tick for the Entered() proc that called HasProximity() to finish (and thus the moving animation),
//so we don't appear to teleport from two tiles away when moving into a turf adjacent to vines.
spawn(1)
diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm
index 2c71d1aebbd..c71c333258b 100644
--- a/code/modules/mining/equipment_locker.dm
+++ b/code/modules/mining/equipment_locker.dm
@@ -331,6 +331,7 @@
new /datum/data/mining_equipment("Drone Melee Upgrade", /obj/item/device/mine_bot_ugprade, 400),
new /datum/data/mining_equipment("Drone Health Upgrade",/obj/item/device/mine_bot_ugprade/health, 400),
new /datum/data/mining_equipment("Drone Ranged Upgrade",/obj/item/device/mine_bot_ugprade/cooldown, 600),
+ new /datum/data/mining_equipment("Kinetic Crusher", /obj/item/weapon/twohanded/required/mining_hammer, 750),
new /datum/data/mining_equipment("Drone AI Upgrade", /obj/item/slimepotion/sentience/mining, 1000),
new /datum/data/mining_equipment("GAR mesons", /obj/item/clothing/glasses/meson/gar, 500),
new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/weapon/storage/firstaid/brute, 600),
@@ -458,7 +459,7 @@
..()
/obj/machinery/mineral/equipment_vendor/proc/RedeemVoucher(obj/item/weapon/mining_voucher/voucher, mob/redeemer)
- var/selection = input(redeemer, "Pick your equipment", "Mining Voucher Redemption") as null|anything in list("Kinetic Accelerator", "Resonator", "Mining Drone", "Advanced Scanner")
+ var/selection = input(redeemer, "Pick your equipment", "Mining Voucher Redemption") as null|anything in list("Kinetic Accelerator", "Resonator", "Mining Drone", "Advanced Scanner", "Crusher")
if(!selection || !Adjacent(redeemer) || voucher.loc != redeemer)
return
switch(selection)
@@ -470,6 +471,8 @@
new /obj/item/weapon/storage/box/drone_kit(src.loc)
if("Advanced Scanner")
new /obj/item/device/t_scanner/adv_mining_scanner(src.loc)
+ if("Crusher")
+ new /obj/item/weapon/twohanded/required/mining_hammer(loc)
qdel(voucher)
/obj/machinery/mineral/equipment_vendor/ex_act(severity, target)
@@ -1108,3 +1111,104 @@
C.preserved = 1
to_chat(user, "You inject the hivelord core with the stabilizer. It will no longer go inert.")
qdel(src)
+
+/*********************Mining Hammer****************/
+/obj/item/weapon/twohanded/required/mining_hammer
+ icon = 'icons/obj/mining.dmi'
+ icon_state = "mining_hammer1"
+ item_state = "mining_hammer1"
+ name = "proto-kinetic crusher"
+ desc = "An early design of the proto-kinetic accelerator, it is little more than an combination of various mining tools cobbled together, forming a high-tech club.\
+ While it is an effective mining tool, it did little to aid any but the most skilled and/or suicidal miners against local fauna. \
+ \nMark a mob with the destabilizing force, then hit them in melee to activate it for extra damage. Extra damage if backstabbed in this fashion. \
+ This weapon is only particularly effective against large creatures."
+ force = 20 //As much as a bone spear, but this is significantly more annoying to carry around due to requiring the use of both hands at all times
+ w_class = 4
+ slot_flags = SLOT_BACK
+ force_unwielded = 20 //It's never not wielded so these are the same
+ force_wielded = 20
+ throwforce = 5
+ throw_speed = 4
+ light_range = 4
+ armour_penetration = 10
+ materials = list(MAT_METAL=1150, MAT_GLASS=2075)
+ hitsound = 'sound/weapons/bladeslice.ogg'
+ attack_verb = list("smashes", "crushes", "cleaves", "chops", "pulps")
+ sharp = 1
+ edge = 1
+ var/charged = 1
+ var/charge_time = 16
+ var/atom/mark = null
+ var/marked_image = null
+
+/obj/item/projectile/destabilizer
+ name = "destabilizing force"
+ icon_state = "pulse1"
+ damage = 0 //We're just here to mark people. This is still a melee weapon.
+ damage_type = BRUTE
+ flag = "bomb"
+ range = 6
+ var/obj/item/weapon/twohanded/required/mining_hammer/hammer_synced = null
+
+/obj/item/projectile/destabilizer/on_hit(atom/target, blocked = 0, hit_zone)
+ if(hammer_synced)
+ if(hammer_synced.mark == target)
+ return ..()
+ if(isliving(target))
+ if(hammer_synced.mark && hammer_synced.marked_image)
+ hammer_synced.mark.underlays -= hammer_synced.marked_image
+ hammer_synced.marked_image = null
+ var/mob/living/L = target
+ if(L.mob_size >= MOB_SIZE_LARGE)
+ hammer_synced.mark = L
+ var/image/I = image('icons/effects/effects.dmi', loc = L, icon_state = "shield2",pixel_y = (-L.pixel_y),pixel_x = (-L.pixel_x))
+ L.underlays += I
+ hammer_synced.marked_image = I
+ var/target_turf = get_turf(target)
+ if(istype(target_turf, /turf/simulated/mineral))
+ var/turf/simulated/mineral/M = target_turf
+ new /obj/effect/overlay/temp/kinetic_blast(M)
+ M.gets_drilled(firer)
+ ..()
+
+/obj/item/weapon/twohanded/required/mining_hammer/afterattack(atom/target, mob/user, proximity_flag)
+ if(!proximity_flag && charged)//Mark a target, or mine a tile.
+ var/turf/proj_turf = get_turf(src)
+ if(!istype(proj_turf, /turf))
+ return
+ var/datum/gas_mixture/environment = proj_turf.return_air()
+ var/pressure = environment.return_pressure()
+ if(pressure > 50)
+ playsound(user, 'sound/weapons/empty.ogg', 100, 1)
+ return
+ var/obj/item/projectile/destabilizer/D = new /obj/item/projectile/destabilizer(user.loc)
+ D.preparePixelProjectile(target,get_turf(target), user)
+ D.hammer_synced = src
+ playsound(user, 'sound/weapons/plasma_cutter.ogg', 100, 1)
+ D.fire()
+ charged = 0
+ icon_state = "mining_hammer1_uncharged"
+ spawn(charge_time)
+ Recharge()
+ return
+ if(proximity_flag && target == mark && isliving(target))
+ var/mob/living/L = target
+ new /obj/effect/overlay/temp/kinetic_blast(get_turf(L))
+ mark = 0
+ if(L.mob_size >= MOB_SIZE_LARGE)
+ L.underlays -= marked_image
+ qdel(marked_image)
+ marked_image = null
+ var/backstab = check_target_facings(user, L)
+ var/def_check = L.getarmor(type = "bomb")
+ if(backstab == FACING_INIT_FACING_TARGET_TARGET_FACING_PERPENDICULAR || backstab == FACING_SAME_DIR)
+ L.apply_damage(80, BRUTE, blocked = def_check)
+ playsound(user, 'sound/weapons/Kenetic_accel.ogg', 100, 1) //Seriously who spelled it wrong
+ else
+ L.apply_damage(50, BRUTE, blocked = def_check)
+
+/obj/item/weapon/twohanded/required/mining_hammer/proc/Recharge()
+ if(!charged)
+ charged = 1
+ icon_state = "mining_hammer1"
+ playsound(loc, 'sound/weapons/kenetic_reload.ogg', 60, 1)
\ No newline at end of file
diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm
index 9ebbb29ac02..5d746603418 100644
--- a/code/modules/mob/inventory.dm
+++ b/code/modules/mob/inventory.dm
@@ -161,6 +161,41 @@
return items
+/obj/item/proc/equip_to_best_slot(mob/M)
+ if(src != M.get_active_hand())
+ to_chat(M, "You are not holding anything to equip!")
+ return 0
+
+ if(M.equip_to_appropriate_slot(src))
+ if(M.hand)
+ M.update_inv_l_hand(0)
+ else
+ M.update_inv_r_hand(0)
+ return 1
+
+ if(M.s_active && M.s_active.can_be_inserted(src, 1)) //if storage active insert there
+ M.s_active.handle_item_insertion(src)
+ return 1
+
+ var/obj/item/weapon/storage/S = M.get_inactive_hand()
+ if(istype(S) && S.can_be_inserted(src, 1)) //see if we have box in other hand
+ S.handle_item_insertion(src)
+ return 1
+
+ S = M.get_item_by_slot(slot_belt)
+ if(istype(S) && S.can_be_inserted(src, 1)) //else we put in belt
+ S.handle_item_insertion(src)
+ return 1
+
+ S = M.get_item_by_slot(slot_back) //else we put in backpack
+ if(istype(S) && S.can_be_inserted(src, 1))
+ S.handle_item_insertion(src)
+ playsound(loc, "rustle", 50, 1, -5)
+ return 1
+
+ to_chat(M, "You are unable to equip that!")
+ return 0
+
/mob/proc/get_all_slots()
return list(wear_mask, back, l_hand, r_hand)
diff --git a/code/modules/mob/living/carbon/alien/humanoid/empress.dm b/code/modules/mob/living/carbon/alien/humanoid/empress.dm
index d2553c9a28f..b49bc8c1ad1 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/empress.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/empress.dm
@@ -5,6 +5,7 @@
health = 700
icon_state = "alienq_s"
status_flags = CANPARALYSE
+ mob_size = MOB_SIZE_LARGE
move_delay_add = 3
large = 1
ventcrawler = 0
diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm
index e2bf7ffd570..040646d66db 100644
--- a/code/modules/mob/living/carbon/alien/larva/larva.dm
+++ b/code/modules/mob/living/carbon/alien/larva/larva.dm
@@ -3,6 +3,7 @@
real_name = "alien larva"
icon_state = "larva0"
pass_flags = PASSTABLE | PASSMOB
+ mob_size = MOB_SIZE_SMALL
maxHealth = 30
health = 30
diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm
index 0264e874d17..0aa2daa0f4f 100644
--- a/code/modules/mob/living/carbon/human/inventory.dm
+++ b/code/modules/mob/living/carbon/human/inventory.dm
@@ -2,41 +2,9 @@
set name = "quick-equip"
set hidden = 1
- if(ishuman(src))
- var/mob/living/carbon/human/H = src
- var/obj/item/I = H.get_active_hand()
- var/obj/item/weapon/storage/S = H.get_inactive_hand()
- if(!I)
- to_chat(H, "You are not holding anything to equip.")
- return
-
- if(istype(I, /obj/item/clothing/head/helmet/space/rig)) // If the item to be equipped is a rigid suit helmet
- var/obj/item/clothing/head/helmet/space/rig/C = I
- if(C.rig_restrict_helmet)
- to_chat(src, "\red You must fasten the helmet to a hardsuit first. (Target the head and use on a hardsuit)")// Stop eva helms equipping.
-
- return 0
-
- if(H.equip_to_appropriate_slot(I))
- if(hand)
- update_inv_l_hand(0)
- else
- update_inv_r_hand(0)
- else if(s_active && s_active.can_be_inserted(I,1)) //if storage active insert there
- s_active.handle_item_insertion(I)
- else if(istype(S, /obj/item/weapon/storage) && S.can_be_inserted(I,1)) //see if we have box in other hand
- S.handle_item_insertion(I)
- else
- S = H.get_item_by_slot(slot_belt)
- if(istype(S, /obj/item/weapon/storage) && S.can_be_inserted(I,1)) //else we put in belt
- S.handle_item_insertion(I)
- else
- S = H.get_item_by_slot(slot_back) //else we put in backpack
- if(istype(S, /obj/item/weapon/storage) && S.can_be_inserted(I,1))
- S.handle_item_insertion(I)
- else
- to_chat(H, "\red You are unable to equip that.")
-
+ var/obj/item/I = get_active_hand()
+ if(I)
+ I.equip_to_best_slot(src)
/mob/living/carbon/human/proc/equip_in_one_of_slots(obj/item/W, list/slots, del_on_fail = 1)
for(var/slot in slots)
diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm
index 19dc6f99cd1..c142c8d28d1 100644
--- a/code/modules/mob/living/living_defines.dm
+++ b/code/modules/mob/living/living_defines.dm
@@ -34,6 +34,7 @@
var/implanting = 0 //Used for the mind-slave implant
var/silent = 0 //Can't talk. Value goes down every life proc. //NOTE TO FUTURE CODERS: DO NOT INITIALIZE NUMERICAL VARS AS NULL OR I WILL MURDER YOU.
var/floating = 0
+ var/mob_size = MOB_SIZE_HUMAN
var/nightvision = 0
var/bloodcrawl = 0 //0 No blood crawling, 1 blood crawling, 2 blood crawling+mob devour
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 5be1bcc458a..63e580fd483 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -41,6 +41,7 @@ var/list/ai_verbs_default = list(
anchored = 1 // -- TLE
density = 1
status_flags = CANSTUN|CANPARALYSE|CANPUSH
+ mob_size = MOB_SIZE_LARGE
can_strip = 0
var/list/network = list("SS13","Telecomms","Research Outpost","Mining Outpost")
var/obj/machinery/camera/current = null
diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm
index 90f39288736..7979ad150b4 100644
--- a/code/modules/mob/living/silicon/pai/pai.dm
+++ b/code/modules/mob/living/silicon/pai/pai.dm
@@ -5,7 +5,7 @@
robot_talk_understand = 0
emote_type = 2 // pAIs emotes are heard, not seen, so they can be seen through a container (eg. person)
- small = 1
+ mob_size = MOB_SIZE_TINY
pass_flags = PASSTABLE
density = 0
holder_type = /obj/item/weapon/holder/pai
diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm
index 1089e05862a..72fef576d73 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone.dm
@@ -16,6 +16,7 @@
local_transmit = 1
ventcrawler = 2
magpulse = 1
+ mob_size = MOB_SIZE_TINY
// We need to keep track of a few module items so we don't need to do list operations
// every time we need them. These get set in New() after the module is chosen.
diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
index 497393cf5d7..89e3b174377 100644
--- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
@@ -10,6 +10,7 @@
damage_coeff = list(BRUTE = 0.5, BURN = 0.7, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
environment_smash = 2 //Walls can't stop THE LAW
+ mob_size = MOB_SIZE_LARGE
radio_channel = "Security"
bot_type = SEC_BOT
diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm
index bb62af5ce35..0c751626380 100644
--- a/code/modules/mob/living/simple_animal/bot/mulebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm
@@ -20,7 +20,7 @@
damage_coeff = list(BRUTE = 0.5, BURN = 0.7, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
a_intent = "harm" //No swapping
buckle_lying = 0
-
+ mob_size = MOB_SIZE_LARGE
radio_channel = "Supply"
bot_type = MULE_BOT
diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm
index 1d5b4da0e83..fdad2a9e37b 100644
--- a/code/modules/mob/living/simple_animal/constructs.dm
+++ b/code/modules/mob/living/simple_animal/constructs.dm
@@ -91,6 +91,7 @@
environment_smash = 2
attack_sound = 'sound/weapons/punch3.ogg'
status_flags = 0
+ mob_size = MOB_SIZE_LARGE
construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/lesserforcewall)
force_threshold = 11
diff --git a/code/modules/mob/living/simple_animal/friendly/butterfly.dm b/code/modules/mob/living/simple_animal/friendly/butterfly.dm
index 60aad72ab36..0761fbeefa8 100644
--- a/code/modules/mob/living/simple_animal/friendly/butterfly.dm
+++ b/code/modules/mob/living/simple_animal/friendly/butterfly.dm
@@ -17,6 +17,7 @@
density = 0
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
ventcrawler = 2
+ mob_size = MOB_SIZE_TINY
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat = 0)
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm
index 9c174527e8a..95a1d100161 100644
--- a/code/modules/mob/living/simple_animal/friendly/cat.dm
+++ b/code/modules/mob/living/simple_animal/friendly/cat.dm
@@ -14,6 +14,7 @@
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
+ mob_size = MOB_SIZE_SMALL
simplespecies = /mob/living/simple_animal/pet/cat
childtype = /mob/living/simple_animal/pet/cat/kitten
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat = 3)
diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm
index 85eb7d10f4c..9eebdd22ccf 100644
--- a/code/modules/mob/living/simple_animal/friendly/corgi.dm
+++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm
@@ -542,6 +542,7 @@
shaved = 0
density = 0
pass_flags = PASSMOB
+ mob_size = MOB_SIZE_SMALL
//puppies cannot wear anything.
/mob/living/simple_animal/pet/corgi/puppy/Topic(href, href_list)
diff --git a/code/modules/mob/living/simple_animal/friendly/crab.dm b/code/modules/mob/living/simple_animal/friendly/crab.dm
index 5d409814940..7a81f52e2b7 100644
--- a/code/modules/mob/living/simple_animal/friendly/crab.dm
+++ b/code/modules/mob/living/simple_animal/friendly/crab.dm
@@ -5,7 +5,6 @@
icon_state = "crab"
icon_living = "crab"
icon_dead = "crab_dead"
- small = 1
speak_emote = list("clicks")
emote_hear = list("clicks")
emote_see = list("clacks")
diff --git a/code/modules/mob/living/simple_animal/friendly/diona.dm b/code/modules/mob/living/simple_animal/friendly/diona.dm
index 8bb2ea57f85..3161399a66e 100644
--- a/code/modules/mob/living/simple_animal/friendly/diona.dm
+++ b/code/modules/mob/living/simple_animal/friendly/diona.dm
@@ -11,7 +11,7 @@
icon_dead = "nymph_dead"
icon_resting = "nymph_sleep"
pass_flags = PASSTABLE | PASSMOB
- small = 1
+ mob_size = MOB_SIZE_SMALL
ventcrawler = 2
maxHealth = 50
diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
index 7dd9a50c828..04506c819c8 100644
--- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
+++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
@@ -179,7 +179,7 @@
ventcrawler = 2
var/amount_grown = 0
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
- small = 1
+ mob_size = MOB_SIZE_TINY
can_hide = 1
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
@@ -225,7 +225,7 @@ var/global/chicken_count = 0
var/eggsleft = 0
var/chicken_color
pass_flags = PASSTABLE | PASSMOB
- small = 1
+ mob_size = MOB_SIZE_SMALL
can_hide = 1
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
diff --git a/code/modules/mob/living/simple_animal/friendly/lizard.dm b/code/modules/mob/living/simple_animal/friendly/lizard.dm
index b5c0ccedeae..ead59fa32d7 100644
--- a/code/modules/mob/living/simple_animal/friendly/lizard.dm
+++ b/code/modules/mob/living/simple_animal/friendly/lizard.dm
@@ -5,7 +5,6 @@
icon_state = "lizard"
icon_living = "lizard"
icon_dead = "lizard-dead"
- small = 1
speak_emote = list("hisses")
health = 5
maxHealth = 5
@@ -19,6 +18,7 @@
ventcrawler = 2
density = 0
pass_flags = PASSTABLE | PASSMOB
+ mob_size = MOB_SIZE_SMALL
can_hide = 1
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat = 1)
can_collar = 1
diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm
index 4d499e9f54f..0b0a182ed44 100644
--- a/code/modules/mob/living/simple_animal/friendly/mouse.dm
+++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm
@@ -9,7 +9,6 @@
speak_emote = list("squeeks","squeeks","squiks")
emote_hear = list("squeeks","squeaks","squiks")
emote_see = list("runs in a circle", "shakes", "scritches at something")
- small = 1
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
@@ -22,6 +21,7 @@
density = 0
ventcrawler = 2
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
+ mob_size = MOB_SIZE_TINY
var/mouse_color //brown, gray and white, leave blank for random
layer = MOB_LAYER
atmos_requirements = list("min_oxy" = 16, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0)
diff --git a/code/modules/mob/living/simple_animal/friendly/pet.dm b/code/modules/mob/living/simple_animal/friendly/pet.dm
index 30f55a2220f..2d7bc63dc75 100644
--- a/code/modules/mob/living/simple_animal/friendly/pet.dm
+++ b/code/modules/mob/living/simple_animal/friendly/pet.dm
@@ -1,6 +1,7 @@
/mob/living/simple_animal/pet
icon = 'icons/mob/pets.dmi'
can_collar = 1
+ mob_size = MOB_SIZE_SMALL
/mob/living/simple_animal/pet/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/weapon/newspaper))
diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm
index b453cfa5ea2..38eea833e04 100644
--- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm
+++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm
@@ -36,7 +36,7 @@
var/syndie = 0 //IS WE SYNDICAT? (currently unused)
speed = -1 //Spiderbots gotta go fast.
//pass_flags = PASSTABLE //Maybe griefy?
- small = 1
+ mob_size = MOB_SIZE_SMALL
speak_emote = list("beeps","clicks","chirps")
can_hide = 1
ventcrawler = 2
diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm
index 6cd1d147211..85e0cba9073 100644
--- a/code/modules/mob/living/simple_animal/hostile/alien.dm
+++ b/code/modules/mob/living/simple_animal/hostile/alien.dm
@@ -129,6 +129,7 @@
move_to_delay = 4
maxHealth = 400
health = 400
+ mob_size = MOB_SIZE_LARGE
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
/obj/item/projectile/neurotox
diff --git a/code/modules/mob/living/simple_animal/hostile/bat.dm b/code/modules/mob/living/simple_animal/hostile/bat.dm
index bbdf639c0f4..fdbabe2c4b7 100644
--- a/code/modules/mob/living/simple_animal/hostile/bat.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bat.dm
@@ -15,7 +15,7 @@
speed = 4
maxHealth = 20
health = 20
-
+ mob_size = MOB_SIZE_TINY
harm_intent_damage = 8
melee_damage_lower = 10
melee_damage_upper = 10
diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm
index 4899eef3aaf..8c927eaefbd 100644
--- a/code/modules/mob/living/simple_animal/hostile/bees.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bees.dm
@@ -34,7 +34,7 @@
flying = 1
search_objects = 1 //have to find those plant trays!
density = 0
- small = 1
+ mob_size = MOB_SIZE_TINY
//Spaceborn beings don't get hurt by space
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm
index b7fbbec41fb..2d0dd7a2380 100644
--- a/code/modules/mob/living/simple_animal/hostile/carp.dm
+++ b/code/modules/mob/living/simple_animal/hostile/carp.dm
@@ -69,6 +69,7 @@
maxHealth = 65
health = 65
pixel_x = -16
+ mob_size = MOB_SIZE_LARGE
melee_damage_lower = 20
melee_damage_upper = 20
\ No newline at end of file
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
index 9433f4923af..19aef73d79c 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
@@ -15,6 +15,7 @@
var/icon_aggro = null // for swapping to when we get aggressive
see_in_dark = 8
see_invisible = SEE_INVISIBLE_MINIMUM
+ mob_size = MOB_SIZE_LARGE
/mob/living/simple_animal/hostile/asteroid/Aggro()
..()
diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm
index 145b908ec56..be2cfff6f0c 100644
--- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm
+++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm
@@ -118,6 +118,7 @@
faction = list("syndicate")
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
+ mob_size = MOB_SIZE_TINY
flying = 1
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
del_on_death = 1
diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm
index 9d22827a292..508e2934cf6 100644
--- a/code/modules/mob/living/simple_animal/hostile/tree.dm
+++ b/code/modules/mob/living/simple_animal/hostile/tree.dm
@@ -14,6 +14,7 @@
speed = 1
maxHealth = 250
health = 250
+ mob_size = MOB_SIZE_LARGE
pixel_x = -16
diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm
index 1266b31f746..026323640d8 100644
--- a/code/modules/mob/living/simple_animal/parrot.dm
+++ b/code/modules/mob/living/simple_animal/parrot.dm
@@ -33,7 +33,6 @@
icon_living = "parrot_fly"
icon_dead = "parrot_dead"
pass_flags = PASSTABLE
- small = 1
can_collar = 1
var/list/clean_speak = list(
@@ -54,6 +53,7 @@
response_harm = "swats the"
stop_automated_movement = 1
universal_speak = 1
+ mob_size = MOB_SIZE_SMALL
var/parrot_state = PARROT_WANDER //Hunt for a perch when created
var/parrot_sleep_max = 25 //The time the parrot sits while perched before looking around. Mosly a way to avoid the parrot's AI in process_ai() being run every single tick.
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 4ebf599a189..fdc03716bbf 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -866,7 +866,10 @@ var/list/slot_equipment_priority = list( \
/mob/MouseDrop(mob/M as mob)
..()
if(M != usr) return
- if(M.small) return // Stops pAI drones and small mobs (borers, parrots, crabs) from stripping people. --DZD
+ if(isliving(M)) // Ewww
+ var/mob/living/L = M
+ if(L.mob_size <= MOB_SIZE_SMALL)
+ return // Stops pAI drones and small mobs (borers, parrots, crabs) from stripping people. --DZD
if(!M.can_strip) return
if(usr == src) return
if(!Adjacent(usr)) return
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 8b2888852e5..f7bd04906ea 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -63,7 +63,6 @@
var/canmove = 1
var/lastpuke = 0
var/unacidable = 0
- var/small = 0
var/can_strip = 1
var/list/pinned = list() //List of things pinning this creature to walls (see living_defense.dm)
var/list/embedded = list() //Embedded items, since simple mobs don't have organs.
diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm
index 3451f7fbe08..3ca6c591705 100644
--- a/code/modules/shuttle/supply.dm
+++ b/code/modules/shuttle/supply.dm
@@ -824,7 +824,7 @@
return 1
var/mob/living/M = caller
- if(!M.ventcrawler && !M.small)
+ if(!M.ventcrawler && M.mob_size > MOB_SIZE_SMALL)
return 0
return 1
diff --git a/icons/mob/back.dmi b/icons/mob/back.dmi
index a4cd1d997a8..4c7a3707efd 100644
Binary files a/icons/mob/back.dmi and b/icons/mob/back.dmi differ
diff --git a/icons/mob/inhands/items_lefthand.dmi b/icons/mob/inhands/items_lefthand.dmi
index bb624309542..b02e2563aa4 100644
Binary files a/icons/mob/inhands/items_lefthand.dmi and b/icons/mob/inhands/items_lefthand.dmi differ
diff --git a/icons/mob/inhands/items_righthand.dmi b/icons/mob/inhands/items_righthand.dmi
index f4f7455ebd2..59531a73db9 100644
Binary files a/icons/mob/inhands/items_righthand.dmi and b/icons/mob/inhands/items_righthand.dmi differ
diff --git a/icons/obj/mining.dmi b/icons/obj/mining.dmi
index abd43759c94..c39dbef36a8 100644
Binary files a/icons/obj/mining.dmi and b/icons/obj/mining.dmi differ