Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit b109149

Browse files
authored
Merge pull request #9 from She-Is-Trying-To-Form-Her-First-Thought/yakuza
Yakuza
2 parents d3ab7c5 + 58d8410 commit b109149

File tree

9 files changed

+71
-22
lines changed

9 files changed

+71
-22
lines changed

code/modules/mob/living/living.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@
723723
/// Proc to append behavior related to lying down.
724724
/mob/living/proc/on_lying_down(new_lying_angle)
725725
if(layer == initial(layer)) //to avoid things like hiding larvas.
726-
layer = LYING_MOB_LAYER //so mob lying always appear behind standing mobs
726+
layer = OBJ_LAYER // DOPPLETHAL EDIT - layer = LYING_MOB_LAYER //so mob lying always appear behind standing mobs
727727
add_traits(list(TRAIT_UI_BLOCKED, TRAIT_PULL_BLOCKED, TRAIT_UNDENSE), LYING_DOWN_TRAIT)
728728
if(HAS_TRAIT(src, TRAIT_FLOORED) && !(dir & (NORTH|SOUTH)))
729729
setDir(pick(NORTH, SOUTH)) // We are and look helpless.
@@ -733,7 +733,7 @@
733733

734734
/// Proc to append behavior related to lying down.
735735
/mob/living/proc/on_standing_up()
736-
if(layer == LYING_MOB_LAYER)
736+
if(layer == OBJ_LAYER) // DOPPLETHAL EDIT - if(layer == LYING_MOB_LAYER)
737737
layer = initial(layer)
738738
remove_traits(list(TRAIT_UI_BLOCKED, TRAIT_PULL_BLOCKED, TRAIT_UNDENSE), LYING_DOWN_TRAIT)
739739
// Make sure it doesn't go out of the southern bounds of the tile when standing.

code/modules/projectiles/boxes_magazines/_box_magazine.dm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@
171171
for(var/obj/item/ammo_casing/casing in other_box.ammo_list())
172172
var/did_load = give_round(casing, replace_spent)
173173
if(did_load)
174-
other_box.stored_ammo -= casing
174+
if(other_box.stored_ammo) // DOPPLETHAL EDIT - other_box.stored_ammo -= casing
175+
other_box.stored_ammo -= casing // DOPPLETHAL EDIT ADDITION
175176
num_loaded++
176177
if(!did_load || !multiload)
177178
break

modular_doppler/pixel_shift/code/pixel_shift_component.dm

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
passthroughable = NONE
6363
if(is_shifted)
6464
var/mob/living/owner = parent
65-
owner.pixel_x = owner.body_position_pixel_x_offset + owner.base_pixel_x
66-
owner.pixel_y = owner.body_position_pixel_y_offset + owner.base_pixel_y
65+
owner.pixel_w = owner.body_position_pixel_x_offset + owner.base_pixel_x
66+
owner.pixel_z = owner.body_position_pixel_y_offset + owner.base_pixel_y
6767
qdel(src)
6868

6969
/// In-turf pixel movement which can allow things to pass through if the threshold is met.
@@ -72,29 +72,29 @@
7272
var/mob/living/owner = parent
7373
switch(direct)
7474
if(NORTH)
75-
if(owner.pixel_y <= maximum_pixel_shift + owner.base_pixel_y)
76-
owner.pixel_y++
75+
if(owner.pixel_z <= maximum_pixel_shift + owner.base_pixel_y)
76+
owner.pixel_z++
7777
is_shifted = TRUE
7878
if(EAST)
79-
if(owner.pixel_x <= maximum_pixel_shift + owner.base_pixel_x)
80-
owner.pixel_x++
79+
if(owner.pixel_w <= maximum_pixel_shift + owner.base_pixel_x)
80+
owner.pixel_w++
8181
is_shifted = TRUE
8282
if(SOUTH)
83-
if(owner.pixel_y >= 0 + owner.base_pixel_y) // LETHAL EDIT - if(owner.pixel_y >= -maximum_pixel_shift + owner.base_pixel_y)
84-
owner.pixel_y--
83+
if(owner.pixel_z >= -maximum_pixel_shift + owner.base_pixel_y)
84+
owner.pixel_z--
8585
is_shifted = TRUE
8686
if(WEST)
87-
if(owner.pixel_x >= -maximum_pixel_shift + owner.base_pixel_x)
88-
owner.pixel_x--
87+
if(owner.pixel_w >= -maximum_pixel_shift + owner.base_pixel_x)
88+
owner.pixel_w--
8989
is_shifted = TRUE
9090

9191
// Yes, I know this sets it to true for everything if more than one is matched.
9292
// Movement doesn't check diagonals, and instead just checks EAST or WEST, depending on where you are for those.
93-
if(owner.pixel_y > passable_shift_threshold)
93+
if(owner.pixel_z > passable_shift_threshold)
9494
passthroughable |= EAST | SOUTH | WEST
95-
else if(owner.pixel_y < -passable_shift_threshold)
95+
else if(owner.pixel_z < -passable_shift_threshold)
9696
passthroughable |= NORTH | EAST | WEST
97-
if(owner.pixel_x > passable_shift_threshold)
97+
if(owner.pixel_w > passable_shift_threshold)
9898
passthroughable |= NORTH | SOUTH | WEST
99-
else if(owner.pixel_x < -passable_shift_threshold)
99+
else if(owner.pixel_w < -passable_shift_threshold)
100100
passthroughable |= NORTH | EAST | SOUTH

modular_lethal_doppler/ammo_stacks/code/ammo_stack_base.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@
8787
return
8888

8989
var/obj/item/ammo_box/magazine/ammo_stack = new ammo_stack_type(drop_location())
90-
user.transferItemToLoc(src, ammo_stack, silent = TRUE)
90+
//user.transferItemToLoc(src, ammo_stack, silent = TRUE)
9191
ammo_stack.give_round(src)
92-
user.transferItemToLoc(ammo_casing, ammo_stack, silent = TRUE)
92+
//user.transferItemToLoc(ammo_casing, ammo_stack, silent = TRUE)
9393
ammo_stack.give_round(ammo_casing)
9494
user.put_in_hands(ammo_stack)
9595
ammo_stack.update_appearance()

modular_lethal_doppler/wallem/code/deathmatch_for_some_reason.dm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@
1818
shoes = /obj/item/clothing/shoes/jackboots/frontier_colonist
1919
gloves = /obj/item/clothing/gloves/frontier_colonist
2020
back = /obj/item/storage/backpack/industrial/frontier_colonist
21+
22+
/obj/structure/mystery_box
23+
base_pixel_y = 0
24+
pixel_y = 0

modular_lethal_doppler/wallem/code/super_doors.dm

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,27 @@
5353
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
5454
if(!prob(door_kick_chance))
5555
playsound(src, kick_fail_sound, 100, TRUE, 3)
56+
Shake(1, 1, 1 SECONDS)
5657
stop_telegraph(telegraph_turf)
5758
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
5859
else
5960
Open(TRUE)
6061
chief_kickabitch_from_the_casino(user, telegraph_turf)
6162
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
6263

64+
/obj/structure/mineral_door/lethal/CanPass(atom/movable/mover, border_dir)
65+
. = ..()
66+
if(isliving(mover) && mover.throwing)
67+
INVOKE_ASYNC(src, PROC_REF(crash_addiction), mover)
68+
return TRUE
69+
return .
70+
71+
/// Crashes the door open if someone gets thrown into it
72+
/obj/structure/mineral_door/lethal/proc/crash_addiction(mob/living/crashed_mob)
73+
if(!door_opened)
74+
crashed_mob.Knockdown(3 SECONDS)
75+
Open(TRUE)
76+
6377
/// Warns people on the other side of a door that it's about to be kicked open (and dangerous)
6478
/obj/structure/mineral_door/lethal/proc/telegraph_kick(mob/user)
6579
var/turf/turf_to_telegraph = get_step(src, get_dir(user, src))
@@ -100,7 +114,7 @@
100114
if(isliving(user))
101115
if(!can_interact(user))
102116
return
103-
if(!do_after(user, 2 SECONDS, src))
117+
if(!do_after(user, 1.5 SECONDS, src))
104118
return
105119
SwitchState()
106120
else if(ismecha(user))
@@ -110,6 +124,7 @@
110124
if(!kicked)
111125
playsound(src, openSound, 50, TRUE)
112126
else
127+
Shake(1, 1, 1 SECONDS)
113128
playsound(src, kick_success_sound, 100, TRUE, 3)
114129
set_opacity(FALSE)
115130
set_density(FALSE)

modular_lethal_doppler/wallem/code/wall_cladding.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
icon = 'modular_lethal_doppler/wallem/icons/cladding.dmi'
55
icon_state = "basic_big"
66
SET_BASE_PIXEL(0, 22)
7-
layer = ABOVE_WINDOW_LAYER
7+
layer = TABLE_LAYER
88
anchored = TRUE
99
density = FALSE
1010
max_integrity = 200

modular_lethal_doppler/wallem/code/wallening_real.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
/turf/closed
55
plane = GAME_PLANE
6-
layer = ABOVE_WINDOW_LAYER
6+
layer = OPEN_DOOR_LAYER
77

88
/turf/closed/Initialize(mapload)
99
. = ..()

modular_lethal_doppler/wallem/code/windows.dm

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/obj/structure/window/fulltile
2+
change_layer_on_rotation = FALSE
23
icon = 'icons/icon_cutter_deez/windows/window.dmi'
34

45
/obj/structure/window/reinforced/fulltile
@@ -44,6 +45,34 @@
4445
smoothing_flags = SMOOTH_BITMASK|SMOOTH_BORDER_OBJECT|SMOOTH_OBJ
4546
canSmoothWith = SMOOTH_GROUP_WINDOW_DIRECIONAL
4647
smoothing_groups = SMOOTH_GROUP_WINDOW_DIRECIONAL + SMOOTH_GROUP_CLOSED_TURFS
48+
/// Do we change layer based on rotation?
49+
var/change_layer_on_rotation = TRUE
50+
51+
/obj/structure/window/Initialize(mapload)
52+
. = ..()
53+
if(change_layer_on_rotation)
54+
RegisterSignal(src, COMSIG_ATOM_DIR_CHANGE, PROC_REF(on_change_layer))
55+
adjust_dir_layer(dir)
56+
57+
/// Reads if the window has rotated
58+
/obj/structure/window/proc/on_change_layer(datum/source, old_dir, new_dir)
59+
SIGNAL_HANDLER
60+
adjust_dir_layer(new_dir)
61+
62+
/// Changes the window's layer based on rotation
63+
/obj/structure/window/proc/adjust_dir_layer(direction)
64+
if(direction & NORTH)
65+
layer = TABLE_LAYER
66+
base_pixel_z = -16
67+
base_pixel_y = 16
68+
if(direction & SOUTH)
69+
layer = ABOVE_MOB_LAYER
70+
base_pixel_z = 0
71+
base_pixel_y = 0
72+
else
73+
layer = initial(layer)
74+
base_pixel_z = 0
75+
base_pixel_y = 0
4776

4877
/obj/structure/window/update_icon_state()
4978
. = ..()

0 commit comments

Comments
 (0)