Skip to content

Commit

Permalink
Merge branch 'master' into Command-Area-Remake
Browse files Browse the repository at this point in the history
  • Loading branch information
LC4492 authored Aug 25, 2023
2 parents 872b6d9 + bab1225 commit 7b365ef
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 25 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/autowiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:

jobs:
autowiki:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: "Check for AUTOWIKI_USERNAME"
id: secrets_set
Expand All @@ -30,9 +30,6 @@ jobs:
- name: Install rust-g
if: steps.secrets_set.outputs.SECRETS_ENABLED
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install -o APT::Immediate-Configure=false libssl1.1:i386
bash tools/ci/install_rust_g.sh
- name: Compile and generate Autowiki files
if: steps.secrets_set.outputs.SECRETS_ENABLED
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/conflict.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
#define ATTACH_IGNORE_EMPTY (1<<5)
/// This attachment should activate if you attack() with it attached.
#define ATTACH_MELEE (1<<6)
/// Override for attachies so you can fire them with a single hand . ONLY FOR PROJECTILES!!
#define ATTACH_WIELD_OVERRIDE (1<<7)

//Ammo magazine defines, for flags_magazine

Expand Down
9 changes: 4 additions & 5 deletions code/game/objects/structures/blocker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
mouse_opacity = MOUSE_OPACITY_TRANSPARENT

/obj/structure/blocker/invisible_wall/Collided(atom/movable/AM)
to_chat(AM, SPAN_WARNING("You cannot go this way."))
var/msg = desc
if(!msg)
msg = "You cannot go this way."
to_chat(AM, SPAN_WARNING(msg))

/obj/structure/blocker/invisible_wall/New()
..()
Expand All @@ -35,10 +38,6 @@
desc = "You cannot wade out any further"
icon_state = "map_blocker"

/obj/structure/blocker/invisible_wall/water/Collided(atom/movable/AM)
to_chat(AM, SPAN_WARNING("You cannot wade out any further."))


/obj/structure/blocker/fog
name = "dense fog"
desc = "It looks way too dangerous to traverse. Best wait until it has cleared up."
Expand Down
9 changes: 2 additions & 7 deletions code/modules/mob/living/blood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@

if(stat != DEAD && bodytemperature >= 170) //Dead or cryosleep people do not pump the blood.
//Blood regeneration if there is some space
if(blood_volume < max_blood)
if(blood_volume < max_blood && nutrition >= 1)
blood_volume += 0.1 // regenerate blood VERY slowly
nutrition -= 0.25
else if(blood_volume > max_blood)
blood_volume -= 0.1 // The reverse in case we've gotten too much blood in our body
if(blood_volume > limit_blood)
Expand Down Expand Up @@ -43,12 +44,6 @@
if(oxyloss < maximum_oxyloss)
oxyloss += round(max(additional_oxyloss, 0))

//Bloodloss effects on nutrition
if(nutrition >= 300)
nutrition -= 10
else if(nutrition >= 200)
nutrition -= 3

switch(b_volume)
if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
if(prob(1))
Expand Down
17 changes: 10 additions & 7 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1343,11 +1343,10 @@ and you're good to go.

//The following relating to bursts was borrowed from Fire code.
var/check_for_attachment_fire = FALSE
if(active_attachable)
if(active_attachable.flags_attach_features & ATTACH_PROJECTILE)
check_for_attachment_fire = TRUE
else
active_attachable.activate_attachment(src, null, TRUE)//No way.
if(active_attachable?.flags_attach_features & ATTACH_PROJECTILE)
check_for_attachment_fire = TRUE
else
active_attachable.activate_attachment(src, null, TRUE)//No way.


var/bullets_to_fire = 1
Expand Down Expand Up @@ -1512,8 +1511,12 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed
if(flags_gun_features & GUN_TRIGGER_SAFETY)
to_chat(user, SPAN_WARNING("The safety is on!"))
return

if((flags_gun_features & GUN_WIELDED_FIRING_ONLY) && !(flags_item & WIELDED)) //If we're not holding the weapon with both hands when we should.
if(active_attachable)
if(active_attachable.flags_attach_features & ATTACH_PROJECTILE)
if(!(active_attachable.flags_attach_features & ATTACH_WIELD_OVERRIDE) && !(flags_item & WIELDED))
to_chat(user, SPAN_WARNING("You must wield [src] to fire [active_attachable]!"))
return
if((flags_gun_features & GUN_WIELDED_FIRING_ONLY) && !(flags_item & WIELDED) && !active_attachable) //If we're not holding the weapon with both hands when we should.
to_chat(user, SPAN_WARNING("You need a more secure grip to fire this weapon!"))
return

Expand Down
7 changes: 5 additions & 2 deletions code/modules/projectiles/gun_attachables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2363,7 +2363,7 @@ Defined in conflicts.dm of the #defines folder.
var/obj/item/weapon/gun/attached_gun = loc

if(!(attached_gun.flags_item & WIELDED))
to_chat(user, SPAN_WARNING("You must wield \the [attached_gun] to fire \the [src]!"))
to_chat(user, SPAN_WARNING("You must wield [attached_gun] to fire [src]!"))
return

if(current_rounds > round_usage_per_tile && ..())
Expand Down Expand Up @@ -2509,6 +2509,9 @@ Defined in conflicts.dm of the #defines folder.
/obj/item/attachable/attached_gun/extinguisher/fire_attachment(atom/target, obj/item/weapon/gun/gun, mob/living/user)
if(!internal_extinguisher)
return
if(!(gun.flags_item & WIELDED))
to_chat(user, SPAN_WARNING("You must wield [gun] to fire [src]!"))
return
if(..())
return internal_extinguisher.afterattack(target, user)

Expand Down Expand Up @@ -2569,7 +2572,7 @@ Defined in conflicts.dm of the #defines folder.
return

if((gun.flags_gun_features & GUN_WIELDED_FIRING_ONLY) && !(gun.flags_item & WIELDED))
to_chat(user, SPAN_WARNING("You need a more secure grip to fire this weapon!"))
to_chat(user, SPAN_WARNING("You must wield [gun] to fire [src]!"))
return

if(gun.flags_gun_features & GUN_TRIGGER_SAFETY)
Expand Down
5 changes: 5 additions & 0 deletions html/changelogs/AutoChangeLog-pr-4217.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
author: "Diegoflores31"
delete-after: True
changes:
- balance: "Masterkey and underbarrel extinguisher now must be wielded in order to be used."
- bugfix: "Underbarrel extinguisher no longer bypass wielding restrictions on flamers."
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-4231.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "Morrow"
delete-after: True
changes:
- balance: "You now lose nutrition when gaining blood rather than losing a ton of nutrition when you have low effective blood"
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-4247.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "realforest2001"
delete-after: True
changes:
- code_imp: "Changed backend for the message of walking into an invisible wall to reduce duplication."

0 comments on commit 7b365ef

Please sign in to comment.