mirror of
https://github.com/Yawn-Wider/YWPolarisVore.git
synced 2026-08-24 21:47:21 +01:00
Merge branch 'master' of https://github.com/VOREStation/Polaris into sync-09272018
# Conflicts: # code/__defines/holomap.dm # code/__defines/mobs.dm # code/_helpers/icons.dm # code/_helpers/unsorted.dm # code/_onclick/hud/hud.dm # code/_onclick/item_attack.dm # code/controllers/Processes/supply.dm # code/controllers/subsystems/planets.dm # code/datums/supplypacks/munitions.dm # code/datums/supplypacks/science.dm # code/datums/supplypacks/security.dm # code/datums/supplypacks/supply.dm # code/game/area/Space Station 13 areas.dm # code/game/atoms_movable.dm # code/game/machinery/autolathe.dm # code/game/machinery/doors/door.dm # code/game/machinery/jukebox.dm # code/game/machinery/recharger.dm # code/game/machinery/vending.dm # code/game/mecha/equipment/tools/medical_tools.dm # code/game/mecha/equipment/weapons/weapons.dm # code/game/objects/items/devices/PDA/PDA.dm # code/game/objects/items/devices/megaphone.dm # code/game/objects/items/poi_items.dm # code/game/objects/items/weapons/implants/implantlanguage.dm # code/game/objects/items/weapons/storage/firstaid.dm # code/game/objects/items/weapons/tools/weldingtool.dm # code/game/objects/structures/flora/trees.dm # code/game/objects/structures/plasticflaps.dm # code/game/supplyshuttle.dm # code/game/turfs/simulated/wall_attacks.dm # code/modules/admin/admin_verbs.dm # code/modules/assembly/infrared.dm # code/modules/client/client procs.dm # code/modules/client/preference_setup/loadout/loadout_utility.dm # code/modules/client/preferences.dm # code/modules/clothing/suits/miscellaneous.dm # code/modules/holomap/holomap_datum.dm # code/modules/holomap/station_holomap.dm # code/modules/integrated_electronics/core/printer.dm # code/modules/mining/machine_processing.dm # code/modules/mob/living/carbon/human/human_defense.dm # code/modules/mob/living/carbon/human/species/virtual_reality/avatar.dm # code/modules/mob/living/death.dm # code/modules/mob/living/silicon/ai/ai.dm # code/modules/mob/living/silicon/pai/pai.dm # code/modules/mob/living/silicon/robot/robot.dm # code/modules/mob/living/simple_animal/animals/parrot.dm # code/modules/mob/mob_movement.dm # code/modules/organs/organ_external.dm # code/modules/organs/organ_icon.dm # code/modules/organs/subtypes/standard.dm # code/modules/planet/weather.dm # code/modules/power/cable.dm # code/modules/power/fusion/core/core_control.dm # code/modules/power/fusion/fuel_assembly/fuel_control.dm # code/modules/power/fusion/gyrotron/gyrotron_control.dm # code/modules/projectiles/gun.dm # code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm # config/names/first_name_skrell.txt # config/names/last_name_skrell.txt # icons/mob/head.dmi # icons/mob/robots.dmi # icons/mob/species/tajaran/helmet.dmi # icons/obj/ammo.dmi # icons/obj/gun.dmi # icons/obj/mining.dmi # icons/obj/projectiles.dmi # icons/obj/rig_modules.dmi # icons/obj/surgery.dmi # icons/turf/walls.dmi # maps/southern_cross/southern_cross-1.dmm # maps/southern_cross/southern_cross-3.dmm # maps/southern_cross/southern_cross-6.dmm # maps/southern_cross/southern_cross-8.dmm # maps/submaps/surface_submaps/mountains/backup/IceCave1.dmm # maps/submaps/surface_submaps/mountains/backup/IceCave1A.dmm # maps/submaps/surface_submaps/mountains/backup/IceCave1B.dmm # maps/submaps/surface_submaps/mountains/backup/IceCave1C.dmm # maps/submaps/surface_submaps/mountains/crashedcontainmentshuttle.dmm # maps/submaps/surface_submaps/mountains/deadspy.dmm # maps/submaps/surface_submaps/mountains/mountains_areas.dm # maps/submaps/surface_submaps/plains/Thiefc.dmm # maps/~map_system/maps.dm # vorestation.dme
This commit is contained in:
@@ -136,7 +136,8 @@ var/list/admin_verbs_fun = list(
|
||||
/datum/admins/proc/call_supply_drop,
|
||||
/datum/admins/proc/call_drop_pod,
|
||||
/client/proc/smite_vr, //VOREStation Add,
|
||||
/client/proc/smite
|
||||
/client/proc/smite,
|
||||
/client/proc/admin_lightning_strike
|
||||
)
|
||||
|
||||
var/list/admin_verbs_spawn = list(
|
||||
|
||||
@@ -641,6 +641,7 @@
|
||||
var/datum/weather/new_weather = input(usr, "What weather do you want to change to?", "Change Weather") as null|anything in planet.weather_holder.allowed_weather_types
|
||||
if(new_weather)
|
||||
planet.weather_holder.change_weather(new_weather)
|
||||
planet.weather_holder.rebuild_forecast()
|
||||
var/log = "[key_name(src)] changed [planet.name]'s weather to [new_weather]."
|
||||
message_admins(log)
|
||||
log_admin(log)
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
/client/proc/admin_lightning_strike()
|
||||
set name = "Lightning Strike"
|
||||
set desc = "Causes lightning to strike on your tile. This will hurt things on or nearby it severely."
|
||||
set category = "Fun"
|
||||
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
var/result = alert(src, "Really strike your tile with lightning?", "Confirm Badmin" , "No", "Yes (Cosmetic)", "Yes (Real)")
|
||||
|
||||
if(result == "No")
|
||||
return
|
||||
var/fake_lightning = result == "Yes (Cosmetic)"
|
||||
|
||||
lightning_strike(get_turf(usr), fake_lightning)
|
||||
log_and_message_admins("[key_name(src)] has caused [fake_lightning ? "cosmetic":"harmful"] lightning to strike at their position ([src.mob.x], [src.mob.y], [src.mob.z]). \
|
||||
(<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.mob.x];Y=[src.mob.y];Z=[src.mob.z]'>JMP</a>)")
|
||||
|
||||
#define LIGHTNING_REDIRECT_RANGE 28 // How far in tiles certain things draw lightning from.
|
||||
#define LIGHTNING_ZAP_RANGE 3 // How far the tesla effect zaps, as well as the bad effects from a direct strike.
|
||||
#define LIGHTNING_POWER 20000 // How much 'zap' is in a strike, used for tesla_zap().
|
||||
|
||||
// The real lightning proc.
|
||||
// This is global until I can figure out a better place for it.
|
||||
// T is the turf that is being struck. If cosmetic is true, the lightning won't actually hurt anything.
|
||||
/proc/lightning_strike(turf/T, cosmetic = FALSE)
|
||||
// First, visuals.
|
||||
|
||||
// Do a lightning flash for the whole planet, if the turf belongs to a planet.
|
||||
var/datum/planet/P = null
|
||||
P = SSplanets.z_to_planet[T.z]
|
||||
if(P)
|
||||
var/datum/weather_holder/holder = P.weather_holder
|
||||
flick("lightning_flash", holder.special_visuals)
|
||||
|
||||
// Before we do the other visuals, we need to see if something is going to hijack our intended target.
|
||||
var/obj/machinery/power/grounding_rod/ground = null // Most of the bad effects of lightning will get negated if a grounding rod is nearby.
|
||||
var/obj/machinery/power/tesla_coil/coil = null // However a tesla coil has higher priority and the strike will bounce.
|
||||
|
||||
for(var/obj/machinery/power/thing in range(LIGHTNING_REDIRECT_RANGE, T))
|
||||
if(istype(thing, /obj/machinery/power/tesla_coil))
|
||||
var/turf/simulated/coil_turf = get_turf(thing)
|
||||
if(istype(coil_turf) && thing.anchored && coil_turf.outdoors)
|
||||
coil = thing
|
||||
break
|
||||
|
||||
if(istype(thing, /obj/machinery/power/grounding_rod))
|
||||
var/turf/simulated/rod_turf = get_turf(thing)
|
||||
if(istype(rod_turf) && thing.anchored && rod_turf.outdoors)
|
||||
ground = thing
|
||||
|
||||
if(coil) // Coil gets highest priority.
|
||||
T = coil.loc
|
||||
else if(ground)
|
||||
T = ground.loc
|
||||
|
||||
// Now make the lightning strike sprite. It will fade and delete itself in a second.
|
||||
new /obj/effect/temporary_effect/lightning_strike(T)
|
||||
|
||||
// For those close up.
|
||||
playsound(T, 'sound/effects/lightningbolt.ogg', 100, 1)
|
||||
|
||||
// And for those far away. If the strike happens on a planet, everyone on the planet will hear it.
|
||||
// Otherwise only those on the current z-level will hear it.
|
||||
var/sound = get_sfx("thunder")
|
||||
for(var/mob/M in player_list)
|
||||
if((P && M.z in P.expected_z_levels) || M.z == T.z)
|
||||
M.playsound_local(get_turf(M), soundin = sound, vol = 70, vary = FALSE, is_global = TRUE)
|
||||
|
||||
if(cosmetic) // Everything beyond here involves potentially damaging things. If we don't want to do that, stop now.
|
||||
return
|
||||
|
||||
if(ground) // All is well.
|
||||
ground.tesla_act(LIGHTNING_POWER, FALSE)
|
||||
return
|
||||
|
||||
else if(coil) // Otherwise lets bounce off the tesla coil.
|
||||
coil.tesla_act(LIGHTNING_POWER, TRUE)
|
||||
|
||||
else // Striking the turf directly.
|
||||
tesla_zap(T, zap_range = LIGHTNING_ZAP_RANGE, power = LIGHTNING_POWER, explosive = FALSE, stun_mobs = TRUE)
|
||||
|
||||
// Some extra effects.
|
||||
// Some apply to those within zap range, others if they were a bit farther away.
|
||||
for(var/mob/living/L in view(5, T))
|
||||
if(get_dist(L, T) <= LIGHTNING_ZAP_RANGE) // They probably got zapped.
|
||||
// The actual damage/electrocution is handled by tesla_zap().
|
||||
L.Paralyse(5)
|
||||
L.stuttering += 20
|
||||
L.make_jittery(20)
|
||||
L.emp_act(1)
|
||||
to_chat(L, span("critical", "You've been struck by lightning!"))
|
||||
|
||||
// If a non-player simplemob was struck, inflict huge damage.
|
||||
// If the damage is fatal, the SA is turned to ash.
|
||||
if(istype(L, /mob/living/simple_animal) && !L.key)
|
||||
var/mob/living/simple_animal/SA = L
|
||||
SA.adjustFireLoss(200)
|
||||
SA.updatehealth()
|
||||
if(SA.health <= 0) // Might be best to check/give simple_mobs siemens when this gets ported to new mobs.
|
||||
SA.visible_message(span("critical", "\The [SA] disintegrates into ash!"))
|
||||
SA.ash()
|
||||
continue // No point deafening something that wont exist.
|
||||
|
||||
// Deafen them.
|
||||
if(L.get_ear_protection() < 2)
|
||||
L.AdjustSleeping(-100)
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
C.ear_deaf += 10
|
||||
to_chat(L, span("danger", "Lightning struck nearby, and the thunderclap is deafening!"))
|
||||
|
||||
#undef GROUNDING_ROD_RANGE
|
||||
#undef LIGHTNING_ZAP_RANGE
|
||||
#undef LIGHTNING_POWER
|
||||
@@ -10,13 +10,17 @@
|
||||
return
|
||||
template = map_templates[map]
|
||||
|
||||
var/orientation = text2dir(input(usr, "Choose an orientation for this Map Template.", "Orientation") as null|anything in list("North", "South", "East", "West"))
|
||||
if(!orientation)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(mob)
|
||||
if(!T)
|
||||
return
|
||||
|
||||
var/list/preview = list()
|
||||
template.preload_size(template.mappath)
|
||||
for(var/S in template.get_affected_turfs(T,centered = TRUE))
|
||||
template.preload_size(template.mappath, orientation)
|
||||
for(var/S in template.get_affected_turfs(T,centered = TRUE, orientation=orientation))
|
||||
preview += image('icons/misc/debug_group.dmi',S ,"red")
|
||||
usr.client.images += preview
|
||||
if(alert(usr,"Confirm location.", "Template Confirm","No","Yes") == "Yes")
|
||||
@@ -25,7 +29,7 @@
|
||||
usr.client.images -= preview
|
||||
return
|
||||
|
||||
if(template.load(T, centered = TRUE))
|
||||
if(template.load(T, centered = TRUE, orientation=orientation))
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has placed a map template ([template.name]).</span>")
|
||||
else
|
||||
to_chat(usr, "Failed to place map")
|
||||
@@ -41,14 +45,18 @@
|
||||
if(!map)
|
||||
return
|
||||
template = map_templates[map]
|
||||
|
||||
if(template.width > world.maxx || template.height > world.maxy)
|
||||
|
||||
var/orientation = text2dir(input(usr, "Choose an orientation for this Map Template.", "Orientation") as null|anything in list("North", "South", "East", "West"))
|
||||
if(!orientation)
|
||||
return
|
||||
|
||||
if(((orientation & (NORTH|SOUTH) && template.width > world.maxx || template.height > world.maxy) || ((orientation & (EAST|WEST)) && template.width > world.maxy || template.height > world.maxx)))
|
||||
if(alert(usr,"This template is larger than the existing z-levels. It will EXPAND ALL Z-LEVELS to match the size of the template. This may cause chaos. Are you sure you want to do this?","DANGER!!!","Cancel","Yes") == "Cancel")
|
||||
to_chat(usr,"Template placement aborted.")
|
||||
return
|
||||
|
||||
|
||||
if(alert(usr,"Confirm map load.", "Template Confirm","No","Yes") == "Yes")
|
||||
if(template.load_new_z())
|
||||
if(template.load_new_z(orientation=orientation))
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has placed a map template ([template.name]) on Z level [world.maxz].</span>")
|
||||
else
|
||||
to_chat(usr, "Failed to place map")
|
||||
|
||||
@@ -84,3 +84,111 @@
|
||||
<option value='?_src_=vars;explode=\ref[src]'>Trigger explosion</option>
|
||||
<option value='?_src_=vars;emp=\ref[src]'>Trigger EM pulse</option>
|
||||
"}
|
||||
|
||||
/datum/proc/get_variables()
|
||||
. = vars - VV_hidden()
|
||||
if(!usr || !check_rights(R_ADMIN|R_DEBUG, FALSE))
|
||||
. -= VV_secluded()
|
||||
|
||||
/datum/proc/get_variable_value(varname)
|
||||
return vars[varname]
|
||||
|
||||
/datum/proc/set_variable_value(varname, value)
|
||||
vars[varname] = value
|
||||
|
||||
/datum/proc/get_initial_variable_value(varname)
|
||||
return initial(vars[varname])
|
||||
|
||||
/datum/proc/make_view_variables_variable_entry(var/varname, var/value, var/hide_watch = 0)
|
||||
return {"
|
||||
(<a href='?_src_=vars;datumedit=\ref[src];varnameedit=[varname]'>E</a>)
|
||||
(<a href='?_src_=vars;datumchange=\ref[src];varnamechange=[varname]'>C</a>)
|
||||
(<a href='?_src_=vars;datummass=\ref[src];varnamemass=[varname]'>M</a>)
|
||||
[hide_watch ? "" : "(<a href='?_src_=vars;datumwatch=\ref[src];varnamewatch=[varname]'>W</a>)"]
|
||||
"}
|
||||
|
||||
// No mass editing of clients
|
||||
/client/make_view_variables_variable_entry(var/varname, var/value, var/hide_watch = 0)
|
||||
return {"
|
||||
(<a href='?_src_=vars;datumedit=\ref[src];varnameedit=[varname]'>E</a>)
|
||||
(<a href='?_src_=vars;datumchange=\ref[src];varnamechange=[varname]'>C</a>)
|
||||
[hide_watch ? "" : "(<a href='?_src_=vars;datumwatch=\ref[src];varnamewatch=[varname]'>W</a>)"]
|
||||
"}
|
||||
|
||||
// These methods are all procs and don't use stored lists to avoid VV exploits
|
||||
|
||||
// The following vars cannot be viewed by anyone
|
||||
/datum/proc/VV_hidden()
|
||||
return list()
|
||||
|
||||
// The following vars can only be viewed by R_ADMIN|R_DEBUG
|
||||
/datum/proc/VV_secluded()
|
||||
return list()
|
||||
|
||||
/datum/configuration/VV_secluded()
|
||||
return vars
|
||||
|
||||
// The following vars cannot be edited by anyone
|
||||
/datum/proc/VV_static()
|
||||
return list("parent_type")
|
||||
|
||||
/atom/VV_static()
|
||||
return ..() + list("bound_x", "bound_y", "bound_height", "bound_width", "bounds", "step_x", "step_y", "step_size")
|
||||
|
||||
/client/VV_static()
|
||||
return ..() + list("holder", "prefs")
|
||||
|
||||
/datum/admins/VV_static()
|
||||
return vars
|
||||
|
||||
// The following vars require R_DEBUG to edit
|
||||
/datum/proc/VV_locked()
|
||||
return list("vars", "virus", "viruses", "cuffed")
|
||||
|
||||
/client/VV_locked()
|
||||
return list("vars", "mob")
|
||||
|
||||
/mob/VV_locked()
|
||||
return ..() + list("client")
|
||||
|
||||
// The following vars require R_FUN|R_DEBUG to edit
|
||||
/datum/proc/VV_icon_edit_lock()
|
||||
return list()
|
||||
|
||||
/atom/VV_icon_edit_lock()
|
||||
return ..() + list("icon", "icon_state", "overlays", "underlays")
|
||||
|
||||
// The following vars require R_SPAWN|R_DEBUG to edit
|
||||
/datum/proc/VV_ckey_edit()
|
||||
return list()
|
||||
|
||||
/mob/VV_ckey_edit()
|
||||
return list("key", "ckey")
|
||||
|
||||
/client/VV_ckey_edit()
|
||||
return list("key", "ckey")
|
||||
|
||||
/datum/proc/may_edit_var(var/user, var/var_to_edit)
|
||||
if(!user)
|
||||
return FALSE
|
||||
if(!(var_to_edit in vars))
|
||||
to_chat(user, "<span class='warning'>\The [src] does not have a var '[var_to_edit]'</span>")
|
||||
return FALSE
|
||||
if(var_to_edit in VV_static())
|
||||
return FALSE
|
||||
if((var_to_edit in VV_secluded()) && !check_rights(R_ADMIN|R_DEBUG, FALSE, C = user))
|
||||
return FALSE
|
||||
if((var_to_edit in VV_locked()) && !check_rights(R_DEBUG, C = user))
|
||||
return FALSE
|
||||
if((var_to_edit in VV_ckey_edit()) && !check_rights(R_SPAWN|R_DEBUG, C = user))
|
||||
return FALSE
|
||||
if((var_to_edit in VV_icon_edit_lock()) && !check_rights(R_FUN|R_DEBUG, C = user))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/proc/forbidden_varedit_object_types()
|
||||
return list(
|
||||
/datum/admins, //Admins editing their own admin-power object? Yup, sounds like a good idea.,
|
||||
/obj/machinery/blackbox_recorder, //Prevents people messing with feedback gathering,
|
||||
/datum/feedback_variable //Prevents people messing with feedback gathering
|
||||
)
|
||||
@@ -474,7 +474,7 @@
|
||||
usr << "This can only be done on mobs with clients"
|
||||
return
|
||||
|
||||
nanomanager.send_resources(H.client)
|
||||
GLOB.nanomanager.send_resources(H.client)
|
||||
|
||||
usr << "Resource files sent"
|
||||
H << "Your NanoUI Resource files have been refreshed"
|
||||
|
||||
Reference in New Issue
Block a user