Smallfix.

This commit is contained in:
Segrain
2014-02-22 06:56:12 +03:00
parent fd738a5767
commit 2b9842c113
2 changed files with 18 additions and 12 deletions
@@ -21,6 +21,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
icon = 'icons/obj/cigarettes.dmi'
icon_state = "match_unlit"
var/lit = 0
var/burnt = 0
var/smoketime = 5
w_class = 1.0
origin_tech = "materials=1"
@@ -30,24 +31,27 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
icon_state = "match_burnt"
lit = -1
processing_objects.Remove(src)
burn_out()
return
if(location)
location.hotspot_expose(700, 5)
return
/obj/item/weapon/match/dropped(mob/user as mob)
if(lit == 1)
lit = -1
damtype = "brute"
icon_state = "match_burnt"
item_state = "cigoff"
name = "burnt match"
desc = "A match. This one has seen better days."
if(lit)
burn_out()
return ..()
/obj/item/weapon/match/proc/burn_out()
lit = 0
burnt = 1
damtype = "brute"
icon_state = "match_burnt"
item_state = "cigoff"
name = "burnt match"
desc = "A match. This one has seen better days."
processing_objects.Remove(src)
//////////////////
//FINE SMOKABLES//
//////////////////
@@ -419,4 +423,4 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(lit)
user.SetLuminosity(user.luminosity-2)
SetLuminosity(2)
return
return
@@ -418,6 +418,7 @@
w_class = 1
flags = TABLEPASS
slot_flags = SLOT_BELT
can_hold = list("/obj/item/weapon/match")
New()
..()
@@ -425,8 +426,9 @@
new /obj/item/weapon/match(src)
attackby(obj/item/weapon/match/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/match) && W.lit == 0)
if(istype(W) && !W.lit && !W.burnt)
W.lit = 1
W.damtype = "burn"
W.icon_state = "match_lit"
processing_objects.Add(W)
W.update_icon()