From ffc49f097224b028c1d4c70c7e21a22ed127a367 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Wed, 25 Jan 2017 21:23:54 +0100 Subject: Rewrite seating system Players no longer need to worry where to sit down. --- advtrains/advtrains_train_steam/depends.txt | 3 ++- advtrains/advtrains_train_steam/init.lua | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) (limited to 'advtrains/advtrains_train_steam') diff --git a/advtrains/advtrains_train_steam/depends.txt b/advtrains/advtrains_train_steam/depends.txt index 6f00bf6..1fb6665 100644 --- a/advtrains/advtrains_train_steam/depends.txt +++ b/advtrains/advtrains_train_steam/depends.txt @@ -1 +1,2 @@ -advtrains \ No newline at end of file +advtrains +intllib? \ No newline at end of file diff --git a/advtrains/advtrains_train_steam/init.lua b/advtrains/advtrains_train_steam/init.lua index ca366db..e489fd4 100644 --- a/advtrains/advtrains_train_steam/init.lua +++ b/advtrains/advtrains_train_steam/init.lua @@ -17,14 +17,23 @@ advtrains.register_wagon("newlocomotive", { attach_offset={x=-5, y=10, z=-10}, view_offset={x=0, y=6, z=0}, driving_ctrl_access=true, + group = "dstand", }, { name=S("Driver Stand (right)"), attach_offset={x=5, y=10, z=-10}, view_offset={x=0, y=6, z=0}, driving_ctrl_access=true, + group = "dstand", }, }, + seat_groups = { + dstand={ + name = "Driver Stand", + access_to = {}, + }, + }, + assign_to_seat_group = {"dstand"}, visual_size = {x=1, y=1}, wagon_span=1.85, collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0}, @@ -76,14 +85,23 @@ advtrains.register_wagon("detailed_steam_engine", { attach_offset={x=-5, y=10, z=-10}, view_offset={x=0, y=6, z=0}, driving_ctrl_access=true, + group = "dstand", }, { name=S("Driver Stand (right)"), attach_offset={x=5, y=10, z=-10}, view_offset={x=0, y=6, z=0}, driving_ctrl_access=true, + group = "dstand", + }, + }, + seat_groups = { + dstand={ + name = "Driver Stand", + access_to = {}, }, }, + assign_to_seat_group = {"dstand"}, visual_size = {x=1, y=1}, wagon_span=2.05, collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0}, @@ -133,23 +151,34 @@ advtrains.register_wagon("wagon_default", { name="1", attach_offset={x=-4, y=8, z=8}, view_offset={x=0, y=0, z=0}, + group="pass", }, { name="2", attach_offset={x=4, y=8, z=8}, view_offset={x=0, y=0, z=0}, + group="pass", }, { name="3", attach_offset={x=-4, y=8, z=-8}, view_offset={x=0, y=0, z=0}, + group="pass", }, { name="4", attach_offset={x=4, y=8, z=-8}, view_offset={x=0, y=0, z=0}, + group="pass", + }, + }, + seat_groups = { + pass={ + name = "Passenger area", + access_to = {}, }, }, + assign_to_seat_group = {"pass"}, visual_size = {x=1, y=1}, wagon_span=3.1, collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0}, -- cgit v1.2.3