Fix blood decals and add an adminge power cheat.

This commit is contained in:
Rob Nelson
2013-09-14 05:14:32 -07:00
parent 6cd5b95f1a
commit b9b29508b8
5 changed files with 57 additions and 20 deletions

View File

@@ -165,6 +165,16 @@ proc/tg_list2text(list/list, glue=",")
//Turns a direction into text
/proc/num2dir(direction)
switch(direction)
if(1.0) return NORTH
if(2.0) return SOUTH
if(4.0) return EAST
if(8.0) return WEST
else
world.log << "UNKNOWN DIRECTION: [direction]"
/proc/dir2text(direction)
switch(direction)
if(1.0)

View File

@@ -95,14 +95,14 @@
// dir = last wetting
var/list/wet=list(
TRACKS_COMING_NORTH=0,
TRACKS_COMING_SOUTH=0,
TRACKS_COMING_EAST=0,
TRACKS_COMING_WEST=0,
TRACKS_GOING_NORTH=0,
TRACKS_GOING_SOUTH=0,
TRACKS_GOING_EAST=0,
TRACKS_GOING_WEST=0
"1"=0,
"2"=0,
"4"=0,
"8"=0,
"16"=0,
"32"=0,
"64"=0,
"128"=0
)
/**
@@ -127,24 +127,24 @@
for(var/bi=0;bi<4;bi++)
b=1<<bi
// COMING BIT
if(comingdir&b && wet[b]!=t)
if(comingdir&b && wet["[b]"]!=t)
if(!(dirs&b))
newtracks|=b
wet[b]=t
wet["[b]"]=t
updated=1
else:
if(wet[b]<world.time && !(crustytracks&b))
else
if(wet["[b]"]<world.time && !(crustytracks&b))
updated=1
// GOING BIT (shift up 4)
b=b<<4
if(realgoing&b && wet[b]!=t)
if(realgoing&b && wet["[b]"]!=t)
if(!(dirs&b))
newtracks|=b
wet[b]=t
wet["[b]"]=t
updated=1
else:
if(wet[b]<world.time && !(crustytracks&b))
else
if(wet["[b]"]<world.time && !(crustytracks&b))
updated=1
dirs |= comingdir|realgoing
@@ -167,9 +167,9 @@
b=overlay.dir
if(overlay.icon_state==going_state)
b=b<<4
if(wet[b]<t && !(crustytracks&b)) // NEW crusty ones get special treatment
if(wet["[b]"]<t && !(crustytracks&b)) // NEW crusty ones get special treatment
crusty|=b
if(wet[b]>t || crusty&b) // Wet or crusty? Nuke'em either way.
if(wet["[b]"]>t || crusty&b) // Wet or crusty? Nuke'em either way.
overlays.Remove(overlay)
newtracks |= b // Mark as needing an update.
@@ -179,7 +179,7 @@
b=1<<bi
// New or crusty
if(newtracks&b)
var/icon/I= new /icon(icon, icon_state=coming_state, dir=b)
var/icon/I= new /icon(icon, icon_state=coming_state, dir=num2dir(b))
// If crusty, make them look crusty.
if(crusty&b)
I.SetIntensity(0.7)
@@ -188,9 +188,10 @@
crustytracks &= ~b // Unmark as crusty.
// Add to overlays
overlays += I
// GOING
b=b<<4
if(newtracks&b)
var/icon/I= new /icon(icon, icon_state=going_state, dir=b>>4)
var/icon/I= new /icon(icon, icon_state=going_state, dir=num2dir(b>>4))
if(crusty&b)
I.SetIntensity(0.7)
crustytracks |= b // Crusty? Don't update unless wetted again.

View File

@@ -214,6 +214,7 @@ var/list/admin_verbs_hideable = list(
/client/proc/kill_airgroup,
/client/proc/debug_controller,
/client/proc/startSinglo,
/client/proc/cheat_power,
/client/proc/cmd_debug_mob_lists,
/client/proc/cmd_debug_del_all,
/client/proc/cmd_debug_tog_aliens,
@@ -281,6 +282,7 @@ var/list/admin_verbs_mod = list(
/client/proc/cmd_assume_direct_control,
/client/proc/jump_to_dead_group,
/client/proc/startSinglo,
/client/proc/cheat_power,
/client/proc/ticklag,
/client/proc/cmd_admin_grantfullaccess,
/client/proc/kaboom,

View File

@@ -945,6 +945,9 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes")
return
log_admin("[key_name(usr)] set up the singulo.")
message_admins("\blue [key_name_admin(usr)] set up the singulo.", 1)
for(var/obj/machinery/power/emitter/E in world)
if(E.anchored)
E.active = 1
@@ -987,6 +990,26 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(SMES.anchored)
SMES.chargemode = 1
/client/proc/cheat_power()
set category = "Debug"
set name = "Free Power"
set desc = "Replaces all SMES on the map with magical ones."
if(alert("Are you sure? This will completely fuck over your round!",,"Yes","No") != "Yes")
return
log_admin("[key_name(usr)] haxed the powergrid with magic SMES.")
message_admins("\blue [key_name_admin(usr)] haxed the powergrid with magic SMES.", 1)
for(var/obj/machinery/power/smes/SMES in world)
var/obj/machinery/power/smes/magical/magic = new(SMES.loc)
del(SMES)
magic.output=200000 // AKA rape
magic.online=1
world << "<span style=\"color:red;font-size=5;font-weight:bold\">LET THERE BE JUICE</font>"
/client/proc/cmd_debug_mob_lists()
set category = "Debug"
set name = "Debug Mob Lists"

View File

@@ -144,6 +144,7 @@ var/intercom_range_display_status = 0
src.verbs += /client/proc/cmd_assume_direct_control //-errorage
src.verbs += /client/proc/jump_to_dead_group
src.verbs += /client/proc/startSinglo
src.verbs += /client/proc/cheat_power // Because the above doesn't work off-station. Or at all, occasionally - N3X
src.verbs += /client/proc/ticklag //allows you to set the ticklag.
src.verbs += /client/proc/cmd_admin_grantfullaccess
src.verbs += /client/proc/kaboom