mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
_HELPERS/unsorted.dm has been sorted (#61882)
bring code up to latest standards, move many procs to named files inside _HELPERS no idea where to put some of these procs, help is appreciated made more files to contain some unique code, deleted unsorted.dm, we can rest now
This commit is contained in:
@@ -447,11 +447,11 @@
|
||||
|
||||
for(var/law in hacked)
|
||||
if (length(law) > 0)
|
||||
data += "[show_numbers ? "[ionnum()]:" : ""] [render_html ? "<font color='#660000'>[law]</font>" : law]"
|
||||
data += "[show_numbers ? "[ion_num()]:" : ""] [render_html ? "<font color='#660000'>[law]</font>" : law]"
|
||||
|
||||
for(var/law in ion)
|
||||
if (length(law) > 0)
|
||||
data += "[show_numbers ? "[ionnum()]:" : ""] [render_html ? "<font color='#547DFE'>[law]</font>" : law]"
|
||||
data += "[show_numbers ? "[ion_num()]:" : ""] [render_html ? "<font color='#547DFE'>[law]</font>" : law]"
|
||||
|
||||
var/number = 1
|
||||
for(var/law in inherent)
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@
|
||||
* Creates the beam effects and places them in a line from the origin to the target. Sets their rotation to make the beams face the target, too.
|
||||
*/
|
||||
/datum/beam/proc/Draw()
|
||||
var/Angle = round(Get_Angle(origin,target))
|
||||
var/Angle = round(get_angle(origin,target))
|
||||
var/matrix/rot_matrix = matrix()
|
||||
var/turf/origin_turf = get_turf(origin)
|
||||
rot_matrix.Turn(Angle)
|
||||
|
||||
@@ -111,8 +111,8 @@
|
||||
var/mob/M = W.resolve()
|
||||
if(M)
|
||||
if (length(args))
|
||||
return world.PushUsr(arglist(list(M, src) + args))
|
||||
return world.PushUsr(M, src)
|
||||
return world.push_usr(arglist(list(M, src) + args))
|
||||
return world.push_usr(M, src)
|
||||
|
||||
if (!object)
|
||||
return
|
||||
@@ -146,8 +146,8 @@
|
||||
var/mob/M = W.resolve()
|
||||
if(M)
|
||||
if (length(args))
|
||||
return world.PushUsr(arglist(list(M, src) + args))
|
||||
return world.PushUsr(M, src)
|
||||
return world.push_usr(arglist(list(M, src) + args))
|
||||
return world.push_usr(M, src)
|
||||
|
||||
if (!object)
|
||||
return
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
if(isnull(location)) //Clicking on a screen object.
|
||||
if(_target.plane != CLICKCATCHER_PLANE) //The clickcatcher is a special case. We want the click to trigger then, under it.
|
||||
return //If we click and drag on our worn backpack, for example, we want it to open instead.
|
||||
_target = params2turf(modifiers["screen-loc"], get_turf(source.eye), source)
|
||||
_target = params_to_turf(modifiers["screen-loc"], get_turf(source.eye), source)
|
||||
if(!_target)
|
||||
CRASH("Failed to get the turf under clickcatcher")
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
SIGNAL_HANDLER
|
||||
if(isnull(over_location)) //This happens when the mouse is over an inventory or screen object, or on entering deep darkness, for example.
|
||||
var/list/modifiers = params2list(params)
|
||||
var/new_target = params2turf(modifiers["screen-loc"], get_turf(source.eye), source)
|
||||
var/new_target = params_to_turf(modifiers["screen-loc"], get_turf(source.eye), source)
|
||||
mouse_parameters = params
|
||||
if(!new_target)
|
||||
if(QDELETED(target)) //No new target acquired, and old one was deleted, get us out of here.
|
||||
|
||||
@@ -136,7 +136,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
signal["coords"] = "[pos.x], [pos.y], [pos.z]"
|
||||
if(pos.z == curr.z) //Distance/Direction calculations for same z-level only
|
||||
signal["dist"] = max(get_dist(curr, pos), 0) //Distance between the src and remote GPS turfs
|
||||
signal["degrees"] = round(Get_Angle(curr, pos)) //0-360 degree directional bearing, for more precision.
|
||||
signal["degrees"] = round(get_angle(curr, pos)) //0-360 degree directional bearing, for more precision.
|
||||
signals += list(signal) //Add this signal to the list of signals
|
||||
data["signals"] = signals
|
||||
return data
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
var/atom/A = parent
|
||||
if(A == W) //don't put yourself into yourself.
|
||||
return
|
||||
var/list/obj/item/storage/backpack/holding/matching = typecache_filter_list(W.GetAllContents(), typecacheof(/obj/item/storage/backpack/holding))
|
||||
var/list/obj/item/storage/backpack/holding/matching = typecache_filter_list(W.get_all_contents(), typecacheof(/obj/item/storage/backpack/holding))
|
||||
matching -= A
|
||||
if(istype(W, /obj/item/storage/backpack/holding) || matching.len)
|
||||
INVOKE_ASYNC(src, .proc/recursive_insertion, W, user)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
var/atom/blocker
|
||||
out:
|
||||
for(var/turf/T in getline(tether_target,newloc))
|
||||
for(var/turf/T in get_line(tether_target,newloc))
|
||||
if (T.density)
|
||||
blocker = T
|
||||
break out
|
||||
|
||||
@@ -59,7 +59,7 @@ Bonus
|
||||
M.emote("sneeze")
|
||||
if(M.CanSpreadAirborneDisease()) //don't spread germs if they covered their mouth
|
||||
for(var/mob/living/L in oview(spread_range, M))
|
||||
if(is_A_facing_B(M, L) && disease_air_spread_walk(get_turf(M), get_turf(L)))
|
||||
if(is_source_facing_target(M, L) && disease_air_spread_walk(get_turf(M), get_turf(L)))
|
||||
L.AirborneContractDisease(A, TRUE)
|
||||
if(cartoon_sneezing) //Yeah, this can fling you around even if you have a space suit helmet on. It's, uh, bluespace snot, yeah.
|
||||
var/sneeze_distance = rand(2,4) //twice as far as a normal baseball bat strike will fling you
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
if(!weapon.chambered || HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
return
|
||||
|
||||
var/backwards_angle = Get_Angle(target, user)
|
||||
var/backwards_angle = get_angle(target, user)
|
||||
var/starting_angle = SIMPLIFY_DEGREES(backwards_angle-(angle_spread * 0.5))
|
||||
var/iter_offset = angle_spread / plumes // how much we increment the angle for each plume
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
if(!weapon.chambered || HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
return
|
||||
|
||||
var/backwards_angle = Get_Angle(target, user)
|
||||
var/backwards_angle = get_angle(target, user)
|
||||
var/turf/target_turf = get_turf_in_angle(backwards_angle, get_turf(user), 10)
|
||||
INVOKE_ASYNC(src, .proc/pew, target_turf, weapon, user)
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ clamping the Knockback_Force value below. */
|
||||
var/knockback_force = Get_Knockback_Force(clamp(CEILING((I.force / 10), 1), 1, 5))
|
||||
var/knockback_speed = Get_Knockback_Speed(clamp(knockback_force, 1, 5))
|
||||
|
||||
var/target_angle = Get_Angle(attacktarget, usertarget)
|
||||
var/target_angle = get_angle(attacktarget, usertarget)
|
||||
var/move_target = get_ranged_target_turf(usertarget, angle2dir(target_angle), knockback_force)
|
||||
usertarget.throw_at(move_target, knockback_force, knockback_speed)
|
||||
usertarget.visible_message(span_warning("[usertarget] gets thrown back by the force of \the [I] impacting \the [attacktarget]!"), span_warning("The force of \the [I] impacting \the [attacktarget] sends you flying!"))
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
precision = rand(1,100)
|
||||
|
||||
var/static/list/bag_cache = typecacheof(/obj/item/storage/backpack/holding)
|
||||
var/list/bagholding = typecache_filter_list(teleatom.GetAllContents(), bag_cache)
|
||||
var/list/bagholding = typecache_filter_list(teleatom.get_all_contents(), bag_cache)
|
||||
if(bagholding.len)
|
||||
precision = max(rand(1,100)*bagholding.len,100)
|
||||
if(isliving(teleatom))
|
||||
|
||||
+2
-2
@@ -381,7 +381,7 @@
|
||||
if (!istype(traitor_mob))
|
||||
return
|
||||
|
||||
var/list/all_contents = traitor_mob.GetAllContents()
|
||||
var/list/all_contents = traitor_mob.get_all_contents()
|
||||
var/obj/item/pda/PDA = locate() in all_contents
|
||||
var/obj/item/radio/R = locate() in all_contents
|
||||
var/obj/item/pen/P
|
||||
@@ -657,7 +657,7 @@
|
||||
obj_count++
|
||||
|
||||
/datum/mind/proc/find_syndicate_uplink(check_unlocked)
|
||||
var/list/L = current.GetAllContents()
|
||||
var/list/L = current.get_all_contents()
|
||||
for (var/i in L)
|
||||
var/atom/movable/I = i
|
||||
var/datum/component/uplink/found_uplink = I.GetComponent(/datum/component/uplink)
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
|
||||
var/obj/family_heirloom = heirloom?.resolve()
|
||||
|
||||
if(family_heirloom && (family_heirloom in quirk_holder.GetAllContents()))
|
||||
if(family_heirloom && (family_heirloom in quirk_holder.get_all_contents()))
|
||||
SEND_SIGNAL(quirk_holder, COMSIG_CLEAR_MOOD_EVENT, "family_heirloom_missing")
|
||||
SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "family_heirloom", /datum/mood_event/family_heirloom)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user