From 2c58840a4fca93914b7e208373f450e78409b6c3 Mon Sep 17 00:00:00 2001 From: "petethegoat@gmail.com" Date: Sun, 5 Feb 2012 17:22:39 +0000 Subject: [PATCH] Added throwing items over tables, thanks to SkyMarshal. Improved cigarette code, mostly grammatical fixes. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3036 316c924e-a436-60f5-8080-3fe189b3f50e --- code/defines/obj.dm | 2 + code/defines/obj/clothing/costume.dm | 2 +- code/defines/obj/vending.dm | 2 +- .../objects/items/weapons/cigs_lighters.dm | 58 +++++++----------- code/game/throwing.dm | 6 +- code/modules/admin/verbs/debug.dm | 2 +- code/modules/recycling/disposal.dm | 14 +++++ icons/obj/cigarettes.dmi | Bin 5905 -> 1859 bytes 8 files changed, 45 insertions(+), 41 deletions(-) diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 60121f8692e..4e723f0e281 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -576,6 +576,7 @@ density = 1 flags = FPRINT anchored = 1.0 + throwpass = 1 //You can throw objects over this, despite it's density. /obj/effect/shut_controller name = "shut controller" @@ -634,6 +635,7 @@ density = 1 anchored = 1.0 layer = 2.8 + throwpass = 1 //You can throw objects over this, despite it's density. New() ..() diff --git a/code/defines/obj/clothing/costume.dm b/code/defines/obj/clothing/costume.dm index d495a549902..0aefb4b6a16 100644 --- a/code/defines/obj/clothing/costume.dm +++ b/code/defines/obj/clothing/costume.dm @@ -22,7 +22,7 @@ /obj/effect/landmark/costume/elpresidente/New() new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc) new /obj/item/clothing/head/flatcap(src.loc) - new /obj/item/clothing/mask/cigarette/cigar/havanian(src.loc) + new /obj/item/clothing/mask/cigarette/cigar/havana(src.loc) new /obj/item/clothing/shoes/jackboots(src.loc) del(src) diff --git a/code/defines/obj/vending.dm b/code/defines/obj/vending.dm index 6cb7444df27..2574ed874fa 100644 --- a/code/defines/obj/vending.dm +++ b/code/defines/obj/vending.dm @@ -127,7 +127,7 @@ vend_delay = 34 product_hidden = "/obj/item/weapon/lighter/zippo" product_hideamt = "4" - product_coin = "/obj/item/clothing/mask/cigarette/cigar/havanian" + product_coin = "/obj/item/clothing/mask/cigarette/cigar/havana" product_coin_amt = "2" product_ads = "Probably not bad for you!;Don't believe the scientists!;It's good for you!;Don't quit, buy more!;Smoke!;Nicotine heaven.;Best cigarettes since 2150.;Award-winning cigs." diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index aa57585fe9e..293c794cdd6 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -112,7 +112,7 @@ ZIPPO lit = 0 icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi icon_off = "cigoff" - icon_butt = "cigbutt" + type_butt = /obj/item/weapon/cigbutt lastHolder = null smoketime = 300 proc @@ -121,17 +121,17 @@ ZIPPO attackby(obj/item/weapon/W as obj, mob/user as mob) ..() - if(istype(W, /obj/item/weapon/weldingtool) && W:welding) + if(istype(W, /obj/item/weapon/weldingtool) && W:welding) light("\red [user] casually lights the [name] with [W], what a badass.") else if(istype(W, /obj/item/weapon/lighter/zippo) && (W:lit > 0)) light("\red With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.") else if(istype(W, /obj/item/weapon/lighter) && (W:lit > 0)) - light("\red After some fiddling, [user] manages to light their [name] with their cheap [W].") + light("\red After some fiddling, [user] manages to light their [name] with [W].") else if(istype(W, /obj/item/weapon/match) && (W:lit > 0)) - light("\red [user] lights their [name] with their [W]. How poor can you get?") + light("\red [user] lights their [name] with their [W].") return @@ -150,12 +150,7 @@ ZIPPO var/turf/location = get_turf(src) src.smoketime-- if(src.smoketime < 1) - if (istype(src,/obj/item/clothing/mask/cigarette/cigar)) - var/obj/item/weapon/cigbutt/C = new /obj/item/weapon/cigarbutt - C.loc = location - else - var/obj/item/weapon/cigbutt/C = new /obj/item/weapon/cigbutt - C.loc = location + new type_butt(location) if(ismob(src.loc)) var/mob/living/M = src.loc M << "\red Your [src.name] goes out." @@ -171,12 +166,9 @@ ZIPPO if(src.lit == 1) for(var/mob/O in viewers(user, null)) O.show_message(text("\red [] calmly drops and treads on the lit [], putting it out instantly.", user,src.name), 1) - src.lit = -1 - src.damtype = "brute" - src.icon_state = icon_butt - src.item_state = icon_off - src.desc = "A [src.name] butt." - src.name = "[src.name] butt" + new type_butt(loc) + processing_objects.Remove(src) + del(src) return ..() @@ -190,51 +182,45 @@ ZIPPO icon_state = "cigaroff" icon_on = "cigaron" icon_off = "cigaroff" - icon_butt = "cigarbutt" + type_butt = /obj/item/weapon/cigbutt throw_speed = 0.5 item_state = "cigaroff" smoketime = 1500 /obj/item/clothing/mask/cigarette/cigar/cohiba - name = "Cohiba Cigar" + name = "Cohiba Robusto Cigar" desc = "There's little more you could want from a cigar." icon_state = "cigar2off" icon_on = "cigar2on" icon_off = "cigar2off" - icon_butt = "cigarbutt" -/obj/item/clothing/mask/cigarette/cigar/havanian +/obj/item/clothing/mask/cigarette/cigar/havana name = "Premium Havanian Cigar" desc = "A cigar fit for only the best for the best." icon_state = "cigar2off" icon_on = "cigar2on" icon_off = "cigar2off" - icon_butt = "cigarbutt" smoketime = 7200 /obj/item/weapon/cigbutt - name = "Cigarette butt" + name = "cigarette butt" desc = "A manky old cigarette butt." - icon = 'cigarettes.dmi' + icon = 'masks.dmi' icon_state = "cigbutt" w_class = 1 throwforce = 1 -/obj/item/weapon/cigarbutt - name = "Cigar butt" +/obj/item/weapon/cigbutt/cigarbutt + name = "cigar butt" desc = "A manky old cigar butt." - icon = 'cigarettes.dmi' icon_state = "cigarbutt" - w_class = 1 - throwforce = 1 -/obj/item/clothing/mask/cigarette/cigar/havanian/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/match) && (W:lit > 0)) - user << "\red The [src] straight out REFUSES to be lit by such uncivilized means." - else +/obj/item/clothing/mask/cigarette/cigar/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/match)) ..() - + else + user << "\red The [src] straight out REFUSES to be lit by such uncivilized means." //////////// //CIG PACK// @@ -329,7 +315,7 @@ ZIPPO user << "\red You burn yourself while lighting the lighter." user.adjustFireLoss(5) for(var/mob/O in viewers(user, null)) - O.show_message("\red After a few attempts, [user] manages to light the [src], they however burn their finger in the process", 1) + O.show_message("\red After a few attempts, [user] manages to light the [src], they however burn their finger in the process.", 1) user.total_luminosity += 2 processing_objects.Add(src) @@ -339,10 +325,10 @@ ZIPPO src.item_state = icon_off if( istype(src,/obj/item/weapon/lighter/zippo) ) for(var/mob/O in viewers(user, null)) - O.show_message(text("\red You hear a quiet click, as [] shuts off the [] without even looking what they're doing. Wow.", user, src), 1) + O.show_message(text("\red You hear a quiet click, as [] shuts off the [] without even looking at what they're doing. Wow.", user, src), 1) else for(var/mob/O in viewers(user, null)) - O.show_message("\red [user] quietly shuts off the [src]", 1) + O.show_message("\red [user] quietly shuts off the [src].", 1) user.total_luminosity -= 2 processing_objects.Remove(src) diff --git a/code/game/throwing.dm b/code/game/throwing.dm index 30167bdcab1..5403a555d01 100644 --- a/code/game/throwing.dm +++ b/code/game/throwing.dm @@ -107,11 +107,13 @@ src.throw_impact(A) src.throwing = 0 if(isobj(A)) - if(A.density) // **TODO: Better behaviour for windows - // which are dense, but shouldn't always stop movement + if(A.density && !A.throwpass) // **TODO: Better behaviour for windows which are dense, but shouldn't always stop movement src.throw_impact(A) src.throwing = 0 +//In some cases it's desirable to be able to throw stuff over dense objects. (Tables, racks) +/atom/var/throwpass = 0 //Thanks to SkyMarshal + /atom/proc/throw_impact(atom/hit_atom) if(istype(hit_atom,/mob/living)) var/mob/living/M = hit_atom diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 6c2da848096..83e99dd5bdb 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -645,7 +645,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that M.equip_if_possible(new /obj/item/clothing/gloves/combat(M), M.slot_gloves) M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), M.slot_ears) M.equip_if_possible(new /obj/item/clothing/glasses/thermal/eyepatch(M), M.slot_glasses) - M.equip_if_possible(new /obj/item/clothing/mask/cigarette/cigar/havanian(M), M.slot_wear_mask) + M.equip_if_possible(new /obj/item/clothing/mask/cigarette/cigar/havana(M), M.slot_wear_mask) M.equip_if_possible(new /obj/item/clothing/head/helmet/space/deathsquad/beret(M), M.slot_head) M.equip_if_possible(new /obj/item/weapon/gun/energy/pulse_rifle/M1911(M), M.slot_belt) M.equip_if_possible(new /obj/item/weapon/lighter/zippo(M), M.slot_r_store) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index e2485680e0a..9d5036156df 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -365,6 +365,20 @@ H.vent_gas(loc) del(H) + CanPass(atom/movable/mover, turf/target, height=0, air_group=0) + if (istype(mover,/obj/item)) + var/obj/item/I = mover + if(prob(75)) + I.loc = src + for(var/mob/M in viewers(src)) + M.show_message("\the [I] lands in \the [src].", 3) + else + for(var/mob/M in viewers(src)) + M.show_message("\the [I] bounces off of \the [src]'s rim!.", 3) + return 0 + else + return ..(mover, target, height, air_group) + //The toilet does not need to pressurized but can only handle small items. //You can also choke people by dunking them into the toilet. /obj/machinery/disposal/toilet diff --git a/icons/obj/cigarettes.dmi b/icons/obj/cigarettes.dmi index 67577df07225783cbab31964fc742dedacd78b6d..5f8099dc432f80bfc3ead5e60600c095d3c7c7a9 100644 GIT binary patch literal 1859 zcmV-J2fX-+P)004jp0{{R3yS?Dt=Qce^xAfR4aN>D|}NceN!oWO(A|zB!E^dc2O{RQZRK- zEz|%2umAvZPAajnv4vB0s;a7}sHlrne2i6nk5zxVy1IH(ESj2vo}PuTEi!aZEkh;> zb4@E=9vm|OGj&fYva+&;RCSe=m6MZ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