[READY]integrated circuitry port+upgrade.

This commit is contained in:
arsserpentarium
2017-11-14 12:05:22 +03:00
committed by CitadelStationBot
parent 4afc4f5b39
commit d8847ea167
61 changed files with 6933 additions and 9 deletions
+20
View File
@@ -578,3 +578,23 @@
return "turf"
else //regex everything else (works for /proc too)
return lowertext(replacetext("[the_type]", "[type2parent(the_type)]/", ""))
/proc/strtohex(str)
if(!istext(str)||!str)
return
var/r
var/c
for(var/i = 1 to length(str))
c= text2ascii(str,i)
r+= num2hex(c)
return r
/proc/hextostr(str)
if(!istext(str)||!str)
return
var/r
var/c
for(var/i = 1 to length(str)/2)
c= hex2num(copytext(str,i*2-1,i*2+1))
r+= ascii2text(c)
return r
+41
View File
@@ -506,6 +506,7 @@ Turf and target are separate in case you want to teleport some distance from a t
/*
Gets all contents of contents and returns them all in a list.
*/
/atom/proc/GetAllContents()
var/list/processing_list = list(src)
var/list/assembled = list()
@@ -1425,6 +1426,46 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
/proc/turf_z_is_planet(turf/T)
return GLOB.z_is_planet["[T.z]"]
//same as do_mob except for movables and it allows both to drift and doesn't draw progressbar
/proc/do_atom(atom/movable/user , atom/movable/target, time = 30, uninterruptible = 0,datum/callback/extra_checks = null)
if(!user || !target)
return TRUE
var/user_loc = user.loc
var/drifting = FALSE
if(!user.Process_Spacemove(0) && user.inertia_dir)
drifting = TRUE
var/target_drifting = FALSE
if(!target.Process_Spacemove(0) && target.inertia_dir)
target_drifting = TRUE
var/target_loc = target.loc
var/endtime = world.time+time
// var/starttime = world.time
. = TRUE
while (world.time < endtime)
stoplag(1)
if(QDELETED(user) || QDELETED(target))
. = 0
break
if(uninterruptible)
continue
if(drifting && !user.inertia_dir)
drifting = FALSE
user_loc = user.loc
if(target_drifting && !target.inertia_dir)
target_drifting = FALSE
target_loc = target.loc
if((!drifting && user.loc != user_loc) || (!target_drifting && target.loc != target_loc) || (extra_checks && !extra_checks.Invoke()))
. = FALSE
break
//returns a GUID like identifier (using a mostly made up record format)
//guids are not on their own suitable for access or security tokens, as most of their bits are predictable.
// (But may make a nice salt to one)