Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autodoc rebuff, wrong modes no longer voteable, shotgun special ammo sound buff, SO novice surgery #10

Merged
merged 6 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/controllers/configuration/entries/general.dm
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ Voting

// Gamemode to auto-switch to at the start of the round
/datum/config_entry/string/gamemode_default
config_entry_value = "Extended"
config_entry_value = "Distress Signal: Lowpop"

/datum/config_entry/number/rounds_until_hard_restart
config_entry_value = -1 // -1 is disabled by default, 0 is every round, x is after so many rounds
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ SUBSYSTEM_DEF(ticker)
if(mode)
GLOB.master_mode = SSmapping.configs[GROUND_MAP].force_mode ? SSmapping.configs[GROUND_MAP].force_mode : mode
else
GLOB.master_mode = "Extended"
GLOB.master_mode = "Distress Signal: Lowpop"
log_game("Saved mode is '[GLOB.master_mode]'")


Expand Down
3 changes: 3 additions & 0 deletions code/datums/ammo/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
/// The flicker that plays when a bullet hits a target. Usually red. Can be nulled so it doesn't show up at all.
var/hit_effect_color = "#FF0000"

/// Changes the freq of firing sound based on ammo type
var/firing_freq_offset = FALSE

/datum/ammo/New()
set_bullet_traits()

Expand Down
2 changes: 2 additions & 0 deletions code/datums/ammo/bullet/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
damage = 140
penetration = ARMOR_PENETRATION_TIER_4
bonus_projectiles_amount = EXTRA_PROJECTILES_TIER_6
firing_freq_offset = SOUND_FREQ_LOW

//buckshot variant only used by the masterkey shotgun attachment.
/datum/ammo/bullet/shotgun/buckshot/masterkey
Expand Down Expand Up @@ -196,6 +197,7 @@
max_range = 8
damage = 140
penetration = ARMOR_PENETRATION_TIER_4
firing_freq_offset = SOUND_FREQ_LOW

/*
8 GAUGE SHOTGUN AMMO
Expand Down
1 change: 1 addition & 0 deletions code/datums/skills/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ COMMAND STAFF
SKILL_VEHICLE = SKILL_VEHICLE_SMALL,
SKILL_JTAC = SKILL_JTAC_EXPERT,
SKILL_INTEL = SKILL_INTEL_TRAINED,
SKILL_SURGERY = SKILL_SURGERY_NOVICE,
)

/datum/skills/SEA
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "Distress Signal: Lowpop"
config_tag = "Distress Signal: Lowpop"
required_players = 0
votable = TRUE

flags_round_type = MODE_INFESTATION|MODE_NEW_SPAWN

Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/colonialmarines/whiskey_outpost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

hardcore = TRUE

votable = TRUE
votable = FALSE
vote_cycle = 25 // approx. once every 5 days, if it wins the vote

taskbar_icon = 'icons/taskbar/gml_wo.png'
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var/global/cas_tracking_id_increment = 0 //this var used to assign unique tracki
/datum/game_mode
var/name = "invalid"
var/config_tag = null
var/votable = TRUE
var/votable = FALSE
var/vote_cycle = null
var/probability = 0
var/list/datum/mind/modePlayer = new
Expand Down
23 changes: 22 additions & 1 deletion code/game/machinery/medical_pod/autodoc.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//Autodoc
/obj/structure/machinery/medical_pod/autodoc
name = "\improper autodoc emergency medical system"
desc = "An emergency surgical device designed to perform life-saving treatments and basic surgeries on patients automatically, without the need of a surgeon. <br>It still requires someone with medical knowledge to program the treatments correctly; for this reason, colonies that use these often have paramedics trained in autodoc operation."
desc = "A fancy machine developed to be capable of operating on people with minimal human intervention. The interface is rather complex and would only be useful to trained Doctors however."
icon_state = "autodoc_open"

entry_timer = 2 SECONDS
Expand Down Expand Up @@ -36,6 +36,11 @@
else
icon_state = "autodoc_open"

/obj/structure/machinery/medical_pod/autodoc/get_examine_text(mob/user)
. = ..()
if(ishuman(user))
. += SPAN_NOTICE("It has [stored_metal] metal available for limb replacements.")

/obj/structure/machinery/medical_pod/autodoc/Initialize()
. = ..()
connect_autodoc_console()
Expand Down Expand Up @@ -730,10 +735,22 @@
dat += "<a href='?src=\ref[src];brute=1'>Brute Damage Treatment</a><br>"
if(isnull(surgeryqueue["burn"]))
dat += "<a href='?src=\ref[src];burn=1'>Burn Damage Treatment</a><br>"
dat += "<b>Orthopedic Surgeries</b>"
dat += "<br>"
if(isnull(surgeryqueue["broken"]))
dat += "<a href='?src=\ref[src];broken=1'>Broken Bone Surgery</a><br>"
if(isnull(surgeryqueue["internal"]))
dat += "<a href='?src=\ref[src];internal=1'>Internal Bleeding Surgery</a><br>"
if(isnull(surgeryqueue["open"]))
dat += "<a href='?src=\ref[src];open=1'>Close Open Incisions</a><br>"
if(isnull(surgeryqueue["shrapnel"]))
dat += "<a href='?src=\ref[src];shrapnel=1'>Shrapnel Removal Surgery</a><br>"
dat += "<b>Organ Surgeries</b>"
dat += "<br>"
if(isnull(surgeryqueue["eyes"]))
dat += "<a href='?src=\ref[src];eyes=1'>Corrective Eye Surgery</a><br>"
if(isnull(surgeryqueue["organdamage"]))
dat += "<a href='?src=\ref[src];organdamage=1'>Organ Damage Treatment</a><br>"
dat += "<b>Hematology Treatments</b>"
dat += "<br>"
if(isnull(surgeryqueue["blood"]))
Expand All @@ -743,6 +760,10 @@
if(isnull(surgeryqueue["toxin"]))
dat += "<a href='?src=\ref[src];toxin=1'>Bloodstream Toxin Removal</a><br>"
dat += "<br>"
if(isnull(surgeryqueue["facial"]))
dat += "<a href='?src=\ref[src];facial=1'>Facial Reconstruction Surgery</a><br>"
if(isnull(surgeryqueue["missing"]))
dat += "<a href='?src=\ref[src];missing=1'>Limb Replacement Surgery</a><hr>"
else
dat += "The autodoc is empty."
dat += text("<a href='?src=\ref[];mach_close=sleeper'>Close</a>", user)
Expand Down
13 changes: 8 additions & 5 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1677,6 +1677,11 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed

projectile_to_fire.shot_from = src

if(user)
projectile_to_fire.firer = user
if(isliving(user))
projectile_to_fire.def_zone = user.zone_selected

return 1

/obj/item/weapon/gun/proc/play_firing_sounds(obj/projectile/projectile_to_fire, mob/user)
Expand All @@ -1690,21 +1695,19 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed
if(projectile_to_fire.ammo && projectile_to_fire.ammo.sound_override)
actual_sound = projectile_to_fire.ammo.sound_override

projectile_to_fire.firer = user
if(isliving(user))
projectile_to_fire.def_zone = user.zone_selected

//Guns with low ammo have their firing sound
var/firing_sndfreq = (current_mag && (current_mag.current_rounds / current_mag.max_rounds) > GUN_LOW_AMMO_PERCENTAGE) ? FALSE : SOUND_FREQ_HIGH

firing_sndfreq = in_chamber.ammo.firing_freq_offset ? in_chamber.ammo.firing_freq_offset : firing_sndfreq

//firing from an attachment
if(active_attachable && active_attachable.flags_attach_features & ATTACH_PROJECTILE)
if(active_attachable.fire_sound) //If we're firing from an attachment, use that noise instead.
playsound(user, active_attachable.fire_sound, 50)
else
if(!(flags_gun_features & GUN_SILENCED))
if (firing_sndfreq && fire_rattle)
playsound(user, fire_rattle, firesound_volume, FALSE)//if the gun has a unique 'mag rattle' SFX play that instead of pitch shifting.
playsound(user, fire_rattle, firesound_volume, FALSE) //if the gun has a unique 'mag rattle' SFX play that instead of pitch shifting.
else
playsound(user, actual_sound, firesound_volume, firing_sndfreq)
else
Expand Down
Loading