mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
- You can now light your cigarette with an energy sword :)
- Fixed the problem where suits appeared on the UI even with the inventory closed. The call to other_update() in update_clothing() must be done after all the icon slots get updated. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3725 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -119,61 +119,62 @@ ZIPPO
|
||||
var/type_butt = /obj/item/weapon/cigbutt
|
||||
var/lastHolder = null
|
||||
var/smoketime = 300
|
||||
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.")
|
||||
/obj/item/clothing/mask/cigarette/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/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/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 their [name] with their [W].")
|
||||
else if(istype(W, /obj/item/weapon/melee/energy/sword) && (W:active))
|
||||
light("\red [user] swings their [W], barely missing their nose. They light their [name] in the process.")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/match) && (W:lit > 0))
|
||||
light("\red [user] lights their [name] with their [W].")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/clothing/mask/cigarette/proc/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)
|
||||
|
||||
|
||||
/obj/item/clothing/mask/cigarette/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."
|
||||
processing_objects.Remove(src)
|
||||
del(src)
|
||||
return
|
||||
if(location)
|
||||
location.hotspot_expose(700, 5)
|
||||
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 type_butt(location)
|
||||
if(ismob(src.loc))
|
||||
var/mob/living/M = src.loc
|
||||
M << "\red Your [src.name] goes out."
|
||||
/obj/item/clothing/mask/cigarette/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)
|
||||
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 [] 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 ..()
|
||||
return ..()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -863,10 +863,6 @@
|
||||
client.screen -= hud_used.intents
|
||||
client.screen -= hud_used.mov_int
|
||||
|
||||
|
||||
//Screenlocs for these slots are handled by the huds other_update()
|
||||
//because theyre located on the 'other' inventory bar.
|
||||
|
||||
// Gloves
|
||||
if (gloves)
|
||||
var/t1 = gloves.item_state
|
||||
@@ -977,7 +973,6 @@
|
||||
back.screen_loc = ui_back
|
||||
|
||||
if(client)
|
||||
hud_used.other_update() //Update the screenloc of the items on the 'other' inventory bar
|
||||
client.screen -= contents
|
||||
client.screen += contents
|
||||
//to hide / show them.
|
||||
@@ -1043,6 +1038,11 @@
|
||||
overlays += image("icon" = stain_icon, "layer" = B_SUIT_LAYER)
|
||||
wear_suit.screen_loc = ui_oclothing
|
||||
|
||||
//Update_other() MUST be called after all the storage slots get updated. This is because all the storage slots assign their
|
||||
//respective items a screen_loc, which other_update() will then override if needed.
|
||||
if(client)
|
||||
hud_used.other_update() //Update the screenloc of the items on the 'other' inventory bar
|
||||
|
||||
switch(shielded)
|
||||
if(1)
|
||||
overlays += image("icon" = 'effects.dmi', "icon_state" = "shield", "layer" = SHIELD_LAYER)
|
||||
|
||||
Reference in New Issue
Block a user