Merge remote-tracking branch 'ParadiseSS13/master' into toml-config

This commit is contained in:
AffectedArc07
2021-07-13 14:25:12 +01:00
43 changed files with 857 additions and 1010 deletions
+2 -5
View File
@@ -278,11 +278,9 @@
var/action=""
if(GLOB.configuration.general.allow_antag_hud)
for(var/mob/dead/observer/g in get_ghosts())
if(!g.client.holder) //Remove the verb from non-admin ghosts
g.verbs -= /mob/dead/observer/verb/toggle_antagHUD
if(g.antagHUD)
g.antagHUD = FALSE // Disable it on those that have it enabled
g.has_enabled_antagHUD = 2 // We'll allow them to respawn
g.has_enabled_antagHUD = FALSE // We'll allow them to respawn
to_chat(g, "<span class='danger'>The Administrators have disabled AntagHUD </span>")
GLOB.configuration.general.allow_antag_hud = FALSE
to_chat(src, "<span class='danger'>AntagHUD usage has been disabled</span>")
@@ -290,7 +288,6 @@
else
for(var/mob/dead/observer/g in get_ghosts())
if(!g.client.holder) // Add the verb back for all non-admin ghosts
g.verbs += /mob/dead/observer/verb/toggle_antagHUD
to_chat(g, "<span class='boldnotice'>The Administrators have enabled AntagHUD </span>")// Notify all observers they can now use AntagHUD
GLOB.configuration.general.allow_antag_hud = TRUE
@@ -321,7 +318,7 @@
to_chat(g, "<span class='danger'>The administrator has placed restrictions on joining the round if you use AntagHUD</span>")
to_chat(g, "<span class='danger'>Your AntagHUD has been disabled, you may choose to re-enabled it but will be under restrictions </span>")
g.antagHUD = FALSE
g.has_enabled_antagHUD = 0
g.has_enabled_antagHUD = FALSE
action = "placed restrictions"
GLOB.configuration.general.restrict_antag_hud_rejoin = TRUE
to_chat(src, "<span class='danger'>AntagHUD restrictions have been enabled</span>")
@@ -45,7 +45,7 @@
// Components
component_parts = list()
var/obj/item/circuitboard/smartfridge/board = new(null)
board.set_type(type)
board.set_type(null, type)
component_parts += board
component_parts += new /obj/item/stock_parts/matter_bin(null)
RefreshParts()
-2
View File
@@ -18,8 +18,6 @@
..()
pixel_x = rand(0, 16) - 8
pixel_y = rand(0, 8) - 8
if(is_mining_level(z))
SSticker.score.score_ore_mined++ //When ore spawns, increment score. Only include ore spawned on mining level (No Clown Planet)
/obj/item/stack/ore/welder_act(mob/user, obj/item/I)
. = TRUE
+12 -76
View File
@@ -26,7 +26,8 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
var/image/ghostimage = null //this mobs ghost image, for deleting and stuff
var/ghostvision = TRUE //is the ghost able to see things humans can't?
var/seedarkness = TRUE
var/data_hud_seen = FALSE //this should one of the defines in __DEFINES/hud.dm
/// Defines from __DEFINES/hud.dm go here based on which huds the ghost has activated.
var/list/data_hud_seen = list()
var/ghost_orbit = GHOST_ORBIT_CIRCLE
var/health_scan = FALSE //does the ghost have health scanner mode on? by default it should be off
var/datum/orbit_menu/orbit_menu
@@ -86,7 +87,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
real_name = name
//starts ghosts off with all HUDs.
toggle_medHUD()
toggle_all_huds_on()
..()
/mob/dead/observer/Destroy()
@@ -162,8 +163,6 @@ Works together with spawning an observer, noted above.
else
GLOB.non_respawnable_keys[ckey] = 1
ghost.key = key
if(!(ghost.client && ghost.client.holder) && !GLOB.configuration.general.allow_antag_hud) // For new ghosts we remove the verb from even showing up if it's not allowed.
ghost.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
return ghost
/*
@@ -310,87 +309,24 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/proc/show_me_the_hud(hud_index)
var/datum/atom_hud/H = GLOB.huds[hud_index]
H.add_hud_to(src)
data_hud_seen |= hud_index
/mob/dead/observer/proc/remove_the_hud(hud_index) //remove old huds
var/datum/atom_hud/H = GLOB.huds[hud_index]
H.remove_hud_from(src)
data_hud_seen -= hud_index
/mob/dead/observer/verb/toggle_medHUD()
/mob/dead/observer/verb/open_hud_panel()
set category = "Ghost"
set name = "Toggle All/Sec/Med/Diag HUDs"
set desc = "Toggles the HUDs."
set name = "Ghost HUD Panel"
if(!client)
return
GLOB.ghost_hud_panel.ui_interact(src)
switch(data_hud_seen) //give new huds
if(FALSE)
data_hud_seen = DATA_HUD_DIAGNOSTIC + DATA_HUD_SECURITY_ADVANCED + DATA_HUD_MEDICAL_ADVANCED
show_me_the_hud(DATA_HUD_DIAGNOSTIC)
show_me_the_hud(DATA_HUD_SECURITY_ADVANCED)
show_me_the_hud(DATA_HUD_MEDICAL_ADVANCED)
to_chat(src, "<span class='notice'>All HUDs enabled.</span>")
if(DATA_HUD_DIAGNOSTIC + DATA_HUD_SECURITY_ADVANCED + DATA_HUD_MEDICAL_ADVANCED)
data_hud_seen = DATA_HUD_SECURITY_ADVANCED
remove_the_hud(DATA_HUD_DIAGNOSTIC)
remove_the_hud(DATA_HUD_MEDICAL_ADVANCED)
to_chat(src, "<span class='notice'>Security HUD set.</span>")
if(DATA_HUD_SECURITY_ADVANCED)
data_hud_seen = DATA_HUD_MEDICAL_ADVANCED
remove_the_hud(DATA_HUD_SECURITY_ADVANCED)
show_me_the_hud(DATA_HUD_MEDICAL_ADVANCED)
to_chat(src, "<span class='notice'>Medical HUD set.</span>")
if(DATA_HUD_MEDICAL_ADVANCED)
data_hud_seen = DATA_HUD_DIAGNOSTIC
remove_the_hud(DATA_HUD_MEDICAL_ADVANCED)
show_me_the_hud(DATA_HUD_DIAGNOSTIC)
to_chat(src, "<span class='notice'>Diagnostic HUD set.</span>")
else
data_hud_seen = FALSE
remove_the_hud(DATA_HUD_MEDICAL_ADVANCED)
to_chat(src, "<span class='notice'>HUDs disabled.</span>")
/mob/dead/observer/verb/toggle_antagHUD()
set category = "Ghost"
set name = "Toggle AntagHUD"
set desc = "Toggles AntagHUD allowing you to see who is the antagonist"
if(!GLOB.configuration.general.allow_antag_hud && !client.holder)
to_chat(src, "<span class='warning'>Admins have disabled this for this round.</span>")
return
if(!client)
return
var/mob/dead/observer/M = src
if(jobban_isbanned(M, ROLEBAN_AHUD))
to_chat(src, "<span class='danger'>You have been banned from using this feature</span>")
return
var/restricted_use = (!M.has_enabled_antagHUD && !check_rights(R_ADMIN|R_MOD, FALSE)) // Admins can freely toggle it
if(GLOB.configuration.general.restrict_antag_hud_rejoin && restricted_use)
var/response = alert(src, "If you turn this on, you will not be able to take any part in the round.", "Are you sure you want to turn this feature on?", "Yes", "No")
if(response == "No")
return
M.can_reenter_corpse = FALSE
if(M in GLOB.respawnable_list)
GLOB.respawnable_list -= M
if(restricted_use)
M.has_enabled_antagHUD = TRUE
for(var/datum/atom_hud/antag/H in (GLOB.huds))
if(!M.antagHUD)
H.add_hud_to(usr)
else
H.remove_hud_from(usr)
if(!M.antagHUD)
to_chat(usr, "AntagHud Toggled ON")
create_log(MISC_LOG, "Enabled AntagHUD")
log_game("[key_name(usr)] has enabled AntagHUD.")
M.antagHUD = TRUE
else
to_chat(usr, "AntagHud Toggled OFF")
create_log(MISC_LOG, "Disabled AntagHUD")
log_game("[key_name(usr)] has disabled AntagHUD.")
M.antagHUD = FALSE
/mob/dead/observer/proc/toggle_all_huds_on()
show_me_the_hud(DATA_HUD_DIAGNOSTIC)
show_me_the_hud(DATA_HUD_SECURITY_ADVANCED)
show_me_the_hud(DATA_HUD_MEDICAL_ADVANCED)
/mob/dead/observer/verb/set_dnr()
set name = "Set DNR"
@@ -433,7 +433,7 @@
else if(isobserver(M))
var/mob/dead/observer/O = M
if(O.data_hud_seen == DATA_HUD_SECURITY_ADVANCED || O.data_hud_seen == DATA_HUD_DIAGNOSTIC + DATA_HUD_SECURITY_ADVANCED + DATA_HUD_MEDICAL_ADVANCED)
if(DATA_HUD_SECURITY_ADVANCED in O.data_hud_seen)
return (hudtype in list(EXAMINE_HUD_SECURITY_READ, EXAMINE_HUD_SKILLS))
return FALSE
@@ -24,7 +24,6 @@
projectiletype = /obj/item/projectile/terrorqueenspit/empress
icon = 'icons/mob/terrorspider64.dmi'
pixel_x = -16
move_resist = MOVE_FORCE_STRONG // no more pushing a several hundred if not thousand pound spider
mob_size = MOB_SIZE_LARGE
icon_state = "terror_empress"
icon_living = "terror_empress"
@@ -30,7 +30,6 @@
web_type = /obj/structure/spider/terrorweb/purple
ai_spins_webs = FALSE
gender = MALE
move_resist = MOVE_FORCE_STRONG // no more pushing a several hundred if not thousand pound spider
/mob/living/simple_animal/hostile/poison/terror_spider/prince/death(gibbed)
if(can_die() && !hasdied && spider_uo71)
@@ -19,7 +19,6 @@
maxHealth = 150
health = 150
spider_tier = TS_TIER_3
move_resist = MOVE_FORCE_STRONG // no more pushing a several hundred if not thousand pound spider
// Unlike queens, no ranged attack.
ranged = 0
@@ -25,7 +25,6 @@
speed = 0 // '0' (also the default for human mobs) converts to 2.5 total delay, or 4 tiles/sec.
spider_opens_doors = 2
ventcrawler = 0
move_resist = MOVE_FORCE_STRONG // no more pushing a several hundred if not thousand pound spider
ai_ventcrawls = FALSE
environment_smash = ENVIRONMENT_SMASH_RWALLS
idle_ventcrawl_chance = 0 // stick to the queen!
@@ -26,7 +26,6 @@
ai_spins_webs = FALSE
ai_ventcrawls = FALSE
idle_ventcrawl_chance = 0
move_resist = MOVE_FORCE_STRONG // no more pushing a several hundred if not thousand pound spider
force_threshold = 18 // outright immune to anything of force under 18, this means welders can't hurt it, only guns can
ranged = 1
retreat_distance = 5
@@ -24,7 +24,6 @@
move_to_delay = 10 // at 20ticks/sec, this is 2 tile/sec movespeed
speed = 2 // movement_delay() gives 4.5, or 0.45s between steps, which = about 2.2 tiles/second. Player is slightly faster than AI, but cannot move on diagonals.
spider_opens_doors = 2
move_resist = MOVE_FORCE_STRONG // no more pushing a several hundred if not thousand pound spider
web_type = /obj/structure/spider/terrorweb/red
var/enrage = 0
var/melee_damage_lower_rage0 = 15
@@ -40,6 +40,7 @@ GLOBAL_LIST_EMPTY(ts_spiderling_list)
// Movement
pass_flags = PASSTABLE
move_resist = MOVE_FORCE_STRONG // no more pushing a several hundred if not thousand pound spider
turns_per_move = 3 // number of turns before AI-controlled spiders wander around. No effect on actual player or AI movement speed!
move_to_delay = 6
// AI spider speed at chasing down targets. Higher numbers mean slower speed. Divide 20 (server tick rate / second) by this to get tiles/sec.
+2 -2
View File
@@ -111,8 +111,8 @@
var/move_on_shuttle = 1 // Can move on the shuttle.
var/has_enabled_antagHUD = 0 // Whether antagHUD was ever enabled. Not a true boolean - sometimes it is set to 2, because reasons.
/// Whether antagHUD has been enabled previously.
var/has_enabled_antagHUD = FALSE
var/antagHUD = FALSE // Whether AntagHUD is active right now
var/can_change_intents = 1 //all mobs can change intents by default.
///Override for sound_environments. If this is set the user will always hear a specific type of reverb (Instead of the area defined reverb)
+1 -1
View File
@@ -79,7 +79,7 @@
/proc/cannotPossess(A)
var/mob/dead/observer/G = A
if(G.has_enabled_antagHUD == 1 && GLOB.configuration.general.restrict_antag_hud_rejoin)
if(G.has_enabled_antagHUD && GLOB.configuration.general.restrict_antag_hud_rejoin)
return 1
return 0
@@ -192,8 +192,6 @@
client.prefs.real_name = random_name(client.prefs.gender,client.prefs.species)
observer.real_name = client.prefs.real_name
observer.name = observer.real_name
if(!client.holder && !GLOB.configuration.general.allow_antag_hud) // For new ghosts we remove the verb from even showing up if it's not allowed.
observer.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
observer.key = key
QDEL_NULL(mind)
GLOB.respawnable_list += observer
@@ -29,7 +29,7 @@
/datum/reagent/consumable/drink/apple_pocalypse/on_mob_life(mob/living/M)
if(prob(1))
var/turf/simulated/T = get_turf(M)
goonchem_vortex(T, 1, 0)
goonchem_vortex(T, TRUE, 0, TRUE) // Ignore the 0 volume
to_chat(M, "<span class='notice'>You briefly feel super-massive, like a black hole. Probably just your imagination...</span>")
return ..()
@@ -119,7 +119,7 @@
/datum/reagent/consumable/drink/grape_granade/on_mob_life(mob/living/M)
if(prob(1))
var/turf/simulated/T = get_turf(M)
goonchem_vortex(T, 0, 0)
goonchem_vortex(T, FALSE, 0, TRUE) // Ignore the 0 volume
M.emote("burp")
to_chat(M, "<span class='notice'>You feel ready to burst! Oh wait, just a burp...</span>")
else if(prob(25))
+23 -4
View File
@@ -53,18 +53,37 @@
for(var/j = 1, j <= rand(1, 3), j++)
step(S, pick(NORTH,SOUTH,EAST,WEST))
/proc/goonchem_vortex(turf/T, setting_type, volume)
if(setting_type)
/**
* Throws or pulls objects to/from a chem reaction
*
* Scales the amount of objects thrown with the volume, unless ignore_volume is TRUE
*
* Arguments:
* * T - The turf to use as the throw from/to point
* * pull - Do we want to pull objects towards T (TRUE) or push them away from it (FALSE)
* * volume - The volume of reagents. Used to scale the effect is ignore_volume = FALSE
* * ignore_volume - Do we want to ignore the volume of reagents and just throw regardless
*/
/proc/goonchem_vortex(turf/T, pull, volume, ignore_volume = FALSE)
if(pull)
new /obj/effect/temp_visual/implosion(T)
playsound(T, 'sound/effects/whoosh.ogg', 25, 1) //credit to Robinhood76 of Freesound.org for this.
else
new /obj/effect/temp_visual/shockwave(T)
playsound(T, 'sound/effects/bang.ogg', 25, 1)
for(var/atom/movable/X in view(2 + setting_type + (volume > 30 ? 1 : 0), T))
// PARADISE EDIT: Allow only a certain amount of atoms to be pulled per unit
var/units_per_atom = 5
var/atoms_to_move = round(volume / units_per_atom)
var/moved_count = 0
// The ternary below isnt exactly needed, but it makes code more readable because `pull` is a bool
for(var/atom/movable/X in view(2 + (pull ? 1 : 0) + (volume > 30 ? 1 : 0), T))
if(istype(X, /obj/effect))
continue //stop pulling smoke and hotspots please
if(X && !X.anchored && X.move_resist <= MOVE_FORCE_DEFAULT)
if(setting_type)
if(pull)
X.throw_at(T, 20 + round(volume * 2), 1 + round(volume / 10))
else
X.throw_at(get_edge_target_turf(T, get_dir(T, X)), 20 + round(volume * 2), 1 + round(volume / 10))
moved_count++
if((moved_count >= atoms_to_move) && !ignore_volume)
break
@@ -104,7 +104,7 @@
var/turf/T = get_turf(holder.my_atom)
if(!T)
return
goonchem_vortex(T, 0, created_volume)
goonchem_vortex(T, FALSE, created_volume)
/datum/chemical_reaction/sorium_explosion/sorium
name = "sorium_vortex"
@@ -133,7 +133,7 @@
var/turf/simulated/T = get_turf(holder.my_atom)
if(!T)
return
goonchem_vortex(T, 1, created_volume)
goonchem_vortex(T, TRUE, created_volume)
/datum/chemical_reaction/ldm_implosion/liquid_dark_matter
name = "LDM Vortex"
+1 -1
View File
@@ -42,7 +42,7 @@
product_cost = cost
/obj/item/circuitboard/machine/bluespace_tap
name = "Bluespace Harvester (Machine Board)"
board_name = "Bluespace Harvester"
build_path = /obj/machinery/power/bluespace_tap
origin_tech = "engineering=2;combat=2;bluespace=3"
req_components = list(
+4 -4
View File
@@ -225,7 +225,7 @@
last_fire_time = world.time / 10
/obj/item/circuitboard/machine/bsa/back
name = "Bluespace Artillery Generator (Machine Board)"
board_name = "Bluespace Artillery Generator"
build_path = /obj/machinery/bsa/back
origin_tech = "engineering=2;combat=2;bluespace=2" //No freebies!
req_components = list(
@@ -233,7 +233,7 @@
/obj/item/stack/cable_coil = 2)
/obj/item/circuitboard/machine/bsa/middle
name = "Bluespace Artillery Fusor (Machine Board)"
board_name = "Bluespace Artillery Fusor"
build_path = /obj/machinery/bsa/middle
origin_tech = "engineering=2;combat=2;bluespace=2"
req_components = list(
@@ -241,7 +241,7 @@
/obj/item/stack/cable_coil = 2)
/obj/item/circuitboard/machine/bsa/front
name = "Bluespace Artillery Bore (Machine Board)"
board_name = "Bluespace Artillery Bore"
build_path = /obj/machinery/bsa/front
origin_tech = "engineering=2;combat=2;bluespace=2"
req_components = list(
@@ -249,7 +249,7 @@
/obj/item/stack/cable_coil = 2)
/obj/item/circuitboard/computer/bsa_control
name = "Bluespace Artillery Controls (Computer Board)"
board_name = "Bluespace Artillery Controls"
build_path = /obj/machinery/computer/bsa_control
origin_tech = "engineering=2;combat=2;bluespace=2"
+1 -1
View File
@@ -121,7 +121,7 @@ GLOBAL_LIST_INIT(non_simple_animals, typecacheof(list(/mob/living/carbon/human/m
/obj/item/circuitboard/machine/dna_vault
name = "DNA Vault (Machine Board)"
board_name = "DNA Vault"
build_path = /obj/machinery/dna_vault
origin_tech = "engineering=2;combat=2;bluespace=2" //No freebies!
req_components = list(
+1 -1
View File
@@ -35,7 +35,7 @@
return coverage.len
/obj/item/circuitboard/computer/sat_control
name = "Satellite Network Control (Computer Board)"
board_name = "Satellite Network Control"
build_path = /obj/machinery/computer/sat_control
origin_tech = "engineering=3"
@@ -0,0 +1,73 @@
/// Stores an instance of [/datum/ui_module/ghost_hud_panel] so that ghosts can use this to open their HUD panel.
GLOBAL_DATUM_INIT(ghost_hud_panel, /datum/ui_module/ghost_hud_panel, new)
/**
* # Ghost HUD panel
*
* Allows ghosts to view a TGUI window which contains toggles for all HUD types available to them.
*/
/datum/ui_module/ghost_hud_panel
name = "Ghost HUD Panel"
/// Associative list to get the appropriate hud type based on the string passed from TGUI.
var/list/hud_type_lookup = list(
"medical" = DATA_HUD_MEDICAL_ADVANCED,
"security" = DATA_HUD_SECURITY_ADVANCED,
"diagnostic" = DATA_HUD_DIAGNOSTIC
)
/datum/ui_module/ghost_hud_panel/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)
if(!ui)
ui = new(user, src, ui_key, "GhostHudPanel", name, 250, 171, master_ui, state)
ui.set_autoupdate(FALSE)
ui.open()
/datum/ui_module/ghost_hud_panel/ui_data(mob/dead/observer/ghost)
var/list/data = list()
for(var/hud in hud_type_lookup)
data[hud] = (hud_type_lookup[hud] in ghost.data_hud_seen)
data["ahud"] = ghost.antagHUD
return data
/datum/ui_module/ghost_hud_panel/ui_act(action, list/params)
if(..())
return
var/mob/dead/observer/ghost = usr
. = TRUE
switch(action)
if("hud_on")
var/hud_type = hud_type_lookup[params["hud_type"]]
ghost.show_me_the_hud(hud_type)
if("hud_off")
var/hud_type = hud_type_lookup[params["hud_type"]]
ghost.remove_the_hud(hud_type)
if("ahud_on")
if(!config.antag_hud_allowed && !ghost.client.holder)
to_chat(ghost, "<span class='warning'>Admins have disabled this for this round.</span>")
return FALSE
if(jobban_isbanned(ghost, "AntagHUD"))
to_chat(ghost, "<span class='danger'>You have been banned from using this feature.</span>")
return FALSE
// Check if this is the first time they're turning on Antag HUD.
if(!check_rights(R_ADMIN | R_MOD, FALSE) && !ghost.has_enabled_antagHUD && config.antag_hud_restricted)
var/response = alert(ghost, "If you turn this on, you will not be able to take any part in the round.", "Are you sure you want to enable antag HUD?", "Yes", "No")
if(response == "No")
return FALSE
ghost.has_enabled_antagHUD = TRUE
ghost.can_reenter_corpse = FALSE
GLOB.respawnable_list -= ghost
ghost.antagHUD = TRUE
for(var/datum/atom_hud/antag/H in GLOB.huds)
H.add_hud_to(ghost)
if("ahud_off")
ghost.antagHUD = FALSE
for(var/datum/atom_hud/antag/H in GLOB.huds)
H.add_hud_to(ghost)