mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Pulling & Size Fixes
Fixes inability for mobs to pull certain structures like mining crates. Fixes w_class numbers I missed.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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 << "<span class='warning'>You MUST put the paper on a table!</span>"
|
||||
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)
|
||||
|
||||
@@ -193,7 +193,7 @@ LINEN BINS
|
||||
sheets.Add(I)
|
||||
amount++
|
||||
user << "<span class='notice'>You put [I] in [src].</span>"
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -461,7 +461,7 @@
|
||||
if (stat & MAINT)
|
||||
user << "<span class='warning'>There is no connector for your power cell.</span>"
|
||||
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("<span class='danger'>The APC cover was knocked down with the [W.name] by [user.name]!</span>", \
|
||||
|
||||
@@ -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 << "<span class='notice'>You begin to shorten the barrel and stock of \the [src].</span>"
|
||||
if(loaded.len)
|
||||
afterattack(user, user) //will this work? //it will. we call it twice, for twice the FUN
|
||||
|
||||
Reference in New Issue
Block a user