diff --git a/code/game/machinery/computer3/laptop.dm b/code/game/machinery/computer3/laptop.dm index e093f4d5f6c..1b0e4131650 100644 --- a/code/game/machinery/computer3/laptop.dm +++ b/code/game/machinery/computer3/laptop.dm @@ -24,7 +24,7 @@ icon_state = "laptop-closed" pixel_x = 2 pixel_y = -3 - w_class = 3 + w_class = ITEMSIZE_NORMAL var/obj/machinery/computer3/laptop/stored_computer = null diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 6703be9d756..467e64af792 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -321,7 +321,7 @@ var/list/global/slot_flags_enumeration = list( switch(slot) if(slot_l_ear, slot_r_ear) var/slot_other_ear = (slot == slot_l_ear)? slot_r_ear : slot_l_ear - if( (w_class > 1) && !(slot_flags & SLOT_EARS) ) + if( (w_class > ITEMSIZE_TINY) && !(slot_flags & SLOT_EARS) ) return 0 if( (slot_flags & SLOT_TWOEARS) && H.get_equipped_item(slot_other_ear) ) return 0 @@ -337,7 +337,7 @@ var/list/global/slot_flags_enumeration = list( return 0 if(slot_flags & SLOT_DENYPOCKET) return 0 - if( w_class > 2 && !(slot_flags & SLOT_POCKET) ) + if( w_class > ITEMSIZE_SMALL && !(slot_flags & SLOT_POCKET) ) return 0 if(slot_s_store) if(!H.wear_suit && (slot_wear_suit in mob_equip)) diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index 94775ceb366..6f8e1782eb2 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -18,7 +18,7 @@ ..() pixel_x = rand(-10,10) pixel_y = rand(-10,10) - if(w_class > 0 && w_class < 4) + if(w_class > 0 && w_class < ITEMSIZE_LARGE) icon_state = "gift[w_class]" else icon_state = "gift[pick(1, 2, 3)]" @@ -128,7 +128,7 @@ ..() if (!( locate(/obj/structure/table, src.loc) )) user << "You MUST put the paper on a table!" - if (W.w_class < 4) + if (W.w_class < ITEMSIZE_LARGE) if (user.get_type_in_hands(/obj/item/weapon/wirecutters)) var/a_used = 2 ** (src.w_class - 1) if (src.amount < a_used) diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 397bf926612..5c3542015c5 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -193,7 +193,7 @@ LINEN BINS sheets.Add(I) amount++ user << "You put [I] in [src]." - else if(amount && !hidden && I.w_class < 4) //make sure there's sheets to hide it among, make sure nothing else is hidden in there. + else if(amount && !hidden && I.w_class < ITEMSIZE_LARGE) //make sure there's sheets to hide it among, make sure nothing else is hidden in there. user.drop_item() I.loc = src hidden = I diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index 859c63261d7..911891a7d41 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -170,7 +170,7 @@ /obj/item/weapon/book/attackby(obj/item/weapon/W as obj, mob/user as mob) if(carved) if(!store) - if(W.w_class < 3) + if(W.w_class < ITEMSIZE_LARGE) user.drop_item() W.loc = src store = W diff --git a/code/modules/mob/living/carbon/alien/diona/diona.dm b/code/modules/mob/living/carbon/alien/diona/diona.dm index 8a487d57b35..74923ae59a4 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona.dm @@ -10,7 +10,7 @@ universal_understand = 1 universal_speak = 0 // Dionaea do not need to speak to people other than other dionaea. - can_pull_size = 2 + can_pull_size = ITEMSIZE_SMALL can_pull_mobs = MOB_PULL_SMALLER holder_type = /obj/item/weapon/holder/diona diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index bd757f9ab69..57a9dd837bd 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -7,7 +7,7 @@ pass_flags = 1 mob_size = MOB_SMALL - can_pull_size = 2 + can_pull_size = ITEMSIZE_SMALL can_pull_mobs = MOB_PULL_SMALLER idcard_type = /obj/item/weapon/card/id diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 89f7942cc45..dbe09db217c 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -37,7 +37,7 @@ var/list/mob_hat_cache = list() integrated_light_power = 3 local_transmit = 1 - can_pull_size = 3 + can_pull_size = ITEMSIZE_NORMAL can_pull_mobs = MOB_PULL_SMALLER mob_bump_flag = SIMPLE_ANIMAL @@ -69,7 +69,7 @@ var/list/mob_hat_cache = list() module_type = /obj/item/weapon/robot_module/drone/construction hat_x_offset = 1 hat_y_offset = -12 - can_pull_size = 5 + can_pull_size = ITEMSIZE_HUGE can_pull_mobs = MOB_PULL_SAME /mob/living/silicon/robot/drone/New() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index fc7d4cf8adf..2e666cff995 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -549,8 +549,8 @@ user << "Close the panel first." else if(cell) user << "There is a power cell already installed." - else if(W.w_class != 3) - user << "\The [W] is too [W.w_class < 3? "small" : "large"] to fit here." + else if(W.w_class != ITEMSIZE_NORMAL) + user << "\The [W] is too [W.w_class < ITEMSIZE_NORMAL ? "small" : "large"] to fit here." else user.drop_item() W.loc = src diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index fa2d85d5bb4..cd545e0a87d 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -31,7 +31,7 @@ holder_type = /obj/item/weapon/holder/mouse mob_size = MOB_MINISCULE - can_pull_size = 1 + can_pull_size = ITEMSIZE_TINY can_pull_mobs = MOB_PULL_NONE /mob/living/simple_animal/mouse/Life() diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index cffa215a002..fadfafc4585 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -255,7 +255,7 @@ var/list/items = list() for(var/obj/item/I in view(1,src)) - if(I.loc != src && I.w_class <= 2 && I.Adjacent(src) ) + if(I.loc != src && I.w_class <= ITEMSIZE_SMALL && I.Adjacent(src) ) items.Add(I) var/obj/selection = input("Select an item.", "Pickup") in items diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 1e6752ab77b..36a1ac186ab 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -515,12 +515,12 @@ if(istype(AM, /obj/item)) var/obj/item/I = AM - if(I.w_class < 2) + if(I.w_class < ITEMSIZE_SMALL) return I if(iscarbon(AM)) var/mob/living/carbon/C = AM - if((C.l_hand && C.l_hand.w_class <= 2) || (C.r_hand && C.r_hand.w_class <= 2)) + if((C.l_hand && C.l_hand.w_class <= ITEMSIZE_SMALL) || (C.r_hand && C.r_hand.w_class <= ITEMSIZE_SMALL)) return C return null @@ -544,12 +544,12 @@ if(istype(AM, /obj/item)) var/obj/item/I = AM - if(I.w_class <= 2) + if(I.w_class <= ITEMSIZE_SMALL) return I if(iscarbon(AM)) var/mob/living/carbon/C = AM - if(C.l_hand && C.l_hand.w_class <= 2 || C.r_hand && C.r_hand.w_class <= 2) + if(C.l_hand && C.l_hand.w_class <= ITEMSIZE_SMALL || C.r_hand && C.r_hand.w_class <= ITEMSIZE_SMALL) return C return null @@ -571,7 +571,7 @@ for(var/obj/item/I in view(1,src)) //Make sure we're not already holding it and it's small enough - if(I.loc != src && I.w_class <= 2) + if(I.loc != src && I.w_class <= ITEMSIZE_SMALL) //If we have a perch and the item is sitting on it, continue if(!client && parrot_perch && I.loc == parrot_perch.loc) @@ -600,10 +600,10 @@ var/obj/item/stolen_item = null for(var/mob/living/carbon/C in view(1,src)) - if(C.l_hand && C.l_hand.w_class <= 2) + if(C.l_hand && C.l_hand.w_class <= ITEMSIZE_SMALL) stolen_item = C.l_hand - if(C.r_hand && C.r_hand.w_class <= 2) + if(C.r_hand && C.r_hand.w_class <= ITEMSIZE_SMALL) stolen_item = C.r_hand if(stolen_item) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index ce79b499042..47bbdcd3a63 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -139,7 +139,7 @@ var/const/deafness = 2//Carbon var/const/muteness = 4//Carbon - var/can_pull_size = 10 // Maximum w_class the mob can pull. + var/can_pull_size = ITEMSIZE_NO_CONTAINER // Maximum w_class the mob can pull. var/can_pull_mobs = MOB_PULL_LARGER // Whether or not the mob can pull other mobs. var/datum/dna/dna = null//Carbon diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 49917d8a234..d7a695baf44 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -877,7 +877,7 @@ Note that amputating the affected organ does in fact remove the infection from t if(DROPLIMB_BURN) new /obj/effect/decal/cleanable/ash(get_turf(victim)) for(var/obj/item/I in src) - if(I.w_class > 2 && !istype(I,/obj/item/organ)) + if(I.w_class > ITEMSIZE_SMALL && !istype(I,/obj/item/organ)) I.loc = get_turf(src) qdel(src) if(DROPLIMB_BLUNT) @@ -899,7 +899,7 @@ Note that amputating the affected organ does in fact remove the infection from t I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30) for(var/obj/item/I in src) - if(I.w_class <= 2) + if(I.w_class <= ITEMSIZE_SMALL) qdel(I) continue I.loc = get_turf(src) @@ -1144,7 +1144,7 @@ Note that amputating the affected organ does in fact remove the infection from t for(var/atom/movable/implant in implants) //large items and non-item objs fall to the floor, everything else stays var/obj/item/I = implant - if(istype(I) && I.w_class < 3) + if(istype(I) && I.w_class < ITEMSIZE_NORMAL) implant.loc = get_turf(victim.loc) else implant.loc = src diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 49b72f4944a..8096e1f20ee 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -461,7 +461,7 @@ if (stat & MAINT) user << "There is no connector for your power cell." return - if(W.w_class != 3) + if(W.w_class != ITEMSIZE_NORMAL) user << "\The [W] is too [W.w_class < 3? "small" : "large"] to fit here." return @@ -631,7 +631,7 @@ if (((stat & BROKEN) || hacker) \ && !opened \ && W.force >= 5 \ - && W.w_class >= 3.0 \ + && W.w_class >= ITEMSIZE_NORMAL \ && prob(20) ) opened = 2 user.visible_message("The APC cover was knocked down with the [W.name] by [user.name]!", \ diff --git a/code/modules/projectiles/guns/projectile/boltaction.dm b/code/modules/projectiles/guns/projectile/boltaction.dm index 3ff12364efb..c6e25ca7676 100644 --- a/code/modules/projectiles/guns/projectile/boltaction.dm +++ b/code/modules/projectiles/guns/projectile/boltaction.dm @@ -30,7 +30,7 @@ // Stole hacky terrible code from doublebarrel shotgun. -Spades /obj/item/weapon/gun/projectile/shotgun/pump/rifle/mosin/attackby(var/obj/item/A as obj, mob/user as mob) - if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/pickaxe/plasmacutter) && w_class != 3) + if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/pickaxe/plasmacutter) && w_class != ITEMSIZE_NORMAL) user << "You begin to shorten the barrel and stock of \the [src]." if(loaded.len) afterattack(user, user) //will this work? //it will. we call it twice, for twice the FUN