mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 04:28:12 +01:00
Resolve conflicts
This commit is contained in:
@@ -18,7 +18,8 @@
|
||||
continue
|
||||
if(vent.welded)
|
||||
continue
|
||||
if(istype(get_area(vent), /area/crew_quarters/sleep)) //No going to dorms
|
||||
var/area/A = get_area(vent)
|
||||
if(A.forbid_events)
|
||||
continue
|
||||
vent_list += vent
|
||||
if(!vent_list.len)
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
spawncount = rand(2 * severity, 6 * severity)
|
||||
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
|
||||
if(istype(get_area(temp_vent), /area/crew_quarters/sleep))
|
||||
var/area/A = get_area(temp_vent)
|
||||
if(A.forbid_events)
|
||||
continue
|
||||
if(!temp_vent.welded && temp_vent.network && (temp_vent.loc.z in using_map.station_levels))
|
||||
if(temp_vent.network.normal_members.len > 50)
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
|
||||
if(!temp_vent.welded && temp_vent.network && (temp_vent.loc.z in using_map.station_levels))
|
||||
if(temp_vent.network.normal_members.len > 50)
|
||||
vents += temp_vent
|
||||
var/area/A = get_area(temp_vent)
|
||||
if(!(A.forbid_events))
|
||||
vents += temp_vent
|
||||
|
||||
while((spawncount >= 1) && vents.len)
|
||||
var/obj/vent = pick(vents)
|
||||
|
||||
@@ -294,7 +294,7 @@ var/datum/planet/virgo3c/planet_virgo3c = null
|
||||
effect_message = "<span class='warning'>Rain falls on you, drenching you in water.</span>"
|
||||
|
||||
var/next_lightning_strike = 0 // world.time when lightning will strike.
|
||||
var/min_lightning_cooldown = 1 SECONDS
|
||||
var/min_lightning_cooldown = 1 MINUTE
|
||||
var/max_lightning_cooldown = 5 MINUTE
|
||||
observed_message = "An intense storm pours down over the region."
|
||||
transition_messages = list(
|
||||
@@ -601,7 +601,7 @@ VIRGO3C_TURF_CREATE(/turf/simulated/floor/tiled/asteroid_steel/outdoors)
|
||||
/mob/living/simple_mob/vore/bigdragon/friendly = 1,
|
||||
/mob/living/simple_mob/vore/alienanimals/dustjumper = 20
|
||||
)
|
||||
|
||||
|
||||
|
||||
/turf/simulated/floor/outdoors/grass/forest/virgo3c/Initialize()
|
||||
if(tree_chance && prob(tree_chance) && !check_density())
|
||||
|
||||
@@ -365,7 +365,8 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity)
|
||||
return 0
|
||||
|
||||
// VOREStation Edit Start
|
||||
if(istype(get_area(T), /area/crew_quarters/sleep)) //No going to dorms
|
||||
var/area/A = get_area(T)
|
||||
if(A.forbid_events) //No going to dorms
|
||||
return 0
|
||||
// VOREStation Edit End
|
||||
|
||||
|
||||
@@ -158,7 +158,9 @@
|
||||
/proc/GetAnomalySusceptibility(var/mob/living/carbon/human/H)
|
||||
if(!istype(H))
|
||||
return 1
|
||||
if(istype(get_area(H),/area/crew_quarters/sleep)) return 0 //VOREStation Edit - Dorms are protected from anomalies
|
||||
var/area/A = get_area(H)
|
||||
if(A.forbid_events)
|
||||
return 0
|
||||
var/protected = 0
|
||||
|
||||
//anomaly suits give best protection, but excavation suits are almost as good
|
||||
|
||||
@@ -359,6 +359,7 @@
|
||||
/area/groundbase/civilian/arrivals
|
||||
name = "Arrivals"
|
||||
lightswitch = 1
|
||||
forbid_events = TRUE
|
||||
/area/groundbase/civilian/toolstorage
|
||||
name = "Tool Storage"
|
||||
lightswitch = 1
|
||||
@@ -417,10 +418,12 @@
|
||||
name = "Men's Restroom"
|
||||
sound_env = SOUND_ENVIRONMENT_BATHROOM
|
||||
lightswitch = 1
|
||||
forbid_events = TRUE
|
||||
/area/groundbase/civilian/womensrestroom
|
||||
name = "Women's Restroom"
|
||||
sound_env = SOUND_ENVIRONMENT_BATHROOM
|
||||
lightswitch = 1
|
||||
forbid_events = TRUE
|
||||
|
||||
/area/groundbase/exploration
|
||||
name = "Exploration"
|
||||
|
||||
@@ -272,8 +272,10 @@
|
||||
|
||||
/area/stellardelight/deck3/transitgateway
|
||||
name = "Transit Gateway"
|
||||
forbid_events = TRUE
|
||||
/area/stellardelight/deck3/cryo
|
||||
name = "Cryogenic Storage"
|
||||
forbid_events = TRUE
|
||||
|
||||
/area/stellardelight/deck3/readingroom
|
||||
name = "Reading Rooms"
|
||||
@@ -281,7 +283,7 @@
|
||||
flags = RAD_SHIELDED| BLUE_SHIELDED |AREA_FLAG_IS_NOT_PERSISTENT
|
||||
soundproofed = TRUE
|
||||
block_suit_sensors = TRUE
|
||||
forbid_events = TRUE
|
||||
forbid_events = TRUE
|
||||
|
||||
/area/stellardelight/deck3/portdock
|
||||
name = "Port Dock"
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import { Placement } from '@popperjs/core';
|
||||
import { Component, findDOMfromVNode, InfernoNode } from 'inferno';
|
||||
import { Popper } from './Popper';
|
||||
|
||||
const DEFAULT_PLACEMENT = 'top';
|
||||
import { createPopper, Placement, VirtualElement } from '@popperjs/core';
|
||||
import { Component, findDOMfromVNode, InfernoNode, render } from 'inferno';
|
||||
|
||||
type TooltipProps = {
|
||||
children?: InfernoNode;
|
||||
@@ -14,19 +11,37 @@ type TooltipState = {
|
||||
hovered: boolean;
|
||||
};
|
||||
|
||||
const DISABLE_EVENT_LISTENERS = [
|
||||
{
|
||||
name: 'eventListeners',
|
||||
enabled: false,
|
||||
},
|
||||
];
|
||||
const DEFAULT_OPTIONS = {
|
||||
modifiers: [
|
||||
{
|
||||
name: 'eventListeners',
|
||||
enabled: false,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const NULL_RECT = {
|
||||
width: 0,
|
||||
height: 0,
|
||||
top: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
};
|
||||
|
||||
export class Tooltip extends Component<TooltipProps, TooltipState> {
|
||||
state = {
|
||||
hovered: false,
|
||||
// Mounting poppers is really laggy because popper.js is very slow.
|
||||
// Thus, instead of using the Popper component, Tooltip creates ONE popper
|
||||
// and stores every tooltip inside that.
|
||||
// This means you can never have two tooltips at once, for instance.
|
||||
static renderedTooltip: HTMLDivElement | undefined;
|
||||
static singletonPopper: ReturnType<typeof createPopper> | undefined;
|
||||
static currentHoveredElement: Element | undefined;
|
||||
static virtualElement: VirtualElement = {
|
||||
getBoundingClientRect: () => (Tooltip.currentHoveredElement?.getBoundingClientRect() as DOMRect) ?? NULL_RECT,
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
getDOMNode() {
|
||||
// HACK: We don't want to create a wrapper, as it could break the layout
|
||||
// of consumers, so we do the inferno equivalent of `findDOMNode(this)`.
|
||||
// My attempt to avoid this was a render prop that passed in
|
||||
@@ -35,47 +50,89 @@ export class Tooltip extends Component<TooltipProps, TooltipState> {
|
||||
// This code is copied from `findDOMNode` in inferno-extras.
|
||||
// Because this component is written in TypeScript, we will know
|
||||
// immediately if this internal variable is removed.
|
||||
const domNode = findDOMfromVNode(this.$LI, true);
|
||||
return findDOMfromVNode(this.$LI, true);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const domNode = this.getDOMNode();
|
||||
|
||||
if (!domNode) {
|
||||
return;
|
||||
}
|
||||
|
||||
domNode.addEventListener('mouseenter', () => {
|
||||
this.setState({
|
||||
hovered: true,
|
||||
});
|
||||
let renderedTooltip = Tooltip.renderedTooltip;
|
||||
if (renderedTooltip === undefined) {
|
||||
renderedTooltip = document.createElement('div');
|
||||
renderedTooltip.className = 'Tooltip';
|
||||
document.body.appendChild(renderedTooltip);
|
||||
Tooltip.renderedTooltip = renderedTooltip;
|
||||
}
|
||||
|
||||
Tooltip.currentHoveredElement = domNode;
|
||||
|
||||
renderedTooltip.style.opacity = '1';
|
||||
|
||||
this.renderPopperContent();
|
||||
});
|
||||
|
||||
domNode.addEventListener('mouseleave', () => {
|
||||
this.setState({
|
||||
hovered: false,
|
||||
});
|
||||
this.fadeOut();
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Popper
|
||||
options={{
|
||||
placement: this.props.position || 'auto',
|
||||
modifiers: DISABLE_EVENT_LISTENERS,
|
||||
}}
|
||||
popperContent={
|
||||
<div
|
||||
className="Tooltip"
|
||||
style={{
|
||||
opacity: this.state.hovered ? 1 : 0,
|
||||
}}>
|
||||
{this.props.content}
|
||||
</div>
|
||||
fadeOut() {
|
||||
if (Tooltip.currentHoveredElement !== this.getDOMNode()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Tooltip.currentHoveredElement = undefined;
|
||||
Tooltip.renderedTooltip!.style.opacity = '0';
|
||||
}
|
||||
renderPopperContent() {
|
||||
const renderedTooltip = Tooltip.renderedTooltip;
|
||||
if (!renderedTooltip) {
|
||||
return;
|
||||
}
|
||||
|
||||
render(
|
||||
<span>{this.props.content}</span>,
|
||||
renderedTooltip,
|
||||
() => {
|
||||
let singletonPopper = Tooltip.singletonPopper;
|
||||
if (singletonPopper === undefined) {
|
||||
singletonPopper = createPopper(Tooltip.virtualElement, renderedTooltip!, {
|
||||
...DEFAULT_OPTIONS,
|
||||
placement: this.props.position || 'auto',
|
||||
});
|
||||
|
||||
Tooltip.singletonPopper = singletonPopper;
|
||||
} else {
|
||||
singletonPopper.setOptions({
|
||||
...DEFAULT_OPTIONS,
|
||||
placement: this.props.position || 'auto',
|
||||
});
|
||||
|
||||
singletonPopper.update();
|
||||
}
|
||||
additionalStyles={{
|
||||
'pointer-events': 'none',
|
||||
'z-index': 2,
|
||||
}}>
|
||||
{this.props.children}
|
||||
</Popper>
|
||||
},
|
||||
this.context
|
||||
);
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
if (Tooltip.currentHoveredElement !== this.getDOMNode()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.renderPopperContent();
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.fadeOut();
|
||||
}
|
||||
|
||||
render() {
|
||||
return this.props.children;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ $border-radius: base.$border-radius !default;
|
||||
padding: 0.5em 0.75em;
|
||||
pointer-events: none;
|
||||
text-align: left;
|
||||
transition: all 150ms ease-out;
|
||||
transition: opacity 150ms ease-out;
|
||||
background-color: $background-color;
|
||||
color: $color;
|
||||
box-shadow: 0.1em 0.1em 1.25em -0.1em rgba(0, 0, 0, 0.5);
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user