Merge pull request #9772 from SamHPurp/mouse-opacity-define

Creates mouse_opacity defines
This commit is contained in:
variableundefined
2018-10-09 08:25:55 +08:00
committed by GitHub
47 changed files with 71 additions and 66 deletions
+1 -1
View File
@@ -42,7 +42,7 @@
//This is the icon for fire on turfs, also helps for nurturing small fires until they are full tile
/obj/effect/hotspot
anchored = 1
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
unacidable = 1//So you can't melt fire with acid.
icon = 'icons/effects/fire.dmi'
icon_state = "1"
+3 -3
View File
@@ -250,7 +250,7 @@
var/atmos_overlay = get_atmos_overlay_by_name(atmos_overlay_type)
if(atmos_overlay)
overlays -= atmos_overlay
mouse_opacity = 1
mouse_opacity = MOUSE_OPACITY_ICON
atmos_overlay = get_atmos_overlay_by_name(new_overlay_type)
if(atmos_overlay)
@@ -267,12 +267,12 @@
/turf/simulated/proc/tile_graphic()
if(air.toxins > MOLES_PLASMA_VISIBLE)
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
return "plasma"
var/datum/gas/sleeping_agent = locate(/datum/gas/sleeping_agent) in air.trace_gases
if(sleeping_agent && (sleeping_agent.moles > 1))
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
return "sleeping_agent"
return null
+5
View File
@@ -378,3 +378,8 @@
// Area selection defines
#define AREASELECT_CORNERA "corner A"
#define AREASELECT_CORNERB "corner B"
//https://secure.byond.com/docs/ref/info.html#/atom/var/mouse_opacity
#define MOUSE_OPACITY_TRANSPARENT 0
#define MOUSE_OPACITY_ICON 1
#define MOUSE_OPACITY_OPAQUE 2
+1 -1
View File
@@ -392,7 +392,7 @@
icon = 'icons/mob/screen_full.dmi'
icon_state = "passage0"
plane = CLICKCATCHER_PLANE
mouse_opacity = 2
mouse_opacity = MOUSE_OPACITY_OPAQUE
screen_loc = "CENTER-7,CENTER-7"
/obj/screen/click_catcher/Click(location, control, params)
+1 -1
View File
@@ -89,7 +89,7 @@
icon_state = "default"
name = "Alert"
desc = "Something seems to have gone wrong with this alert, so report this bug please"
mouse_opacity = 1
mouse_opacity = MOUSE_OPACITY_ICON
var/timeout = 0 //If set to a number, this alert will clear itself after that many deciseconds
var/severity = 0
var/alerttooltipstyle = ""
+1 -1
View File
@@ -54,7 +54,7 @@
icon_state = "default"
screen_loc = "CENTER-7,CENTER-7"
layer = FULLSCREEN_LAYER
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
var/severity = 0
/obj/screen/fullscreen/Destroy()
+2 -2
View File
@@ -26,7 +26,7 @@
/obj/screen/text
icon = null
icon_state = null
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
screen_loc = "CENTER-7,CENTER-7"
maptext_height = 480
maptext_width = 480
@@ -379,7 +379,7 @@
icon = 'icons/mob/guardian.dmi'
icon_state = "base"
screen_loc = ui_health
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/healthdoll
name = "health doll"
+3 -3
View File
@@ -363,19 +363,19 @@ SUBSYSTEM_DEF(air)
plmaster.icon = 'icons/effects/tile_effects.dmi'
plmaster.icon_state = "plasma"
plmaster.layer = FLY_LAYER
plmaster.mouse_opacity = 0
plmaster.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
slmaster = new /obj/effect/overlay()
slmaster.icon = 'icons/effects/tile_effects.dmi'
slmaster.icon_state = "sleeping_agent"
slmaster.layer = FLY_LAYER
slmaster.mouse_opacity = 0
slmaster.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
icemaster = new /obj/effect/overlay()
icemaster.icon = 'icons/turf/overlays.dmi'
icemaster.icon_state = "snowfloor"
icemaster.layer = TURF_LAYER + 0.1
icemaster.mouse_opacity = 0
icemaster.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
#undef SSAIR_PIPENETS
#undef SSAIR_ATMOSMACHINERY
+1 -1
View File
@@ -111,7 +111,7 @@
X.pixel_y = Pixel_y
/obj/effect/ebeam
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
anchored = 1
var/datum/beam/owner
+1 -1
View File
@@ -27,7 +27,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
icon_state = "unknown"
layer = AREA_LAYER
luminosity = 0
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
invisibility = INVISIBILITY_LIGHTING
var/valid_territory = TRUE //used for cult summoning areas on station zlevel
var/map_name // Set in New(); preserves the name set by the map maker, even if renamed by the Blueprints.
+5 -5
View File
@@ -132,14 +132,14 @@
if(!fire)
fire = 1 //used for firedoor checks
updateicon()
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
air_doors_close()
/area/proc/fire_reset()
if(fire)
fire = 0 //used for firedoor checks
updateicon()
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
air_doors_open()
return
@@ -165,7 +165,7 @@
/area/proc/set_fire_alarm_effect()
fire = 1
updateicon()
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/area/proc/readyalert()
if(!eject)
@@ -181,12 +181,12 @@
if(!party)
party = 1
updateicon()
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/area/proc/partyreset()
if(party)
party = 0
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
updateicon()
/area/proc/updateicon()
+2 -2
View File
@@ -487,7 +487,7 @@ var/list/teleport_runes = list()
icon_state = "rune_large"
pixel_x = -32 //So the big ol' 96x96 sprite shows up right
pixel_y = -32
mouse_opacity = 1 //we're huge and easy to click
mouse_opacity = MOUSE_OPACITY_ICON //we're huge and easy to click
scribe_delay = 450 //how long the rune takes to create
scribe_damage = 40.1 //how much damage you take doing it
var/used
@@ -1031,7 +1031,7 @@ var/list/teleport_runes = list()
N.desc = "A weak shield summoned by cultists to protect them while they carry out delicate rituals"
N.color = "red"
N.health = 20
N.mouse_opacity = 0
N.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
new_human.key = ghost_to_spawn.key
ticker.mode.add_cultist(new_human.mind, 0)
summoned_guys |= new_human
+1 -1
View File
@@ -256,7 +256,7 @@ var/round_start_time = 0
cinematic.icon = 'icons/effects/station_explosion.dmi'
cinematic.icon_state = "station_intact"
cinematic.layer = 21
cinematic.mouse_opacity = 0
cinematic.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
cinematic.screen_loc = "1,0"
var/obj/structure/stool/bed/temp_buckle = new(src)
@@ -424,7 +424,7 @@
anchored = 1
unacidable = 1
light_range = 1
mouse_opacity = 1
mouse_opacity = MOUSE_OPACITY_ICON
var/health = 30
light_color = LIGHT_COLOR_CYAN
var/lon_range = 1
+2 -2
View File
@@ -348,7 +348,7 @@ var/list/holopads = list()
hologram.alpha = 100
hologram.Impersonation = user
hologram.mouse_opacity = 0//So you can't click on it.
hologram.mouse_opacity = MOUSE_OPACITY_TRANSPARENT//So you can't click on it.
hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
hologram.anchored = 1//So space wind cannot drag it.
hologram.name = "[user.name] (hologram)"//If someone decides to right click.
@@ -481,7 +481,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
layer = FLY_LAYER
density = FALSE
anchored = TRUE
mouse_opacity = 1
mouse_opacity = MOUSE_OPACITY_ICON
pixel_x = -32
pixel_y = -32
alpha = 100
@@ -29,11 +29,11 @@
layer = TURF_LAYER
icon = 'icons/effects/effects.dmi'
icon_state = "dirt"
mouse_opacity = FALSE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/effect/decal/cleanable/dirt/blackpowder
name = "black powder"
mouse_opacity = TRUE
mouse_opacity = MOUSE_OPACITY_ICON
noscoop = TRUE
/obj/effect/decal/cleanable/dirt/blackpowder/Initialize()
@@ -7,7 +7,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
/obj/effect/particle_effect
name = "particle effect"
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
unacidable = 1//So effects are not targeted by alien acid.
pass_flags = PASSTABLE | PASSGRILLE
@@ -27,7 +27,7 @@
icon_state = "explosion"
opacity = 1
anchored = 1
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
pixel_x = -32
pixel_y = -32
+1 -1
View File
@@ -32,7 +32,7 @@
anchored = 1
layer = 99
plane = HUD_PLANE
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
unacidable = 1//Just to be sure.
/obj/effect/beam
+1 -1
View File
@@ -58,7 +58,7 @@
anchored = 1
density = 1
layer = 5
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/effect/overlay/wall_rot/New()
..()
@@ -134,7 +134,7 @@
name = mimiced_atom.name
appearance = mimiced_atom.appearance
setDir(mimiced_atom.dir)
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/effect/temp_visual/decoy/fading/New(loc, atom/mimiced_atom)
..()
@@ -2,7 +2,7 @@
/obj/effect/temp_visual
anchored = 1
layer = ABOVE_MOB_LAYER
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
var/duration = 10
var/randomdir = TRUE
@@ -166,7 +166,7 @@
if(display_contents_with_number)
for(var/datum/numbered_display/ND in display_contents)
ND.sample_object.mouse_opacity = 2
ND.sample_object.mouse_opacity = MOUSE_OPACITY_OPAQUE
ND.sample_object.screen_loc = "[cx]:16,[cy]:16"
ND.sample_object.maptext = "<font color='white'>[(ND.number > 1)? "[ND.number]" : ""]</font>"
ND.sample_object.layer = 20
@@ -177,7 +177,7 @@
cy--
else
for(var/obj/O in contents)
O.mouse_opacity = 2 //This is here so storage items that spawn with contents correctly have the "click around item to equip"
O.mouse_opacity = MOUSE_OPACITY_OPAQUE //This is here so storage items that spawn with contents correctly have the "click around item to equip"
O.screen_loc = "[cx]:16,[cy]:16"
O.maptext = ""
O.layer = 20
@@ -309,7 +309,7 @@
src.orient2hud(usr)
if(usr.s_active)
usr.s_active.show_to(usr)
W.mouse_opacity = 2 //So you can click on the area around the item to equip it, instead of having to pixel hunt
W.mouse_opacity = MOUSE_OPACITY_OPAQUE //So you can click on the area around the item to equip it, instead of having to pixel hunt
update_icon()
return 1
@@ -315,7 +315,7 @@
desc = "A frozen shell of ice containing nanofrost that freezes the surrounding area after activation."
icon = 'icons/effects/effects.dmi'
icon_state = "frozen_smoke_capsule"
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
pass_flags = PASSTABLE
/obj/effect/nanofrost_container/proc/Smoke()
+1 -1
View File
@@ -278,7 +278,7 @@
icon_state = "mist"
layer = MOB_LAYER + 1
anchored = 1
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/machinery/shower/attack_hand(mob/M as mob)
on = !on
@@ -51,7 +51,7 @@
/turf/simulated/floor/beach/water
name = "water"
icon_state = "water"
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/turf/simulated/floor/beach/water/pry_tile(obj/item/C, mob/user, silent = FALSE)
return //cannot pry off tiles of water
+3 -3
View File
@@ -2,7 +2,7 @@
name = "Beach"
icon = 'icons/misc/beach.dmi'
var/water_overlay_image = null
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/turf/unsimulated/beach/New()
..()
@@ -12,7 +12,7 @@
/turf/unsimulated/beach/sand
name = "Sand"
icon_state = "desert"
mouse_opacity = 1
mouse_opacity = MOUSE_OPACITY_ICON
/turf/unsimulated/beach/sand/New() //adds some aesthetic randomness to the beach sand
icon_state = pick("desert", "desert0", "desert1", "desert2", "desert3", "desert4")
@@ -101,4 +101,4 @@
density = 1
opacity = 1
explosion_block = 2
mouse_opacity = 1
mouse_opacity = MOUSE_OPACITY_ICON
@@ -3,7 +3,7 @@
icon = 'icons/effects/effects.dmi'
icon_state = "extinguish"
opacity = 0
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
density = 0
anchored = 1
invisibility = 101
@@ -183,7 +183,7 @@
anchored = 1
invisibility = 101
opacity = 0
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
var/mob/holder = null
/obj/effect/chronos_cam/relaymove(var/mob/user, direction)
+1 -1
View File
@@ -59,7 +59,7 @@
blueeffect.icon = 'icons/effects/effects.dmi'
blueeffect.icon_state = "shieldsparkles"
blueeffect.layer = 17
blueeffect.mouse_opacity = 0
blueeffect.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
M.client.screen += blueeffect
sleep(20)
M.client.screen -= blueeffect
+1 -1
View File
@@ -411,7 +411,7 @@
anchored = TRUE
density = FALSE
layer = SPACEVINE_LAYER
mouse_opacity = 2 //Clicking anywhere on the turf is good enough
mouse_opacity = MOUSE_OPACITY_OPAQUE //Clicking anywhere on the turf is good enough
pass_flags = PASSTABLE | PASSGRILLE
max_integrity = 50
var/energy = 0
+1 -1
View File
@@ -1,7 +1,7 @@
/var/total_lighting_overlays = 0
/atom/movable/lighting_overlay
name = ""
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
simulated = 0
anchored = 1
icon = LIGHTING_ICON
+2 -2
View File
@@ -722,7 +722,7 @@
icon = 'icons/effects/effects.dmi'
icon_state = "shield1"
layer = 4.1
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
var/resonance_damage = 20
/obj/effect/resonance/New(loc, var/creator = null, var/timetoburst)
@@ -975,7 +975,7 @@
layer = 18
icon = 'icons/turf/mining.dmi'
anchored = 1
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
duration = 30
pixel_x = -4
pixel_y = -4
+1 -1
View File
@@ -9,7 +9,7 @@
icon_state = "mining_drone"
icon_living = "mining_drone"
status_flags = CANSTUN|CANWEAKEN|CANPUSH
mouse_opacity = 1
mouse_opacity = MOUSE_OPACITY_ICON
faction = list("neutral")
a_intent = INTENT_HARM
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
+1 -1
View File
@@ -5,7 +5,7 @@
density = 0
anchored = 1
status_flags = GODMODE // You can't damage it.
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
see_in_dark = 7
invisibility = 101 // No one can see us
sight = SEE_SELF
@@ -13,7 +13,7 @@
if(!O)
return 0
O.mouse_opacity = 2
O.mouse_opacity = MOUSE_OPACITY_OPAQUE
if(client)
client.screen -= O
@@ -40,10 +40,10 @@
/obj/item/robot_module/proc/fix_modules()
for(var/obj/item/I in modules)
I.flags |= NODROP
I.mouse_opacity = 2
I.mouse_opacity = MOUSE_OPACITY_OPAQUE
if(emag)
emag.flags |= NODROP
emag.mouse_opacity = 2
emag.mouse_opacity = MOUSE_OPACITY_OPAQUE
/obj/item/robot_module/proc/respawn_consumable(mob/living/silicon/robot/R)
if(!stacktypes || !stacktypes.len)
@@ -31,7 +31,7 @@
move_to_delay = 0
obj_damage = 0
environment_smash = 0
mouse_opacity = 2
mouse_opacity = MOUSE_OPACITY_OPAQUE
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
flying = 1
search_objects = 1 //have to find those plant trays!
@@ -48,7 +48,7 @@ Difficulty: Medium
elimination = 1
idle_vision_range = 13
appearance_flags = 0
mouse_opacity = 1
mouse_opacity = MOUSE_OPACITY_ICON
stat_attack = 1 // Overriden from /tg/ - otherwise Legion starts chasing its minions
/mob/living/simple_animal/hostile/megafauna/legion/New()
@@ -41,7 +41,7 @@
anchored = TRUE
mob_size = MOB_SIZE_LARGE
layer = MOB_LAYER + 0.5 //Looks weird with them slipping under mineral walls and cameras and shit otherwise
mouse_opacity = 2 // Easier to click on in melee, they're giant targets anyway
mouse_opacity = MOUSE_OPACITY_OPAQUE // Easier to click on in melee, they're giant targets anyway
/mob/living/simple_animal/hostile/megafauna/Destroy()
QDEL_NULL(internal_gps)
@@ -7,7 +7,7 @@
icon_aggro = "Hivelord_alert"
icon_dead = "Hivelord_dead"
icon_gib = "syndicate_gib"
mouse_opacity = 2
mouse_opacity = MOUSE_OPACITY_OPAQUE
move_to_delay = 14
ranged = 1
vision_range = 5
@@ -50,7 +50,7 @@
. = ..(gibbed)
if(!.)
return FALSE
mouse_opacity = 1
mouse_opacity = MOUSE_OPACITY_ICON
/obj/item/organ/internal/hivelord_core
name = "hivelord remains"
@@ -135,7 +135,7 @@
icon_aggro = "Hivelordbrood"
icon_dead = "Hivelordbrood"
icon_gib = "syndicate_gib"
mouse_opacity = 2
mouse_opacity = MOUSE_OPACITY_OPAQUE
move_to_delay = 1
friendly = "buzzes near"
vision_range = 10
@@ -116,7 +116,7 @@
icon_dead = "Goliath_dead"
icon_gib = "syndicate_gib"
attack_sound = 'sound/weapons/punch4.ogg'
mouse_opacity = 2
mouse_opacity = MOUSE_OPACITY_OPAQUE
move_to_delay = 40
ranged = 1
ranged_cooldown = 2 //By default, start the Goliath with his cooldown off so that people can run away quickly on first sight
@@ -22,7 +22,7 @@
faction = list("mushroom")
environment_smash = 0
stat_attack = 2
mouse_opacity = 1
mouse_opacity = MOUSE_OPACITY_ICON
speed = 1
ventcrawler = 2
robust_searching = 1
@@ -32,7 +32,7 @@
/obj/effect/ebeam/vine
name = "thick vine"
mouse_opacity = 1
mouse_opacity = MOUSE_OPACITY_ICON
desc = "A thick vine, painful to the touch."
+1 -1
View File
@@ -7,7 +7,7 @@
anchored = 1 //There's a reason this is here, Mport. God fucking damn it -Agouri. Find&Fix by Pete. The reason this is here is to stop the curving of emitter shots.
flags = ABSTRACT
pass_flags = PASSTABLE
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
hitsound = 'sound/weapons/pierce.ogg'
var/hitsound_wall = ""
pressure_resistance = INFINITY
@@ -476,7 +476,7 @@
pixel_x = -64
pixel_y = -64
unacidable = 1
mouse_opacity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
var/mob/living/immune = list() // the one who creates the timestop is immune
var/list/stopped_atoms = list()
var/freezerange = 2
+1 -1
View File
@@ -11,7 +11,7 @@
layer = RIPPLE_LAYER
alpha = 0
duration = 3 * SHUTTLE_RIPPLE_TIME
mouse_opacity = 1
mouse_opacity = MOUSE_OPACITY_ICON
/obj/effect/temp_visual/ripple/New()
. = ..()