Skip to content

Commit

Permalink
Merge pull request cmss13-devs#36 from VoiceInYourHead/campaign
Browse files Browse the repository at this point in the history
ROCK AND STONE
  • Loading branch information
VoiceInYourHead authored Aug 17, 2024
2 parents 5f1f484 + a5046ba commit ff8beb1
Show file tree
Hide file tree
Showing 47 changed files with 478 additions and 313 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/xeno_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define FIRE_PENALTY 25
#define SENTRY_PENALTY 25
#define VEHICLE_PENALTY 25
#define LOCKED_DOOR_PENALTY 25
#define WINDOW_FRAME_PENALTY 25
#define BARRICADE_PENALTY 50
#define WALL_PENALTY 100
Expand Down
1 change: 1 addition & 0 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ SUBSYSTEM_DEF(ticker)
/datum/controller/subsystem/ticker/proc/request_start()
if(current_state == GAME_STATE_PREGAME)
time_left = 0
delay_start = FALSE

// Killswitch if hanging or interrupted
if(SSnightmare.stat != NIGHTMARE_STATUS_DONE)
Expand Down
4 changes: 2 additions & 2 deletions code/datums/ammo/bullet/special_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@
icon_state = "bullet" // Keeping it bog standard with the turret but allows it to be changed

accurate_range = 12
damage = 35
damage = 40
penetration= ARMOR_PENETRATION_TIER_10 //Bumped the penetration to serve a different role from sentries, MGs are a bit more offensive
accuracy = HIT_ACCURACY_TIER_3
accuracy = HIT_ACCURACY_TIER_5

/datum/ammo/bullet/machinegun/set_bullet_traits()
. = ..()
Expand Down
4 changes: 0 additions & 4 deletions code/game/machinery/cryopod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,6 @@ GLOBAL_LIST_INIT(frozen_items, list(SQUAD_MARINE_1 = list(), SQUAD_MARINE_2 = li
var/willing = null //We don't want to allow people to be forced into despawning.
var/mob/living/M = G.grabbed_thing

if(M.stat == DEAD) //This mob is dead
to_chat(user, SPAN_WARNING("[src] immediately rejects [M]. \He passed away!"))
return

if(isxeno(M))
to_chat(user, SPAN_WARNING("There is no way [src] will accept [M]!"))
return
Expand Down
14 changes: 7 additions & 7 deletions code/game/machinery/doors/shutters.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@
/obj/structure/machinery/door/poddoor/shutters/finish_close()
operating = FALSE

/obj/structure/machinery/door/poddoor/shutters/attack_alien(mob/living/carbon/xenomorph/M)
if(density && !operating)
INVOKE_ASYNC(src, PROC_REF(pry_open), M)
return XENO_ATTACK_ACTION
else
. = ..(M)

/obj/structure/machinery/door/poddoor/shutters/almayer
icon = 'icons/obj/structures/doors/blastdoors_shutters.dmi'
openspeed = 4 //shorter open animation.
Expand Down Expand Up @@ -101,13 +108,6 @@
/obj/structure/machinery/door/poddoor/shutters/almayer/containment
unacidable = TRUE

/obj/structure/machinery/door/poddoor/shutters/almayer/containment/attack_alien(mob/living/carbon/xenomorph/M)
if(isqueen(M) && density && !operating)
INVOKE_ASYNC(src, PROC_REF(pry_open), M)
return XENO_ATTACK_ACTION
else
. = ..(M)

/obj/structure/machinery/door/poddoor/shutters/almayer/containment/pry_open(mob/living/carbon/xenomorph/X, time = 4 SECONDS)
. = ..()
if(. && !(stat & BROKEN))
Expand Down
8 changes: 7 additions & 1 deletion code/game/objects/items/reagent_containers/food/drinks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@

/obj/item/reagent_container/food/drinks/flask/canteen
name = "canteen"
desc = "You take a sip from your trusty USCM canteen..."
desc = "A ruggedized metal alloy flask. Can hold a good amount of water... Or other liquids."
icon_state = "canteen"
volume = 60
center_of_mass = "x=17;y=8"
Expand All @@ -362,6 +362,12 @@
. = ..()
reagents.add_reagent("water", 60)

/obj/item/reagent_container/food/drinks/flask/canteen/empty

/obj/item/reagent_container/food/drinks/flask/canteen/empty/Initialize()
. = ..()
reagents.clear_reagents()

/obj/item/reagent_container/food/drinks/flask/detflask
name = "brown leather flask"
desc = "A flask with a leather band around the sides, often seen filled with whiskey and carried by rugged, gritty detectives."
Expand Down
33 changes: 33 additions & 0 deletions code/game/objects/items/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1696,6 +1696,39 @@
new /obj/item/ammo_magazine/smartgun(src)
new /obj/item/ammo_magazine/smartgun(src)

#define MAXIMUM_MAGAZINE_COUNT 2

/obj/item/storage/belt/gun/smartgunner/garrow
name = "\improper M802 pattern smartgunner sidearm rig"
desc = "The M802 is a limited-issue mark of USCM load-bearing equipment, designed to carry a limited quantity of smartgun and pistol ammunition, along with a sidearm."

//Keep a track of how many magazines are inside the belt.
var/magazines = 0

/obj/item/storage/belt/gun/smartgunner/garrow/can_be_inserted(obj/item/item, mob/user, stop_messages = FALSE)
. = ..()
if(magazines >= MAXIMUM_MAGAZINE_COUNT && istype(item, /obj/item/ammo_magazine/smartgun))
if(!stop_messages)
to_chat(usr, SPAN_WARNING("[src] can't hold any more drums."))
return FALSE

/obj/item/storage/belt/gun/smartgunner/garrow/handle_item_insertion(obj/item/item, prevent_warning = FALSE, mob/user)
. = ..()
if(istype(item, /obj/item/ammo_magazine/smartgun))
magazines++

/obj/item/storage/belt/gun/smartgunner/garrow/remove_from_storage(obj/item/item as obj, atom/new_location)
. = ..()
if(istype(item, /obj/item/ammo_magazine/smartgun))
magazines--

//If a magazine disintegrates due to acid or something else while in the belt, remove it from the count.
/obj/item/storage/belt/gun/smartgunner/garrow/on_stored_atom_del(atom/movable/item)
if(istype(item, /obj/item/ammo_magazine/smartgun))
magazines--

#undef MAXIMUM_MAGAZINE_COUNT

/obj/item/storage/belt/gun/smartgunner/pmc
name = "\improper M802 pattern 'Dirty' smartgunner sidearm rig"
desc = "A modification of the standard M802 load-bearing equipment, designed to carry smartgun ammunition and a sidearm."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
new /obj/item/weapon/gun/smartgun(src)
new /obj/item/smartgun_battery(src)
new /obj/item/clothing/suit/storage/marine/smartgunner(src)
new /obj/item/storage/belt/gun/smartgunner/garrow(src)
new /obj/item/ammo_magazine/smartgun(src)
new /obj/item/ammo_magazine/smartgun(src)
new /obj/item/ammo_magazine/smartgun(src)
Expand All @@ -157,6 +158,7 @@
new /obj/item/weapon/gun/smartgun(src)
new /obj/item/smartgun_battery(src)
new /obj/item/clothing/suit/storage/marine/smartgunner/standard(src)
new /obj/item/storage/belt/gun/smartgunner/garrow(src)
new /obj/item/ammo_magazine/smartgun(src)
new /obj/item/ammo_magazine/smartgun(src)
new /obj/item/ammo_magazine/smartgun(src)
Expand Down
2 changes: 2 additions & 0 deletions code/game/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@
S = pick('sound/items/cane_step_1.ogg', 'sound/items/cane_step_2.ogg', 'sound/items/cane_step_3.ogg', 'sound/items/cane_step_4.ogg', 'sound/items/cane_step_5.ogg', )
if("match")
S = pick('sound/effects/match.ogg')
if("throwing")
S = pick('sound/effects/throwing/swoosh1.ogg', 'sound/effects/throwing/swoosh2.ogg', 'sound/effects/throwing/swoosh3.ogg', 'sound/effects/throwing/swoosh4.ogg')
if("punch")
S = pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg')
if("swing_hit")
Expand Down
1 change: 1 addition & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ var/list/roundstart_mod_verbs = list(
add_verb(src, /client/proc/open_resin_panel)
add_verb(src, /client/proc/open_sound_panel)
add_verb(src, /client/proc/toggle_join_xeno)
add_verb(src, /client/proc/admin_marine_announcement)
add_verb(src, /client/proc/game_master_rename_platoon)
add_verb(src, /client/proc/toggle_vehicle_blockers)
add_verb(src, /client/proc/toggle_ai_xeno_weeding)
Expand Down
16 changes: 16 additions & 0 deletions code/modules/admin/game_master/extra_buttons/marine_announce.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/client/proc/admin_marine_announcement()
set name = "Command Announcement"
set category = "Game Master.Extras"

if(!check_rights(R_ADMIN))
return

var/body = tgui_input_text(src, "Enter the body text for the announcement.", title = "Announcement Body", multiline = TRUE, encode = FALSE)
if(!body)
return
var/title = tgui_input_text(src, "Enter the title of the announcement. Leave blank for the default title.", title = "Announcement Title")
if(!title)
title = COMMAND_ANNOUNCE
marine_announcement(body, "[title]")
message_admins("[key_name_admin(src)] has made an admin command announcement.")
log_admin("[key_name_admin(src)] made an admin command announcement: [body]")
18 changes: 7 additions & 11 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,7 @@ var/const/MAX_SAVE_SLOTS = 10
dat += "<a[current_menu == MENU_XENOMORPH ? " class='linkOff'" : ""] href=\"byond://?src=\ref[user];preference=change_menu;menu=[MENU_XENOMORPH]\"><b>Xenomorph</b></a> - "
if(RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_COMMANDER)
dat += "<a[current_menu == MENU_CO ? " class='linkOff'" : ""] href=\"byond://?src=\ref[user];preference=change_menu;menu=[MENU_CO]\"><b>Commanding Officer</b></a> - "
if(RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_SYNTHETIC)
dat += "<a[current_menu == MENU_SYNTHETIC ? " class='linkOff'" : ""] href=\"byond://?src=\ref[user];preference=change_menu;menu=[MENU_SYNTHETIC]\"><b>Synthetic</b></a> - "
dat += "<a[current_menu == MENU_SYNTHETIC ? " class='linkOff'" : ""] href=\"byond://?src=\ref[user];preference=change_menu;menu=[MENU_SYNTHETIC]\"><b>Synthetic</b></a> - "
if(RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_PREDATOR)
dat += "<a[current_menu == MENU_YAUTJA ? " class='linkOff'" : ""] href=\"byond://?src=\ref[user];preference=change_menu;menu=[MENU_YAUTJA]\"><b>Yautja</b></a> - "
if(RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_MENTOR)
Expand Down Expand Up @@ -495,15 +494,12 @@ var/const/MAX_SAVE_SLOTS = 10
else
dat += "<b>You do not have the whitelist for this role.</b>"
if(MENU_SYNTHETIC)
if(RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_SYNTHETIC)
dat += "<div id='column1'>"
dat += "<h2><b><u>Synthetic Settings:</u></b></h2>"
dat += "<b>Synthetic Name:</b> <a href='?_src_=prefs;preference=synth_name;task=input'><b>[synthetic_name]</b></a><br>"
dat += "<b>Synthetic Type:</b> <a href='?_src_=prefs;preference=synth_type;task=input'><b>[synthetic_type]</b></a><br>"
dat += "<b>Synthetic Whitelist Status:</b> <a href='?_src_=prefs;preference=synth_status;task=input'><b>[synth_status]</b></a><br>"
dat += "</div>"
else
dat += "<b>You do not have the whitelist for this role.</b>"
dat += "<div id='column1'>"
dat += "<h2><b><u>Synthetic Settings:</u></b></h2>"
dat += "<b>Synthetic Name:</b> <a href='?_src_=prefs;preference=synth_name;task=input'><b>[synthetic_name]</b></a><br>"
dat += "<b>Synthetic Type:</b> <a href='?_src_=prefs;preference=synth_type;task=input'><b>[synthetic_type]</b></a><br>"
dat += "<b>Synthetic Whitelist Status:</b> <a href='?_src_=prefs;preference=synth_status;task=input'><b>[synth_status]</b></a><br>"
dat += "</div>"
if(MENU_YAUTJA)
if(RoleAuthority.roles_whitelist[user.ckey] & WHITELIST_PREDATOR)
dat += "<div id='column1'>"
Expand Down
4 changes: 4 additions & 0 deletions code/modules/client/preferences_gear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,10 @@ var/global/list/gear_datums_by_name = list()
display_name = "Canteen"
path = /obj/item/reagent_container/food/drinks/flask/canteen

/datum/gear/flask/canteen/empty
display_name = "Empty canteen"
path = /obj/item/reagent_container/food/drinks/flask/canteen/empty

/datum/gear/flask/leather
display_name = "Leather flask"
path = /obj/item/reagent_container/food/drinks/flask/detflask
Expand Down
4 changes: 4 additions & 0 deletions code/modules/clothing/suits/marine_armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,10 @@
/obj/item/clothing/suit/storage/marine/smartgunner/standard
flags_atom = NO_SNOW_TYPE

/obj/item/clothing/suit/storage/marine/smartgunner/black
flags_atom = NO_SNOW_TYPE
icon_state = "8fancy"

/obj/item/clothing/suit/storage/marine/smartgunner/upp
name = "\improper UH7-I heavy plated harness"
desc = "An experimental set of heavy armor with additional harnesses designed to support QYJ-72-I smartmachinegun. Heavy plates along with harnesses make wearing backpacks extremely uncomfortable and borderline impossible."
Expand Down
2 changes: 1 addition & 1 deletion code/modules/cm_marines/smartgun_mount.dm
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@
GUN_FIREMODE_AUTOMATIC,
)
/// A multiplier for how slow this gun should fire in automatic as opposed to burst. 1 is normal, 1.2 is 20% slower, 0.8 is 20% faster, etc.
var/autofire_slow_mult = 1
var/autofire_slow_mult = 0.7
/// If the gun is currently burst firing
VAR_PROTECTED/burst_firing = FALSE
/// If the gun should display its ammo count
Expand Down
Loading

0 comments on commit ff8beb1

Please sign in to comment.