Skip to content

Commit

Permalink
Merge remote-tracking branch 'off/master' into merge-upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaxeer committed Aug 2, 2024
2 parents 0e04501 + b3e22d3 commit 80a7c1f
Show file tree
Hide file tree
Showing 38 changed files with 644 additions and 324 deletions.
2 changes: 1 addition & 1 deletion code/__DEFINES/uplink.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

/// Typepath used for uplink items which don't actually produce an item (essentially just a placeholder)
/// Future todo: Make this not necessary / make uplink items support item-less items natively
#define ABSTRACT_UPLINK_ITEM /obj/effect/gibspawner/generic
#define ABSTRACT_UPLINK_ITEM /obj/item/loot_table_maker

/// Lower threshold for which an uplink items's TC cost is considered "low" for spy bounties picking rewards
#define SPY_LOWER_COST_THRESHOLD 5
Expand Down
17 changes: 12 additions & 5 deletions code/_onclick/hud/radial.dm
Original file line number Diff line number Diff line change
Expand Up @@ -317,14 +317,14 @@ GLOBAL_LIST_EMPTY(radial_menus)
current_page = WRAP(current_page + 1,1,pages+1)
update_screen_objects()

/datum/radial_menu/proc/show_to(mob/M)
/datum/radial_menu/proc/show_to(mob/M, offset_x = 0, offset_y = 0)
if(current_user)
hide()
if(!M.client || !anchor)
return
current_user = M.client
//Blank
menu_holder = image(icon='icons/effects/effects.dmi',loc=anchor,icon_state="nothing", layer = RADIAL_BACKGROUND_LAYER)
menu_holder = image(icon='icons/effects/effects.dmi',loc=anchor,icon_state="nothing", layer = RADIAL_BACKGROUND_LAYER, pixel_x = offset_x, pixel_y = offset_y)
SET_PLANE_EXPLICIT(menu_holder, ABOVE_HUD_PLANE, M)
menu_holder.appearance_flags |= KEEP_APART|RESET_ALPHA|RESET_COLOR|RESET_TRANSFORM
menu_holder.vis_contents += elements + close_button
Expand Down Expand Up @@ -356,7 +356,7 @@ GLOBAL_LIST_EMPTY(radial_menus)
Choices should be a list where list keys are movables or text used for element names and return value
and list values are movables/icons/images used for element icons
*/
/proc/show_radial_menu(mob/user, atom/anchor, list/choices, uniqueid, radius, datum/callback/custom_check, require_near = FALSE, tooltips = FALSE, no_repeat_close = FALSE, radial_slice_icon = "radial_slice", autopick_single_option = TRUE, entry_animation = TRUE, click_on_hover = FALSE)
/proc/show_radial_menu(mob/user, atom/anchor, list/choices, uniqueid, radius, datum/callback/custom_check, require_near = FALSE, tooltips = FALSE, no_repeat_close = FALSE, radial_slice_icon = "radial_slice", autopick_single_option = TRUE, entry_animation = TRUE, click_on_hover = FALSE, user_space = FALSE)
if(!user || !anchor || !length(choices))
return

Expand All @@ -379,11 +379,18 @@ GLOBAL_LIST_EMPTY(radial_menus)
menu.radius = radius
if(istype(custom_check))
menu.custom_check_callback = custom_check
menu.anchor = anchor
menu.anchor = user_space ? user : anchor
menu.radial_slice_icon = radial_slice_icon
menu.check_screen_border(user) //Do what's needed to make it look good near borders or on hud
menu.set_choices(choices, tooltips, click_on_hover)
menu.show_to(user)
var/offset_x = 0
var/offset_y = 0
if (user_space)
var/turf/user_turf = get_turf(user)
var/turf/anchor_turf = get_turf(anchor)
offset_x = (anchor_turf.x - user_turf.x) * world.icon_size + anchor.pixel_x - user.pixel_x
offset_y = (anchor_turf.y - user_turf.y) * world.icon_size + anchor.pixel_y - user.pixel_y
menu.show_to(user, offset_x, offset_y)
menu.wait(user, anchor, require_near)
var/answer = menu.selected_choice
qdel(menu)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/callouts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
for(var/datum/callout_option/callout_option as anything in callout_options)
callout_items[callout_option] = image(icon = 'icons/hud/radial.dmi', icon_state = callout_option::icon_state)

var/datum/callout_option/selection = show_radial_menu(user, get_turf(clicked_atom), callout_items, entry_animation = FALSE, click_on_hover = TRUE)
var/datum/callout_option/selection = show_radial_menu(user, get_turf(clicked_atom), callout_items, entry_animation = FALSE, click_on_hover = TRUE, user_space = TRUE)
if (!selection)
return

Expand Down
8 changes: 8 additions & 0 deletions code/datums/components/uplink.dm
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,12 @@
for(var/datum/uplink_item/item as anything in uplink_handler.extra_purchasable)
if(item.stock_key in stock_list)
extra_purchasable_stock[REF(item)] = stock_list[item.stock_key]
var/atom/actual_item = item.item
extra_purchasable += list(list(
"id" = item.type,
"name" = item.name,
"icon" = actual_item.icon,
"icon_state" = actual_item.icon_state,
"cost" = item.cost,
"desc" = item.desc,
"category" = item.category ? initial(item.category.name) : null,
Expand Down Expand Up @@ -288,6 +291,11 @@
return
item = SStraitor.uplink_items_by_type[item_path]
uplink_handler.purchase_item(ui.user, item, parent)
if("buy_raw_tc")
if (uplink_handler.telecrystals <= 0)
return
var/desired_amount = tgui_input_number(ui.user, "How many raw telecrystals to buy?", "Buy Raw TC", default = uplink_handler.telecrystals, max_value = uplink_handler.telecrystals)
uplink_handler.purchase_raw_tc(ui.user, desired_amount, parent)
if("lock")
if(!lockable)
return TRUE
Expand Down
18 changes: 18 additions & 0 deletions code/game/objects/effects/particles/fire.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,21 @@
drift = generator(GEN_VECTOR, list(-0.1,0), list(0.1,0.025), UNIFORM_RAND)
spin = generator(GEN_NUM, list(-15,15), NORMAL_RAND)
scale = generator(GEN_VECTOR, list(0.5,0.5), list(2,2), NORMAL_RAND)

/particles/embers/spark
count = 3
spawning = 2
gradient = list("#FBAF4D", "#FCE6B6", "#FFFFFF")
lifespan = 1.5 SECONDS
fade = 1 SECONDS
fadein = 0.1 SECONDS
grow = -0.1
velocity = generator(GEN_CIRCLE, 3, 3, SQUARE_RAND)
position = generator(GEN_SPHERE, 0, 0, LINEAR_RAND)
scale = generator(GEN_VECTOR, list(0.5, 0.5), list(1,1), NORMAL_RAND)
drift = list(0)

/particles/embers/spark/severe
count = 10
spawning = 5
gradient = list("#FCE6B6", "#FFFFFF")
13 changes: 13 additions & 0 deletions code/game/objects/effects/particles/smoke.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,16 @@
grow = 0.05
spin = 2
color = "#fcffff77"

/particles/smoke/cyborg
count = 5
spawning = 1
lifespan = 1 SECONDS
fade = 1.8 SECONDS
position = list(0, 0, 0)
scale = list(0.5, 0.5)
grow = 0.1

/particles/smoke/cyborg/heavy_damage
lifespan = 0.8 SECONDS
fade = 0.8 SECONDS
16 changes: 12 additions & 4 deletions code/game/objects/items/tools/weldingtool.dm
Original file line number Diff line number Diff line change
Expand Up @@ -145,22 +145,30 @@
if(user.combat_mode)
return NONE

return try_heal_loop(interacting_with, user)

/obj/item/weldingtool/proc/try_heal_loop(atom/interacting_with, mob/living/user, repeating = FALSE)
var/mob/living/carbon/human/attacked_humanoid = interacting_with
var/obj/item/bodypart/affecting = attacked_humanoid.get_bodypart(check_zone(user.zone_selected))
if(isnull(affecting) || !IS_ROBOTIC_LIMB(affecting))
return NONE

var/use_delay = 0
if (!affecting.get_damage())
return

user.visible_message(span_notice("[user] starts to fix some of the dents on [attacked_humanoid == user ? user.p_their() : "[attacked_humanoid]'s"] [affecting.name]."),
span_notice("You start fixing some of the dents on [attacked_humanoid == user ? "your" : "[attacked_humanoid]'s"] [affecting.name]."))
var/use_delay = repeating ? 1 SECONDS : 0
if(user == attacked_humanoid)
user.visible_message(span_notice("[user] starts to fix some of the dents on [attacked_humanoid]'s [affecting.name]."),
span_notice("You start fixing some of the dents on [attacked_humanoid == user ? "your" : "[attacked_humanoid]'s"] [affecting.name]."))
use_delay = 5 SECONDS

if(!use_tool(attacked_humanoid, user, use_delay, volume=50, amount=1))
return ITEM_INTERACT_BLOCKING

attacked_humanoid.item_heal(user, brute_heal = 15, burn_heal = 0, heal_message_brute = "dents", heal_message_burn = "burnt wires", required_bodytype = BODYTYPE_ROBOTIC)
if (!attacked_humanoid.item_heal(user, brute_heal = 15, burn_heal = 0, heal_message_brute = "dents", heal_message_burn = "burnt wires", required_bodytype = BODYTYPE_ROBOTIC))
return ITEM_INTERACT_BLOCKING

INVOKE_ASYNC(src, PROC_REF(try_heal_loop), interacting_with, user, TRUE)
return ITEM_INTERACT_SUCCESS

/obj/item/weldingtool/afterattack(atom/target, mob/user, click_parameters)
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/structures/tables_racks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@
if((shove_flags & SHOVE_KNOCKDOWN_BLOCKED) || !(shove_flags & SHOVE_BLOCKED))
return
target.Knockdown(SHOVE_KNOCKDOWN_TABLE)
target.apply_status_effect(/datum/status_effect/next_shove_stuns)
target.visible_message(span_danger("[shover.name] shoves [target.name] onto \the [src]!"),
span_userdanger("You're shoved onto \the [src] by [shover.name]!"), span_hear("You hear aggressive shuffling followed by a loud thud!"), COMBAT_MESSAGE_RANGE, shover)
to_chat(shover, span_danger("You shove [target.name] onto \the [src]!"))
Expand Down
6 changes: 5 additions & 1 deletion code/modules/admin/verbs/lua/lua_editor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
if(last_error)
data["lastError"] = last_error
last_error = null
data["supressRuntimes"] = current_state.supress_runtimes
data["states"] = list()
for(var/datum/lua_state/state as anything in SSlua.states)
data["states"] += state.display_name
Expand Down Expand Up @@ -228,7 +229,7 @@
if(result["status"] == "error")
last_error = result["message"]
arguments.Cut()
return TRUE
return
if("resumeTask")
var/task_index = params["index"]
SSlua.queue_resume(current_state, task_index, arguments)
Expand Down Expand Up @@ -261,6 +262,9 @@
if("toggleShowGlobalTable")
show_global_table = !show_global_table
return TRUE
if("toggleSupressRuntimes")
current_state.supress_runtimes = !current_state.supress_runtimes
return TRUE
if("nextPage")
page = min(page+1, CEILING(current_state.log.len/50, 1)-1)
return TRUE
Expand Down
3 changes: 3 additions & 0 deletions code/modules/admin/verbs/lua/lua_state.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ GLOBAL_PROTECT(lua_state_stack)
/// Whether the timer.lua script has been included into this lua context state.
var/timer_enabled = FALSE

/// Whether to supress logging BYOND runtimes for this state.
var/supress_runtimes = FALSE

/// Callbacks that need to be ran on next tick
var/list/functions_to_execute = list()

Expand Down
15 changes: 15 additions & 0 deletions code/modules/antagonists/traitor/uplink_handler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,21 @@
on_update()
return TRUE

/datum/uplink_handler/proc/purchase_raw_tc(mob/user, amount, atom/movable/source)
if(shop_locked)
return FALSE
if(telecrystals < amount)
return FALSE

telecrystals -= amount
var/tcs = new /obj/item/stack/telecrystal(get_turf(user), amount)
user.put_in_hands(tcs)

log_uplink("[key_name(user)] purchased [amount] raw telecrystals from [source]'s uplink")
on_update()
return TRUE


/// Generates objectives for this uplink handler
/datum/uplink_handler/proc/generate_objectives()
var/potential_objectives_left = maximum_potential_objectives - (length(potential_objectives) + length(active_objectives))
Expand Down
3 changes: 3 additions & 0 deletions code/modules/asset_cache/assets/uplink.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@

for(var/datum/uplink_item/item_path as anything in subtypesof(/datum/uplink_item))
var/datum/uplink_item/item = new item_path()
var/atom/actual_item = item.item
if(item.item) {
items += list(list(
"id" = item_path,
"name" = item.name,
"icon" = actual_item.icon,
"icon_state" = actual_item.icon_state,
"cost" = item.cost,
"desc" = item.desc,
"category" = item.category ? initial(item.category.name) : null,
Expand Down
9 changes: 8 additions & 1 deletion code/modules/bitrunning/components/avatar_connection.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
help_text,
)

if(!isliving(parent) || !isliving(old_body) || !server.is_operational || !pod.is_operational)
if(!isliving(parent) || !isliving(old_body) || !old_mind || !server.is_operational || !pod.is_operational)
return COMPONENT_INCOMPATIBLE

var/mob/living/avatar = parent
Expand Down Expand Up @@ -66,6 +66,9 @@
if(alias && avatar.real_name != alias)
avatar.fully_replace_character_name(avatar.real_name, alias)

for(var/skill_type in old_mind.known_skills)
avatar.mind.set_experience(skill_type, old_mind.get_skill_exp(skill_type), silent = TRUE)

avatar.playsound_local(avatar, 'sound/magic/blink.ogg', 25, TRUE)
avatar.set_static_vision(2 SECONDS)
avatar.set_temp_blindness(1 SECONDS) // I'm in
Expand Down Expand Up @@ -281,6 +284,10 @@
if(isnull(old_mind) || isnull(old_body))
return

for(var/skill_type in avatar.mind.known_skills)
old_mind.set_experience(skill_type, avatar.mind.get_skill_exp(skill_type), silent = TRUE)
avatar.mind.set_experience(skill_type, 0, silent = TRUE)

ghost.mind = old_mind
if(old_body.stat != DEAD)
old_mind.transfer_to(old_body, force_key_move = TRUE)
Expand Down
24 changes: 14 additions & 10 deletions code/modules/cargo/supplypod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -421,18 +421,22 @@
insert(turf_underneath, holder)

/obj/structure/closet/supplypod/insert(atom/to_insert, atom/movable/holder)
if(insertion_allowed(to_insert))
if(isturf(to_insert))
var/turf/turf_to_insert = to_insert
turfs_in_cargo += turf_to_insert.type
turf_to_insert.ScrapeAway()
else
var/atom/movable/movable_to_insert = to_insert
movable_to_insert.forceMove(holder)
return TRUE
else
if(!insertion_allowed(to_insert))
return FALSE

if(isturf(to_insert))
var/turf/turf_to_insert = to_insert
turfs_in_cargo += turf_to_insert.type
turf_to_insert.ScrapeAway()
return TRUE

var/atom/movable/movable_to_insert = to_insert
if (ismob(movable_to_insert))
var/mob/mob_to_insert = movable_to_insert
if (!isnull(mob_to_insert.buckled))
mob_to_insert.buckled.unbuckle_mob(mob_to_insert, force = TRUE)
movable_to_insert.forceMove(holder)

/obj/structure/closet/supplypod/insertion_allowed(atom/to_insert)
if(to_insert.invisibility == INVISIBILITY_ABSTRACT)
return FALSE
Expand Down
8 changes: 8 additions & 0 deletions code/modules/fishing/sources/_fish_source.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ GLOBAL_LIST_INIT(specific_fish_icons, zebra_typecacheof(list(
var/explosive_malus = FALSE
/// If explosive_malus is true, this will be used to keep track of the turfs where an explosion happened for when we'll spawn the loot.
var/list/exploded_turfs
/// Mindless mobs that can fish will never pull up items on this list
var/static/list/profound_fisher_blacklist = typecacheof(list(
/mob/living/basic/mining/lobstrosity,
/obj/structure/closet/crate/necropolis/tendril,
))

/datum/fish_source/New()
if(!PERFORM_ALL_TESTS(focus_only/fish_sources_tables))
Expand Down Expand Up @@ -276,6 +281,9 @@ GLOBAL_LIST(fishing_property_cache)

var/list/fish_list_properties = collect_fish_properties()


if(HAS_TRAIT(fisherman, TRAIT_PROFOUND_FISHER) && !fisherman.client)
final_table -= profound_fisher_blacklist
for(var/result in final_table)
final_table[result] *= rod.hook?.get_hook_bonus_multiplicative(result)
final_table[result] += rod.hook?.get_hook_bonus_additive(result)//Decide on order here so it can be multiplicative
Expand Down
20 changes: 16 additions & 4 deletions code/modules/mob/living/silicon/robot/death.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,30 @@
else
logevent("FATAL -- SYSTEM HALT")
modularInterface.shutdown_computer()
eye_flash_timer = addtimer(CALLBACK(src, PROC_REF(flash_headlamp)), 2 SECONDS, TIMER_STOPPABLE | TIMER_LOOP)
. = ..()

locked = FALSE //unlock cover

if(!QDELETED(builtInCamera) && builtInCamera.camera_enabled)
builtInCamera.toggle_cam(src,0)
toggle_headlamp(TRUE) //So borg lights are disabled when killed.

toggle_headlamp(TRUE) //So borg lights are disabled when killed.
drop_all_held_items() // particularly to ensure sight modes are cleared

update_icons()

unbuckle_all_mobs(TRUE)

SSblackbox.ReportDeath(src)

/mob/living/silicon/robot/proc/flash_headlamp()
if(eye_lights)
eye_lights = null
regenerate_icons()
return

eye_lights = new()
eye_lights.icon_state = "[model.special_light_key ? "[model.special_light_key]":"[model.cyborg_base_icon]"]_e_r"
eye_lights.color = COLOR_WHITE
SET_PLANE_EXPLICIT(eye_lights, ABOVE_GAME_PLANE, src)
eye_lights.icon = icon
regenerate_icons()
add_overlay(eye_lights)
4 changes: 4 additions & 0 deletions code/modules/mob/living/silicon/robot/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@

/mob/living/silicon/robot/updatehealth()
..()
update_damage_particles()
if(!model.breakable_modules)
return

Expand Down Expand Up @@ -680,6 +681,9 @@
builtInCamera.toggle_cam(src, 0)
if(full_heal_flags & HEAL_ADMIN)
locked = TRUE
if(eye_flash_timer)
deltimer(eye_flash_timer)
eye_flash_timer = null
src.set_stat(CONSCIOUS)
notify_ai(AI_NOTIFICATION_NEW_BORG)
toggle_headlamp(FALSE, TRUE) //This will reenable borg headlamps if doomsday is currently going on still.
Expand Down
Loading

0 comments on commit 80a7c1f

Please sign in to comment.