mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-30 12:02:24 +00:00
- Desk lamps are now just fancy flashlights. Which means you can pick them up. They have w_class set to 4 and don't have the onbelt flag, meaning you can't put them in any container and you can't put them in a pocket. Click on them to pick them up, use the toggle-light verb to turn them on or off. They are no longer affected by light switches (desk lights generally aren't anyway)
- Updated lamp type path on both uterus and 2.0.8 git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3115 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -52,23 +52,6 @@
|
||||
light_type = /obj/item/weapon/light/tube/large
|
||||
brightness = 15
|
||||
|
||||
// the desk lamp
|
||||
/obj/machinery/light/lamp
|
||||
name = "desk lamp"
|
||||
icon_state = "lamp1"
|
||||
base_state = "lamp"
|
||||
fitting = "bulb"
|
||||
brightness = 5
|
||||
desc = "A desk lamp"
|
||||
light_type = /obj/item/weapon/light/bulb
|
||||
var/switchon = 0 // independent switching for lamps - not controlled by area lightswitch
|
||||
|
||||
// green-shaded desk lamp
|
||||
/obj/machinery/light/lamp/green
|
||||
icon_state = "green1"
|
||||
base_state = "green"
|
||||
desc = "A green-shaded desk lamp"
|
||||
|
||||
|
||||
// create a new lighting fixture
|
||||
/obj/machinery/light/New()
|
||||
@@ -392,38 +375,8 @@
|
||||
|
||||
|
||||
|
||||
// special handling for desk lamps
|
||||
|
||||
|
||||
// if attack with hand, only "grab" attacks are an attempt to remove bulb
|
||||
// otherwise, switch the lamp on/off
|
||||
|
||||
/obj/machinery/light/lamp/attack_hand(mob/user)
|
||||
|
||||
if(user.a_intent == "grab")
|
||||
..() // do standard hand attack
|
||||
else
|
||||
switchon = !switchon
|
||||
user << "You switch [switchon ? "on" : "off"] the [name]."
|
||||
seton(switchon && powered(LIGHT))
|
||||
|
||||
|
||||
// called when area power state changes
|
||||
// override since lamp does not use area lightswitch
|
||||
|
||||
/obj/machinery/light/lamp/power_change()
|
||||
spawn(rand(0,15))
|
||||
var/area/A = src.loc.loc
|
||||
A = A.master
|
||||
seton(switchon && A.power_light)
|
||||
|
||||
// returns whether this lamp has power
|
||||
// true if area has power and lamp switch is on
|
||||
|
||||
/obj/machinery/light/lamp/has_power()
|
||||
var/area/A = src.loc.loc
|
||||
return switchon && A.master.power_light
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user