From 43d36dec6ebe3388785631621d995de65b1a19e3 Mon Sep 17 00:00:00 2001 From: Ren Erthilo Date: Sat, 21 Apr 2012 17:09:29 +0100 Subject: [PATCH] Reverts throwing and cigarette code for fear of trout. Also updates object paths. --- code/defines/obj.dm | 2 - code/game/objects/items/candle.dm | 6 +- .../objects/items/weapons/cigs_lighters.dm | 149 +++--------------- code/game/throwing.dm | 6 +- code/modules/recycling/disposal.dm | 10 +- maps/tgstation.2.0.8.dmm | 14 +- 6 files changed, 39 insertions(+), 148 deletions(-) diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 43dd9277a98..fd4dc7d4d98 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -742,7 +742,6 @@ 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" @@ -815,7 +814,6 @@ 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/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index e930a057ea3..33a1c461ea7 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -110,11 +110,7 @@ else src.candlecount-- var/obj/item/candle/W = new /obj/item/candle(user) - if(user.hand) - user.l_hand = W - else - user.r_hand = W - W.layer = 20 + user.put_in_hand(W) else return ..() src.update_icon() diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 5766cbcdb00..4321dcef1f7 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -4,7 +4,6 @@ MATCHES MATCHBOXES CIGARETTES CIGARS -SMOKING PIPES CIG PACKET ZIPPO */ @@ -24,7 +23,10 @@ ZIPPO process() - while(src.lit == 1) + var/turf/location = get_turf(src) + if(src.lit == 1) + if(location) + location.hotspot_expose(700, 5) src.smoketime-- sleep(10) if(src.smoketime < 1) @@ -36,12 +38,16 @@ ZIPPO dropped(mob/user as mob) if(src.lit == 1) - src.lit = -1 - src.damtype = "brute" - src.icon_state = "match_burnt" - src.item_state = "cigoff" - src.name = "Burnt match" - src.desc = "A match that has been burnt" + spawn(10) + var/turf/location = get_turf(src) + location.hotspot_expose(700, 5) + src.lit = -1 + src.damtype = "brute" + src.icon_state = "match_burnt" + src.item_state = "cigoff" + src.name = "Burnt match" + src.desc = "A match that has been burnt" + processing_objects.Remove(src) return ..() @@ -69,11 +75,7 @@ ZIPPO else src.matchcount-- var/obj/item/weapon/match/W = new /obj/item/weapon/match(user) - if(user.hand) - user.l_hand = W - else - user.r_hand = W - W.layer = 20 + user.put_in_hand(W) else return ..() if(src.matchcount <= 0) @@ -114,10 +116,9 @@ ZIPPO lit = 0 icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi icon_off = "cigoff" - type_butt = /obj/item/weapon/cigbutt + icon_butt = "cigbutt" lastHolder = null smoketime = 300 - icon_butt = "cigbutt" butt_count = 5 //count of butt sprite variations proc light(var/flavor_text = "[usr] lights the [name].") @@ -164,13 +165,14 @@ ZIPPO var/turf/location = get_turf(src) src.smoketime-- if(src.smoketime < 1) - new type_butt(location) if(ismob(src.loc)) var/mob/living/M = src.loc M << "\red Your [src.name] goes out." + put_out() M.update_clothing() + else + put_out() processing_objects.Remove(src) - del(src) return if(location) location.hotspot_expose(700, 5) @@ -179,11 +181,8 @@ ZIPPO dropped(mob/user as mob) 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) - new type_butt(loc) - processing_objects.Remove(src) - del(src) + src.visible_message("\red [user] calmly drops and treads on the lit [src], putting it out instantly.") + put_out() return ..() @@ -197,10 +196,11 @@ ZIPPO icon_state = "cigaroff" icon_on = "cigaron" icon_off = "cigaroff" - type_butt = /obj/item/weapon/cigbutt + icon_butt = "cigarbutt" throw_speed = 0.5 item_state = "cigaroff" smoketime = 1500 + butt_count = 0 /obj/item/clothing/mask/cigarette/cigar/cohiba name = "Cohiba Robusto Cigar" @@ -231,104 +231,7 @@ ZIPPO icon_state = "cigarbutt" -/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." -///////////////// -//SMOKING PIPES// -///////////////// - -/obj/item/clothing/mask/pipe - name = "smoking pipe" - desc = "A pipe, for smoking. Probably made of meershaum or something." - icon_state = "cobpipeoff" - throw_speed = 0.5 - item_state = "cobpipeoff" - w_class = 1 - body_parts_covered = null - var - lit = 0 - icon_on = "cobpipeon" //Note - these are in masks.dmi - icon_off = "cobpipeoff" - lastHolder = null - smoketime = 100 - maxsmoketime = 100 //make sure this is equal to your smoketime - proc - light(var/flavor_text = "[usr] lights the [name].") - - attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - 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 [W].") - - else if(istype(W, /obj/item/weapon/match) && (W:lit > 0)) - light("\red [user] lights \his [name] with \his [W].") - return - - light(var/flavor_text = "[usr] lights the [name].") - if(!src.lit) - src.lit = 1 - src.damtype = "fire" - src.icon_state = icon_on - src.item_state = icon_on - for(var/mob/O in viewers(usr, null)) - O.show_message(flavor_text, 1) - processing_objects.Add(src) - - process() - var/turf/location = get_turf(src) - src.smoketime-- - if(src.smoketime < 1) - new /obj/effect/decal/ash(location) - if(ismob(src.loc)) - var/mob/living/M = src.loc - M << "\red Your [src.name] goes out, and you empty the ash." - src.lit = 0 - src.icon_state = icon_off - src.item_state = icon_off - processing_objects.Remove(src) - return - if(location) - location.hotspot_expose(700, 5) - return - - dropped(mob/user as mob) - if(src.lit == 1) - for(var/mob/O in viewers(user, null)) - O.show_message(text("\red [] puts out the [].", user,src.name), 1) - src.lit = 0 - src.icon_state = icon_off - src.item_state = icon_off - processing_objects.Remove(src) - return ..() - -/obj/item/clothing/mask/pipe/attack_self(mob/user as mob) //Refills the pipe. Can be changed to an attackby later, if loose tobacco is added to vendors or something. - if(src.smoketime <= 0) - user << "\blue You refill the pipe with tobacco." - smoketime = maxsmoketime - return - -/obj/item/clothing/mask/pipe/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 means." - - -/obj/item/clothing/mask/pipe/cobpipe - name = "corn cob pipe" - desc = "A nicotine delivery system popularized by folksy backwoodsmen and kept popular in the modern age and beyond by space hipsters." - smoketime = 400 - maxsmoketime = 400 //////////// //CIG PACK// @@ -360,11 +263,7 @@ ZIPPO else src.cigcount-- var/obj/item/clothing/mask/cigarette/W = new /obj/item/clothing/mask/cigarette(user) - if(user.hand) - user.l_hand = W - else - user.r_hand = W - W.layer = 20 + user.put_in_hand(W) else return ..() src.update_icon() diff --git a/code/game/throwing.dm b/code/game/throwing.dm index 9d9f9ea3299..9560bed0efd 100644 --- a/code/game/throwing.dm +++ b/code/game/throwing.dm @@ -107,13 +107,11 @@ src.throw_impact(A) src.throwing = 0 if(isobj(A)) - if(A.density && !A.throwpass) // **TODO: Better behaviour for windows which are dense, but shouldn't always stop movement + if(A.density && !A.CanPass(src,target)) // **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/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 19c046bcb38..c190f64b6fe 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -455,20 +455,20 @@ del(H) CanPass(atom/movable/mover, turf/target, height=0, air_group=0) - if (istype(mover,/obj/item) && mover.throwing) + if (istype(mover,/obj/item)) var/obj/item/I = mover - if(istype(I, /obj/item/weapon/dummy) || istype(I, /obj/item/projectile)) - return + if(!mover.throwing) + return ..() 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) + M.show_message("\the [I] bounces off of \the [src]'s rim!", 3) return 0 else - return ..(mover, target, height, air_group) + return ..() //The toilet does not need to pressurized but can only handle small items. //You can also choke people by dunking them into the toilet. diff --git a/maps/tgstation.2.0.8.dmm b/maps/tgstation.2.0.8.dmm index 4478481a38e..beb8b10cf29 100755 --- a/maps/tgstation.2.0.8.dmm +++ b/maps/tgstation.2.0.8.dmm @@ -5191,7 +5191,7 @@ "bVQ" = (/obj/machinery/light/small{dir = 4},/turf/simulated/floor{icon_state = "yellowcorner"},/area/hallway/primary/aft) "bVR" = (/obj/item/weapon/clipboard,/obj/item/weapon/stamp/ce,/obj/item/clothing/glasses/meson,/obj/structure/table/reinforced,/turf/simulated/floor,/area/engine/chiefs_office) "bVS" = (/obj/item/weapon/storage/belt/utility,/obj/item/weapon/weldingtool,/obj/item/weapon/wrench,/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_y = 0; tag = "Streight"},/obj/structure/table/reinforced,/turf/simulated/floor,/area/engine/chiefs_office) -"bVT" = (/obj/item/weapon/zippo,/obj/item/weapon/cell{charge = 100; maxcharge = 15000},/obj/structure/table/reinforced,/obj/structure/disposalpipe/segment,/obj/item/device/hacktool/engineer,/turf/simulated/floor,/area/engine/chiefs_office) +"bVT" = (/obj/item/weapon/lighter/zippo,/obj/item/weapon/cell{charge = 100; maxcharge = 15000},/obj/structure/table/reinforced,/obj/structure/disposalpipe/segment,/obj/item/device/hacktool/engineer,/turf/simulated/floor,/area/engine/chiefs_office) "bVU" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = "Streight"},/turf/simulated/floor,/area/engine/chiefs_office) "bVV" = (/obj/item/weapon/cartridge/engineering{pixel_x = 4; pixel_y = 5},/obj/item/weapon/cartridge/engineering{pixel_x = -3; pixel_y = 2},/obj/item/weapon/cartridge/engineering{pixel_x = 3},/obj/item/stack/medical/bruise_pack{pixel_x = -3; pixel_y = 2},/obj/structure/table/reinforced,/obj/item/stack/medical/ointment{pixel_y = 4},/turf/simulated/floor,/area/engine/chiefs_office) "bVW" = (/obj/item/weapon/paper_bin{pixel_x = -3; pixel_y = 7},/obj/item/weapon/pen,/obj/structure/table/reinforced,/turf/simulated/floor,/area/engine/chiefs_office) @@ -5858,7 +5858,7 @@ "ciH" = (/obj/structure/rack,/obj/item/clothing/suit/space/syndicate,/obj/item/clothing/head/helmet/space/syndicate,/turf/unsimulated/floor{icon = 'shuttle.dmi'; icon_state = "floor4"},/area/syndicate_station/start) "ciI" = (/obj/machinery/door/window/northright,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) "ciJ" = (/obj/structure/table/reinforced{icon_state = "reinf_tabledir"},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) -"ciK" = (/obj/structure/table/reinforced{icon_state = "reinf_tabledir"},/obj/item/weapon/zippo,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) +"ciK" = (/obj/structure/table/reinforced{icon_state = "reinf_tabledir"},/obj/item/weapon/lighter/zippo,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) "ciL" = (/obj/structure/table/reinforced{icon_state = "reinf_tabledir"},/obj/item/weapon/cigpacket,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) "ciM" = (/obj/machinery/door/airlock/glass,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) "ciN" = (/obj/item/stack/sheet/glass{amount = 5000},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) @@ -6189,12 +6189,12 @@ "cpa" = (/obj/structure/stool/bed/chair,/turf/unsimulated/floor{icon_state = "carpet"; dir = 2},/area/centcom/control) "cpb" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 5; health = 1e+007},/turf/unsimulated/floor,/area/centcom/control) "cpc" = (/obj/structure/stool/bed/chair,/turf/unsimulated/floor{icon_state = "dark"},/area/centcom/control) -"cpd" = (/obj/structure/rack,/obj/item/weapon/pinpointer,/obj/item/clothing/suit/space/syndicate/black/blue,/obj/item/clothing/head/helmet/space/syndicate/black/blue,/obj/item/weapon/storage/belt/security/full,/obj/effect/landmark{name = "nukecode"},/obj/item/weapon/zippo,/turf/unsimulated/floor{icon_state = "dark"},/area/centcom/specops) +"cpd" = (/obj/structure/rack,/obj/item/weapon/pinpointer,/obj/item/clothing/suit/space/syndicate/black/blue,/obj/item/clothing/head/helmet/space/syndicate/black/blue,/obj/item/weapon/storage/belt/security/full,/obj/effect/landmark{name = "nukecode"},/obj/item/weapon/lighter/zippo,/turf/unsimulated/floor{icon_state = "dark"},/area/centcom/specops) "cpe" = (/obj/machinery/door/airlock/external,/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id = "ERTIN"; name = "ERT-Shuttle Airlock"; opacity = 0},/turf/unsimulated/floor{tag = "icon-vault (NORTHEAST)"; icon_state = "vault"; dir = 5},/area/centcom/specops) "cpf" = (/obj/structure/bookcase{name = "bookcase (Tactics)"},/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed) "cpg" = (/obj/structure/closet/secure_closet/hos,/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed) "cph" = (/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed) -"cpi" = (/obj/structure/rack,/obj/item/weapon/secstorage/sbriefcase,/obj/item/weapon/cigpacket,/obj/item/weapon/zippo,/obj/item/weapon/storage/belt/utility,/obj/item/weapon/storage/backpack/satchel,/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed) +"cpi" = (/obj/structure/rack,/obj/item/weapon/secstorage/sbriefcase,/obj/item/weapon/cigpacket,/obj/item/weapon/lighter/zippo,/obj/item/weapon/storage/belt/utility,/obj/item/weapon/storage/backpack/satchel,/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed) "cpj" = (/obj/structure/bookcase{name = "bookcase (Reports)"},/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed) "cpk" = (/obj/structure/table/woodentable,/turf/unsimulated/floor{dir = 8; icon_state = "wood"},/area/centcom/control) "cpl" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 5; health = 1e+007},/turf/unsimulated/floor,/area/centcom/control) @@ -6218,7 +6218,7 @@ "cpD" = (/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/specops/centcom) "cpE" = (/obj/machinery/door_control{id = "ERTIN"; pixel_y = 26},/obj/structure/stool/bed/chair,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/specops/centcom) "cpF" = (/obj/structure/stool/bed/chair,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/specops/centcom) -"cpG" = (/obj/structure/table/woodentable{dir = 9},/obj/item/weapon/reagent_containers/food/drinks/flask,/obj/item/clothing/mask/cigarette/cigar/havanian,/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed) +"cpG" = (/obj/structure/table/woodentable{dir = 9},/obj/item/weapon/reagent_containers/food/drinks/flask,/obj/item/clothing/mask/cigarette/cigar/havana,/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed) "cpH" = (/obj/machinery/computer/security/telescreen{name = "Spec. Ops. Monitor"; network = "CREED"},/obj/structure/table/woodentable{dir = 5},/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed) "cpI" = (/obj/structure/table/woodentable{dir = 5},/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed) "cpJ" = (/obj/machinery/computer/card/centcom,/obj/item/weapon/card/id/centcom,/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed) @@ -6369,7 +6369,7 @@ "csy" = (/obj/structure/table,/obj/machinery/blender{pixel_y = 11},/turf/unsimulated/floor{icon_state = "freezerfloor"; dir = 2},/area/centcom/holding) "csz" = (/obj/structure/table,/obj/item/weapon/reagent_containers/food/drinks/shaker,/turf/unsimulated/floor{icon_state = "freezerfloor"; dir = 2},/area/centcom/holding) "csA" = (/obj/structure/table,/turf/unsimulated/floor{icon_state = "freezerfloor"; dir = 2},/area/centcom/holding) -"csB" = (/obj/structure/table,/obj/item/weapon/zippo,/turf/unsimulated/floor{icon_state = "freezerfloor"; dir = 2},/area/centcom/holding) +"csB" = (/obj/structure/table,/obj/item/weapon/lighter/zippo,/turf/unsimulated/floor{icon_state = "freezerfloor"; dir = 2},/area/centcom/holding) "csC" = (/obj/structure/table,/obj/item/weapon/reagent_containers/food/drinks/cola,/turf/unsimulated/floor{icon_state = "freezerfloor"; dir = 2},/area/centcom/holding) "csD" = (/obj/structure/table,/obj/item/weapon/dice/d20,/turf/unsimulated/floor{icon_state = "freezerfloor"; dir = 2},/area/centcom/holding) "csE" = (/obj/structure/stool{pixel_y = 8},/turf/unsimulated/floor{icon = 'beach.dmi'; icon_state = "sand"; name = "sand"},/area/centcom/holding) @@ -6441,7 +6441,7 @@ "ctS" = (/obj/machinery/gibber,/turf/unsimulated/floor{icon_state = "white"},/area/tdome) "ctT" = (/obj/machinery/door/airlock/command{name = "Thunderdome"},/turf/unsimulated/floor{tag = "icon-vault (NORTHEAST)"; icon_state = "vault"; dir = 5},/area/tdome) "ctU" = (/obj/machinery/vending/cigarette,/turf/unsimulated/floor{tag = "icon-redbluefull (WEST)"; icon_state = "redbluefull"; dir = 8},/area/tdome/tdomeobserve) -"ctV" = (/obj/structure/table,/obj/item/weapon/reagent_containers/food/drinks/beer,/obj/item/weapon/reagent_containers/food/drinks/beer,/obj/item/weapon/reagent_containers/food/drinks/beer,/obj/item/weapon/zippo,/obj/item/weapon/cigpacket,/turf/unsimulated/floor{tag = "icon-redbluefull (WEST)"; icon_state = "redbluefull"; dir = 8},/area/tdome/tdomeobserve) +"ctV" = (/obj/structure/table,/obj/item/weapon/reagent_containers/food/drinks/beer,/obj/item/weapon/reagent_containers/food/drinks/beer,/obj/item/weapon/reagent_containers/food/drinks/beer,/obj/item/weapon/lighter/zippo,/obj/item/weapon/cigpacket,/turf/unsimulated/floor{tag = "icon-redbluefull (WEST)"; icon_state = "redbluefull"; dir = 8},/area/tdome/tdomeobserve) "ctW" = (/obj/structure/table{icon_state = "tabledir"; dir = 2},/obj/item/weapon/reagent_containers/food/drinks/cola,/obj/item/weapon/reagent_containers/food/drinks/cola,/obj/item/weapon/reagent_containers/food/drinks/cola,/turf/unsimulated/floor{tag = "icon-redbluefull (WEST)"; icon_state = "redbluefull"; dir = 8},/area/tdome/tdomeobserve) "ctX" = (/obj/structure/reagent_dispensers/beerkeg,/turf/unsimulated/floor{tag = "icon-redbluefull (WEST)"; icon_state = "redbluefull"; dir = 8},/area/tdome/tdomeobserve) "ctY" = (/turf/unsimulated/floor{tag = "icon-redbluefull (WEST)"; icon_state = "redbluefull"; dir = 8},/area/tdome/tdomeobserve)