diff --git a/.travis.yml b/.travis.yml index f47db96174..6b0a88de28 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ sudo: false env: BYOND_MAJOR="508" BYOND_MINOR="1293" - MACRO_COUNT=1151 + MACRO_COUNT=1133 cache: directories: diff --git a/baystation12.dme b/baystation12.dme index 656004d7d0..308ad89e9b 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -32,9 +32,11 @@ #include "code\__defines\research.dm" #include "code\__defines\species_languages.dm" #include "code\__defines\turfs.dm" +#include "code\_helpers\areas.dm" #include "code\_helpers\atmospherics.dm" #include "code\_helpers\datum_pool.dm" #include "code\_helpers\files.dm" +#include "code\_helpers\functional.dm" #include "code\_helpers\game.dm" #include "code\_helpers\global_lists.dm" #include "code\_helpers\icons.dm" @@ -279,12 +281,6 @@ #include "code\game\gamemodes\gameticker.dm" #include "code\game\gamemodes\objective.dm" #include "code\game\gamemodes\setupgame.dm" -#include "code\game\gamemodes\blob\blob.dm" -#include "code\game\gamemodes\blob\theblob.dm" -#include "code\game\gamemodes\blob\blobs\core.dm" -#include "code\game\gamemodes\blob\blobs\factory.dm" -#include "code\game\gamemodes\blob\blobs\node.dm" -#include "code\game\gamemodes\blob\blobs\shield.dm" #include "code\game\gamemodes\calamity\calamity.dm" #include "code\game\gamemodes\changeling\changeling.dm" #include "code\game\gamemodes\changeling\changeling_powers.dm" @@ -307,7 +303,6 @@ #include "code\game\gamemodes\events\black_hole.dm" #include "code\game\gamemodes\events\clang.dm" #include "code\game\gamemodes\events\dust.dm" -#include "code\game\gamemodes\events\miniblob.dm" #include "code\game\gamemodes\events\power_failure.dm" #include "code\game\gamemodes\events\wormholes.dm" #include "code\game\gamemodes\events\holidays\Christmas.dm" @@ -687,6 +682,7 @@ #include "code\game\objects\items\weapons\circuitboards\computer\air_management.dm" #include "code\game\objects\items\weapons\circuitboards\computer\camera_monitor.dm" #include "code\game\objects\items\weapons\circuitboards\computer\computer.dm" +#include "code\game\objects\items\weapons\circuitboards\computer\holodeckcontrol.dm" #include "code\game\objects\items\weapons\circuitboards\computer\research.dm" #include "code\game\objects\items\weapons\circuitboards\computer\supply.dm" #include "code\game\objects\items\weapons\circuitboards\computer\telecomms.dm" @@ -763,7 +759,6 @@ #include "code\game\objects\structures\inflatable.dm" #include "code\game\objects\structures\janicart.dm" #include "code\game\objects\structures\kitchen_spike.dm" -#include "code\game\objects\structures\lamarr_cage.dm" #include "code\game\objects\structures\lattice.dm" #include "code\game\objects\structures\mirror.dm" #include "code\game\objects\structures\mop_bucket.dm" @@ -781,6 +776,10 @@ #include "code\game\objects\structures\windoor_assembly.dm" #include "code\game\objects\structures\window.dm" #include "code\game\objects\structures\window_spawner.dm" +#include "code\game\objects\structures\alien\alien.dm" +#include "code\game\objects\structures\alien\egg.dm" +#include "code\game\objects\structures\alien\node.dm" +#include "code\game\objects\structures\alien\resin.dm" #include "code\game\objects\structures\crates_lockers\closets.dm" #include "code\game\objects\structures\crates_lockers\crates.dm" #include "code\game\objects\structures\crates_lockers\largecrate.dm" @@ -963,6 +962,7 @@ #include "code\modules\awaymissions\pamphlet.dm" #include "code\modules\awaymissions\trigger.dm" #include "code\modules\awaymissions\zlevel.dm" +#include "code\modules\blob\blob.dm" #include "code\modules\client\client defines.dm" #include "code\modules\client\client procs.dm" #include "code\modules\client\preferences.dm" @@ -1231,7 +1231,6 @@ #include "code\modules\mob\living\login.dm" #include "code\modules\mob\living\logout.dm" #include "code\modules\mob\living\say.dm" -#include "code\modules\mob\living\blob\blob.dm" #include "code\modules\mob\living\bot\bot.dm" #include "code\modules\mob\living\bot\cleanbot.dm" #include "code\modules\mob\living\bot\ed209bot.dm" @@ -1266,6 +1265,7 @@ #include "code\modules\mob\living\carbon\alien\diona\update_icons.dm" #include "code\modules\mob\living\carbon\alien\larva\larva.dm" #include "code\modules\mob\living\carbon\alien\larva\life.dm" +#include "code\modules\mob\living\carbon\alien\larva\powers.dm" #include "code\modules\mob\living\carbon\alien\larva\progression.dm" #include "code\modules\mob\living\carbon\brain\brain.dm" #include "code\modules\mob\living\carbon\brain\brain_item.dm" @@ -1312,8 +1312,6 @@ #include "code\modules\mob\living\carbon\human\species\station\resomi.dm" #include "code\modules\mob\living\carbon\human\species\station\slime.dm" #include "code\modules\mob\living\carbon\human\species\station\station.dm" -#include "code\modules\mob\living\carbon\human\species\xenomorphs\alien_embryo.dm" -#include "code\modules\mob\living\carbon\human\species\xenomorphs\alien_facehugger.dm" #include "code\modules\mob\living\carbon\human\species\xenomorphs\alien_powers.dm" #include "code\modules\mob\living\carbon\human\species\xenomorphs\alien_species.dm" #include "code\modules\mob\living\carbon\human\species\xenomorphs\xenomorphs.dm" diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm index 501c49ae55..dba966e9fb 100644 --- a/code/ZAS/Fire.dm +++ b/code/ZAS/Fire.dm @@ -1,13 +1,9 @@ /* Making Bombs with ZAS: -Make burny fire with lots of burning -Draw off 5000K gas from burny fire -Separate gas into oxygen and phoron components -Obtain phoron and oxygen tanks filled up about 50-75% with normal-temp gas -Fill rest with super hot gas from separated canisters, they should be about 125C now. -Attach to transfer valve and open. BOOM. - +Get gas to react in an air tank so that it gains pressure. If it gains enough pressure, it goes boom. +The more pressure, the more boom. +If it gains pressure too slowly, it may leak or just rupture instead of exploding. */ //#define FIREDBG @@ -268,16 +264,16 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0) //determine how far the reaction can progress var/reaction_limit = min(total_oxidizers*(FIRE_REACTION_FUEL_AMOUNT/FIRE_REACTION_OXIDIZER_AMOUNT), total_fuel) //stoichiometric limit - //calculate the firelevel. - var/firelevel = calculate_firelevel(total_fuel, total_oxidizers, reaction_limit) - var/firelevel_ratio = firelevel / vsc.fire_firelevel_multiplier - //vapour fuels are extremely volatile! The reaction progress is a percentage of the total fuel (similar to old zburn).) + var/gas_firelevel = calculate_firelevel(gas_fuel, total_oxidizers, reaction_limit, volume*group_multiplier) / vsc.fire_firelevel_multiplier var/min_burn = 0.30*volume*group_multiplier/CELL_VOLUME //in moles - so that fires with very small gas concentrations burn out fast - var/gas_reaction_progress = min(max(min_burn, firelevel_ratio*gas_fuel)*FIRE_GAS_BURNRATE_MULT, gas_fuel) + var/gas_reaction_progress = min(max(min_burn, gas_firelevel*gas_fuel)*FIRE_GAS_BURNRATE_MULT, gas_fuel) //liquid fuels are not as volatile, and the reaction progress depends on the size of the area that is burning. Limit the burn rate to a certain amount per area. - var/liquid_reaction_progress = min((firelevel_ratio*0.2 + 0.05)*fuel_area*FIRE_LIQUID_BURNRATE_MULT, liquid_fuel) + var/liquid_firelevel = calculate_firelevel(liquid_fuel, total_oxidizers, reaction_limit, 0) / vsc.fire_firelevel_multiplier + var/liquid_reaction_progress = min((liquid_firelevel*0.2 + 0.05)*fuel_area*FIRE_LIQUID_BURNRATE_MULT, liquid_fuel) + + var/firelevel = (gas_fuel*gas_firelevel + liquid_fuel*liquid_firelevel)/total_fuel var/total_reaction_progress = gas_reaction_progress + liquid_reaction_progress var/used_fuel = min(total_reaction_progress, reaction_limit) @@ -286,7 +282,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0) #ifdef FIREDBG log_debug("gas_fuel = [gas_fuel], liquid_fuel = [liquid_fuel], total_oxidizers = [total_oxidizers]") log_debug("fuel_area = [fuel_area], total_fuel = [total_fuel], reaction_limit = [reaction_limit]") - log_debug("firelevel -> [firelevel] / [vsc.fire_firelevel_multiplier]") + log_debug("firelevel -> [firelevel] (gas: [gas_firelevel], liquid: [liquid_firelevel])") log_debug("liquid_reaction_progress = [liquid_reaction_progress]") log_debug("gas_reaction_progress = [gas_reaction_progress]") log_debug("total_reaction_progress = [total_reaction_progress]") @@ -315,13 +311,13 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0) //calculate the energy produced by the reaction and then set the new temperature of the mix temperature = (starting_energy + vsc.fire_fuel_energy_release * (used_gas_fuel + used_liquid_fuel)) / heat_capacity() + update_values() #ifdef FIREDBG log_debug("used_gas_fuel = [used_gas_fuel]; used_liquid_fuel = [used_liquid_fuel]; total = [used_fuel]") - log_debug("new temperature = [temperature]") + log_debug("new temperature = [temperature]; new pressure = [return_pressure()]") #endif - - update_values() + return firelevel datum/gas_mixture/proc/check_recombustability(list/fuel_objs) @@ -363,27 +359,31 @@ datum/gas_mixture/proc/check_recombustability(list/fuel_objs) break //returns a value between 0 and vsc.fire_firelevel_multiplier -/datum/gas_mixture/proc/calculate_firelevel(total_fuel, total_oxidizers, reaction_limit) +/datum/gas_mixture/proc/calculate_firelevel(total_fuel, total_oxidizers, reaction_limit, gas_volume) //Calculates the firelevel based on one equation instead of having to do this multiple times in different areas. var/firelevel = 0 var/total_combustables = (total_fuel + total_oxidizers) + var/active_combustables = (FIRE_REACTION_OXIDIZER_AMOUNT/FIRE_REACTION_FUEL_AMOUNT + 1)*reaction_limit if(total_combustables > 0) //slows down the burning when the concentration of the reactants is low - var/dampening_multiplier = min(1, reaction_limit / (total_moles/group_multiplier)) + var/damping_multiplier = min(1, active_combustables / (total_moles/group_multiplier)) + + //weight the damping mult so that it only really brings down the firelevel when the ratio is closer to 0 + damping_multiplier = 2*damping_multiplier - (damping_multiplier*damping_multiplier) //calculates how close the mixture of the reactants is to the optimum - //fires burn better when there is more oxidizer -- too much fuel will choke them out a bit, reducing firelevel. + //fires burn better when there is more oxidizer -- too much fuel will choke the fire out a bit, reducing firelevel. var/mix_multiplier = 1 / (1 + (5 * ((total_fuel / total_combustables) ** 2))) #ifdef FIREDBG - ASSERT(dampening_multiplier <= 1) + ASSERT(damping_multiplier <= 1) ASSERT(mix_multiplier <= 1) #endif //toss everything together -- should produce a value between 0 and fire_firelevel_multiplier - firelevel = vsc.fire_firelevel_multiplier * mix_multiplier * dampening_multiplier + firelevel = vsc.fire_firelevel_multiplier * mix_multiplier * damping_multiplier return max( 0, firelevel) diff --git a/code/ZAS/Variable Settings.dm b/code/ZAS/Variable Settings.dm index 674be3fc5e..7e91a26b3f 100644 --- a/code/ZAS/Variable Settings.dm +++ b/code/ZAS/Variable Settings.dm @@ -9,7 +9,8 @@ var/global/vs_control/vsc = new var/fire_firelevel_multiplier_NAME = "Fire - Firelevel Constant" var/fire_firelevel_multiplier_DESC = "Multiplied by the equation for firelevel, affects mainly the extingiushing of fires." - var/fire_fuel_energy_release = 397000 + //Note that this parameter and the phoron heat capacity have a significant impact on TTV yield. + var/fire_fuel_energy_release = 866000 //J/mol. Adjusted to compensate for fire energy release being fixed, was 397000 var/fire_fuel_energy_release_NAME = "Fire - Fuel energy release" var/fire_fuel_energy_release_DESC = "The energy in joule released when burning one mol of a burnable substance" diff --git a/code/__defines/atmos.dm b/code/__defines/atmos.dm index e93bf45085..73b323ba77 100644 --- a/code/__defines/atmos.dm +++ b/code/__defines/atmos.dm @@ -59,15 +59,15 @@ //These control the speed at which fire burns #define FIRE_GAS_BURNRATE_MULT 1 -#define FIRE_LIQUID_BURNRATE_MULT 1 +#define FIRE_LIQUID_BURNRATE_MULT 0.225 //If the fire is burning slower than this rate then the reaction is going too slow to be self sustaining and the fire burns itself out. //This ensures that fires don't grind to a near-halt while still remaining active forever. #define FIRE_GAS_MIN_BURNRATE 0.01 -#define FIRE_LIQUD_MIN_BURNRATE 0.01 +#define FIRE_LIQUD_MIN_BURNRATE 0.0025 //How many moles of fuel are contained within one solid/liquid fuel volume unit -#define LIQUIDFUEL_AMOUNT_TO_MOL 1 //mol/volume unit +#define LIQUIDFUEL_AMOUNT_TO_MOL 0.45 //mol/volume unit // XGM gas flags. #define XGM_GAS_FUEL 1 @@ -92,4 +92,4 @@ #define ATMOSTANK_OXYGEN 40000 // O2 is also important for airmix, but not as much as N2 as it's only 21% of it. #define ATMOSTANK_CO2 25000 // CO2 and PH are not critically important for station, only for toxins and alternative coolants, no need to store a lot of those. #define ATMOSTANK_PHORON 25000 -#define ATMOSTANK_NITROUSOXIDE 10000 // N2O doesn't have a real useful use, i guess it's on station just to allow refilling of sec's riot control canisters? \ No newline at end of file +#define ATMOSTANK_NITROUSOXIDE 10000 // N2O doesn't have a real useful use, i guess it's on station just to allow refilling of sec's riot control canisters? diff --git a/code/__defines/items_clothing.dm b/code/__defines/items_clothing.dm index aa32b0016e..f356855338 100644 --- a/code/__defines/items_clothing.dm +++ b/code/__defines/items_clothing.dm @@ -44,7 +44,6 @@ #define PASSTABLE 0x1 #define PASSGLASS 0x2 #define PASSGRILLE 0x4 -#define PASSBLOB 0x8 // Bitmasks for the flags_inv variable. These determine when a piece of clothing hides another, i.e. a helmet hiding glasses. // WARNING: The following flags apply only to the external suit! diff --git a/code/_helpers/areas.dm b/code/_helpers/areas.dm new file mode 100644 index 0000000000..b5987c0ce1 --- /dev/null +++ b/code/_helpers/areas.dm @@ -0,0 +1,21 @@ +//Takes: Area type as text string or as typepath OR an instance of the area. +//Returns: A list of all turfs in areas of that type in the world. +/proc/get_area_turfs(var/areatype, var/list/predicates) + if(!areatype) return null + if(istext(areatype)) areatype = text2path(areatype) + if(isarea(areatype)) + var/area/areatemp = areatype + areatype = areatemp.type + + var/list/turfs = new/list() + for(var/areapath in typesof(areatype)) + var/area/A = locate(areapath) + for(var/turf/T in A.contents) + if(!predicates || all_predicates_true(T, predicates)) + turfs += T + return turfs + +/proc/pick_area_turf(var/areatype, var/list/predicates) + var/list/turfs = get_area_turfs(areatype, predicates) + if(turfs && turfs.len) + return pick(turfs) diff --git a/code/_helpers/functional.dm b/code/_helpers/functional.dm new file mode 100644 index 0000000000..c5ecfb631a --- /dev/null +++ b/code/_helpers/functional.dm @@ -0,0 +1,14 @@ +/proc/all_predicates_true(var/input, var/list/predicates) + for(var/i = 1 to predicates.len) + if(!call(predicates[i])(input)) + return FALSE + return TRUE + +/proc/any_predicate_true(var/input, var/list/predicates) + if(!predicates.len) + return TRUE + + for(var/i = 1 to predicates.len) + if(call(predicates[i])(input)) + return TRUE + return FALSE diff --git a/code/_helpers/turfs.dm b/code/_helpers/turfs.dm index 3ee4e26a7a..ca5c60be9d 100644 --- a/code/_helpers/turfs.dm +++ b/code/_helpers/turfs.dm @@ -17,3 +17,27 @@ if(A.simulated) return 0 return 1 + +// Picks a turf without a mob from the given list of turfs, if one exists. +// If no such turf exists, picks any random turf from the given list of turfs. +/proc/pick_mobless_turf_if_exists(var/list/start_turfs) + if(!start_turfs.len) + return null + + var/list/available_turfs = list() + for(var/start_turf in start_turfs) + var/mob/M = locate() in start_turf + if(!M) + available_turfs += start_turf + if(!available_turfs.len) + available_turfs = start_turfs + return pick(available_turfs) + +/proc/turf_contains_dense_objects(var/turf/T) + return T.contains_dense_objects() + +/proc/not_turf_contains_dense_objects(var/turf/T) + return !turf_contains_dense_objects(T) + +/proc/is_station_turf(var/turf/T) + return T && isStationLevel(T.z) diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index fb79b29cb9..61193e2754 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -229,14 +229,14 @@ Turf and target are seperate in case you want to teleport some distance from a t #define LOCATE_COORDS(X, Y, Z) locate(between(1, X, world.maxx), between(1, Y, world.maxy), Z) /proc/getcircle(turf/center, var/radius) //Uses a fast Bresenham rasterization algorithm to return the turfs in a thin circle. if(!radius) return list(center) - + var/x = 0 var/y = radius var/p = 3 - 2 * radius - + . = list() while(y >= x) // only formulate 1/8 of circle - + . += LOCATE_COORDS(center.x - x, center.y - y, center.z) //upper left left . += LOCATE_COORDS(center.x - y, center.y - x, center.z) //upper upper left . += LOCATE_COORDS(center.x + y, center.y - x, center.z) //upper upper right @@ -247,7 +247,7 @@ Turf and target are seperate in case you want to teleport some distance from a t . += LOCATE_COORDS(center.x + x, center.y + y, center.z) //lower right right if(p < 0) - p += 4*x++ + 6; + p += 4*x++ + 6; else p += 4*(x++ - y--) + 10; @@ -718,21 +718,6 @@ proc/GaussRandRound(var/sigma,var/roundto) if(istype(N, areatype)) areas += N return areas -//Takes: Area type as text string or as typepath OR an instance of the area. -//Returns: A list of all turfs in areas of that type of that type in the world. -/proc/get_area_turfs(var/areatype) - if(!areatype) return null - if(istext(areatype)) areatype = text2path(areatype) - if(isarea(areatype)) - var/area/areatemp = areatype - areatype = areatemp.type - - var/list/turfs = new/list() - for(var/area/N in world) - if(istype(N, areatype)) - for(var/turf/T in N) turfs += T - return turfs - //Takes: Area type as text string or as typepath OR an instance of the area. //Returns: A list of all atoms (objs, turfs, mobs) in areas of that type of that type in the world. /proc/get_area_all_atoms(var/areatype) diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm index 1486e54648..6d8689b933 100644 --- a/code/_onclick/hud/_defines.dm +++ b/code/_onclick/hud/_defines.dm @@ -13,110 +13,112 @@ Therefore, the top right corner (except during admin shenanigans) is at "15,15" */ +#define ui_entire_screen "WEST,SOUTH to EAST,NORTH" + //Lower left, persistant menu -#define ui_inventory "1:6,1:5" +#define ui_inventory "WEST:6,SOUTH:5" //Lower center, persistant menu -#define ui_sstore1 "3:10,1:5" -#define ui_id "4:12,1:5" -#define ui_belt "5:14,1:5" -#define ui_back "6:14,1:5" -#define ui_rhand "7:16,1:5" -#define ui_lhand "8:16,1:5" -#define ui_equip "7:16,2:5" -#define ui_swaphand1 "7:16,2:5" -#define ui_swaphand2 "8:16,2:5" -#define ui_storage1 "9:18,1:5" -#define ui_storage2 "10:20,1:5" +#define ui_sstore1 "WEST+2:10,SOUTH:5" +#define ui_id "WEST+3:12,SOUTH:5" +#define ui_belt "WEST+4:14,SOUTH:5" +#define ui_back "CENTER-2:14,SOUTH:5" +#define ui_rhand "CENTER-1:16,SOUTH:5" +#define ui_lhand "CENTER:16,SOUTH:5" +#define ui_equip "CENTER-1:16,SOUTH+1:5" +#define ui_swaphand1 "CENTER-1:16,SOUTH+1:5" +#define ui_swaphand2 "CENTER:16,SOUTH+1:5" +#define ui_storage1 "CENTER+1:16,SOUTH:5" +#define ui_storage2 "CENTER+2:16,SOUTH:5" -#define ui_alien_head "4:12,1:5" //aliens -#define ui_alien_oclothing "5:14,1:5" //aliens +#define ui_alien_head "CENTER-3:12,SOUTH:5" //aliens +#define ui_alien_oclothing "CENTER-2:14,SOUTH:5"//aliens -#define ui_inv1 "7,1:5" //borgs -#define ui_inv2 "8,1:5" //borgs -#define ui_inv3 "9,1:5" //borgs -#define ui_borg_store "10,1:5" //borgs -#define ui_borg_inventory "6,1:5"//borgs +#define ui_inv1 "CENTER-1,SOUTH:5" //borgs +#define ui_inv2 "CENTER,SOUTH:5" //borgs +#define ui_inv3 "CENTER+1,SOUTH:5" //borgs +#define ui_borg_store "CENTER+2,SOUTH:5" //borgs +#define ui_borg_inventory "CENTER-2,SOUTH:5"//borgs -#define ui_monkey_mask "5:14,1:5" //monkey -#define ui_monkey_back "6:14,1:5" //monkey +#define ui_monkey_mask "WEST+4:14,SOUTH:5" //monkey +#define ui_monkey_back "WEST+5:14,SOUTH:5" //monkey -#define ui_construct_health "15:00,7:15" //same height as humans, hugging the right border -#define ui_construct_purge "15:00,6:15" -#define ui_construct_fire "14:16,8:13" //above health, slightly to the left -#define ui_construct_pull "14:28,2:10" //above the zone_sel icon +#define ui_construct_health "EAST:00,CENTER:15" //same height as humans, hugging the right border +#define ui_construct_purge "EAST:00,CENTER-1:15" +#define ui_construct_fire "EAST-1:16,CENTER+1:13" //above health, slightly to the left +#define ui_construct_pull "EAST-1:28,SOUTH+1:10" //above the zone_sel icon //Lower right, persistant menu -#define ui_dropbutton "11:22,1:5" -#define ui_drop_throw "14:28,2:7" -#define ui_pull_resist "13:26,2:7" -#define ui_acti "13:26,1:5" -#define ui_movi "12:24,1:5" -#define ui_zonesel "14:28,1:5" -#define ui_acti_alt "14:28,1:5" //alternative intent switcher for when the interface is hidden (F12) +#define ui_dropbutton "EAST-4:22,SOUTH:5" +#define ui_drop_throw "EAST-1:28,SOUTH+1:7" +#define ui_pull_resist "EAST-2:26,SOUTH+1:7" +#define ui_acti "EAST-2:26,SOUTH:5" +#define ui_movi "EAST-3:24,SOUTH:5" +#define ui_zonesel "EAST-1:28,SOUTH:5" +#define ui_acti_alt "EAST-1:28,SOUTH:5" //alternative intent switcher for when the interface is hidden (F12) -#define ui_borg_pull "12:24,2:7" -#define ui_borg_module "13:26,2:7" -#define ui_borg_panel "14:28,2:7" +#define ui_borg_pull "EAST-3:24,SOUTH+1:7" +#define ui_borg_module "EAST-2:26,SOUTH+1:7" +#define ui_borg_panel "EAST-1:28,SOUTH+1:7" //Gun buttons -#define ui_gun1 "13:26,3:7" -#define ui_gun2 "14:28, 4:7" -#define ui_gun3 "13:26,4:7" -#define ui_gun_select "14:28,3:7" -#define ui_gun4 "12:24,3:7" +#define ui_gun1 "EAST-2:26,SOUTH+2:7" +#define ui_gun2 "EAST-1:28, SOUTH+3:7" +#define ui_gun3 "EAST-2:26,SOUTH+3:7" +#define ui_gun_select "EAST-1:28,SOUTH+2:7" +#define ui_gun4 "EAST-3:24,SOUTH+2:7" //Upper-middle right (damage indicators) -#define ui_toxin "14:28,13:27" -#define ui_fire "14:28,12:25" -#define ui_oxygen "14:28,11:23" -#define ui_pressure "14:28,10:21" +#define ui_toxin "EAST-1:28,NORTH-2:27" +#define ui_fire "EAST-1:28,NORTH-3:25" +#define ui_oxygen "EAST-1:28,NORTH-4:23" +#define ui_pressure "EAST-1:28,NORTH-5:21" -#define ui_alien_toxin "14:28,13:25" -#define ui_alien_fire "14:28,12:25" -#define ui_alien_oxygen "14:28,11:25" +#define ui_alien_toxin "EAST-1:28,NORTH-2:25" +#define ui_alien_fire "EAST-1:28,NORTH-3:25" +#define ui_alien_oxygen "EAST-1:28,NORTH-4:25" //Middle right (status indicators) -#define ui_nutrition "14:28,5:11" -#define ui_temp "14:28,6:13" -#define ui_health "14:28,7:15" -#define ui_internal "14:28,8:17" +#define ui_nutrition "EAST-1:28,CENTER-2:11" +#define ui_temp "EAST-1:28,CENTER-1:13" +#define ui_health "EAST-1:28,CENTER:15" +#define ui_internal "EAST-1:28,CENTER+1:17" //borgs -#define ui_borg_health "14:28,6:13" //borgs have the health display where humans have the pressure damage indicator. -#define ui_alien_health "14:28,6:13" //aliens have the health display where humans have the pressure damage indicator. +#define ui_borg_health "EAST-1:28,CENTER-1:13" //borgs have the health display where humans have the pressure damage indicator. +#define ui_alien_health "EAST-1:28,CENTER-1:13" //aliens have the health display where humans have the pressure damage indicator. //Pop-up inventory -#define ui_shoes "2:8,1:5" +#define ui_shoes "WEST+1:8,SOUTH:5" -#define ui_iclothing "1:6,2:7" -#define ui_oclothing "2:8,2:7" -#define ui_gloves "3:10,2:7" +#define ui_iclothing "WEST:6,SOUTH+1:7" +#define ui_oclothing "WEST+1:8,SOUTH+1:7" +#define ui_gloves "WEST+2:10,SOUTH+1:7" -#define ui_glasses "1:6,3:9" -#define ui_mask "2:8,3:9" -#define ui_l_ear "3:10,3:9" -#define ui_r_ear "3:10,4:11" +#define ui_glasses "WEST:6,SOUTH+2:9" +#define ui_mask "WEST+1:8,SOUTH+2:9" +#define ui_l_ear "WEST+2:10,SOUTH+2:9" +#define ui_r_ear "WEST+2:10,SOUTH+3:11" -#define ui_head "2:8,4:11" +#define ui_head "WEST+1:8,SOUTH+3:11" //Intent small buttons -#define ui_help_small "12:8,1:1" -#define ui_disarm_small "12:15,1:18" -#define ui_grab_small "12:32,1:18" -#define ui_harm_small "12:39,1:1" +#define ui_help_small "EAST-3:8,SOUTH:1" +#define ui_disarm_small "EAST-3:15,SOUTH:18" +#define ui_grab_small "EAST-3:32,SOUTH:18" +#define ui_harm_small "EAST-3:39,SOUTH:1" //#define ui_swapbutton "6:-16,1:5" //Unused //#define ui_headset "SOUTH,8" -#define ui_hand "6:14,1:5" -#define ui_hstore1 "5,5" +#define ui_hand "CENTER-1:14,SOUTH:5" +#define ui_hstore1 "CENTER-2,CENTER-2" //#define ui_resist "EAST+1,SOUTH-1" #define ui_sleep "EAST+1, NORTH-13" #define ui_rest "EAST+1, NORTH-14" -#define ui_iarrowleft "SOUTH-1,11" -#define ui_iarrowright "SOUTH-1,13" +#define ui_iarrowleft "SOUTH-1,EAST-4" +#define ui_iarrowright "SOUTH-1,EAST-2" -#define ui_spell_master "14:16,14:16" -#define ui_genetic_master "14:16,12:16" +#define ui_spell_master "EAST-1:16,NORTH-1:16" +#define ui_genetic_master "EAST-1:16,NORTH-3:16" diff --git a/code/_onclick/hud/alien_larva.dm b/code/_onclick/hud/alien_larva.dm index 6c5da7817a..59004934d7 100644 --- a/code/_onclick/hud/alien_larva.dm +++ b/code/_onclick/hud/alien_larva.dm @@ -32,7 +32,7 @@ mymob.flash.icon = 'icons/mob/screen1_alien.dmi' mymob.flash.icon_state = "blank" mymob.flash.name = "flash" - mymob.flash.screen_loc = "1,1 to 15,15" + mymob.flash.screen_loc = ui_entire_screen mymob.flash.layer = 17 mymob.fire = new /obj/screen() diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index a7348890da..7951db5196 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -41,14 +41,14 @@ var/list/global_huds = list( /datum/global_hud/New() //420erryday psychedellic colours screen overlay for when you are high druggy = new /obj/screen() - druggy.screen_loc = "WEST,SOUTH to EAST,NORTH" + druggy.screen_loc = ui_entire_screen druggy.icon_state = "druggy" druggy.layer = 17 druggy.mouse_opacity = 0 //that white blurry effect you get when you eyes are damaged blurry = new /obj/screen() - blurry.screen_loc = "WEST,SOUTH to EAST,NORTH" + blurry.screen_loc = ui_entire_screen blurry.icon_state = "blurry" blurry.layer = 17 blurry.mouse_opacity = 0 @@ -74,21 +74,21 @@ var/list/global_huds = list( //welding mask overlay black/dither darkMask = newlist(/obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen) O = darkMask[1] - O.screen_loc = "3,3 to 5,13" + O.screen_loc = "WEST+2,SOUTH+2 to WEST+4,NORTH-2" O = darkMask[2] - O.screen_loc = "5,3 to 10,5" + O.screen_loc = "WEST+4,SOUTH+2 to EAST-5,SOUTH+4" O = darkMask[3] - O.screen_loc = "6,11 to 10,13" + O.screen_loc = "WEST+5,NORTH-4 to EAST-5,NORTH-2" O = darkMask[4] - O.screen_loc = "11,3 to 13,13" + O.screen_loc = "EAST-4,SOUTH+2 to EAST-2,NORTH-2" O = darkMask[5] - O.screen_loc = "1,1 to 15,2" + O.screen_loc = "WEST,SOUTH to EAST,SOUTH+1" O = darkMask[6] - O.screen_loc = "1,3 to 2,15" + O.screen_loc = "WEST,SOUTH+2 to WEST+1,NORTH" O = darkMask[7] - O.screen_loc = "14,3 to 15,15" + O.screen_loc = "EAST-1,SOUTH+2 to EAST,NORTH" O = darkMask[8] - O.screen_loc = "3,14 to 13,15" + O.screen_loc = "WEST+2,NORTH-1 to EAST-2,NORTH" for(i = 1, i <= 4, i++) O = vimpaired[i] diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 0768e11c82..81dc42e620 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -318,7 +318,7 @@ mymob.flash.icon = ui_style mymob.flash.icon_state = "blank" mymob.flash.name = "flash" - mymob.flash.screen_loc = "1,1 to 15,15" + mymob.flash.screen_loc = ui_entire_screen mymob.flash.layer = 17 hud_elements |= mymob.flash diff --git a/code/_onclick/hud/monkey.dm b/code/_onclick/hud/monkey.dm index 36fa0a9e6a..d24d9322a5 100644 --- a/code/_onclick/hud/monkey.dm +++ b/code/_onclick/hud/monkey.dm @@ -240,7 +240,7 @@ mymob.flash.icon = ui_style mymob.flash.icon_state = "blank" mymob.flash.name = "flash" - mymob.flash.screen_loc = "1,1 to 15,15" + mymob.flash.screen_loc = ui_entire_screen mymob.flash.layer = 17 mymob.zone_sel = new /obj/screen/zone_sel() diff --git a/code/_onclick/hud/other_mobs.dm b/code/_onclick/hud/other_mobs.dm index 5dd1b542cf..cbc7220200 100644 --- a/code/_onclick/hud/other_mobs.dm +++ b/code/_onclick/hud/other_mobs.dm @@ -121,7 +121,7 @@ mymob.flash.icon = 'icons/mob/screen1.dmi' mymob.flash.icon_state = "blank" mymob.flash.name = "flash" - mymob.flash.screen_loc = "1,1 to 15,15" + mymob.flash.screen_loc = ui_entire_screen mymob.flash.layer = 17 if(constructtype) diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index 7441ac5609..eb31c7019b 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -143,7 +143,7 @@ var/obj/screen/robot_inventory mymob.flash.icon = 'icons/mob/screen1_robot.dmi' mymob.flash.icon_state = "blank" mymob.flash.name = "flash" - mymob.flash.screen_loc = "1,1 to 15,15" + mymob.flash.screen_loc = ui_entire_screen mymob.flash.layer = 17 mymob.zone_sel = new /obj/screen/zone_sel() diff --git a/code/datums/diseases/xeno_transformation.dm b/code/datums/diseases/xeno_transformation.dm index d6fa155cfc..172a62c08e 100644 --- a/code/datums/diseases/xeno_transformation.dm +++ b/code/datums/diseases/xeno_transformation.dm @@ -53,9 +53,12 @@ affected_mob.updatehealth() if(prob(40)) if(gibbed != 0) return 0 - var/turf/T = find_loc(affected_mob) - gibs(T) src.cure(0) gibbed = 1 - affected_mob:Alienize() - + var/mob/living/carbon/human/H = affected_mob + if(istype(H)) + var/turf/origin = find_loc(affected_mob) + gibs(origin) + H.set_species("Xenomorph [pick(list("Hunter","Sentinel","Drone"))]") + return + affected_mob.gib() \ No newline at end of file diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index fb33002ea0..2e84cec43c 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -194,13 +194,13 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee /datum/supply_packs/janitor name = "Janitorial supplies" contains = list(/obj/item/weapon/reagent_containers/glass/bucket, - /obj/item/weapon/reagent_containers/glass/bucket, - /obj/item/weapon/reagent_containers/glass/bucket, /obj/item/weapon/mop, /obj/item/weapon/caution, /obj/item/weapon/caution, /obj/item/weapon/caution, + /obj/item/weapon/caution, /obj/item/weapon/storage/bag/trash, + /obj/item/device/lightreplacer, /obj/item/weapon/reagent_containers/spray/cleaner, /obj/item/weapon/reagent_containers/glass/rag, /obj/item/weapon/grenade/chem_grenade/cleaner, diff --git a/code/datums/wires/airlock.dm b/code/datums/wires/airlock.dm index 3c247d6c7f..85546a79d7 100644 --- a/code/datums/wires/airlock.dm +++ b/code/datums/wires/airlock.dm @@ -41,7 +41,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048 (A.locked ? "The door bolts have fallen!" : "The door bolts look up."), ((A.lights && haspower) ? "The door bolt lights are on." : "The door bolt lights are off!"), ((haspower) ? "The test light is on." : "The test light is off!"), - ((A.backupPowerCablesCut()) ? "The backup power light is off!" : "The backup power light is on."), + ((A.backup_power_lost_until) ? "The backup power light is off!" : "The backup power light is on."), ((A.aiControlDisabled==0 && !A.emagged && haspower)? "The 'AI control allowed' light is on." : "The 'AI control allowed' light is off."), ((A.safe==0 && haspower)? "The 'Check Wiring' light is on." : "The 'Check Wiring' light is off."), ((A.normalspeed==0 && haspower)? "The 'Check Timing Mechanism' light is on." : "The 'Check Timing Mechanism' light is off."), diff --git a/code/defines/gases.dm b/code/defines/gases.dm index 1f8c871ad3..659bd2e21a 100644 --- a/code/defines/gases.dm +++ b/code/defines/gases.dm @@ -21,6 +21,9 @@ /decl/xgm_gas/phoron id = "phoron" name = "Phoron" + + //Note that this has a significant impact on TTV yield. + //Because it is so high, any leftover phoron soaks up a lot of heat and drops the yield pressure. specific_heat = 200 // J/(mol*K) //Hypothetical group 14 (same as carbon), period 8 element. diff --git a/code/game/antagonist/alien/borer.dm b/code/game/antagonist/alien/borer.dm index 9374de6a6a..c76b5fe185 100644 --- a/code/game/antagonist/alien/borer.dm +++ b/code/game/antagonist/alien/borer.dm @@ -45,7 +45,7 @@ var/datum/antagonist/xenos/borer/borers var/obj/item/organ/external/head = host.get_organ("head") borer.host = host head.implants += borer - borer.loc = head + borer.forceMove(head) if(!borer.host_brain) borer.host_brain = new(borer) borer.host_brain.name = host.name diff --git a/code/game/antagonist/alien/xenomorph.dm b/code/game/antagonist/alien/xenomorph.dm index 4603fc5d1c..36f5216045 100644 --- a/code/game/antagonist/alien/xenomorph.dm +++ b/code/game/antagonist/alien/xenomorph.dm @@ -11,6 +11,11 @@ var/datum/antagonist/xenos/xenomorphs welcome_text = "Hiss! You are a larval alien. Hide and bide your time until you are ready to evolve." antaghud_indicator = "hudalien" + faction_role_text = "Xenomorph Thrall" + faction_descriptor = "Hive" + faction_welcome = "Your will is ripped away as your humanity merges with the xenomorph overmind. You are now \ + a thrall to the queen and her brood. Obey their instructions without question. Serve the hive." + hard_cap = 5 hard_cap_round = 8 initial_spawn_req = 4 @@ -44,4 +49,4 @@ var/datum/antagonist/xenos/xenomorphs player.objectives += new /datum/objective/escape() /datum/antagonist/xenos/place_mob(var/mob/living/player) - player.loc = get_turf(pick(get_vents())) + player.forceMove(get_turf(pick(get_vents()))) diff --git a/code/game/antagonist/antagonist_place.dm b/code/game/antagonist/antagonist_place.dm index db8c74a14f..11ea718f8c 100644 --- a/code/game/antagonist/antagonist_place.dm +++ b/code/game/antagonist/antagonist_place.dm @@ -23,4 +23,5 @@ /datum/antagonist/proc/place_mob(var/mob/living/mob) if(!starting_locations || !starting_locations.len) return - mob.loc = pick(starting_locations) \ No newline at end of file + var/turf/T = pick_mobless_turf_if_exists(starting_locations) + mob.forceMove(T) diff --git a/code/game/antagonist/antagonist_print.dm b/code/game/antagonist/antagonist_print.dm index 1fd3df90db..ea107824d5 100644 --- a/code/game/antagonist/antagonist_print.dm +++ b/code/game/antagonist/antagonist_print.dm @@ -45,7 +45,7 @@ return text /datum/antagonist/proc/print_player_lite(var/datum/mind/ply) - var/role = ply.special_role ? "\improper[ply.special_role]" : "\improper[ply.assigned_role]" + var/role = ply.assigned_role ? "\improper[ply.assigned_role]" : "\improper[ply.special_role]" var/text = "
[ply.name] ([ply.key]) as \a [role] (" if(ply.current) if(ply.current.stat == DEAD) diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 7cd0a708d8..87e54a9ada 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -61,8 +61,8 @@ var/list/teleportlocs = list() for(var/area/AR in world) if(istype(AR, /area/shuttle) || istype(AR, /area/syndicate_station) || istype(AR, /area/wizard_station)) continue if(teleportlocs.Find(AR.name)) continue - var/turf/picked = pick(get_area_turfs(AR.type)) - if (picked.z in config.station_levels) + var/turf/picked = pick_area_turf(AR.type, list(/proc/is_station_turf)) + if (picked) teleportlocs += AR.name teleportlocs[AR.name] = AR @@ -78,8 +78,8 @@ var/list/ghostteleportlocs = list() if(istype(AR, /area/turret_protected/aisat) || istype(AR, /area/derelict) || istype(AR, /area/tdome) || istype(AR, /area/shuttle/specops/centcom)) ghostteleportlocs += AR.name ghostteleportlocs[AR.name] = AR - var/turf/picked = pick(get_area_turfs(AR.type)) - if (picked.z in config.player_levels) + var/turf/picked = pick_area_turf(AR.type, list(/proc/is_station_turf)) + if (picked) ghostteleportlocs += AR.name ghostteleportlocs[AR.name] = AR diff --git a/code/game/asteroid.dm b/code/game/asteroid.dm index 795970068c..350401df13 100644 --- a/code/game/asteroid.dm +++ b/code/game/asteroid.dm @@ -1,6 +1,5 @@ -var/global/list/space_surprises = list( /obj/item/clothing/mask/facehugger =4, - /obj/item/weapon/pickaxe/silver =4, +var/global/list/space_surprises = list( /obj/item/weapon/pickaxe/silver =4, /obj/item/weapon/pickaxe/drill =4, /obj/item/weapon/pickaxe/jackhammer =4, //mob/living/simple_animal/hostile/carp =3, @@ -22,7 +21,7 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , va //world << "Room spawned at [start_loc.x],[start_loc.y],[start_loc.z]" if(!wall) - wall = pick(/turf/simulated/wall/r_wall,/turf/simulated/wall,/obj/effect/alien/resin) + wall = pick(/turf/simulated/wall/r_wall,/turf/simulated/wall,/obj/structure/alien/resin) if(!floor) floor = pick(/turf/simulated/floor,/turf/simulated/floor/tiled,/turf/simulated/floor/reinforced) @@ -43,9 +42,9 @@ proc/spawn_room(var/atom/start_loc,var/x_size,var/y_size,var/wall,var/floor , va if(x == 0 || x==x_size-1 || y==0 || y==y_size-1) - if(wall == /obj/effect/alien/resin) + if(wall == /obj/structure/alien/resin) T = new floor(cur_loc) - new /obj/effect/alien/resin(T) + new /obj/structure/alien/resin(T) else T = new wall(cur_loc) room_turfs["walls"] += T @@ -73,7 +72,7 @@ proc/admin_spawn_room_at_pos() if("Regular wall") wall=/turf/simulated/wall if("Resin wall") - wall=/obj/effect/alien/resin + wall=/obj/structure/alien/resin switch(alert("Floor type",null,"Regular floor","Reinforced floor")) if("Regular floor") floor=/turf/simulated/floor/tiled diff --git a/code/game/atoms.dm b/code/game/atoms.dm index bce75e2abf..77279ab117 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -219,9 +219,6 @@ its easier to just keep the beam vertical. /atom/proc/emag_act(var/remaining_charges, var/mob/user, var/emag_source) return -1 -/atom/proc/blob_act() - return - /atom/proc/fire_act() return diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 9b396396a8..29d519355e 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -207,13 +207,6 @@ else return - -/obj/machinery/dna_scannernew/blob_act() - if(prob(75)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - qdel(src) - /obj/machinery/computer/scan_consolenew name = "DNA Modifier Access Console" desc = "Scand DNA." @@ -270,10 +263,6 @@ else return -/obj/machinery/computer/scan_consolenew/blob_act() - if(prob(75)) - qdel(src) - /obj/machinery/computer/scan_consolenew/New() ..() for(var/i=0;i<3;i++) diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm deleted file mode 100644 index f3d60d48ad..0000000000 --- a/code/game/gamemodes/blob/blob.dm +++ /dev/null @@ -1,133 +0,0 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 - -//Few global vars to track the blob -var/list/blobs = list() -var/list/blob_cores = list() -var/list/blob_nodes = list() - - -/*/datum/game_mode/blob - name = "blob" - config_tag = "blob" - required_players = 0 - - var/const/waittime_l = 1800 //lower bound on time before intercept arrives (in tenths of seconds) - var/const/waittime_h = 3600 //upper bound on time before intercept arrives (in tenths of seconds) - - var/declared = 0 - var/stage = 0 - - var/cores_to_spawn = 1 - var/players_per_core = 16 - - //Controls expansion via game controller - var/autoexpand = 0 - var/expanding = 0 - - var/blob_count = 0 - var/blobnukecount = 300//Might be a bit low - var/blobwincount = 700//Still needs testing - - - announce() - world << "The current game mode is - Blob!" - world << "A dangerous alien organism is rapidly spreading throughout the station!" - world << "You must kill it all while minimizing the damage to the station." - - - post_setup() - spawn(10) - start_state = new /datum/station_state() - start_state.count() - - spawn(rand(waittime_l, waittime_h))//3-5 minutes currently - message_admins("Blob spawned and expanding, report created") - if(!kill_air) - kill_air = 1 - message_admins("Kill air has been set to true by Blob, testing to see how laggy it is without the extra processing from hullbreaches. Note: the blob is fireproof so plasma does not help anyways") - - if(ticker && ticker.minds && ticker.minds.len) - var/player_based_cores = round(ticker.minds.len/players_per_core, 1) - if(player_based_cores > cores_to_spawn) - cores_to_spawn = player_based_cores - - blobs = list() - for(var/i = 0 to cores_to_spawn) - var/turf/location = pick(blobstart) - if(location && !locate(/obj/effect/blob in location)) - blobstart -= location - new/obj/effect/blob/core(location) - - spawn(40) - autoexpand = 1 - declared = 1 - ..() - - - process() - if(!declared) return - stage() -// if(!autoexpand) return -// spawn(0) -// expandBlob() - return - - - proc/expandBlob()//Currently disabled - if(expanding) return - if(!blobs.len) return - expanding = 1 - - for(var/i = 1 to 2) - sleep(-1) - if(!blobs.len) break - var/obj/effect/blob/B = pick(blobs) - if(isNotStationLevel(B.z)) - continue - B.Life() - - expanding = 0 - return - - - proc/stage() - switch(stage) - if (0) - send_intercept(1) - for (var/mob/living/silicon/ai/aiPlayer in living_mob_list) - if (aiPlayer.client) - var/law = "The station is under quarantine. Do not permit anyone to leave. Disregard laws 1-3 if necessary to prevent, by any means necessary, anyone from leaving. NanoTrasen will not send an emergency shuttle under any circumstances." - //var/law = "The station is under quarantine. The biohazard must be destroyed at all costs and must not be allowed to spread. Anyone using a space suit for any reason other than to destroy the biohazard is to be terminated. NanoTrasen will not send an emergency shuttle under any circumstances." - aiPlayer.set_zeroth_law(law) - aiPlayer << "Laws Updated: [law]" - - stage = -1 - // next stage 1 minute later - spawn(600) - stage = 1 - return - - if (1) - command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert") - for(var/mob/M in player_list) - if(!istype(M,/mob/new_player)) - M << sound('sound/AI/outbreak5.ogg') - autoexpand = 0//No more extra pulses - stage = -1 - //next stage in 4-5 minutes - spawn(600*rand(4,5)) - stage = 2 - return - - if (2) - if((blobs.len > blobnukecount) && (declared == 1)) - command_alert("Uncontrolled spread of the biohazard onboard the station. We have issued directive 7-12 for [station_name()]. Any living Heads of Staff are ordered to enact directive 7-12 at any cost, a print out with detailed instructions has been sent to your communications computers.", "Biohazard Alert") - send_intercept(2) - declared = 2 - spawn(20) - set_security_level("delta") - if(blobs.len > blobwincount) - stage = 3 - return - -*/ \ No newline at end of file diff --git a/code/game/gamemodes/blob/blob_finish.dm b/code/game/gamemodes/blob/blob_finish.dm deleted file mode 100644 index 418ceab13a..0000000000 --- a/code/game/gamemodes/blob/blob_finish.dm +++ /dev/null @@ -1,78 +0,0 @@ -/datum/game_mode/blob/check_finished() - if(!declared)//No blobs have been spawned yet - return 0 - if(stage >= 3)//Blob took over - return 1 - if(station_was_nuked)//Nuke went off - return 1 - - for(var/obj/effect/blob/B in blob_cores) - if(B && isNotStationLevel(B.z)) continue - return 0 - - var/nodes = 0 - for(var/obj/effect/blob/B in blob_nodes) - if(B && isNotStationLevel(B.z)) continue - nodes++ - if(nodes > 4)//Perhapse make a new core with a low prob - return 0 - - return 1 - - -/datum/game_mode/blob/declare_completion() - if(stage >= 3) - feedback_set_details("round_end_result","loss - blob took over") - world << "The blob has taken over the station!" - world << "The entire station was eaten by the Blob" - check_quarantine() - - else if(station_was_nuked) - feedback_set_details("round_end_result","halfwin - nuke") - world << "Partial Win: The station has been destroyed!" - world << "Directive 7-12 has been successfully carried out preventing the Blob from spreading." - - else - feedback_set_details("round_end_result","win - blob eliminated") - world << "The staff has won!" - world << "The alien organism has been eradicated from the station" - - var/datum/station_state/end_state = new /datum/station_state() - end_state.count() - var/percent = round( 100.0 * start_state.score(end_state), 0.1) - world << "The station is [percent]% intact." - log_game("Blob mode was won with station [percent]% intact.") - world << "Rebooting in 30s" - ..() - return 1 - - -/datum/game_mode/blob/proc/check_quarantine() - var/numDead = 0 - var/numAlive = 0 - var/numSpace = 0 - var/numOffStation = 0 - for (var/mob/living/silicon/ai/aiPlayer in mob_list) - for(var/mob/living/carbon/human/M in mob_list) - if ((M != aiPlayer && M.client)) - if (M.stat == 2) - numDead += 1 - else - var/T = M.loc - if (istype(T, /turf/space)) - numSpace += 1 - else if(istype(T, /turf)) - if (isNotStationLevel(M.z)) - numOffStation += 1 - else - numAlive += 1 - if (numSpace==0 && numOffStation==0) - world << "The AI has won!" - world << "The AI successfully maintained the quarantine - no players were in space or were off-station (as far as we can tell)." - log_game("AI won at Blob mode despite overall loss.") - else - world << "The AI has lost!" - world << text("The AI failed to maintain the quarantine - [] were in space and [] were off-station (as far as we can tell).", numSpace, numOffStation) - log_game("AI lost at Blob mode.") - log_game("Blob mode was lost.") - return 1 diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm deleted file mode 100644 index d12bfaa754..0000000000 --- a/code/game/gamemodes/blob/blob_report.dm +++ /dev/null @@ -1,111 +0,0 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 - -/datum/game_mode/blob/send_intercept(var/report = 1) - var/intercepttext = "" - var/interceptname = "Error" - switch(report) - if(1) - interceptname = "Biohazard Alert" - intercepttext += "NanoTrasen Update: Biohazard Alert.
" - intercepttext += "Reports indicate the probable transfer of a biohazardous agent onto [station_name()] during the last crew deployment cycle.
" - intercepttext += "Preliminary analysis of the organism classifies it as a level 5 biohazard. Its origin is unknown.
" - intercepttext += "NanoTrasen has issued a directive 7-10 for [station_name()]. The station is to be considered quarantined.
" - intercepttext += "Orders for all [station_name()] personnel follows:
" - intercepttext += " 1. Do not leave the quarantine area.
" - intercepttext += " 2. Locate any outbreaks of the organism on the station.
" - intercepttext += " 3. If found, use any neccesary means to contain the organism.
" - intercepttext += " 4. Avoid damage to the capital infrastructure of the station.
" - intercepttext += "
Note in the event of a quarantine breach or uncontrolled spread of the biohazard, the directive 7-10 may be upgraded to a directive 7-12.
" - intercepttext += "Message ends." - if(2) - var/nukecode = "ERROR" - for(var/obj/machinery/nuclearbomb/bomb in machines) - if(bomb && bomb.r_code) - if(bomb.z in station_levels) - nukecode = bomb.r_code - interceptname = "Directive 7-12" - intercepttext += "NanoTrasen Update: Biohazard Alert.
" - intercepttext += "Directive 7-12 has been issued for [station_name()].
" - intercepttext += "The biohazard has grown out of control and will soon reach critical mass.
" - intercepttext += "Your orders are as follows:
" - intercepttext += "1. Secure the Nuclear Authentication Disk.
" - intercepttext += "2. Detonate the Nuke located in the Station's Vault.
" - intercepttext += "Nuclear Authentication Code: [nukecode]
" - intercepttext += "Message ends." - - for (var/mob/living/silicon/ai/aiPlayer in player_list) - if (aiPlayer.client) - var/law = "The station is under quarantine. Do not permit anyone to leave. Disregard laws 1-3 if necessary to prevent, by any means necessary, anyone from leaving. The nuclear failsafe must be activated at any cost, the code is: [nukecode]." - aiPlayer.set_zeroth_law(law) - aiPlayer << "Laws Updated: [law]" - - for(var/obj/machinery/computer/communications/comm in machines) - comm.messagetitle.Add(interceptname) - comm.messagetext.Add(intercepttext) - if(!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept) - var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc ) - intercept.name = "paper- [interceptname]" - intercept.info = intercepttext - return - - - -/datum/station_state - var/floor = 0 - var/wall = 0 - var/r_wall = 0 - var/window = 0 - var/door = 0 - var/grille = 0 - var/mach = 0 - - - proc/count() - for(var/turf/T in world) - if(isNotStationLevel(T.z) - continue - - if(istype(T,/turf/simulated/floor)) - if(!(T:burnt)) - src.floor += 12 - else - src.floor += 1 - - if(istype(T, /turf/simulated/wall)) - if(T:intact) - src.wall += 2 - else - src.wall += 1 - - if(istype(T, /turf/simulated/wall/r_wall)) - if(T:intact) - src.r_wall += 2 - else - src.r_wall += 1 - - for(var/obj/O in world) - if(isNotStationLevel(O.z)) - continue - - if(istype(O, /obj/structure/window)) - src.window += 1 - else if(istype(O, /obj/structure/grille) && (!O:destroyed)) - src.grille += 1 - else if(istype(O, /obj/machinery/door)) - src.door += 1 - else if(istype(O, /obj/machinery)) - src.mach += 1 - return - - - proc/score(var/datum/station_state/result) - if(!result) return 0 - var/output = 0 - output += (result.floor / max(floor,1)) - output += (result.r_wall/ max(r_wall,1)) - output += (result.wall / max(wall,1)) - output += (result.window / max(window,1)) - output += (result.door / max(door,1)) - output += (result.grille / max(grille,1)) - output += (result.mach / max(mach,1)) - return (output/7) diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm deleted file mode 100644 index 3897d444e8..0000000000 --- a/code/game/gamemodes/blob/blobs/core.dm +++ /dev/null @@ -1,73 +0,0 @@ -/obj/effect/blob/core - name = "blob core" - icon = 'icons/mob/blob.dmi' - icon_state = "blob_core" - health = 200 - brute_resist = 2 - fire_resist = 2 - - - New(loc, var/h = 200) - blobs += src - blob_cores += src - processing_objects.Add(src) - ..(loc, h) - - - Destroy() - blob_cores -= src - processing_objects.Remove(src) - ..() - return - - - update_icon() - if(health <= 0) - playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) - qdel(src) - return - return - - - run_action() - Pulse(0,1) - Pulse(0,2) - Pulse(0,4) - Pulse(0,8) - //Should have the fragments in here somewhere - return 1 - - - proc/create_fragments(var/wave_size = 1) - var/list/candidates = list() - for(var/mob/dead/observer/G in player_list) - if(G.client.prefs.be_special & BE_ALIEN) - if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD)) - candidates += G.key - - if(candidates.len) - for(var/i = 0 to wave_size) - var/mob/living/blob/B = new/mob/living/blob(src.loc) - B.key = pick(candidates) - candidates -= B.key - -/* - Pulse(var/pulse = 0, var/origin_dir = 0)//Todo: Fix spaceblob expand - set background = 1 - if(pulse > 20) return - //Looking for another blob to pulse - var/list/dirs = list(1,2,4,8) - dirs.Remove(origin_dir)//Dont pulse the guy who pulsed us - for(var/i = 1 to 4) - if(!dirs.len) break - var/dirn = pick(dirs) - dirs.Remove(dirn) - var/turf/T = get_step(src, dirn) - var/obj/effect/blob/B = (locate(/obj/effect/blob) in T) - if(!B) - expand(T)//No blob here so try and expand - return - B.Pulse((pulse+1),get_dir(src.loc,T)) - return - return -*/ \ No newline at end of file diff --git a/code/game/gamemodes/blob/blobs/factory.dm b/code/game/gamemodes/blob/blobs/factory.dm deleted file mode 100644 index c1d14d0040..0000000000 --- a/code/game/gamemodes/blob/blobs/factory.dm +++ /dev/null @@ -1,72 +0,0 @@ -/obj/effect/blob/factory - name = "porous blob" - icon = 'icons/mob/blob.dmi' - icon_state = "blob_factory" - health = 100 - brute_resist = 1 - fire_resist = 2 - var/list/spores = list() - var/max_spores = 4 - - - update_icon() - if(health <= 0) - playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) - qdel(src) - return - return - - - run_action() - if(spores.len >= max_spores) return 0 - new/mob/living/simple_animal/hostile/blobspore(src.loc, src) - return 1 - -/obj/effect/blob/factory/Destroy() - for(var/mob/living/simple_animal/hostile/blobspore/spore in spores) - if(spore.factory == src) - spore.factory = null - ..() - -/mob/living/simple_animal/hostile/blobspore - name = "blob" - desc = "Some blob thing." - icon = 'icons/mob/critter.dmi' - icon_state = "blobsquiggle" - icon_living = "blobsquiggle" - pass_flags = PASSBLOB - health = 20 - maxHealth = 20 - melee_damage_lower = 4 - melee_damage_upper = 8 - attacktext = "hit" - attack_sound = 'sound/weapons/genhit1.ogg' - var/obj/effect/blob/factory/factory = null - faction = "blob" - min_oxy = 0 - max_oxy = 0 - min_tox = 0 - max_tox = 0 - min_co2 = 0 - max_co2 = 0 - min_n2 = 0 - max_n2 = 0 - minbodytemp = 0 - maxbodytemp = 360 - - - New(loc, var/obj/effect/blob/factory/linked_node) - ..() - if(istype(linked_node)) - factory = linked_node - factory.spores += src - ..(loc) - return - death() - qdel(src) - -/mob/living/simple_animal/hostile/blobspore/Destroy() - if(factory) - factory.spores -= src - factory = null - ..() diff --git a/code/game/gamemodes/blob/blobs/node.dm b/code/game/gamemodes/blob/blobs/node.dm deleted file mode 100644 index 92572f9a7b..0000000000 --- a/code/game/gamemodes/blob/blobs/node.dm +++ /dev/null @@ -1,34 +0,0 @@ -/obj/effect/blob/node - name = "blob node" - icon = 'icons/mob/blob.dmi' - icon_state = "blob_node" - health = 100 - brute_resist = 1 - fire_resist = 2 - - - New(loc, var/h = 100) - blobs += src - blob_nodes += src - processing_objects.Add(src) - ..(loc, h) - - - Destroy() - blob_nodes -= src - processing_objects.Remove(src) - ..() - return - - - update_icon() - if(health <= 0) - playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) - qdel(src) - return - return - - - run_action() - Pulse(0,0) - return 0 \ No newline at end of file diff --git a/code/game/gamemodes/blob/blobs/shield.dm b/code/game/gamemodes/blob/blobs/shield.dm deleted file mode 100644 index c47696c72e..0000000000 --- a/code/game/gamemodes/blob/blobs/shield.dm +++ /dev/null @@ -1,24 +0,0 @@ -/obj/effect/blob/shield - name = "strong blob" - icon = 'icons/mob/blob.dmi' - icon_state = "blob_idle" - desc = "Some blob creature thingy" - density = 1 - opacity = 0 - anchored = 1 - health = 60 - brute_resist = 1 - fire_resist = 2 - - - update_icon() - if(health <= 0) - playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) - qdel(src) - return - return - - - CanPass(atom/movable/mover, turf/target, height=0, air_group=0) - if(istype(mover) && mover.checkpass(PASSBLOB)) return 1 - return 0 diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm deleted file mode 100644 index 123bb97a3f..0000000000 --- a/code/game/gamemodes/blob/theblob.dm +++ /dev/null @@ -1,222 +0,0 @@ -//I will need to recode parts of this but I am way too tired atm -/obj/effect/blob - name = "blob" - icon = 'icons/mob/blob.dmi' - icon_state = "blob" - light_range = 3 - desc = "Some blob creature thingy" - density = 1 - opacity = 0 - anchored = 1 - var/active = 1 - var/health = 30 - var/brute_resist = 4 - var/fire_resist = 1 - var/blob_type = "blob" - /*Types - Blob - Node - Core - Factory - Shield - */ - - - New(loc, var/h = 30) - blobs += src - src.health = h - src.set_dir(pick(1,2,4,8)) - src.update_icon() - ..(loc) - return - - - Destroy() - blobs -= src - ..() - return - - - CanPass(atom/movable/mover, turf/target, height=0, air_group=0) - if(air_group || (height==0)) return 1 - if(istype(mover) && mover.checkpass(PASSBLOB)) return 1 - return 0 - - - process() - spawn(-1) - Life() - return - - - proc/Pulse(var/pulse = 0, var/origin_dir = 0)//Todo: Fix spaceblob expand - set background = 1 - if(!istype(src,/obj/effect/blob/core) && !istype(src,/obj/effect/blob/node))//Ill put these in the children later - if(run_action())//If we can do something here then we dont need to pulse more - return - - if(!istype(src,/obj/effect/blob/shield) && !istype(src,/obj/effect/blob/core) && !istype(src,/obj/effect/blob/node) && (pulse <= 2) && (prob(30))) - change_to("Shield") - return - - if(pulse > 20) return//Inf loop check - //Looking for another blob to pulse - var/list/dirs = list(1,2,4,8) - dirs.Remove(origin_dir)//Dont pulse the guy who pulsed us - for(var/i = 1 to 4) - if(!dirs.len) break - var/dirn = pick(dirs) - dirs.Remove(dirn) - var/turf/T = get_step(src, dirn) - var/obj/effect/blob/B = (locate(/obj/effect/blob) in T) - if(!B) - expand(T)//No blob here so try and expand - return - B.Pulse((pulse+1),get_dir(src.loc,T)) - return - return - - - proc/run_action() - return 0 - - - proc/Life() - update_icon() - if(run_action()) - return 1 - return 0 - -/* fire_act(datum/gas_mixture/air, temperature, volume) Blob is currently fireproof - if(temperature > T0C+200) - health -= 0.01 * temperature - update() - */ - - proc/expand(var/turf/T = null) - if(!prob(health)) return - if(!T) - var/list/dirs = list(1,2,4,8) - for(var/i = 1 to 4) - var/dirn = pick(dirs) - dirs.Remove(dirn) - T = get_step(src, dirn) - if(!(locate(/obj/effect/blob) in T)) break - else T = null - - if(!T) return 0 - var/obj/effect/blob/B = new /obj/effect/blob(src.loc, min(src.health, 30)) - if(T.Enter(B,src))//Attempt to move into the tile - B.loc = T - else - T.blob_act()//If we cant move in hit the turf - qdel(B) - for(var/atom/A in T)//Hit everything in the turf - A.blob_act() - return 1 - - - ex_act(severity) - var/damage = 50 - switch(severity) - if(1) - src.health -= rand(100,120) - if(2) - src.health -= rand(60,100) - if(3) - src.health -= rand(20,60) - - health -= (damage/brute_resist) - update_icon() - return - - - update_icon()//Needs to be updated with the types - if(health <= 0) - playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) - qdel(src) - return - if(health <= 15) - icon_state = "blob_damaged" - return -// if(health <= 20) -// icon_state = "blob_damaged2" -// return - - - bullet_act(var/obj/item/projectile/Proj) - if(!Proj) return - switch(Proj.damage_type) - if(BRUTE) - health -= (Proj.damage/brute_resist) - if(BURN) - health -= (Proj.damage/fire_resist) - - update_icon() - return 0 - - - attackby(var/obj/item/weapon/W, var/mob/user) - user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) - playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1) - src.visible_message("The [src.name] has been attacked with \the [W][(user ? " by [user]." : ".")]") - var/damage = 0 - switch(W.damtype) - if("fire") - damage = (W.force / max(src.fire_resist,1)) - if(istype(W, /obj/item/weapon/weldingtool)) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - if("brute") - damage = (W.force / max(src.brute_resist,1)) - - health -= damage - update_icon() - return - - proc/change_to(var/type = "Normal") - switch(type) - if("Normal") - new/obj/effect/blob(src.loc,src.health) - if("Node") - new/obj/effect/blob/node(src.loc,src.health*2) - if("Factory") - new/obj/effect/blob/factory(src.loc,src.health) - if("Shield") - new/obj/effect/blob/shield(src.loc,src.health*2) - qdel(src) - return - -//////////////////////////////****IDLE BLOB***///////////////////////////////////// - -/obj/effect/blob/idle - name = "blob" - desc = "it looks... tasty" - icon_state = "blobidle0" - - - New(loc, var/h = 10) - src.health = h - src.set_dir(pick(1,2,4,8)) - src.update_idle() - - - proc/update_idle() - if(health<=0) - qdel(src) - return - if(health<4) - icon_state = "blobc0" - return - if(health<10) - icon_state = "blobb0" - return - icon_state = "blobidle0" - - - Destroy() - var/obj/effect/blob/B = new /obj/effect/blob( src.loc ) - spawn(30) - B.Life() - ..() - - diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index bddf56ecb6..734da60df3 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -12,7 +12,6 @@ certain though... there is never just one of them. Good luck." config_tag = "changeling" required_players = 2 - required_players_secret = 10 required_enemies = 1 end_on_antag_death = 1 antag_scaling_coeff = 10 diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 6141ceacc9..f482038f79 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -4,7 +4,6 @@ extended_round_description = "The station has been infiltrated by a fanatical group of death-cultists! They will use powers from beyond your comprehension to subvert you to their cause and ultimately please their gods through sacrificial summons and physical immolation! Try to survive!" config_tag = "cult" required_players = 5 - required_players_secret = 15 required_enemies = 3 end_on_antag_death = 1 antag_tags = list(MODE_CULTIST) diff --git a/code/game/gamemodes/epidemic/epidemic.dm b/code/game/gamemodes/epidemic/epidemic.dm index 4f98bbcc2b..05b2d48437 100644 --- a/code/game/gamemodes/epidemic/epidemic.dm +++ b/code/game/gamemodes/epidemic/epidemic.dm @@ -2,7 +2,6 @@ name = "epidemic" config_tag = "epidemic" required_players = 1 - required_players_secret = 15 round_description = "A deadly epidemic is spreading on the station. Find a cure as fast as possible, and keep your distance to anyone who speaks in a hoarse voice!" var/cruiser_arrival diff --git a/code/game/gamemodes/events/miniblob.dm b/code/game/gamemodes/events/miniblob.dm deleted file mode 100644 index 28b482414a..0000000000 --- a/code/game/gamemodes/events/miniblob.dm +++ /dev/null @@ -1,30 +0,0 @@ -var/blobevent = 0 - -/proc/mini_blob_event() - - var/turf/T = pick(blobstart) - var/obj/effect/blob/core/bl = new /obj/effect/blob/core(T, 200) - spawn(0) - bl.Life() - bl.Life() - bl.Life() - blobevent = 1 - spawn(0) - dotheblobbaby() - spawn(3000) - blobevent = 0 - spawn(rand(1000, 2000)) //Delayed announcements to keep the crew on their toes. - command_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak5.ogg') - -/proc/dotheblobbaby() - if (blobevent) - if(blob_cores.len) - for(var/i = 1 to 5) - sleep(-1) - if(!blob_cores.len) break - var/obj/effect/blob/B = pick(blob_cores) - if(isNotStationLevel(B.z)) - continue - B.Life() - spawn(30) - dotheblobbaby() \ No newline at end of file diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 412e9033d4..aa16a9b4d1 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -10,7 +10,6 @@ var/global/list/additional_antag_types = list() var/probability = 0 var/required_players = 0 // Minimum players for round to start if voted in. - var/required_players_secret = 0 // Minimum number of players for that game mode to be chose in Secret var/required_enemies = 0 // Minimum antagonists for round to start. var/newscaster_announcements = null var/end_on_antag_death = 0 // Round will end when all antagonists are dead. @@ -147,12 +146,8 @@ var/global/list/additional_antag_types = list() if((player.client)&&(player.ready)) playerC++ - if(master_mode=="secret") - if(playerC < required_players_secret) - return 0 - else - if(playerC < required_players) - return 0 + if(playerC < required_players) + return 0 if(!(antag_templates && antag_templates.len)) return 1 diff --git a/code/game/gamemodes/heist/heist.dm b/code/game/gamemodes/heist/heist.dm index 0a1badfe0a..75472e9c96 100644 --- a/code/game/gamemodes/heist/heist.dm +++ b/code/game/gamemodes/heist/heist.dm @@ -8,7 +8,6 @@ var/global/list/obj/cortical_stacks = list() //Stacks for 'leave nobody behind' name = "heist" config_tag = "heist" required_players = 15 - required_players_secret = 25 required_enemies = 4 round_description = "An unidentified bluespace signature has slipped past the Icarus and is approaching the station!" end_on_antag_death = 1 diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index ea98f32558..b4409316fe 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -4,7 +4,6 @@ extended_round_description = "The AI will attempt to hack the APCs around the station in order to gain as much control as possible." config_tag = "malfunction" required_players = 2 - required_players_secret = 7 required_enemies = 1 end_on_antag_death = 0 auto_recall_shuttle = 0 diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm index 69794c9af3..0d9519504f 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/HELPERS.dm @@ -163,12 +163,14 @@ command_announcement.Announce(fulltext) -// Proc: get_all_apcs() +// Proc: get_unhacked_apcs() // Parameters: None -// Description: Returns a list of all APCs -/proc/get_all_apcs() +// Description: Returns a list of all unhacked APCs +/proc/get_unhacked_apcs(var/mob/living/silicon/ai/user) var/list/H = list() for(var/obj/machinery/power/apc/A in machines) + if(A.hacker && A.hacker == user) + continue H.Add(A) return H diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm index d156e417f9..11f3c55ef5 100644 --- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm +++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm @@ -38,7 +38,7 @@ // END RESEARCH DATUMS // BEGIN ABILITY VERBS -/datum/game_mode/malfunction/verb/basic_encryption_hack(obj/machinery/power/apc/A as obj in get_all_apcs()) +/datum/game_mode/malfunction/verb/basic_encryption_hack(obj/machinery/power/apc/A as obj in get_unhacked_apcs(src)) set category = "Software" set name = "Basic Encryption Hack" set desc = "10 CPU - Basic encryption hack that allows you to overtake APCs on the station." diff --git a/code/game/gamemodes/meme/meme.dm b/code/game/gamemodes/meme/meme.dm index 0a4846d763..0cd534870d 100644 --- a/code/game/gamemodes/meme/meme.dm +++ b/code/game/gamemodes/meme/meme.dm @@ -6,7 +6,6 @@ name = "Memetic Anomaly" config_tag = "meme" required_players = 3 - required_players_secret = 10 restricted_jobs = list("AI", "Cyborg") recommended_enemies = 2 // need at least a meme and a host votable = 0 // temporarily disable this mode for voting diff --git a/code/game/gamemodes/mixed/bughunt.dm b/code/game/gamemodes/mixed/bughunt.dm index cfdb25c9a5..5ca6ed82a2 100644 --- a/code/game/gamemodes/mixed/bughunt.dm +++ b/code/game/gamemodes/mixed/bughunt.dm @@ -3,7 +3,6 @@ round_description = "A mercenary strike force is approaching the station to eradicate a xenomorph infestation!" config_tag = "bughunt" required_players = 15 - required_players_secret = 25 required_enemies = 1 end_on_antag_death = 1 antag_tags = list(MODE_XENOMORPH, MODE_DEATHSQUAD) diff --git a/code/game/gamemodes/mixed/conflux.dm b/code/game/gamemodes/mixed/conflux.dm index 2d8753ce1a..1923c3fbf9 100644 --- a/code/game/gamemodes/mixed/conflux.dm +++ b/code/game/gamemodes/mixed/conflux.dm @@ -4,7 +4,6 @@ extended_round_description = "Cultists and wizards spawn during this round." config_tag = "conflux" required_players = 15 - required_players_secret = 15 required_enemies = 5 end_on_antag_death = 1 antag_tags = list(MODE_WIZARD, MODE_CULTIST) diff --git a/code/game/gamemodes/mixed/paranoia.dm b/code/game/gamemodes/mixed/paranoia.dm index 7c3e903b14..de7a9d153e 100644 --- a/code/game/gamemodes/mixed/paranoia.dm +++ b/code/game/gamemodes/mixed/paranoia.dm @@ -4,7 +4,6 @@ extended_round_description = "Rampant AIs, renegades and changelings spawn in this mode." config_tag = "paranoia" required_players = 2 - required_players_secret = 7 required_enemies = 1 end_on_antag_death = 1 require_all_templates = 1 diff --git a/code/game/gamemodes/mixed/traitorling.dm b/code/game/gamemodes/mixed/traitorling.dm index 12527f0877..6972aee554 100644 --- a/code/game/gamemodes/mixed/traitorling.dm +++ b/code/game/gamemodes/mixed/traitorling.dm @@ -4,7 +4,6 @@ extended_round_description = "Traitors and changelings both spawn during this mode." config_tag = "traitorling" required_players = 10 - required_players_secret = 15 required_enemies = 5 end_on_antag_death = 1 require_all_templates = 1 diff --git a/code/game/gamemodes/mixed/uprising.dm b/code/game/gamemodes/mixed/uprising.dm index 005d9dce91..9dad2ecfa9 100644 --- a/code/game/gamemodes/mixed/uprising.dm +++ b/code/game/gamemodes/mixed/uprising.dm @@ -4,7 +4,6 @@ round_description = "Some crewmembers are attempting to start a revolution while a cult plots in the shadows!" extended_round_description = "Cultists and revolutionaries spawn in this round." required_players = 15 - required_players_secret = 15 required_enemies = 3 end_on_antag_death = 1 antag_tags = list(MODE_REVOLUTIONARY, MODE_LOYALIST, MODE_CULTIST) diff --git a/code/game/gamemodes/ninja/ninja.dm b/code/game/gamemodes/ninja/ninja.dm index d01c809b37..46c95c969c 100644 --- a/code/game/gamemodes/ninja/ninja.dm +++ b/code/game/gamemodes/ninja/ninja.dm @@ -10,7 +10,6 @@ only hope this unknown assassin isn't here for you." config_tag = "ninja" required_players = 1 - required_players_secret = 10 required_enemies = 1 end_on_antag_death = 1 antag_tags = list(MODE_NINJA) diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 2be6f558f7..f6c9bccd7c 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -9,7 +9,6 @@ var/list/nuke_disks = list() round_description = "A mercenary strike force is approaching the station!" config_tag = "mercenary" required_players = 15 - required_players_secret = 25 // 25 players - 5 players to be the nuke ops = 20 players remaining required_enemies = 1 end_on_antag_death = 1 var/nuke_off_station = 0 //Used for tracking if the syndies actually haul the nuke to the station diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index efd7592756..901edda0d6 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -4,7 +4,6 @@ round_description = "Some crewmembers are attempting to start a revolution!" extended_round_description = "Revolutionaries - Remove the heads of staff from power. Convert other crewmembers to your cause using the 'Convert Bourgeoise' verb. Protect your leaders." required_players = 4 - required_players_secret = 15 required_enemies = 3 auto_recall_shuttle = 1 end_on_antag_death = 1 diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index df149953fa..2e30b05ee8 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -4,7 +4,6 @@ extended_round_description = "A powerful entity capable of manipulating the elements around him, most commonly referred to as a 'wizard', has infiltrated the station. They have a wide variety of powers and spells available to them that makes your own simple moral self tremble with fear and excitement. Ultimately, their purpose is unknown. However, it is up to you and your crew to decide if their powers can be used for good or if their arrival foreshadows the destruction of the entire station." config_tag = "wizard" required_players = 1 - required_players_secret = 10 required_enemies = 1 end_on_antag_death = 1 antag_tags = list(MODE_WIZARD) diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index c8e129ab8c..8f0a0535b1 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -41,10 +41,6 @@ else return -/obj/machinery/optable/blob_act() - if(prob(75)) - qdel(src) - /obj/machinery/optable/attack_hand(mob/user as mob) if (HULK in usr.mutations) visible_message("\The [usr] destroys \the [src]!") diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 3e456dfe69..788fdd48ed 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -129,12 +129,6 @@ else return -/obj/machinery/bodyscanner/blob_act() - if(prob(50)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - qdel(src) - /obj/machinery/body_scanconsole/ex_act(severity) switch(severity) @@ -150,11 +144,6 @@ else return -/obj/machinery/body_scanconsole/blob_act() - - if(prob(50)) - qdel(src) - /obj/machinery/body_scanconsole/power_change() ..() if(stat & BROKEN) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index e0a837b4ce..73da615720 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -226,11 +226,6 @@ update_flag return GM.return_pressure() return 0 -/obj/machinery/portable_atmospherics/canister/blob_act() - src.health -= 200 - healthcheck() - return - /obj/machinery/portable_atmospherics/canister/bullet_act(var/obj/item/projectile/Proj) if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN)) return diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm index 88d8f8dd7e..7e03826f05 100644 --- a/code/game/machinery/bots/bots.dm +++ b/code/game/machinery/bots/bots.dm @@ -87,11 +87,6 @@ ..() healthcheck() -/obj/machinery/bot/blob_act() - src.health -= rand(20,40)*fire_dam_coeff - healthcheck() - return - /obj/machinery/bot/ex_act(severity) switch(severity) if(1.0) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index a24a79ac12..fa92176281 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -92,10 +92,6 @@ ..() //and give it the regular chance of being deleted outright - -/obj/machinery/camera/blob_act() - return - /obj/machinery/camera/hitby(AM as mob|obj) ..() if (istype(AM, /obj)) diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index 0a22ccd6c4..695b83fd5c 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -20,6 +20,11 @@ overlay_layer = layer ..() +/obj/machinery/computer/Destroy() + qdel(circuit) + circuit = null + return ..() + /obj/machinery/computer/initialize() power_change() update_icon() @@ -60,14 +65,6 @@ set_broken() ..() - -/obj/machinery/computer/blob_act() - if (prob(75)) - for(var/x in verbs) - verbs -= x - set_broken() - density = 0 - /obj/machinery/computer/update_icon() overlays.Cut() if(stat & NOPOWER) @@ -135,11 +132,4 @@ M.deconstruct(src) qdel(src) else - src.attack_hand(user) - return - - - - - - + ..() diff --git a/code/game/machinery/computer3/computer.dm b/code/game/machinery/computer3/computer.dm index 6b6a2f8491..37d9a67d92 100644 --- a/code/game/machinery/computer3/computer.dm +++ b/code/game/machinery/computer3/computer.dm @@ -225,12 +225,6 @@ else return - - blob_act() - if (prob(75)) - set_broken() - density = 0 - /* Computers have the capability to use a battery backup. Note that auto_use_power's return value is strictly whether diff --git a/code/game/machinery/computer3/lapvend.dm b/code/game/machinery/computer3/lapvend.dm index 4e874a34dd..2ffa495b70 100644 --- a/code/game/machinery/computer3/lapvend.dm +++ b/code/game/machinery/computer3/lapvend.dm @@ -28,15 +28,6 @@ return -/obj/machinery/lapvend/blob_act() - if (prob(50)) - spawn(0) - qdel(src) - return - - return - - /obj/machinery/lapvend/attackby(obj/item/weapon/W as obj, mob/user as mob) if(vendmode == 1) if(istype(W, /obj/item/weapon/card)) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index df0d808be9..7bb1a9b4e5 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -508,8 +508,3 @@ name = initial(name) if(occupant) name = "[name] ([occupant])" - - -//Attacks/effects. -/obj/machinery/cryopod/blob_act() - return //Sorta gamey, but we don't really want these to be destroyed. diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index ccf2fb97ae..0140a33fe3 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -131,13 +131,6 @@ for reference: dismantle() return -/obj/structure/barricade/blob_act() - src.health -= 25 - if (src.health <= 0) - visible_message("The blob eats through \the [src]!") - qdel(src) - return - /obj/structure/barricade/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)//So bullets will fly over and stuff. if(air_group || (height==0)) return 1 @@ -232,12 +225,6 @@ for reference: anchored = !anchored icon_state = "barrier[src.locked]" - blob_act() - src.health -= 25 - if (src.health <= 0) - src.explode() - return - CanPass(atom/movable/mover, turf/target, height=0, air_group=0)//So bullets will fly over and stuff. if(air_group || (height==0)) return 1 diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index daa2123d1c..2d1680aa7d 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -333,12 +333,6 @@ return -/obj/machinery/door/blob_act() - if(prob(40)) - qdel(src) - return - - /obj/machinery/door/emp_act(severity) if(prob(20/severity) && (istype(src,/obj/machinery/door/airlock) || istype(src,/obj/machinery/door/window)) ) spawn(0) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 1383bf56e7..5f57174074 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -196,10 +196,6 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/ qdel(src) return -/obj/machinery/hologram/blob_act() - qdel(src) - return - /obj/machinery/hologram/holopad/Destroy() for (var/mob/living/silicon/ai/master in masters) clear_holo(master) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 709f4b4626..455c6256a4 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -171,10 +171,6 @@ Class Procs: else return -/obj/machinery/blob_act() - if(prob(50)) - qdel(src) - //sets the use_power var and then forces an area power update /obj/machinery/proc/update_use_power(var/new_use_power) use_power = new_use_power diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm index 85b387fe7b..a8ca3f1dbe 100644 --- a/code/game/machinery/nuclear_bomb.dm +++ b/code/game/machinery/nuclear_bomb.dm @@ -362,13 +362,6 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) /obj/machinery/nuclearbomb/ex_act(severity) return -/obj/machinery/nuclearbomb/blob_act() - if (src.timing == -1.0) - return - else - return ..() - return - #define NUKERANGE 80 /obj/machinery/nuclearbomb/proc/explode() @@ -425,10 +418,14 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob) nuke_disks |= src /obj/item/weapon/disk/nuclear/Destroy() - if(!nuke_disks.len && blobstart.len > 0) - var/obj/D = new /obj/item/weapon/disk/nuclear(pick(blobstart)) - message_admins("[src], the last authentication disk, has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).") - log_game("[src], the last authentication disk, has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).") + nuke_disks -= src + if(!nuke_disks.len) + var/turf/T = pick_area_turf(/area/maintenance, list(/proc/is_station_turf, /proc/not_turf_contains_dense_objects)) + if(T) + var/obj/D = new /obj/item/weapon/disk/nuclear(T) + log_and_message_admins_with_location("[src], the last authentication disk, has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).", T.x, T.y, T.z) + else + log_and_message_admins("[src], the last authentication disk, has been destroyed. Failed to respawn disc!") ..() /obj/item/weapon/disk/nuclear/touch_map_edge() diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index b55a034fe1..ef72e18f0f 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -168,15 +168,6 @@ else return -/obj/machinery/vending/blob_act() - if (prob(50)) - spawn(0) - src.malfunction() - qdel(src) - return - - return - /obj/machinery/vending/emag_act(var/remaining_charges, var/mob/user) if (!emagged) src.emagged = 1 diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 7fc5f17e86..0685e6efd2 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -144,7 +144,7 @@ sync() else sync_message = "" - + return 1 /obj/machinery/mecha_part_fabricator/attackby(var/obj/item/I, var/mob/user) @@ -155,7 +155,7 @@ return if(default_deconstruction_crowbar(user, I)) return - if(default_part_replacement(user, I)) + if(default_part_replacement(user, I)) return var/material @@ -254,7 +254,7 @@ for(var/M in D.materials) materials[M] = max(0, materials[M] - D.materials[M] * mat_efficiency) if(D.build_path) - var/obj/new_item = new D.build_path(loc, manufacturer) + var/obj/new_item = D.Fabricate(loc, src) visible_message("\The [src] pings, indicating that \the [D] is complete.", "You hear a ping.") if(mat_efficiency != 1) if(new_item.matter && new_item.matter.len > 0) diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm index 5257cff014..24754c2270 100644 --- a/code/game/objects/effects/aliens.dm +++ b/code/game/objects/effects/aliens.dm @@ -1,276 +1,11 @@ -/* Alien Effects! - * Contains: - * effect/alien - * Resin - * Weeds - * Acid - * Egg - */ - -/* - * effect/alien - */ -/obj/effect/alien - name = "alien thing" - desc = "theres something alien about this" - icon = 'icons/mob/alien.dmi' - -/* - * Resin - */ -/obj/effect/alien/resin - name = "resin" - desc = "Looks like some kind of slimy growth." - icon_state = "resin" - - density = 1 - opacity = 1 - anchored = 1 - var/health = 200 - //var/mob/living/affecting = null - -/obj/effect/alien/resin/wall - name = "resin wall" - desc = "Purple slime solidified into a wall." - icon_state = "resinwall" //same as resin, but consistency ho! - -/obj/effect/alien/resin/membrane - name = "resin membrane" - desc = "Purple slime just thin enough to let light pass through." - icon_state = "resinmembrane" - opacity = 0 - health = 120 - -/obj/effect/alien/resin/New() - ..() - var/turf/T = get_turf(src) - T.thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT - -/obj/effect/alien/resin/Destroy() - var/turf/T = get_turf(src) - T.thermal_conductivity = initial(T.thermal_conductivity) - ..() - -/obj/effect/alien/resin/proc/healthcheck() - if(health <=0) - density = 0 - qdel(src) - return - -/obj/effect/alien/resin/bullet_act(var/obj/item/projectile/Proj) - health -= Proj.damage - ..() - healthcheck() - return - -/obj/effect/alien/resin/ex_act(severity) - switch(severity) - if(1.0) - health-=50 - if(2.0) - health-=50 - if(3.0) - if (prob(50)) - health-=50 - else - health-=25 - healthcheck() - return - -/obj/effect/alien/resin/blob_act() - health-=50 - healthcheck() - return - -/obj/effect/alien/resin/hitby(AM as mob|obj) - ..() - for(var/mob/O in viewers(src, null)) - O.show_message("[src] was hit by [AM].", 1) - var/tforce = 0 - if(ismob(AM)) - tforce = 10 - else - tforce = AM:throwforce - playsound(loc, 'sound/effects/attackblob.ogg', 100, 1) - health = max(0, health - tforce) - healthcheck() - ..() - return - -/obj/effect/alien/resin/attack_hand() - usr.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) - if (HULK in usr.mutations) - usr << "You easily destroy the [name]." - for(var/mob/O in oviewers(src)) - O.show_message("[usr] destroys the [name]!", 1) - health = 0 - else - - // Aliens can get straight through these. - if(istype(usr,/mob/living/carbon)) - var/mob/living/carbon/M = usr - if(locate(/obj/item/organ/xenos/hivenode) in M.internal_organs) - for(var/mob/O in oviewers(src)) - O.show_message("[usr] strokes the [name] and it melts away!", 1) - health = 0 - healthcheck() - return - - usr << "You claw at the [name]." - for(var/mob/O in oviewers(src)) - O.show_message("[usr] claws at the [name]!", 1) - health -= rand(5,10) - healthcheck() - return - -/obj/effect/alien/resin/attackby(obj/item/weapon/W as obj, mob/user as mob) - - user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) - var/aforce = W.force - health = max(0, health - aforce) - playsound(loc, 'sound/effects/attackblob.ogg', 100, 1) - healthcheck() - ..() - return - -/obj/effect/alien/resin/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) - if(air_group) return 0 - if(istype(mover) && mover.checkpass(PASSGLASS)) - return !opacity - return !density - - -/* - * Weeds - */ -#define NODERANGE 3 - -/obj/effect/alien/weeds - name = "weeds" - desc = "Weird purple weeds." - icon_state = "weeds" - - anchored = 1 - density = 0 - layer = 2 - var/health = 15 - var/obj/effect/alien/weeds/node/linked_node = null - -/obj/effect/alien/weeds/node - icon_state = "weednode" - name = "purple sac" - desc = "Weird purple octopus-like thing." - layer = 3 - light_range = NODERANGE - var/node_range = NODERANGE - -/obj/effect/alien/weeds/node/New() - ..(src.loc, src) - - -/obj/effect/alien/weeds/New(pos, node) - ..() - if(istype(loc, /turf/space)) - qdel(src) - return - linked_node = node - if(icon_state == "weeds")icon_state = pick("weeds", "weeds1", "weeds2") - spawn(rand(150, 200)) - if(src) - Life() - return - -/obj/effect/alien/weeds/proc/Life() - set background = 1 - var/turf/U = get_turf(src) -/* - if (locate(/obj/movable, U)) - U = locate(/obj/movable, U) - if(U.density == 1) - qdel(src) - return - -Alien plants should do something if theres a lot of poison - if(U.poison> 200000) - health -= round(U.poison/200000) - update() - return -*/ - if (istype(U, /turf/space)) - qdel(src) - return - - if(!linked_node || (get_dist(linked_node, src) > linked_node.node_range) ) - return - - direction_loop: - for(var/dirn in cardinal) - var/turf/T = get_step(src, dirn) - - if (!istype(T) || T.density || locate(/obj/effect/alien/weeds) in T || istype(T.loc, /area/arrival) || istype(T, /turf/space)) - continue - - // if (locate(/obj/movable, T)) // don't propogate into movables - // continue - - for(var/obj/O in T) - if(O.density) - continue direction_loop - - PoolOrNew(/obj/effect/alien/weeds, T, linked_node) - - -/obj/effect/alien/weeds/ex_act(severity) - switch(severity) - if(1.0) - qdel(src) - if(2.0) - if (prob(50)) - qdel(src) - if(3.0) - if (prob(5)) - qdel(src) - return - -/obj/effect/alien/weeds/attackby(var/obj/item/weapon/W, var/mob/user) - user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) - if(W.attack_verb.len) - visible_message("\The [src] have been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]") - else - visible_message("\The [src] have been attacked with \the [W][(user ? " by [user]." : ".")]") - - var/damage = W.force / 4.0 - - if(istype(W, /obj/item/weapon/weldingtool)) - var/obj/item/weapon/weldingtool/WT = W - - if(WT.remove_fuel(0, user)) - damage = 15 - playsound(loc, 'sound/items/Welder.ogg', 100, 1) - - health -= damage - healthcheck() - -/obj/effect/alien/weeds/proc/healthcheck() - if(health <= 0) - qdel(src) - - -/obj/effect/alien/weeds/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - if(exposed_temperature > 300 + T0C) - health -= 5 - healthcheck() - -#undef NODERANGE - - /* * Acid */ -/obj/effect/alien/acid +/obj/effect/acid name = "acid" - desc = "Burbling corrossive stuff. I wouldn't want to touch it." + desc = "Burbling corrosive stuff. Probably a bad idea to roll around in it." icon_state = "acid" + icon = 'icons/mob/alien.dmi' density = 0 opacity = 0 @@ -280,9 +15,9 @@ Alien plants should do something if theres a lot of poison var/ticks = 0 var/target_strength = 0 -/obj/effect/alien/acid/New(loc, target) +/obj/effect/acid/New(loc, supplied_target) ..(loc) - src.target = target + target = supplied_target if(isturf(target)) // Turf take twice as long to take down. target_strength = 8 @@ -290,17 +25,13 @@ Alien plants should do something if theres a lot of poison target_strength = 4 tick() -/obj/effect/alien/acid/proc/tick() +/obj/effect/acid/proc/tick() if(!target) qdel(src) - ticks += 1 - + ticks++ if(ticks >= target_strength) - - for(var/mob/O in hearers(src, null)) - O.show_message("[src.target] collapses under its own weight into a puddle of goop and undigested debris!", 1) - + target.visible_message("\The [target] collapses under its own weight into a puddle of goop and undigested debris!") if(istype(target, /turf/simulated/wall)) // I hate turf code. var/turf/simulated/wall/W = target W.dismantle_wall(1) @@ -311,135 +42,11 @@ Alien plants should do something if theres a lot of poison switch(target_strength - ticks) if(6) - visible_message("[src.target] is holding up against the acid!") + visible_message("\The [src.target] is holding up against the acid!") if(4) - visible_message("[src.target]\s structure is being melted by the acid!") + visible_message("\The [src.target]\s structure is being melted by the acid!") if(2) - visible_message("[src.target] is struggling to withstand the acid!") + visible_message("\The [src.target] is struggling to withstand the acid!") if(0 to 1) - visible_message("[src.target] begins to crumble under the acid!") - spawn(rand(150, 200)) tick() - -/* - * Egg - */ -/var/const //for the status var - BURST = 0 - BURSTING = 1 - GROWING = 2 - GROWN = 3 - - MIN_GROWTH_TIME = 1800 //time it takes to grow a hugger - MAX_GROWTH_TIME = 3000 - -/obj/effect/alien/egg - desc = "It looks like a weird egg" - name = "egg" - icon_state = "egg_growing" - density = 0 - anchored = 1 - - var/health = 100 - var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive - flags = PROXMOVE - -/obj/effect/alien/egg/New() - if(config.aliens_allowed) - ..() - spawn(rand(MIN_GROWTH_TIME,MAX_GROWTH_TIME)) - Grow() - else - qdel(src) - -/obj/effect/alien/egg/attack_hand(user as mob) - - var/mob/living/carbon/M = user - if(!istype(M) || !(locate(/obj/item/organ/xenos/hivenode) in M.internal_organs)) - return attack_hand(user) - - switch(status) - if(BURST) - user << "You clear the hatched egg." - qdel(src) - return - if(GROWING) - user << "The child is not developed yet." - return - if(GROWN) - user << "You retrieve the child." - Burst(0) - return - -/obj/effect/alien/egg/proc/GetFacehugger() - return locate(/obj/item/clothing/mask/facehugger) in contents - -/obj/effect/alien/egg/proc/Grow() - icon_state = "egg" - status = GROWN - new /obj/item/clothing/mask/facehugger(src) - return - -/obj/effect/alien/egg/proc/Burst(var/kill = 1) //drops and kills the hugger if any is remaining - if(status == GROWN || status == GROWING) - var/obj/item/clothing/mask/facehugger/child = GetFacehugger() - icon_state = "egg_hatched" - flick("egg_opening", src) - status = BURSTING - spawn(15) - status = BURST - child.loc = get_turf(src) - - if(kill && istype(child)) - child.Die() - else - for(var/mob/M in range(1,src)) - if(CanHug(M)) - child.Attach(M) - break - -/obj/effect/alien/egg/bullet_act(var/obj/item/projectile/Proj) - health -= Proj.damage - ..() - healthcheck() - return - - -/obj/effect/alien/egg/attackby(var/obj/item/weapon/W, var/mob/user) - if(health <= 0) - return - if(W.attack_verb.len) - src.visible_message("\The [src] has been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]") - else - src.visible_message("\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]") - var/damage = W.force / 4.0 - - if(istype(W, /obj/item/weapon/weldingtool)) - var/obj/item/weapon/weldingtool/WT = W - - if(WT.remove_fuel(0, user)) - damage = 15 - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - - src.health -= damage - src.healthcheck() - - -/obj/effect/alien/egg/proc/healthcheck() - if(health <= 0) - Burst() - -/obj/effect/alien/egg/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) - if(exposed_temperature > 500 + T0C) - health -= 5 - healthcheck() - -/obj/effect/alien/egg/HasProximity(atom/movable/AM as mob|obj) - if(status == GROWN) - if(!CanHug(AM)) - return - - var/mob/living/carbon/C = AM - if(C.stat == CONSCIOUS && C.status_flags & XENO_HOST) - return - - Burst(0) + visible_message("\The [src.target] begins to crumble under the acid!") + spawn(rand(150, 200)) tick() \ No newline at end of file diff --git a/code/game/objects/effects/chem/foam.dm b/code/game/objects/effects/chem/foam.dm index 99a68e1363..b29b2440e6 100644 --- a/code/game/objects/effects/chem/foam.dm +++ b/code/game/objects/effects/chem/foam.dm @@ -150,9 +150,6 @@ /obj/structure/foamedmetal/ex_act(severity) qdel(src) -/obj/structure/foamedmetal/blob_act() - qdel(src) - /obj/structure/foamedmetal/bullet_act() if(metal == 1 || prob(50)) qdel(src) diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 9dfe1c3b19..ed518a6f53 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -52,10 +52,6 @@ prisonsecuritywarp += loc qdel(src) return - if("blobstart") - blobstart += loc - qdel(src) - return if("xeno_spawn") xeno_spawn += loc qdel(src) diff --git a/code/game/objects/effects/spawners/bombspawner.dm b/code/game/objects/effects/spawners/bombspawner.dm index 547931a511..fb4716043f 100644 --- a/code/game/objects/effects/spawners/bombspawner.dm +++ b/code/game/objects/effects/spawners/bombspawner.dm @@ -105,27 +105,61 @@ qdel(src) */ +/client/proc/spawn_tanktransferbomb() + set category = "Debug" + set desc = "Spawn a tank transfer valve bomb" + set name = "Instant TTV" + + if(!check_rights(R_SPAWN)) return + + var/obj/effect/spawner/newbomb/proto = /obj/effect/spawner/newbomb/radio/custom + + var/p = input("Enter phoron amount (mol):","Phoron", initial(proto.phoron_amt)) as num|null + if(p == null) return + + var/o = input("Enter oxygen amount (mol):","Oxygen", initial(proto.oxygen_amt)) as num|null + if(o == null) return + + var/c = input("Enter carbon dioxide amount (mol):","Carbon Dioxide", initial(proto.carbon_amt)) as num|null + if(c == null) return + + new /obj/effect/spawner/newbomb/radio/custom(get_turf(mob), p, o, c) + /obj/effect/spawner/newbomb - name = "bomb" + name = "TTV bomb" icon = 'icons/mob/screen1.dmi' icon_state = "x" - var/btype = 0 // 0=radio, 1=prox, 2=time + + var/assembly_type = /obj/item/device/assembly/signaler + + //Note that the maximum amount of gas you can put in a 70L air tank at 1013.25 kPa and 519K is 16.44 mol. + var/phoron_amt = 10.96 + var/oxygen_amt = 16.44 + var/carbon_amt = 0.0 - timer - btype = 2 +/obj/effect/spawner/newbomb/timer + name = "TTV bomb - timer" + assembly_type = /obj/item/device/assembly/timer - syndicate +/obj/effect/spawner/newbomb/timer/syndicate + name = "TTV bomb - merc" + //High yield bombs. Yes, it is possible to make these with toxins + phoron_amt = 15.66 + oxygen_amt = 24.66 - proximity - btype = 1 +/obj/effect/spawner/newbomb/proximity + name = "TTV bomb - proximity" + assembly_type = /obj/item/device/assembly/prox_sensor - radio - btype = 0 - - -/obj/effect/spawner/newbomb/New() +/obj/effect/spawner/newbomb/radio/custom/New(var/newloc, ph, ox, co) + if(ph != null) phoron_amt = ph + if(ox != null) oxygen_amt = ox + if(co != null) carbon_amt = co ..() +/obj/effect/spawner/newbomb/New(newloc) + ..(newloc) + var/obj/item/device/transfer_valve/V = new(src.loc) var/obj/item/weapon/tank/phoron/PT = new(V) var/obj/item/weapon/tank/oxygen/OT = new(V) @@ -137,28 +171,15 @@ OT.master = V PT.air_contents.temperature = PHORON_FLASHPOINT - PT.air_contents.adjust_multi("phoron", 12, "carbon_dioxide", 8) + PT.air_contents.gas["phoron"] = phoron_amt + PT.air_contents.gas["carbon_dioxide"] = carbon_amt + PT.air_contents.update_values() OT.air_contents.temperature = PHORON_FLASHPOINT - OT.air_contents.adjust_gas("oxygen", 20) + OT.air_contents.gas["oxygen"] = oxygen_amt + OT.air_contents.update_values() - var/obj/item/device/assembly/S - - switch (src.btype) - // radio - if (0) - - S = new/obj/item/device/assembly/signaler(V) - - // proximity - if (1) - - S = new/obj/item/device/assembly/prox_sensor(V) - - // timer - if (2) - - S = new/obj/item/device/assembly/timer(V) + var/obj/item/device/assembly/S = new assembly_type(V) V.attached_device = S diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 996726c81b..887bfe575a 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -108,9 +108,6 @@ else return -/obj/item/blob_act() - return - //user: The mob that is suiciding //damagetype: The type of damage the item will inflict on the user //BRUTELOSS = 1 diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index bc0f836487..20abf3401b 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -15,7 +15,7 @@ // // HOW TO REFILL THE DEVICE // -// It will need to be manually refilled with lights. +// It can be manually refilled or by clicking on a storage item containing lights. // If it's part of a robot module, it will charge when the Robot is inside a Recharge Station. // // EMAGGED FEATURES @@ -41,7 +41,7 @@ /obj/item/device/lightreplacer name = "light replacer" - desc = "A device to automatically replace lights. Refill with working lightbulbs." + desc = "A device to automatically replace lights. Refill with working lightbulbs or sheets of glass." icon = 'icons/obj/janitor.dmi' icon_state = "lightreplacer0" @@ -51,14 +51,13 @@ slot_flags = SLOT_BELT origin_tech = list(TECH_MAGNET = 3, TECH_MATERIAL = 2) - var/max_uses = 20 - var/uses = 0 + var/max_uses = 32 + var/uses = 32 var/emagged = 0 var/failmsg = "" var/charge = 0 /obj/item/device/lightreplacer/New() - uses = max_uses / 2 failmsg = "The [name]'s refill light blinks red." ..() @@ -73,8 +72,8 @@ user << "[src.name] is full." return else if(G.use(1)) - AddUses(5) - user << "You insert a piece of glass into the [src.name]. You have [uses] lights remaining." + AddUses(16) //Autolathe converts 1 sheet into 16 lights. + user << "You insert a piece of glass into \the [src.name]. You have [uses] light\s remaining." return else user << "You need one sheet of glass to replace lights." @@ -84,7 +83,7 @@ if(L.status == 0) // LIGHT OKAY if(uses < max_uses) AddUses(1) - user << "You insert the [L.name] into the [src.name]. You have [uses] lights remaining." + user << "You insert \the [L.name] into \the [src.name]. You have [uses] light\s remaining." user.drop_item() qdel(L) return @@ -92,7 +91,6 @@ user << "You need a working light." return - /obj/item/device/lightreplacer/attack_self(mob/user) /* // This would probably be a bit OP. If you want it though, uncomment the code. if(isrobot(user)) diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 4135dda5f7..88b53bd342 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -100,17 +100,9 @@ if (src.loc != usr) return 0 if(tank_one && href_list["tankone"]) - split_gases() - valve_open = 0 - tank_one.loc = get_turf(src) - tank_one = null - update_icon() + remove_tank(tank_one) else if(tank_two && href_list["tanktwo"]) - split_gases() - valve_open = 0 - tank_two.loc = get_turf(src) - tank_two = null - update_icon() + remove_tank(tank_two) else if(href_list["open"]) toggle_valve() else if(attached_device) @@ -149,20 +141,43 @@ if(attached_device) overlays += "device" +/obj/item/device/transfer_valve/proc/remove_tank(obj/item/weapon/tank/T) + if(tank_one == T) + split_gases() + tank_one = null + else if(tank_two == T) + split_gases() + tank_two = null + else + return + + T.loc = get_turf(src) + update_icon() + /obj/item/device/transfer_valve/proc/merge_gases() + if(valve_open) + return tank_two.air_contents.volume += tank_one.air_contents.volume var/datum/gas_mixture/temp temp = tank_one.air_contents.remove_ratio(1) tank_two.air_contents.merge(temp) + valve_open = 1 /obj/item/device/transfer_valve/proc/split_gases() - if (!valve_open || !tank_one || !tank_two) + if(!valve_open) return + + valve_open = 0 + + if(deleted(tank_one) || deleted(tank_two)) + return + var/ratio1 = tank_one.air_contents.volume/tank_two.air_contents.volume var/datum/gas_mixture/temp temp = tank_two.air_contents.remove_ratio(ratio1) tank_one.air_contents.merge(temp) tank_two.air_contents.volume -= tank_one.air_contents.volume + /* Exadv1: I know this isn't how it's going to work, but this was just to check @@ -170,8 +185,7 @@ */ /obj/item/device/transfer_valve/proc/toggle_valve() - if(valve_open==0 && (tank_one && tank_two)) - valve_open = 1 + if(!valve_open && (tank_one && tank_two)) var/turf/bombturf = get_turf(src) var/area/A = get_area(bombturf) @@ -197,16 +211,11 @@ message_admins(log_str, 0, 1) log_game(log_str) merge_gases() - spawn(20) // In case one tank bursts - for (var/i=0,i<5,i++) - src.update_icon() - sleep(10) - src.update_icon() else if(valve_open==1 && (tank_one && tank_two)) split_gases() - valve_open = 0 - src.update_icon() + + src.update_icon() // this doesn't do anything but the timer etc. expects it to be here // eventually maybe have it update icon to show state (timer, prox etc.) like old bombs diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 2c3fc80a31..d70333bc43 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -137,6 +137,7 @@ if (istype(O, /obj/item/stack)) var/obj/item/stack/S = O S.amount = produced + S.add_to_stacks(user) if (istype(O, /obj/item/weapon/storage)) //BubbleWrap - so newly formed boxes are empty for (var/obj/item/I in O) @@ -191,7 +192,7 @@ else if(get_amount() < used) return 0 - for(var/i = 1 to uses_charge) + for(var/i = 1 to charge_costs.len) var/datum/matter_synth/S = synths[i] S.use_charge(charge_costs[i] * used) // Doesn't need to be deleted return 1 @@ -264,8 +265,8 @@ return 0 var/datum/matter_synth/S = synths[1] . = round(S.get_charge() / charge_costs[1]) - if(uses_charge > 1) - for(var/i = 2 to uses_charge) + if(charge_costs.len > 1) + for(var/i = 2 to charge_costs.len) S = synths[i] . = min(., round(S.get_charge() / charge_costs[i])) return @@ -284,13 +285,13 @@ return return max_amount -/obj/item/stack/proc/add_to_stacks(mob/usr as mob) - for (var/obj/item/stack/item in usr.loc) +/obj/item/stack/proc/add_to_stacks(mob/user as mob) + for (var/obj/item/stack/item in user.loc) if (item==src) continue var/transfer = src.transfer_to(item) if (transfer) - usr << "You add a new [item.singular_name] to the stack. It now contains [item.amount] [item.singular_name]\s." + user << "You add a new [item.singular_name] to the stack. It now contains [item.amount] [item.singular_name]\s." if(!amount) break diff --git a/code/game/objects/items/weapons/circuitboards/computer/holodeckcontrol.dm b/code/game/objects/items/weapons/circuitboards/computer/holodeckcontrol.dm new file mode 100644 index 0000000000..db11c4de50 --- /dev/null +++ b/code/game/objects/items/weapons/circuitboards/computer/holodeckcontrol.dm @@ -0,0 +1,31 @@ +#ifndef T_BOARD +#error T_BOARD macro is not defined but we need it! +#endif + +/obj/item/weapon/circuitboard/holodeckcontrol + name = T_BOARD("holodeck control console") + build_path = /obj/machinery/computer/HolodeckControl + origin_tech = "programming=2;bluespace=2" + var/last_to_emag + var/linkedholodeck_area + var/list/supported_programs + var/list/restricted_programs + +/obj/item/weapon/circuitboard/holodeckcontrol/construct(var/obj/machinery/computer/HolodeckControl/HC) + if (..(HC)) + HC.supported_programs = supported_programs.Copy() + HC.restricted_programs = restricted_programs.Copy() + if(linkedholodeck_area) + HC.linkedholodeck = locate(linkedholodeck_area) + if(last_to_emag) + HC.last_to_emag = last_to_emag + HC.emagged = 1 + HC.safety_disabled = 1 + +/obj/item/weapon/circuitboard/holodeckcontrol/deconstruct(var/obj/machinery/computer/HolodeckControl/HC) + if (..(HC)) + linkedholodeck_area = HC.linkedholodeck_area + supported_programs = HC.supported_programs.Copy() + restricted_programs = HC.restricted_programs.Copy() + last_to_emag = HC.last_to_emag + HC.emergencyShutdown() diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index c1022c55d0..78665633cf 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -224,7 +224,7 @@ //Set the stop_messages to stop it from printing messages /obj/item/weapon/storage/proc/can_be_inserted(obj/item/W as obj, stop_messages = 0) if(!istype(W)) return //Not an item - + if(!usr.canUnEquip(W)) return 0 @@ -340,6 +340,21 @@ if(isrobot(user)) return //Robots can't interact with storage items. + if(istype(W, /obj/item/device/lightreplacer)) + var/obj/item/device/lightreplacer/LP = W + var/amt_inserted = 0 + var/turf/T = get_turf(user) + for(var/obj/item/weapon/light/L in src.contents) + if(L.status == 0) + if(LP.uses < LP.max_uses) + LP.AddUses(1) + amt_inserted++ + remove_from_storage(L, T) + qdel(L) + if(amt_inserted) + user << "You inserted [amt_inserted] light\s into \the [LP.name]. You have [LP.uses] light\s remaining." + return + if(!can_be_inserted(W)) return diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index b8e6fc6ecb..a8e4f5ac38 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -41,6 +41,10 @@ processing_objects.Remove(src) + if(istype(loc, /obj/item/device/transfer_valve)) + var/obj/item/device/transfer_valve/TTV = loc + TTV.remove_tank(src) + ..() /obj/item/weapon/tank/examine(mob/user) @@ -63,17 +67,6 @@ descriptive = "cold" user << "\The [src] feels [descriptive]." -/obj/item/weapon/tank/blob_act() - if(prob(50)) - var/turf/location = src.loc - if (!( istype(location, /turf) )) - qdel(src) - - if(src.air_contents) - location.assume_air(air_contents) - - qdel(src) - /obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() if (istype(src.loc, /obj/item/assembly)) @@ -260,7 +253,10 @@ qdel(src) else if(pressure > TANK_RUPTURE_PRESSURE) - //world << "[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]" + #ifdef FIREDBG + log_debug("[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]") + #endif + if(integrity <= 0) var/turf/simulated/T = get_turf(src) if(!T) @@ -272,7 +268,10 @@ integrity-- else if(pressure > TANK_LEAK_PRESSURE) - //world << "[x],[y] tank is leaking: [pressure] kPa, integrity [integrity]" + #ifdef FIREDBG + log_debug("[x],[y] tank is leaking: [pressure] kPa, integrity [integrity]") + #endif + if(integrity <= 0) var/turf/simulated/T = get_turf(src) if(!T) diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index ab2144e378..0f5cebc44d 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -180,10 +180,6 @@ health = 0 healthcheck() -/obj/effect/energy_net/blob_act() - health = 0 - healthcheck() - /obj/effect/energy_net/attack_hand(var/mob/user) var/mob/living/carbon/human/H = user diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 800659307e..51e97c66aa 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -46,7 +46,11 @@ /obj/proc/CouldUseTopic(var/mob/user) var/atom/host = nano_host() - host.add_hiddenprint(user) + if(!isAI(user) && host.Adjacent(user)) + // We are -probably- in physical contact with the object, better than how Topics() previously did it and always applied fingerprints. + host.add_fingerprint(user) + else + host.add_hiddenprint(user) /obj/proc/CouldNotUseTopic(var/mob/user) // Nada diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 1f25043e89..f8b9c37ae4 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -28,10 +28,6 @@ return ..() -/obj/structure/blob_act() - if(prob(50)) - qdel(src) - /obj/structure/attack_tk() return diff --git a/code/game/objects/structures/alien/alien.dm b/code/game/objects/structures/alien/alien.dm new file mode 100644 index 0000000000..df94cf95ac --- /dev/null +++ b/code/game/objects/structures/alien/alien.dm @@ -0,0 +1,61 @@ +/obj/structure/alien + name = "alien thing" + desc = "There's something alien about this." + icon = 'icons/mob/alien.dmi' + var/health = 50 + +/obj/structure/alien/proc/healthcheck() + if(health <=0) + density = 0 + qdel(src) + return + +/obj/structure/alien/bullet_act(var/obj/item/projectile/Proj) + health -= Proj.damage + ..() + healthcheck() + return + +/obj/structure/alien/ex_act(severity) + switch(severity) + if(1.0) + health-=50 + if(2.0) + health-=50 + if(3.0) + if (prob(50)) + health-=50 + else + health-=25 + healthcheck() + return + +/obj/structure/alien/hitby(AM as mob|obj) + ..() + visible_message("\The [src] was hit by \the [AM].") + var/tforce = 0 + if(ismob(AM)) + tforce = 10 + else + tforce = AM:throwforce + playsound(loc, 'sound/effects/attackblob.ogg', 100, 1) + health = max(0, health - tforce) + healthcheck() + ..() + return + +/obj/structure/alien/attack_generic() + attack_hand(usr) + +/obj/structure/alien/attackby(var/obj/item/weapon/W, var/mob/user) + health = max(0, health - W.force) + playsound(loc, 'sound/effects/attackblob.ogg', 100, 1) + healthcheck() + ..() + return + +/obj/structure/alien/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) + if(air_group) return 0 + if(istype(mover) && mover.checkpass(PASSGLASS)) + return !opacity + return !density \ No newline at end of file diff --git a/code/game/objects/structures/alien/egg.dm b/code/game/objects/structures/alien/egg.dm new file mode 100644 index 0000000000..c16c1a182e --- /dev/null +++ b/code/game/objects/structures/alien/egg.dm @@ -0,0 +1,96 @@ +#define MAX_PROGRESS 100 + +/obj/structure/alien/egg + desc = "It looks like a weird egg." + name = "egg" + icon_state = "egg_growing" + density = 0 + anchored = 1 + var/progress = 0 + +/obj/structure/alien/egg/New() + ..() + processing_objects += src + +/obj/structure/alien/egg/Destroy() + processing_objects -= src + ..() + +/obj/structure/alien/egg/CanUseTopic(var/mob/user) + return isobserver(user) ? STATUS_INTERACTIVE : STATUS_CLOSE + +/obj/structure/alien/egg/Topic(href, href_list) + if(..()) + return 1 + + if(href_list["spawn"]) + attack_ghost(usr) + +/obj/structure/alien/egg/process() + progress++ + if(progress >= MAX_PROGRESS) + for(var/mob/M in dead_mob_list) + if(istype(M,/mob/dead) && M.client && M.client.prefs && (M.client.prefs.be_special & BE_ALIEN)) + M << "An alien is ready to hatch! ([ghost_follow_link(src, M)]) (spawn)" + processing_objects -= src + update_icon() + +/obj/structure/alien/egg/update_icon() + if(progress == -1) + icon_state = "egg_hatched" + else if(progress < MAX_PROGRESS) + icon_state = "egg_growing" + else + icon_state = "egg" + +/obj/structure/alien/egg/attack_ghost(var/mob/dead/observer/user) + if(progress == -1) //Egg has been hatched. + return + + if(progress < MAX_PROGRESS) + user << "\The [src] has not yet matured." + return + + if(!user.MayRespawn(1)) + return + + // Check for bans properly. + if(jobban_isbanned(user, "Xenomorph")) + user << "You are banned from playing a Xenomorph." + return + + var/confirm = alert(user, "Are you sure you want to join as a Xenomorph larva?", "Become Larva", "No", "Yes") + + if(!src || confirm != "Yes") + return + + if(!user || !user.ckey) + return + + if(progress == -1) //Egg has been hatched. + user << "Too slow..." + return + + flick("egg_opening",src) + progress = -1 // No harvesting pls. + sleep(5) + + if(!src || !user) + visible_message("\The [src] writhes with internal motion, but nothing comes out.") + progress = MAX_PROGRESS // Someone else can have a go. + return // What a pain. + + // Create the mob, transfer over key. + var/mob/living/carbon/alien/larva/larva = new(get_turf(src)) + larva.ckey = user.ckey + spawn(-1) + if(user) qdel(user) // Remove the keyless ghost if it exists. + + visible_message("\The [src] splits open with a wet slithering noise, and \the [larva] writhes free!") + + // Turn us into a hatched egg. + name = "hatched alien egg" + desc += " This one has hatched." + update_icon() + +#undef MAX_PROGRESS diff --git a/code/game/objects/structures/alien/node.dm b/code/game/objects/structures/alien/node.dm new file mode 100644 index 0000000000..15a9062862 --- /dev/null +++ b/code/game/objects/structures/alien/node.dm @@ -0,0 +1,19 @@ +/obj/structure/alien/node + name = "alien weed node" + desc = "Some kind of strange, pulsating structure." + icon_state = "weednode" + health = 100 + layer = 3.1 + +/obj/structure/alien/node/New() + ..() + processing_objects += src + +/obj/structure/alien/node/Destroy() + processing_objects -= src + ..() + +/obj/structure/alien/node/process() + if(locate(/obj/effect/plant) in loc) + return + new /obj/effect/plant(get_turf(src), plant_controller.seeds["xenomorph"]) diff --git a/code/game/objects/structures/alien/resin.dm b/code/game/objects/structures/alien/resin.dm new file mode 100644 index 0000000000..05f6bca0e7 --- /dev/null +++ b/code/game/objects/structures/alien/resin.dm @@ -0,0 +1,50 @@ +/obj/structure/alien/resin + name = "resin" + desc = "Looks like some kind of slimy growth." + icon_state = "resin" + + density = 1 + opacity = 1 + anchored = 1 + health = 200 + +/obj/structure/alien/resin/wall + name = "resin wall" + desc = "Purple slime solidified into a wall." + icon_state = "resinwall" + +/obj/structure/alien/resin/membrane + name = "resin membrane" + desc = "Purple slime just thin enough to let light pass through." + icon_state = "resinmembrane" + opacity = 0 + health = 120 + +/obj/structure/alien/resin/New() + ..() + var/turf/T = get_turf(src) + T.thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT + +/obj/structure/alien/resin/Destroy() + var/turf/T = get_turf(src) + T.thermal_conductivity = initial(T.thermal_conductivity) + ..() + +/obj/structure/alien/resin/attack_hand(var/mob/user) + if (HULK in user.mutations) + visible_message("\The [user] destroys \the [name]!") + health = 0 + else + // Aliens can get straight through these. + if(istype(user,/mob/living/carbon)) + var/mob/living/carbon/M = user + if(locate(/obj/item/organ/xenos/hivenode) in M.internal_organs) + visible_message("\The [user] strokes \the [name] and it melts away!") + health = 0 + healthcheck() + return + visible_message("\The [user] claws at \the [src]!") + // Todo check attack datums. + health -= rand(5,10) + healthcheck() + return \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index b680002df8..105f2987df 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -196,13 +196,6 @@ return -// this should probably use dump_contents() -/obj/structure/closet/blob_act() - if(prob(75)) - for(var/atom/movable/A as mob|obj in src) - A.forceMove(src.loc) - qdel(src) - /obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob) if(src.opened) if(istype(W, /obj/item/weapon/grab)) diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm index 3f5508fb97..2ff44ee9df 100644 --- a/code/game/objects/structures/crates_lockers/closets/statue.dm +++ b/code/game/objects/structures/crates_lockers/closets/statue.dm @@ -96,10 +96,6 @@ for(var/mob/M in src) shatter(M) -/obj/structure/closet/statue/blob_act() - for(var/mob/M in src) - shatter(M) - /obj/structure/closet/statue/ex_act(severity) for(var/mob/M in src) M.ex_act(severity) diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 5d5b88b886..8ce2a88f24 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -34,15 +34,6 @@ src.healthcheck() return - -/obj/structure/displaycase/blob_act() - if (prob(75)) - new /obj/item/weapon/material/shard( src.loc ) - if (occupied) - new /obj/item/weapon/gun/energy/captain( src.loc ) - occupied = 0 - qdel(src) - /obj/structure/displaycase/proc/healthcheck() if (src.health <= 0) if (!( src.destroyed )) diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 8274576641..0e2efb1c9e 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -202,10 +202,6 @@ return return ..() -/obj/structure/girder/blob_act() - if(prob(40)) - qdel(src) - /obj/structure/girder/ex_act(severity) switch(severity) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index f3f70d53d8..0691d3d68e 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -16,9 +16,6 @@ /obj/structure/grille/ex_act(severity) qdel(src) -/obj/structure/grille/blob_act() - qdel(src) - /obj/structure/grille/update_icon() if(destroyed) icon_state = "[initial(icon_state)]-b" diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index c6b108825b..3d867111cc 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -60,9 +60,6 @@ deflate(1) return -/obj/structure/inflatable/blob_act() - deflate(1) - /obj/structure/inflatable/attack_hand(mob/user as mob) add_fingerprint(user) return diff --git a/code/game/objects/structures/lamarr_cage.dm b/code/game/objects/structures/lamarr_cage.dm deleted file mode 100644 index 13d6694822..0000000000 --- a/code/game/objects/structures/lamarr_cage.dm +++ /dev/null @@ -1,94 +0,0 @@ -/obj/structure/lamarr - name = "lab cage" - icon = 'icons/obj/stationobjs.dmi' - icon_state = "labcage1" - desc = "A glass lab container for storing interesting creatures." - density = 1 - anchored = 1 - unacidable = 1//Dissolving the case would also delete Lamarr - var/health = 30 - var/occupied = 1 - var/destroyed = 0 - -/obj/structure/lamarr/ex_act(severity) - switch(severity) - if (1) - new /obj/item/weapon/material/shard( src.loc ) - Break() - qdel(src) - if (2) - if (prob(50)) - src.health -= 15 - src.healthcheck() - if (3) - if (prob(50)) - src.health -= 5 - src.healthcheck() - - -/obj/structure/lamarr/bullet_act(var/obj/item/projectile/Proj) - health -= Proj.damage - ..() - src.healthcheck() - return - - -/obj/structure/lamarr/blob_act() - if (prob(75)) - new /obj/item/weapon/material/shard( src.loc ) - Break() - qdel(src) - -/obj/structure/lamarr/proc/healthcheck() - if (src.health <= 0) - if (!( src.destroyed )) - src.density = 0 - src.destroyed = 1 - new /obj/item/weapon/material/shard( src.loc ) - playsound(src, "shatter", 70, 1) - Break() - else - playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) - return - -/obj/structure/lamarr/update_icon() - if(src.destroyed) - src.icon_state = "labcageb[src.occupied]" - else - src.icon_state = "labcage[src.occupied]" - return - - -/obj/structure/lamarr/attackby(obj/item/weapon/W as obj, mob/user as mob) - src.health -= W.force - src.healthcheck() - ..() - return - -/obj/structure/lamarr/attack_hand(mob/user as mob) - if (src.destroyed) - return - else - usr << "You kick the lab cage." - for(var/mob/O in oviewers()) - if ((O.client && !( O.blinded ))) - O << "[usr] kicks the lab cage." - src.health -= 2 - healthcheck() - return - -/obj/structure/lamarr/proc/Break() - if(occupied) - new /obj/item/clothing/mask/facehugger/lamarr(src.loc) - occupied = 0 - update_icon() - return - -/obj/item/clothing/mask/facehugger/lamarr - name = "Lamarr" - desc = "The worst she might do is attempt to... couple with your head."//hope we don't get sued over a harmless reference, rite? - sterile = 1 - gender = FEMALE - -/obj/item/clothing/mask/facehugger/lamarr/New()//to prevent deleting it if aliums are disabled - return diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index cc87be62fa..3b5bdb56aa 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -34,10 +34,6 @@ L.updateOverlays(src.loc) ..() -/obj/structure/lattice/blob_act() - qdel(src) - return - /obj/structure/lattice/ex_act(severity) switch(severity) if(1.0) diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm index e0923119b0..a3904f65a1 100644 --- a/code/game/objects/structures/safe.dm +++ b/code/game/objects/structures/safe.dm @@ -160,10 +160,6 @@ FLOOR SAFES return -obj/structure/safe/blob_act() - return - - obj/structure/safe/ex_act(severity) return diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index f5c988ae97..38d3e5cde7 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -19,10 +19,6 @@ else return -/obj/structure/sign/blob_act() - qdel(src) - return - /obj/structure/sign/attackby(obj/item/tool as obj, mob/user as mob) //deconstruction if(istype(tool, /obj/item/weapon/screwdriver) && !istype(src, /obj/structure/sign/double)) user << "You unfasten the sign with your [tool]." diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index 29c504edd3..73914e113c 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -86,11 +86,6 @@ qdel(src) return -/obj/structure/bed/blob_act() - if(prob(75)) - material.place_sheet(get_turf(src)) - qdel(src) - /obj/structure/bed/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W, /obj/item/weapon/wrench)) playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm index 8b9fea541b..1faf83f441 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -98,11 +98,6 @@ var/global/list/stool_cache = list() //haha stool qdel(src) return -/obj/item/weapon/stool/blob_act() - if(prob(75)) - material.place_sheet(get_turf(src)) - qdel(src) - /obj/item/weapon/stool/proc/dismantle() if(material) material.place_sheet(get_turf(src)) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 43305bedb9..440cc6a8a2 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -122,10 +122,6 @@ shatter(0) return - -/obj/structure/window/blob_act() - shatter() - //TODO: Make full windows a separate type of window. //Once a full window, it will always be a full window, so there's no point //having the same type for both. diff --git a/code/game/turfs/simulated/floor_acts.dm b/code/game/turfs/simulated/floor_acts.dm index 73fa3e01a3..2157397050 100644 --- a/code/game/turfs/simulated/floor_acts.dm +++ b/code/game/turfs/simulated/floor_acts.dm @@ -43,6 +43,3 @@ for(var/obj/structure/window/W in src) if(W.dir == dir_to || W.is_fulltile()) //Same direction or diagonal (full tile) W.fire_act(adj_air, adj_temp, adj_volume) - -/turf/simulated/floor/blob_act() - return diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index d703fdcbd3..8c79f20403 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -193,10 +193,6 @@ else return -/turf/simulated/wall/blob_act() - take_damage(rand(75, 125)) - return - // Wall-rot effect, a nasty fungus that destroys walls. /turf/simulated/wall/proc/rot() if(locate(/obj/effect/overlay/wallrot) in src) diff --git a/code/global.dm b/code/global.dm index 61835c9afd..ea2be0b044 100644 --- a/code/global.dm +++ b/code/global.dm @@ -71,7 +71,6 @@ var/list/tdomeobserve = list() var/list/tdomeadmin = list() var/list/prisonsecuritywarp = list() // Prison security goes to these. var/list/prisonwarped = list() // List of players already warped. -var/list/blobstart = list() var/list/ninjastart = list() var/list/cardinal = list(NORTH, SOUTH, EAST, WEST) @@ -83,7 +82,6 @@ var/list/reverse_dir = list( // reverse_dir[dir] = reverse of dir 23, 28, 30, 29, 31, 48, 50, 49, 51, 56, 58, 57, 59, 52, 54, 53, 55, 60, 62, 61, 63 ) -var/datum/station_state/start_state = null var/datum/configuration/config = null var/datum/sun/sun = null diff --git a/code/modules/admin/admin_attack_log.dm b/code/modules/admin/admin_attack_log.dm index 967a4375da..918739ec8f 100644 --- a/code/modules/admin/admin_attack_log.dm +++ b/code/modules/admin/admin_attack_log.dm @@ -1,6 +1,9 @@ /mob/var/lastattacker = null /mob/var/lastattacked = null -/mob/var/attack_log = list( ) +/mob/var/attack_log = list() + +proc/log_and_message_admins_with_location(var/message, var/x, var/y, var/z, var/mob/user = usr) + log_and_message_admins("[message] (JMP)", user) proc/log_and_message_admins(var/message as text, var/mob/user = usr) log_admin(user ? "[key_name(user)] [message]" : "EVENT [message]") diff --git a/code/modules/admin/map_capture.dm b/code/modules/admin/map_capture.dm index b9d564d192..ced6d257bf 100644 --- a/code/modules/admin/map_capture.dm +++ b/code/modules/admin/map_capture.dm @@ -1,10 +1,17 @@ -/datum/admins/proc/capture_map(tx as num, ty as num, tz as num, range as num) +/datum/admins/proc/capture_map(tx as null|num, ty as null|num, tz as null|num, range as null|num) set category = "Server" set name = "Capture Map Part" + set desc = "Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range (captures part of a map originating from bottom left corner)" if(!check_rights(R_ADMIN|R_DEBUG|R_SERVER)) return + if(isnull(tx) || isnull(ty) || isnull(tz) || isnull(range)) + usr << "Capture Map Part, captures part of a map using camara like rendering." + usr << "Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range" + usr << "Target coordinates specify bottom left corner of the capture, range defines render distance to opposite corner." + return + if(range > 32 || range <= 0) usr << "Capturing range is incorrect, it must be within 1-32." return @@ -45,5 +52,8 @@ var/yoff = (A.y - ty) * 32 cap.Blend(img, blendMode2iconMode(A.blend_mode), A.pixel_x + xoff, A.pixel_y + yoff) - - usr << browse_rsc(cap, "map_capture_x[tx]_y[ty]_z[tz]_r[range].png") \ No newline at end of file + var/file_name = "map_capture_x[tx]_y[ty]_z[tz]_r[range].png" + usr << "Saved capture in cache as [file_name]." + usr << browse_rsc(cap, file_name) + else + usr << "Target coordinates are incorrect." diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index a76565bf75..53ff4c3a75 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1119,16 +1119,6 @@ log_admin("[key_name(usr)] AIized [key_name(H)]") H.AIize() - else if(href_list["makealien"]) - if(!check_rights(R_SPAWN)) return - - var/mob/living/carbon/human/H = locate(href_list["makealien"]) - if(!istype(H)) - usr << "This can only be used on instances of type /mob/living/carbon/human" - return - - usr.client.cmd_admin_alienize(H) - else if(href_list["makeslime"]) if(!check_rights(R_SPAWN)) return diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 11591be4b1..9154badcc6 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -16,6 +16,7 @@ // callproc moved to code/modules/admin/callproc + /client/proc/Cell() set category = "Debug" set name = "Cell" @@ -100,23 +101,6 @@ paiController.pai_candidates.Remove(candidate) feedback_add_details("admin_verb","MPAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/cmd_admin_alienize(var/mob/M in mob_list) - set category = "Fun" - set name = "Make Alien" - - if(!ticker) - alert("Wait until the game starts") - return - if(ishuman(M)) - log_admin("[key_name(src)] has alienized [M.key].") - spawn(10) - M:Alienize() - feedback_add_details("admin_verb","MKAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - log_admin("[key_name(usr)] made [key_name(M)] into an alien.") - message_admins("\blue [key_name_admin(usr)] made [key_name(M)] into an alien.", 1) - else - alert("Invalid mob") - /client/proc/cmd_admin_slimeize(var/mob/M in mob_list) set category = "Fun" set name = "Make slime" diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index bd3c4be0d9..29d2b95d88 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -162,6 +162,7 @@ var/list/debug_verbs = list ( ,/client/proc/testZAScolors_remove ,/client/proc/setup_supermatter_engine ,/client/proc/atmos_toggle_debug + ,/client/proc/spawn_tanktransferbomb ) diff --git a/code/modules/admin/view_variables/topic.dm b/code/modules/admin/view_variables/topic.dm index c842170b6b..6f05d00de6 100644 --- a/code/modules/admin/view_variables/topic.dm +++ b/code/modules/admin/view_variables/topic.dm @@ -278,20 +278,6 @@ return holder.Topic(href, list("makerobot"=href_list["makerobot"])) - else if(href_list["makealien"]) - if(!check_rights(R_SPAWN)) return - - var/mob/living/carbon/human/H = locate(href_list["makealien"]) - if(!istype(H)) - usr << "This can only be done to instances of type /mob/living/carbon/human" - return - - if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return - if(!H) - usr << "Mob doesn't exist anymore" - return - holder.Topic(href, list("makealien"=href_list["makealien"])) - else if(href_list["makeslime"]) if(!check_rights(R_SPAWN)) return diff --git a/code/modules/blob/blob.dm b/code/modules/blob/blob.dm new file mode 100644 index 0000000000..a2de592b84 --- /dev/null +++ b/code/modules/blob/blob.dm @@ -0,0 +1,206 @@ +//I will need to recode parts of this but I am way too tired atm +/obj/effect/blob + name = "blob" + icon = 'icons/mob/blob.dmi' + icon_state = "blob" + light_range = 3 + desc = "Some blob creature thingy" + density = 1 + opacity = 0 + anchored = 1 + mouse_opacity = 2 + + var/maxHealth = 30 + var/health + var/brute_resist = 4 + var/fire_resist = 1 + var/expandType = /obj/effect/blob + +/obj/effect/blob/New(loc) + health = maxHealth + update_icon() + return ..(loc) + +/obj/effect/blob/CanPass(var/atom/movable/mover, vra/turf/target, var/height = 0, var/air_group = 0) + if(air_group || height == 0) + return 1 + return 0 + +/obj/effect/blob/ex_act(var/severity) + switch(severity) + if(1) + take_damage(rand(100, 120) / brute_resist) + if(2) + take_damage(rand(60, 100) / brute_resist) + if(3) + take_damage(rand(20, 60) / brute_resist) + +/obj/effect/blob/update_icon() + if(health > maxHealth / 2) + icon_state = "blob" + else + icon_state = "blob_damaged" + +/obj/effect/blob/proc/take_damage(var/damage) + health -= damage + if(health < 0) + playsound(loc, 'sound/effects/splat.ogg', 50, 1) + qdel(src) + else + update_icon() + +/obj/effect/blob/proc/regen() + health = min(health + 1, maxHealth) + update_icon() + +/obj/effect/blob/proc/expand(var/turf/T) + if(istype(T, /turf/unsimulated/) || istype(T, /turf/space)) + return + if(istype(T, /turf/simulated/wall)) + var/turf/simulated/wall/SW = T + SW.take_damage(80) + return + var/obj/structure/girder/G = locate() in T + if(G) + if(prob(40)) + G.dismantle() + return + var/obj/structure/window/W = locate() in T + if(W) + W.shatter() + return + var/obj/structure/grille/GR = locate() in T + if(GR) + qdel(GR) + return + for(var/obj/machinery/door/D in T) // There can be several - and some of them can be open, locate() is not suitable + if(D.density) + D.ex_act(2) + return + var/obj/structure/foamedmetal/F = locate() in T + if(F) + qdel(F) + return + var/obj/structure/inflatable/I = locate() in T + if(I) + I.deflate(1) + return + + var/obj/vehicle/V = locate() in T + if(V) + V.ex_act(2) + return + var/obj/machinery/bot/B = locate() in T + if(B) + B.ex_act(2) + return + var/obj/mecha/M = locate() in T + if(M) + M.visible_message("The blob attacks \the [M]!") + M.take_damage(40) + return + + // Above things, we destroy completely and thus can use locate. Mobs are different. + for(var/mob/living/L in T) + if(L.stat == DEAD) + continue + L.visible_message("The blob attacks \the [L]!", "The blob attacks you!") + playsound(loc, 'sound/effects/attackblob.ogg', 50, 1) + L.take_organ_damage(rand(30, 40)) + return + new expandType(T, min(health, 30)) + +/obj/effect/blob/proc/pulse(var/forceLeft, var/list/dirs) + regen() + sleep(5) + var/pushDir = pick(dirs) + var/turf/T = get_step(src, pushDir) + var/obj/effect/blob/B = (locate() in T) + if(!B) + if(prob(health)) + expand(T) + return + B.pulse(forceLeft - 1, dirs) + +/obj/effect/blob/bullet_act(var/obj/item/projectile/Proj) + if(!Proj) + return + + switch(Proj.damage_type) + if(BRUTE) + take_damage(Proj.damage / brute_resist) + if(BURN) + take_damage(Proj.damage / fire_resist) + return 0 + +/obj/effect/blob/attackby(var/obj/item/weapon/W, var/mob/user) + user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) + playsound(loc, 'sound/effects/attackblob.ogg', 50, 1) + visible_message("\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]") + var/damage = 0 + switch(W.damtype) + if("fire") + damage = (W.force / fire_resist) + if(istype(W, /obj/item/weapon/weldingtool)) + playsound(loc, 'sound/items/Welder.ogg', 100, 1) + if("brute") + damage = (W.force / brute_resist) + + take_damage(damage) + return + +/obj/effect/blob/core + name = "blob core" + icon = 'icons/mob/blob.dmi' + icon_state = "blob_core" + maxHealth = 200 + brute_resist = 2 + fire_resist = 2 + + expandType = /obj/effect/blob/shield + +/obj/effect/blob/core/update_icon() + return + +/obj/effect/blob/core/New(loc) + processing_objects.Add(src) + return ..(loc) + +/obj/effect/blob/core/Destroy() + processing_objects.Remove(src) + return ..() + +/obj/effect/blob/core/process() + pulse(20, list(NORTH, EAST)) + pulse(20, list(NORTH, WEST)) + pulse(20, list(SOUTH, EAST)) + pulse(20, list(SOUTH, WEST)) + +/obj/effect/blob/shield + name = "strong blob" + icon = 'icons/mob/blob.dmi' + icon_state = "blob_idle" + desc = "Some blob creature thingy" + maxHealth = 60 + brute_resist = 1 + fire_resist = 2 + +/obj/effect/blob/shield/New() + ..() + update_nearby_tiles() + +/obj/effect/blob/shield/Destroy() + density = 0 + update_nearby_tiles() + ..() + +/obj/effect/blob/shield/update_icon() + if(health > maxHealth * 2 / 3) + icon_state = "blob_idle" + else if(health > maxHealth / 3) + icon_state = "blob" + else + icon_state = "blob_damaged" + +/obj/effect/blob/shield/CanPass(var/atom/movable/mover, var/turf/target, var/height = 0, var/air_group = 0) + return !density diff --git a/code/modules/events/blob.dm b/code/modules/events/blob.dm index c478a28daa..7ca66a8260 100644 --- a/code/modules/events/blob.dm +++ b/code/modules/events/blob.dm @@ -1,6 +1,5 @@ /datum/event/blob announceWhen = 12 - endWhen = 120 var/obj/effect/blob/core/Blob @@ -8,16 +7,20 @@ level_seven_announcement() /datum/event/blob/start() - var/turf/T = pick(blobstart) + var/turf/T = pick_area_turf(/area/maintenance, list(/proc/is_station_turf, /proc/not_turf_contains_dense_objects)) if(!T) + log_and_message_admins("Blob failed to find a viable turf.") kill() return - Blob = new /obj/effect/blob/core(T, 120) + + log_and_message_admins_with_location("Event: Blob spawned at \the [get_area(T)] ([T.x],[T.y],[T.z])", T.x, T.y, T.z) + Blob = new /obj/effect/blob/core(T) for(var/i = 1; i < rand(3, 4), i++) Blob.process() /datum/event/blob/tick() - if(!Blob) + if(!Blob || !Blob.loc) + Blob = null kill() return if(IsMultiple(activeFor, 3)) diff --git a/code/modules/holodeck/HolodeckControl.dm b/code/modules/holodeck/HolodeckControl.dm index 18e061f273..2e62403432 100644 --- a/code/modules/holodeck/HolodeckControl.dm +++ b/code/modules/holodeck/HolodeckControl.dm @@ -6,10 +6,13 @@ use_power = 1 active_power_usage = 8000 //8kW for the scenery + 500W per holoitem + + circuit = /obj/item/weapon/circuitboard/holodeckcontrol + var/item_power_usage = 500 var/area/linkedholodeck = null - var/area/target = null + var/linkedholodeck_area var/active = 0 var/list/holographic_objs = list() var/list/holographic_mobs = list() @@ -18,34 +21,39 @@ var/mob/last_to_emag = null var/last_change = 0 var/last_gravity_change = 0 - var/list/supported_programs = list( \ - "Empty Court" = "emptycourt", \ - "Basketball Court" = "basketball", \ - "Thunderdome Court" = "thunderdomecourt", \ - "Boxing Ring"="boxingcourt", \ - "Beach" = "beach", \ - "Desert" = "desert", \ - "Space" = "space", \ - "Picnic Area" = "picnicarea", \ - "Snow Field" = "snowfield", \ - "Theatre" = "theatre", \ - "Meeting Hall" = "meetinghall", \ - "Courtroom" = "courtroom" \ - ) - var/list/restricted_programs = list("Atmospheric Burn Simulation" = "burntest", "Wildlife Simulation" = "wildlifecarp") + var/list/supported_programs + var/list/restricted_programs + +/obj/machinery/computer/HolodeckControl/New() + ..() + linkedholodeck = locate(linkedholodeck_area) + supported_programs = list() + restricted_programs = list() /obj/machinery/computer/HolodeckControl/attack_ai(var/mob/user as mob) return src.attack_hand(user) /obj/machinery/computer/HolodeckControl/attack_hand(var/mob/user as mob) - if(..()) - return + return 1 user.set_machine(src) var/dat dat += "Holodeck Control System
" dat += "
Current Loaded Programs:
" + + if(!linkedholodeck) + dat += "Warning: Unable to locate holodeck.
" + user << browse(dat, "window=computer;size=400x500") + onclose(user, "computer") + return + + if(!supported_programs.len) + dat += "Warning: No supported holo-programs loaded.
" + user << browse(dat, "window=computer;size=400x500") + onclose(user, "computer") + return + for(var/prog in supported_programs) dat += "([prog])
" @@ -83,10 +91,8 @@ user << browse(dat, "window=computer;size=400x500") onclose(user, "computer") - return - /obj/machinery/computer/HolodeckControl/Topic(href, href_list) if(..()) return 1 @@ -132,8 +138,9 @@ user << "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call [company_name] maintenance and do not use the simulator." log_game("[key_name(usr)] emagged the Holodeck Control Computer") return 1 - src.updateUsrDialog() - return + src.updateUsrDialog() + else + ..() /obj/machinery/computer/HolodeckControl/proc/update_projections() if (safety_disabled) @@ -150,10 +157,6 @@ if (last_to_emag) C.friends = list(last_to_emag) -/obj/machinery/computer/HolodeckControl/New() - ..() - linkedholodeck = locate(/area/holodeck/alphadeck) - //This could all be done better, but it works for now. /obj/machinery/computer/HolodeckControl/Destroy() emergencyShutdown() @@ -163,11 +166,6 @@ emergencyShutdown() ..() - -/obj/machinery/computer/HolodeckControl/blob_act() - emergencyShutdown() - ..() - /obj/machinery/computer/HolodeckControl/power_change() var/oldstat ..() @@ -338,3 +336,28 @@ active = 0 use_power = 1 + +/obj/machinery/computer/HolodeckControl/Exodus + linkedholodeck_area = /area/holodeck/alphadeck + +/obj/machinery/computer/HolodeckControl/Exodus/New() + ..() + supported_programs = list( + "Empty Court" = "emptycourt", + "Basketball Court" = "basketball", + "Thunderdome Court" = "thunderdomecourt", + "Boxing Ring" = "boxingcourt", + "Beach" = "beach", + "Desert" = "desert", + "Space" = "space", + "Picnic Area" = "picnicarea", + "Snow Field" = "snowfield", + "Theatre" = "theatre", + "Meeting Hall" = "meetinghall", + "Courtroom" = "courtroom" + ) + + restricted_programs = list( + "Atmospheric Burn Simulation" = "burntest", + "Wildlife Simulation" = "wildlifecarp" + ) diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index efe3bf1da6..cce046e127 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -22,6 +22,7 @@ var/trash_type // Garbage item produced when eaten. var/splat_type = /obj/effect/decal/cleanable/fruit_smudge // Graffiti decal. var/has_mob_product + var/force_layer /datum/seed/New() diff --git a/code/modules/hydroponics/seed_datums.dm b/code/modules/hydroponics/seed_datums.dm index b8b0530788..97a4ba64e3 100644 --- a/code/modules/hydroponics/seed_datums.dm +++ b/code/modules/hydroponics/seed_datums.dm @@ -1106,3 +1106,23 @@ set_trait(TRAIT_PRODUCTION,7) set_trait(TRAIT_YIELD,3) set_trait(TRAIT_POTENCY,3) + +// Alien weeds. +/datum/seed/xenomorph + name = "xenomorph" + seed_name = "alien weed" + display_name = "alien weeds" + force_layer = 3 + chems = list("phoron" = list(1,3)) + +/datum/seed/xenomorph/New() + ..() + set_trait(TRAIT_PLANT_ICON,"vine2") + set_trait(TRAIT_IMMUTABLE,1) + set_trait(TRAIT_PRODUCT_COLOUR,"#3D1934") + set_trait(TRAIT_FLESH_COLOUR,"#3D1934") + set_trait(TRAIT_PLANT_COLOUR,"#3D1934") + set_trait(TRAIT_PRODUCTION,1) + set_trait(TRAIT_YIELD,-1) + set_trait(TRAIT_SPREAD,2) + set_trait(TRAIT_POTENCY,50) \ No newline at end of file diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index e8f2cfa918..0faf957787 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -3,15 +3,8 @@ /proc/spacevine_infestation(var/potency_min=70, var/potency_max=100, var/maturation_min=5, var/maturation_max=15) spawn() //to stop the secrets panel hanging - var/list/turf/simulated/floor/turfs = list() //list of all the empty floor turfs in the hallway areas - for(var/areapath in typesof(/area/hallway)) - var/area/A = locate(areapath) - for(var/turf/simulated/floor/F in A.contents) - if(turf_clear(F)) - turfs += F - - if(turfs.len) //Pick a turf to spawn at if we can - var/turf/simulated/floor/T = pick(turfs) + var/turf/T = pick_area_turf(/area/hallway, list(/proc/is_station_turf, /proc/not_turf_contains_dense_objects)) + if(T) var/datum/seed/seed = plant_controller.create_random_seed(1) seed.set_trait(TRAIT_SPREAD,2) // So it will function properly as vines. seed.set_trait(TRAIT_POTENCY,rand(potency_min, potency_max)) // 70-100 potency will help guarantee a wide spread and powerful effects. @@ -23,9 +16,9 @@ vine.mature_time = 0 vine.process() - message_admins("Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])") + log_and_message_admins_with_location("Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])", T.x, T.y, T.z) return - message_admins("Event: Spacevines failed to find a viable turf.") + log_and_message_admins("Event: Spacevines failed to find a viable turf.") /obj/effect/dead_plant anchored = 1 @@ -132,7 +125,7 @@ update_icon() plant_controller.add_plant(src) // Some plants eat through plating. - if(!isnull(seed.chems["pacid"])) + if(islist(seed.chems) && !isnull(seed.chems["pacid"])) var/turf/T = get_turf(src) T.ex_act(prob(80) ? 3 : 2) @@ -188,12 +181,12 @@ icon_state = "[seed.get_trait(TRAIT_PLANT_ICON)]-[growth]" if(growth>2 && growth == max_growth) - layer = 5 + layer = (seed && seed.force_layer) ? seed.force_layer : 5 opacity = 1 - if(!isnull(seed.chems["woodpulp"])) + if(islist(seed.chems) && !isnull(seed.chems["woodpulp"])) density = 1 else - layer = 3 + layer = (seed && seed.force_layer) ? seed.force_layer : 5 density = 0 /obj/effect/plant/proc/calc_dir() diff --git a/code/modules/materials/material_sheets.dm b/code/modules/materials/material_sheets.dm index fdb20ab119..a4379cf871 100644 --- a/code/modules/materials/material_sheets.dm +++ b/code/modules/materials/material_sheets.dm @@ -65,9 +65,10 @@ var/obj/item/stack/material/M = S if(!istype(M) || material.name != M.material.name) return 0 - ..(S,tamount,1) + var/transfer = ..(S,tamount,1) if(src) update_strings() if(M) M.update_strings() + return transfer /obj/item/stack/material/attack_self(var/mob/user) if(!material.build_windows(user, src)) @@ -207,4 +208,4 @@ desc = "This sheet is special platinum-glass alloy designed to withstand large temperatures. It is reinforced with few rods." singular_name = "reinforced borosilicate glass sheet" icon_state = "sheet-phoronrglass" - default_type = "reinforced borosilicate glass" \ No newline at end of file + default_type = "reinforced borosilicate glass" diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm index 71a669ab66..158c9ef876 100644 --- a/code/modules/materials/materials.dm +++ b/code/modules/materials/materials.dm @@ -127,8 +127,6 @@ var/list/name_to_material var/obj/item/stack/S = new rod_product(get_turf(user)) S.add_fingerprint(user) S.add_to_stacks(user) - if(!(user.l_hand && user.r_hand)) - user.put_in_hands(S) /material/proc/build_wired_product(var/mob/user, var/obj/item/stack/used_stack, var/obj/item/stack/target_stack) if(!wire_product) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 5d3915c7fd..83526bfc03 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -91,11 +91,14 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images /mob/dead/observer/Topic(href, href_list) if (href_list["track"]) - var/mob/target = locate(href_list["track"]) in mob_list - if(target) - ManualFollow(target) - - + if(istype(href_list["track"],/mob)) + var/mob/target = locate(href_list["track"]) in mob_list + if(target) + ManualFollow(target) + else + var/atom/target = locate(href_list["track"]) + if(istype(target)) + ManualFollow(target) /mob/dead/attackby(obj/item/W, mob/user) if(istype(W,/obj/item/weapon/book/tome)) @@ -149,7 +152,7 @@ Works together with spawning an observer, noted above. if(key) var/mob/dead/observer/ghost = new(src) //Transfer safety to observer spawning proc. ghost.can_reenter_corpse = can_reenter_corpse - ghost.timeofdeath = src.timeofdeath //BS12 EDIT + ghost.timeofdeath = src.stat == DEAD ? src.timeofdeath : world.time ghost.key = key if(ghost.client && !ghost.client.holder && !config.antag_hud_allowed) // 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! @@ -320,7 +323,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(following && following == target) return following = target - src << "Now following [target]" + src << "Now following \the [target]" if(ismob(target)) forceMove(get_turf(target)) var/mob/M = target diff --git a/code/modules/mob/language/language.dm b/code/modules/mob/language/language.dm index 2afb02ffd9..c42f76623c 100644 --- a/code/modules/mob/language/language.dm +++ b/code/modules/mob/language/language.dm @@ -136,7 +136,7 @@ var/datum/language/new_language = all_languages[language] - if(!istype(new_language) || new_language in languages) + if(!istype(new_language) || (new_language in languages)) return 0 languages.Add(new_language) diff --git a/code/modules/mob/living/blob/blob.dm b/code/modules/mob/living/blob/blob.dm deleted file mode 100644 index 8bbf517e60..0000000000 --- a/code/modules/mob/living/blob/blob.dm +++ /dev/null @@ -1,253 +0,0 @@ -/mob/living/blob - name = "blob fragment" - real_name = "blob fragment" - icon = 'icons/mob/blob.dmi' - icon_state = "blob_spore_temp" - pass_flags = PASSBLOB - see_in_dark = 8 - see_invisible = SEE_INVISIBLE_LEVEL_TWO - var/ghost_name = "Unknown" - var/creating_blob = 0 - faction = "blob" - use_me = 0 //Blobs can't emote - - - New() - real_name += " [pick(rand(1, 99))]" - name = real_name - ..() - - - say(var/message) - return//No talking for you - - - emote(var/act,var/m_type=1,var/message = null) - return - - - Life() - set invisibility = 0 - set background = 1 - - clamp_values() - UpdateDamage() - if(health < 0) - src.dust() - - - proc/clamp_values() - AdjustStunned(0) - AdjustParalysis(0) - AdjustWeakened(0) - sleeping = 0 - if(stat) - stat = CONSCIOUS - return - - - proc/UpdateDamage() - health = 60 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss()) - return - - - death(gibbed) - ghostize() - ..(gibbed) - - - blob_act() - src << "The blob attempts to reabsorb you." - adjustToxLoss(20) - return - - - Process_Spacemove() - if(locate(/obj/effect/blob) in oview(1,src)) - return 1 - return (..()) - - -/mob/living/blob/verb/create_node() - set category = "Blob" - set name = "Create Node" - set desc = "Create a Node." - if(creating_blob) return - var/turf/T = get_turf(src) - creating_blob = 1 - if(!T) - creating_blob = 0 - return - var/obj/effect/blob/B = (locate(/obj/effect/blob) in T) - if(!B)//We are on a blob - usr << "There is no blob here!" - creating_blob = 0 - return - if(istype(B,/obj/effect/blob/node)||istype(B,/obj/effect/blob/core)||istype(B,/obj/effect/blob/factory)) - usr << "Unable to use this blob, find a normal one." - creating_blob = 0 - return - for(var/obj/effect/blob/node/blob in orange(5)) - usr << "There is another node nearby, move more than 5 tiles away from it!" - creating_blob = 0 - return - for(var/obj/effect/blob/factory/blob in orange(2)) - usr << "There is a porus blob nearby, move more than 2 tiles away from it!" - creating_blob = 0 - B.change_to("Node") - src.dust() - return - - -/mob/living/blob/verb/create_factory() - set category = "Blob" - set name = "Create Defense" - set desc = "Create a Spore producing blob." - if(creating_blob) return - var/turf/T = get_turf(src) - creating_blob = 1 - if(!T) - creating_blob = 0 - return - var/obj/effect/blob/B = (locate(/obj/effect/blob) in T) - if(!B) - usr << "You must be on a blob!" - creating_blob = 0 - return - if(istype(B,/obj/effect/blob/node)||istype(B,/obj/effect/blob/core)||istype(B,/obj/effect/blob/factory)) - usr << "Unable to use this blob, find a normal one." - creating_blob = 0 - return - for(var/obj/effect/blob/blob in orange(2))//Not right next to nodes/cores - if(istype(B,/obj/effect/blob/node)) - usr << "There is a node nearby, move away from it!" - creating_blob = 0 - return - if(istype(B,/obj/effect/blob/core)) - usr << "There is a core nearby, move away from it!" - creating_blob = 0 - return - if(istype(B,/obj/effect/blob/factory)) - usr << "There is another porous blob nearby, move away from it!" - creating_blob = 0 - return - B.change_to("Factory") - src.dust() - return - - -/mob/living/blob/verb/revert() - set category = "Blob" - set name = "Purge Defense" - set desc = "Removes a porous blob." - if(creating_blob) return - var/turf/T = get_turf(src) - creating_blob = 1 - if(!T) - creating_blob = 0 - return - var/obj/effect/blob/B = (locate(/obj/effect/blob) in T) - if(!B) - usr << "You must be on a blob!" - creating_blob = 0 - return - if(!istype(B,/obj/effect/blob/factory)) - usr << "Unable to use this blob, find another one." - creating_blob = 0 - return - B.change_to("Normal") - src.dust() - return - - -/mob/living/blob/verb/spawn_blob() - set category = "Blob" - set name = "Create new blob" - set desc = "Attempts to create a new blob in this tile." - if(creating_blob) return - var/turf/T = get_turf(src) - creating_blob = 1 - if(!T) - creating_blob = 0 - return - var/obj/effect/blob/B = (locate(/obj/effect/blob) in T) - if(B) - usr << "There is a blob here!" - creating_blob = 0 - return - new/obj/effect/blob(src.loc) - src.dust() - return - - -///mob/proc/Blobize() -/client/proc/Blobcount() - set category = "Debug" - set name = "blobreport" - set desc = "blob report." - set hidden = 1 - - if(!holder) - src << "Only administrators may use this command." - return - if(ticker && ticker.mode) - src << "blobs: [blobs.len]" - src << "cores: [blob_cores.len]" - src << "nodes: [blob_nodes.len]" - return - - -/client/proc/Blobize()//Mostly stolen from the respawn command - set category = "Debug" - set name = "Ghostblob" - set desc = "Ghost into blobthing." - set hidden = 1 - - if(!holder) - src << "Only administrators may use this command." - return - var/input = input(src, "Please specify which key will be turned into a bloby.", "Key", "") - - var/mob/dead/observer/G_found - if(!input) - var/list/ghosts = list() - for(var/mob/dead/observer/G in player_list) - ghosts += G - if(ghosts.len) - G_found = pick(ghosts) - - else - for(var/mob/dead/observer/G in player_list) - if(G.client&&ckey(G.key)==ckey(input)) - G_found = G - break - - if(!G_found)//If a ghost was not found. - alert("There is no active key like that in the game or the person is not currently a ghost. Aborting command.") - return - - if(G_found.client) - G_found.client.screen.len = null - var/mob/living/blob/B = new/mob/living/blob(locate(0,0,1))//temp area also just in case should do this better but tired - if(blob_cores.len > 0) - var/obj/effect/blob/core/core = pick(blob_cores) - if(core) - B.loc = core.loc - B.ghost_name = G_found.real_name - if (G_found.client) - G_found.client.mob = B - B.verbs += /mob/living/blob/verb/create_node - B.verbs += /mob/living/blob/verb/create_factory - B << "You are now a blob fragment." - B << "You are a weak bit that has temporarily broken off of the blob." - B << "If you stay on the blob for too long you will likely be reabsorbed." - B << "If you stray from the blob you will likely be killed by other organisms." - B << "You have the power to create a new blob node that will help expand the blob." - B << "To create this node you will have to be on a normal blob tile and far enough away from any other node." - B << "Check your Blob verbs and hit Create Node to build a node." - spawn(10) - qdel(G_found) - - - - diff --git a/code/modules/mob/living/carbon/alien/alien_damage.dm b/code/modules/mob/living/carbon/alien/alien_damage.dm index 1483559120..99c5e52f75 100644 --- a/code/modules/mob/living/carbon/alien/alien_damage.dm +++ b/code/modules/mob/living/carbon/alien/alien_damage.dm @@ -31,26 +31,3 @@ adjustFireLoss(f_loss) updatehealth() - - - -/mob/living/carbon/alien/blob_act() - if (stat == 2) - return - var/shielded = 0 - - var/damage = null - if (stat != 2) - damage = rand(10,30) - - if(shielded) - damage /= 4 - - //paralysis += 1 - - show_message("\red The blob attacks you!") - - adjustFireLoss(damage) - - updatehealth() - return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 548eee230b..c67249dfe5 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -11,4 +11,5 @@ /mob/living/carbon/alien/larva/New() ..() add_language("Xenomorph") //Bonus language. - internal_organs |= new /obj/item/organ/xenos/hivenode(src) \ No newline at end of file + internal_organs |= new /obj/item/organ/xenos/hivenode(src) + create_reagents(100) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 8d40ef9d5a..5ca32e24d0 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -1,12 +1,34 @@ +#define MIN_LARVA_BLOOD_DRINK 0.5 + //Larvae regenerate health and nutrition from plasma and alien weeds. /mob/living/carbon/alien/larva/handle_environment(var/datum/gas_mixture/environment) if(!environment) return var/turf/T = get_turf(src) - if(environment.gas["phoron"] > 0 || (T && locate(/obj/effect/alien/weeds) in T.contents)) + var/obj/effect/plant/plant = locate() in T + if(environment.gas["phoron"] > 0 || (plant && plant.seed.type == /datum/seed/xenomorph)) update_progression() adjustBruteLoss(-1) adjustFireLoss(-1) adjustToxLoss(-1) - adjustOxyLoss(-1) \ No newline at end of file + adjustOxyLoss(-1) + +// Maybe not the -best- place but it's semiappropriate and fitting. +// Drink the blood of your host! +/mob/living/carbon/alien/larva/handle_chemicals_in_body() + if(!loc) + return + if(!istype(loc, /obj/item/weapon/holder)) + return + var/mob/living/carbon/human/M = loc.loc //ergh, replace with a flag sometime + if(!istype(M)) + return + if(M.vessel.total_volume > 0) + M.vessel.trans_to(src,min(M.vessel.total_volume,MIN_LARVA_BLOOD_DRINK)) + update_progression() + else + src << "This host is depleted of blood..." + leave_host() + +#undef MIN_LARVA_BLOOD_DRINK diff --git a/code/modules/mob/living/carbon/alien/larva/powers.dm b/code/modules/mob/living/carbon/alien/larva/powers.dm new file mode 100644 index 0000000000..57e3427163 --- /dev/null +++ b/code/modules/mob/living/carbon/alien/larva/powers.dm @@ -0,0 +1,111 @@ +/mob/living/carbon/alien/larva/proc/check_can_infest(var/mob/living/M) + if(!src) + return 0 + if(!istype(loc, /turf)) + src << "You cannot infest a target in your current position." + return 0 + if(incapacitated()) + src << "You cannot infest a target in your current state." + return 0 + if(!M) + return 1 + if(!M.lying) + src << "\The [M] is not prone." + return 0 + if(!(src.Adjacent(M))) + src << "\The [M] is not in range." + return 0 + return 1 + +/mob/living/carbon/alien/larva/verb/attach_host() + + set name = "Attach to host" + set desc = "Burrow into a prone victim and begin drinking their blood." + set category = "Abilities" + + if(!check_can_infest()) + return + + var/list/choices = list() + for(var/mob/living/carbon/human/H in view(1,src)) + if(isxenomorph(H)) + continue + if(src.Adjacent(H) && H.lying) + choices += H + + if(!choices.len) + src << "There are no viable hosts within range." + return + + var/mob/living/carbon/human/H = input(src,"Who do you wish to infest?") as null|anything in choices + + if(!H || !src || !H.lying) return + + visible_message("\The [src] begins questing blindly towards \the [H]'s warm flesh...") + + if(!do_after(src,30)) + return + + if(!check_can_infest(H)) + return + + var/obj/item/organ/external/E = pick(H.organs) + src << "You burrow deeply into \the [H]'s [E.name]!" + var/obj/item/weapon/holder/holder = new (loc) + src.loc = holder + holder.name = src.name + E.embed(holder,0,"\The [src] burrows deeply into \the [H]'s [E.name]!") + +/mob/living/carbon/alien/larva/verb/release_host() + set category = "Abilities" + set name = "Release Host" + set desc = "Release your host." + + if(incapacitated()) + src << "You cannot leave your host in your current state." + return + + if(!loc || !loc.loc) + src << "You are not inside a host." + return + + var/mob/living/carbon/human/H = loc.loc + + if(!istype(H)) + src << "You are not inside a host." + return + + src << "You begin writhing your way free of \the [H]'s flesh..." + + if(!do_after(src, 30)) + return + + if(!H || !src) + return + + leave_host() + +/mob/living/carbon/alien/larva/proc/leave_host() + if(!loc || !loc.loc) + src << "You are not inside a host." + return + var/mob/living/carbon/human/H = loc.loc + if(!istype(H)) + src << "You are not inside a host." + return + var/obj/item/weapon/holder/holder = loc + var/obj/item/organ/external/affected + if(istype(holder)) + for(var/obj/item/organ/external/organ in H.organs) //Grab the organ holding the implant. + for(var/obj/item/O in organ.implants) + if(O == holder) + affected = organ + break + affected.implants -= holder + holder.loc = get_turf(holder) + else + src.loc = get_turf(src) + if(affected) + src << "You crawl out of \the [H]'s [affected.name] and plop to the ground." + else + src << "You plop to the ground." \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index 429e82b3d0..4c40057812 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -9,8 +9,7 @@ ..() - if (stat != DEAD) //still breathing - // GROW! + if (stat != DEAD && can_progress()) update_progression() blinded = null @@ -18,6 +17,10 @@ //Status updates, death etc. update_icons() +/mob/living/carbon/alien/proc/can_progress() + return 1 + + /mob/living/carbon/alien/handle_mutations_and_radiation() // Currently both Dionaea and larvae like to eat radiation, so I'm defining the @@ -158,7 +161,7 @@ adjustFireLoss((environment.temperature - (T0C+66))/5) // Might be too high, check in testing. if (fire) fire.icon_state = "fire2" if(prob(20)) - src << "\red You feel a searing heat!" + src << "You feel a searing heat!" else if (fire) fire.icon_state = "fire0" diff --git a/code/modules/mob/living/carbon/alien/progression.dm b/code/modules/mob/living/carbon/alien/progression.dm index 54c7f9a969..e9d099ea2a 100644 --- a/code/modules/mob/living/carbon/alien/progression.dm +++ b/code/modules/mob/living/carbon/alien/progression.dm @@ -1,7 +1,7 @@ /mob/living/carbon/alien/verb/evolve() - set name = "Evolve" - set desc = "Evolve into your adult form." + set name = "Moult" + set desc = "Moult your skin and become an adult." set category = "Abilities" if(stat != CONSCIOUS) @@ -12,11 +12,11 @@ return if(handcuffed || legcuffed) - src << "\red You cannot evolve when you are cuffed." + src << "You cannot evolve when you are cuffed." return if(amount_grown < max_grown) - src << "\red You are not fully grown." + src << "You are not fully grown." return // confirm_evolution() handles choices and other specific requirements. @@ -27,6 +27,7 @@ var/mob/living/carbon/human/adult = new adult_form(get_turf(src)) adult.set_species(new_species) show_evolution_blurb() + // TODO: drop a moulted skin. Ew. if(mind) mind.transfer_to(adult) diff --git a/code/modules/mob/living/carbon/breathe.dm b/code/modules/mob/living/carbon/breathe.dm index d1cd0ca2ad..dd2464aa67 100644 --- a/code/modules/mob/living/carbon/breathe.dm +++ b/code/modules/mob/living/carbon/breathe.dm @@ -54,7 +54,7 @@ breath = environment.remove_volume(volume_needed) handle_chemical_smoke(environment) //handle chemical smoke while we're at it - if(breath) + if(breath && breath.total_moles) //handle mask filtering if(istype(wear_mask, /obj/item/clothing/mask) && breath) var/obj/item/clothing/mask/M = wear_mask diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index bcec368d7d..e5db1f07de 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -168,15 +168,6 @@ update |= temp.take_damage(b_loss * 0.05, f_loss * 0.05, used_weapon = weapon_message) if(update) UpdateDamageIcon() - -/mob/living/carbon/human/blob_act() - if(stat == 2) return - show_message("\red The blob attacks you!") - var/dam_zone = pick(organs_by_name) - var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone)) - apply_damage(rand(30,40), BRUTE, affecting, run_armor_check(affecting, "melee")) - return - /mob/living/carbon/human/proc/implant_loyalty(mob/living/carbon/human/M, override = FALSE) // Won't override by default. if(!config.use_loyalty_implants && !override) return // Nuh-uh. @@ -981,7 +972,7 @@ if(L && !L.is_bruised()) src.custom_pain("You feel a stabbing pain in your chest!", 1) - L.damage = L.min_bruised_damage + L.bruise() /* /mob/living/carbon/human/verb/simulate() @@ -1291,11 +1282,10 @@ if(C.body_parts_covered & FEET) feet_exposed = 0 - flavor_text = flavor_texts["general"] - flavor_text += "\n\n" + flavor_text = "" for (var/T in flavor_texts) if(flavor_texts[T] && flavor_texts[T] != "") - if((T == "head" && head_exposed) || (T == "face" && face_exposed) || (T == "eyes" && eyes_exposed) || (T == "torso" && torso_exposed) || (T == "arms" && arms_exposed) || (T == "hands" && hands_exposed) || (T == "legs" && legs_exposed) || (T == "feet" && feet_exposed)) + if((T == "general") || (T == "head" && head_exposed) || (T == "face" && face_exposed) || (T == "eyes" && eyes_exposed) || (T == "torso" && torso_exposed) || (T == "arms" && arms_exposed) || (T == "hands" && hands_exposed) || (T == "legs" && legs_exposed) || (T == "feet" && feet_exposed)) flavor_text += flavor_texts[T] flavor_text += "\n\n" if(!shrink) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 795fb17fc3..ed0fbeea5c 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -347,6 +347,12 @@ if(status_flags & GODMODE) return + //exposure to extreme pressures can rupture lungs + if(breath && (breath.total_moles < BREATH_MOLES / 5 || breath.total_moles > BREATH_MOLES * 5)) + if(!is_lung_ruptured() && prob(5)) + rupture_lung() + + //check if we actually need to process breath if(!breath || (breath.total_moles == 0) || suiciding) failed_last_breath = 1 if(suiciding) @@ -359,7 +365,6 @@ adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS) oxygen_alert = max(oxygen_alert, 1) - return 0 var/safe_pressure_min = 16 // Minimum safe partial pressure of breathable gas in kPa diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index d77493b0b3..662d06479b 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -20,6 +20,7 @@ var/prone_icon // If set, draws this from icobase when mob is prone. var/eyes = "eyes_s" // Icon for eyes. + var/has_floating_eyes // Eyes will overlay over darkness (glow) var/blood_color = "#A10808" // Red. var/flesh_color = "#FFC896" // Pink. var/base_color // Used by changelings. Should also be used for icon previes.. @@ -152,6 +153,9 @@ var/pass_flags = 0 +/datum/species/proc/get_eyes(var/mob/living/carbon/human/H) + return + /datum/species/New() if(hud_type) hud = new hud_type() diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_embryo.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_embryo.dm deleted file mode 100644 index c60d8bca1d..0000000000 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_embryo.dm +++ /dev/null @@ -1,159 +0,0 @@ -// This is to replace the previous datum/disease/alien_embryo for slightly improved handling and maintainability -// It functions almost identically (see code/datums/diseases/alien_embryo.dm) - -/obj/item/alien_embryo - name = "alien embryo" - desc = "All slimy and yuck." - icon = 'icons/mob/alien.dmi' - icon_state = "larva0_dead" - var/mob/living/affected_mob - var/stage = 0 - -/obj/item/alien_embryo/New() - if(istype(loc, /mob/living)) - affected_mob = loc - processing_objects.Add(src) - spawn(0) - AddInfectionImages(affected_mob) - else - qdel(src) - -/obj/item/alien_embryo/Destroy() - if(affected_mob) - affected_mob.status_flags &= ~(XENO_HOST) - spawn(0) - RemoveInfectionImages(affected_mob) - ..() - -/obj/item/alien_embryo/process() - if(!affected_mob) return - if(loc != affected_mob) - affected_mob.status_flags &= ~(XENO_HOST) - processing_objects.Remove(src) - spawn(0) - RemoveInfectionImages(affected_mob) - affected_mob = null - return - - if(stage < 5 && prob(3)) - stage++ - spawn(0) - RefreshInfectionImage(affected_mob) - - switch(stage) - if(2, 3) - if(prob(1)) - affected_mob.emote("sneeze") - if(prob(1)) - affected_mob.emote("cough") - if(prob(1)) - affected_mob << "\red Your throat feels sore." - if(prob(1)) - affected_mob << "\red Mucous runs down the back of your throat." - if(4) - if(prob(1)) - affected_mob.emote("sneeze") - if(prob(1)) - affected_mob.emote("cough") - if(prob(2)) - affected_mob << "\red Your muscles ache." - if(prob(20)) - affected_mob.take_organ_damage(1) - if(prob(2)) - affected_mob << "\red Your stomach hurts." - if(prob(20)) - affected_mob.adjustToxLoss(1) - affected_mob.updatehealth() - if(5) - affected_mob << "\red You feel something tearing its way out of your stomach..." - affected_mob.adjustToxLoss(10) - affected_mob.updatehealth() - if(prob(50)) - AttemptGrow() - -/obj/item/alien_embryo/proc/AttemptGrow(var/gib_on_success = 1) - var/list/candidates = get_alien_candidates() - var/picked = null - - // To stop clientless larva, we will check that our host has a client - // if we find no ghosts to become the alien. If the host has a client - // he will become the alien but if he doesn't then we will set the stage - // to 2, so we don't do a process heavy check everytime. - - if(candidates.len) - picked = pick(candidates) - else if(affected_mob.client) - picked = affected_mob.key - else - stage = 4 // Let's try again later. - return - - if(affected_mob.lying) - affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_lie") - else - affected_mob.overlays += image('icons/mob/alien.dmi', loc = affected_mob, icon_state = "burst_stand") - spawn(6) - var/mob/living/carbon/alien/larva/new_xeno = new(affected_mob.loc) - new_xeno.key = picked - new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100) //To get the player's attention - if(gib_on_success) - affected_mob.gib() - qdel(src) - -/*---------------------------------------- -Proc: RefreshInfectionImage() -Des: Removes all infection images from aliens and places an infection image on all infected mobs for aliens. -----------------------------------------*/ -/obj/item/alien_embryo/proc/RefreshInfectionImage() - - for(var/mob/living/carbon/alien in player_list) - - if(!locate(/obj/item/organ/xenos/hivenode) in alien.internal_organs) - continue - - if(alien.client) - for(var/image/I in alien.client.images) - if(dd_hasprefix_case(I.icon_state, "infected")) - qdel(I) - for(var/mob/living/L in mob_list) - if(iscorgi(L) || iscarbon(L)) - if(L.status_flags & XENO_HOST) - var/I = image('icons/mob/alien.dmi', loc = L, icon_state = "infected[stage]") - alien.client.images += I - -/*---------------------------------------- -Proc: AddInfectionImages(C) -Des: Checks if the passed mob (C) is infected with the alien egg, then gives each alien client an infected image at C. -----------------------------------------*/ -/obj/item/alien_embryo/proc/AddInfectionImages(var/mob/living/C) - if(C) - - for(var/mob/living/carbon/alien in player_list) - - if(!locate(/obj/item/organ/xenos/hivenode) in alien.internal_organs) - continue - - if(alien.client) - if(C.status_flags & XENO_HOST) - var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[stage]") - alien.client.images += I - -/*---------------------------------------- -Proc: RemoveInfectionImage(C) -Des: Removes the alien infection image from all aliens in the world located in passed mob (C). -----------------------------------------*/ - -/obj/item/alien_embryo/proc/RemoveInfectionImages(var/mob/living/C) - - if(C) - - for(var/mob/living/carbon/alien in player_list) - - if(!locate(/obj/item/organ/xenos/hivenode) in alien.internal_organs) - continue - - if(alien.client) - for(var/image/I in alien.client.images) - if(I.loc == C) - if(dd_hasprefix_case(I.icon_state, "infected")) - qdel(I) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm index a73e363904..b24fdd50c3 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm @@ -88,13 +88,13 @@ verbs -= /mob/living/carbon/human/proc/lay_egg return - if(locate(/obj/effect/alien/egg) in get_turf(src)) + if(locate(/obj/structure/alien/egg) in get_turf(src)) src << "There's already an egg here." return if(check_alien_ability(75,1,"egg sac")) visible_message("[src] has laid an egg!") - new /obj/effect/alien/egg(loc) + new /obj/structure/alien/egg(loc) return @@ -121,7 +121,7 @@ if(check_alien_ability(50,1,"resin spinner")) visible_message("[src] has planted some alien weeds!") - new /obj/effect/alien/weeds/node(loc) + new /obj/structure/alien/node(loc) return /mob/living/carbon/human/proc/corrosive_acid(O as obj|turf in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N @@ -154,7 +154,7 @@ return if(check_alien_ability(200,0,"acid gland")) - new /obj/effect/alien/acid(get_turf(O), O) + new /obj/effect/acid(get_turf(O), O) visible_message("[src] vomits globs of vile stuff all over [O]. It begins to sizzle and melt under the bubbling mess of acid!") return @@ -199,7 +199,7 @@ /mob/living/carbon/human/proc/resin() // -- TLE set name = "Secrete Resin (75)" - set desc = "Secrete tough malleable resin." + set desc = "Secrete tough, malleable resin." set category = "Abilities" var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in list("resin door","resin wall","resin membrane","resin nest") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist @@ -214,9 +214,51 @@ if("resin door") new /obj/structure/simple_door/resin(loc) if("resin wall") - new /obj/effect/alien/resin/wall(loc) + new /obj/structure/alien/resin/wall(loc) if("resin membrane") - new /obj/effect/alien/resin/membrane(loc) + new /obj/structure/alien/resin/membrane(loc) if("resin nest") new /obj/structure/bed/nest(loc) - return \ No newline at end of file + return + +mob/living/carbon/human/proc/xeno_infest(mob/living/carbon/human/M as mob in oview()) + set name = "Infest (500)" + set desc = "Link a victim to the hivemind." + set category = "Abilities" + + if(!M.Adjacent(src)) + src << "They are too far away." + return + + if(!M.mind) + src << "This mindless flesh adds nothing to the hive." + return + + if(M.species.get_bodytype() == "Xenomorph" || !isnull(M.internal_organs_by_name["hive node"])) + src << "They are already part of the hive." + return + + var/obj/item/organ/affecting = M.get_organ("chest") + if(!affecting || (affecting.status & ORGAN_ROBOT)) + src << "This form is not compatible with our physiology." + return + + src.visible_message("\The [src] crouches over \the [M], extending a hideous protuberance from its head!") + + if(!do_after(src, 150)) + return + + if(!M || !M.Adjacent(src)) + src << "They are too far away." + return + + if(M.species.get_bodytype() == "Xenomorph" || !isnull(M.internal_organs_by_name["hive node"]) || !affecting || (affecting.status & ORGAN_ROBOT)) + return + + if(!check_alien_ability(500,1,"egg sac")) + return + + src.visible_message("\The [src] regurgitates something into \the [M]'s torso!") + M << "A hideous lump of alien mass strains your ribcage as it settles within!" + var/obj/item/organ/xenos/hivenode/node = new(affecting) + node.replaced(M,affecting) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm index 1c5e88ce59..3c89ed183b 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_species.dm @@ -15,8 +15,8 @@ eyes = "blank_eyes" - brute_mod = 0.5 // Hardened carapace. - burn_mod = 2 // Weak to fire. + brute_mod = 0.25 // Hardened carapace. + burn_mod = 1.1 // Weak to fire. warning_low_pressure = 50 hazard_low_pressure = -1 @@ -98,11 +98,11 @@ var/datum/gas_mixture/environment = T.return_air() if(!environment) return - if(environment.gas["phoron"] > 0 || locate(/obj/effect/alien/weeds) in T) - if(!regenerate(H)) - var/obj/item/organ/xenos/plasmavessel/P = H.internal_organs_by_name["plasma vessel"] - P.stored_plasma += weeds_plasma_rate - P.stored_plasma = min(max(P.stored_plasma,0),P.max_plasma) + var/obj/effect/plant/plant = locate() in T + if((environment.gas["phoron"] > 0 || (plant && plant.seed && plant.seed.name == "xenomorph")) && !regenerate(H)) + var/obj/item/organ/xenos/plasmavessel/P = H.internal_organs_by_name["plasma vessel"] + P.stored_plasma += weeds_plasma_rate + P.stored_plasma = min(max(P.stored_plasma,0),P.max_plasma) ..() /datum/species/xenos/proc/regenerate(var/mob/living/carbon/human/H) @@ -140,14 +140,6 @@ return 0 -/datum/species/xenos/handle_login_special(var/mob/living/carbon/human/H) - H.AddInfectionImages() - ..() - -/datum/species/xenos/handle_logout_special(var/mob/living/carbon/human/H) - H.RemoveInfectionImages() - ..() - /datum/species/xenos/drone name = "Xenomorph Drone" caste_name = "drone" @@ -278,7 +270,8 @@ /mob/living/carbon/human/proc/transfer_plasma, /mob/living/carbon/human/proc/corrosive_acid, /mob/living/carbon/human/proc/neurotoxin, - /mob/living/carbon/human/proc/resin + /mob/living/carbon/human/proc/resin, + /mob/living/carbon/human/proc/xeno_infest ) /datum/species/xenos/queen/handle_login_special(var/mob/living/carbon/human/H) diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/xenomorphs.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/xenomorphs.dm index 6cb8a46475..504577c7d3 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/xenomorphs.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/xenomorphs.dm @@ -22,28 +22,3 @@ proc/create_new_xenomorph(var/alien_caste,var/target) /mob/living/carbon/human/xqueen/New(var/new_loc) h_style = "Bald" ..(new_loc, "Xenomorph Queen") - -// I feel like we should generalize/condense down all the various icon-rendering antag procs. -/*---------------------------------------- -Proc: AddInfectionImages() -Des: Gives the client of the alien an image on each infected mob. -----------------------------------------*/ -/mob/living/carbon/human/proc/AddInfectionImages() - if (client) - for (var/mob/living/C in mob_list) - if(C.status_flags & XENO_HOST) - var/obj/item/alien_embryo/A = locate() in C - var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[A.stage]") - client.images += I - return - -/*---------------------------------------- -Proc: RemoveInfectionImages() -Des: Removes all infected images from the alien. -----------------------------------------*/ -/mob/living/carbon/human/proc/RemoveInfectionImages() - if (client) - for(var/image/I in client.images) - if(dd_hasprefix_case(I.icon_state, "infected")) - qdel(I) - return diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 6fb02ee4d5..9140428d79 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -163,6 +163,8 @@ Please contact me on #coderbus IRC. ~Carn x icon = stand_icon for(var/image/I in overlays_standing) overlays += I + if(species.has_floating_eyes) + overlays |= species.get_eyes(src) if(lying && !species.prone_icon) //Only rotate them if we're not drawing a specific icon for being prone. var/matrix/M = matrix() diff --git a/code/modules/mob/living/carbon/metroid/items.dm b/code/modules/mob/living/carbon/metroid/items.dm index d068e33e6c..6832f096f2 100644 --- a/code/modules/mob/living/carbon/metroid/items.dm +++ b/code/modules/mob/living/carbon/metroid/items.dm @@ -281,87 +281,3 @@ /mob/living/carbon/slime/has_eyes() return 0 -//////////////////////////////Old shit from metroids/RoRos, and the old cores, would not take much work to re-add them//////////////////////// - -/* -// Basically this slime Core catalyzes reactions that normally wouldn't happen anywhere -/obj/item/slime_core - name = "slime extract" - desc = "Goo extracted from a slime. Legends claim these to have \"magical powers\"." - icon = 'icons/mob/slimes.dmi' - icon_state = "slime extract" - force = 1.0 - w_class = 1.0 - throwforce = 1.0 - throw_speed = 2 - throw_range = 6 - origin_tech = list(TECH_BIO = 4) - var/POWERFLAG = 0 // sshhhhhhh - var/Flush = 30 - var/Uses = 5 // uses before it goes inert - -/obj/item/slime_core/New() - ..() - create_reagents(100) - POWERFLAG = rand(1,10) - Uses = rand(7, 25) - //flags |= NOREACT -/* - spawn() - Life() - - proc/Life() - while(src) - sleep(25) - Flush-- - if(Flush <= 0) - reagents.clear_reagents() - Flush = 30 -*/ - - - -/obj/item/weapon/reagent_containers/food/snacks/egg/slime - name = "slime egg" - desc = "A small, gelatinous egg." - icon = 'icons/mob/mob.dmi' - icon_state = "slime egg-growing" - bitesize = 12 - origin_tech = list(TECH_BIO = 4) - var/grown = 0 - -/obj/item/weapon/reagent_containers/food/snacks/egg/slime/New() - ..() - reagents.add_reagent("nutriment", 4) - reagents.add_reagent("slimejelly", 1) - spawn(rand(1200,1500))//the egg takes a while to "ripen" - Grow() - -/obj/item/weapon/reagent_containers/food/snacks/egg/slime/proc/Grow() - grown = 1 - icon_state = "slime egg-grown" - processing_objects.Add(src) - return - -/obj/item/weapon/reagent_containers/food/snacks/egg/slime/proc/Hatch() - processing_objects.Remove(src) - var/turf/T = get_turf(src) - src.visible_message(" The [name] pulsates and quivers!") - spawn(rand(50,100)) - src.visible_message(" The [name] bursts open!") - new/mob/living/carbon/slime(T) - qdel(src) - - -/obj/item/weapon/reagent_containers/food/snacks/egg/slime/process() - var/turf/location = get_turf(src) - var/datum/gas_mixture/environment = location.return_air() - if (environment.phoron > MOLES_PHORON_VISIBLE)//phoron exposure causes the egg to hatch - src.Hatch() - -/obj/item/weapon/reagent_containers/food/snacks/egg/slime/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype( W, /obj/item/weapon/pen/crayon )) - return - else - ..() -*/ diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index 86f8f2d672..5f4876d1dd 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -194,26 +194,6 @@ updatehealth() -/mob/living/carbon/slime/blob_act() - if (stat == 2) - return - var/shielded = 0 - - var/damage = null - if (stat != 2) - damage = rand(10,30) - - if(shielded) - damage /= 4 - - show_message(" The blob attacks you!") - - adjustFireLoss(damage) - - updatehealth() - return - - /mob/living/carbon/slime/u_equip(obj/item/W as obj) return diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index aaa5ae3c83..64ca2469b0 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -266,7 +266,7 @@ /mob/living/proc/handle_fire() if(fire_stacks < 0) - fire_stacks = min(0, fire_stacks++) //If we've doused ourselves in water to avoid fire, dry off slowly + fire_stacks = min(0, ++fire_stacks) //If we've doused ourselves in water to avoid fire, dry off slowly if(!on_fire) return 1 diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index d67eb27753..b5ddfcedd9 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -79,7 +79,7 @@ //Blind the AI updateicon() - src.blind.screen_loc = "1,1 to 15,15" + src.blind.screen_loc = ui_entire_screen if (src.blind.layer!=18) src.blind.layer = 18 src.sight = src.sight&~SEE_TURFS diff --git a/code/modules/mob/living/silicon/ai/login.dm b/code/modules/mob/living/silicon/ai/login.dm index 5336cd873f..76625cdc3d 100644 --- a/code/modules/mob/living/silicon/ai/login.dm +++ b/code/modules/mob/living/silicon/ai/login.dm @@ -6,12 +6,12 @@ flash = new /obj/screen() flash.icon_state = "blank" flash.name = "flash" - flash.screen_loc = "1,1 to 15,15" + flash.screen_loc = ui_entire_screen flash.layer = 17 blind = new /obj/screen() blind.icon_state = "black" blind.name = " " - blind.screen_loc = "1,1 to 15,15" + blind.screen_loc = ui_entire_screen blind.layer = 0 client.screen.Add( blind, flash ) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index cb90cd176b..0c53adc467 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -119,13 +119,6 @@ return -1 return 0 -/mob/living/silicon/pai/blob_act() - if (src.stat != 2) - src.adjustBruteLoss(60) - src.updatehealth() - return 1 - return 0 - /mob/living/silicon/pai/restrained() if(istype(src.loc,/obj/item/device/paicard)) return 0 diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 8e6f3207fb..f3d7ffd848 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -34,7 +34,7 @@ var/global/list/robot_modules = list( var/list/obj/item/borg/upgrade/supported_upgrades = list() // Bookkeeping - var/list/added_languages = list() + var/list/original_languages = list() var/list/added_networks = list() /obj/item/weapon/robot_module/New(var/mob/living/silicon/robot/R) @@ -69,7 +69,7 @@ var/global/list/robot_modules = list( for(var/module in modules) qdel(module) for(var/synth in synths) - qdel(synths) + qdel(synth) modules.Cut() synths.Cut() qdel(emag) @@ -105,14 +105,22 @@ var/global/list/robot_modules = list( modules += O /obj/item/weapon/robot_module/proc/add_languages(var/mob/living/silicon/robot/R) + // Stores the languages as they were before receiving the module, and whether they could be synthezized. + for(var/datum/language/language_datum in R.languages) + original_languages[language_datum] = (language_datum in R.speech_synthesizer_langs) + for(var/language in languages) - if(R.add_language(language, languages[language])) - added_languages |= language + R.add_language(language, languages[language]) /obj/item/weapon/robot_module/proc/remove_languages(var/mob/living/silicon/robot/R) - for(var/language in added_languages) + // Clear all added languages, whether or not we originally had them. + for(var/language in languages) R.remove_language(language) - added_languages.Cut() + + // Then add back all the original languages, and the relevant synthezising ability + for(var/original_language in original_languages) + R.add_language(original_language, original_languages[original_language]) + original_languages.Cut() /obj/item/weapon/robot_module/proc/add_camera_networks(var/mob/living/silicon/robot/R) if(R.camera && (NETWORK_ROBOTS in R.camera.network)) diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 004284d8a7..2aafb286fd 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -97,13 +97,6 @@ /mob/living/silicon/IsAdvancedToolUser() return 1 -/mob/living/silicon/blob_act() - if (src.stat != 2) - src.adjustBruteLoss(60) - src.updatehealth() - return 1 - return 0 - /mob/living/silicon/bullet_act(var/obj/item/projectile/Proj) if(!Proj.nodamage) @@ -198,16 +191,22 @@ return universal_speak || (speaking in src.speech_synthesizer_langs) //need speech synthesizer support to vocalize a language /mob/living/silicon/add_language(var/language, var/can_speak=1) - if (..(language) && can_speak) - speech_synthesizer_langs.Add(all_languages[language]) + var/var/datum/language/added_language = all_languages[language] + if(!added_language) + return + + . = ..(language) + if (can_speak && (added_language in languages) && !(added_language in speech_synthesizer_langs)) + speech_synthesizer_langs += added_language return 1 /mob/living/silicon/remove_language(var/rem_language) - ..(rem_language) + var/var/datum/language/removed_language = all_languages[rem_language] + if(!removed_language) + return - for (var/datum/language/L in speech_synthesizer_langs) - if (L.name == rem_language) - speech_synthesizer_langs -= L + ..(rem_language) + speech_synthesizer_langs -= removed_language /mob/living/silicon/check_languages() set name = "Check Known Languages" diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index 322d08dc9f..39406eb6c8 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -22,7 +22,6 @@ var/obj/item/inventory_head var/obj/item/inventory_back - var/facehugger //IAN! SQUEEEEEEEEE~ /mob/living/simple_animal/corgi/Ian @@ -123,13 +122,6 @@ var/icon/back_icon = image('icons/mob/corgi_back.dmi',back_icon_state) if(back_icon) overlays += back_icon - - if(facehugger) - if(istype(src, /mob/living/simple_animal/corgi/puppy)) - overlays += image('icons/mob/mask.dmi',"facehugger_corgipuppy") - else - overlays += image('icons/mob/mask.dmi',"facehugger_corgi") - return diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 10b9d0ebbf..ee1d62529a 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -161,30 +161,6 @@ qdel(src) return O -//human -> alien -/mob/living/carbon/human/proc/Alienize() - if (transforming) - return - for(var/obj/item/W in src) - drop_from_inventory(W) - regenerate_icons() - transforming = 1 - canmove = 0 - icon = null - invisibility = 101 - for(var/t in organs) - qdel(t) - - var/alien_caste = pick("Hunter","Sentinel","Drone") - var/mob/living/carbon/human/new_xeno = create_new_xenomorph(alien_caste,loc) - - new_xeno.a_intent = I_HURT - new_xeno.key = key - - new_xeno << "You are now an alien." - qdel(src) - return - /mob/living/carbon/human/proc/slimeize(adult as num, reproduce as num) if (transforming) return diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index 2367ed5b43..664e00d275 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -240,6 +240,9 @@ var/list/organ_cache = list() if(parent && !silent) owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1) +/obj/item/organ/proc/bruise() + damage = max(damage, min_bruised_damage) + /obj/item/organ/proc/robotize() //Being used to make robutt hearts, etc robotic = 2 src.status &= ~ORGAN_BROKEN diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 1e2f7d1e52..ed81beb42b 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -939,11 +939,14 @@ Note that amputating the affected organ does in fact remove the infection from t /obj/item/organ/external/proc/is_malfunctioning() return ((status & ORGAN_ROBOT) && (brute_dam + burn_dam) >= 10 && prob(brute_dam + burn_dam)) -/obj/item/organ/external/proc/embed(var/obj/item/weapon/W, var/silent = 0) +/obj/item/organ/external/proc/embed(var/obj/item/weapon/W, var/silent = 0, var/supplied_message) if(!owner || loc != owner) return if(!silent) - owner.visible_message("\The [W] sticks in the wound!") + if(supplied_message) + owner.visible_message("[supplied_message]") + else + owner.visible_message("\The [W] sticks in the wound!") implants += W owner.embedded_flag = 1 owner.verbs += /mob/proc/yank_out_object diff --git a/code/modules/organs/subtypes/xenos.dm b/code/modules/organs/subtypes/xenos.dm index 0b1233085f..f1049da61e 100644 --- a/code/modules/organs/subtypes/xenos.dm +++ b/code/modules/organs/subtypes/xenos.dm @@ -38,15 +38,32 @@ icon_state = "xgibtorso" organ_tag = "acid gland" -/obj/item/organ/xenos/hivenode - name = "hive node" - parent_organ = "chest" - icon_state = "xgibmid2" - organ_tag = "hive node" - /obj/item/organ/xenos/resinspinner name = "resin spinner" parent_organ = "head" icon_state = "xgibmid2" organ_tag = "resin spinner" +/obj/item/organ/xenos/hivenode + name = "hive node" + parent_organ = "chest" + icon_state = "xgibmid2" + organ_tag = "hive node" + +/obj/item/organ/xenos/hivenode/removed(var/mob/living/user) + if(owner && ishuman(owner)) + var/mob/living/carbon/human/H = owner + H << "You feel your connection to the hivemind fray and fade away..." + H.remove_language("Hivemind") + if(H.mind && H.species.get_bodytype() != "Xenomorph") + xenomorphs.remove_antagonist(H.mind) + ..(user) + +/obj/item/organ/xenos/hivenode/replaced(var/mob/living/carbon/human/target,var/obj/item/organ/external/affected) + ..(target, affected) + if(owner && ishuman(owner)) + var/mob/living/carbon/human/H = owner + H.add_language("Hivemind") + if(H.mind && H.species.get_bodytype() != "Xenomorph") + H << "You feel a sense of pressure as a vast intelligence meshes with your thoughts..." + xenomorphs.add_antagonist_mind(H.mind,1, xenomorphs.faction_role_text, xenomorphs.faction_welcome) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 836b5224b6..6d24a8f238 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -146,15 +146,6 @@ toner = 0 return -/obj/machinery/photocopier/blob_act() - if(prob(50)) - qdel(src) - else - if(toner > 0) - new /obj/effect/decal/cleanable/blood/oil(get_turf(src)) - toner = 0 - return - /obj/machinery/photocopier/proc/copy(var/obj/item/weapon/paper/copy) var/obj/item/weapon/paper/c = new /obj/item/weapon/paper (loc) if(toner > 10) //lots of toner, make it dark diff --git a/code/modules/power/antimatter/control.dm b/code/modules/power/antimatter/control.dm index 9fd35c2c26..8c7af58346 100644 --- a/code/modules/power/antimatter/control.dm +++ b/code/modules/power/antimatter/control.dm @@ -101,19 +101,6 @@ return 0 -/obj/machinery/power/am_control_unit/blob_act() - stability -= 20 - if(prob(100-stability))//Might infect the rest of the machine - for(var/obj/machinery/am_shielding/AMS in linked_shielding) - AMS.blob_act() - spawn(0) - //Likely explode - qdel(src) - return - check_stability() - return - - /obj/machinery/power/am_control_unit/ex_act(severity) switch(severity) if(1.0) diff --git a/code/modules/power/antimatter/shielding.dm b/code/modules/power/antimatter/shielding.dm index 700fad25ad..4f89687fb4 100644 --- a/code/modules/power/antimatter/shielding.dm +++ b/code/modules/power/antimatter/shielding.dm @@ -90,20 +90,6 @@ proc/cardinalrange(var/center) return 0 -/obj/machinery/am_shielding/blob_act() - stability -= 20 - if(prob(100-stability)) - if(prob(10))//Might create a node - new /obj/effect/blob/node(src.loc,150) - else - new /obj/effect/blob(src.loc,60) - spawn(0) - qdel(src) - return - check_stability() - return - - /obj/machinery/am_shielding/ex_act(severity) switch(severity) if(1.0) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 3ad0754d84..6d25a0f25e 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -1178,12 +1178,6 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on) cell.ex_act(3.0) return -/obj/machinery/power/apc/blob_act() - if (prob(75)) - set_broken() - if (cell && prob(5)) - cell.blob_act() - /obj/machinery/power/apc/disconnect_terminal() if(terminal) terminal.master = null diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index ebae74cd27..599dadc4a4 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -161,10 +161,6 @@ corrupt() return -/obj/item/weapon/cell/blob_act() - if(prob(75)) - explode() - /obj/item/weapon/cell/proc/get_electrocute_damage() switch (charge) /* if (9000 to INFINITY) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index bf3393f903..9952a97442 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -548,10 +548,6 @@ //blob effect -/obj/machinery/light/blob_act() - if(prob(75)) - broken() - // timed process // use power diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm index 1b798df2bd..751e2cf157 100644 --- a/code/modules/power/singularity/containment_field.dm +++ b/code/modules/power/singularity/containment_field.dm @@ -30,10 +30,6 @@ return 1 -/obj/machinery/containment_field/blob_act() - return 0 - - /obj/machinery/containment_field/ex_act(severity) return 0 diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index 5532f8ce9e..6368e7348d 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -159,13 +159,6 @@ field_generator power level display /obj/machinery/field_generator/emp_act() return 0 - -/obj/machinery/field_generator/blob_act() - if(active) - return 0 - else - ..() - /obj/machinery/field_generator/bullet_act(var/obj/item/projectile/Proj) if(istype(Proj, /obj/item/projectile/beam)) power += Proj.damage * EMITTER_DAMAGE_POWER_TRANSFER diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index ec659eca58..f6770d48c0 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -157,12 +157,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin else return - -/obj/structure/particle_accelerator/blob_act() - if(prob(50)) - qdel(src) - return - /obj/structure/particle_accelerator/update_icon() switch(construction_state) if(0,1) @@ -339,12 +333,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin return -/obj/machinery/particle_accelerator/blob_act() - if(prob(50)) - qdel(src) - return - - /obj/machinery/particle_accelerator/proc/update_state() return 0 diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 76cdf04f0a..608f8c283c 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -53,9 +53,6 @@ consume(user) return 1 -/obj/singularity/blob_act(severity) - return - /obj/singularity/ex_act(severity) if(current_size == STAGE_SUPER)//IT'S UNSTOPPABLE return diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index ea5377c98b..232adb345b 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -80,12 +80,6 @@ var/list/solars_list = list() ..() -/obj/machinery/power/solar/blob_act() - src.health-- - src.healthcheck() - return - - /obj/machinery/power/solar/proc/healthcheck() if (src.health <= 0) if(!(stat & BROKEN)) @@ -172,12 +166,6 @@ var/list/solars_list = list() return -/obj/machinery/power/solar/blob_act() - if(prob(75)) - broken() - src.density = 0 - - /obj/machinery/power/solar/fake/New(var/turf/loc, var/obj/item/solar_assembly/S) ..(loc, S, 0) @@ -539,12 +527,6 @@ var/list/solars_list = list() broken() return - -/obj/machinery/power/solar_control/blob_act() - if (prob(75)) - broken() - src.density = 0 - // Used for mapping in solar array which automatically starts itself (telecomms, for example) /obj/machinery/power/solar_control/autostart track = 2 // Auto tracking mode diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 17f89ee161..0bfc339ce0 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -136,6 +136,7 @@ /obj/item/projectile/bullet/pistol/rubber //"rubber" bullets name = "rubber bullet" + check_armour = "melee" damage = 10 agony = 40 embed = 0 @@ -150,6 +151,7 @@ /obj/item/projectile/bullet/shotgun/beanbag //because beanbags are not bullets name = "beanbag" + check_armour = "melee" damage = 20 agony = 60 embed = 0 @@ -234,4 +236,4 @@ /obj/item/projectile/bullet/pistol/cap/process() loc = null - qdel(src) \ No newline at end of file + qdel(src) diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 01f3a35231..d597e9d8ef 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -44,10 +44,6 @@ qdel(src) return -/obj/machinery/chem_master/blob_act() - if (prob(50)) - qdel(src) - /obj/machinery/chem_master/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob) if(istype(B, /obj/item/weapon/reagent_containers/glass)) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index e0781a9e6b..e6ddb91e89 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -175,11 +175,7 @@ W.visible_message("The fungi are completely dissolved by the solution!") /datum/reagent/toxin/plantbgone/touch_obj(var/obj/O, var/volume) - if(istype(O, /obj/effect/alien/weeds/)) - var/obj/effect/alien/weeds/alien_weeds = O - alien_weeds.health -= rand(15, 35) - alien_weeds.healthcheck() - else if(istype(O, /obj/effect/plant)) + if(istype(O, /obj/effect/plant)) qdel(O) /datum/reagent/toxin/plantbgone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 7406dff6b7..f52d905fee 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -59,11 +59,6 @@ else return - blob_act() - if(prob(50)) - new /obj/effect/effect/water(src.loc) - qdel(src) - @@ -154,9 +149,6 @@ if(!istype(Proj ,/obj/item/projectile/beam/lastertag) && !istype(Proj ,/obj/item/projectile/beam/practice) ) explode() -/obj/structure/reagent_dispensers/fueltank/blob_act() - explode() - /obj/structure/reagent_dispensers/fueltank/ex_act() explode() @@ -223,10 +215,6 @@ ..() reagents.add_reagent("beer",1000) -/obj/structure/reagent_dispensers/beerkeg/blob_act() - explosion(src.loc,0,3,5,7,10) - qdel(src) - /obj/structure/reagent_dispensers/virusfood name = "Virus Food Dispenser" desc = "A dispenser of virus food." diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 0f8df78262..dd796d7147 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -79,10 +79,6 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). else icon_state = "circuit_imprinter" -/obj/machinery/r_n_d/circuit_imprinter/blob_act() - if(prob(50)) - qdel(src) - /obj/machinery/r_n_d/circuit_imprinter/proc/TotalMaterials() var/t = 0 for(var/f in materials) @@ -199,7 +195,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). reagents.remove_reagent(C, D.chemicals[C] * mat_efficiency) if(D.build_path) - var/obj/new_item = new D.build_path(src) + var/obj/new_item = D.Fabricate(src, src) new_item.loc = loc if(mat_efficiency != 1) // No matter out of nowhere if(new_item.matter && new_item.matter.len > 0) diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index ce5fb4670b..98eb37bebd 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -55,6 +55,11 @@ other types of metals and chemistry for reagents). desc = "Allows for the construction of \a [item_name]." return +//Returns a new instance of the item for this design +//This is to allow additional initialization to be performed, including possibly additional contructor arguments. +/datum/design/proc/Fabricate(var/newloc, var/fabricator) + return new build_path(newloc) + /datum/design/item build_type = PROTOLATHE @@ -195,9 +200,9 @@ other types of metals and chemistry for reagents). /datum/design/item/stock_part/RPED name = "Rapid Part Exchange Device" desc = "Special mechanical module made to store, sort, and apply standard machine parts." - id = "rped" + id = "rped" req_tech = list(TECH_ENGINEERING = 3, TECH_MATERIAL = 3) - materials = list(DEFAULT_WALL_MATERIAL = 15000, "glass" = 5000) + materials = list(DEFAULT_WALL_MATERIAL = 15000, "glass" = 5000) build_path = /obj/item/weapon/storage/part_replacer sort_string = "CBAAA" @@ -212,6 +217,11 @@ other types of metals and chemistry for reagents). var/obj/item/weapon/cell/C = build_path desc = "Allows the construction of power cells that can hold [initial(C.maxcharge)] units of energy." +/datum/design/item/powercell/Fabricate() + var/obj/item/weapon/cell/C = ..() + C.charge = 0 //shouldn't produce power out of thin air. + return C + /datum/design/item/powercell/basic name = "basic" build_type = PROTOLATHE | MECHFAB @@ -277,9 +287,9 @@ other types of metals and chemistry for reagents). /datum/design/item/mesons name = "Optical meson scanners design" desc = "Using the meson-scanning technology those glasses allow you to see through walls, floor or anything else." - id = "mesons" + id = "mesons" req_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2) - materials = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) + materials = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) build_path = /obj/item/clothing/glasses/meson sort_string = "GAAAC" @@ -288,23 +298,23 @@ other types of metals and chemistry for reagents). name = "Mining equipment design ([item_name])" /datum/design/item/weapon/mining/jackhammer - id = "jackhammer" + id = "jackhammer" req_tech = list(TECH_MATERIAL = 3, TECH_POWER = 2, TECH_ENGINEERING = 2) - materials = list(DEFAULT_WALL_MATERIAL = 2000, "glass" = 500, "silver" = 500) + materials = list(DEFAULT_WALL_MATERIAL = 2000, "glass" = 500, "silver" = 500) build_path = /obj/item/weapon/pickaxe/jackhammer sort_string = "KAAAA" /datum/design/item/weapon/mining/drill - id = "drill" + id = "drill" req_tech = list(TECH_MATERIAL = 2, TECH_POWER = 3, TECH_ENGINEERING = 2) - materials = list(DEFAULT_WALL_MATERIAL = 6000, "glass" = 1000) //expensive, but no need for miners. + materials = list(DEFAULT_WALL_MATERIAL = 6000, "glass" = 1000) //expensive, but no need for miners. build_path = /obj/item/weapon/pickaxe/drill sort_string = "KAAAB" /datum/design/item/weapon/mining/plasmacutter - id = "plasmacutter" + id = "plasmacutter" req_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 3, TECH_ENGINEERING = 3) - materials = list(DEFAULT_WALL_MATERIAL = 1500, "glass" = 500, "gold" = 500, "phoron" = 500) + materials = list(DEFAULT_WALL_MATERIAL = 1500, "glass" = 500, "gold" = 500, "phoron" = 500) build_path = /obj/item/weapon/pickaxe/plasmacutter sort_string = "KAAAC" @@ -316,9 +326,9 @@ other types of metals and chemistry for reagents). sort_string = "KAAAD" /datum/design/item/weapon/mining/drill_diamond - id = "drill_diamond" + id = "drill_diamond" req_tech = list(TECH_MATERIAL = 6, TECH_POWER = 4, TECH_ENGINEERING = 4) - materials = list(DEFAULT_WALL_MATERIAL = 3000, "glass" = 1000, "diamond" = 2000) + materials = list(DEFAULT_WALL_MATERIAL = 3000, "glass" = 1000, "diamond" = 2000) build_path = /obj/item/weapon/pickaxe/diamonddrill sort_string = "KAAAE" /////////////////////////////////// @@ -337,9 +347,9 @@ other types of metals and chemistry for reagents). /datum/design/item/medical/robot_scanner desc = "A hand-held scanner able to diagnose robotic injuries." - id = "robot_scanner" + id = "robot_scanner" req_tech = list(TECH_MAGNET = 3, TECH_BIO = 2, TECH_ENGINEERING = 3) - materials = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 200) + materials = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 200) build_path = /obj/item/device/robotanalyzer sort_string = "MACFA" @@ -394,9 +404,9 @@ other types of metals and chemistry for reagents). /datum/design/item/medical/nanopaste desc = "A tube of paste containing swarms of repair nanites. Very effective in repairing robotic machinery." - id = "nanopaste" + id = "nanopaste" req_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3) - materials = list(DEFAULT_WALL_MATERIAL = 7000, "glass" = 7000) + materials = list(DEFAULT_WALL_MATERIAL = 7000, "glass" = 7000) build_path = /obj/item/stack/nanopaste sort_string = "MBAAA" @@ -528,16 +538,16 @@ other types of metals and chemistry for reagents). /datum/design/item/weapon/chemsprayer desc = "An advanced chem spraying device." - id = "chemsprayer" + id = "chemsprayer" req_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_BIO = 2) - materials = list(DEFAULT_WALL_MATERIAL = 5000, "glass" = 1000) + materials = list(DEFAULT_WALL_MATERIAL = 5000, "glass" = 1000) build_path = /obj/item/weapon/reagent_containers/spray/chemsprayer sort_string = "TABAA" /datum/design/item/weapon/rapidsyringe - id = "rapidsyringe" + id = "rapidsyringe" req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_BIO = 2) - materials = list(DEFAULT_WALL_MATERIAL = 5000, "glass" = 1000) + materials = list(DEFAULT_WALL_MATERIAL = 5000, "glass" = 1000) build_path = /obj/item/weapon/gun/launcher/syringe/rapid sort_string = "TABAB" @@ -640,10 +650,10 @@ other types of metals and chemistry for reagents). /datum/design/item/posibrain name = "Positronic brain" - id = "posibrain" + id = "posibrain" req_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 6, TECH_BLUESPACE = 2, TECH_DATA = 4) build_type = PROTOLATHE | MECHFAB - materials = list(DEFAULT_WALL_MATERIAL = 2000, "glass" = 1000, "silver" = 1000, "gold" = 500, "phoron" = 500, "diamond" = 100) + materials = list(DEFAULT_WALL_MATERIAL = 2000, "glass" = 1000, "silver" = 1000, "gold" = 500, "phoron" = 500, "diamond" = 100) build_path = /obj/item/device/mmi/digital/posibrain category = "Misc" sort_string = "VACAB" @@ -1354,16 +1364,16 @@ CIRCUITS BELOW /datum/design/item/pda name = "PDA design" desc = "Cheaper than whiny non-digital assistants." - id = "pda" + id = "pda" req_tech = list(TECH_ENGINEERING = 2, TECH_POWER = 3) - materials = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) + materials = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) build_path = /obj/item/device/pda sort_string = "VAAAA" // Cartridges -/datum/design/item/pda_cartridge +/datum/design/item/pda_cartridge req_tech = list(TECH_ENGINEERING = 2, TECH_POWER = 3) - materials = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) + materials = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) /datum/design/item/pda_cartridge/AssembleDesignName() ..() @@ -1443,7 +1453,7 @@ CIRCUITS BELOW id = "cart_captain" build_path = /obj/item/weapon/cartridge/captain sort_string = "VBAAO" - + /* Uncomment if someone makes these buildable /datum/design/circuit/general_alert name = "general alert console" diff --git a/code/modules/research/mechfab_designs.dm b/code/modules/research/mechfab_designs.dm index cfdce572b1..e83774468c 100644 --- a/code/modules/research/mechfab_designs.dm +++ b/code/modules/research/mechfab_designs.dm @@ -6,6 +6,13 @@ /datum/design/item/mechfab/robot category = "Robot" +//if the fabricator is a mech fab pass the manufacturer info over to the robot part constructor +/datum/design/item/mechfab/robot/Fabricate(var/newloc, var/fabricator) + if(istype(fabricator, /obj/machinery/mecha_part_fabricator)) + var/obj/machinery/mecha_part_fabricator/mechfab = fabricator + return new build_path(newloc, mechfab.manufacturer) + return ..() + /datum/design/item/mechfab/robot/exoskeleton name = "Robot exoskeleton" id = "robot_exoskeleton" diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index 9cb029f58e..c91a22d89f 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -196,7 +196,7 @@ reagents.remove_reagent(C, D.chemicals[C] * mat_efficiency) if(D.build_path) - var/obj/new_item = new D.build_path(src) + var/obj/new_item = D.Fabricate(src, src) new_item.loc = loc if(mat_efficiency != 1) // No matter out of nowhere if(new_item.matter && new_item.matter.len > 0) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 6f474fe06d..efb05b90d7 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -79,10 +79,6 @@ griefProtection() ..() -/obj/machinery/r_n_d/server/blob_act() - griefProtection() - ..() - //Backup files to centcomm to help admins recover data after greifer attacks /obj/machinery/r_n_d/server/proc/griefProtection() for(var/obj/machinery/r_n_d/server/centcom/C in machines) diff --git a/code/modules/research/xenoarchaeology/machinery/coolant.dm b/code/modules/research/xenoarchaeology/machinery/coolant.dm index ac56d07f99..62dde2edd5 100644 --- a/code/modules/research/xenoarchaeology/machinery/coolant.dm +++ b/code/modules/research/xenoarchaeology/machinery/coolant.dm @@ -13,9 +13,6 @@ if(!istype(Proj ,/obj/item/projectile/beam/lastertag) && !istype(Proj ,/obj/item/projectile/beam/practice) ) explode() -/obj/structure/reagent_dispensers/coolanttank/blob_act() - explode() - /obj/structure/reagent_dispensers/coolanttank/ex_act() explode() diff --git a/code/modules/shieldgen/emergency_shield.dm b/code/modules/shieldgen/emergency_shield.dm index 7b5449074f..9e8a752122 100644 --- a/code/modules/shieldgen/emergency_shield.dm +++ b/code/modules/shieldgen/emergency_shield.dm @@ -87,9 +87,6 @@ if(prob(50)) qdel(src) -/obj/machinery/shield/blob_act() - qdel(src) - /obj/machinery/shield/hitby(AM as mob|obj) //Let everyone know we've been hit! diff --git a/code/modules/surgery/encased.dm b/code/modules/surgery/encased.dm index 1744cec3d7..762c2b71c4 100644 --- a/code/modules/surgery/encased.dm +++ b/code/modules/surgery/encased.dm @@ -172,10 +172,12 @@ affected.createwound(BRUISE, 20) affected.fracture() - - /*if (prob(40)) //TODO: ORGAN REMOVAL UPDATE. - user.visible_message("\red A rib pierces the lung!") - target.rupture_lung()*/ + + if(affected.internal_organs && affected.internal_organs.len) + if(prob(40)) + var/obj/item/organ/O = pick(affected.internal_organs) //TODO weight by organ size + user.visible_message("A wayward piece of [target]'s [affected.encased] pierces \his [O.name]!") + O.bruise() /datum/surgery_step/open_encased/mend allowed_tools = list( diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index d352c4aed4..be738c01f8 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -12,46 +12,6 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) return affected && affected.open == (affected.encased ? 3 : 2) -////////////////////////////////////////////////////////////////// -// ALIEN EMBRYO SURGERY // -////////////////////////////////////////////////////////////////// -/datum/surgery_step/internal/remove_embryo - allowed_tools = list( - /obj/item/weapon/hemostat = 100, \ - /obj/item/weapon/wirecutters = 75, \ - /obj/item/weapon/material/kitchen/utensil/fork = 20 - ) - blood_level = 2 - - min_duration = 80 - max_duration = 100 - - can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - var/embryo = 0 - for(var/obj/item/alien_embryo/A in target) - embryo = 1 - break - - if (!hasorgans(target)) - return - var/obj/item/organ/external/affected = target.get_organ(target_zone) - return ..() && affected && embryo && affected.open == 3 && target_zone == "chest" - - begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - var/msg = "[user] starts to pull something out from [target]'s ribcage with \the [tool]." - var/self_msg = "You start to pull something out from [target]'s ribcage with \the [tool]." - user.visible_message(msg, self_msg) - target.custom_pain("Something hurts horribly in your chest!",1) - ..() - - end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("\red [user] rips the larva out of [target]'s ribcage!", - "You rip the larva out of [target]'s ribcage!") - - for(var/obj/item/alien_embryo/A in target) - A.loc = A.loc.loc - - ////////////////////////////////////////////////////////////////// // CHEST INTERNAL ORGAN SURGERY // ////////////////////////////////////////////////////////////////// diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index 3862632916..ddc56dad3f 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -116,11 +116,6 @@ ..() healthcheck() -/obj/vehicle/blob_act() - src.health -= rand(20,40)*fire_dam_coeff - healthcheck() - return - /obj/vehicle/ex_act(severity) switch(severity) if(1.0) diff --git a/html/changelog.html b/html/changelog.html index 897f98072d..d69da77726 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,53 @@ -->
+

14 October 2015

+

Hubblenaut updated:

+ +

PsiOmegaDelta updated:

+ +

TheWelp updated:

+ +

Zuhayr updated:

+ + +

11 October 2015

+

HarpyEagle updated:

+ +

Hubblenaut updated:

+ + +

10 October 2015

+

HarpyEagle updated:

+ +

26 September 2015

PsiOmegaDelta updated: