Skip to content

Commit

Permalink
Merge pull request #9 from She-Is-Trying-To-Form-Her-First-Thought/ya…
Browse files Browse the repository at this point in the history
…kuza

Yakuza
  • Loading branch information
Paxilmaniac authored Nov 20, 2024
2 parents d3ab7c5 + 58d8410 commit b109149
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 22 deletions.
4 changes: 2 additions & 2 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@
/// Proc to append behavior related to lying down.
/mob/living/proc/on_lying_down(new_lying_angle)
if(layer == initial(layer)) //to avoid things like hiding larvas.
layer = LYING_MOB_LAYER //so mob lying always appear behind standing mobs
layer = OBJ_LAYER // DOPPLETHAL EDIT - layer = LYING_MOB_LAYER //so mob lying always appear behind standing mobs
add_traits(list(TRAIT_UI_BLOCKED, TRAIT_PULL_BLOCKED, TRAIT_UNDENSE), LYING_DOWN_TRAIT)
if(HAS_TRAIT(src, TRAIT_FLOORED) && !(dir & (NORTH|SOUTH)))
setDir(pick(NORTH, SOUTH)) // We are and look helpless.
Expand All @@ -733,7 +733,7 @@

/// Proc to append behavior related to lying down.
/mob/living/proc/on_standing_up()
if(layer == LYING_MOB_LAYER)
if(layer == OBJ_LAYER) // DOPPLETHAL EDIT - if(layer == LYING_MOB_LAYER)
layer = initial(layer)
remove_traits(list(TRAIT_UI_BLOCKED, TRAIT_PULL_BLOCKED, TRAIT_UNDENSE), LYING_DOWN_TRAIT)
// Make sure it doesn't go out of the southern bounds of the tile when standing.
Expand Down
3 changes: 2 additions & 1 deletion code/modules/projectiles/boxes_magazines/_box_magazine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@
for(var/obj/item/ammo_casing/casing in other_box.ammo_list())
var/did_load = give_round(casing, replace_spent)
if(did_load)
other_box.stored_ammo -= casing
if(other_box.stored_ammo) // DOPPLETHAL EDIT - other_box.stored_ammo -= casing
other_box.stored_ammo -= casing // DOPPLETHAL EDIT ADDITION
num_loaded++
if(!did_load || !multiload)
break
Expand Down
28 changes: 14 additions & 14 deletions modular_doppler/pixel_shift/code/pixel_shift_component.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
passthroughable = NONE
if(is_shifted)
var/mob/living/owner = parent
owner.pixel_x = owner.body_position_pixel_x_offset + owner.base_pixel_x
owner.pixel_y = owner.body_position_pixel_y_offset + owner.base_pixel_y
owner.pixel_w = owner.body_position_pixel_x_offset + owner.base_pixel_x
owner.pixel_z = owner.body_position_pixel_y_offset + owner.base_pixel_y
qdel(src)

/// In-turf pixel movement which can allow things to pass through if the threshold is met.
Expand All @@ -72,29 +72,29 @@
var/mob/living/owner = parent
switch(direct)
if(NORTH)
if(owner.pixel_y <= maximum_pixel_shift + owner.base_pixel_y)
owner.pixel_y++
if(owner.pixel_z <= maximum_pixel_shift + owner.base_pixel_y)
owner.pixel_z++
is_shifted = TRUE
if(EAST)
if(owner.pixel_x <= maximum_pixel_shift + owner.base_pixel_x)
owner.pixel_x++
if(owner.pixel_w <= maximum_pixel_shift + owner.base_pixel_x)
owner.pixel_w++
is_shifted = TRUE
if(SOUTH)
if(owner.pixel_y >= 0 + owner.base_pixel_y) // LETHAL EDIT - if(owner.pixel_y >= -maximum_pixel_shift + owner.base_pixel_y)
owner.pixel_y--
if(owner.pixel_z >= -maximum_pixel_shift + owner.base_pixel_y)
owner.pixel_z--
is_shifted = TRUE
if(WEST)
if(owner.pixel_x >= -maximum_pixel_shift + owner.base_pixel_x)
owner.pixel_x--
if(owner.pixel_w >= -maximum_pixel_shift + owner.base_pixel_x)
owner.pixel_w--
is_shifted = TRUE

// Yes, I know this sets it to true for everything if more than one is matched.
// Movement doesn't check diagonals, and instead just checks EAST or WEST, depending on where you are for those.
if(owner.pixel_y > passable_shift_threshold)
if(owner.pixel_z > passable_shift_threshold)
passthroughable |= EAST | SOUTH | WEST
else if(owner.pixel_y < -passable_shift_threshold)
else if(owner.pixel_z < -passable_shift_threshold)
passthroughable |= NORTH | EAST | WEST
if(owner.pixel_x > passable_shift_threshold)
if(owner.pixel_w > passable_shift_threshold)
passthroughable |= NORTH | SOUTH | WEST
else if(owner.pixel_x < -passable_shift_threshold)
else if(owner.pixel_w < -passable_shift_threshold)
passthroughable |= NORTH | EAST | SOUTH
4 changes: 2 additions & 2 deletions modular_lethal_doppler/ammo_stacks/code/ammo_stack_base.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@
return

var/obj/item/ammo_box/magazine/ammo_stack = new ammo_stack_type(drop_location())
user.transferItemToLoc(src, ammo_stack, silent = TRUE)
//user.transferItemToLoc(src, ammo_stack, silent = TRUE)
ammo_stack.give_round(src)
user.transferItemToLoc(ammo_casing, ammo_stack, silent = TRUE)
//user.transferItemToLoc(ammo_casing, ammo_stack, silent = TRUE)
ammo_stack.give_round(ammo_casing)
user.put_in_hands(ammo_stack)
ammo_stack.update_appearance()
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@
shoes = /obj/item/clothing/shoes/jackboots/frontier_colonist
gloves = /obj/item/clothing/gloves/frontier_colonist
back = /obj/item/storage/backpack/industrial/frontier_colonist

/obj/structure/mystery_box
base_pixel_y = 0
pixel_y = 0
17 changes: 16 additions & 1 deletion modular_lethal_doppler/wallem/code/super_doors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,27 @@
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
if(!prob(door_kick_chance))
playsound(src, kick_fail_sound, 100, TRUE, 3)
Shake(1, 1, 1 SECONDS)
stop_telegraph(telegraph_turf)
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
else
Open(TRUE)
chief_kickabitch_from_the_casino(user, telegraph_turf)
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN

/obj/structure/mineral_door/lethal/CanPass(atom/movable/mover, border_dir)
. = ..()
if(isliving(mover) && mover.throwing)
INVOKE_ASYNC(src, PROC_REF(crash_addiction), mover)
return TRUE
return .

/// Crashes the door open if someone gets thrown into it
/obj/structure/mineral_door/lethal/proc/crash_addiction(mob/living/crashed_mob)
if(!door_opened)
crashed_mob.Knockdown(3 SECONDS)
Open(TRUE)

/// Warns people on the other side of a door that it's about to be kicked open (and dangerous)
/obj/structure/mineral_door/lethal/proc/telegraph_kick(mob/user)
var/turf/turf_to_telegraph = get_step(src, get_dir(user, src))
Expand Down Expand Up @@ -100,7 +114,7 @@
if(isliving(user))
if(!can_interact(user))
return
if(!do_after(user, 2 SECONDS, src))
if(!do_after(user, 1.5 SECONDS, src))
return
SwitchState()
else if(ismecha(user))
Expand All @@ -110,6 +124,7 @@
if(!kicked)
playsound(src, openSound, 50, TRUE)
else
Shake(1, 1, 1 SECONDS)
playsound(src, kick_success_sound, 100, TRUE, 3)
set_opacity(FALSE)
set_density(FALSE)
Expand Down
2 changes: 1 addition & 1 deletion modular_lethal_doppler/wallem/code/wall_cladding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
icon = 'modular_lethal_doppler/wallem/icons/cladding.dmi'
icon_state = "basic_big"
SET_BASE_PIXEL(0, 22)
layer = ABOVE_WINDOW_LAYER
layer = TABLE_LAYER
anchored = TRUE
density = FALSE
max_integrity = 200
Expand Down
2 changes: 1 addition & 1 deletion modular_lethal_doppler/wallem/code/wallening_real.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

/turf/closed
plane = GAME_PLANE
layer = ABOVE_WINDOW_LAYER
layer = OPEN_DOOR_LAYER

/turf/closed/Initialize(mapload)
. = ..()
Expand Down
29 changes: 29 additions & 0 deletions modular_lethal_doppler/wallem/code/windows.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/obj/structure/window/fulltile
change_layer_on_rotation = FALSE
icon = 'icons/icon_cutter_deez/windows/window.dmi'

/obj/structure/window/reinforced/fulltile
Expand Down Expand Up @@ -44,6 +45,34 @@
smoothing_flags = SMOOTH_BITMASK|SMOOTH_BORDER_OBJECT|SMOOTH_OBJ
canSmoothWith = SMOOTH_GROUP_WINDOW_DIRECIONAL
smoothing_groups = SMOOTH_GROUP_WINDOW_DIRECIONAL + SMOOTH_GROUP_CLOSED_TURFS
/// Do we change layer based on rotation?
var/change_layer_on_rotation = TRUE

/obj/structure/window/Initialize(mapload)
. = ..()
if(change_layer_on_rotation)
RegisterSignal(src, COMSIG_ATOM_DIR_CHANGE, PROC_REF(on_change_layer))
adjust_dir_layer(dir)

/// Reads if the window has rotated
/obj/structure/window/proc/on_change_layer(datum/source, old_dir, new_dir)
SIGNAL_HANDLER
adjust_dir_layer(new_dir)

/// Changes the window's layer based on rotation
/obj/structure/window/proc/adjust_dir_layer(direction)
if(direction & NORTH)
layer = TABLE_LAYER
base_pixel_z = -16
base_pixel_y = 16
if(direction & SOUTH)
layer = ABOVE_MOB_LAYER
base_pixel_z = 0
base_pixel_y = 0
else
layer = initial(layer)
base_pixel_z = 0
base_pixel_y = 0

/obj/structure/window/update_icon_state()
. = ..()
Expand Down

0 comments on commit b109149

Please sign in to comment.