mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-12 16:38:18 +01:00
Merge pull request #373 from Dahlular/holdershit
Held Mobs Have Item Sizes Respective to Size Multiplier
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
icon = null
|
||||
icon_state = ""
|
||||
slot_flags = ITEM_SLOT_FEET | ITEM_SLOT_HEAD | ITEM_SLOT_ID | ITEM_SLOT_BACK | ITEM_SLOT_NECK
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
w_class = null //handled by their size
|
||||
can_head = TRUE
|
||||
|
||||
/obj/item/clothing/head/mob_holder/micro/Initialize(mapload, mob/living/M, _worn_state, alt_worn, lh_icon, rh_icon, _can_head_override = FALSE)
|
||||
@@ -39,6 +39,8 @@
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
if(MOB_SIZE_SMALL)
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
if(MOB_SIZE_HUMAN)
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
if(MOB_SIZE_LARGE)
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
|
||||
@@ -76,7 +78,6 @@
|
||||
var/obj/item/clothing/head/mob_holder/micro/holder = generate_mob_holder()
|
||||
if(!holder)
|
||||
return
|
||||
drop_all_held_items()
|
||||
L.equip_to_slot(holder, SLOT_SHOES)
|
||||
return
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ var/const/RESIZE_A_TINYMICRO = (RESIZE_TINY + RESIZE_MICRO) / 2
|
||||
M.Scale(size_multiplier)
|
||||
M.Translate(0, 16*(size_multiplier-1)) //translate by 16 * size_multiplier - 1 on Y axis
|
||||
src.transform = M //the source of transform is M
|
||||
src.update_mobsize() //Doesn't work yet
|
||||
|
||||
/mob/proc/get_effective_size()
|
||||
return 100000
|
||||
@@ -38,6 +37,7 @@ mob/living/get_effective_size()
|
||||
if(size_multiplier == previous_size)
|
||||
return 1
|
||||
src.update_transform() //WORK DAMN YOU
|
||||
src.update_mobsize() //Doesn't work yet
|
||||
//Going to change the health and speed values too
|
||||
src.remove_movespeed_modifier(MOVESPEED_ID_SIZE)
|
||||
src.add_movespeed_modifier(MOVESPEED_ID_SIZE, multiplicative_slowdown = (abs(size_multiplier - 1) * 0.8 ))
|
||||
@@ -191,13 +191,15 @@ mob/living/get_effective_size()
|
||||
tmob.adjustBruteLoss(B) //final result in brute loss
|
||||
|
||||
//Proc for changing mob_size to be grabbed for item weight classes
|
||||
/mob/living/proc/update_mobsize()
|
||||
/mob/living/proc/update_mobsize(var/mob/living/tmob)
|
||||
if(size_multiplier <= 0.50)
|
||||
mob_size = MOB_SIZE_TINY
|
||||
if(size_multiplier <= 1)
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
if(size_multiplier >= 2)
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
mob_size = 0
|
||||
if(size_multiplier < 1)
|
||||
mob_size = 1
|
||||
if(size_multiplier == 1)
|
||||
mob_size = 2 //the default human size
|
||||
if(size_multiplier > 1)
|
||||
mob_size = 3
|
||||
|
||||
//Proc for instantly grabbing valid size difference. Code optimizations soon(TM)
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user