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

Merge Upstream #865

Merged
merged 21 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
962e78a
Makes borgs take damage from being flung into objects (#23000)
DGamerL Dec 13, 2023
c18f314
runtime moment (#23542)
Contrabang Dec 13, 2023
bbc6b79
Lavaland: Change drunk miner "structures" and add "no_lava" helper. (…
Venuska1117 Dec 13, 2023
3cf43de
Fix: Missing icon_state after removing the floor (#23463)
AyIong Dec 13, 2023
48c0bfd
Fixes abstract outfit types showing up in the Robust Dress Shop (#23507)
CinnamonSnowball Dec 13, 2023
518e732
Changes the suit sensors hotkey (#23458)
vengeful910month3 Dec 13, 2023
28163dc
woop woop (#23373)
Contrabang Dec 13, 2023
e623109
actually revert this until its NOT broken (#23557)
Contrabang Dec 14, 2023
b9fc8bc
Fixes cleanables not garbage collecting properly (#23553)
Henri215 Dec 14, 2023
3aa6154
FIX: correct custom rank manifest modify (#23491)
PhantornRU Dec 14, 2023
5a163d7
TGUI Input List Toggle (#23551)
AyIong Dec 14, 2023
ff53bdd
Buff wizard apprentice, limits to one per wizard (The Sequel) (#23258)
datlo Dec 14, 2023
d48279e
fix: remove `owner` requiring dependencies from `/datum/antagonist` o…
Gaxeer Dec 15, 2023
77b4959
fixes vortex parry arm being invisible (#23516)
Qwertytoforty Dec 15, 2023
6301f38
Small Oversight Fix for PR #23505 (#23544)
OctusGit Dec 15, 2023
ca98c4f
we love runtimes (#23560)
Contrabang Dec 15, 2023
87a7e85
blocks space from anomaly events. (#23562)
Qwertytoforty Dec 15, 2023
9b541b2
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise int…
AyIong Dec 15, 2023
2361f1c
Merge branch 'ParadiseSS13-master' into merge-upstream-1
AyIong Dec 15, 2023
733a329
Rebuild TGUI
AyIong Dec 15, 2023
1266b74
Linter fix
AyIong Dec 15, 2023
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
177 changes: 113 additions & 64 deletions _maps/map_files/RandomRuins/LavaRuins/lavaland_surface_blooddrunk1.dmm

Large diffs are not rendered by default.

236 changes: 163 additions & 73 deletions _maps/map_files/RandomRuins/LavaRuins/lavaland_surface_blooddrunk2.dmm

Large diffs are not rendered by default.

346 changes: 296 additions & 50 deletions _maps/map_files/RandomRuins/LavaRuins/lavaland_surface_blooddrunk3.dmm

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion code/__DEFINES/preferences_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@
#define PREFTOGGLE_2_DANCE_DISCO (1<<16) // 65536
#define PREFTOGGLE_2_MOD_ACTIVATION_METHOD (1<<17) // 131072
#define PREFTOGGLE_2_PARALLAX_IN_DARKNESS (1<<18) // 262144
#define PREFTOGGLE_2_DISABLE_TGUI_LISTS (1<<19) // 524288

#define TOGGLES_2_TOTAL 524287 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined.
#define TOGGLES_2_TOTAL 1048575 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined.

#define TOGGLES_2_DEFAULT (PREFTOGGLE_2_FANCYUI|PREFTOGGLE_2_ITEMATTACK|PREFTOGGLE_2_WINDOWFLASHING|PREFTOGGLE_2_RUNECHAT|PREFTOGGLE_2_DEATHMESSAGE|PREFTOGGLE_2_EMOTE_BUBBLE|PREFTOGGLE_2_SEE_ITEM_OUTLINES|PREFTOGGLE_2_THOUGHT_BUBBLE|PREFTOGGLE_2_DANCE_DISCO|PREFTOGGLE_2_MOD_ACTIVATION_METHOD)

Expand Down
30 changes: 18 additions & 12 deletions code/__HELPERS/path.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define GET_DIST_REAL(turf_a, turf_b) sqrt((turf_a.x - turf_b.x) ** 2 + (turf_a.y - turf_b.y) ** 2)

/**
* This file contains the stuff you need for using JPS (Jump Point Search) pathing, an alternative to A* that skips
* over large numbers of uninteresting tiles resulting in much quicker pathfinding solutions.
Expand Down Expand Up @@ -65,18 +67,21 @@
var/jumps
/// Nodes store the endgoal so they can process their heuristic without a reference to the pathfind datum
var/turf/node_goal
/// Multiplier for making diagonals more expensive
var/diagonal_move_mult = 1

/datum/jps_node/New(turf/our_tile, datum/jps_node/incoming_previous_node, jumps_taken, turf/incoming_goal)
/datum/jps_node/New(turf/our_tile, datum/jps_node/incoming_previous_node, jumps_taken, turf/incoming_goal, is_diagonal)
tile = our_tile
jumps = jumps_taken
diagonal_move_mult = (is_diagonal ? SQRT_2 : 1)
if(incoming_goal) // if we have the goal argument, this must be the first/starting node
node_goal = incoming_goal
else if(incoming_previous_node) // if we have the parent, this is from a direct lateral/diagonal scan, we can fill it all out now
previous_node = incoming_previous_node
number_tiles = previous_node.number_tiles + jumps
node_goal = previous_node.node_goal
heuristic = get_dist(tile, node_goal)
f_value = number_tiles + heuristic
heuristic = GET_DIST_REAL(tile, node_goal)
f_value = heuristic + previous_node.number_tiles + (jumps * diagonal_move_mult)
// otherwise, no parent node means this is from a subscan lateral scan, so we just need the tile for now until we call [datum/jps/proc/update_parent] on it

/datum/jps_node/Destroy(force, ...)
Expand All @@ -86,10 +91,10 @@
/datum/jps_node/proc/update_parent(datum/jps_node/new_parent)
previous_node = new_parent
node_goal = previous_node.node_goal
jumps = get_dist(tile, previous_node.tile)
jumps = GET_DIST_REAL(tile, previous_node.tile)
number_tiles = previous_node.number_tiles + jumps
heuristic = get_dist(tile, node_goal)
f_value = number_tiles + heuristic
heuristic = GET_DIST_REAL(tile, node_goal)
f_value = heuristic + previous_node.number_tiles + (jumps * diagonal_move_mult)

/// TODO: Macro this to reduce proc overhead
/proc/HeapPathWeightCompare(datum/jps_node/a, datum/jps_node/b)
Expand Down Expand Up @@ -149,7 +154,7 @@
return
if(start.z != end.z || start == end) //no pathfinding between z levels
return
if(max_distance && (max_distance < get_dist(start, end))) //if start turf is farther than max_distance from end turf, no need to do anything
if(max_distance && (max_distance < GET_DIST_REAL(start, end))) //if start turf is farther than max_distance from end turf, no need to do anything
return

//initialization
Expand Down Expand Up @@ -260,7 +265,7 @@
if(!CAN_STEP(lag_turf, current_turf))
return

if(current_turf == end || (mintargetdist && (get_dist(current_turf, end) <= mintargetdist)))
if(current_turf == end || (mintargetdist && (GET_DIST_REAL(current_turf, end) <= mintargetdist)))
var/datum/jps_node/final_node = new(current_turf, parent_node, steps_taken)
sources[current_turf] = original_turf
if(parent_node) // if this is a direct lateral scan we can wrap up, if it's a subscan from a diag, we need to let the diag make their node first, then finish
Expand Down Expand Up @@ -321,8 +326,8 @@
if(!CAN_STEP(lag_turf, current_turf))
return

if(current_turf == end || (mintargetdist && (get_dist(current_turf, end) <= mintargetdist)))
var/datum/jps_node/final_node = new(current_turf, parent_node, steps_taken)
if(current_turf == end || (mintargetdist && (GET_DIST_REAL(current_turf, end) <= mintargetdist)))
var/datum/jps_node/final_node = new(current_turf, parent_node, steps_taken, is_diagonal = TRUE)
sources[current_turf] = original_turf
unwind_path(final_node)
return
Expand Down Expand Up @@ -360,12 +365,12 @@
possible_child_node = (lateral_scan_spec(current_turf, SOUTH) || lateral_scan_spec(current_turf, EAST))

if(interesting || possible_child_node)
var/datum/jps_node/newnode = new(current_turf, parent_node, steps_taken)
var/datum/jps_node/newnode = new(current_turf, parent_node, steps_taken, is_diagonal = TRUE)
open.Insert(newnode)
if(possible_child_node)
possible_child_node.update_parent(newnode)
open.Insert(possible_child_node)
if(possible_child_node.tile == end || (mintargetdist && (get_dist(possible_child_node.tile, end) <= mintargetdist)))
if(possible_child_node.tile == end || (mintargetdist && (GET_DIST_REAL(possible_child_node.tile, end) <= mintargetdist)))
unwind_path(possible_child_node)
return

Expand Down Expand Up @@ -437,3 +442,4 @@

#undef CAN_STEP
#undef STEP_NOT_HERE_BUT_THERE
#undef GET_DIST_REAL
1 change: 1 addition & 0 deletions code/__HELPERS/trait_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_IPC_JOINTS_SEALED "ipc_joints_sealed" // The IPC's limbs will not pop off bar sharp damage (aka like a human), but will take slightly more stamina damage
#define TRAIT_HAS_GPS "has_gps" // used for /Stat
#define TRAIT_CAN_VIEW_HEALTH "can_view_health" // Also used for /Stat
#define TRAIT_MAGPULSE "magnetificent" // Used for anything that is magboot related

//***** MIND TRAITS *****/
#define TRAIT_HOLY "is_holy" // The mob is holy in regards to religion
Expand Down
3 changes: 2 additions & 1 deletion code/_globalvars/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_DODGE_ALL_THROWN_OBJECTS" = TRAIT_DODGE_ALL_OBJECTS,
"TRAIT_SUPERMATTER_IMMUNE" = TRAIT_SUPERMATTER_IMMUNE,
"TRAIT_BADASS" = TRAIT_BADASS,
"TRAIT_FORCED_STANDING" = TRAIT_FORCED_STANDING
"TRAIT_FORCED_STANDING" = TRAIT_FORCED_STANDING,
"TRAIT_MAGPULSE" = TRAIT_MAGPULSE
),

/datum/mind = list(
Expand Down
8 changes: 7 additions & 1 deletion code/datums/datacore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,20 @@ GLOBAL_LIST_EMPTY(PDA_Manifest)
break

var/list/all_jobs = get_job_datums()
var/is_custom_job = TRUE

for(var/datum/job/J in all_jobs)
var/list/alttitles = get_alternate_titles(J.title)
if(!J) continue
if(J.title == real_title)
is_custom_job = FALSE
if(assignment in alttitles)
real_title = J.title
is_custom_job = FALSE
break

if(is_custom_job)
real_title = foundrecord.fields["real_rank"]

if(foundrecord)
foundrecord.fields["rank"] = assignment
foundrecord.fields["real_rank"] = real_title
Expand Down
2 changes: 1 addition & 1 deletion code/datums/outfits/outfit_admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@
/obj/item/stack/tile/plasteel = 7
)

/datum/outfit/admin/tournament_janitor/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
/datum/outfit/admin/tournament/tournament_janitor/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
. = ..()
if(visualsOnly)
return
Expand Down
76 changes: 41 additions & 35 deletions code/datums/outfits/vv_outfit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
/datum/outfit/varedit
var/list/vv_values
var/list/stored_access
var/update_id_name = FALSE //If the name of the human is same as the name on the id they're wearing we'll update provided id when equipping
var/update_id_name = FALSE // If the name of the human is same as the name on the id they're wearing we'll update provided id when equipping

/datum/outfit/varedit/pre_equip(mob/living/carbon/human/H, visualsOnly)
H.delete_equipment() //Applying VV to wrong objects is not reccomended.
H.delete_equipment() // Applying VV to wrong objects is not reccomended.
. = ..()

/datum/outfit/varedit/proc/set_equipment_by_slot(slot, item_path)
Expand Down Expand Up @@ -46,27 +46,29 @@


/proc/collect_vv(obj/item/I)
//Temporary/Internal stuff, do not copy these.
var/static/list/ignored_vars = list("vars","x","y","z","plane","layer","override","animate_movement","pixel_step_size","screen_loc","fingerprintslast","tip_timer")

if(istype(I))
var/list/vedits = list()
for(var/varname in I.vars)
if(!I.can_vv_get(varname))
continue
if(varname in ignored_vars)
continue
var/vval = I.vars[varname] // Can't check initial() because it doesn't work on a list index
//Only text/numbers and icons variables to make it less weirdness prone.
if(!istext(vval) && !isnum(vval) && !isicon(vval))
continue
vedits[varname] = I.vars[varname]
return vedits
if(!istype(I))
return

// Temporary/Internal stuff, do not copy these.
var/static/list/ignored_vars = list("vars", "x", "y", "z", "plane", "layer", "override", "animate_movement", "pixel_step_size", "screen_loc", "fingerprintslast", "tip_timer")

var/list/vedits = list()
for(var/varname in I.vars)
if(!I.can_vv_get(varname))
continue
if(varname in ignored_vars)
continue
var/vval = I.vars[varname] // Can't check initial() because it doesn't work on a list index
// Only text/numbers and icons variables to make it less weirdness prone.
if(!istext(vval) && !isnum(vval) && !isicon(vval))
continue
vedits[varname] = I.vars[varname]
return vedits

/mob/living/carbon/human/proc/copy_outfit()
var/datum/outfit/varedit/O = new

//Copy equipment
// Copy equipment
var/list/result = list()
var/list/slots_to_check = list(SLOT_HUD_JUMPSUIT, SLOT_HUD_BACK, SLOT_HUD_OUTER_SUIT, SLOT_HUD_BELT, SLOT_HUD_GLOVES, SLOT_HUD_SHOES, SLOT_HUD_HEAD, SLOT_HUD_WEAR_MASK, SLOT_HUD_LEFT_EAR, SLOT_HUD_RIGHT_EAR, SLOT_HUD_GLASSES, SLOT_HUD_WEAR_ID, SLOT_HUD_WEAR_PDA, SLOT_HUD_SUIT_STORE, SLOT_HUD_LEFT_STORE, SLOT_HUD_RIGHT_STORE)
for(var/s in slots_to_check)
Expand All @@ -77,7 +79,7 @@
if(istype(I))
O.set_equipment_by_slot(s, I.type)

//Copy access
// Copy access
O.stored_access = list()
var/obj/item/id_slot = get_item_by_slot(SLOT_HUD_WEAR_ID)
if(id_slot)
Expand All @@ -86,8 +88,8 @@
if(ID && ID.registered_name == real_name)
O.update_id_name = TRUE

//Copy hands
if(l_hand || r_hand) //Not in the mood to let outfits transfer amputees
// Copy hands
if(l_hand || r_hand) // Not in the mood to let outfits transfer amputees
var/obj/item/left_hand = l_hand
var/obj/item/right_hand = r_hand
if(istype(left_hand))
Expand All @@ -102,7 +104,7 @@
result["RHAND"] = vedits
O.vv_values = result

//Copy backpack contents if exist.
// Copy backpack contents if exist.
var/obj/item/backpack = get_item_by_slot(SLOT_HUD_BACK)
if(istype(backpack) && LAZYLEN(backpack.contents) > 0)
var/list/typecounts = list()
Expand All @@ -112,9 +114,9 @@
else
typecounts[I.type] = 1
O.backpack_contents = typecounts
//TODO : Copy varedits from backpack stuff too.
// TODO : Copy varedits from backpack stuff too.

//Copy implants
// Copy implants
O.implants = list()
for(var/obj/item/implant/I in contents)
if(istype(I))
Expand All @@ -134,15 +136,16 @@
if(istype(A))
O.accessories |= A

//Copy to outfit cache
// Copy to outfit cache
var/outfit_name = stripped_input(usr, "Enter the outfit name")
O.name = outfit_name
GLOB.custom_outfits += O
to_chat(usr, "Outfit registered, use select equipment to equip it.")

/datum/outfit/varedit/post_equip(mob/living/carbon/human/H, visualsOnly)
. = ..()
//Apply VV

// Apply VV
for(var/slot in vv_values)
var/list/edits = vv_values[slot]
var/obj/item/I
Expand All @@ -155,15 +158,18 @@
I = H.get_item_by_slot(text2num(slot))
for(var/vname in edits)
I.vv_edit_var(vname,edits[vname])
//Apply access

// Apply access
var/obj/item/id_slot = H.get_item_by_slot(SLOT_HUD_WEAR_ID)
if(id_slot)
var/obj/item/card/id/card = id_slot.GetID()
if(istype(card))
card.access |= stored_access
if(update_id_name)
card.registered_name = H.real_name
card.update_label()
if(!id_slot)
return

var/obj/item/card/id/card = id_slot.GetID()
if(istype(card))
card.access |= stored_access
if(update_id_name)
card.registered_name = H.real_name
card.update_label()

/datum/outfit/varedit/get_json_data()
. = .. ()
Expand Down
4 changes: 2 additions & 2 deletions code/datums/ruins/lavaland.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@
cost = 0
allow_duplicates = FALSE //will only spawn one variant of the ruin

/datum/map_template/ruin/lavaland/blood_drunk_miner/guidance
name = "Blood-Drunk Miner (Guidance)"
/datum/map_template/ruin/lavaland/blood_drunk_miner/guardian
name = "Blood-Drunk Miner (Guardian)"
suffix = "lavaland_surface_blooddrunk2.dmm"

/datum/map_template/ruin/lavaland/blood_drunk_miner/hunter
Expand Down
11 changes: 11 additions & 0 deletions code/datums/spells/banana_touch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
icon_state = "banana_touch"
item_state = "banana_touch"

/obj/effect/proc_holder/spell/touch/banana/apprentice
hand_path = /obj/item/melee/touch_attack/banana/apprentice

/obj/item/melee/touch_attack/banana/apprentice

/obj/item/melee/touch_attack/banana/apprentice/afterattack(atom/target, mob/living/carbon/user, proximity)
if(iswizard(target) && target != user)
to_chat(user, "<span class='danger'>Seriously?! Honk THEM, not me!</span>")
return
..()

/obj/item/melee/touch_attack/banana/afterattack(atom/target, mob/living/carbon/user, proximity)
if(!proximity || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
Expand Down
26 changes: 26 additions & 0 deletions code/datums/spells/wizard_spells.dm
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,29 @@
/obj/effect/proc_holder/spell/area_teleport/teleport/create_new_targeting()
return new /datum/spell_targeting/self

/obj/effect/proc_holder/spell/return_to_teacher
name = "Return to Teacher"
desc = "This spell teleports you back to your teacher."

school = "abjuration"
base_cooldown = 30 SECONDS
clothes_req = TRUE
invocation = "SCYAR TESO"
invocation_type = "shout"
cooldown_min = 10 SECONDS

action_icon_state = "spell_teleport"
var/datum/mind/teacher

/obj/effect/proc_holder/spell/return_to_teacher/create_new_targeting()
return new /datum/spell_targeting/self

/obj/effect/proc_holder/spell/return_to_teacher/cast(list/targets, mob/living/user = usr)
if(!(teacher && teacher.current))
to_chat(user, "<span class='danger'>The link to your teacher is broken!</span>")
return
do_teleport(user, teacher.current, 1, sound_in = 'sound/magic/blink.ogg', sound_out = 'sound/magic/blink.ogg', safe_turf_pick = TRUE)

/obj/effect/proc_holder/spell/forcewall
name = "Force Wall"
desc = "This spell creates a 3 tile wide unbreakable wall that only you can pass through, and does not need wizard garb. Lasts 30 seconds."
Expand Down Expand Up @@ -332,6 +355,9 @@

active = FALSE

/obj/effect/proc_holder/spell/fireball/apprentice
centcom_cancast = FALSE

/obj/effect/proc_holder/spell/fireball/create_new_targeting()
var/datum/spell_targeting/clicked_atom/C = new()
C.range = 20
Expand Down
4 changes: 2 additions & 2 deletions code/datums/uplink_items/uplink_general.dm
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
category = "Highly Visible and Dangerous Weapons"

/datum/uplink_item/dangerous/pistol
name = "FK-69 Pistol Kit"
name = "FK-69 Stechkin Pistol"
reference = "SPI"
desc = "A box containing a small, easily concealable handgun and two eight-round magazines chambered in 10mm auto rounds. Compatible with suppressors."
desc = "A small, easily concealable handgun that uses 10mm auto rounds in 8-round magazines and is compatible with suppressors."
item = /obj/item/gun/projectile/automatic/pistol
cost = 20

Expand Down
2 changes: 1 addition & 1 deletion code/game/area/areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@
if(!istype(M)) // Rather not have non-humans get hit with a THUNK
return

if(istype(M.shoes, /obj/item/clothing/shoes/magboots) && (M.shoes.flags & NOSLIP)) // Only humans can wear magboots, so we give them a chance to.
if(HAS_TRAIT(M, TRAIT_MAGPULSE)) // Only humans can wear magboots, so we give them a chance to.
return

if(M.dna.species.spec_thunk(M)) //Species level thunk overrides
Expand Down
2 changes: 1 addition & 1 deletion code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@
addtimer(CALLBACK(src, PROC_REF(hitby_react), AM), 2)

/// This proc applies special effects of a carbon mob hitting something, be it a wall, structure, or window. You can set mob_hurt to false to avoid double dipping through subtypes if returning ..()
/atom/proc/hit_by_thrown_carbon(mob/living/carbon/human/C, datum/thrownthing/throwingdatum, damage, mob_hurt = FALSE, self_hurt = FALSE)
/atom/proc/hit_by_thrown_mob(mob/living/C, datum/thrownthing/throwingdatum, damage, mob_hurt = FALSE, self_hurt = FALSE)
return

/atom/proc/hitby_react(atom/movable/AM)
Expand Down
Loading