mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-07-21 05:02:40 +01:00
between() -> clamp() & swaps args 1 and 2 in uses
This commit is contained in:
@@ -180,7 +180,7 @@
|
||||
if(attached_grenade && !attached_grenade.active)
|
||||
var/datum/integrated_io/detonation_time = inputs[1]
|
||||
if(isnum(detonation_time.data) && detonation_time.data > 0)
|
||||
attached_grenade.det_time = between(1, detonation_time.data, 12) SECONDS
|
||||
attached_grenade.det_time = clamp(detonation_time.data, 1, 12) SECONDS
|
||||
attached_grenade.activate()
|
||||
var/atom/holder = loc
|
||||
log_and_message_admins("activated a grenade assembly. Last touches: Assembly: [holder.fingerprintslast] Circuit: [fingerprintslast] Grenade: [attached_grenade.fingerprintslast]")
|
||||
@@ -203,4 +203,4 @@
|
||||
/obj/item/integrated_circuit/manipulation/grenade/frag
|
||||
pre_attached_grenade_type = /obj/item/grenade/explosive
|
||||
origin_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3, TECH_COMBAT = 10)
|
||||
spawn_flags = null // Used for world initializing, see the #defines above.
|
||||
spawn_flags = null // Used for world initializing, see the #defines above.
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
var/selected_sound = sounds[ID]
|
||||
if(!selected_sound)
|
||||
return
|
||||
vol = between(0, vol, 100)
|
||||
vol = clamp(vol, 0, 100)
|
||||
playsound(src, selected_sound, vol, freq, -1)
|
||||
|
||||
/obj/item/integrated_circuit/output/sound/beeper
|
||||
@@ -449,7 +449,7 @@
|
||||
if(!isnum(holo_scale) || !isnum(holo_rotation) )
|
||||
return FALSE // Invalid.
|
||||
|
||||
hologram.adjust_scale(between(-2, holo_scale, 2) )
|
||||
hologram.adjust_scale(clamp(holo_scale, -2, 2))
|
||||
hologram.adjust_rotation(holo_rotation)
|
||||
update_hologram_position()
|
||||
|
||||
@@ -462,8 +462,8 @@
|
||||
if(!isnum(holo_x) || !isnum(holo_y) )
|
||||
return FALSE
|
||||
|
||||
holo_x = between(-7, holo_x, 7)
|
||||
holo_y = between(-7, holo_y, 7)
|
||||
holo_x = clamp(holo_x, -7, 7)
|
||||
holo_y = clamp(holo_y, -7, 7)
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
|
||||
Reference in New Issue
Block a user