Merge pull request #2253 from Markolie/darkness

Make darkness clickable
This commit is contained in:
Fox McCloud
2015-10-01 17:11:31 -04:00
13 changed files with 68 additions and 18 deletions
+12
View File
@@ -1807,4 +1807,16 @@ var/mob/dview/dview_mob = new
if(A.simulated)
return 0
return 1
/proc/screen_loc2turf(scr_loc, turf/origin)
var/tX = text2list(scr_loc, ",")
var/tY = text2list(tX[2], ":")
var/tZ = origin.z
tY = tY[1]
tX = text2list(tX[1], ":")
tX = tX[1]
tX = max(1, min(world.maxx, origin.x + (text2num(tX) - (world.view + 1))))
tY = max(1, min(world.maxy, origin.y + (text2num(tY) - (world.view + 1))))
return locate(tX, tY, tZ)
+18 -1
View File
@@ -410,4 +410,21 @@
/* if(buckled && buckled.movable)
buckled.dir = direction
buckled.handle_rotation()*/
buckled.handle_rotation()*/
/obj/screen/click_catcher
icon = 'icons/mob/screen1_full.dmi'
icon_state = "passage0"
layer = 0
mouse_opacity = 2
screen_loc = "CENTER-7,CENTER-7"
/obj/screen/click_catcher/Click(location, control, params)
var/list/modifiers = params2list(params)
if(modifiers["middle"] && istype(usr, /mob/living/carbon))
var/mob/living/carbon/C = usr
C.swap_hand()
else
var/turf/T = screen_loc2turf(modifiers["screen-loc"], get_turf(usr))
T.Click(location, control, params)
return 1
+4 -2
View File
@@ -153,6 +153,7 @@
mymob.blind.name = " "
mymob.blind.screen_loc = "CENTER-7,CENTER-7"
mymob.blind.layer = 0
mymob.blind.mouse_opacity = 0
mymob.flash = new /obj/screen()
mymob.flash.icon = 'icons/mob/screen1_alien.dmi'
@@ -166,7 +167,8 @@
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")
mymob.client.screen = null
mymob.client.screen = list()
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, nightvisionicon, mymob.pullin, alien_plasma_display, mymob.pullin, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other
mymob.client.screen += src.adding + src.other
mymob.client.screen += mymob.client.void
+4 -2
View File
@@ -68,7 +68,8 @@
mymob.blind.name = " "
mymob.blind.screen_loc = "CENTER-7,CENTER-7"
mymob.blind.layer = 0
mymob.blind.mouse_opacity = 0
mymob.flash = new /obj/screen()
mymob.flash.icon = 'icons/mob/screen1_alien.dmi'
mymob.flash.icon_state = "blank"
@@ -81,7 +82,8 @@
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting))
mymob.client.screen = null
mymob.client.screen = list()
mymob.client.screen += list( mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, nightvisionicon, mymob.pullin, mymob.blind, mymob.flash) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other
mymob.client.screen += mymob.client.void
+2 -1
View File
@@ -483,10 +483,11 @@
mymob.gun_setting_icon.dir = 2
mymob.client.screen = null
mymob.client.screen = list()
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.healthdoll, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
mymob.client.screen += src.adding + src.hotkeybuttons
mymob.client.screen += mymob.client.void
inventory_shown = 0;
return
+3 -1
View File
@@ -247,6 +247,7 @@
mymob.blind.screen_loc = "CENTER-7,CENTER-7"
mymob.blind.mouse_opacity = 0
mymob.blind.layer = 0
mymob.blind.mouse_opacity = 0
mymob.damageoverlay = new /obj/screen()
mymob.damageoverlay.icon = 'icons/mob/screen1_full.dmi'
@@ -294,9 +295,10 @@
mymob.gun_setting_icon.dir = 2
mymob.client.screen = null
mymob.client.screen = list()
mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.pressure, mymob.toxin, mymob.bodytemp, mymob.internals, mymob.fire, mymob.healths, mymob.healthdoll, mymob.nutrition_icon, mymob.pullin, mymob.blind, mymob.flash, mymob.damageoverlay, mymob.gun_setting_icon) //, mymob.hands, mymob.rest, mymob.sleep) //, mymob.mach )
mymob.client.screen += src.adding + src.hotkeybuttons
mymob.client.screen += mymob.client.void
return
+4 -2
View File
@@ -47,6 +47,7 @@
mymob.blind.name = " "
mymob.blind.screen_loc = "CENTER-7,CENTER-7"
mymob.blind.layer = 0
mymob.blind.mouse_opacity = 0
/datum/hud/proc/blob_hud(ui_style = 'icons/mob/screen1_Midnight.dmi')
@@ -63,6 +64,7 @@
blobhealthdisplay.screen_loc = ui_internal
blobhealthdisplay.layer = 20
mymob.client.screen = null
mymob.client.screen = list()
mymob.client.screen += list(blobpwrdisplay, blobhealthdisplay)
mymob.client.screen += list(blobpwrdisplay, blobhealthdisplay)
mymob.client.screen += mymob.client.void
+3 -2
View File
@@ -137,6 +137,7 @@
mymob.blind.name = " "
mymob.blind.screen_loc = "CENTER-7,CENTER-7"
mymob.blind.layer = 0
mymob.blind.mouse_opacity = 0
mymob.flash = new /obj/screen()
mymob.flash.icon = 'icons/mob/screen1_robot.dmi'
@@ -170,11 +171,11 @@
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon*/
mymob.client.screen = null
mymob.client.screen = list()
mymob.client.screen += list(mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash, mymob.gun_setting_icon, mymob:lamp_button) //, mymob.rest, mymob.sleep, mymob.mach )
mymob.client.screen += src.adding + src.other
mymob.client.screen += mymob.client.void
return
+2 -1
View File
@@ -47,7 +47,8 @@
preload_rsc = 1 // This is 0 so we can set it to an URL once the player logs in and have them download the resources from a different server.
var/global/obj/screen/click_catcher/void
var/karma = 0
var/karma_spent = 0
var/karma_tab = 0
+5
View File
@@ -292,6 +292,11 @@
convert_notes_sql(ckey)
send_resources()
if(!void)
void = new()
screen += void
//////////////
//DISCONNECT//
@@ -80,7 +80,8 @@
/mob/living/simple_animal/Login()
if(src && src.client)
src.client.screen = null
src.client.screen = list()
client.screen += client.void
..()
/mob/living/simple_animal/updatehealth()
+7 -4
View File
@@ -29,7 +29,7 @@
world.update_status()
client.images = null //remove the images such as AIs being unable to see runes
client.screen = null //remove hud items just in case
client.screen = list() //remove hud items just in case
if(hud_used) del(hud_used) //remove the hud objects
hud_used = new /datum/hud(src)
@@ -46,9 +46,9 @@
if(ckey in deadmins)
verbs += /client/proc/readmin
//Clear ability list and update from mob.
verbs += /client/proc/readmin
//Clear ability list and update from mob.
client.verbs -= ability_verbs
if(abilities)
@@ -58,6 +58,9 @@
var/mob/living/carbon/human/H = src
if(H.species && H.species.abilities)
client.verbs |= H.species.abilities
client.screen += client.void
CallHook("Login", list("client" = src.client, "mob" = src))
+2 -1
View File
@@ -667,12 +667,13 @@ var/list/slot_equipment_priority = list( \
log_game("[key_name(usr)] has respawned.")
usr << "\blue <B>Make sure to play a different character, and please roleplay correctly!</B>"
usr << "<span class='boldnotice'>Make sure to play a different character, and please roleplay correctly!</span>"
if(!client)
log_game("[key_name(usr)] respawn failed due to disconnect.")
return
client.screen.Cut()
client.screen += client.void
if(!client)
log_game("[key_name(usr)] respawn failed due to disconnect.")