Skip to content

Commit

Permalink
Merge branch 'master' into shotgun-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AmoryBlaine authored Jul 22, 2024
2 parents a7d5779 + f9fe348 commit c250e30
Show file tree
Hide file tree
Showing 30 changed files with 344 additions and 34 deletions.
1 change: 1 addition & 0 deletions code/datums/ammo/bullet/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@

/datum/ammo/bullet/shotgun/buckshot/special
name = "buckshot shell, USCM special type"
handful_state = "special_buck"
bonus_projectiles_type = /datum/ammo/bullet/shotgun/spread/special

accurate_range = 8
Expand Down
2 changes: 2 additions & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ var/list/roundstart_mod_verbs = list(
if(CLIENT_HAS_RIGHTS(src, R_BUILDMODE))
add_verb(src, /client/proc/togglebuildmodeself)
add_verb(src, /client/proc/toggle_game_master)
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/game_master_rename_platoon)
Expand Down Expand Up @@ -365,6 +366,7 @@ var/list/roundstart_mod_verbs = list(
admin_verbs_default,
/client/proc/togglebuildmodeself,
/client/proc/toggle_game_master,
/client/proc/open_resin_panel,
/client/proc/open_sound_panel,
/client/proc/toggle_join_xeno,
/client/proc/game_master_rename_platoon,
Expand Down
5 changes: 3 additions & 2 deletions code/modules/admin/game_master/game_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100)
data["game_master_objectives"] = length(GLOB.game_master_objectives) ? GLOB.game_master_objectives : ""

// Communication stuff
data["communication_clarity"] = GLOB.radio_communication_clarity
data["radio_clarity"] = GLOB.radio_communication_clarity
data["radio_clarity_example"] = stars("The quick brown fox jumped over the lazy dog.", GLOB.radio_communication_clarity)

return data

Expand Down Expand Up @@ -294,7 +295,7 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100)
if("use_game_master_phone")
game_master_phone.attack_hand(ui.user)

if("set_communication_clarity")
if("set_radio_clarity")
var/new_clarity = text2num(params["clarity"])
if(!isnum(new_clarity))
return
Expand Down
177 changes: 177 additions & 0 deletions code/modules/admin/game_master/resin_panel.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
#define RESIN_PANEL_STRUCTURES \
list( \
/datum/resin_construction/resin_turf/wall, \
/datum/resin_construction/resin_turf/wall/thick, \
/datum/resin_construction/resin_turf/wall/reflective, \
/datum/resin_construction/resin_turf/membrane, \
/datum/resin_construction/resin_turf/membrane/thick, \
/datum/resin_construction/resin_obj/door, \
/datum/resin_construction/resin_obj/door/thick, \
/datum/resin_construction/resin_obj/resin_node, \
/datum/resin_construction/resin_obj/sticky_resin, \
/datum/resin_construction/resin_obj/fast_resin, \
/datum/resin_construction/resin_obj/resin_spike, \
/datum/resin_construction/resin_obj/acid_pillar, \
/turf/closed/wall/mineral/bone_resin \
)

/client/proc/open_resin_panel()
set name = "Resin Panel"
set category = "Game Master"

if(!check_rights(R_ADMIN))
return

new /datum/resin_panel(usr)

/datum/resin_panel
var/static/list/structure_list
var/static/list/removal_allowlist
var/selected_structure
var/selected_hive = XENO_HIVE_NORMAL
var/client/holder
var/build_click_intercept = FALSE

/datum/resin_panel/New(user)
if(isnull(structure_list)) //first run, init statics
structure_list = get_structures()

removal_allowlist = list()
for(var/structure as anything in RESIN_PANEL_STRUCTURES)
if(structure in GLOB.resin_constructions_list)
var/datum/resin_construction/construct = structure
removal_allowlist += construct.build_path
else
removal_allowlist += structure

if(isclient(user))
holder = user
else
var/mob/mob = user
holder = mob.client

holder.click_intercept = src
tgui_interact(holder.mob)

/datum/resin_panel/proc/get_structures()
var/list/structures = list()
for(var/structure as anything in RESIN_PANEL_STRUCTURES)
var/list/entry = list()

if(structure in GLOB.resin_constructions_list)
var/datum/resin_construction/construct = structure
entry["name"] = construct.name
entry["image"] = replacetext(construct.construction_name, " ", "-")
entry["id"] = "[construct]"
else if(structure in typesof(/turf))
var/turf/turf = structure
entry["name"] = turf.name
switch(turf)
if(/turf/closed/wall/mineral/bone_resin)
entry["image"] = "reflective-resin-wall" //looks just like it, saves on making new spritesheet for one image
else
entry["image"] = turf.icon_state
entry["id"] = "[turf]"

structures += list(entry)

return structures

/datum/resin_panel/ui_assets(mob/user)
return list(
get_asset_datum(/datum/asset/spritesheet/choose_resin),
)

/datum/resin_panel/ui_static_data(mob/user)
var/list/data = list()

data["structure_list"] = structure_list
data["hives_list"] = ALL_XENO_HIVES

return data

/datum/resin_panel/ui_data(mob/user)
var/list/data = list()

data["selected_structure"] = selected_structure
data["selected_hive"] = selected_hive
data["build_click_intercept"] = build_click_intercept

return data

/datum/resin_panel/ui_close(mob/user)
holder = null
build_click_intercept = FALSE
qdel(src)

/datum/resin_panel/ui_state(mob/user)
return GLOB.admin_state

/datum/resin_panel/ui_status(mob/user, datum/ui_state/state)
return UI_INTERACTIVE

/datum/resin_panel/tgui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "ResinPanel", "Resin Panel")
ui.set_autoupdate(FALSE)
ui.open()

/datum/resin_panel/proc/InterceptClickOn(mob/user, params, atom/object)
if(!build_click_intercept)
return

var/list/modifiers = params2list(params)

if(LAZYACCESS(modifiers, MIDDLE_CLICK)) //remove
if(!(object.type in removal_allowlist))
return

if(isturf(object))
var/turf/turf = object
turf.ScrapeAway()
else
qdel(object)
else //add
if(!selected_structure)
return

var/turf/current_turf = get_turf(object)

var/atom/new_structure
if(selected_structure in GLOB.resin_constructions_list)
var/datum/resin_construction/construct = GLOB.resin_constructions_list[selected_structure]
new_structure = construct.build(current_turf, selected_hive)
else if(selected_structure in typesof(/turf))
var/turf/turf = selected_structure
new_structure = current_turf.PlaceOnTop(turf)
new_structure?.add_hiddenprint(user) //so admins know who placed it

return TRUE

/datum/resin_panel/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..()
if(.)
return

if(!check_rights(R_ADMIN))
return

switch(action)
if("set_selected_structure")
var/selected_type = text2path(params["type"])
if(!(selected_type in RESIN_PANEL_STRUCTURES))
return
selected_structure = selected_type
return TRUE
if("set_selected_hive")
var/hive = params["selected_hive"]
if(!(hive in ALL_XENO_HIVES))
return
selected_hive = hive
return TRUE
if("toggle_build_click_intercept")
build_click_intercept = !build_click_intercept
return TRUE

#undef RESIN_PANEL_STRUCTURES
5 changes: 5 additions & 0 deletions code/modules/client/preferences_gear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1073,3 +1073,8 @@ var/global/list/gear_datums_by_name = list()
display_name = "Cut-throat razor"
path = /obj/item/weapon/straight_razor
cost = 3

/datum/gear/misc/flak
display_name = "M67 flak jacket"
path = /obj/item/clothing/accessory/flak
cost = 3
24 changes: 24 additions & 0 deletions code/modules/clothing/under/ties.dm
Original file line number Diff line number Diff line change
Expand Up @@ -937,3 +937,27 @@
icon = 'icons/obj/items/clothing/ties.dmi'
icon_state = "owlf_vest"
item_state = "owlf_vest"

/obj/item/clothing/accessory/flak
name = "M67 flak vest"
desc = "An older model of flak jacket worn by combat support personnel such as dropship crew, or occasionally by smartgunners. Much comfier than its M70 successor, and can be worn under most combat armor, however, the ballistic protection leaves much to be desired."
icon_state = "flak"
item_state = "flak"
w_class = SIZE_MEDIUM
var/tucked_in = FALSE

/obj/item/clothing/accessory/flak/get_examine_text(mob/user)
. = ..()
. += SPAN_NOTICE("You can wear it differently by <b>using it in hand</b>.")

/obj/item/clothing/accessory/flak/attack_self(mob/user)
..()

tucked_in = !tucked_in
if(tucked_in)
icon_state = "flakslim"
user.visible_message(SPAN_NOTICE("[user] tucks in [src]'s sleeves."), SPAN_NOTICE("You tuck in [src]'s sleeves."))
else
icon_state = initial(icon_state)
user.visible_message(SPAN_NOTICE("[user] decides to keep [src] nice and puffy."), SPAN_NOTICE("You decide to keep [src] nice and puffy."))
item_state = icon_state
6 changes: 3 additions & 3 deletions code/modules/cm_aliens/weeds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,9 @@
overlay_node = TRUE
overlays += staticnode

/obj/effect/alien/weeds/node/Initialize(mapload, obj/effect/alien/weeds/node/node, mob/living/carbon/xenomorph/xeno, datum/hive_status/hive)
if (istype(hive))
linked_hive = hive
/obj/effect/alien/weeds/node/Initialize(mapload, hive, mob/living/carbon/xenomorph/xeno)
if (hive)
linked_hive = GLOB.hive_datum[hive]
else if (istype(xeno) && xeno.hive)
linked_hive = xeno.hive
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

xeno.visible_message(SPAN_XENONOTICE("\The [xeno] regurgitates a pulsating node and plants it on the ground!"), \
SPAN_XENONOTICE("You regurgitate a pulsating node and plant it on the ground!"), null, 5)
var/obj/effect/alien/weeds/node/new_node = new node_type(xeno.loc, src, xeno)
var/obj/effect/alien/weeds/node/new_node = new node_type(xeno.loc, xeno.hivenumber, xeno)

if(to_convert)
for(var/cur_weed in to_convert)
Expand Down
6 changes: 3 additions & 3 deletions code/modules/mob/mob_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ var/global/list/limb_types_by_name = list(
message = replace_X.Replace(message, "CKTH")
return message

#define PIXELS_PER_STRENGTH_VAL 24
#define PIXELS_PER_STRENGTH_VAL 28

/proc/shake_camera(mob/M, steps = 1, strength = 1, time_per_step = 1)
if(!M?.client || (M.shakecamera > world.time))
Expand All @@ -260,10 +260,10 @@ var/global/list/limb_types_by_name = list(
var/old_X = M.client.pixel_x
var/old_y = M.client.pixel_y

animate(M.client, pixel_x = old_X + rand(-(strength), strength), pixel_y = old_y + rand(-(strength), strength), easing = JUMP_EASING, time = time_per_step, flags = ANIMATION_PARALLEL)
animate(M.client, pixel_x = old_X + rand(-(strength), strength), pixel_y = old_y + rand(-(strength), strength), easing = CUBIC_EASING | EASE_IN, time = time_per_step, flags = ANIMATION_PARALLEL)
var/i = 1
while(i < steps)
animate(pixel_x = old_X + rand(-(strength), strength), pixel_y = old_y + rand(-(strength), strength), easing = JUMP_EASING, time = time_per_step)
animate(pixel_x = old_X + rand(-(strength), strength), pixel_y = old_y + rand(-(strength), strength), easing = CUBIC_EASING | EASE_IN, time = time_per_step)
i++
animate(pixel_x = old_X, pixel_y = old_y,time = Clamp(Floor(strength/PIXELS_PER_STRENGTH_VAL),2,4))//ease it back

Expand Down
2 changes: 2 additions & 0 deletions code/modules/projectiles/magazines/shotguns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ var/list/shotgun_boxes_12g = list(
/obj/item/ammo_magazine/shotgun/buckshot/special
name = "box of buckshot shells, USCM special type"
desc = "A box filled with buckshot spread shotgun shells, USCM special type. 12 Gauge."
icon_state = "special"
default_ammo = /datum/ammo/bullet/shotgun/buckshot/special
//-------------------------------------------------------

Expand Down Expand Up @@ -212,6 +213,7 @@ var/list/shotgun_handfuls_12g = list(

/obj/item/ammo_magazine/handful/shotgun/buckshot/special
name = "handful of shotgun buckshot shells, USCM special type (12g)"
icon_state = "special_buck_5"
default_ammo = /datum/ammo/bullet/shotgun/buckshot/special

/obj/item/ammo_magazine/handful/shotgun/buckshot/incendiary
Expand Down
2 changes: 0 additions & 2 deletions code/modules/vehicles/hardpoints/primary/arc_frontal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
health = 2000
firing_arc = 120

origins = list(0, -2)

allowed_seat = VEHICLE_DRIVER

ammo = new /obj/item/ammo_magazine/hardpoint/m56_cupola/frontal_cannon
Expand Down
8 changes: 4 additions & 4 deletions code/modules/vehicles/multitile/multitile_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@

// Crashed with something that stopped us
if(!can_move)
move_momentum = Floor(move_momentum/2)
move_momentum = trunc(move_momentum/2)
update_next_move()
interior_crash_effect()

Expand Down Expand Up @@ -251,10 +251,10 @@
return

// Not enough momentum for anything serious
if(abs(move_momentum) <= 1)
if(abs(move_momentum) < 1)
return

var/fling_distance = Ceiling(move_momentum/move_max_momentum) * 2
var/fling_distance = Ceiling(abs(move_momentum)/move_max_momentum) * 2
var/turf/target = interior.get_middle_turf()

for (var/x in 0 to fling_distance-1)
Expand All @@ -272,7 +272,7 @@
if(isliving(A))
var/mob/living/M = A

shake_camera(M, 2, Ceiling(move_momentum/move_max_momentum) * 1)
shake_camera(M, 2, Ceiling(abs(move_momentum)/move_max_momentum) * 1)
if(!M.buckled)
M.apply_effect(1, STUN)
M.apply_effect(2, WEAKEN)
Expand Down
1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1388,6 +1388,7 @@
#include "code\modules\admin\ToRban.dm"
#include "code\modules\admin\game_master\game_master.dm"
#include "code\modules\admin\game_master\game_master_submenu.dm"
#include "code\modules\admin\game_master\resin_panel.dm"
#include "code\modules\admin\game_master\sound_panel.dm"
#include "code\modules\admin\game_master\extra_buttons\rappel_menu.dm"
#include "code\modules\admin\game_master\extra_buttons\rename_platoon.dm"
Expand Down
2 changes: 1 addition & 1 deletion dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ export NODE_VERSION_PRECISE=14.16.1
export SPACEMAN_DMM_VERSION=suite-1.8

# Python version for mapmerge and other tools
export PYTHON_VERSION=3.7.9
export PYTHON_VERSION=3.9.0
7 changes: 7 additions & 0 deletions html/changelogs/archive/2024-07.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
2024-07-19:
Meatstuff882:
- rscadd: Added an icon for special buckshot.
2024-07-22:
Doubleumc:
- admin: Radio Clarity slider now shows an example message
- qol: ARC turret shots start from the center of the ARC
Binary file modified icons/mob/humans/onmob/suit_1.dmi
Binary file not shown.
Binary file modified icons/mob/humans/onmob/ties.dmi
Binary file not shown.
Binary file modified icons/obj/items/clothing/cm_suits.dmi
Binary file not shown.
Binary file modified icons/obj/items/clothing/ties.dmi
Binary file not shown.
Binary file modified icons/obj/items/clothing/ties_overlay.dmi
Binary file not shown.
Binary file modified icons/obj/items/weapons/guns/ammo_by_faction/uscm.dmi
Binary file not shown.
Binary file modified icons/obj/items/weapons/guns/handful.dmi
Binary file not shown.
2 changes: 1 addition & 1 deletion maps/corsat.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"xeno_hive_charlie": 0,
"xeno_hive_delta": 0
},
"camouflage": "snow",
"camouflage": "jungle",
"gamemodes": [
"Distress Signal",
"Hunter Games",
Expand Down
2 changes: 1 addition & 1 deletion maps/derelict_almayer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"announce_text": "An automated distress signal has been received from the \"USS Almayer\". A response team from the ###SHIPNAME### will be dispatched shortly to investigate.",
"traits": [{ "Ground": true }],
"nightmare_path": "maps/Nightmare/maps/derelict_almayer/",
"camouflage": "classic",
"camouflage": "jungle",
"gamemodes": [
"Distress Signal",
"Hunter Games",
Expand Down
Loading

0 comments on commit c250e30

Please sign in to comment.