From 9e0218e4a36a8b7d37bde6e302f5fe068042b532 Mon Sep 17 00:00:00 2001 From: Ren Erthilo Date: Sun, 22 Apr 2012 20:19:57 +0100 Subject: [PATCH] TG: - lightbulb and light tube w_class is now 1, large tube (used for floodlights) remains at 2. - bulb and tube boxes now contain 21 bulbs or tubes, but can only store bulbs or tubes. - added a mixed box of lights, which contains 14 tubes and 7 bulbs - most of the areas which contained light boxes now contain these large mixed boxes. Screenshot: http://www.kamletos.si/bulbs.png Revision: r3105 Author: baloh.matevz --- code/defines/obj/supplypacks.dm | 13 +++---------- code/modules/power/lighting.dm | 32 +++++++++++++++++--------------- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/code/defines/obj/supplypacks.dm b/code/defines/obj/supplypacks.dm index 0f3dad8132f..cc1940219ee 100755 --- a/code/defines/obj/supplypacks.dm +++ b/code/defines/obj/supplypacks.dm @@ -313,18 +313,11 @@ containertype = "/obj/structure/closet/crate" containername = "Janitorial supplies" -/obj/item/weapon/storage/lightbox/tubes - /datum/supply_packs/lightbulbs name = "Replacement lights" - contains = list("/obj/item/weapon/storage/lightbox/tubes", - "/obj/item/weapon/storage/lightbox/tubes", - "/obj/item/weapon/storage/lightbox/tubes", - "/obj/item/weapon/storage/lightbox/tubes", - "/obj/item/weapon/storage/lightbox/tubes", - "/obj/item/weapon/storage/lightbox/tubes", - "/obj/item/weapon/storage/lightbox/bulbs", - "/obj/item/weapon/storage/lightbox/bulbs") + contains = list("/obj/item/weapon/storage/lightbox/mixed", + "/obj/item/weapon/storage/lightbox/mixed", + "/obj/item/weapon/storage/lightbox/mixed") cost = 5 containertype = "/obj/structure/closet/crate" containername = "Replacement lights" diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 91bdf826277..a94f99506de 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -172,7 +172,6 @@ /obj/machinery/light/attackby(obj/item/W, mob/user) - // attempt to insert light if(istype(W, /obj/item/weapon/light)) if(status != LIGHT_EMPTY) @@ -457,7 +456,7 @@ flags = FPRINT | TABLEPASS force = 2 throwforce = 5 - w_class = 2 + w_class = 1 var/status = 0 // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN var/base_state var/switchcount = 0 // number of times switched @@ -476,6 +475,7 @@ brightness = 8 large + w_class = 2 name = "large light tube" brightness = 15 @@ -524,6 +524,7 @@ // also repairing them with wire and screwdriver // and glass if it's broken /obj/item/weapon/light/attackby(var/obj/item/I, var/mob/user) + if(istype(I, /obj/item/weapon/reagent_containers/syringe)) var/obj/item/weapon/reagent_containers/syringe/S = I @@ -600,13 +601,8 @@ /obj/item/weapon/storage/lightbox/bulbs/New() ..() - new /obj/item/weapon/light/bulb(src) - new /obj/item/weapon/light/bulb(src) - new /obj/item/weapon/light/bulb(src) - - new /obj/item/weapon/light/bulb(src) - new /obj/item/weapon/light/bulb(src) - new /obj/item/weapon/light/bulb(src) + for(var/i = 0; i < 21; i++) + new /obj/item/weapon/light/bulb(src) /obj/item/weapon/storage/lightbox/tubes name = "replacement tubes" @@ -614,13 +610,19 @@ /obj/item/weapon/storage/lightbox/tubes/New() ..() - new /obj/item/weapon/light/tube(src) - new /obj/item/weapon/light/tube(src) - new /obj/item/weapon/light/tube(src) + for(var/i = 0; i < 21; i++) + new /obj/item/weapon/light/tube(src) - new /obj/item/weapon/light/tube(src) - new /obj/item/weapon/light/tube(src) - new /obj/item/weapon/light/tube(src) +/obj/item/weapon/storage/lightbox/mixed + name = "replacement lights" + icon_state = "lightmixed" + +/obj/item/weapon/storage/lightbox/mixed/New() + ..() + for(var/i = 0; i < 14; i++) + new /obj/item/weapon/light/tube(src) + for(var/i = 0; i < 7; i++) + new /obj/item/weapon/light/bulb(src) /obj/structure/light_frame name = "Light Fixture Frame"