Buildable wall light (#2644)
* Added empty light * Can build light fixture * Can construct and deconstruct small light * You can build bulbs only on walls * Playing with placement conditions * Refactored code a bit * Added check for north direction and snapping * Fixed all small light sprites (wrong directions order) * Fixed weird problem with bulb lights * Fixed rotation on all stations * Fixed map again * Much better placement mode * Deleted shared wall component and moved all logic to raycasts * Missing bracket * Better texture * Moved wallmount condition to tags * Removed station station * Added suffix and fixed on map init bug
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
- type: constructionGraph
|
||||
id: lightFixture
|
||||
start: start
|
||||
graph:
|
||||
- node: start
|
||||
edges:
|
||||
- to: bulbLight
|
||||
steps:
|
||||
- material: Metal
|
||||
amount: 1
|
||||
doAfter: 2.0
|
||||
- to: tubeLight
|
||||
steps:
|
||||
- material: Metal
|
||||
amount: 2
|
||||
doAfter: 2.0
|
||||
- node: tubeLight
|
||||
entity: PoweredlightEmpty
|
||||
edges:
|
||||
- to: start
|
||||
conditions:
|
||||
- !type:ContainerEmpty
|
||||
container: "light_bulb"
|
||||
steps:
|
||||
- tool: Screwing
|
||||
doAfter: 2.0
|
||||
completed:
|
||||
- !type:SpawnPrototype
|
||||
prototype: SteelSheet1
|
||||
amount: 2
|
||||
- !type:DeleteEntity {}
|
||||
- node: bulbLight
|
||||
entity: PoweredSmallLightEmpty
|
||||
edges:
|
||||
- to: start
|
||||
conditions:
|
||||
- !type:ContainerEmpty
|
||||
container: "light_bulb"
|
||||
steps:
|
||||
- tool: Screwing
|
||||
doAfter: 2.0
|
||||
completed:
|
||||
- !type:SpawnPrototype
|
||||
prototype: SteelSheet1
|
||||
amount: 1
|
||||
- !type:DeleteEntity {}
|
||||
36
Resources/Prototypes/Recipes/Construction/lighting.yml
Normal file
36
Resources/Prototypes/Recipes/Construction/lighting.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
- type: construction
|
||||
name: wall light
|
||||
id: LightTubeFixture
|
||||
graph: lightFixture
|
||||
startNode: start
|
||||
targetNode: tubeLight
|
||||
category: Structures
|
||||
description: A wall light fixture. Use light tubes.
|
||||
icon:
|
||||
sprite: Constructible/Lighting/light_tube.rsi
|
||||
state: off
|
||||
objectType: Structure
|
||||
placementMode: WallmountLight
|
||||
canRotate: true
|
||||
canBuildInImpassable: true
|
||||
conditions:
|
||||
- !type:WallmountCondition {}
|
||||
|
||||
- type: construction
|
||||
name: small wall light
|
||||
id: LightSmallFixture
|
||||
graph: lightFixture
|
||||
startNode: start
|
||||
targetNode: bulbLight
|
||||
category: Structures
|
||||
description: A wall light fixture. Use light bulbs.
|
||||
icon:
|
||||
sprite: Constructible/Lighting/light_small.rsi
|
||||
state: off
|
||||
objectType: Structure
|
||||
placementMode: WallmountLight
|
||||
canRotate: true
|
||||
canBuildInImpassable: true
|
||||
conditions:
|
||||
- !type:WallmountCondition {}
|
||||
|
||||
Reference in New Issue
Block a user