Continual updates until merged

This commit is contained in:
Poojawa
2018-09-17 04:55:03 -05:00
parent 99e57fb221
commit bc0d14c193
53 changed files with 358 additions and 200 deletions
+5 -1
View File
@@ -74,6 +74,9 @@
var/turf/T = loc
T.has_opaque_atom = TRUE // No need to recalculate it in this case, it's guaranteed to be on afterwards anyways.
if (canSmoothWith)
canSmoothWith = typelist("canSmoothWith", canSmoothWith)
ComponentInitialize()
return INITIALIZE_HINT_NORMAL
@@ -694,9 +697,10 @@ Proc for attack log creation, because really why not
/atom/movable/proc/get_filter(name)
if(filter_data && filter_data[name])
return filters[filter_data.Find(name)]
/atom/movable/proc/remove_filter(name)
if(filter_data[name])
filter_data -= name
update_filters()
return TRUE
+2 -1
View File
@@ -201,6 +201,7 @@
else
for(var/i=1, i<=multiplier, i++)
var/obj/item/new_item = new being_built.build_path(A)
new_item.materials = new_item.materials.Copy()
for(var/mat in materials_used)
new_item.materials[mat] = materials_used[mat] / multiplier
new_item.autolathe_crafted(src)
@@ -379,4 +380,4 @@
//Called when the object is constructed by an autolathe
//Has a reference to the autolathe so you can do !!FUN!! things with hacked lathes
/obj/item/proc/autolathe_crafted(obj/machinery/autolathe/A)
return
return
+30 -13
View File
@@ -111,22 +111,39 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
return FALSE
if(!istype(linked_techweb))
say("Warning: No linked research system!")
return
var/adjusted = orig_light - 10
if(adjusted <= 0)
return
var/point_gain = 0
/*****The Point Calculator*****/
if(orig_light < 10)
say("Explosion not large enough for research calculations.")
return
var/point_gain = techweb_scale_bomb(adjusted) - techweb_scale_bomb(linked_techweb.max_bomb_value)
if(point_gain <= 0)
say("Explosion not large enough for research calculations.")
else if(orig_light < 4500)
point_gain = (83300 * orig_light) / (orig_light + 3000)
else
point_gain = TECHWEB_BOMB_POINTCAP
/*****The Point Capper*****/
if(point_gain > linked_techweb.largest_bomb_value)
if(point_gain <= TECHWEB_BOMB_POINTCAP || linked_techweb.largest_bomb_value < TECHWEB_BOMB_POINTCAP)
var/old_tech_largest_bomb_value = linked_techweb.largest_bomb_value //held so we can pull old before we do math
linked_techweb.largest_bomb_value = point_gain
point_gain -= old_tech_largest_bomb_value
point_gain = min(point_gain,TECHWEB_BOMB_POINTCAP)
else
linked_techweb.largest_bomb_value = TECHWEB_BOMB_POINTCAP
point_gain = 1000
linked_techweb.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, point_gain)
say("Gained [point_gain] points from explosion dataset.")
else //you've made smaller bombs
say("Data already captured. Aborting.")
return
linked_techweb.max_bomb_value = adjusted
linked_techweb.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, point_gain)
say("Gained [point_gain] points from explosion dataset.")
/obj/machinery/doppler_array/research/science/Initialize()
. = ..()
linked_techweb = SSresearch.science_tech
/proc/techweb_scale_bomb(lightradius)
return (lightradius ** 0.5) * 3000
linked_techweb = SSresearch.science_tech
+1 -1
View File
@@ -86,7 +86,7 @@
if(!active)
return
if(surplus() > 1500)
if(surplus() >= 1500)
add_load(1500)
if(cooldown <= world.time)
cooldown = world.time + 80
+6 -2
View File
@@ -110,8 +110,12 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
var/list/juice_results //A reagent list containing blah blah... but when JUICED in a grinder!
/obj/item/Initialize()
if (!materials)
materials = list()
materials = typelist("materials", materials)
if (attack_verb)
attack_verb = typelist("attack_verb", attack_verb)
. = ..()
for(var/path in actions_types)
new path(src)
+4 -2
View File
@@ -122,8 +122,8 @@
// found a powernet, so drain up to max power from it
var/drained = min ( drain_rate, PN.avail )
PN.load += drained
var/drained = min ( drain_rate, attached.newavail() )
attached.add_delayedload(drained)
power_drained += drained
// if tried to drain more than available on powernet
@@ -137,6 +137,8 @@
power_drained += 50
if(A.charging == 2) // If the cell was full
A.charging = 1 // It's no longer full
if(drained >= drain_rate)
break
if(power_drained > max_power * 0.98)
if (!admins_warned)
+2 -2
View File
@@ -270,8 +270,8 @@
var/obj/structure/cable/C = T.get_cable_node()
if(C)
playsound(src, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5)
tesla_zap(src, 3, C.powernet.avail * 0.01, TESLA_MOB_DAMAGE | TESLA_OBJ_DAMAGE | TESLA_MOB_STUN | TESLA_ALLOW_DUPLICATES) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
C.powernet.load += C.powernet.avail * 0.0375 // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
tesla_zap(src, 3, C.newavail() * 0.01, TESLA_MOB_DAMAGE | TESLA_OBJ_DAMAGE | TESLA_MOB_STUN | TESLA_ALLOW_DUPLICATES) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
return ..()
/obj/structure/grille/get_dumping_location(datum/component/storage/source,mob/user)
+32 -44
View File
@@ -18,7 +18,6 @@
var/glass_type = /obj/item/stack/sheet/glass
var/glass_amount = 1
var/mutable_appearance/crack_overlay
var/list/debris = list()
can_be_unanchored = TRUE
resistance_flags = ACID_PROOF
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
@@ -27,7 +26,6 @@
var/breaksound = "shatter"
var/hitsound = 'sound/effects/Glasshit.ogg'
var/rad_insulation = RAD_VERY_LIGHT_INSULATION
var/spawn_cleanable_shards = TRUE
/obj/structure/window/examine(mob/user)
..()
@@ -56,22 +54,8 @@
ini_dir = dir
air_update_turf(1)
// Precreate our own debris
var/shards = 1
if(fulltile)
shards++
setDir()
var/rods = 0
if(reinf)
rods++
if(fulltile)
rods++
for(var/i in 1 to shards)
debris += new /obj/item/shard(src)
if(rods)
debris += new /obj/item/stack/rods(src, rods)
//windows only block while reinforced and fulltile, so we'll use the proc
real_explosion_block = explosion_block
@@ -98,8 +82,6 @@
/obj/structure/window/narsie_act()
add_atom_colour(NARSIE_WINDOW_COLOUR, FIXED_COLOUR_PRIORITY)
for(var/obj/item/shard/shard in debris)
shard.add_atom_colour(NARSIE_WINDOW_COLOUR, FIXED_COLOUR_PRIORITY)
/obj/structure/window/ratvar_act()
if(!fulltile)
@@ -288,16 +270,17 @@
if(!disassembled)
playsound(src, breaksound, 70, 1)
if(!(flags_1 & NODECONSTRUCT_1))
if(spawn_cleanable_shards)
new /obj/effect/decal/cleanable/glass(get_turf(src))
for(var/i in debris)
var/obj/item/I = i
I.forceMove(drop_location())
transfer_fingerprints_to(I)
debris -= I
for(var/obj/item/shard/debris in spawnDebris(drop_location()))
transfer_fingerprints_to(debris) // transfer fingerprints to shards only
qdel(src)
update_nearby_icons()
/obj/structure/window/proc/spawnDebris(location)
. = list()
. += new /obj/item/shard(location)
. += new /obj/effect/decal/cleanable/glass(location)
if (reinf)
. += new /obj/item/stack/rods(location, (fulltile ? 2 : 1))
/obj/structure/window/proc/can_be_rotated(mob/user,rotation_type)
if(anchored)
@@ -425,7 +408,6 @@
explosion_block = 1
glass_type = /obj/item/stack/sheet/plasmaglass
rad_insulation = RAD_NO_INSULATION
spawn_cleanable_shards = FALSE
/obj/structure/window/plasma/spawner/east
dir = EAST
@@ -521,7 +503,6 @@
fulltile = TRUE
flags_1 = PREVENT_CLICK_UNDER_1
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/window/fulltile, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/plasma/fulltile, /obj/structure/window/plasma/reinforced/fulltile)
level = 3
glass_amount = 2
@@ -616,18 +597,15 @@
var/made_glow = FALSE
/obj/structure/window/reinforced/clockwork/Initialize(mapload, direct)
if(fulltile)
made_glow = TRUE
. = ..()
QDEL_LIST(debris)
var/amount_of_gears = 2
if(fulltile)
new /obj/effect/temp_visual/ratvar/window(get_turf(src))
amount_of_gears = 4
for(var/i in 1 to amount_of_gears)
debris += new /obj/item/clockwork/alloy_shards/medium/gear_bit()
change_construction_value(fulltile ? 2 : 1)
/obj/structure/window/reinforced/clockwork/spawnDebris(location)
. = list()
var/gearcount = fulltile ? 4 : 2
for(var/i in 1 to gearcount)
. += new /obj/item/clockwork/alloy_shards/medium/gear_bit(location)
/obj/structure/window/reinforced/clockwork/setDir(direct)
if(!made_glow)
var/obj/effect/E = new /obj/effect/temp_visual/ratvar/window/single(get_turf(src))
@@ -646,7 +624,7 @@
/obj/structure/window/reinforced/clockwork/narsie_act()
take_damage(rand(25, 75), BRUTE)
if(src)
if(!QDELETED(src))
var/previouscolor = color
color = "#960000"
animate(src, color = previouscolor, time = 8)
@@ -666,6 +644,17 @@
level = 3
glass_amount = 2
/obj/structure/window/reinforced/clockwork/spawnDebris(location)
. = list()
for(var/i in 1 to 4)
. += new /obj/item/clockwork/alloy_shards/medium/gear_bit(location)
/obj/structure/window/reinforced/clockwork/Initialize(mapload, direct)
made_glow = TRUE
new /obj/effect/temp_visual/ratvar/window(get_turf(src))
return ..()
/obj/structure/window/reinforced/clockwork/fulltile/unanchored
anchored = FALSE
@@ -687,7 +676,6 @@
decon_speed = 10
CanAtmosPass = ATMOS_PASS_YES
resistance_flags = FLAMMABLE
spawn_cleanable_shards = FALSE
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
breaksound = 'sound/items/poster_ripped.ogg'
hitsound = 'sound/weapons/slashmiss.ogg'
@@ -696,13 +684,13 @@
/obj/structure/window/paperframe/Initialize()
. = ..()
QDEL_LIST(debris)
var/papers = rand(1,4)
debris += new /obj/item/stack/sheet/mineral/wood()
for(var/i in 1 to papers)
debris += new /obj/item/paper/natural()
update_icon()
/obj/structure/window/paperframe/spawnDebris(location)
. = list(new /obj/item/stack/sheet/mineral/wood(location))
for (var/i in 1 to rand(1,4))
. += new /obj/item/paper/natural(location)
/obj/structure/window/paperframe/attack_hand(mob/user)
. = ..()
if(.)
@@ -747,4 +735,4 @@
update_icon()
return
..()
update_icon()
update_icon()
+2 -4
View File
@@ -22,10 +22,8 @@
tiled_dirt = TRUE
/turf/open/floor/Initialize(mapload)
if (!broken_states)
broken_states = list("damaged1", "damaged2", "damaged3", "damaged4", "damaged5")
if (!burnt_states)
burnt_states = list()
broken_states = typelist("broken_states", broken_states)
burnt_states = typelist("burnt_states", burnt_states)
if(!broken && broken_states && (icon_state in broken_states))
broken = TRUE
if(!burnt && burnt_states && (icon_state in burnt_states))
@@ -20,8 +20,7 @@
if(!broken_states)
broken_states = list("[initial(icon_state)]_dam")
. = ..()
if (!icons)
icons = list()
icons = typelist("icons", icons)
/turf/open/floor/mineral/update_icon()
+7 -7
View File
@@ -131,17 +131,17 @@
T.ChangeTurf(type)
/turf/closed/mineral/random
var/mineralSpawnChanceList
var/list/mineralSpawnChanceList = list(/turf/closed/mineral/uranium = 5, /turf/closed/mineral/diamond = 1, /turf/closed/mineral/gold = 10,
/turf/closed/mineral/silver = 12, /turf/closed/mineral/plasma = 20, /turf/closed/mineral/iron = 40, /turf/closed/mineral/titanium = 11,
/turf/closed/mineral/gibtonite = 4, /turf/open/floor/plating/asteroid/airless/cave = 2, /turf/closed/mineral/bscrystal = 1)
//Currently, Adamantine won't spawn as it has no uses. -Durandan
var/mineralChance = 13
var/display_icon_state = "rock"
/turf/closed/mineral/random/Initialize()
if (!mineralSpawnChanceList)
mineralSpawnChanceList = list(
/turf/closed/mineral/uranium = 5, /turf/closed/mineral/diamond = 1, /turf/closed/mineral/gold = 10,
/turf/closed/mineral/silver = 12, /turf/closed/mineral/plasma = 20, /turf/closed/mineral/iron = 40, /turf/closed/mineral/titanium = 11,
/turf/closed/mineral/gibtonite = 4, /turf/open/floor/plating/asteroid/airless/cave = 2, /turf/closed/mineral/bscrystal = 1)
mineralSpawnChanceList = typelist("mineralSpawnChanceList", mineralSpawnChanceList)
if (display_icon_state)
icon_state = display_icon_state
. = ..()
@@ -522,4 +522,4 @@
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = 1
defer_change = 1
+7 -2
View File
@@ -10,7 +10,7 @@ GLOBAL_VAR(restart_counter)
SetupExternalRSC()
GLOB.config_error_log = GLOB.world_manifest_log = GLOB.world_pda_log = GLOB.world_job_debug_log = GLOB.sql_error_log = GLOB.world_href_log = GLOB.world_runtime_log = GLOB.world_attack_log = GLOB.world_game_log = "data/logs/config_error.log" //temporary file used to record errors with loading config, moved to log directory once logging is set bl
GLOB.config_error_log = GLOB.world_manifest_log = GLOB.world_pda_log = GLOB.world_job_debug_log = GLOB.sql_error_log = GLOB.world_href_log = GLOB.world_runtime_log = GLOB.world_attack_log = GLOB.world_game_log = "data/logs/config_error.[GUID()].log" //temporary file used to record errors with loading config, moved to log directory once logging is set bl
make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once)
@@ -48,7 +48,7 @@ GLOBAL_VAR(restart_counter)
cit_initialize()
Master.Initialize(10, FALSE)
Master.Initialize(10, FALSE, TRUE)
if(TEST_RUN_PARAMETER in params)
HandleTestRun()
@@ -133,6 +133,11 @@ GLOBAL_VAR(restart_counter)
if(GLOB.round_id)
log_game("Round ID: [GLOB.round_id]")
// This was printed early in startup to the world log and config_error.log,
// but those are both private, so let's put the commit info in the runtime
// log which is ultimately public.
log_runtime(GLOB.revdata.get_log_message())
/world/Topic(T, addr, master, key)
TGS_TOPIC //redirect to server tools if necessary