Upstream fix mirror spree (#7362)

* tgstation/tgstation#39025 - Fixes nukeop eshield not being buyable

* tgstation/tgstation#39011 - [s] Adds missing logging to the staff of storms

* tgstation/tgstation#38980 - Corrects a stat error in the Nuke Ops uplink

* tgstation/tgstation#38988 - Fixes blob victory.

* tgstation/tgstation#38990 - Allow players to un-ignore previously ignored popups for ghostroles, and ignore notifications with no ignore button

needs tgui recompile

* tgstation/tgstation#38994 - Fix timer bug

* TGUI recompile

* tgstation/tgstation#39035 - Fixes navigation computers.

* tgstation/tgstation#39043 - Fixes minor genetics scanner runtime

* tgstation/tgstation#39044 - Fixes burgers icons

* tgstation/tgstation#39055 - Fixes porta_turret and decal shuttle rotations

* tgstation/tgstation#39063 - Stops extinguishers from cooling turfs to absolute zero

* tgstation/tgstation#38967 - Fixes smuggler's satchel init typo

* tgstation/tgstation#38931 - Fixes pulse rifles exploding structures in nullspace and that sort of thing
This commit is contained in:
deathride58
2018-07-20 06:40:39 -04:00
committed by kevinz000
parent c82e341278
commit f1739cb482
28 changed files with 172 additions and 57 deletions

View File

@@ -60,7 +60,6 @@
#define COMSIG_ATOM_RCD_ACT "atom_rcd_act" //from base of atom/rcd_act(): (/mob, /obj/item/construction/rcd, passed_mode)
#define COMSIG_ATOM_SING_PULL "atom_sing_pull" //from base of atom/singularity_pull(): (S, current_size)
#define COMSIG_ATOM_SET_LIGHT "atom_set_light" //from base of atom/set_light(): (l_range, l_power, l_color)
#define COMSIG_ATOM_ROTATE "atom_rotate" //from base of atom/shuttleRotate(): (rotation, params)
#define COMSIG_ATOM_DIR_CHANGE "atom_dir_change" //from base of atom/setDir(): (old_dir, new_dir)
#define COMSIG_ATOM_CONTENTS_DEL "atom_contents_del" //from base of atom/handle_atom_del(): (atom/deleted)
/////////////////

View File

@@ -5,5 +5,34 @@
#define POLL_IGNORE_ALIEN_LARVA "alien_larva"
#define POLL_IGNORE_SYNDICATE "syndicate"
#define POLL_IGNORE_HOLOPARASITE "holoparasite"
#define POLL_IGNORE_POSIBRAIN "posibrain"
#define POLL_IGNORE_SPECTRAL_BLADE "spectral_blade"
#define POLL_IGNORE_CONSTRUCT "construct"
#define POLL_IGNORE_SPIDER "spider"
#define POLL_IGNORE_ASHWALKER "ashwalker"
#define POLL_IGNORE_GOLEM "golem"
#define POLL_IGNORE_SWARMER "swarmer"
#define POLL_IGNORE_DRONE "drone"
GLOBAL_LIST_EMPTY(poll_ignore)
GLOBAL_LIST_INIT(poll_ignore_desc, list(
POLL_IGNORE_SENTIENCE_POTION = "Sentience potion",
POLL_IGNORE_POSSESSED_BLADE = "Possessed blade",
POLL_IGNORE_ALIEN_LARVA = "Xenomorph larva",
POLL_IGNORE_SYNDICATE = "Syndicate",
POLL_IGNORE_HOLOPARASITE = "Holoparasite",
POLL_IGNORE_POSIBRAIN = "Positronic brain",
POLL_IGNORE_SPECTRAL_BLADE = "Spectral blade",
POLL_IGNORE_CONSTRUCT = "Construct",
POLL_IGNORE_SPIDER = "Spiders",
POLL_IGNORE_ASHWALKER = "Ashwalker eggs",
POLL_IGNORE_GOLEM = "Golems",
POLL_IGNORE_SWARMER = "Swarmer shells",
POLL_IGNORE_DRONE = "Drone shells",
))
GLOBAL_LIST_INIT(poll_ignore, init_poll_ignore())
/proc/init_poll_ignore()
. = list()
for (var/k in GLOB.poll_ignore_desc)
.[k] = list()

View File

@@ -1,5 +1,5 @@
#define BUCKET_LEN (world.fps*1*60) //how many ticks should we keep in the bucket. (1 minutes worth)
#define BUCKET_POS(timer) ((round((timer.timeToRun - SStimer.head_offset) / world.tick_lag) % BUCKET_LEN) + 1)
#define BUCKET_POS(timer) ((round((timer.timeToRun - SStimer.head_offset) / world.tick_lag) % BUCKET_LEN)||BUCKET_LEN)
#define TIMER_MAX (world.time + TICKS2DS(min(BUCKET_LEN-(SStimer.practical_offset-DS2TICKS(world.time - SStimer.head_offset))-1, BUCKET_LEN-1)))
#define TIMER_ID_MAX (2**24) //max float with integer precision

View File

@@ -115,6 +115,12 @@ Stands have a lot of procs which mimic mob procs. Rather than inserting hooks fo
* Clears `parent` and removes the component from it's component list
1. `/datum/component/proc/_JoinParent` (private, final)
* Tries to add the component to it's `parent`s `datum_components` list
1. `/datum/component/proc/RegisterWithParent` (abstract, no-sleep)
* Used to register the signals that should be on the `parent` object
* Use this if you plan on the component transfering between parents
1. `/datum/component/proc/UnregisterFromParent` (abstract, no-sleep)
* Counterpart to `RegisterWithParent()`
* Used to unregister the signals that should only be on the `parent` object
1. `/datum/component/proc/RegisterSignal(datum/target, signal(string/list of strings), proc_ref(type), override(boolean))` (protected, final)
* If signal is a list it will be as if RegisterSignal was called for each of the entries with the same following arguments
* Makes a component listen for the specified `signal` on it's `parent` datum.

View File

@@ -47,6 +47,12 @@
else //only component of this type, no list
dc[I] = src
RegisterWithParent()
// If you want/expect to be moving the component around between parents, use this to register on the parent for signals
/datum/component/proc/RegisterWithParent()
return
/datum/component/proc/Initialize(...)
return
@@ -78,6 +84,11 @@
if(!dc.len)
P.datum_components = null
UnregisterFromParent()
/datum/component/proc/UnregisterFromParent()
return
/datum/component/proc/RegisterSignal(datum/target, sig_type_or_types, proc_or_callback, override = FALSE)
if(QDELETED(src) || QDELETED(target))
return

View File

@@ -5,20 +5,28 @@
var/description
var/mutable_appearance/pic
var/first_dir // This only stores the dir arg from init
/datum/component/decal/Initialize(_icon, _icon_state, _dir, _cleanable=CLEAN_GOD, _color, _layer=TURF_LAYER, _description)
if(!isatom(parent) || !generate_appearance(_icon, _icon_state, _dir, _layer, _color))
return COMPONENT_INCOMPATIBLE
first_dir = _dir
description = _description
cleanable = _cleanable
if(_dir) // If no dir is assigned at start then it follows the atom's dir
RegisterSignal(parent, COMSIG_ATOM_DIR_CHANGE, .proc/rotate_react)
if(_cleanable)
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_react)
if(_description)
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/examine)
apply()
/datum/component/decal/RegisterWithParent()
if(first_dir)
RegisterSignal(parent, COMSIG_ATOM_DIR_CHANGE, .proc/rotate_react)
if(cleanable)
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_react)
if(description)
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/examine)
/datum/component/decal/UnregisterFromParent()
UnregisterSignal(parent, list(COMSIG_ATOM_DIR_CHANGE, COMSIG_COMPONENT_CLEAN_ACT, COMSIG_PARENT_EXAMINE))
/datum/component/decal/Destroy()
remove()
return ..()

View File

@@ -562,11 +562,10 @@
viable_occupant.dna.blood_type = buffer_slot["blood_type"]
/obj/machinery/computer/scan_consolenew/proc/on_scanner_close()
to_chat(connected.occupant, "<span class='notice'>[src] activates!</span>")
if(delayed_action)
if(delayed_action && connected)
to_chat(connected.occupant, "<span class='notice'>[src] activates!</span>")
apply_buffer(delayed_action["action"],delayed_action["buffer"])
delayed_action = null //or make it stick + reset button ?
return
/////////////////////////// DNA MACHINES
#undef INJECTOR_TIMEOUT

View File

@@ -551,10 +551,6 @@
A.fire()
return A
/obj/machinery/porta_turret/shuttleRotate(rotation)
if(wall_turret_direction)
wall_turret_direction = turn(wall_turret_direction,rotation)
/obj/machinery/porta_turret/proc/setState(on, mode)
if(controllock)
return

View File

@@ -199,7 +199,7 @@
S.directive = directive
if(player_spiders)
S.playable_spider = TRUE
notify_ghosts("Spider [S.name] can be controlled", null, enter_link="<a href=?src=[REF(S)];activate=1>(Click to play)</a>", source=S, action=NOTIFY_ATTACK)
notify_ghosts("Spider [S.name] can be controlled", null, enter_link="<a href=?src=[REF(S)];activate=1>(Click to play)</a>", source=S, action=NOTIFY_ATTACK, ignore_key = POLL_IGNORE_SPIDER)
qdel(src)

View File

@@ -251,7 +251,7 @@
level = 1
component_type = /datum/component/storage/concrete/secret_satchel
/obj/item/storage/backpack/stachel/flat/Initialize()
/obj/item/storage/backpack/satchel/flat/Initialize()
. = ..()
SSpersistence.new_secret_satchels += src

View File

@@ -64,7 +64,7 @@
. = ..()
var/area/A = get_area(src)
if(A)
notify_ghosts("An ash walker egg is ready to hatch in \the [A.name].", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE)
notify_ghosts("An ash walker egg is ready to hatch in \the [A.name].", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE, ignore_key = POLL_IGNORE_ASHWALKER)
/datum/outfit/ashwalker
name ="Ashwalker"
@@ -129,7 +129,7 @@
. = ..()
var/area/A = get_area(src)
if(!mapload && A)
notify_ghosts("\A [initial(species.prefix)] golem shell has been completed in \the [A.name].", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE)
notify_ghosts("\A [initial(species.prefix)] golem shell has been completed in \the [A.name].", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE, ignore_key = POLL_IGNORE_GOLEM)
if(has_owner && creator)
flavour_text = "<span class='big bold'>You are a Golem.</span><b> You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. \
Serve [creator], and assist [creator.p_them()] in completing [creator.p_their()] goals at any cost.</b>"

View File

@@ -123,8 +123,9 @@ GLOBAL_LIST_EMPTY(blob_nodes)
else
L.fully_heal()
for(var/V in GLOB.the_station_areas)
var/area/A = V
for(var/area/A in GLOB.sortedAreas)
if(!(A.type in GLOB.the_station_areas))
continue
if(!A.blob_allowed)
continue
A.color = blob_reagent_datum.color

View File

@@ -15,7 +15,7 @@
. = ..()
var/area/A = get_area(src)
if(A && construct_type)
notify_ghosts("A [construct_name] chassis has been created in [A.name]!", 'sound/magic/clockwork/fellowship_armory.ogg', source = src, action = NOTIFY_ATTACK, flashwindow = FALSE)
notify_ghosts("A [construct_name] chassis has been created in [A.name]!", 'sound/magic/clockwork/fellowship_armory.ogg', source = src, action = NOTIFY_ATTACK, flashwindow = FALSE, ignore_key = POLL_IGNORE_CONSTRUCT)
GLOB.poi_list += src
LAZYADD(GLOB.mob_spawners[name], src)

View File

@@ -118,7 +118,7 @@
if(INGREDIENTS_STACKPLUSTOP)
filling.pixel_x = rand(-1,1)
filling.pixel_y = 2 * ingredients.len - 1
if(overlays)
if(overlays && overlays.len >= ingredients.len) //remove the old top if it exists
overlays -= overlays[ingredients.len]
var/mutable_appearance/TOP = mutable_appearance(icon, "[icon_state]_top")
TOP.pixel_y = 2 * ingredients.len + 3

View File

@@ -766,7 +766,7 @@
notify_ghosts("[user] is raising [user.p_their()] [src], calling for your help!",
enter_link="<a href=?src=[REF(src)];orbit=1>(Click to help)</a>",
source = user, action=NOTIFY_ORBIT)
source = user, action=NOTIFY_ORBIT, ignore_key = POLL_IGNORE_SPECTRAL_BLADE)
summon_cooldown = world.time + 600

View File

@@ -0,0 +1,49 @@
/mob/dead/observer/verb/show_notificationprefs()
set category = "Ghost"
set name = "Notification preferences"
set desc = "Notification preferences"
var/datum/notificationpanel/panel = new(usr)
panel.ui_interact(usr)
/datum/notificationpanel
var/client/user
/datum/notificationpanel/New(user)
if (ismob(user))
var/mob/M = user
if (!M.client)
CRASH("Ghost role notification panel attempted to open to a mob without a client")
src.user = M.client
else
src.user = user
/datum/notificationpanel/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.observer_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "notificationpanel", "Notification Preferences", 700, 700, master_ui, state)
ui.open()
/datum/notificationpanel/ui_data(mob/user)
. = list()
.["ignore"] = list()
for(var/key in GLOB.poll_ignore_desc)
.["ignore"] += list(list(
"key" = key,
"enabled" = (user.ckey in GLOB.poll_ignore[key]),
"desc" = GLOB.poll_ignore_desc[key]
))
/datum/notificationpanel/ui_act(action, params)
if(..())
return
switch (action)
if ("toggle_ignore")
var/key = params["key"]
if (key && islist(GLOB.poll_ignore[key]))
GLOB.poll_ignore[key] ^= list(user.ckey)
. = TRUE

View File

@@ -36,7 +36,7 @@ GLOBAL_VAR(posibrain_notify_cooldown)
/obj/item/mmi/posibrain/proc/ping_ghosts(msg, newlymade)
if(newlymade || GLOB.posibrain_notify_cooldown <= world.time)
notify_ghosts("[name] [msg] in [get_area(src)]!", ghost_sound = !newlymade ? 'sound/effects/ghost2.ogg':null, enter_link = "<a href=?src=[REF(src)];activate=1>(Click to enter)</a>", source = src, action = NOTIFY_ATTACK, flashwindow = FALSE)
notify_ghosts("[name] [msg] in [get_area(src)]!", ghost_sound = !newlymade ? 'sound/effects/ghost2.ogg':null, enter_link = "<a href=?src=[REF(src)];activate=1>(Click to enter)</a>", source = src, action = NOTIFY_ATTACK, flashwindow = FALSE, ignore_key = POLL_IGNORE_POSIBRAIN)
if(!newlymade)
GLOB.posibrain_notify_cooldown = world.time + askDelay

View File

@@ -21,7 +21,7 @@
. = ..()
var/area/A = get_area(src)
if(A)
notify_ghosts("A drone shell has been created in \the [A.name].", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE)
notify_ghosts("A drone shell has been created in \the [A.name].", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE, ignore_key = POLL_IGNORE_DRONE)
GLOB.poi_list |= src
if(isnull(possible_seasonal_hats))
build_seasonal_hats()

View File

@@ -188,10 +188,14 @@ Difficulty: Medium
"<span class='notice'>You hold [src] skyward, dispelling the storm!</span>")
playsound(user, 'sound/magic/staff_change.ogg', 200, 0)
A.wind_down()
log_game("[user] ([key_name(user)]) has dispelled a storm at [AREACOORD(user_turf)]")
return
else
A = new storm_type(list(user_turf.z))
A.name = "staff storm"
log_game("[user] ([key_name(user)]) has summoned [A] at [AREACOORD(user_turf)]")
if (is_special_character(user))
message_admins("[A] has been summoned in [ADMIN_VERBOSEJMP(user_turf)] by [user] ([key_name_admin(user)], a non-antagonist")
A.area_type = user_area.type
A.telegraph_duration = 100
A.end_duration = 100

View File

@@ -375,11 +375,13 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
/mob/proc/reagent_check(datum/reagent/R) // utilized in the species code
return 1
/proc/notify_ghosts(var/message, var/ghost_sound = null, var/enter_link = null, var/atom/source = null, var/mutable_appearance/alert_overlay = null, var/action = NOTIFY_JUMP, flashwindow = TRUE, ignore_mapload = TRUE) //Easy notification of ghosts.
/proc/notify_ghosts(var/message, var/ghost_sound = null, var/enter_link = null, var/atom/source = null, var/mutable_appearance/alert_overlay = null, var/action = NOTIFY_JUMP, flashwindow = TRUE, ignore_mapload = TRUE, ignore_key) //Easy notification of ghosts.
if(ignore_mapload && SSatoms.initialized != INITIALIZATION_INNEW_REGULAR) //don't notify for objects created during a map load
return
for(var/mob/dead/observer/O in GLOB.player_list)
if(O.client)
if (ignore_key && O.ckey in GLOB.poll_ignore[ignore_key])
continue
to_chat(O, "<span class='ghostalert'>[message][(enter_link) ? " [enter_link]" : ""]</span>")
if(ghost_sound)
SEND_SOUND(O, sound(ghost_sound))

View File

@@ -140,7 +140,7 @@
if(hotspot && !isspaceturf(T))
if(T.air)
var/datum/gas_mixture/G = T.air
G.temperature = max(min(G.temperature-(CT*1000),G.temperature/CT),0)
G.temperature = max(min(G.temperature-(CT*1000),G.temperature/CT),TCMB)
G.react(src)
qdel(hotspot)
var/obj/effect/acid/A = (locate(/obj/effect/acid) in T)

View File

@@ -31,7 +31,7 @@
if(jammed)
to_chat(user, "<span class='warning'>The Syndicate is jamming the console!</span>")
return
if(!shuttle_port)
if(!shuttle_port && !SSshuttle.getShuttle(shuttleId))
to_chat(user,"<span class='warning'>Warning: Shuttle connection severed!</span>")
return
return ..()

View File

@@ -25,8 +25,6 @@ If ever any of these procs are useful for non-shuttles, rename it to proc/rotate
pixel_x = oldPY
pixel_y = (oldPX*(-1))
SEND_SIGNAL(src, COMSIG_ATOM_ROTATE, rotation, params)
/************************************Turf rotate procs************************************/
/turf/closed/mineral/shuttleRotate(rotation, params)
@@ -111,3 +109,8 @@ If ever any of these procs are useful for non-shuttles, rename it to proc/rotate
if(cyclelinkeddir)
cyclelinkeddir = angle2dir(rotation+dir2angle(cyclelinkeddir))
cyclelinkairlock()
/obj/machinery/porta_turret/shuttleRotate(rotation, params)
. = ..()
if(wall_turret_direction && (params & ROTATE_DIR))
wall_turret_direction = turn(wall_turret_direction,rotation)

View File

@@ -196,7 +196,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
/datum/uplink_item/dangerous/smg
name = "C-20r Submachine Gun"
desc = "A fully-loaded Scarborough Arms bullpup submachine gun. The C-20r fires .45 rounds with a \
20-round magazine and is compatible with suppressors."
24-round magazine and is compatible with suppressors."
item = /obj/item/gun/ballistic/automatic/c20r
cost = 10
surplus = 40
@@ -496,7 +496,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
/datum/uplink_item/ammo/smg
name = ".45 SMG Magazine"
desc = "An additional 20-round .45 magazine suitable for use with the C-20r submachine gun. \
desc = "An additional 24-round .45 magazine suitable for use with the C-20r submachine gun. \
These bullets pack a lot of punch that can knock most targets down, but do limited overall damage."
item = /obj/item/ammo_box/magazine/smgm45
cost = 3
@@ -1134,7 +1134,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
surplus = 20
include_modes = list(/datum/game_mode/nuclear)
/datum/uplink_item/device_tools/shield
/datum/uplink_item/device_tools/bananashield
name = "Bananium Energy Shield"
desc = "A clown's most powerful defensive weapon, this personal shield provides near immunity to ranged energy attacks \
by bouncing them back at the ones who fired them. It can also be thrown to bounce off of people, slipping them, \

View File

@@ -1824,6 +1824,7 @@
#include "code\modules\mob\dead\new_player\sprite_accessories.dm"
#include "code\modules\mob\dead\observer\login.dm"
#include "code\modules\mob\dead\observer\logout.dm"
#include "code\modules\mob\dead\observer\notificationprefs.dm"
#include "code\modules\mob\dead\observer\observer.dm"
#include "code\modules\mob\dead\observer\say.dm"
#include "code\modules\mob\living\blood.dm"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
<ui-display title='Ghost roles'>
<ui-section label='Ignored roles'>
{{#each data.ignore}}
<ui-button icon='{{enabled ? "check-square-o" : "square-o"}}' style='{{enabled ? "danger" : null}}' action='toggle_ignore' params='{"key": "{{key}}"}'>{{desc}}</ui-button>
{{/each}}
</ui-section>
</ui-display>