mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
TG: Added throwing items over tables, thanks to SkyMarshal.
Improved cigarette code, mostly grammatical fixes. Revision: r3036 Author: petethegoat
This commit is contained in:
@@ -742,6 +742,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"
|
||||
@@ -814,6 +815,7 @@
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
layer = 2.8
|
||||
throwpass = 1 //You can throw objects over this, despite it's density.
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
product_hidden = "/obj/item/weapon/lighter/zippo"
|
||||
// product_hideamt = "4"
|
||||
hidden_prices = "2"
|
||||
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."
|
||||
charge_type = "cigarette"
|
||||
|
||||
@@ -3,6 +3,8 @@ CONTAINS:
|
||||
MATCHES
|
||||
MATCHBOXES
|
||||
CIGARETTES
|
||||
CIGARS
|
||||
SMOKING PIPES
|
||||
CIG PACKET
|
||||
ZIPPO
|
||||
*/
|
||||
@@ -22,10 +24,7 @@ ZIPPO
|
||||
|
||||
|
||||
process()
|
||||
var/turf/location = get_turf(src)
|
||||
if(src.lit == 1)
|
||||
if(location)
|
||||
location.hotspot_expose(700, 5)
|
||||
while(src.lit == 1)
|
||||
src.smoketime--
|
||||
sleep(10)
|
||||
if(src.smoketime < 1)
|
||||
@@ -37,16 +36,12 @@ ZIPPO
|
||||
|
||||
dropped(mob/user as mob)
|
||||
if(src.lit == 1)
|
||||
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)
|
||||
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"
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -74,7 +69,11 @@ ZIPPO
|
||||
else
|
||||
src.matchcount--
|
||||
var/obj/item/weapon/match/W = new /obj/item/weapon/match(user)
|
||||
user.put_in_hand(W)
|
||||
if(user.hand)
|
||||
user.l_hand = W
|
||||
else
|
||||
user.r_hand = W
|
||||
W.layer = 20
|
||||
else
|
||||
return ..()
|
||||
if(src.matchcount <= 0)
|
||||
@@ -115,13 +114,23 @@ 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
|
||||
var/butt_count = 5 //count of butt sprite variations
|
||||
icon_butt = "cigbutt"
|
||||
butt_count = 5 //count of butt sprite variations
|
||||
proc
|
||||
light(var/flavor_text = "[usr] lights the [name].")
|
||||
|
||||
put_out()
|
||||
if (src.lit == -1)
|
||||
return
|
||||
src.lit = -1
|
||||
src.damtype = "brute"
|
||||
src.icon_state = icon_butt + "[rand(0,butt_count)]"
|
||||
src.item_state = icon_off
|
||||
src.desc = "A [src.name] butt."
|
||||
src.name = "[src.name] butt"
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
@@ -149,29 +158,18 @@ ZIPPO
|
||||
O.show_message(flavor_text, 1)
|
||||
processing_objects.Add(src)
|
||||
|
||||
put_out()
|
||||
if (src.lit == -1)
|
||||
return
|
||||
src.lit = -1
|
||||
src.damtype = "brute"
|
||||
src.icon_state = icon_butt + "[rand(0,butt_count)]"
|
||||
src.item_state = icon_off
|
||||
src.desc = "A [src.name] butt."
|
||||
src.name = "[src.name] butt"
|
||||
|
||||
|
||||
process()
|
||||
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)
|
||||
@@ -180,11 +178,15 @@ ZIPPO
|
||||
|
||||
dropped(mob/user as mob)
|
||||
if(src.lit == 1)
|
||||
src.visible_message("\red [user] calmly drops and treads on the lit [src], putting it out instantly.")
|
||||
put_out()
|
||||
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)
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
////////////
|
||||
// CIGARS //
|
||||
////////////
|
||||
@@ -194,11 +196,10 @@ 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
|
||||
butt_count = 0
|
||||
|
||||
/obj/item/clothing/mask/cigarette/cigar/cohiba
|
||||
name = "Cohiba Robusto Cigar"
|
||||
@@ -207,7 +208,7 @@ ZIPPO
|
||||
icon_on = "cigar2on"
|
||||
icon_off = "cigar2off"
|
||||
|
||||
/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"
|
||||
@@ -218,20 +219,116 @@ ZIPPO
|
||||
/obj/item/weapon/cigbutt
|
||||
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/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//
|
||||
////////////
|
||||
@@ -262,7 +359,11 @@ ZIPPO
|
||||
else
|
||||
src.cigcount--
|
||||
var/obj/item/clothing/mask/cigarette/W = new /obj/item/clothing/mask/cigarette(user)
|
||||
user.put_in_hand(W)
|
||||
if(user.hand)
|
||||
user.l_hand = W
|
||||
else
|
||||
user.r_hand = W
|
||||
W.layer = 20
|
||||
else
|
||||
return ..()
|
||||
src.update_icon()
|
||||
|
||||
@@ -107,11 +107,13 @@
|
||||
src.throw_impact(A)
|
||||
src.throwing = 0
|
||||
if(isobj(A))
|
||||
if(A.density && !A.CanPass(src,target)) // **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
|
||||
|
||||
@@ -793,7 +793,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/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)
|
||||
|
||||
@@ -27,7 +27,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)
|
||||
|
||||
|
||||
@@ -455,20 +455,20 @@
|
||||
del(H)
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if (istype(mover,/obj/item))
|
||||
if (istype(mover,/obj/item) && mover.throwing)
|
||||
var/obj/item/I = mover
|
||||
if(!mover.throwing)
|
||||
return ..()
|
||||
if(istype(I, /obj/item/weapon/dummy) || istype(I, /obj/item/projectile))
|
||||
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 ..()
|
||||
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.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 6.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
@@ -6214,7 +6214,7 @@
|
||||
"cpz" = (/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/specops/centcom)
|
||||
"cpA" = (/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)
|
||||
"cpB" = (/obj/structure/stool/bed/chair,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/specops/centcom)
|
||||
"cpC" = (/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)
|
||||
"cpC" = (/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)
|
||||
"cpD" = (/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)
|
||||
"cpE" = (/obj/structure/table/woodentable{dir = 5},/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed)
|
||||
"cpF" = (/obj/machinery/computer/card/centcom,/obj/item/weapon/card/id/centcom,/turf/unsimulated/floor{icon_state = "grimy"},/area/centcom/creed)
|
||||
|
||||
Reference in New Issue
Block a user