From 8814c2f529c69718d371066648f6a6f3867e6bea Mon Sep 17 00:00:00 2001 From: RavingManiac Date: Thu, 23 Aug 2012 01:45:46 +0800 Subject: [PATCH 1/6] Mice are now able to pass under tables. All I had to do was copy one line over from the monkey code. Why was this so hard. --- code/modules/mob/simple_animal/mouse.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/mob/simple_animal/mouse.dm b/code/modules/mob/simple_animal/mouse.dm index 203b4481ae9..5c43961fea7 100644 --- a/code/modules/mob/simple_animal/mouse.dm +++ b/code/modules/mob/simple_animal/mouse.dm @@ -24,6 +24,7 @@ min_oxy = 16 //Require atleast 16kPA oxygen minbodytemp = 223 //Below -50 Degrees Celcius maxbodytemp = 323 //Above 50 Degrees Celcius + pass_flags = PASSTABLE /mob/living/simple_animal/mouse/Life() ..() From e558f1f0f148a473ce1ba4d9f938593ca7439873 Mon Sep 17 00:00:00 2001 From: RavingManiac Date: Wed, 3 Oct 2012 23:03:17 +0800 Subject: [PATCH 2/6] Makes the sprite of a mob bob up and down while it is in space, unless it is wearing magboots. --- code/modules/mob/mob.dm | 26 ++++++++++++++++++++++++++ code/modules/mob/mob_defines.dm | 2 ++ code/modules/mob/mob_movement.dm | 6 ++++++ 3 files changed, 34 insertions(+) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index f236e08a48b..9cdd4bec893 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -649,6 +649,9 @@ note dizziness decrements automatically in the mob's Life() proc. // Typo from the oriignal coder here, below lies the jitteriness process. So make of his code what you will, the previous comment here was just a copypaste of the above. /mob/proc/jittery_process() + + if (is_floaty) return + var/old_x = pixel_x var/old_y = pixel_y is_jittery = 1 @@ -667,6 +670,29 @@ note dizziness decrements automatically in the mob's Life() proc. pixel_x = old_x pixel_y = old_y +//Floaty - Makes the mob sprite bob up and down. Also a copypaste of dizziness + +/mob/proc/make_floaty() + if(floatiness && !is_floaty) + spawn(0) + floaty_process() + +/mob/proc/floaty_process() + + if (is_jittery) return + + var/old_x = pixel_x + var/old_y = pixel_y + is_floaty = 1 + while(floatiness) + pixel_y = 3 * cos(7 * world.time) //May need some tweaking + + sleep(1) + //endwhile - reset the pixel offsets to zero + is_floaty = 0 + pixel_x = old_x + pixel_y = old_y + /mob/Stat() ..() diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index be8d9c066cd..71217a2fdf3 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -94,6 +94,8 @@ var/dizziness = 0//Carbon var/is_dizzy = 0 var/is_jittery = 0 + var/is_floaty = 0 + var/floatiness = 0 var/jitteriness = 0//Carbon var/charges = 0.0 var/nutrition = 400.0//Carbon diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 8c79d4db9ce..c5d2b8527c3 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -314,6 +314,8 @@ if((istype(mob.loc, /turf/space)) || (mob.lastarea.has_gravity == 0)) if(!mob.Process_Spacemove(0)) return 0 + else + mob.floatiness = 0 if(isobj(mob.loc) || ismob(mob.loc))//Inside an object, tell it we moved @@ -516,6 +518,10 @@ dense_object++ break + //Makes the mob floaty + src.floatiness = 1 + src.make_floaty() + if(!dense_object && (locate(/obj/structure/lattice) in oview(1, src))) dense_object++ From e01af8a111f277245cad14ae959120235235e953 Mon Sep 17 00:00:00 2001 From: RavingManiac Date: Wed, 3 Oct 2012 23:30:17 +0800 Subject: [PATCH 3/6] reverted mice --- code/modules/mob/simple_animal/mouse.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/mob/simple_animal/mouse.dm b/code/modules/mob/simple_animal/mouse.dm index 5c43961fea7..203b4481ae9 100644 --- a/code/modules/mob/simple_animal/mouse.dm +++ b/code/modules/mob/simple_animal/mouse.dm @@ -24,7 +24,6 @@ min_oxy = 16 //Require atleast 16kPA oxygen minbodytemp = 223 //Below -50 Degrees Celcius maxbodytemp = 323 //Above 50 Degrees Celcius - pass_flags = PASSTABLE /mob/living/simple_animal/mouse/Life() ..() From 6ce738b7161b226c51179c6f4c4021e5b8b8a8c0 Mon Sep 17 00:00:00 2001 From: RavingManiac Date: Mon, 19 Nov 2012 00:30:11 +0800 Subject: [PATCH 4/6] Wrapping paper can now wrap storage containers (e.g. backpacks, boxes, pill bottles). Packages now have the same w_class as the item wrapped inside, and the sprite of the package will also vary according to the w_class. --- code/modules/recycling/sortingmachinery.dm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index e1ee757c126..475319ffb8a 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -84,7 +84,7 @@ name = "package wrapper" icon = 'icons/obj/items.dmi' icon_state = "deliveryPaper" - w_class = 3.0 + w_class = 5.0 //to prevent issues with the package wrapper being put inside the container it is wrapping var/amount = 25.0 @@ -102,13 +102,24 @@ user.attack_log += text("\[[time_stamp()]\] Has used [src.name] on \ref[target]") - if (istype(target, /obj/item) && !(istype(target, /obj/item/weapon/storage))) + if (istype(target, /obj/item)) var/obj/item/O = target if (src.amount > 1) var/obj/item/smallDelivery/P = new /obj/item/smallDelivery(get_turf(O.loc)) //Aaannd wrap it up! if(!istype(O.loc, /turf)) if(user.client) user.client.screen -= O + P.w_class = O.w_class + if(P.w_class <= 1.0) + P.icon_state = "deliverycrate1" + else if (P.w_class <= 2.0) + P.icon_state = "deliverycrate2" + else if (P.w_class <= 3.0) + P.icon_state = "deliverycrate3" + else if (P.w_class <= 4.0) + P.icon_state = "deliverycrate4" + else + P.icon_state = "deliverycrate5" P.wrapped = O O.loc = P P.add_fingerprint(usr) From e31e1173153a5a9fef7b585f541077d8df9b6e34 Mon Sep 17 00:00:00 2001 From: RavingManiac Date: Wed, 21 Nov 2012 00:48:03 +0800 Subject: [PATCH 5/6] Package wrappers can now be put inside backpacks or other storage containers if the container is being held or worn. --- code/game/objects/items/weapons/storage/storage.dm | 3 +++ code/modules/recycling/sortingmachinery.dm | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 0fbebfdcbee..739a5e16871 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -289,6 +289,9 @@ W.dropped(user) user << "\red God damnit!" + if(istype(W, /obj/item/weapon/packageWrap) && !(src in user)) //prevents package wrap being put inside the backpack when the backpack is not being worn/held (hence being wrappable) + return + handle_item_insertion(W) return diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 475319ffb8a..f1a5d661bc0 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -84,7 +84,7 @@ name = "package wrapper" icon = 'icons/obj/items.dmi' icon_state = "deliveryPaper" - w_class = 5.0 //to prevent issues with the package wrapper being put inside the container it is wrapping + w_class = 3.0 var/amount = 25.0 @@ -116,10 +116,8 @@ P.icon_state = "deliverycrate2" else if (P.w_class <= 3.0) P.icon_state = "deliverycrate3" - else if (P.w_class <= 4.0) - P.icon_state = "deliverycrate4" else - P.icon_state = "deliverycrate5" + P.icon_state = "deliverycrate4" P.wrapped = O O.loc = P P.add_fingerprint(usr) From e252c47a517fb334e2f8c335aa4702c3f5a99993 Mon Sep 17 00:00:00 2001 From: RavingManiac Date: Fri, 23 Nov 2012 02:02:45 +0800 Subject: [PATCH 6/6] removes the floating code --- code/modules/mob/mob.dm | 28 +--------------------------- code/modules/mob/mob_defines.dm | 4 +--- code/modules/mob/mob_movement.dm | 6 ------ 3 files changed, 2 insertions(+), 36 deletions(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 6546ccff3dd..370a32dc4ff 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -689,9 +689,6 @@ note dizziness decrements automatically in the mob's Life() proc. // Typo from the oriignal coder here, below lies the jitteriness process. So make of his code what you will, the previous comment here was just a copypaste of the above. /mob/proc/jittery_process() - - if (is_floaty) return - var/old_x = pixel_x var/old_y = pixel_y is_jittery = 1 @@ -710,29 +707,6 @@ note dizziness decrements automatically in the mob's Life() proc. pixel_x = old_x pixel_y = old_y -//Floaty - Makes the mob sprite bob up and down. Also a copypaste of dizziness - -/mob/proc/make_floaty() - if(floatiness && !is_floaty) - spawn(0) - floaty_process() - -/mob/proc/floaty_process() - - if (is_jittery) return - - var/old_x = pixel_x - var/old_y = pixel_y - is_floaty = 1 - while(floatiness) - pixel_y = 3 * cos(7 * world.time) //May need some tweaking - - sleep(1) - //endwhile - reset the pixel offsets to zero - is_floaty = 0 - pixel_x = old_x - pixel_y = old_y - /mob/Stat() ..() @@ -938,4 +912,4 @@ note dizziness decrements automatically in the mob's Life() proc. return "" /mob/proc/flash_weak_pain() - flick("weak_pain",pain) + flick("weak_pain",pain) \ No newline at end of file diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 17b5d863908..407be5f25c1 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -94,8 +94,6 @@ var/dizziness = 0//Carbon var/is_dizzy = 0 var/is_jittery = 0 - var/is_floaty = 0 - var/floatiness = 0 var/jitteriness = 0//Carbon var/charges = 0.0 var/nutrition = 400.0//Carbon @@ -228,4 +226,4 @@ var/has_limbs = 1 //Whether this mob have any limbs he can move with var/can_stand = 1 //Whether this mob have ability to stand - var/immune_to_ssd = 0 + var/immune_to_ssd = 0 \ No newline at end of file diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index b7f8a8376ae..a6c3ebe5877 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -267,8 +267,6 @@ if((istype(mob.loc, /turf/space)) || (mob.lastarea.has_gravity == 0)) if(!mob.Process_Spacemove(0)) return 0 - else - mob.floatiness = 0 if(isobj(mob.loc) || ismob(mob.loc))//Inside an object, tell it we moved @@ -471,10 +469,6 @@ dense_object++ break - //Makes the mob floaty - src.floatiness = 1 - src.make_floaty() - if(!dense_object && (locate(/obj/structure/lattice) in oview(1, src))) dense_object++