Skip to content

Commit

Permalink
Fucking upstream god damned bullshit (#4355)
Browse files Browse the repository at this point in the history
* Adds a method to transfer all components from one datum to another

* Inlines compile_overlays

* Optimizes COMPILE_OVERLAYS

* Add missing '\'

* fixes reflectors dropping extra mats

* Selecting multiple choice polls with 1 choice now become a single option poll

* Update mecha_defense.dm (#31834)

* Fixes grinders (#31885)

* But you're still hungry

* Update reagentgrinder.dm

* Automatic changelog generation for PR #31885 [ci skip]

* Removes duplicate typecaches (#31883)

* Audits all typecache calls for performance gains

* Fix invalid var

* Makes cleanbots clean up remains (#31876)

* Makes cleanbots clean up remains

* Gooooooooo

* Acid_act

* fixes AIs being able to teleport the id card console inserted cards to their core (#32003)

* Update card.dm

* Update card.dm

* Fixes get_turf_pixel returning null when called on turfs (#32000)

* Removes mob references from camera motion tracking (#32002)

* Delicious Ron's Country Club Cameras

* requested changes

* requested changes 2: electric boogaloo

* Requested changes 3: back to perfection

* Automatic changelog generation for PR #32002 [ci skip]

* Fixes missing mag controllers on delta (#32006)

* Rebalances clockwork marauders

* Fixes teleporters not actually denying teleports from Centcom

* Atmos construction rework again (#31944)

* initial atmos construction commit ft todo list

* cleans up pipe/construction.dm

* compile

* rpd tgui

* revert rpd tgui because no icon support zzzzzz

* fixes RPD

also fixes the one RPD bug i caused the last time i touched pipe construction where you'd get null pipes if you switched from disposals to atmos pipes

* cleanup

* Use phpenv for the php build, instead of a PPA

* Late join antagonists will try to target late join players (#31560)

* Fixes shades hearing heartbeats

* Fixes changling golem exploit

* Blacklists holo injectors from surplus crates (#32001)

* Update uplink_item.dm

* Update uplink_item.dm

* Automatic changelog generation for PR #32001 [ci skip]

* Automatic changelog compile, [ci skip]

* Fixes xenobio sentience giving the wrong name (#32016)

* Automatic changelog generation for PR #32016 [ci skip]

* Moves opened firedoors underneath opened airlocks (#32018)

* Moves opened firedoors underneath opened airlocks

* Shutters

* Corrects disabled vent in delta toxins lab.

* Fixes heartbeat message spam

* Update crayons.dm (#32024)

* fixes pentetic acid dealing radiation damage instead of healing it (#32027)

* Update medicine_reagents.dm

* sorry i alughed so hard i hit a key

* adds logging to ripley gibs (#32032)

* maybe this works, and maybe it doesn't

* cyberfriend

* oh right

* Automatic changelog compile, [ci skip]

* FIXES THE NEW LATEJOIN RUNTIME PROPER (#32068)

* FIXES EVERYTHING IN ONE SIMPLE LINE

* Fix it properly

* Dullahans (#31855)

* Dullahans

* Vision toggle

* The worst part of the code right here

* No wings

* to_chat

* Hearing relay that works, vision toggle that works

* Fixes hair not appearing on severed heads

* Halloween event

* Moves dullahans to their own file

* Forgot to commit a file

* Fixes deafness and backpack issues

* Don't need to breath because you dont have a head

* Breaking the dullahan rules

* Encourage dullahans to lose their heads

* Cyberboss doing his job to head off any bad code trying to enter the repo

* Committing while compiling again

* Can't eat

* Halloween!

* qdeleted

* Get rid of the head var entirely, just track the easily deletable relay

* Moves the stuff out of process to destroy

* Automatic changelog generation for PR #31855 [ci skip]

* Transit space blocks explosions

* Automatic changelog compile, [ci skip]

* Revheads now always recieve a HUD when created

* Ratvar summoning now ends the round/triggers mass proselytize  (#31956)

* Slight changes to ratvar ending

* Tick check

* T

* Why Xhuis?

* Lots of fire

* That src made sense 10 minutes ago but no longer

* More commits than line changes

* Check Tick

* heart of darkness revives non-shadow as shadowpeople

* Automatic changelog generation for PR #31912 [ci skip]

* Footprints no longer contain stupid amounts of blood (#32056)

* Fixes supermatter tongs not updating icon if the sliver is dropped

* Automatic changelog generation for PR #32061 [ci skip]

* Automatic changelog generation for PR #32059 [ci skip]

* Shuttle navigation computers ignore the shuttle when placing a new location (#31722)

* Fixed the shuttle navigation computer allowing you to move stationary docking ports

* Made the shuttle navigation computer ignore the shuttle it controls when determining valid turfs

* Removed a redundant list

* Moved a var from stationary docking ports to mobile docking ports

* Removed a sanity check

* Automatic changelog generation for PR #31722 [ci skip]

* Mummies for halloween

* Automatic changelog compile, [ci skip]

* Fixes being able to stack stargazers on one tile (#32085)

* Automatic changelog generation for PR #32085 [ci skip]

* Fixes excessive overlay churn  (#32065)

* Fixes excessive overlay chern

Adding an overlay on every cross and uncross of every player (with how bloody the station gets this is called on just about every fucking movement, some times multiple times if there are multiple types of stains (oil, blood, alien, etc) is an excessive as fuck amount of chern in the overlay subsystem.

This is likely the cause of overlays being so high.

* I APOLOGIZE FOR NOTHING!

* Cogscarab shells/construct chassis on spawn menu (#32048)

* Automatic changelog generation for PR #32048 [ci skip]

* Greyscale cables (#31972)

* cable code is shit

* cleanup

* Automatic changelog generation for PR #31972 [ci skip]

* Fixes pipe runetime

* Fixes braindead aliums

* Fixes light source qdel issues.

* 1

* Automatic changelog generation for PR #31954 [ci skip]

* Adds ambience to the SM and portable generators (#31945)

* Adds aambience to the SM and portable generators

* lowered pitch of supermatter

* start and end fix

* Automatic changelog generation for PR #31945 [ci skip]

* Fixes a runtime on organ replacement

* --no-edit

* Makes staff of change randomly assign a borg module

* Automatic changelog generation for PR #32075 [ci skip]

* Makes luxurious emergency shuttle noteleport

* Automatic changelog generation for PR #32057 [ci skip]

* Fixes minor runtime

* Fixes defib ghost prompt (#32019)

* Fixes #32013

* proc instead.

* Automatic changelog generation for PR #32019 [ci skip]

* Removes outdated tips

* Fixes lightgeist spawning

* Automatic changelog generation for PR #32058 [ci skip]

* Allows components to qdel from Initialize

* Line by line profiling system

This allows you to profile shit in a line by line fashion, getting a neat little report about how long (in milliseconds) was spent on what line(s).

Only one can be running at a time. You just have to call PROFILE_START then call PROFILE_TICK between lines, and finally, use profile_show(mob/client) to show the profile results to a mob. Profiles are sorted by avg cost per run.

Example usage: tgstation/tgstation@ef876c6#diff-7664a9b9849fbd5b5d688654469b26d9R417

Example output: https://gist.github.com/MrStonedOne/06a275be398499db41da702dde7fc518

* makes thermite a component

* Check again after waiting

* Actual performance improvements for GetAllContents (#32029)

* Actual performance improvements for GetAllContents

* Shaving off literal tens of clock cycles

* Automatic changelog generation for PR #32039 [ci skip]

* Automatic changelog generation for PR #31991 [ci skip]

* Webhook processor no longer removes [tags] from titles (#32053)

* Webhook processor no longer removes [tags] from titles

This was shit

* Does the oranges

* Halloween Tweaks (#32087)

* Halloween Tweaks

* Halloween Event Changes

* Updates the cloning manual

* Vampire species for halloween (#32096)

* Vampires

* Action name

* Cooldown so you can't queue drains

* Blood drain rate

* Vampire cleanup/additional checks

* Vampires can drink blood (reagent) (#30)

* New DRINKSBLOOD species_trait

All species can drink blood, but species with this trait
will restore lost blood_volume when drinking it

* Vampires have vampire blood and DRINKSBLOOD

People with vampire blood can take all other blood
Vampire blood can't be used for anyone that doesn't have it

* Vampire tweaks (#31)

* Universal Blood

* Removes spell on species loss

* Vampire heart for checking blood level

* Automatic changelog generation for PR #32096 [ci skip]

* Fixes losing species preferences (#32093)

* Forgot to credit JJRcop for help with vampires

* Automatic changelog compile, [ci skip]

* Blocks world proc calls

* Fix log call

* Makes ImmediateInvokeAsync a world proc

* cleanup

* debug verbs, less overhead, more sorts, fix for 16m call count bug

* Remove some unneeded null checks in lighting

These weren't needed, and ran thousands of times per second during high lighting activity, and were pretty high up in the line by line profile of lighting for what was basically a noop.

* Remove stray parent proc call in collector code

* Assmos part 1, #2 (#30791)

* First part of Assmos

* Adds tritium synthesis and basic in-body effects.

* Begins adding the higher tier gases. Removes Freon(not completely yet) adds new gases to scrubers. Fixes some dumb bugs.

* Whoops

* Adds effects and synthesis reactions for pluoxium and stimulum

* Kills Freon.

* Adds sprites

* Removes the magic numbers

* Hyper-Nobelium formation

* Removes Freon from maps.

* Initial Dunc Review changes

* Should ACTUALLY fix the maps this time.

* Dunc Final Review

* Debugging part 1

* Fixes brown gas synthesis

* Auto stash before merge of "assmos-pathconflicts" and "origin/master"

* fix compile errors

* Moves defines. Fixes stimulum coefficents.

* Reworks how Stim and brown gas work, adds tritium to tile fires, fixes a lot of general reaction bugs.

* fixes typo

* Hopefully fixes UI

* compiles tgui

* Tritium balance.

* Automatic changelog generation for PR #30791 [ci skip]

* More radiation balance changes and fixes (#32051)

* more balance changes and fixes

* cleanup

* Automatic changelog generation for PR #32051 [ci skip]

* Fixes motion runtimes from deleted targets (#32121)

* Add a safety check to buildmode, also fix a bug with corner selection (#32009)

* Update buildmode.dm

* Add files via upload

* Update buildmode.dm

* Update buildmode.dm

* Automatic changelog generation for PR #32009 [ci skip]

* Find references fix. (#32022)

* Find references fix.

Made it go from taking years to hours

Removed Datum based recursion, this was unneeded.

Fixed it calling a proc for what ended up being a costly noop millions of times (this was a moderate speed up as it would call DoSearchVar on every fucking number or string or null in a things vars list.)

Fixed it calling itself on the vars list. luckily it only checked keys, so this didn't stack overflow.

I'm intentionally leaving the debugging stuff in right now so that its on the record somewhere. I'll remove that when I pr line by line profiling as its own separate thing

* Remove debugging stuff

* i forgot

* Automatic changelog compile, [ci skip]

* Automatic changelog generation for PR #32116 [ci skip]

* Adds some new grindables to the grinder (#32107)

* Adds some new grindables to the grinder

* Update reagentgrinder.dm

* Update reagentgrinder.dm

* Update reagentgrinder.dm

* Update reagentgrinder.dm

* Update reagentgrinder.dm

* Update reagentgrinder.dm

* Update reagentgrinder.dm

* Update reagentgrinder.dm

* Update reagentgrinder.dm

* Update reagentgrinder.dm

* Adds the extra ")"

* Update reagentgrinder.dm

* Automatic changelog generation for PR #32107 [ci skip]

* Automatic changelog generation for PR #32112 [ci skip]

* build_appearance_list no longer edits the list it is passed (#32066)

* build_appearance_list no longer edits the list it is passed

* Mistakes were made

* Update overlays.dm

* Map config cleanup (#32132)

* Map config cleanup

* Fix

* Automatic changelog generation for PR #31864 [ci skip]

* Restricts some more areas from servant warp, and lets admins start the Ark on non-clockcult rounds (#31723)

* Cleans up clockcult code a little

* Another thing with servants_active

* Now it compiles

* Automatic changelog generation for PR #31723 [ci skip]

* Automatic changelog compile, [ci skip]

* Automatic changelog generation for PR #32108 [ci skip]

* Automatic changelog compile, [ci skip]

* Update DME & Maps

* meep.
  • Loading branch information
MoreRobustThanYou authored and chnkr committed Oct 28, 2017
1 parent ee171ca commit fbada4a
Show file tree
Hide file tree
Showing 71 changed files with 778 additions and 458 deletions.
5 changes: 1 addition & 4 deletions _maps/boxstation.json
@@ -1,8 +1,5 @@
{
"map_name": "Box Station",
"map_path": "map_files/BoxStation",
"map_file": "BoxStation.dmm",
"minetype": "lavaland",
"transition_config": "default",
"allow_custom_shuttles": "yes"
"map_file": "BoxStation.dmm"
}
5 changes: 1 addition & 4 deletions _maps/deltastation.json
@@ -1,8 +1,5 @@
{
"map_name": "Delta Station",
"map_path": "map_files/Deltastation",
"map_file": "DeltaStation2.dmm",
"minetype": "lavaland",
"transition_config": "default",
"allow_custom_shuttles": "yes"
"map_file": "DeltaStation2.dmm"
}
4 changes: 2 additions & 2 deletions _maps/map_files/BoxStation/BoxStation.dmm
Expand Up @@ -53791,7 +53791,7 @@
/turf/open/floor/plasteel,
/area/engine/engineering)
"cCW" = (
/obj/machinery/portable_atmospherics/canister/freon,
/obj/machinery/portable_atmospherics/canister/nitrous_oxide,
/turf/open/floor/plating,
/area/engine/engineering)
"cCY" = (
Expand Down Expand Up @@ -83685,7 +83685,7 @@ bVI
cay
ccw
chY
cCW
ciZ
ciW
ckB
ckB
Expand Down
1 change: 0 additions & 1 deletion _maps/map_files/Deltastation/DeltaStation2.dmm
Expand Up @@ -57445,7 +57445,6 @@
dir = 8
},
/obj/effect/turf_decal/bot,
/obj/machinery/portable_atmospherics/canister/freon,
/turf/open/floor/plasteel,
/area/engine/engineering)
"cqt" = (
Expand Down
2 changes: 1 addition & 1 deletion _maps/map_files/Delturd/DelturdStation.dmm
Expand Up @@ -64479,7 +64479,7 @@
dir = 8
},
/obj/effect/turf_decal/bot,
/obj/machinery/portable_atmospherics/canister/freon,
/obj/machinery/portable_atmospherics/canister/nitrous_oxide,
/turf/open/floor/plasteel,
/area/engine/engineering)
"ctr" = (
Expand Down
2 changes: 1 addition & 1 deletion _maps/map_files/HippieStation/hippiestation.dmm
Expand Up @@ -57788,7 +57788,7 @@
/turf/open/floor/plasteel,
/area/engine/engineering)
"cvJ" = (
/obj/machinery/portable_atmospherics/canister/freon,
/obj/machinery/portable_atmospherics/canister/nitrous_oxide,
/turf/open/floor/plating,
/area/engine/engineering)
"cvK" = (
Expand Down
4 changes: 2 additions & 2 deletions _maps/map_files/MetaStation/MetaStation.dmm
Expand Up @@ -77684,7 +77684,7 @@
/turf/open/floor/plating,
/area/engine/engineering)
"deZ" = (
/obj/machinery/portable_atmospherics/canister/freon,
/obj/machinery/portable_atmospherics/canister/nitrous_oxide,
/turf/open/floor/plating,
/area/engine/engineering)
"dfa" = (
Expand Down Expand Up @@ -120477,7 +120477,7 @@ aGS
axY
aJl
aKx
deZ
aJu
aNo
axY
aPW
Expand Down
5 changes: 1 addition & 4 deletions _maps/metastation.json
@@ -1,8 +1,5 @@
{
"map_name": "MetaStation",
"map_path": "map_files/MetaStation",
"map_file": "MetaStation.dmm",
"minetype": "lavaland",
"transition_config": "default",
"allow_custom_shuttles": "yes"
"map_file": "MetaStation.dmm"
}
5 changes: 1 addition & 4 deletions _maps/omegastation.json
@@ -1,8 +1,5 @@
{
"map_name": "OmegaStation",
"map_path": "map_files/OmegaStation",
"map_file": "OmegaStation.dmm",
"minetype": "lavaland",
"transition_config": "default",
"allow_custom_shuttles": "yes"
"map_file": "OmegaStation.dmm"
}
5 changes: 1 addition & 4 deletions _maps/pubbystation.json
@@ -1,8 +1,5 @@
{
"map_name": "PubbyStation",
"map_path": "map_files/PubbyStation",
"map_file": "PubbyStation.dmm",
"minetype": "lavaland",
"transition_config": "default",
"allow_custom_shuttles": "yes"
"map_file": "PubbyStation.dmm"
}
5 changes: 1 addition & 4 deletions _maps/runtimestation.json
@@ -1,8 +1,5 @@
{
"map_name": "Runtime Station",
"map_path": "map_files/debug",
"map_file": "runtimestation.dmm",
"minetype": "lavaland",
"transition_config": "default",
"allow_custom_shuttles": "no"
"map_file": "runtimestation.dmm"
}
25 changes: 6 additions & 19 deletions code/__DEFINES/atmospherics.dm
Expand Up @@ -56,28 +56,16 @@
#define FIRE_MINIMUM_TEMPERATURE_TO_SPREAD 150+T0C
#define FIRE_MINIMUM_TEMPERATURE_TO_EXIST 100+T0C
#define FIRE_SPREAD_RADIOSITY_SCALE 0.85
#define FIRE_CARBON_ENERGY_RELEASED 500000 //Amount of heat released per mole of burnt carbon into the tile
#define FIRE_PLASMA_ENERGY_RELEASED 3000000 //Amount of heat released per mole of burnt plasma into the tile
#define FIRE_GROWTH_RATE 40000 //For small fires
#define CARBON_LIFEFORM_FIRE_RESISTANCE 200+T0C //Resistance to fire damage
#define CARBON_LIFEFORM_FIRE_DAMAGE 4 //Fire damage
//Plasma fire properties
#define OXYGEN_BURN_RATE_BASE 1.4
#define PLASMA_BURN_RATE_DELTA 9
#define PLASMA_MINIMUM_BURN_TEMPERATURE 100+T0C
#define PLASMA_UPPER_TEMPERATURE 1370+T0C
#define PLASMA_MINIMUM_OXYGEN_NEEDED 2
#define PLASMA_MINIMUM_OXYGEN_PLASMA_RATIO 30
#define PLASMA_OXYGEN_FULLBURN 10
#define MIN_TOXIC_GAS_DAMAGE 1
#define MAX_TOXIC_GAS_DAMAGE 10
#define MOLES_PLASMA_VISIBLE 0.5 //Moles in a standard cell after which plasma is visible
//Plasma fusion properties
#define PLASMA_BINDING_ENERGY 3000000
#define MAX_CARBON_EFFICENCY 9
#define PLASMA_FUSED_COEFFICENT 0.08
#define CARBON_CATALYST_COEFFICENT 0.01
#define FUSION_PURITY_THRESHOLD 0.9
#define MOLES_GAS_VISIBLE 0.5 //Moles in a standard cell after which gases are visible
#define STOP_REACTIONS 2
#define PLASMA_MINIMUM_BURN_TEMPERATURE 100+T0C
#define GAS_STIM_MINIMUM 0.002

// Pressure limits.
#define HAZARD_HIGH_PRESSURE 550 //This determins at what pressure the ultra-high pressure red icon is displayed. (This one is set as a constant)
#define WARNING_HIGH_PRESSURE 325 //This determins when the orange pressure icon is displayed (it is 0.7 * HAZARD_HIGH_PRESSURE)
Expand Down Expand Up @@ -193,8 +181,7 @@
#define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity())

#define ADD_GAS(gas_id, out_list)\
var/list/tmp_gaslist = GLOB.gaslist_cache[gas_id];\
out_list[gas_id] = tmp_gaslist.Copy();
var/list/tmp_gaslist = GLOB.gaslist_cache[gas_id]; out_list[gas_id] = tmp_gaslist.Copy();

//ASSERT_GAS(gas_id, gas_mixture) - used to guarantee that the gas list for this id exists in gas_mixture.gases.
//Must be used before adding to a gas. May be used before reading from a gas.
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/callbacks.dm
@@ -1,4 +1,4 @@
#define GLOBAL_PROC "some_magic_bullshit"

#define CALLBACK new /datum/callback
#define INVOKE_ASYNC ImmediateInvokeAsync
#define INVOKE_ASYNC world.ImmediateInvokeAsync
7 changes: 7 additions & 0 deletions code/__DEFINES/cleaning.dm
@@ -0,0 +1,7 @@
//Cleaning tool strength
#define CLEAN_VERY_WEAK 1 // What are you scrubbing the ground with a toothpick?
#define CLEAN_WEAK 2
#define CLEAN_MEDIUM 3 // Acceptable tools
#define CLEAN_STRONG 4 // Industrial strength
#define CLEAN_IMPRESSIVE 5 // Cleaning strong enough your granny would be proud
#define CLEAN_GOD 6 // Cleans things spotless down to the atomic structure
2 changes: 2 additions & 0 deletions code/__DEFINES/components.dm
Expand Up @@ -18,6 +18,8 @@
#define COMSIG_COMPONENT_REMOVING "component_removing" //before a component is removed from a datum because of RemoveComponent: (/datum/component)
#define COMSIG_PARENT_QDELETED "parent_qdeleted" //before a datum's Destroy() is called: ()

#define COMSIG_COMPONENT_CLEAN_ACT "clean_act" //called on an object to clean it of cleanables. Usualy with soap: (num/strength)

// /atom signals
#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (/obj/item, /mob/living, params)
#define COMSIG_ATOM_HULK_ATTACK "hulk_attack" //from base of atom/attack_hulk(): (/mob/living/carbon/human)
Expand Down
35 changes: 18 additions & 17 deletions code/controllers/subsystem/processing/overlays.dm
Expand Up @@ -89,23 +89,24 @@ PROCESSING_SUBSYSTEM_DEF(overlays)
. = iconbro.appearance
icon_cache[icon] = .

/atom/proc/build_appearance_list(new_overlays)
/atom/proc/build_appearance_list(old_overlays)
var/static/image/appearance_bro = new()
if (!islist(new_overlays))
new_overlays = list(new_overlays)
else
listclearnulls(new_overlays)
for (var/i in 1 to length(new_overlays))
var/image/cached_overlay = new_overlays[i]
if (istext(cached_overlay))
new_overlays[i] = iconstate2appearance(icon, cached_overlay)
else if(isicon(cached_overlay))
new_overlays[i] = icon2appearance(cached_overlay)
else //image/mutable_appearance probable
appearance_bro.appearance = cached_overlay
if(!ispath(cached_overlay))
appearance_bro.dir = cached_overlay.dir
new_overlays[i] = appearance_bro.appearance
var/list/new_overlays = list()
if (!islist(old_overlays))
old_overlays = list(old_overlays)
for (var/overlay in old_overlays)
if(!overlay)
continue
if (istext(overlay))
new_overlays += iconstate2appearance(icon, overlay)
else if(isicon(overlay))
new_overlays += icon2appearance(overlay)
else
appearance_bro.appearance = overlay //this works for images and atoms too!
if(!ispath(overlay))
var/image/I = overlay
appearance_bro.dir = I.dir
new_overlays += appearance_bro.appearance
return new_overlays

#define NOT_QUEUED_ALREADY (!(flags_1 & OVERLAY_QUEUED_1))
Expand Down Expand Up @@ -142,7 +143,7 @@ PROCESSING_SUBSYSTEM_DEF(overlays)
if(priority)
LAZYREMOVE(cached_priority, overlays)

if(NOT_QUEUED_ALREADY && ((init_o_len != LAZYLEN(cached_priority)) || (init_p_len != LAZYLEN(cached_overlays))))
if(NOT_QUEUED_ALREADY && ((init_o_len != LAZYLEN(cached_overlays)) || (init_p_len != LAZYLEN(cached_priority))))
QUEUE_FOR_COMPILE

/atom/proc/add_overlay(list/overlays, priority = FALSE)
Expand Down
4 changes: 2 additions & 2 deletions code/datums/antagonists/revolution.dm
Expand Up @@ -84,7 +84,7 @@
hud_type = "rev_head"
var/remove_clumsy = FALSE
var/give_flash = FALSE
var/give_hud = FALSE
var/give_hud = TRUE

/datum/antagonist/rev/proc/update_rev_icons_added(mob/living/M)
var/datum/atom_hud/antag/revhud = GLOB.huds[ANTAG_HUD_REV]
Expand Down Expand Up @@ -226,4 +226,4 @@
var/datum/antagonist/rev/rev = new_leader.has_antag_datum(/datum/antagonist/rev)
rev.promote()

addtimer(CALLBACK(src,.proc/update_heads),HEAD_UPDATE_PERIOD,TIMER_UNIQUE)
addtimer(CALLBACK(src,.proc/update_heads),HEAD_UPDATE_PERIOD,TIMER_UNIQUE)
2 changes: 1 addition & 1 deletion code/datums/callback.dm
Expand Up @@ -56,7 +56,7 @@
if (length(args) > 2)
arguments = args.Copy(3)

/proc/ImmediateInvokeAsync(thingtocall, proctocall, ...)
/world/proc/ImmediateInvokeAsync(thingtocall, proctocall, ...)
set waitfor = FALSE

if (!thingtocall)
Expand Down
11 changes: 11 additions & 0 deletions code/datums/components/_component.dm
Expand Up @@ -220,3 +220,14 @@
C.OnTransfer(src)
C.parent = src
SendSignal(COMSIG_COMPONENT_ADDED, C)

/datum/proc/TransferComponents(datum/target)
var/list/dc = datum_components
if(!dc)
return
var/comps = dc[/datum/component]
if(islist(comps))
for(var/I in comps)
target.TakeComponent(I)
else
target.TakeComponent(comps)
64 changes: 64 additions & 0 deletions code/datums/components/thermite.dm
@@ -0,0 +1,64 @@
/datum/component/thermite
dupe_mode = COMPONENT_DUPE_UNIQUE
var/amount
var/overlay

var/static/list/blacklist = typecacheof(/turf/closed/wall/mineral/diamond)
var/static/list/resistlist = typecacheof(/turf/closed/wall/r_wall)

/datum/component/thermite/Initialize(_amount)
if(!istype(parent, /turf))
return COMPONENT_INCOMPATIBLE
if(blacklist[parent.type])
_amount*=0 //Yeah the overlay can still go on it and be cleaned but you arent burning down a diamond wall
if(resistlist[parent.type])
_amount*=0.25

amount = _amount*10

var/turf/master = parent
overlay = mutable_appearance('icons/effects/effects.dmi', "thermite")
master.add_overlay(overlay)

RegisterSignal(COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_react)
RegisterSignal(COMSIG_PARENT_ATTACKBY, .proc/attackby_react)
RegisterSignal(COMSIG_ATOM_FIRE_ACT, .proc/flame_react)

/datum/component/thermite/Destroy()
var/turf/master = parent
master.cut_overlay(overlay)
return ..()

/datum/component/thermite/InheritComponent(datum/component/thermite/newC, i_am_original)
if(!i_am_original)
return
amount += newC.amount

/datum/component/thermite/proc/thermite_melt(mob/user)
var/turf/master = parent
master.cut_overlay(overlay)
var/obj/effect/overlay/thermite/fakefire = new(master)

playsound(master, 'sound/items/welder.ogg', 100, 1)

if(amount >= 50)
var/burning_time = max(100, 100-amount)
master = master.ChangeTurf(master.baseturf)
master.burn_tile()
if(user)
master.add_hiddenprint(user)
QDEL_IN(fakefire, burning_time)
else
QDEL_IN(fakefire, 50)

/datum/component/thermite/proc/clean_react(strength)
//Thermite is just some loose powder, you could probably clean it with your hands. << todo?
qdel(src)

/datum/component/thermite/proc/flame_react(exposed_temperature, exposed_volume)
if(exposed_temperature > 1922) // This is roughly the real life requirement to ignite thermite
thermite_melt()

/datum/component/thermite/proc/attackby_react(obj/item/thing, mob/user, params)
if(thing.is_hot())
thermite_melt(user)
22 changes: 9 additions & 13 deletions code/datums/map_config.dm
Expand Up @@ -68,12 +68,11 @@
map_path = json["map_path"]
map_file = json["map_file"]

minetype = json["minetype"]
allow_custom_shuttles = json["allow_custom_shuttles"]
minetype = json["minetype"] || minetype
allow_custom_shuttles = json["allow_custom_shuttles"] == TRUE

var/list/jtcl = json["transition_config"]

if(jtcl != "default")
var/jtcl = json["transition_config"]
if(jtcl && jtcl != "default")
transition_config.Cut()

for(var/I in jtcl)
Expand All @@ -86,25 +85,22 @@
CHECK_EXISTS("map_name")
CHECK_EXISTS("map_path")
CHECK_EXISTS("map_file")
CHECK_EXISTS("minetype")
CHECK_EXISTS("transition_config")
CHECK_EXISTS("allow_custom_shuttles")

var/path = GetFullMapPath(json["map_path"], json["map_file"])
if(!fexists(path))
log_world("Map file ([path]) does not exist!")
return

if(json["transition_config"] != "default")
if(!islist(json["transition_config"]))
var/tc = json["transition_config"]
if(tc != "default")
if(!islist(tc))
log_world("transition_config is not a list!")
return

var/list/jtcl = json["transition_config"]
for(var/I in jtcl)
for(var/I in tc)
if(isnull(TransitionStringToEnum(I)))
log_world("Invalid transition_config option: [I]!")
if(isnull(TransitionStringToEnum(jtcl[I])))
if(isnull(TransitionStringToEnum(tc[I])))
log_world("Invalid transition_config option: [I]!")

return TRUE
Expand Down

0 comments on commit fbada4a

Please sign in to comment.