Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into small-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gw0sty committed Dec 13, 2024
2 parents 6e26a84 + 016b8c7 commit 4d9e36c
Show file tree
Hide file tree
Showing 166 changed files with 3,797 additions and 1,745 deletions.
2,973 changes: 1,876 additions & 1,097 deletions _maps/RandomRuins/SpaceRuins/oldstation.dmm

Large diffs are not rendered by default.

296 changes: 72 additions & 224 deletions _maps/map_files/Blueshift/Blueshift.dmm

Large diffs are not rendered by default.

206 changes: 114 additions & 92 deletions _maps/map_files/MetaStation/MetaStation.dmm

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _maps/map_files/debug/runtimestation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@
/turf/open/floor/iron,
/area/station/hallway/primary/central)
"bF" = (
/obj/machinery/computer/rdconsole,
/obj/machinery/computer/rdconsole/unlocked,
/turf/open/floor/iron,
/area/station/science)
"bH" = (
Expand Down
2 changes: 1 addition & 1 deletion _maps/map_files/debug/shiptest.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@
/turf/open/floor/iron,
/area/station/hallway/primary/central)
"bF" = (
/obj/machinery/computer/rdconsole,
/obj/machinery/computer/rdconsole/unlocked,
/turf/open/floor/iron,
/area/station/science)
"bG" = (
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/mobfactions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#define FACTION_CLOWN "clowns"
/// Headslugs
#define FACTION_CREATURE "creature"
/// Cats
#define FACTION_CAT "cat"
/// Faithless and shadowpeople
#define FACTION_FAITHLESS "faithless"
/// Gnomes
Expand Down
6 changes: 6 additions & 0 deletions code/__DEFINES/projectiles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
#define CALIBER_ARROW "arrow"
/// The caliber used by the harpoon gun.
#define CALIBER_HARPOON "harpoon"
/// The caliber used by the rebar crossbow.
#define CALIBER_REBAR "sharpened rod"
/// The caliber used by the rebar crossbow when forced to hold 2 rods.
#define CALIBER_REBAR_FORCED "sharpened rod"
/// The caliber used by the syndicate rebar crossbow.
#define CALIBER_REBAR_SYNDIE "sharpened rod"
/// The caliber used by the meat hook.
#define CALIBER_HOOK "hook"
/// The caliber used by the changeling tentacle mutation.
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
#define RADIO_CHANNEL_CTF_GREEN "Green Team"
#define RADIO_CHANNEL_CTF_YELLOW "Yellow Team"

#define RADIO_CHANNEL_UNCOMMON "Uncommon"
#define RADIO_KEY_UNCOMMON "f"
#define RADIO_TOKEN_UNCOMMON ":f"

#define MIN_FREE_FREQ 1201 // -------------------------------------------------
// Frequencies are always odd numbers and range from 1201 to 1599.
Expand All @@ -76,6 +79,7 @@
#define FREQ_ENGINEERING 1357 // Engineering comms frequency, orange
#define FREQ_SECURITY 1359 // Security comms frequency, red
#define FREQ_RADIO 1361 //monkestation edit
#define FREQ_UNCOMMON 1363 //monkestation addition, Light gray

#define FREQ_HOLOGRID_SOLUTION 1433
#define FREQ_STATUS_DISPLAYS 1435
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/span.dm
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
#define span_tinynotice(str) ("<span class='tinynotice'>" + str + "</span>")
#define span_tinynoticeital(str) ("<span class='tinynoticeital'>" + str + "</span>")
#define span_unconscious(str) ("<span class='unconscious'>" + str + "</span>")
#define span_uncommonradio(str) ("<span class='uncommonradio'>" + str + "</span>")
#define span_userdanger(str) ("<span class='userdanger'>" + str + "</span>")
#define span_warning(str) ("<span class='warning'>" + str + "</span>")
#define span_yell(str) ("<span class='yell'>" + str + "</span>")
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
/// Blowing kisses actually does damage to the victim
#define TRAIT_KISS_OF_DEATH "kiss_of_death"
/// Syndie kisses can apply burn damage
/* #define TRAIT_SYNDIE_KISS "syndie_kiss" */
#define TRAIT_SYNDIE_KISS "syndie_kiss"
/// Used to activate french kissing
#define TRAIT_GARLIC_BREATH "kiss_of_garlic_death"
/// Addictions don't tick down, basically they're permanently addicted
Expand Down
8 changes: 8 additions & 0 deletions code/__DEFINES/~monkestation/atom_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
#define SECHUD_BLUESHIELD "hudblueshield"
#define SECHUD_BARBER "hudbarber"
#define SECHUD_EXPLORER "hudexplorer"
#define SECHUD_CHIEF_MEDICAL_OFFICER_AWAY "hudchiefmedicalofficer_away"
#define SECHUD_CHEF_AWAY "hudchef_away"
#define SECHUD_EXPLORER_AWAY "hudexplorer_away"
#define SECHUD_SCIENTIST_AWAY "hudscientist_away"
#define SECHUD_SECURITY_OFFICER_AWAY "hudsecurityofficer_away"
#define SECHUD_STATION_ENGINEER_AWAY "hudstationengineer_away"
#define SECHUD_APC_AWAY "hudapc_away"
#define SECHUD_ROBOTICIST_AWAY "hudroboticist_away"
#define SECHUD_SIGNAL_TECHINICAN "hudsignaltech"
#define SECHUD_CONTRACTOR "hudsyndicatecontractor"
#define SECHUD_SYNDIECLOWN "hudsyndicateclown"
Expand Down
51 changes: 29 additions & 22 deletions code/__HELPERS/~monkestation-helpers/roundend.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,35 @@
/datum/controller/subsystem/ticker/proc/distribute_rewards()
var/hour = round((world.time - SSticker.round_start_time) / 36000)
var/minute = round(((world.time - SSticker.round_start_time) - (hour * 36000)) / 600)
var/added_xp = round(25 + (minute**0.85))
var/added_xp = round(25 + (minute ** 0.85))
for(var/client/client as anything in GLOB.clients)
if(!istype(client) || QDELING(client))
continue
if(!QDELETED(client?.prefs))
client?.prefs?.adjust_metacoins(client?.ckey, 75, "Played a Round")
client?.prefs?.adjust_metacoins(client?.ckey, client?.reward_this_person, "Special Bonus")
// WHYYYYYY
if(QDELETED(client))
continue
if(client?.mob?.mind?.assigned_role)
add_jobxp(client, added_xp, client?.mob?.mind?.assigned_role?.title)
distribute_rewards_to_client(client, added_xp)

/datum/controller/subsystem/ticker/proc/distribute_rewards_to_client(client/client, added_xp)
if(!istype(client) || QDELING(client))
return
var/datum/player_details/details = get_player_details(client)
if(!QDELETED(client?.prefs))
client?.prefs?.adjust_metacoins(client?.ckey, 75, "Played a Round")
var/bonus = details?.roundend_monkecoin_bonus
if(bonus)
client?.prefs?.adjust_metacoins(client?.ckey, bonus, "Special Bonus")
// WHYYYYYY
if(QDELETED(client))
continue
if(length(client?.applied_challenges))
var/mob/living/client_mob = client?.mob
if(!istype(client_mob) || QDELING(client_mob) || client_mob?.stat == DEAD)
return
if(client?.mob?.mind?.assigned_role)
add_jobxp(client, added_xp, client?.mob?.mind?.assigned_role?.title)
if(QDELETED(client))
return
var/list/applied_challenges = details?.applied_challenges
if(LAZYLEN(applied_challenges))
var/mob/living/client_mob = client?.mob
if(!istype(client_mob) || QDELING(client_mob) || client_mob?.stat == DEAD)
return
var/total_payout = 0
for(var/datum/challenge/listed_challenge as anything in applied_challenges)
if(listed_challenge.failed)
continue
var/total_payout = 0
for(var/datum/challenge/listed_challenge as anything in client?.applied_challenges)
if(listed_challenge.failed)
continue
total_payout += listed_challenge.challenge_payout
if(total_payout)
client?.prefs?.adjust_metacoins(client?.ckey, total_payout, "Challenge rewards.")
total_payout += listed_challenge.challenge_payout
if(total_payout)
client?.prefs?.adjust_metacoins(client?.ckey, total_payout, "Challenge rewards.")
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_JAILBIRD" = TRAIT_JAILBIRD,
"TRAIT_JOLLY" = TRAIT_JOLLY,
"TRAIT_KISS_OF_DEATH" = TRAIT_KISS_OF_DEATH,
"TRAIT_SYNDIE_KISS" = TRAIT_SYNDIE_KISS,
"TRAIT_KNOCKEDOUT" = TRAIT_KNOCKEDOUT,
"TRAIT_KNOW_ENGI_WIRES" = TRAIT_KNOW_ENGI_WIRES,
"TRAIT_KNOW_ROBO_WIRES" = TRAIT_KNOW_ROBO_WIRES,
Expand Down
9 changes: 4 additions & 5 deletions code/_onclick/hud/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,10 @@

/atom/movable/screen/lobby/button/intents/Click(location, control, params)
. = ..()
if(!hud.mymob.client.challenge_menu)
var/datum/challenge_selector/new_tgui = new(hud.mymob)
new_tgui.ui_interact(hud.mymob)
else
hud.mymob.client.challenge_menu.ui_interact(hud.mymob)
var/datum/player_details/details = get_player_details(hud.mymob)
details.challenge_menu ||= new(details)
details.challenge_menu.ui_interact(hud.mymob)

/atom/movable/screen/lobby/button/discord
icon = 'icons/hud/lobby/bottom_buttons.dmi'
icon_state = "discord"
Expand Down
42 changes: 24 additions & 18 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -523,27 +523,33 @@ SUBSYSTEM_DEF(ticker)

return output

/datum/controller/subsystem/ticker/proc/transfer_single_character(mob/dead/new_player/player)
var/mob/living = player.transfer_character()
if(!living)
return
qdel(player)
ADD_TRAIT(living, TRAIT_NO_TRANSFORM, SS_TICKER_TRAIT)
if(living.client)
var/atom/movable/screen/splash/splash = new(null, living.client, TRUE)
splash.Fade(TRUE)
living.client?.init_verbs()
. = living
var/datum/player_details/details = get_player_details(living)
if(details)
SSchallenges.apply_challenges(details)
for(var/processing_reward_bitflags in bitflags_to_reward)//you really should use department bitflags if possible
if(living.mind.assigned_role.departments_bitflags & processing_reward_bitflags)
details.roundend_monkecoin_bonus += 150
for(var/processing_reward_jobs in jobs_to_reward)//just in case you really only want to reward a specific job
if(living.job == processing_reward_jobs)
details.roundend_monkecoin_bonus += 150

/datum/controller/subsystem/ticker/proc/transfer_characters()
var/list/livings = list()
for(var/mob/dead/new_player/player as anything in GLOB.new_player_list)
var/mob/living = player.transfer_character()
if(living)
qdel(player)
ADD_TRAIT(living, TRAIT_NO_TRANSFORM, SS_TICKER_TRAIT)
if(living.client)
var/atom/movable/screen/splash/S = new(null, living.client, TRUE)
S.Fade(TRUE)
living.client.init_verbs()
livings += living
if(living.client && length(living.client?.active_challenges))
SSchallenges.apply_challenges(living.client)
for(var/processing_reward_bitflags in bitflags_to_reward)//you really should use department bitflags if possible
if(living.mind.assigned_role.departments_bitflags & processing_reward_bitflags)
living.client.reward_this_person += 150
for(var/processing_reward_jobs in jobs_to_reward)//just in case you really only want to reward a specific job
if(living.job == processing_reward_jobs)
living.client.reward_this_person += 150
if(livings.len)
livings += transfer_single_character(player)
list_clear_nulls(livings)
if(length(livings))
addtimer(CALLBACK(src, PROC_REF(release_characters), livings), 3 SECONDS, TIMER_CLIENT_TIME)

/datum/controller/subsystem/ticker/proc/release_characters(list/livings)
Expand Down
11 changes: 11 additions & 0 deletions code/datums/components/crafting/equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,14 @@
tool_paths = list(/obj/item/bikehorn)
time = 40 SECONDS
category = CAT_EQUIPMENT

/datum/crafting_recipe/rebar_quiver
name = "Rebar Storage Quiver"
result = /obj/item/storage/bag/rebar_quiver
time = 10
reqs = list(
/obj/item/tank/internals/oxygen = 1,
/obj/item/stack/cable_coil = 15,
)
category = CAT_EQUIPMENT
tool_behaviors = list(TOOL_WELDER, TOOL_WIRECUTTER)
32 changes: 29 additions & 3 deletions code/datums/components/crafting/ranged_weapon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,33 @@
time = 5 SECONDS
category = CAT_WEAPON_RANGED

/datum/crafting_recipe/rebarxbow
name = "Heated Rebar Crossbow"
result = /obj/item/gun/ballistic/rifle/rebarxbow
reqs = list(
/obj/item/stack/rods = 6,
/obj/item/stack/cable_coil = 12,
/obj/item/inducer = 1,
)
tool_behaviors = list(TOOL_WELDER)
time = 5 SECONDS
category = CAT_WEAPON_RANGED

/datum/crafting_recipe/rebarxbowforced
name = "Forced Rebar Crossbow"
desc = "A much quicker reload... for a chance of shooting yourself when you fire it."
result = /obj/item/gun/ballistic/rifle/rebarxbow/forced
reqs = list(
/obj/item/gun/ballistic/rifle/rebarxbow = 1,
)
blacklist = list(
/obj/item/gun/ballistic/rifle/rebarxbow/forced,
/obj/item/gun/ballistic/rifle/rebarxbow/syndie,
)
tool_behaviors = list(TOOL_CROWBAR)
time = 1 SECONDS
category = CAT_WEAPON_RANGED

/datum/crafting_recipe/pipegun_prime
name = "Regal Pipegun"
always_available = FALSE
Expand Down Expand Up @@ -306,8 +333,7 @@
/obj/item/stack/rods = 4,
/obj/item/stock_parts/micro_laser = 1,
/obj/item/stock_parts/capacitor = 1,
/obj/item/clothing/glasses/regular = 1,
/obj/item/reagent_containers/cup/glass/drinkingglass = 1,
/obj/item/reagent_containers/cup/glass/drinkingglass = 2,
)
tool_behaviors = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
time = 10 SECONDS
Expand Down Expand Up @@ -351,7 +377,7 @@
/obj/item/gun/energy/disabler/smoothbore = 1,
/obj/item/stack/sheet/mineral/gold = 5,
/obj/item/stock_parts/cell/hyper = 1,
/datum/reagent/reaction_agent/speed_agent = 10,
/datum/reagent/consumable/red_queen = 10, //monke edit
)
tool_behaviors = list(TOOL_SCREWDRIVER)
time = 20 SECONDS
Expand Down
30 changes: 30 additions & 0 deletions code/datums/components/crafting/weapon_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,36 @@
time = 0.5 SECONDS
category = CAT_WEAPON_AMMO

/datum/crafting_recipe/paperball
name = "Paper Ball"
result = /obj/item/ammo_casing/rebar/paperball
reqs = list(
/obj/item/paper = 1,
)
time = 0.1 SECONDS
category = CAT_WEAPON_AMMO

/datum/crafting_recipe/rebarsyndie
name = "jagged iron rod"
always_available = FALSE
result = /obj/item/ammo_casing/rebar/syndie
reqs = list(
/obj/item/stack/rods = 1,
)
tool_behaviors = list(TOOL_WIRECUTTER)
time = 0.5 SECONDS
time = 0.1 SECONDS
category = CAT_WEAPON_AMMO

/datum/crafting_recipe/healium_bolt
name = "healium crystal crossbow bolt"
result = /obj/item/ammo_casing/rebar/healium
reqs = list(
/obj/item/grenade/gas_crystal/healium_crystal = 1
)
time = 0.1 SECONDS
category = CAT_WEAPON_AMMO

/datum/crafting_recipe/pulseslug
name = "Pulse Slug Shell"
result = /obj/item/ammo_casing/shotgun/pulseslug
Expand Down
19 changes: 12 additions & 7 deletions code/datums/components/fullauto.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@
var/turf/target_loc //For dealing with locking on targets due to BYOND engine limitations (the mouse input only happening when mouse moves).
var/autofire_stat = AUTOFIRE_STAT_IDLE
var/mouse_parameters
var/autofire_shot_delay = 0.3 SECONDS //Time between individual shots.
var/mouse_status = AUTOFIRE_MOUSEUP //This seems hacky but there can be two MouseDown() without a MouseUp() in between if the user holds click and uses alt+tab, printscreen or similar.
/// Time between individual shots.
var/autofire_shot_delay = 0.3 SECONDS
/// This seems hacky but there can be two MouseDown() without a MouseUp() in between if the user holds click and uses alt+tab, printscreen or similar.
var/mouse_status = AUTOFIRE_MOUSEUP
/// Should dual wielding be allowed?
var/allow_akimbo

///windup autofire vars
///Whether the delay between shots increases over time, simulating a spooling weapon
Expand All @@ -26,14 +30,15 @@
var/timerid
COOLDOWN_DECLARE(next_shot_cd)

/datum/component/automatic_fire/Initialize(autofire_shot_delay, windup_autofire, windup_autofire_reduction_multiplier, windup_autofire_cap, windup_spindown)
/datum/component/automatic_fire/Initialize(autofire_shot_delay, windup_autofire, windup_autofire_reduction_multiplier, windup_autofire_cap, windup_spindown, allow_akimbo = TRUE)
. = ..()
if(!isgun(parent))
return COMPONENT_INCOMPATIBLE
var/obj/item/gun = parent
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, PROC_REF(wake_up))
if(autofire_shot_delay)
src.autofire_shot_delay = autofire_shot_delay
src.allow_akimbo = allow_akimbo
if(windup_autofire)
src.windup_autofire = windup_autofire
src.windup_autofire_reduction_multiplier = windup_autofire_reduction_multiplier
Expand Down Expand Up @@ -291,21 +296,21 @@
return COMPONENT_AUTOFIRE_ONMOUSEDOWN_BYPASS


/obj/item/gun/proc/do_autofire(datum/source, atom/target, mob/living/shooter, params)
/obj/item/gun/proc/do_autofire(datum/source, atom/target, mob/living/shooter, allow_akimbo, params)
SIGNAL_HANDLER
if(semicd || shooter.incapacitated())
return NONE
if(!can_shoot())
shoot_with_empty_chamber(shooter)
return NONE
INVOKE_ASYNC(src, PROC_REF(do_autofire_shot), source, target, shooter, params)
INVOKE_ASYNC(src, PROC_REF(do_autofire_shot), source, target, shooter, allow_akimbo, params)
return COMPONENT_AUTOFIRE_SHOT_SUCCESS //All is well, we can continue shooting.


/obj/item/gun/proc/do_autofire_shot(datum/source, atom/target, mob/living/shooter, params)
/obj/item/gun/proc/do_autofire_shot(datum/source, atom/target, mob/living/shooter, allow_akimbo, params)
var/obj/item/gun/akimbo_gun = shooter.get_inactive_held_item()
var/bonus_spread = 0
if(istype(akimbo_gun) && weapon_weight < WEAPON_MEDIUM)
if(istype(akimbo_gun) && weapon_weight < WEAPON_MEDIUM && allow_akimbo)
if(akimbo_gun.weapon_weight < WEAPON_MEDIUM && akimbo_gun.can_trigger_gun(shooter))
bonus_spread = dual_wield_spread
addtimer(CALLBACK(akimbo_gun, TYPE_PROC_REF(/obj/item/gun, process_fire), target, shooter, TRUE, params, null, bonus_spread), 1)
Expand Down
Loading

0 comments on commit 4d9e36c

Please sign in to comment.