mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
Changes all .len to length() where applicable (#25174)
* Globals work
* Double access works
* All other things
* Revert "All other things"
This reverts commit 6574442eb6.
* More changes that compile and work
* IT WORKS AAAAAA
* Changes even more .len to length()
* Apply suggestions from code review
* Update code/datums/mind.dm
* Update code/__HELPERS/sorts/InsertSort.dm
Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>
* Update code/__HELPERS/sanitize_values.dm
Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>
---------
Co-authored-by: FunnyMan3595 (Charlie Nolan) <funnyman@google.com>
Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>
This commit is contained in:
co-authored by
Deniz
FunnyMan3595
parent
bdd417ada0
commit
bad8b31afa
@@ -523,7 +523,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
if(SLOT_HUD_IN_BACKPACK)
|
||||
if(H.back && istype(H.back, /obj/item/storage/backpack))
|
||||
var/obj/item/storage/backpack/B = H.back
|
||||
if(B.contents.len < B.storage_slots && w_class <= B.max_w_class)
|
||||
if(length(B.contents) < B.storage_slots && w_class <= B.max_w_class)
|
||||
return 1
|
||||
return 0
|
||||
return 0 //Unsupported slot
|
||||
@@ -1221,8 +1221,8 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
//That makes the logs easier to read, but because all of this is stored in strings, weird things have to be used to get it all out.
|
||||
var/new_log = "\[[time_stamp()]] [text]"
|
||||
|
||||
if(target.len)//if there are other logs already present
|
||||
var/previous_log = target[target.len]//get the latest log
|
||||
if(length(target))//if there are other logs already present
|
||||
var/previous_log = target[length(target)]//get the latest log
|
||||
var/last_log_is_range = (copytext(previous_log, 10, 11) == "-") //whether the last log is a time range or not. The "-" will be an indicator that it is.
|
||||
var/x_sign_position = findtext(previous_log, "x")
|
||||
|
||||
@@ -1247,7 +1247,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
rep = text2num(copytext(previous_log, 44, x_sign_position))//get whatever number is right before the 'x'
|
||||
|
||||
new_log = "\[[old_timestamp]-[time_stamp()]]<font color='purple'><b>[rep?rep+1:2]x</b></font> [text]"
|
||||
target -= target[target.len]//remove the last log
|
||||
target -= target[length(target)]//remove the last log
|
||||
|
||||
target += new_log
|
||||
|
||||
|
||||
Reference in New Issue
Block a user