Skip to content

Commit

Permalink
Merge pull request #3529 from MistakeNot4892/devupdate
Browse files Browse the repository at this point in the history
Dev update from staging/stable
  • Loading branch information
MistakeNot4892 authored Dec 13, 2023
2 parents 56625c9 + 829a65f commit e442b7e
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 24 deletions.
3 changes: 3 additions & 0 deletions code/_helpers/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/old_icon1 = T.icon
var/old_overlays = T.overlays.Copy()
var/old_underlays = T.underlays.Copy()
var/old_decals = T.decals?.Copy()

if(platingRequired)
if(istype(B, get_base_turf_by_area(B)))
Expand All @@ -605,8 +606,10 @@ Turf and target are seperate in case you want to teleport some distance from a t
X.set_dir(old_dir1)
X.icon_state = old_icon_state1
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
X.decals = old_decals
X.overlays = old_overlays
X.underlays = old_underlays
X.update_icon() // necessary to update decals properly

var/list/objs = new/list()
var/list/newobjs = new/list()
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/doors/windowdoor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
pry_mod = 0.5
base_type = /obj/machinery/door/window
frame_type = /obj/structure/windoor_assembly
set_dir_on_update = FALSE // these can properly face all 4 directions! don't force us into just 2!
var/base_state = "left"

/obj/machinery/door/window/get_auto_access()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@
src.visible_message("<B>[src]</B> [species.halloss_message]")
SET_STATUS_MAX(src, STAT_PARA, 10)

if(HAS_STATUS(src, STAT_PARA) ||HAS_STATUS(src, STAT_ASLEEP))
if(HAS_STATUS(src, STAT_PARA) || HAS_STATUS(src, STAT_ASLEEP))
SET_STATUS_MAX(src, STAT_BLIND, 2)
set_stat(UNCONSCIOUS)
animate_tail_reset()
Expand Down
22 changes: 11 additions & 11 deletions code/modules/mob/living/silicon/robot/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,33 +73,33 @@
if(HAS_STATUS(src, STAT_ASLEEP))
SET_STATUS_MAX(src, STAT_PARA, 3)

if(src.resting)
if(resting)
SET_STATUS_MAX(src, STAT_WEAK, 5)

if(health < config.health_threshold_dead && src.stat != DEAD) //die only once
if(health < config.health_threshold_dead && stat != DEAD) //die only once
death()

if (src.stat != DEAD) //Alive.
if (incapacitated(INCAPACITATION_DISRUPTED) || !has_power)
src.set_stat(UNCONSCIOUS)
if (stat != DEAD) //Alive.
// This previously used incapacitated(INCAPACITATION_DISRUPTED) but that was setting the robot to be permanently unconscious, which isn't ideal.
if(!has_power || incapacitated(INCAPACITATION_STUNNED) || HAS_STATUS(src, STAT_PARA))
SET_STATUS_MAX(src, STAT_BLIND, 2)
else //Not stunned.
src.set_stat(CONSCIOUS)
set_stat(UNCONSCIOUS)
else
set_stat(CONSCIOUS)

else //Dead.
cameranet.update_visibility(src, FALSE)
SET_STATUS_MAX(src, STAT_BLIND, 2)
src.set_stat(DEAD)

src.set_density(!src.lying)
if(src.sdisabilities & BLINDED)
set_density(!lying)
if(sdisabilities & BLINDED)
SET_STATUS_MAX(src, STAT_BLIND, 2)

if(src.sdisabilities & DEAFENED)
src.set_status(STAT_DEAF, 1)

//update the state of modules and components here
if (src.stat != CONSCIOUS)
if (stat != CONSCIOUS)
uneq_all()

if(silicon_radio)
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/silicon/silicon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@
os.Process()

/mob/living/silicon/handle_flashed(var/obj/item/flash/flash, var/flash_strength)
SET_STATUS_MAX(src, STAT_PARA, flash_strength)
SET_STATUS_MAX(src, STAT_WEAK, flash_strength)
return TRUE

Expand Down
3 changes: 0 additions & 3 deletions code/modules/mob/mob_status.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
/mob/proc/clear_status_effects()
return

/mob/proc/handle_status_condition(var/condition)
return

/mob/proc/set_status(var/condition, var/amount)
return
20 changes: 13 additions & 7 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -654,12 +654,6 @@
if(usr == loc)
toggle_safety(usr)

/obj/item/gun/CtrlClick(var/mob/user)
if(loc == user)
toggle_safety(user)
return TRUE
. = ..()

/obj/item/gun/proc/safety()
return has_safety && safety_state

Expand Down Expand Up @@ -718,4 +712,16 @@
return FALSE
if(get_active_hand() != autofiring || incapacitated())
return FALSE
return TRUE
return TRUE

/obj/item/gun/get_alt_interactions(mob/user)
. = ..()
LAZYADD(., /decl/interaction_handler/toggle_safety)

/decl/interaction_handler/toggle_safety
name = "Toggle Gun Safety"
expected_target_type = /obj/item/gun

/decl/interaction_handler/toggle_safety/invoked(atom/target, mob/user, obj/item/prop)
var/obj/item/gun/gun = target
gun.toggle_safety(user)
6 changes: 4 additions & 2 deletions code/modules/projectiles/guns/projectile/bolt_action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
handle_casings = HOLD_CASINGS
load_method = SINGLE_CASING
max_shells = 1
ammo_type = /obj/item/ammo_casing/shell
ammo_type = /obj/item/ammo_casing/rifle
one_hand_penalty = 2
load_sound = 'sound/weapons/guns/interaction/rifle_load.ogg'
fire_delay = 8
Expand Down Expand Up @@ -49,6 +49,7 @@
unload_shell()
else
to_chat(user, "<span class='notice'>You work the bolt open.</span>")
playsound(src.loc, 'sound/weapons/guns/interaction/rifle_boltback.ogg', 50, 1)
else
to_chat(user, "<span class='notice'>You work the bolt closed.</span>")
playsound(src.loc, 'sound/weapons/guns/interaction/rifle_boltforward.ogg', 50, 1)
Expand Down Expand Up @@ -85,4 +86,5 @@
bulk = 8
scoped_accuracy = 8 //increased accuracy over the LWAP because only one shot
scope_zoom = 2
fire_delay = 12
fire_delay = 12
ammo_type = /obj/item/ammo_casing/shell
12 changes: 12 additions & 0 deletions code/modules/reagents/reagent_containers/drinkingglass/shaker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@
/obj/item/chems/drinks/glass2/fitnessflask/proteinshake
name = "protein shake"

// This exists to let the name auto-set properly.
/decl/cocktail/proteinshake
name = "protein shake"
description = "A revolting slurry of protein and water, fortified with iron."
hidden_from_codex = TRUE
ratios = list(
/decl/material/liquid/nutriment = 2,
/decl/material/liquid/nutriment/protein = 1,
/decl/material/liquid/water = 3,
/decl/material/solid/metal/iron
)

/obj/item/chems/drinks/glass2/fitnessflask/proteinshake/populate_reagents()
reagents.add_reagent(/decl/material/liquid/nutriment, 30)
reagents.add_reagent(/decl/material/solid/metal/iron, 10)
Expand Down
Binary file modified icons/obj/guns/bolt_action.dmi
Binary file not shown.

0 comments on commit e442b7e

Please sign in to comment.