# HG changeset patch # User Jeremy Thurgood # Date 1378584593 -7200 # Node ID 4abf8cf717e91447375df86b1714a7f2af2f17b5 # Parent 943d93b47c7774d0716f35b7b2f8cdf02e00eaa8 Rename "bulkhead" to "hatch". diff -r 943d93b47c77 -r 4abf8cf717e9 data/levels/alientunnel2 --- a/data/levels/alientunnel2 Sat Sep 07 22:10:12 2013 +0200 +++ b/data/levels/alientunnel2 Sat Sep 07 22:09:53 2013 +0200 @@ -76,8 +76,8 @@ - [1100, 800] - [1100, 1000] - door_switch - classname: Bulkhead - name: switch_bulkhead + classname: Hatch + name: switch_hatch lines: - - [1100, 800] - [1100, 400] diff -r 943d93b47c77 -r 4abf8cf717e9 data/levels/hangar --- a/data/levels/hangar Sat Sep 07 22:10:12 2013 +0200 +++ b/data/levels/hangar Sat Sep 07 22:09:53 2013 +0200 @@ -90,8 +90,8 @@ - [280, 1160] - [280, 1260] - maint_output - classname: Bulkhead - name: maint_bulkhead + classname: Hatch + name: maint_hatch - args: [maint_switch_1, maint_switch_2, maint_toggle_1, maint_toggle_2] classname: puzzle.StateLogicalAndPuzzler name: maint_output diff -r 943d93b47c77 -r 4abf8cf717e9 data/levels/level1 --- a/data/levels/level1 Sat Sep 07 22:10:12 2013 +0200 +++ b/data/levels/level1 Sat Sep 07 22:09:53 2013 +0200 @@ -46,8 +46,8 @@ - [800, 680] - [900, 680] - door_switch - classname: Bulkhead - name: switch_bulkhead + classname: Hatch + name: switch_hatch - args: - [410, 400] - level2 diff -r 943d93b47c77 -r 4abf8cf717e9 data/levels/sheep --- a/data/levels/sheep Sat Sep 07 22:10:12 2013 +0200 +++ b/data/levels/sheep Sat Sep 07 22:09:53 2013 +0200 @@ -32,8 +32,8 @@ - [700, 700] - [800, 700] - sheep_pen - classname: Bulkhead - name: sheep_bulkhead + classname: Hatch + name: sheep_hatch - args: - [750, 750] - keycard_green diff -r 943d93b47c77 -r 4abf8cf717e9 data/levels/start --- a/data/levels/start Sat Sep 07 22:10:12 2013 +0200 +++ b/data/levels/start Sat Sep 07 22:09:53 2013 +0200 @@ -39,8 +39,8 @@ - [225, 250] - [225, 350] - cockpit_switch - classname: Bulkhead - name: cockpit_bulkhead + classname: Hatch + name: cockpit_hatch - args: - [300, 225] classname: FloorSwitch @@ -49,8 +49,8 @@ - [250, 225] - [350, 225] - room_1_switch - classname: Bulkhead - name: room_1_bulkhead + classname: Hatch + name: room_1_hatch - args: - [550, 225] classname: FloorSwitch @@ -59,8 +59,8 @@ - [500, 225] - [600, 225] - room_2_switch - classname: Bulkhead - name: room_2_bulkhead + classname: Hatch + name: room_2_hatch - args: - [300, 375] classname: FloorSwitch @@ -69,8 +69,8 @@ - [250, 375] - [350, 375] - room_3_switch - classname: Bulkhead - name: room_3_bulkhead + classname: Hatch + name: room_3_hatch - args: - [550, 375] classname: FloorSwitch @@ -79,8 +79,8 @@ - [500, 375] - [600, 375] - room_4_switch - classname: Bulkhead - name: room_4_bulkhead + classname: Hatch + name: room_4_hatch lines: [] polygons: 1: diff -r 943d93b47c77 -r 4abf8cf717e9 nagslang/game_object.py --- a/nagslang/game_object.py Sat Sep 07 22:10:12 2013 +0200 +++ b/nagslang/game_object.py Sat Sep 07 22:09:53 2013 +0200 @@ -480,9 +480,7 @@ ("angle", "degrees"), ("key_item", "item name")] -class Bulkhead(GameObject): - # Yes, I know this should be "hatch" instead of "bulkhead". It was late and - # I was tired and the search/replace would touch *everything* now. +class Hatch(GameObject): zorder = ZORDER_FLOOR def __init__(self, space, end1, end2, key_state=None): @@ -493,9 +491,9 @@ puzzler = puzzle.YesPuzzler() else: puzzler = puzzle.StateProxyPuzzler(key_state) - super(Bulkhead, self).__init__( + super(Hatch, self).__init__( SingleShapePhysicser(space, self.shape), - render.BulkheadRenderer(), + render.HatchRenderer(), puzzler, ) diff -r 943d93b47c77 -r 4abf8cf717e9 nagslang/render.py --- a/nagslang/render.py Sat Sep 07 22:10:12 2013 +0200 +++ b/nagslang/render.py Sat Sep 07 22:09:53 2013 +0200 @@ -47,8 +47,8 @@ pass -class BulkheadRenderer(Renderer): - def draw_bulkhead_line(self, surface, a, b): +class HatchRenderer(Renderer): + def draw_hatch_line(self, surface, a, b): ai, bi = extend_line(a, b, -2) a, b, ai, bi = points_to_pygame(surface, (a, b, ai, bi)) pygame.draw.line( @@ -62,12 +62,12 @@ offset = vec_from_angle((shape.b - shape.a).angle, 10) ai = shape.a + offset bi = shape.b - offset - self.draw_bulkhead_line(surface, shape.a, ai) - self.draw_bulkhead_line(surface, bi, shape.b) + self.draw_hatch_line(surface, shape.a, ai) + self.draw_hatch_line(surface, bi, shape.b) else: mid = shape.a + (shape.b - shape.a) / 2 - self.draw_bulkhead_line(surface, shape.a, mid) - self.draw_bulkhead_line(surface, mid, shape.b) + self.draw_hatch_line(surface, shape.a, mid) + self.draw_hatch_line(surface, mid, shape.b) def image_pos(image, pos):