Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into upstream-merge-27344
This commit is contained in:
@@ -139,6 +139,7 @@ GLOBAL_VAR_INIT(CURRENT_TICKLIMIT, TICK_LIMIT_RUNNING)
|
||||
if(FireHim)
|
||||
Master.subsystems += new BadBoy.type //NEW_SS_GLOBAL will remove the old one
|
||||
subsystems = Master.subsystems
|
||||
current_runlevel = Master.current_runlevel
|
||||
StartProcessing(10)
|
||||
else
|
||||
to_chat(world, "<span class='boldannounce'>The Master Controller is having some issues, we will need to re-initialize EVERYTHING</span>")
|
||||
|
||||
@@ -43,7 +43,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
loading_ruins = TRUE
|
||||
var/mining_type = config.minetype
|
||||
if (mining_type == "lavaland")
|
||||
seedRuins(list(5), global.config.lavaland_budget, /area/lavaland/surface/outdoors, lava_ruins_templates)
|
||||
seedRuins(list(5), global.config.lavaland_budget, /area/lavaland/surface/outdoors/unexplored, lava_ruins_templates)
|
||||
spawn_rivers()
|
||||
|
||||
// deep space ruins
|
||||
@@ -113,9 +113,9 @@ SUBSYSTEM_DEF(mapping)
|
||||
/datum/controller/subsystem/mapping/proc/loadWorld()
|
||||
//if any of these fail, something has gone horribly, HORRIBLY, wrong
|
||||
var/list/FailedZs = list()
|
||||
|
||||
|
||||
var/start_time = REALTIMEOFDAY
|
||||
|
||||
|
||||
INIT_ANNOUNCE("Loading [config.map_name]...")
|
||||
TryLoadZ(config.GetFullMapPath(), FailedZs, ZLEVEL_STATION)
|
||||
INIT_ANNOUNCE("Loaded station in [(REALTIMEOFDAY - start_time)/10]s!")
|
||||
|
||||
@@ -116,5 +116,11 @@
|
||||
name = "Lavaland Wastes"
|
||||
outdoors = 1
|
||||
|
||||
/area/lavaland/surface/outdoors/unexplored //monsters and ruins spawn here
|
||||
icon_state = "unexplored"
|
||||
|
||||
/area/lavaland/surface/outdoors/unexplored/danger //megafauna will also spawn here
|
||||
icon_state = "danger"
|
||||
|
||||
/area/lavaland/surface/outdoors/explored
|
||||
name = "Lavaland Labor Camp"
|
||||
@@ -142,25 +142,25 @@
|
||||
/obj/item/weapon/antag_spawner/nuke_ops/proc/check_usability(mob/user)
|
||||
if(used)
|
||||
to_chat(user, "<span class='warning'>[src] is out of power!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
if(!(user.mind in SSticker.mode.syndicates))
|
||||
to_chat(user, "<span class='danger'>AUTHENTICATION FAILURE. ACCESS DENIED.</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
if(user.z != ZLEVEL_CENTCOM)
|
||||
to_chat(user, "<span class='warning'>[src] is out of range! It can only be used at your base!</span>")
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/weapon/antag_spawner/nuke_ops/attack_self(mob/user)
|
||||
if(!(check_usability(user)))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You activate [src] and wait for confirmation.</span>")
|
||||
var/list/nuke_candidates = pollCandidatesForMob("Do you want to play as a syndicate [borg_to_spawn ? "[lowertext(borg_to_spawn)] cyborg":"operative"]?", ROLE_OPERATIVE, null, ROLE_OPERATIVE, 150, POLL_IGNORE_SYNDICATE, src)
|
||||
var/list/nuke_candidates = pollGhostCandidates("Do you want to play as a syndicate [borg_to_spawn ? "[lowertext(borg_to_spawn)] cyborg":"operative"]?", ROLE_OPERATIVE, null, ROLE_OPERATIVE, 150, POLL_IGNORE_SYNDICATE)
|
||||
if(nuke_candidates.len)
|
||||
if(!(check_usability(user)))
|
||||
return
|
||||
used = 1
|
||||
used = TRUE
|
||||
var/mob/dead/observer/theghost = pick(nuke_candidates)
|
||||
spawn_antag(theghost.client, get_turf(src), "syndieborg")
|
||||
do_sparks(4, TRUE, src)
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
if(is_blocked_turf(target, TRUE))
|
||||
to_chat(user, "<span class='warning'>The target rune is blocked. Attempting to teleport to it would be massively unwise.</span>")
|
||||
return ..(user, 0)
|
||||
user.visible_message("<span class='warning'>Dust flows from [user]'s hand, and [user.p_they()] disappear with a sharp crack!</span>", \
|
||||
user.visible_message("<span class='warning'>Dust flows from [user]'s hand, and [user.p_they()] disappear[user.p_s()] with a sharp crack!</span>", \
|
||||
"<span class='cultitalic'>You speak the words of the talisman and find yourself somewhere else!</span>", "<i>You hear a sharp crack.</i>")
|
||||
user.forceMove(target)
|
||||
target.visible_message("<span class='warning'>There is a boom of outrushing air as something appears above the rune!</span>", null, "<i>You hear a boom.</i>")
|
||||
|
||||
@@ -522,10 +522,10 @@
|
||||
var/projectile_damage_tick_ecost_coefficient = 2 //Lasers get half their damage chopped off, drains 50 power/tick. Note that fields are processed 5 times per second.
|
||||
var/projectile_speed_coefficient = 1.5 //Higher the coefficient slower the projectile.
|
||||
var/projectile_tick_speed_ecost = 15
|
||||
var/current_damage_dampening = 0
|
||||
var/list/obj/item/projectile/tracked
|
||||
var/image/projectile_effect
|
||||
var/field_radius = 3
|
||||
var/active = FALSE
|
||||
|
||||
/obj/item/borg/projectile_dampen/debug
|
||||
maxenergy = 50000
|
||||
@@ -538,13 +538,13 @@
|
||||
tracked = list()
|
||||
icon_state = "shield0"
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
host = loc
|
||||
|
||||
/obj/item/borg/projectile_dampen/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/borg/projectile_dampen/attack_self(mob/user)
|
||||
var/active = FALSE
|
||||
if(!istype(dampening_field))
|
||||
activate_field()
|
||||
active = TRUE
|
||||
@@ -552,17 +552,30 @@
|
||||
deactivate_field()
|
||||
active = FALSE
|
||||
to_chat(user, "<span class='boldnotice'>You [active? "activate":"deactivate"] the [src].</span>")
|
||||
|
||||
/obj/item/borg/projectile_dampen/update_icon()
|
||||
. = ..()
|
||||
icon_state = "[initial(icon_state)][active]"
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/activate_field()
|
||||
if(!istype(dampening_field))
|
||||
dampening_field = make_field(/datum/proximity_monitor/advanced/peaceborg_dampener, list("current_range" = field_radius, "host" = src, "projector" = src))
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/deactivate_field()
|
||||
QDEL_NULL(dampening_field)
|
||||
visible_message("<span class='warning'>The [src] shuts off!</span>")
|
||||
for(var/obj/item/projectile/P in tracked)
|
||||
restore_projectile(P)
|
||||
update_icon()
|
||||
|
||||
/obj/item/borg/projectile_dampen/dropped()
|
||||
. = ..()
|
||||
host = loc
|
||||
|
||||
/obj/item/borg/projectile_dampen/equipped()
|
||||
. = ..()
|
||||
host = loc
|
||||
|
||||
/obj/item/borg/projectile_dampen/process()
|
||||
process_recharge()
|
||||
@@ -576,10 +589,11 @@
|
||||
/obj/item/borg/projectile_dampen/proc/process_usage()
|
||||
var/usage = 0
|
||||
for(var/I in tracked)
|
||||
if(!tracked[I]) //No damage
|
||||
var/obj/item/projectile/P = I
|
||||
if(!P.stun && P.nodamage) //No damage
|
||||
continue
|
||||
usage += projectile_tick_speed_ecost
|
||||
usage += (current_damage_dampening * projectile_damage_tick_ecost_coefficient)
|
||||
usage += (tracked[I] * projectile_damage_tick_ecost_coefficient)
|
||||
energy = Clamp(energy - usage, 0, maxenergy)
|
||||
if(energy <= 0)
|
||||
deactivate_field()
|
||||
@@ -587,8 +601,11 @@
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/process_recharge()
|
||||
if(!istype(host))
|
||||
energy = Clamp(energy + energy_recharge, 0, maxenergy)
|
||||
return
|
||||
if(iscyborg(host.loc))
|
||||
host = host.loc
|
||||
else
|
||||
energy = Clamp(energy + energy_recharge, 0, maxenergy)
|
||||
return
|
||||
if((host.cell.charge >= (host.cell.maxcharge * cyborg_cell_critical_percentage)) && (energy < maxenergy))
|
||||
host.cell.use(energy_recharge*energy_recharge_cyborg_drain_coefficient)
|
||||
energy += energy_recharge
|
||||
@@ -598,7 +615,6 @@
|
||||
return
|
||||
if(track_projectile)
|
||||
tracked[P] = P.damage
|
||||
current_damage_dampening += P.damage
|
||||
P.damage *= projectile_damage_coefficient
|
||||
P.speed *= projectile_speed_coefficient
|
||||
P.add_overlay(projectile_effect)
|
||||
@@ -608,8 +624,6 @@
|
||||
P.damage *= (1/projectile_damage_coefficient)
|
||||
P.speed *= (1/projectile_speed_coefficient)
|
||||
P.cut_overlay(projectile_effect)
|
||||
current_damage_dampening -= P.damage
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
HUD/SIGHT things
|
||||
|
||||
@@ -207,9 +207,3 @@
|
||||
var/obj/item/clothing/suit/space/hardsuit/C = wear_suit
|
||||
J = C.jetpack
|
||||
return J
|
||||
|
||||
/mob/has_gravity(turf/T)
|
||||
var/obj/item/weapon/tank/jetpack/J = get_jetpack()
|
||||
if(J && J.on)
|
||||
return FALSE
|
||||
return ..()
|
||||
@@ -272,15 +272,18 @@
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave/proc/SpawnMonster(turf/T)
|
||||
if(prob(30))
|
||||
if(istype(loc, /area/mine/explored) || istype(loc, /area/lavaland/surface/outdoors/explored))
|
||||
if(istype(loc, /area/mine/explored) || !istype(loc, /area/lavaland/surface/outdoors/unexplored))
|
||||
return
|
||||
var/randumb = pickweight(mob_spawn_list)
|
||||
while(randumb == SPAWN_MEGAFAUNA)
|
||||
var/maybe_boss = pickweight(megafauna_spawn_list)
|
||||
if(megafauna_spawn_list[maybe_boss])
|
||||
randumb = maybe_boss
|
||||
if(ispath(maybe_boss, /mob/living/simple_animal/hostile/megafauna/bubblegum)) //there can be only one bubblegum, so don't waste spawns on it
|
||||
megafauna_spawn_list[maybe_boss] = 0
|
||||
if(istype(loc, /area/lavaland/surface/outdoors/unexplored/danger)) //this is danger. it's boss time.
|
||||
var/maybe_boss = pickweight(megafauna_spawn_list)
|
||||
if(megafauna_spawn_list[maybe_boss])
|
||||
randumb = maybe_boss
|
||||
if(ispath(maybe_boss, /mob/living/simple_animal/hostile/megafauna/bubblegum)) //there can be only one bubblegum, so don't waste spawns on it
|
||||
megafauna_spawn_list[maybe_boss] = 0
|
||||
else //this is not danger, don't spawn a boss, spawn something else
|
||||
randumb = pickweight(mob_spawn_list)
|
||||
|
||||
for(var/mob/living/simple_animal/hostile/H in urange(12,T)) //prevents mob clumps
|
||||
if((ispath(randumb, /mob/living/simple_animal/hostile/megafauna) || ismegafauna(H)) && get_dist(src, H) <= 7)
|
||||
|
||||
@@ -76,7 +76,6 @@
|
||||
/datum/gas_reaction/freon/react(datum/gas_mixture/air, turf/open/location)
|
||||
. = NO_REACTION
|
||||
if(location && location.freon_gas_act())
|
||||
air.gases["freon"][MOLES] -= MOLES_PLASMA_VISIBLE
|
||||
. = REACTING
|
||||
|
||||
//water vapor: puts out fires?
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/obj/item/clothing/under/syndicate/sniper
|
||||
name = "Tactical turtleneck suit"
|
||||
desc = "A double seamed tactical turtleneck disguised as a civillian grade silk suit. Intended for the most formal operator. The collar is really sharp"
|
||||
desc = "A double seamed tactical turtleneck disguised as a civilian grade silk suit. Intended for the most formal operator. The collar is really sharp"
|
||||
icon_state = "really_black_suit"
|
||||
item_state = "bl_suit"
|
||||
item_color = "black_suit"
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
var/process_edge_turfs = FALSE //Don't do this either unless it's absolutely necessary, you can just track what things are inside manually or on the initial setup.
|
||||
var/setup_edge_turfs = FALSE //Setup edge turfs/all field turfs. Set either or both to ON when you need it, it's defaulting to off unless you do to save CPU.
|
||||
var/setup_field_turfs = FALSE
|
||||
var/use_host_turf = FALSE //For fields from items carried on mobs to check turf instead of loc...
|
||||
|
||||
var/list/turf/field_turfs = list()
|
||||
var/list/turf/edge_turfs = list()
|
||||
@@ -90,8 +91,19 @@
|
||||
for(var/turf/T in field_turfs)
|
||||
cleanup_field_turf(T)
|
||||
|
||||
/datum/proximity_monitor/advanced/proc/check_movement()
|
||||
if(!use_host_turf)
|
||||
if(host.loc != last_host_loc)
|
||||
last_host_loc = host.loc
|
||||
return TRUE
|
||||
else
|
||||
if(get_turf(host) != last_host_loc)
|
||||
last_host_loc = get_turf(host)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/proximity_monitor/advanced/proc/recalculate_field(ignore_movement_check = FALSE) //Call every time the field moves (done automatically if you use update_center) or a setup specification is changed.
|
||||
if(!(ignore_movement_check || ((host.loc != last_host_loc) && (field_shape != FIELD_NO_SHAPE))))
|
||||
if(!(ignore_movement_check || check_movement()) && (field_shape != FIELD_NO_SHAPE))
|
||||
return
|
||||
update_new_turfs()
|
||||
var/list/turf/needs_setup = field_turfs_new.Copy()
|
||||
@@ -173,7 +185,6 @@
|
||||
/datum/proximity_monitor/advanced/proc/update_new_turfs()
|
||||
if(!istype(host))
|
||||
return FALSE
|
||||
last_host_loc = host.loc
|
||||
var/turf/center = get_turf(host)
|
||||
field_turfs_new = list()
|
||||
edge_turfs_new = list()
|
||||
|
||||
@@ -15,9 +15,11 @@
|
||||
var/static/image/southwest_corner = image('icons/effects/fields.dmi', icon_state = "projectile_dampen_southwest")
|
||||
var/static/image/northeast_corner = image('icons/effects/fields.dmi', icon_state = "projectile_dampen_northeast")
|
||||
var/static/image/southeast_corner = image('icons/effects/fields.dmi', icon_state = "projectile_dampen_southeast")
|
||||
var/static/image/generic_edge = image('icons/effects/fields.dmi', icon_state = "projectile_dampen_generic")
|
||||
var/obj/item/borg/projectile_dampen/projector = null
|
||||
var/list/obj/item/projectile/tracked
|
||||
var/list/obj/item/projectile/staging
|
||||
use_host_turf = TRUE
|
||||
|
||||
/datum/proximity_monitor/advanced/peaceborg_dampener/New()
|
||||
tracked = list()
|
||||
@@ -71,6 +73,8 @@
|
||||
return southeast_corner
|
||||
if(SOUTHWEST)
|
||||
return southwest_corner
|
||||
else
|
||||
return generic_edge
|
||||
|
||||
/datum/proximity_monitor/advanced/peaceborg_dampener/proc/capture_projectile(obj/item/projectile/P, track_projectile = TRUE)
|
||||
if(P in tracked)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
alpha = 0
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
flags = ABSTRACT|ON_BORDER
|
||||
mouse_opacity = 0
|
||||
var/datum/proximity_monitor/advanced/parent = null
|
||||
|
||||
/obj/effect/abstract/proximity_checker/advanced/Initialize(mapload, _monitor)
|
||||
|
||||
@@ -797,9 +797,6 @@
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/update_stamina()
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/update_stamina()
|
||||
if(staminaloss)
|
||||
var/total_health = (health - staminaloss)
|
||||
if(total_health <= HEALTH_THRESHOLD_CRIT && !stat)
|
||||
@@ -808,6 +805,9 @@
|
||||
setStaminaLoss(health - 2)
|
||||
update_health_hud()
|
||||
|
||||
/mob/living/carbon/alien/update_stamina()
|
||||
return
|
||||
|
||||
/mob/living/proc/owns_soul()
|
||||
if(mind)
|
||||
return mind.soulOwner == mind
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
var/info //What's actually written on the paper.
|
||||
var/info_links //A different version of the paper which includes html links at fields and EOF
|
||||
var/stamps //The (text for the) stamps on the paper.
|
||||
var/fields //Amount of user created fields
|
||||
var/fields = 0 //Amount of user created fields
|
||||
var/list/stamped
|
||||
var/rigged = 0
|
||||
var/spam_flag = 0
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/energy
|
||||
|
||||
/obj/item/ammo_casing/energy/chameleon
|
||||
projectile_type = /obj/item/projectile/energy/chameleon
|
||||
e_cost = 0
|
||||
var/list/projectile_vars = list()
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
damage_type = BURN
|
||||
flag = "energy"
|
||||
|
||||
/obj/item/projectile/energy/chameleon
|
||||
nodamage = TRUE
|
||||
|
||||
/obj/item/projectile/energy/electrode
|
||||
name = "electrode"
|
||||
|
||||
@@ -378,7 +378,7 @@
|
||||
if(N.w_uniform)
|
||||
M.visible_message(pick("<b>[M]</b>'s collar pops up without warning.</span>", "<b>[M]</b> flexes [M.p_their()] arms."))
|
||||
else
|
||||
M.visible_message("<b>[M]</b> [M.p_their()] their arms.")
|
||||
M.visible_message("<b>[M]</b> flexes [M.p_their()] arms.")
|
||||
if(prob(10))
|
||||
M.say(pick("Check these sweet biceps bro!", "Deal with it.", "CHUG! CHUG! CHUG! CHUG!", "Winning!", "NERDS!", "My name is John and I hate every single one of you."))
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user