diff --git a/README.md b/README.md index e408786d8d0..5437433fc0c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -##/tg/station v1.0.1 +##/tg/station v1.0.1 [![Build Status](https://travis-ci.org/tgstation/-tg-station.png)](https://travis-ci.org/tgstation/-tg-station) @@ -76,13 +76,6 @@ We use BYGEX for some of our text replacement related code. Unfortunately, we only have a windows dll included right now. You can find a version known to compile on linux, along with some basic install instructions here https://github.com/optimumtact/byond-regex -Otherwise, edit the file `code/_compile_options.dm`, and comment out: -`#define USE_BYGEX` -at the bottom, so that it looks like this: -`//#define USE_BYGEX` -Recompile the codebase afterwards. - - ##UPDATING To update an existing installation, first back up your /config and /data folders diff --git a/SQL/database_changelog.txt b/SQL/database_changelog.txt index bf305298ce2..dfd4b30dad3 100644 --- a/SQL/database_changelog.txt +++ b/SQL/database_changelog.txt @@ -1,3 +1,15 @@ +14 August 2015, by Jordie0608 + +Added new table 'notes' to replace BYOND's .sav note system. + +To create this new table run the following command: + +CREATE TABLE `notes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `ckey` varchar(32) NOT NULL, `notetext` text NOT NULL, `timestamp` datetime NOT NULL, `adminckey` varchar(32) NOT NULL, `last_editor` varchar(32), `edits` text, `server` varchar(50) NOT NULL, PRIMARY KEY (`id`)) + +Remember to add prefix to the table name if you use them. + +---------------------------------------------------- + 28 July 2015, by Jordie0608 Modified table 'memo', removing 'id' column and making 'ckey' primary. diff --git a/SQL/tgstation_schema.sql b/SQL/tgstation_schema.sql index caeec1c432c..ae8bf1859d6 100644 --- a/SQL/tgstation_schema.sql +++ b/SQL/tgstation_schema.sql @@ -338,5 +338,25 @@ CREATE TABLE `memo` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `notes` +-- + +DROP TABLE IF EXISTS `notes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `notes` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `ckey` varchar(32) NOT NULL, + `notetext` text NOT NULL, + `timestamp` datetime NOT NULL, + `adminckey` varchar(32) NOT NULL, + `last_editor` varchar(32), + `edits` text, + `server` varchar(50) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + -- Dump completed on 2013-03-24 18:02:35 diff --git a/SQL/tgstation_schema_prefixed.sql b/SQL/tgstation_schema_prefixed.sql index 93ba765835d..b49032a7ee1 100644 --- a/SQL/tgstation_schema_prefixed.sql +++ b/SQL/tgstation_schema_prefixed.sql @@ -333,5 +333,25 @@ CREATE TABLE `SS13_memo` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `SS13_notes` +-- + +DROP TABLE IF EXISTS `SS13_notes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `SS13_notes` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `ckey` varchar(32) NOT NULL, + `notetext` text NOT NULL, + `timestamp` datetime NOT NULL, + `adminckey` varchar(32) NOT NULL, + `last_editor` varchar(32), + `edits` text, + `server` varchar(50) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + -- Dump completed on 2013-03-24 18:02:35 diff --git a/code/ATMOSPHERICS/components/unary_devices/cryo.dm b/code/ATMOSPHERICS/components/unary_devices/cryo.dm index 4565fd97ccc..67797df7868 100644 --- a/code/ATMOSPHERICS/components/unary_devices/cryo.dm +++ b/code/ATMOSPHERICS/components/unary_devices/cryo.dm @@ -314,7 +314,7 @@ occupant.heal_organ_damage(heal_brute,heal_fire) if(beaker && next_trans == 0) beaker.reagents.trans_to(occupant, 1, 10) - beaker.reagents.reaction(occupant) + beaker.reagents.reaction(occupant, VAPOR) next_trans++ if(next_trans == 10) next_trans = 0 diff --git a/code/LINDA/LINDA_turf_tile.dm b/code/LINDA/LINDA_turf_tile.dm index d837658483c..0dee6d8186a 100644 --- a/code/LINDA/LINDA_turf_tile.dm +++ b/code/LINDA/LINDA_turf_tile.dm @@ -8,7 +8,7 @@ var/atmos_supeconductivity = 0 /turf/assume_air(datum/gas_mixture/giver) //use this for machines to adjust air - del(giver) + qdel(giver) return 0 /turf/return_air() diff --git a/code/_onclick/hud/action.dm b/code/_onclick/hud/action.dm index 3f005c58c0f..b9c8254054b 100644 --- a/code/_onclick/hud/action.dm +++ b/code/_onclick/hud/action.dm @@ -45,7 +45,8 @@ if(button) if(T.client) T.client.screen -= button - del(button) + qdel(button) + button = null T.actions.Remove(src) T.update_action_buttons() owner = null diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index c8670e39a3d..ff6f803f5f0 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -163,6 +163,8 @@ var/reactionary_explosions = 0 //If we use reactionary explosions, explosions that react to walls and doors + var/autoconvert_notes = 0 //if all connecting player's notes should attempt to be converted to the database + /datum/configuration/New() var/list/L = typesof(/datum/game_mode) - /datum/game_mode for(var/T in L) @@ -178,7 +180,7 @@ probabilities[M.config_tag] = M.probability if(M.votable) votable_modes += M.config_tag - del(M) + qdel(M) votable_modes += "secret" /datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist @@ -343,6 +345,8 @@ if (world.log != newlog) world.log << "Now logging runtimes to data/logs/runtimes/runtime-[time2text(world.realtime, "YYYY-MM-DD")].log" world.log = newlog + if("autoconvert_notes") + config.autoconvert_notes = 1 else diary << "Unknown setting in configuration: '[name]'" @@ -567,7 +571,7 @@ var/datum/game_mode/M = new T() if(M.config_tag && M.config_tag == mode_name) return M - del(M) + qdel(M) return new /datum/game_mode/extended() /datum/configuration/proc/get_runnable_modes() @@ -576,10 +580,10 @@ var/datum/game_mode/M = new T() //world << "DEBUG: [T], tag=[M.config_tag], prob=[probabilities[M.config_tag]]" if(!(M.config_tag in modes)) - del(M) + qdel(M) continue if(probabilities[M.config_tag]<=0) - del(M) + qdel(M) continue if(M.can_start()) runnable_modes[M] = probabilities[M.config_tag] diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm index a4639a42327..31bdbd542a8 100644 --- a/code/controllers/master_controller.dm +++ b/code/controllers/master_controller.dm @@ -103,7 +103,7 @@ calculate the longest number of ticks the MC can wait between each cycle without var/oldwait = SS.wait var/GlobalCostDelta = (SSCostPerSecond-(SS.cost/(SS.wait/10)))-1 var/NewWait = MC_AVERAGE(oldwait,(SS.cost-SS.dwait_buffer+GlobalCostDelta)*SS.dwait_delta) - SS.wait = Clamp(round(NewWait,world.tick_lag),SS.dwait_lower,SS.dwait_upper) + SS.wait = Clamp(NewWait,SS.dwait_lower,SS.dwait_upper) if (oldwait != SS.wait) calculateGCD() SS.next_fire += SS.wait @@ -147,4 +147,4 @@ calculate the longest number of ticks the MC can wait between each cycle without msg += "\t [varname] = [varval]\n" world.log << msg - subsystems = master_controller.subsystems \ No newline at end of file + subsystems = master_controller.subsystems diff --git a/code/controllers/subsystem/air.dm b/code/controllers/subsystem/air.dm index c3d63b689a4..6c45cc35ae7 100644 --- a/code/controllers/subsystem/air.dm +++ b/code/controllers/subsystem/air.dm @@ -95,13 +95,11 @@ var/datum/subsystem/air/SSair /datum/subsystem/air/proc/process_pipenets() - var/i=1 for(var/thing in networks) if(thing) thing:process() - ++i continue - networks.Cut(i, i+1) + networks.Remove(thing) /datum/subsystem/air/proc/process_atmos_machinery() diff --git a/code/controllers/subsystem/bots.dm b/code/controllers/subsystem/bots.dm index 3a4d79d1cf3..6f71bb62d9b 100644 --- a/code/controllers/subsystem/bots.dm +++ b/code/controllers/subsystem/bots.dm @@ -14,11 +14,9 @@ var/datum/subsystem/bots/SSbot /datum/subsystem/bots/fire() var/seconds = wait * 0.1 - var/i=1 for(var/thing in processing) if(thing && !thing:gc_destroyed) spawn(-1) thing:bot_process(seconds) - ++i continue - processing.Cut(i, i+1) \ No newline at end of file + processing.Remove(thing) \ No newline at end of file diff --git a/code/controllers/subsystem/diseases.dm b/code/controllers/subsystem/diseases.dm index d28785d947f..76343a81bec 100644 --- a/code/controllers/subsystem/diseases.dm +++ b/code/controllers/subsystem/diseases.dm @@ -13,10 +13,8 @@ var/datum/subsystem/diseases/SSdisease ..("P:[processing.len]") /datum/subsystem/diseases/fire() - var/i=1 for(var/thing in processing) if(thing) thing:process() - ++i continue - processing.Cut(i,i+1) + processing.Remove(thing) diff --git a/code/controllers/subsystem/events.dm b/code/controllers/subsystem/events.dm index e2dfe59a2eb..b381803ba67 100644 --- a/code/controllers/subsystem/events.dm +++ b/code/controllers/subsystem/events.dm @@ -36,13 +36,11 @@ var/datum/subsystem/events/SSevent /datum/subsystem/events/fire() checkEvent() - var/i=1 for(var/thing in running) if(thing) thing:process() - ++i continue - running.Cut(i,i+1) + running.Remove(thing) //checks if we should select a random event yet, and reschedules if necessary diff --git a/code/controllers/subsystem/lighting.dm b/code/controllers/subsystem/lighting.dm index 053241cd2e7..38389bf704f 100644 --- a/code/controllers/subsystem/lighting.dm +++ b/code/controllers/subsystem/lighting.dm @@ -71,13 +71,11 @@ var/datum/subsystem/lighting/SSlighting if(z_level) //we need to loop through to clear only shifted turfs from the list. or we will cause errors - var/i=1 for(var/thing in changed_turfs) var/turf/T = thing if(T.z in z_start to z_finish) - ++i continue - changed_turfs.Cut(i, i+1) + changed_turfs.Remove(thing) else changed_turfs.Cut() diff --git a/code/controllers/subsystem/nanoUI.dm b/code/controllers/subsystem/nanoUI.dm index feb60fce007..5ec4344fee7 100644 --- a/code/controllers/subsystem/nanoUI.dm +++ b/code/controllers/subsystem/nanoUI.dm @@ -38,12 +38,10 @@ var/datum/subsystem/nano/SSnano /datum/subsystem/nano/fire() - var/i=1 for(var/thing in SSnano.processing_uis) if(thing) var/datum/nanoui/ui = thing if(ui.src_object && ui.user) ui.process() - ++i continue - processing_uis.Cut(i, i+1) + processing_uis.Remove(thing) diff --git a/code/controllers/subsystem/objects.dm b/code/controllers/subsystem/objects.dm index 35236b38fb6..61c7b804aea 100644 --- a/code/controllers/subsystem/objects.dm +++ b/code/controllers/subsystem/objects.dm @@ -31,16 +31,14 @@ var/datum/subsystem/objects/SSobj /datum/subsystem/objects/fire() - var/i=1 for(var/thing in SSobj.processing) if(thing) thing:process(wait) - ++i continue - SSobj.processing.Cut(i, i+1) + SSobj.processing.Remove(thing) for(var/obj/burningobj in SSobj.burning) if(burningobj && (burningobj.burn_state == 1)) if(burningobj.burn_world_time < world.time) burningobj.burn() else - SSobj.burning -= burningobj \ No newline at end of file + SSobj.burning.Remove(burningobj) \ No newline at end of file diff --git a/code/controllers/subsystem/radio.dm b/code/controllers/subsystem/radio.dm index 25f172bf9da..110f48d8f42 100644 --- a/code/controllers/subsystem/radio.dm +++ b/code/controllers/subsystem/radio.dm @@ -29,7 +29,7 @@ var/datum/subsystem/radio/radio_controller frequency.remove_listener(device) if(frequency.devices.len == 0) - del(frequency) + qdel(frequency) frequencies -= f_text return 1 diff --git a/code/controllers/subsystem/shuttles.dm b/code/controllers/subsystem/shuttles.dm index d578f1c501c..d31987e4f0b 100644 --- a/code/controllers/subsystem/shuttles.dm +++ b/code/controllers/subsystem/shuttles.dm @@ -24,10 +24,13 @@ var/datum/subsystem/shuttle/SSshuttle var/points_per_decisecond = 0.005 //points gained every decisecond var/points_per_slip = 2 //points gained per slip returned var/points_per_crate = 5 //points gained per crate returned - var/points_per_intel = 100 //points gained per intel returned + var/points_per_intel = 250 //points gained per intel returned var/points_per_plasma = 5 //points gained per plasma returned + var/points_per_design = 25 //points gained per max reliability research design returned (only for initilally unreliable designs) var/centcom_message = "" //Remarks from Centcom on how well you checked the last order. - var/list/discoveredPlants = list() //Unique typepaths for unusual things we've already sent CentComm, associated with their potencies + var/list/discoveredPlants = list() //Typepaths for unusual plants we've already sent CentComm, associated with their potencies + var/list/techLevels = list() + var/list/researchDesigns = list() var/list/shoppinglist = list() var/list/requestlist = list() var/list/supply_packs = list() @@ -61,15 +64,12 @@ var/datum/subsystem/shuttle/SSshuttle /datum/subsystem/shuttle/fire() points += points_per_decisecond * wait - - var/i=1 for(var/thing in mobile) if(thing) var/obj/docking_port/mobile/P = thing P.check() - ++i continue - mobile.Cut(i, i+1) + mobile.Remove(thing) /datum/subsystem/shuttle/proc/getShuttle(id) for(var/obj/docking_port/mobile/M in mobile) @@ -306,7 +306,7 @@ var/datum/subsystem/shuttle/SSshuttle var/obj/structure/largecrate/LC = Crate LC.manifest = slip LC.update_icon() - + return Crate /datum/subsystem/shuttle/proc/generateSupplyOrder(packId, _orderedby, _orderedbyRank, _comment) diff --git a/code/controllers/subsystem/shuttles/supply.dm b/code/controllers/subsystem/shuttles/supply.dm index 8d0ca50207f..71873c539da 100644 --- a/code/controllers/subsystem/shuttles/supply.dm +++ b/code/controllers/subsystem/shuttles/supply.dm @@ -143,6 +143,32 @@ if(istype(thing, /obj/item/documents/syndicate)) ++intel_count + // Sell tech levels + if(istype(thing, /obj/item/weapon/disk/tech_disk)) + var/obj/item/weapon/disk/tech_disk/disk = thing + if(!disk.stored) continue + var/datum/tech/tech = disk.stored + + var/cost = tech.getCost(SSshuttle.techLevels[tech.id]) + if(cost) + SSshuttle.techLevels[tech.id] = tech.level + SSshuttle.points += cost + msg += "+[cost]: [tech.name] - new data.
" + + // Sell max reliablity designs + if(istype(thing, /obj/item/weapon/disk/design_disk)) + var/obj/item/weapon/disk/design_disk/disk = thing + if(!disk.blueprint) continue + var/datum/design/design = disk.blueprint + if(design.id in SSshuttle.researchDesigns) continue + + if(initial(design.reliability) < 100 && design.reliability >= 100) + // Maxed out reliability designs only. + SSshuttle.points += SSshuttle.points_per_design + SSshuttle.researchDesigns += design.id + msg += "+[SSshuttle.points_per_design]: Reliable [design.name] design.
" + + // Sell exotic plants if(istype(thing, /obj/item/seeds)) var/obj/item/seeds/S = thing if(S.rarity == 0) // Mundane species diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 98fecb0227c..45aab6c2339 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -137,7 +137,7 @@ var/datum/subsystem/ticker/ticker mode = config.pick_mode(master_mode) if(!mode.can_start()) world << "Unable to start [mode.name]. Not enough players, [mode.required_players] players and [mode.required_enemies] eligible antagonists needed. Reverting to pre-game lobby." - del(mode) + qdel(mode) SSjob.ResetOccupations() return 0 @@ -148,7 +148,7 @@ var/datum/subsystem/ticker/ticker if(!Debug2) if(!can_continue) - del(mode) + qdel(mode) world << "Error setting up [master_mode]. Reverting to pre-game lobby." SSjob.ResetOccupations() return 0 @@ -289,8 +289,8 @@ var/datum/subsystem/ticker/ticker flick("station_intact",cinematic) world << sound('sound/ambience/signal.ogg') sleep(100) - if(cinematic) del(cinematic) - if(temp_buckle) del(temp_buckle) + if(cinematic) qdel(cinematic) + if(temp_buckle) qdel(temp_buckle) return //Faster exit, since nothing happened else //Station nuked (nuke,explosion,summary) flick("intro_nuke",cinematic) diff --git a/code/controllers/subsystem/voting.dm b/code/controllers/subsystem/voting.dm index 5d11eccd14a..1fce5abd014 100644 --- a/code/controllers/subsystem/voting.dm +++ b/code/controllers/subsystem/voting.dm @@ -116,7 +116,16 @@ var/datum/subsystem/vote/SSvote else master_mode = . if(restart) - world.Reboot("Restart vote successful.", "end_error", "restart vote") + var/active_admins = 0 + for(var/client/C in admins) + if(!C.is_afk() && check_rights_for(C, R_SERVER)) + active_admins = 1 + break + if(!active_admins) + world.Reboot("Restart vote successful.", "end_error", "restart vote") + else + world << "Notice:Restart vote will not restart the server automatically because there are active admins on." + message_admins("A restart vote has passed, but there are active admins on with +server, so it has been canceled. If you wish, you may restart the server.") return . diff --git a/code/controllers/subsystems.dm b/code/controllers/subsystems.dm index 88e3451a4d2..5c3c9a50f72 100644 --- a/code/controllers/subsystems.dm +++ b/code/controllers/subsystems.dm @@ -47,7 +47,7 @@ /datum/subsystem/proc/stat_entry(msg) var/dwait = "" if (dynamic_wait) - dwait = "DWait:[wait]ds " + dwait = "DWait:[round(wait,0.1)]ds " stat(name, "[round(cost,0.001)]ds\t[dwait][msg]") @@ -59,4 +59,4 @@ //usually called via datum/subsystem/New() when replacing a subsystem (i.e. due to a recurring crash) //should attempt to salvage what it can from the old instance of subsystem -/datum/subsystem/proc/Recover() \ No newline at end of file +/datum/subsystem/proc/Recover() diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm index 0ce16230efc..74cd402bca3 100644 --- a/code/datums/ai_laws.dm +++ b/code/datums/ai_laws.dm @@ -134,7 +134,7 @@ src.ion += law /datum/ai_laws/proc/clear_inherent_laws() - del(src.inherent) + qdel(src.inherent) src.inherent = list() /datum/ai_laws/proc/add_supplied_law(number, law) diff --git a/code/datums/computerfiles.dm b/code/datums/computerfiles.dm deleted file mode 100644 index 37ba1ec51e0..00000000000 --- a/code/datums/computerfiles.dm +++ /dev/null @@ -1,7 +0,0 @@ -/datum - computer - var/name - folder - var/list/datum/computer/contents = list() - - file \ No newline at end of file diff --git a/code/datums/diseases/_disease.dm b/code/datums/diseases/_disease.dm index 954446639f3..6b098310e6d 100644 --- a/code/datums/diseases/_disease.dm +++ b/code/datums/diseases/_disease.dm @@ -138,7 +138,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease for(var/datum/disease/D in affected_mob.viruses) if(D != src) if(IsSame(D)) - del(D) + qdel(D) if(holder == affected_mob) if(affected_mob.stat != DEAD) @@ -156,7 +156,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease if(!(type in affected_mob.resistances)) affected_mob.resistances += type remove_virus() - del(src) + qdel(src) /datum/disease/New() diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index 8d5b977c3d7..94e808667ae 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -107,7 +107,7 @@ var/list/advance_cures = list( if(resistance && !(id in affected_mob.resistances)) affected_mob.resistances[id] = id remove_virus() - del(src) //delete the datum to stop it processing + qdel(src) //delete the datum to stop it processing // Returns the advance disease with a different reference memory. /datum/disease/advance/Copy(process = 0) diff --git a/code/datums/gas_mixture.dm b/code/datums/gas_mixture.dm index 277773ea3d5..ff91a69b1d6 100644 --- a/code/datums/gas_mixture.dm +++ b/code/datums/gas_mixture.dm @@ -321,7 +321,7 @@ What are the archived variables for? trace_gases += corresponding corresponding.moles += trace_gas.moles -// del(giver) +// qdel(giver) return 1 /datum/gas_mixture/remove(amount) diff --git a/code/datums/modules.dm b/code/datums/modules.dm index e52a644d157..af693456543 100644 --- a/code/datums/modules.dm +++ b/code/datums/modules.dm @@ -24,7 +24,7 @@ var/list/modules = list( // global associative list var/mneed = mods.inmodlist(type) // find if this type has modules defined if(!mneed) // not found in module list? - del(src) // delete self, thus ending proc + qdel(src) // delete self, thus ending proc var/needed = mods.getbitmask(type) // get a bitmask for the number of modules in this object status = needed diff --git a/code/datums/mutations.dm b/code/datums/mutations.dm index b517e417d93..f2e12cee156 100644 --- a/code/datums/mutations.dm +++ b/code/datums/mutations.dm @@ -214,10 +214,12 @@ text_gain_indication = "You get a headache." /datum/mutation/human/epilepsy/on_life(mob/living/carbon/human/owner) - if ((prob(1) && owner.paralysis < 1)) + if((prob(1) && owner.paralysis < 1)) owner.visible_message("[owner] starts having a seizure!", "You have a seizure!") owner.Paralyse(10) owner.Jitter(1000) + spawn(90) + owner.jitteriness = 10 /datum/mutation/human/bad_dna @@ -364,7 +366,8 @@ if(T.lighting_lumcount <= 2) owner.alpha -= 25 else - owner.alpha = round(255 * 0.80) + if(!owner.dna.check_mutation(CHAMELEON)) + owner.alpha = round(255 * 0.80) /datum/mutation/human/stealth/on_losing(mob/living/carbon/human/owner) if(..()) diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 5d0e6fb95a0..311699f3819 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -233,6 +233,17 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine cost = 10 containername = "disabler crate" +/datum/supply_packs/security/forensics + name = "Forensics Crate" + contains = list(/obj/item/device/detective_scanner, + /obj/item/weapon/storage/box/evidence, + /obj/item/device/camera, + /obj/item/device/taperecorder, + /obj/item/toy/crayon/white, + /obj/item/clothing/head/det_hat) + cost = 20 + containername ="forensics crate" + ///// Armory stuff /datum/supply_packs/security/armory @@ -748,6 +759,8 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine /obj/item/weapon/reagent_containers/food/condiment/rice, /obj/item/weapon/reagent_containers/food/condiment/milk, /obj/item/weapon/reagent_containers/food/condiment/soymilk, + /obj/item/weapon/reagent_containers/food/condiment/saltshaker, + /obj/item/weapon/reagent_containers/food/condiment/peppermill, /obj/item/weapon/storage/fancy/egg_box, /obj/item/weapon/reagent_containers/food/condiment/enzyme, /obj/item/weapon/reagent_containers/food/condiment/sugar, @@ -1219,6 +1232,26 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine containername = "crate" //let's keep it subtle, eh? contraband = 1 +/datum/supply_packs/misc/randomised/toys + name = "Toy Crate" + num_contained = 5 + contains = list(/obj/item/toy/spinningtoy, + /obj/item/toy/sword, + /obj/item/toy/foamblade, + /obj/item/toy/AI, + /obj/item/toy/owl, + /obj/item/toy/griffin, + /obj/item/toy/nuke, + /obj/item/toy/minimeteor, + /obj/item/toy/carpplushie, + /obj/item/weapon/coin/antagtoken, + /obj/item/stack/tile/fakespace, + /obj/item/weapon/gun/projectile/shotgun/toy/crossbow, + /obj/item/toy/redbutton) + + cost = 50 // or play the arcade machines ya lazy bum + containername ="toy crate" + /datum/supply_packs/misc/autodrobe name = "Autodrobe Supply Crate" contains = list(/obj/item/weapon/vending_refill/autodrobe, @@ -1280,3 +1313,4 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine cost = 40 containername = "foam force pistols crate" contraband = 1 + diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index bf1edc9c372..d7b6ef50879 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -514,6 +514,13 @@ var/list/uplink_items = list() item = /obj/item/weapon/storage/backpack/dufflebag/syndie/surgery cost = 4 +/datum/uplink_item/device_tools/military_belt + name = "Military Belt" + desc = "A robust seven-slot red belt made for carrying a broad variety of weapons, ammunition and explosives" + item = /obj/item/weapon/storage/belt/military + cost = 3 + excludefrom = list(/datum/game_mode/nuclear) + /datum/uplink_item/device_tools/medkit name = "Syndicate Combat Medic Kit" desc = "The syndicate medkit is a suspicious black and red. Included is a combat stimulant injector for rapid healing, a medical hud for quick identification of injured comrades, \ diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 316c437c912..9a0c7e18cd8 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -391,7 +391,7 @@ else qdel(AM) if(istype(T, /turf/simulated)) - del(T) + qdel(T) /*for(var/atom/movable/bug in src) // If someone (or something) is somehow still in the shuttle's docking area... if(ismob(bug)) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index df257364a90..70d9fa01be2 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -59,7 +59,7 @@ return /atom/proc/assume_air(datum/gas_mixture/giver) - del(giver) + qdel(giver) return null /atom/proc/remove_air(amount) @@ -284,12 +284,8 @@ var/list/blood_splatter_icons = list() var/mob/living/carbon/human/H = M if(NOBLOOD in H.dna.species.specflags) return 0 - if(rejects_blood()) + if(rejects_blood() || !istype(M) || !check_dna_integrity(M)) return 0 - if(!istype(M)) - return 0 - if(!check_dna_integrity(M)) //check dna is valid and create/setup if necessary - return 0 //no dna! return 1 /obj/add_blood(mob/living/carbon/M) diff --git a/code/game/dna.dm b/code/game/dna.dm index c8c0ceb4cd1..826d8468f9a 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -35,7 +35,7 @@ destination.dna.unique_enzymes = unique_enzymes destination.dna.uni_identity = uni_identity destination.dna.blood_type = blood_type - hardset_dna(destination, null, null, null, null, species) + hardset_dna(destination, null, null, null, null, species.type) destination.dna.features = features destination.dna.real_name = real_name destination.dna.mutations = mutations diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm index eeada126134..cad8505781d 100644 --- a/code/game/gamemodes/blob/blobs/blob_mobs.dm +++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm @@ -39,6 +39,7 @@ var/obj/effect/blob/factory/factory = null var/list/human_overlays = list() var/is_zombie = 0 + gold_core_spawnable = 1 /mob/living/simple_animal/hostile/blob/blobspore/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) ..() @@ -94,12 +95,12 @@ var/turf/location = get_turf(src) // Create the reagents to put into the air - create_reagents(5) + create_reagents(10) if(overmind && overmind.blob_reagent_datum) - reagents.add_reagent(overmind.blob_reagent_datum.id, 5) + reagents.add_reagent(overmind.blob_reagent_datum.id, 10) else - reagents.add_reagent("spore", 5) + reagents.add_reagent("spore", 10) // Attach the smoke spreader and setup/start it. S.attach(location) @@ -161,7 +162,7 @@ force_threshold = 10 environment_smash = 3 mob_size = MOB_SIZE_LARGE - + gold_core_spawnable = 1 /mob/living/simple_animal/hostile/blob/blobbernaut/blob_act() return diff --git a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm index b6bd9cefb62..a0c97c1da99 100644 --- a/code/game/gamemodes/blob/powers.dm +++ b/code/game/gamemodes/blob/powers.dm @@ -157,7 +157,10 @@ last_attack = world.time OB.expand(T, 0, blob_reagent_datum.color) for(var/mob/living/L in T) - blob_reagent_datum.reaction_mob(L, TOUCH, 25) + if("blob" in L.faction) //no friendly fire + continue + var/mob_protection = L.get_permeability_protection() + blob_reagent_datum.reaction_mob(L, VAPOR, 25, 1, mob_protection) blob_reagent_datum.send_message(L) OB.color = blob_reagent_datum.color diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index ab505d83329..67066db6d70 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -1002,8 +1002,8 @@ var/list/sacrificed = list() usr.say("Uln Shogg Hafh[pick("'","`")]drn!") user << "\red You quietly prick your finger and make a pact with the geometer of blood to acquire more power." user.take_overall_damage(rand(5,20)) - del(user.head) - del(user.wear_suit) + qdel(user.head) + qdel(user.wear_suit) user.equip_to_slot_or_del(new /obj/item/clothing/head/magus(user), slot_head) user.equip_to_slot_or_del(new /obj/item/clothing/suit/magusred(user), slot_wear_suit) user.equip_to_slot_or_del(new /obj/item/clothing/shoes/cult(user), slot_shoes) @@ -1020,8 +1020,8 @@ var/list/sacrificed = list() user.put_in_hands(new /obj/item/weapon/gun/magic/wand/resurrection(user)) if (armorworn == "traveler" || armorworn == "marauder") usr.say("Tharanak n[pick("'","`")]ghft!") - del(user.head) - del(user.wear_suit) + qdel(user.head) + qdel(user.wear_suit) user.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/cult(user), slot_head) user.equip_to_slot_or_del(new /obj/item/clothing/suit/space/cult(user), slot_wear_suit) user.equip_to_slot_or_del(new /obj/item/clothing/shoes/cult(user), slot_shoes) @@ -1033,7 +1033,7 @@ var/list/sacrificed = list() if (armorworn == "marauder") user.spellremove(user) user.mind.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/conjure/creature/cult(user) - del(src) + qdel(src) return ///Summon Shell: Summons a construct shell if there's four plasteel sheets on top of the rune diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 8986580d810..f27e6522c59 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -114,7 +114,7 @@ if(G.reroll_friendly) usable_modes += G else - del(G) + qdel(G) if(!usable_modes) message_admins("Convert_roundtype failed due to no valid modes to convert to. Please report this error to the Coders.") diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 8f90c400ae9..1909376ce74 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -19,7 +19,7 @@ /datum/AI_Module/large/fireproof_core - module_name = "Core upgrade" + module_name = "Core Upgrade" mod_pick_name = "coreup" description = "An upgrade to improve core resistance, making it immune to fire and heat. This effect is permanent." cost = 50 @@ -36,7 +36,7 @@ src << "Core fireproofed." /datum/AI_Module/large/upgrade_turrets - module_name = "AI Turret upgrade" + module_name = "AI Turret Upgrade" mod_pick_name = "turret" description = "Improves the power and health of all AI turrets. This effect is permanent." cost = 50 @@ -121,7 +121,7 @@ minor_announce("Automatic system reboot complete. Have a secure day.","Network reset:") /datum/AI_Module/large/disable_rcd - module_name = "RCD disable" + module_name = "RCD Disable" mod_pick_name = "rcd" description = "Send a specialised pulse to break all RCD devices on the station." cost = 50 @@ -217,7 +217,7 @@ /datum/AI_Module/small/overload_machine - module_name = "Machine overload" + module_name = "Machine Overload" mod_pick_name = "overload" description = "Overloads an electrical machine, causing a small explosion. 2 uses." uses = 2 @@ -246,7 +246,7 @@ else src << "That's not a machine." /datum/AI_Module/small/override_machine - module_name = "Machine override" + module_name = "Machine Override" mod_pick_name = "override" description = "Overrides a machine's programming, causing it to rise up and attack everyone except other machines. 4 uses." uses = 4 diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index 3b453e491cc..5a88c2e0525 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -285,6 +285,7 @@ /datum/game_mode/proc/auto_declare_completion_malfunction() if( malf_ai.len || istype(ticker.mode,/datum/game_mode/malfunction) ) var/text = "
The malfunctioning AIs were:" + var/module_text_temp = "
Purchased modules:
" //Added at the end for(var/datum/mind/malf in malf_ai) @@ -296,10 +297,13 @@ text += "operational" if(malf.current.real_name != malf.name) text += " as [malf.current.real_name]" + var/mob/living/silicon/ai/AI = malf.current + for(var/datum/AI_Module/mod in AI.current_modules) + module_text_temp += mod.module_name + "
" else text += "hardware destroyed" text += ")" - text += "
" + text += module_text_temp world << text return 1 diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index 37223bac1d2..acb36b6e0be 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -1,6 +1,6 @@ #define LIGHT_DAM_THRESHOLD 4 #define LIGHT_HEAL_THRESHOLD 2 -#define LIGHT_DAMAGE_TAKEN 10 +#define LIGHT_DAMAGE_TAKEN 7 /* SHADOWLING: A gamemode based on previously-run events @@ -232,8 +232,8 @@ Made by Xhuis id = "shadowling" say_mod = "chitters" specflags = list(NOBREATH,NOBLOOD,RADIMMUNE,NOGUNS) //Can't use guns due to muzzle flash - burnmod = 2 //2x burn damage lel - heatmod = 2 + burnmod = 1.5 //1.5x burn damage, 2x is excessive + heatmod = 1.5 /datum/species/shadow/ling/spec_life(mob/living/carbon/human/H) if(!H.weakeyes) H.weakeyes = 1 //Makes them more vulnerable to flashes and flashbangs diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 4ae18618855..4c0ae25bd27 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -78,7 +78,7 @@ if(initial(S.name) == initial(aspell.name)) spell_levels = aspell.spell_level user.mind.spell_list.Remove(aspell) - del(S) + qdel(S) return cost * (spell_levels+1) return -1 /datum/spellbook_entry/proc/GetInfo() @@ -424,7 +424,7 @@ entries |= E categories |= E.category else - del(E) + qdel(E) tab = categories[1] /obj/item/weapon/spellbook/New() diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index cfcd3967614..ca14b8c64ae 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -810,7 +810,8 @@ /obj/machinery/alarm/emag_act(mob/user) if(!emagged) src.emagged = 1 - user.visible_message("Sparks fly out of the [src]!", "You emag the [src], disabling its safeties.") + if(user) + user.visible_message("Sparks fly out of the [src]!", "You emag the [src], disabling its safeties.") playsound(src.loc, 'sound/effects/sparks4.ogg', 50, 1) return @@ -938,7 +939,8 @@ FIRE ALARM /obj/machinery/firealarm/emag_act(mob/user) if(!emagged) src.emagged = 1 - user.visible_message("Sparks fly out of the [src]!", "You emag the [src], disabling its thermal sensors.") + if(user) + user.visible_message("Sparks fly out of the [src]!", "You emag the [src], disabling its thermal sensors.") playsound(src.loc, 'sound/effects/sparks4.ogg', 50, 1) return diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 6adfae84255..223f9024d2b 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -477,7 +477,7 @@ if(lings_aboard) if(event == ORION_TRAIL_LING || prob(55)) event = ORION_TRAIL_LING_ATTACK - event() + event() turns += 1 if(emagged) var/mob/living/carbon/M = usr //for some vars @@ -568,13 +568,13 @@ turns += 1 event = null else if(href_list["useengine"]) //use parts - engine -= 1 + engine = max(0, --engine) event = null else if(href_list["useelec"]) //use parts - electronics -= 1 + electronics = max(0, --electronics) event = null else if(href_list["usehull"]) //use parts - hull -= 1 + hull = max(0, --hull) event = null else if(href_list["wait"]) //wait 3 days food -= ((alive+lings_aboard)*2)*3 @@ -789,7 +789,7 @@ if(ORION_TRAIL_LING) eventdat += "Strange reports warn of changelings infiltrating crews on trips to Orion..." - if(settlers.len <= 1) + if(settlers.len <= 2) eventdat += "
Your crew's chance of reaching Orion is so slim the changelings likely avoided your ship..." eventdat += "

Continue

" eventdat += "

Close

" diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 1eaaa0b7fd5..7bfbe2776ac 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -581,7 +581,7 @@ continue else if(prob(1)) - del(R) + qdel(R) continue ..(severity) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index c87a35f2486..384199d95e7 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -418,7 +418,7 @@ What a mess.*/ if("Purge All Records") investigate_log("[usr.name] ([usr.key]) has purged all the security records.", "records") for(var/datum/data/record/R in data_core.security) - del(R) + qdel(R) data_core.security.Cut() temp = "All Security records deleted." @@ -667,7 +667,7 @@ What a mess.*/ investigate_log("[usr.name] ([usr.key]) has deleted the security records for [active1.fields["name"]].", "records") if(active2) data_core.security -= active2 - del(active2) + qdel(active2) if("Delete Record (ALL) Execute") if(active1) @@ -675,14 +675,14 @@ What a mess.*/ for(var/datum/data/record/R in data_core.medical) if((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"])) data_core.medical -= R - del(R) + qdel(R) break data_core.general -= active1 - del(active1) + qdel(active1) if(active2) data_core.security -= active2 - del(active2) + qdel(active2) else temp = "This function does not appear to be working at the moment. Our apologies." @@ -734,7 +734,7 @@ What a mess.*/ continue else if(prob(1)) - del(R) + qdel(R) continue ..(severity) diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index d6d5f886095..c9a24cb6b5d 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -38,9 +38,6 @@ Radio = new/obj/item/device/radio(src) Radio.listening = 0 - pixel_x = ((src.dir & 3)? (0) : (src.dir == 4 ? 32 : -32)) - pixel_y = ((src.dir & 3)? (src.dir ==1 ? 24 : -32) : (0)) - spawn(20) for(var/obj/machinery/door/window/brigdoor/M in range(20, src)) if (M.id == src.id) diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index e528bf28b69..bde8908cf70 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -7,7 +7,7 @@ if(master) master.post_signal(signal, comm_line) else - del(signal) + qdel(signal) /datum/computer/file/embedded_program/proc/receive_user_command(command) diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 43b767934ee..667f9735857 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -375,7 +375,7 @@ // N, S, E, W are directional // C is center // R is random (in magnetic field's bounds) - del(signal) + qdel(signal) break // break the loop if the character located is invalid signal.data["command"] = nextmove diff --git a/code/game/machinery/overview.dm b/code/game/machinery/overview.dm index 873a51797d2..dcdfd5a74e3 100644 --- a/code/game/machinery/overview.dm +++ b/code/game/machinery/overview.dm @@ -174,8 +174,8 @@ HI.Insert(I, frame=1, delay = 5) HI.Insert(J, frame=2, delay = 5) - del(I) - del(J) + qdel(I) + qdel(J) H.icon = HI H.layer = 25 usr.mapobjs += H @@ -294,7 +294,7 @@ var/icon/I = imap[i+1] H.icon = I - del(I) + qdel(I) H.layer = 25 usr.mapobjs += H diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 707abc57f65..f0a2c610a61 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -1092,7 +1092,7 @@ Status: []
"}, user << "You short out the turret controls' access analysis module." emagged = 1 locked = 0 - if(user.machine==src) + if(user && user.machine==src) src.attack_hand(user) /obj/machinery/turretid/attack_ai(mob/user) diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 67b8c167772..e7ab6fc6daf 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -10,19 +10,24 @@ icon_state = "close" anchored = 1 density = 1 + //Vars to hold internal items var/mob/living/OCCUPANT = null var/obj/item/clothing/suit/space/SUIT = null - var/SUIT_TYPE = null var/obj/item/clothing/head/helmet/space/HELMET = null + var/obj/item/clothing/mask/MASK = null + var/obj/item/STORAGE = null + + //Base types on creation + var/SUIT_TYPE = null var/HELMET_TYPE = null - var/obj/item/clothing/mask/MASK = null //All the stuff that's gonna be stored insiiiiiiiiiiiiiiiiiiide, nyoro~n - var/MASK_TYPE = null //Erro's idea on standarising SSUs whle keeping creation of other SSU types easy: Make a child SSU, name it something then set the TYPE vars to your desired suit output. New() should take it from there by itself. - var/obj/item/STORAGE = null //One-slot storage slot for anything... food not recommended + var/MASK_TYPE = null var/STORAGE_TYPE = null + + //Machine related vars var/isopen = 0 var/islocked = 0 var/isUV = 0 - var/ispowered = 1 //starts powered + var/ispowered = 1 var/isbroken = 0 var/issuperUV = 0 var/panelopen = 0 @@ -30,7 +35,6 @@ var/cycletime_left = 0 -//The units themselves///////////////// /obj/machinery/suit_storage_unit/standard_unit SUIT_TYPE = /obj/item/clothing/suit/space/eva @@ -168,17 +172,13 @@ dat+= "Suit storage unit: Maintenance panel" dat+= "Maintenance panel controls
" dat+= "The panel is ridden with controls, button and meters, labeled in strange signs and symbols that
you cannot understand. Probably the manufactoring world's language.
Among other things, a few controls catch your eye.

" - dat+= text("A small dial with a \"ë\" symbol embroidded on it. It's pointing towards a gauge that reads [].
Turn towards []
",(src.issuperUV ? "15nm" : "185nm"),src,(src.issuperUV ? "185nm" : "15nm") ) + dat+= text("A small dial with a \"ë\" symbol embroidded on it. It's pointing towards a gauge that reads [].
Turn towards []
",(src.issuperUV ? "15nm" : "185nm"),src,(src.issuperUV ? "185nm" : "15nm") ) dat+= text("A thick old-style button, with 2 grimy LED lights next to it. The [] LED is on.
Press button",(src.safetieson? "GREEN" : "RED"),src) dat+= text("

Close panel", user) - //user << browse(dat, "window=ssu_m_panel;size=400x500") - //onclose(user, "ssu_m_panel") else if(src.isUV) //The thing is running its cauterisation cycle. You have to wait. dat += "Suit storage unit" dat+= "Unit is cauterising contents with selected UV ray intensity. Please wait.
" - //dat+= "Cycle end in: [src.cycletimeleft()] seconds. " - //user << browse(dat, "window=ssu_cycling_panel;size=400x500") - //onclose(user, "ssu_cycling_panel") + else if(!src.isbroken) @@ -208,14 +208,12 @@ dat+= text("Unit status: []",(src.islocked? "**LOCKED**
" : "**UNLOCKED**
") ) dat+= text("Start Disinfection cycle
",src) dat += text("

Close control panel", user) - //user << browse(dat, "window=Suit Storage Unit;size=400x500") - //onclose(user, "Suit Storage Unit") + else //Ohhhh shit it's dirty or broken! Let's inform the guy. dat+= "Suit storage unit" dat+= "Unit chamber is too contaminated to continue usage. Please call for a qualified individual to perform maintenance.

" dat+= text("
Close control panel", user) - //user << browse(dat, "window=suit_storage_unit;size=400x500") - //onclose(user, "suit_storage_unit") + var/datum/browser/popup = new(user, "suit_storage_unit", "Suit Storage Unit", 440, 500) popup.set_content(dat) @@ -227,7 +225,7 @@ /obj/machinery/suit_storage_unit/Topic(href, href_list) //I fucking HATE this proc if(..()) return - if(usr == src.OCCUPANT) //No unlocking yourself out! + if(usr == src.OCCUPANT) return if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai))) usr.set_machine(src) @@ -253,29 +251,15 @@ src.eject_occupant(usr) src.updateUsrDialog() src.update_icon() - /*if (href_list["refresh"]) - src.updateUsrDialog()*/ src.add_fingerprint(usr) return /obj/machinery/suit_storage_unit/proc/toggleUV(mob/user) -// var/protected = 0 -// var/mob/living/carbon/human/H = user if(!src.panelopen) return - - /*if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves - if(H.gloves) - var/obj/item/clothing/gloves/G = H.gloves - if(istype(G,/obj/item/clothing/gloves/yellow)) - protected = 1 - - if(!protected) - playsound(src.loc, "sparks", 75, 1, -1) - user << "You try to touch the controls but you get zapped. There must be a short circuit somewhere." - return*/ - else //welp, the guy is protected, we can continue + + else if(src.issuperUV) user << "You slide the dial back towards \"185nm\"." src.issuperUV = 0 @@ -286,21 +270,8 @@ /obj/machinery/suit_storage_unit/proc/togglesafeties(mob/user) -// var/protected = 0 -// var/mob/living/carbon/human/H = user if(!src.panelopen) //Needed check due to bugs return - - /*if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves - if(H.gloves) - var/obj/item/clothing/gloves/G = H.gloves - if(istype(G,/obj/item/clothing/gloves/yellow) ) - protected = 1 - - if(!protected) - playsound(src.loc, "sparks", 75, 1, -1) - user << "You try to touch the controls but you get zapped. There must be a short circuit somewhere." - return*/ else user << "You push the button. The coloured LED next to it changes." src.safetieson = !src.safetieson @@ -323,7 +294,9 @@ STORAGE = null /obj/machinery/suit_storage_unit/proc/eject(atom/movable/ITEM) - ITEM.loc = src.loc + //Check item still exists - if not, then usually someone has already ejected the item + if(ITEM) + ITEM.loc = src.loc /obj/machinery/suit_storage_unit/proc/dump_everything() for(var/obj/item/ITEM in src) @@ -364,7 +337,7 @@ if(src.OCCUPANT && src.safetieson) user << "WARNING: Biological entity detected in the confines of the Unit's storage. Cannot initiate cycle." return - if(!src.HELMET && !src.MASK && !src.SUIT && !src.STORAGE && !src.OCCUPANT ) //shit's empty yo + if(!src.HELMET && !src.MASK && !src.SUIT && !src.STORAGE && !src.OCCUPANT ) user << "Unit storage bays empty. Nothing to disinfect -- Aborting." return user << "You start the Unit's cauterisation cycle." @@ -375,7 +348,7 @@ src.update_icon() src.updateUsrDialog() - var/i //our counter + var/i spawn(0) for(i=0,i<4,++i) sleep(50) @@ -393,17 +366,17 @@ for(var/obj/item/ITEM in src) ITEM.clean_blood() if(istype(STORAGE, /obj/item/weapon/reagent_containers/food)) - del(STORAGE) + qdel(STORAGE) else //It was supercycling, destroy everything src.HELMET = null src.SUIT = null src.MASK = null - del(STORAGE) + qdel(STORAGE) visible_message("With a loud whining noise, the Suit Storage Unit's door grinds open. Puffs of ashen smoke come out of its chamber.", 3) src.isbroken = 1 src.isopen = 1 src.islocked = 0 - src.eject_occupant(OCCUPANT) //Mixing up these two lines causes bug. DO NOT DO IT. + src.eject_occupant(OCCUPANT) src.isUV = 0 //Cycle ends src.update_icon() src.updateUsrDialog() @@ -421,8 +394,6 @@ if (!src.OCCUPANT) return -// for(var/obj/O in src) -// O.loc = src.loc if (src.OCCUPANT.client) if(user != OCCUPANT) @@ -494,7 +465,7 @@ M.client.eye = src M.loc = src src.OCCUPANT = M - src.isopen = 0 //Close the thing after the guy gets inside + src.isopen = 0 src.update_icon() src.add_fingerprint(user) @@ -595,5 +566,3 @@ user << "The console controls are far too complicated for your tiny brain!" return - -//////////////////////////////REMINDER: Make it lock once you place some fucker inside. diff --git a/code/game/machinery/telecomms/computers/logbrowser.dm b/code/game/machinery/telecomms/computers/logbrowser.dm index eca9a206429..c30b28534d5 100644 --- a/code/game/machinery/telecomms/computers/logbrowser.dm +++ b/code/game/machinery/telecomms/computers/logbrowser.dm @@ -197,7 +197,7 @@ temp = "- DELETED ENTRY: [D.name] -" SelectedServer.log_entries.Remove(D) - del(D) + qdel(D) else temp = "- FAILED: NO SELECTED MACHINE -" diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index e341ca965b6..4b0725b060c 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -25,6 +25,7 @@ if (power_station) power_station.teleporter_console = null power_station = null + ..() /obj/machinery/computer/teleporter/proc/link_power_station() if(power_station) @@ -268,6 +269,7 @@ if (power_station) power_station.teleporter_hub = null power_station = null + ..() /obj/machinery/teleport/hub/RefreshParts() var/A = 0 diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 0e178a4218e..b405648f4dd 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -137,7 +137,7 @@ loc.assume_air(cabin_air) air_update_turf() else - del(cabin_air) + qdel(cabin_air) cabin_air = null qdel(spark_system) spark_system = null @@ -240,7 +240,7 @@ loc.assume_air(leaked_gas) air_update_turf() else - del(leaked_gas) + qdel(leaked_gas) if(internal_damage & MECHA_INT_SHORT_CIRCUIT) if(get_charge()) @@ -276,7 +276,7 @@ if(t_air) t_air.merge(removed) else //just delete the cabin gas, we're in space or some shit - del(removed) + qdel(removed) if(occupant) if(cell) diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm index 8df632882a3..60c31405645 100644 --- a/code/game/mecha/mecha_construction_paths.dm +++ b/code/game/mecha/mecha_construction_paths.dm @@ -300,7 +300,7 @@ const_holder.icon = 'icons/mecha/mech_construction.dmi' const_holder.icon_state = "gygax0" const_holder.density = 1 - del(src) + qdel(src) return @@ -579,7 +579,7 @@ const_holder.icon = 'icons/mecha/mech_construction.dmi' const_holder.icon_state = "fireripley0" const_holder.density = 1 - del(src) + qdel(src) return @@ -801,7 +801,7 @@ var/obj/item/mecha_parts/chassis/const_holder = holder const_holder.construct = new /datum/construction/mecha/honker(const_holder) const_holder.density = 1 - del(src) + qdel(src) return diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 0c781f27f9b..88a0b285c62 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -88,7 +88,7 @@ M.visible_message(\ "[M.name] is buckled to [src] by [user.name]!",\ "You are buckled to [src] by [user.name]!",\ - "You heat metal clanking.") + "You hear metal clanking.") /obj/proc/user_unbuckle_mob(mob/user) var/mob/living/M = unbuckle_mob() diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm index aaca5674ed5..49a5cb83c4b 100644 --- a/code/game/objects/effects/aliens.dm +++ b/code/game/objects/effects/aliens.dm @@ -419,7 +419,7 @@ return var/mob/living/carbon/C = AM - if(C.stat == CONSCIOUS && C.status_flags & XENO_HOST) + if(C.stat == CONSCIOUS && C.getorgan(/obj/item/organ/internal/body_egg/alien_embryo)) return Burst(0) diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm index aa1abe7ae6c..a3a305541c7 100644 --- a/code/game/objects/effects/effect_system/effects_foam.dm +++ b/code/game/objects/effects/effect_system/effects_foam.dm @@ -58,14 +58,14 @@ for(var/obj/O in range(0,src)) if(O.type == src.type) continue - reagents.reaction(O, TOUCH, fraction) + reagents.reaction(O, VAPOR, fraction) var/hit = 0 for(var/mob/living/L in range(0,src)) hit += foam_mob(L) if(hit) lifetime++ //this is so the decrease from mobs hit and the natural decrease don't cumulate. var/T = get_turf(src) - reagents.reaction(T, TOUCH, fraction) + reagents.reaction(T, VAPOR, fraction) if(--amount < 0) return @@ -77,7 +77,7 @@ if(!istype(L)) return 0 var/fraction = 1/initial(lifetime) - reagents.reaction(L, TOUCH, fraction) + reagents.reaction(L, VAPOR, fraction) lifetime-- return 1 diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm index b1e6b6dde79..db7b6be9b54 100644 --- a/code/game/objects/effects/effect_system/effects_smoke.dm +++ b/code/game/objects/effects/effect_system/effects_smoke.dm @@ -156,10 +156,10 @@ for(var/obj/O in range(1,src)) if(O.type == src.type) continue - reagents.reaction(O, TOUCH, fraction) + reagents.reaction(O, VAPOR, fraction) for(var/turf/T in range(1,src)) - reagents.reaction(T, TOUCH, fraction) + reagents.reaction(T, VAPOR, fraction) var/hit = 0 for(var/mob/living/L in range(1,src)) @@ -173,7 +173,7 @@ if(!istype(M)) return 0 var/fraction = 1/initial(lifetime) - reagents.reaction(M, TOUCH, fraction) + reagents.reaction(M, VAPOR, fraction) lifetime-- return 1 diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index cf714ed52eb..682fc5293fe 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -1,11 +1,5 @@ //TODO: Flash range does nothing currently -//A very crude linear approximatiaon of pythagoras theorem. -/proc/cheap_pythag(dx, dy) - dx = abs(dx); dy = abs(dy); - if(dx>=dy) return dx + (0.5*dy) //The longest side add half the shortest side approximates the hypotenuse - else return dy + (0.5*dx) - /proc/trange(Dist=0,turf/Center=null)//alternative to range (ONLY processes turfs and thus less intensive) if(Center==null) return @@ -41,6 +35,7 @@ if(!epicenter) return var/max_range = max(devastation_range, heavy_impact_range, light_impact_range, flame_range) + var/list/cached_exp_block = list() if(adminlog) message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range], [flame_range]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z])") @@ -87,24 +82,31 @@ var/y0 = epicenter.y var/z0 = epicenter.z - for(var/turf/T in trange(max_range, epicenter)) + var/list/affected_turfs = trange(max_range, epicenter) - var/dist = cheap_pythag(T.x - x0,T.y - y0) + if(config.reactionary_explosions) + for(var/turf/T in affected_turfs) // we cache the explosion block rating of every turf in the explosion area + cached_exp_block[T] = 0 + if(T.density && T.explosion_block) + cached_exp_block[T] += T.explosion_block + + for(var/obj/machinery/door/D in T) + if(D.density && D.explosion_block) + cached_exp_block[T] += D.explosion_block + + for(var/obj/structure/window/W in T) + if(W.reinf && W.fulltile) + cached_exp_block[T] += W.explosion_block + + for(var/turf/T in affected_turfs) + + var/dist = cheap_hypotenuse(T.x, T.y, x0, y0) if(config.reactionary_explosions) var/turf/Trajectory = T while(Trajectory != epicenter) Trajectory = get_step_towards(Trajectory, epicenter) - if(Trajectory.density && Trajectory.explosion_block) - dist += Trajectory.explosion_block - - for(var/obj/machinery/door/D in Trajectory) - if(D.density && D.explosion_block) - dist += D.explosion_block - - for(var/obj/structure/window/W in Trajectory) - if(W.reinf && W.fulltile) - dist += W.explosion_block + dist += cached_exp_block[Trajectory] var/flame_dist = 0 var/throw_dist = dist @@ -196,7 +198,7 @@ var/list/wipe_colours = list() for(var/turf/T in trange(max_range, epicenter)) wipe_colours += T - var/dist = cheap_pythag(T.x - x0, T.y - y0) + var/dist = cheap_hypotenuse(T.x, T.y, x0, y0) if(newmode == "Yes") var/turf/TT = T diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 1057c2b4742..9ae436fb685 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -450,7 +450,6 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s var/melting_threshold = 100 if(meltingpwr <= melting_threshold) // so a single unit can't melt items. You need 5.1+ unit for fluoro and 10.1+ for sulphuric return - for(var/V in armor) if(armor[V] > 0) .-- //it survives the acid... diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 866a51ea5f4..af8ffb76809 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -65,9 +65,6 @@ ..() if (tagged) overlays += "bodybag_label" - else - overlays.Cut() - /obj/structure/closet/body_bag/close() if(..()) diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm index 9f8e79da8ea..59780eb60f0 100644 --- a/code/game/objects/items/devices/camera_bug.dm +++ b/code/game/objects/items/devices/camera_bug.dm @@ -48,7 +48,7 @@ if(expansion) qdel(expansion) expansion = null - del(src) + qdel(src) //Easier to just call del() than this nonsense // ya no, del() takes 0.8ds to run on avg. this takes less than 0.01 get_cameras() diff --git a/code/game/objects/items/holotape.dm b/code/game/objects/items/holotape.dm index 10cd8e08d6c..b663b3a655b 100644 --- a/code/game/objects/items/holotape.dm +++ b/code/game/objects/items/holotape.dm @@ -244,10 +244,10 @@ for (var/obj/item/holotape/P in cur) if(P.icon_state == icon_dir) N = 0 - del(P) + qdel(P) cur = get_step(cur,dir[i]) - del(src) + qdel(src) return #undef MAX_TAPE_RANGE diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index 37a582cac7b..7f5e121e441 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -437,7 +437,7 @@ else if ((tplus > tlimit) || !H.getorgan(/obj/item/organ/internal/heart)) failed = "[defib] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return. Further attempts futile." else if(total_burn >= 180 || total_brute >= 180) - failed = "[defib] buzzes: Resuscitation failed - Severe tissue damage detected." + failed = "[defib] buzzes: Resuscitation failed - Severe tissue damage makes recovery of patient impossible via defibrillator. Further attempts futile." else if(H.get_ghost() || !H.getorgan(/obj/item/organ/internal/brain)) failed = "[defib] buzzes: Resuscitation failed - No activity in patient's brain. Further attempts may be successful." @@ -480,4 +480,4 @@ update_icon() else user << "You need to target your patient's chest with [src]!" - return \ No newline at end of file + return diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 84db5d73cb8..6572831cd53 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -22,7 +22,7 @@ ..() /obj/item/weapon/c4/suicide_act(mob/user) - user.visible_message("[user] activates the [src.name] and holds it above his head! It looks like \he's going out with a bang!") + user.visible_message("[user] activates the [src.name] and holds it above \his head! It looks like \he's going out with a bang!") var/message_say = "FOR NO RAISIN!" if(user.mind) if(user.mind.special_role) diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm index b38dbaea378..d6644f1c886 100644 --- a/code/game/objects/items/weapons/implants/implantcase.dm +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -83,3 +83,11 @@ /obj/item/weapon/implantcase/weapons_auth/New() imp = new /obj/item/weapon/implant/weapons_auth(src) ..() + +/obj/item/weapon/implantcase/adrenaline + name = "implant case - 'Adrenaline'" + desc = "A glass case containing an adrenaline implant." + +/obj/item/weapon/implantcase/adrenaline/New() + imp = new /obj/item/weapon/implant/adrenalin(src) + ..() diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 1cabd4c4302..ecb03b97266 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -18,6 +18,7 @@ slot_flags = SLOT_BACK //ERROOOOO max_w_class = 3 max_combined_w_class = 21 + storage_slots = 21 burn_state = 0 //Burnable burntime = 20 @@ -109,7 +110,6 @@ icon_state = "giftbag0" item_state = "giftbag" w_class = 4.0 - storage_slots = 20 //Can store a lot. max_w_class = 3 max_combined_w_class = 60 @@ -270,7 +270,6 @@ desc = "A very slim satchel that can easily fit into tight spaces." icon_state = "satchel-flat" w_class = 3 //Can fit in backpacks itself. - storage_slots = 5 max_combined_w_class = 15 level = 1 cant_hold = list(/obj/item/weapon/storage/backpack/satchel_flat) //muh recursive backpacks @@ -292,12 +291,11 @@ /obj/item/weapon/storage/backpack/dufflebag name = "dufflebag" - desc = "A large dufflebag for holding extra things" + desc = "A large dufflebag for holding extra things." icon_state = "duffle" item_state = "duffle" - storage_slots = 9 slowdown = 1 - max_combined_w_class = 27 + max_combined_w_class = 30 /obj/item/weapon/storage/backpack/dufflebag/syndie name = "suspicious looking dufflebag" @@ -342,7 +340,6 @@ desc = "A suspicious looking dufflebag for holding surgery tools." icon_state = "duffle-syndiemed" item_state = "duffle-syndiemed" - storage_slots = 10 /obj/item/weapon/storage/backpack/dufflebag/syndie/surgery/New() ..() diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 06d78149919..fdd4aea2842 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -196,7 +196,7 @@ New(obj/item/sample) if(!istype(sample)) - del(src) + qdel(src) sample_object = sample number = 1 @@ -269,7 +269,7 @@ if(sum_w_class > max_combined_w_class) if(!stop_messages) - usr << "[src] is full, make some space!" + usr << "[W] won't fit in [src], make some space!" return 0 if(W.w_class >= w_class && (istype(W, /obj/item/weapon/storage))) @@ -481,4 +481,5 @@ /obj/item/weapon/storage/handle_atom_del(atom/A) if(A in contents) - remove_from_storage(A,null) + usr = null + remove_from_storage(A, loc) diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index eb41ea7032d..3bad0781ef3 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -33,7 +33,7 @@ /obj/item/weapon/tank/Destroy() if(air_contents) - del(air_contents) + qdel(air_contents) SSobj.processing.Remove(src) diff --git a/code/game/objects/structures/barsigns.dm b/code/game/objects/structures/barsigns.dm index 7c4637a2df8..f09ec051c67 100644 --- a/code/game/objects/structures/barsigns.dm +++ b/code/game/objects/structures/barsigns.dm @@ -246,7 +246,7 @@ /datum/barsign/emergencyrumparty name = "The Emergency Rum Party" icon = "emergencyrumparty" - desc = "Still serving drinks that were banned years ago." + desc = "Recently relicensed after a long closure." /datum/barsign/combocafe name = "The Combo Cafe" @@ -276,7 +276,7 @@ /datum/barsign/thenet name = "The Net" icon = "thenet" - desc = "The sea of drinkformation." //you couldn't come up with something better? + desc = "You just seem to get caught up in it for hours." /datum/barsign/hiddensigns diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 22f4ae79d1b..7246ac3dbbd 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -238,14 +238,6 @@ step(src, direction) update_mob() handle_rotation() - if(istype(src.loc, /turf/simulated)) - var/turf/simulated/T = src.loc - if(T.wet == 2) //Lube! Fall off! - playsound(src, 'sound/misc/slip.ogg', 50, 1, -3) - buckled_mob.Stun(7) - buckled_mob.Weaken(7) - unbuckle_mob() - step(src, dir) move_delay = 1 spawn(2) move_delay = 0 @@ -300,11 +292,6 @@ buckled_mob.pixel_x = -12 buckled_mob.pixel_y = 7 - -/obj/structure/stool/bed/chair/janicart/bullet_act(obj/item/projectile/Proj) - if(buckled_mob) - buckled_mob.bullet_act(Proj) - /obj/item/key name = "key" desc = "A small grey key." 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 7f7b7c0ae05..160c798e99c 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -24,14 +24,12 @@ /obj/structure/stool/bed/Move(atom/newloc, direct) //Some bed children move . = ..() if(buckled_mob) - buckled_mob.buckled = null if(!buckled_mob.Move(loc, direct)) loc = buckled_mob.loc //we gotta go back last_move = buckled_mob.last_move inertia_dir = last_move buckled_mob.inertia_dir = last_move . = 0 - buckled_mob.buckled = src /obj/structure/stool/bed/Process_Spacemove(movement_dir = 0) if(buckled_mob) diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 58e7ae67fd2..5267ccbae9e 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -44,14 +44,13 @@ ..() if (istype(A,/mob/living/carbon)) var/mob/living/carbon/M = A - if(M.lying) return - switch (src.wet) + switch(wet) if(1) //wet floor - if(!M.slip(4, 2, null, (NO_SLIP_WHEN_WALKING|STEP))) + if(!M.slip(4, 2, null, NO_SLIP_WHEN_WALKING)) M.inertia_dir = 0 return if(2) //lube - M.slip(0, 7, null, (STEP|SLIDE|GALOSHES_DONT_HELP)) + M.slip(0, 7, null, (SLIDE|GALOSHES_DONT_HELP)) /turf/simulated/ChangeTurf(var/path) . = ..() diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 2bcfe8d976f..2ecee6da10f 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -224,38 +224,43 @@ if(has_gravity(src)) playsound(src, "bodyfall", 50, 1) -/turf/handle_slip(mob/slipper, s_amount, w_amount, obj/O, lube) +/turf/handle_slip(mob/living/carbon/C, s_amount, w_amount, obj/O, lube) if(has_gravity(src)) - var/mob/living/carbon/M = slipper - if (M.m_intent=="walk" && (lube&NO_SLIP_WHEN_WALKING)) - return 0 - if(!M.lying && (M.status_flags & CANWEAKEN)) // we slip those who are standing and can fall. - if(O) - M << "You slipped on the [O.name]!" - else - M << "You slipped!" - M.attack_log += "\[[time_stamp()]\] Slipped[O ? " on the [O.name]" : ""][(lube&SLIDE)? " (LUBE)" : ""]!" - playsound(M.loc, 'sound/misc/slip.ogg', 50, 1, -3) + var/obj/buckled_obj + var/oldlying = C.lying + if(C.buckled) + buckled_obj = C.buckled + if(!(lube&GALOSHES_DONT_HELP)) //can't slip while buckled unless it's lube. + return 0 + else + if(C.lying || !(C.status_flags & CANWEAKEN)) // can't slip unbuckled mob if they're lying or can't fall. + return 0 + if(C.m_intent=="walk" && (lube&NO_SLIP_WHEN_WALKING)) + return 0 - M.accident(M.l_hand) - M.accident(M.r_hand) + C << "You slipped[ O ? " on the [O.name]" : ""]!" - var/olddir = M.dir - M.Stun(s_amount) - M.Weaken(w_amount) - M.stop_pulling() - if(lube&SLIDE) - for(var/i=1, i<5, i++) - spawn (i) - step(M, olddir) - M.spin(1,1) - if(M.lying) //did I fall over? - M.adjustBruteLoss(2) + C.attack_log += "\[[time_stamp()]\] Slipped[O ? " on the [O.name]" : ""][(lube&SLIDE)? " (LUBE)" : ""]!" + playsound(C.loc, 'sound/misc/slip.ogg', 50, 1, -3) + C.accident(C.l_hand) + C.accident(C.r_hand) - - return 1 - return 0 // no success. Used in clown pda and wet floors + var/olddir = C.dir + C.Stun(s_amount) + C.Weaken(w_amount) + C.stop_pulling() + if(buckled_obj) + buckled_obj.unbuckle_mob() + step(buckled_obj, olddir) + else if(lube&SLIDE) + for(var/i=1, i<5, i++) + spawn (i) + step(C, olddir) + C.spin(1,1) + if(C.lying != oldlying) //did we actually fall? + C.adjustBruteLoss(2) + return 1 /turf/singularity_act() if(intact) @@ -280,6 +285,7 @@ density = 1 blocks_air = 1 opacity = 1 + explosion_block = 50 /turf/indestructible/splashscreen name = "Space Station 13" diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index eb9bbc56c0f..3a5b8178aae 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -137,4 +137,4 @@ var/global/normal_ooc_colour = "#002eb8" usr << "Sorry, that function is not enabled on this server." return - see_own_notes() + show_note(usr, null, 1) diff --git a/code/modules/admin/NewBan.dm b/code/modules/admin/NewBan.dm index c1716c470de..7fb18b8e55f 100644 --- a/code/modules/admin/NewBan.dm +++ b/code/modules/admin/NewBan.dm @@ -117,9 +117,9 @@ var/savefile/Banlist if (temp) Banlist["minutes"] << bantimestamp if(!temp) - notes_add(ckey, "Permanently banned - [reason]") + add_note(ckey, "Permanently banned - [reason]", null, bannedby, 0) else - notes_add(ckey, "Banned for [minutes] minutes - [reason]") + add_note(ckey, "Banned for [minutes] minutes - [reason]", null, bannedby, 0) return 1 /proc/RemoveBan(foldername) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 71e35f2ff89..e40f3490f91 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -47,7 +47,7 @@ var/global/floorIsLava = 0 body += "Ban | " body += "Jobban | " body += "Identity Ban | " - body += "Notes | " + body += "Notes | " body += "Watchlist Flag " if(M.client) diff --git a/code/modules/admin/admin_investigate.dm b/code/modules/admin/admin_investigate.dm index b542204bd23..103d7eac30d 100644 --- a/code/modules/admin/admin_investigate.dm +++ b/code/modules/admin/admin_investigate.dm @@ -45,4 +45,4 @@ src << "Error: admin_investigate: Href Logging is not on." return if("notes") - holder.notes_show() + show_note() diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm index edbdb87b62d..735b00c6aac 100644 --- a/code/modules/admin/admin_ranks.dm +++ b/code/modules/admin/admin_ranks.dm @@ -11,7 +11,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums switch(name) if("Removed",null,"") spawn(-1) - del(src) + qdel(src) throw EXCEPTION("invalid admin-rank name") return if(init_rights) rights = init_rights diff --git a/code/modules/admin/create_object.dm b/code/modules/admin/create_object.dm index bb58339dc4c..9c6e54335e9 100644 --- a/code/modules/admin/create_object.dm +++ b/code/modules/admin/create_object.dm @@ -1,4 +1,8 @@ -/var/create_object_html = null +var/create_object_html = null +var/list/create_object_forms = list( + /obj, /obj/structure, /obj/machinery, /obj/effect, + /obj/item, /obj/item/clothing, /obj/item/stack, /obj/item/device, + /obj/item/weapon, /obj/item/weapon/reagent_containers, /obj/item/weapon/gun) /datum/admins/proc/create_object(mob/user) if (!create_object_html) @@ -11,18 +15,13 @@ /datum/admins/proc/quick_create_object(mob/user) + var/path = input("Select the path of the object you wish to create.", "Path", /obj) in create_object_forms + var/html_form = create_object_forms[path] - var/quick_create_object_html = null - var/pathtext = null + if (!html_form) + var/objectjs = list2text(typesof(path), ";") + html_form = file2text('html/create_object.html') + html_form = replacetext(html_form, "null /* object types */", "\"[objectjs]\"") + create_object_forms[path] = html_form - pathtext = input("Select the path of the object you wish to create.", "Path", "/obj") in list("/obj","/obj/structure","/obj/effect","/obj/item","/obj/item/clothing","/obj/item/weapon/reagent_containers/food","/obj/item/weapon","/obj/item/weapon/gun","/obj/machinery","/obj/item/stack") - - var path = text2path(pathtext) - - if (!quick_create_object_html) - var/objectjs = null - objectjs = list2text(typesof(path), ";") - quick_create_object_html = file2text('html/create_object.html') - quick_create_object_html = replacetext(quick_create_object_html, "null /* object types */", "\"[objectjs]\"") - - user << browse(replacetext(quick_create_object_html, "/* ref src */", "\ref[src]"), "window=quick_create_object;size=425x475") \ No newline at end of file + user << browse(replacetext(html_form, "/* ref src */", "\ref[src]"), "window=qco[path];size=425x475") \ No newline at end of file diff --git a/code/modules/admin/player_notes.dm b/code/modules/admin/player_notes.dm deleted file mode 100644 index 040ac99ef48..00000000000 --- a/code/modules/admin/player_notes.dm +++ /dev/null @@ -1,117 +0,0 @@ -//This stuff was originally intended to be integrated into the ban-system I was working on -//but it's safe to say that'll never be finished. So I've merged it into the current player panel. -//enjoy ~Carn - -#define NOTESFILE "data/player_notes.sav" //where the player notes are saved - -/proc/see_own_notes() - if(!config.see_own_notes) - return - var/ckey = usr.client.ckey - if(!ckey) - usr << "Error: No ckey found." - return - var/savefile/notesfile = new(NOTESFILE) - if(!notesfile) - usr << "Error: Cannot access [NOTESFILE]" - return - notesfile.cd = "/[ckey]" - var/dat = "Notes for [ckey]:
" - while(!notesfile.eof) - var/note - notesfile >> note - dat += note + "
" - var/datum/browser/popup = new(usr, "player_notes", "Player Notes", 700, 400) - popup.set_content(dat) - popup.open() - - -/datum/admins/proc/notes_show(ckey) - usr << browse("Player Notes[notes_gethtml(ckey)]","window=player_notes;size=700x400") - - -/datum/admins/proc/notes_gethtml(ckey) - var/savefile/notesfile = new(NOTESFILE) - if(!notesfile) return "Error: Cannot access [NOTESFILE]" - if(ckey) - . = "Notes for [ckey]: \[+\]
" - notesfile.cd = "/[ckey]" - var/index = 1 - while( !notesfile.eof ) - var/note - notesfile >> note - . += "[note] \[-\]
" - index++ - else - . = "All Notes: \[+\]
" - notesfile.cd = "/" - for(var/dir in notesfile.dir) - . += "[dir]
" - return - - -//handles adding notes to the end of a ckey's buffer -//originally had seperate entries such as var/by to record who left the note and when -//but the current bansystem is a heap of dung. -/proc/notes_add(ckey, note, lognote = 0) - if(!ckey) - ckey = ckey(input(usr,"Who would you like to add notes for?","Enter a ckey",null) as text|null) - if(!ckey) return - - if(!note) - note = html_encode(input(usr,"Enter your note:","Enter some text",null) as message|null) - if(!note) return - - var/savefile/notesfile = new(NOTESFILE) - if(!notesfile) return - notesfile.cd = "/[ckey]" - notesfile.eof = 1 //move to the end of the buffer - notesfile << "[time2text(world.realtime,"DD-MMM-YYYY")] | [note][(usr && usr.ckey)?" ~[usr.ckey]":""]" - - if(lognote)//don't need an admin log for the notes applied automatically during bans. - message_admins("[key_name(usr)] added note '[note]' to [ckey]") - log_admin("[key_name(usr)] added note '[note]' to [ckey]") - - return - -//handles removing entries from the buffer, or removing the entire directory if no start_index is given -/proc/notes_remove(ckey, start_index, end_index) - var/savefile/notesfile = new(NOTESFILE) - var/admin_msg - if(!notesfile) return - - if(!ckey) - notesfile.cd = "/" - ckey = ckey(input(usr,"Who would you like to remove notes for?","Enter a ckey",null) as null|anything in notesfile.dir) - if(!ckey) return - - if(start_index) - notesfile.cd = "/[ckey]" - var/list/noteslist = list() - if(!end_index) end_index = start_index - var/index = 0 - while( !notesfile.eof ) - index++ - var/temp - notesfile >> temp - if( (start_index <= index) && (index <= end_index) ) - admin_msg = temp - continue - - noteslist += temp - - notesfile.eof = -2 //Move to the start of the buffer and then erase. - - for( var/note in noteslist ) - notesfile << note - - message_admins("[key_name(usr)] removed a note '[admin_msg]' from [ckey]") - log_admin("[key_name(usr)] removed a note '[admin_msg]' from [ckey]") - - if(noteslist.len == 0) - notesfile.cd = "/" - notesfile.dir.Remove(ckey) - message_admins("[ckey] has no notes and was removed from the notes list.") - return - -#undef NOTESFILE \ No newline at end of file diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 7fdf3adb2d7..027541007f5 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -76,7 +76,7 @@ body += ""; body += "PP - " - body += "N - " + body += "N - " body += "VV - " body += "TP - " body += "PM - " diff --git a/code/modules/admin/sql_notes.dm b/code/modules/admin/sql_notes.dm new file mode 100644 index 00000000000..730e4531575 --- /dev/null +++ b/code/modules/admin/sql_notes.dm @@ -0,0 +1,219 @@ +/proc/add_note(target_ckey, notetext, timestamp, adminckey, logged = 1, server) + if(!dbcon.IsConnected()) + usr << "Failed to establish database connection." + return + if(!target_ckey) + var/new_ckey = ckey(input(usr,"Who would you like to add a note for?","Enter a ckey",null) as text|null) + if(!new_ckey) + return + var/DBQuery/query_find_ckey = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ckey = '[new_ckey]'") + if(!query_find_ckey.Execute()) + var/err = query_find_ckey.ErrorMsg() + log_game("SQL ERROR obtaining ckey from notes table. Error : \[[err]\]\n") + return + if(!query_find_ckey.NextRow()) + usr << "[new_ckey] has not been seen before, you can only add notes to known players." + return + else + target_ckey = new_ckey + var/target_sql_ckey = sanitizeSQL(target_ckey) + if(!notetext) + notetext = input(usr,"Write your Note","Add Note") as message + if(!notetext) + return + notetext = sanitizeSQL(notetext) + if(!timestamp) + timestamp = SQLtime() + if(!adminckey) + adminckey = usr.ckey + if(!adminckey) + return + var/admin_sql_ckey = sanitizeSQL(adminckey) + if(!server) + if (config && config.server_name) + server = config.server_name + server = sanitizeSQL(server) + var/DBQuery/query_noteadd = dbcon.NewQuery("INSERT INTO [format_table_name("notes")] (ckey, timestamp, notetext, adminckey, server) VALUES ('[target_sql_ckey]', '[timestamp]', '[notetext]', '[admin_sql_ckey]', '[server]')") + if(!query_noteadd.Execute()) + var/err = query_noteadd.ErrorMsg() + log_game("SQL ERROR adding new note to table. Error : \[[err]\]\n") + return + if(logged) + log_admin("[key_name(usr)] has added a note to [target_ckey]: [notetext]") + message_admins("[key_name_admin(usr)] has added a note to [target_ckey]:
[notetext]") + show_note(target_ckey) + +/proc/remove_note(note_id) + var/ckey + var/notetext + var/adminckey + if(!dbcon.IsConnected()) + usr << "Failed to establish database connection." + return + if(!note_id) + return + note_id = text2num(note_id) + var/DBQuery/query_find_note_del = dbcon.NewQuery("SELECT ckey, notetext, adminckey FROM [format_table_name("notes")] WHERE id = [note_id]") + if(!query_find_note_del.Execute()) + var/err = query_find_note_del.ErrorMsg() + log_game("SQL ERROR obtaining ckey, notetext, adminckey from notes table. Error : \[[err]\]\n") + return + if(query_find_note_del.NextRow()) + ckey = query_find_note_del.item[1] + notetext = query_find_note_del.item[2] + adminckey = query_find_note_del.item[3] + var/DBQuery/query_del_note = dbcon.NewQuery("DELETE FROM [format_table_name("notes")] WHERE id = [note_id]") + if(!query_del_note.Execute()) + var/err = query_del_note.ErrorMsg() + log_game("SQL ERROR removing note from table. Error : \[[err]\]\n") + return + log_admin("[key_name(usr)] has removed a note made by [adminckey] from [ckey]: [notetext]") + message_admins("[key_name_admin(usr)] has removed a note made by [adminckey] from [ckey]:
[notetext]") + show_note(ckey) + +/proc/edit_note(note_id) + if(!dbcon.IsConnected()) + usr << "Failed to establish database connection." + return + if(!note_id) + return + note_id = text2num(note_id) + var/target_ckey + var/sql_ckey = sanitizeSQL(usr.ckey) + var/DBQuery/query_find_note_edit = dbcon.NewQuery("SELECT ckey, notetext, adminckey FROM [format_table_name("notes")] WHERE id = [note_id]") + if(!query_find_note_edit.Execute()) + var/err = query_find_note_edit.ErrorMsg() + log_game("SQL ERROR obtaining notetext from notes table. Error : \[[err]\]\n") + return + if(query_find_note_edit.NextRow()) + target_ckey = query_find_note_edit.item[1] + var/old_note = query_find_note_edit.item[2] + var/adminckey = query_find_note_edit.item[3] + var/new_note = input("Input new note", "New Note", "[old_note]") as message + if(!new_note) + return + new_note = sanitizeSQL(new_note) + var/edit_text = "Edited by [sql_ckey] on [SQLtime()] from
[old_note]
to
[new_note]
" + edit_text = sanitizeSQL(edit_text) + var/DBQuery/query_update_note = dbcon.NewQuery("UPDATE [format_table_name("notes")] SET notetext = '[new_note]', last_editor = '[sql_ckey]', edits = CONCAT(IFNULL(edits,''),'[edit_text]') WHERE id = [note_id]") + if(!query_update_note.Execute()) + var/err = query_update_note.ErrorMsg() + log_game("SQL ERROR editing note. Error : \[[err]\]\n") + return + log_admin("[key_name(usr)] has edited [target_ckey]'s note made by [adminckey] from [old_note] to [new_note]") + message_admins("[key_name_admin(usr)] has edited [target_ckey]'s note made by [adminckey] from
[old_note]
to
[new_note]") + show_note(target_ckey) + +/proc/show_note(target_ckey, index, linkless = 0) + var/output + var/navbar + var/ruler + ruler = "
" + navbar = "\[All\]|\[#\]" + for(var/letter in alphabet) + navbar += "|\[[letter]\]" + navbar += "
\ + \ + \ +
" + if(!linkless) + output = navbar + if(target_ckey) + var/target_sql_ckey = sanitizeSQL(target_ckey) + var/DBQuery/query_get_notes = dbcon.NewQuery("SELECT id, timestamp, notetext, adminckey, last_editor, server FROM [format_table_name("notes")] WHERE ckey = '[target_sql_ckey]' ORDER BY timestamp") + if(!query_get_notes.Execute()) + var/err = query_get_notes.ErrorMsg() + log_game("SQL ERROR obtaining ckey, notetext, adminckey, last_editor, server from notes table. Error : \[[err]\]\n") + return + output += "

Notes of [target_ckey]

" + if(!linkless) + output += "
\[Add Note\]
" + output += ruler + while(query_get_notes.NextRow()) + var/id = query_get_notes.item[1] + var/timestamp = query_get_notes.item[2] + var/notetext = query_get_notes.item[3] + var/adminckey = query_get_notes.item[4] + var/last_editor = query_get_notes.item[5] + var/server = query_get_notes.item[6] + output += "[timestamp] | [server] | [adminckey]" + if(!linkless) + output += " \[Remove Note\] \[Edit Note\]" + if(last_editor) + output += " Last edit by [last_editor] (Click here to see edit log)" + output += "
[notetext]
" + else if(index) + var/index_ckey + var/search + output += "
\[Add Note\]
" + output += ruler + index = sanitizeSQL(index) + switch(index) + if(1) + search = "^." + if(2) + search = "^\[^\[:alpha:\]\]" + else + search = "^[index]" + var/DBQuery/query_list_notes = dbcon.NewQuery("SELECT DISTINCT ckey FROM [format_table_name("notes")] WHERE ckey REGEXP '[search]' ORDER BY ckey") + if(!query_list_notes.Execute()) + var/err = query_list_notes.ErrorMsg() + log_game("SQL ERROR obtaining ckey from notes table. Error : \[[err]\]\n") + return + while(query_list_notes.NextRow()) + index_ckey = query_list_notes.item[1] + output += "[index_ckey]
" + else + output += "
\[Add Note\]
" + output += ruler + usr << browse(output, "window=show_notes;size=900x500") + +/proc/regex_note_sql_extract(str, exp) + return new /datum/regex(str, exp, call(LIBREGEX_LIBRARY, "regEx_find")(str, exp)) + +#define NOTESFILE "data/player_notes.sav" +//if the AUTOCONVERT_NOTES is turned on, anytime a player connects this will be run to try and add all their notes to the databas +/proc/convert_notes_sql(ckey) + var/savefile/notesfile = new(NOTESFILE) + if(!notesfile) + log_game("Error: Cannot access [NOTESFILE]") + return + notesfile.cd = "/[ckey]" + while(!notesfile.eof) + var/notetext + notesfile >> notetext + var/server + if (config && config.server_name) + server = config.server_name + var/regex = "^(\\d{2}-\\w{3}-\\d{4}) \\| (.+) ~(\\w+)$" + var/datum/regex/results = regex_note_sql_extract(notetext, regex) + var/timestamp = results.str(2) + notetext = results.str(3) + var/adminckey = results.str(4) + var/DBQuery/query_convert_time = dbcon.NewQuery("SELECT ADDTIME(STR_TO_DATE('[timestamp]','%d-%b-%Y'), '0')") + if(!query_convert_time.Execute()) + var/err = query_convert_time.ErrorMsg() + log_game("SQL ERROR converting timestamp. Error : \[[err]\]\n") + return + if(query_convert_time.NextRow()) + timestamp = query_convert_time.item[1] + if(ckey && notetext && timestamp && adminckey && server) + add_note(ckey, notetext, timestamp, adminckey, 0, server) + notesfile.cd = "/" + notesfile.dir.Remove(ckey) + +/*alternatively this proc can be run once to pass through every note and attempt to convert it before deleting the file, if done then AUTOCONVERT_NOTES should be turned off +this proc can take several minutes to execute fully if converting and cause DD to hang if converting a lot of notes; it's not advised to do so while a server is live +/proc/mass_convert_notes() + world << "Beginning mass note conversion" + var/savefile/notesfile = new(NOTESFILE) + if(!notesfile) + log_game("Error: Cannot access [NOTESFILE]") + return + notesfile.cd = "/" + for(var/ckey in notesfile.dir) + convert_notes_sql(ckey) + world << "Deleting NOTESFILE" + fdel(NOTESFILE) + world << "Finished mass note conversion, remember to turn off AUTOCONVERT_NOTES"*/ +#undef NOTESFILE diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index b1ce38e14d7..3093d959d6d 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -505,7 +505,7 @@ feedback_inc("ban_appearance",1) DB_ban_record(BANTYPE_APPEARANCE, M, -1, reason) appearance_fullban(M, "[reason]; By [usr.ckey] on [time2text(world.realtime)]") - notes_add(M.ckey, "Appearance banned - [reason]") + add_note(M.ckey, "Appearance banned - [reason]", null, usr, 0) message_admins("[key_name_admin(usr)] appearance banned [key_name_admin(M)]") M << "You have been appearance banned by [usr.client.ckey]." M << "The reason is: [reason]" @@ -921,7 +921,7 @@ msg = job else msg += ", [job]" - notes_add(M.ckey, "Banned from [msg] - [reason]") + add_note(M.ckey, "Banned from [msg] - [reason]", null, usr, 0) message_admins("[key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes") M << "You have been jobbanned by [usr.client.ckey] from: [msg]." M << "The reason is: [reason]" @@ -941,7 +941,7 @@ jobban_fullban(M, job, "[reason]; By [usr.ckey] on [time2text(world.realtime)]") if(!msg) msg = job else msg += ", [job]" - notes_add(M.ckey, "Banned from [msg] - [reason]") + add_note(M.ckey, "Banned from [msg] - [reason]", null, usr, 0) message_admins("[key_name_admin(usr)] banned [key_name_admin(M)] from [msg]") M << "You have been jobbanned by [usr.client.ckey] from: [msg]." M << "The reason is: [reason]" @@ -994,17 +994,48 @@ del(M.client) //Player Notes - else if(href_list["notes"]) - var/ckey = href_list["ckey"] - switch(href_list["notes"]) - if("show") - notes_show(ckey) - if("add") - notes_add(ckey,href_list["text"], 1) - notes_show(ckey) - if("remove") - notes_remove(ckey,text2num(href_list["from"]),text2num(href_list["to"])) - notes_show(ckey) + else if(href_list["addnote"]) + var/target_ckey = href_list["addnote"] + add_note(target_ckey) + + else if(href_list["addnoteempty"]) + add_note() + + else if(href_list["removenote"]) + var/note_id = href_list["removenote"] + remove_note(note_id) + + else if(href_list["editnote"]) + var/note_id = href_list["editnote"] + edit_note(note_id) + + else if(href_list["shownote"]) + var/target = href_list["shownote"] + show_note(index = target) + + else if(href_list["nonalpha"]) + var/target = href_list["nonalpha"] + target = text2num(target) + show_note(index = target) + + else if(href_list["shownoteckey"]) + var/target_ckey = href_list["shownoteckey"] + show_note(target_ckey) + + else if(href_list["notessearch"]) + var/target = href_list["notessearch"] + show_note(index = target) + + else if(href_list["noteedits"]) + var/note_id = sanitizeSQL("[href_list["noteedits"]]") + var/DBQuery/query_noteedits = dbcon.NewQuery("SELECT edits FROM [format_table_name("notes")] WHERE id = '[note_id]'") + if(!query_noteedits.Execute()) + var/err = query_noteedits.ErrorMsg() + log_game("SQL ERROR obtaining edits from notes table. Error : \[[err]\]\n") + return + if(query_noteedits.NextRow()) + var/edit_log = query_noteedits.item[1] + usr << browse(edit_log,"window=noteedits") else if(href_list["removejobban"]) if(!check_rights(R_BAN)) return @@ -1126,7 +1157,7 @@ var/DBQuery/query_reason = dbcon.NewQuery("SELECT ckey, reason FROM [format_table_name("watch")] WHERE (ckey = '[sql_ckey]')") query_reason.Execute() if(query_reason.NextRow()) - var/watch_reason = query_reason.item[3] + var/watch_reason = query_reason.item[2] var/new_reason = input("Insert new reason", "New Reason", "[watch_reason]", null) as null|text new_reason = sanitizeSQL(new_reason) if(!new_reason) @@ -1793,41 +1824,36 @@ if(!obj_dir || !(obj_dir in list(1,2,4,8,5,6,9,10))) obj_dir = 2 var/obj_name = sanitize(href_list["object_name"]) + + + var/atom/target //Where the object will be spawned var/where = href_list["object_where"] if (!( where in list("onfloor","inhand","inmarked") )) where = "onfloor" - if( where == "inhand" ) - usr << "Support for inhand not available yet. Will spawn on floor." - where = "onfloor" - if ( where == "inhand" ) //Can only give when human or monkey - if ( !( ishuman(usr) || ismonkey(usr) ) ) - usr << "Can only spawn in hand when you're a human or a monkey." - where = "onfloor" - else if ( usr.get_active_hand() ) - usr << "Your active hand is full. Spawning on floor." - where = "onfloor" + switch(where) + if("inhand") + if (!iscarbon(usr) && !isrobot(usr)) + usr << "Can only spawn in hand when you're a carbon mob or cyborg." + where = "onfloor" + target = usr - if ( where == "inmarked" ) - if ( !marked_datum ) - usr << "You don't have any object marked. Abandoning spawn." - return - else - if ( !istype(marked_datum,/atom) ) - usr << "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn." - return - - var/atom/target //Where the object will be spawned - switch ( where ) - if ( "onfloor" ) - switch (href_list["offset_type"]) + if("onfloor") + switch(href_list["offset_type"]) if ("absolute") target = locate(0 + X,0 + Y,0 + Z) if ("relative") target = locate(loc.x + X,loc.y + Y,loc.z + Z) - if ( "inmarked" ) - target = marked_datum + if("inmarked") + if(!marked_datum) + usr << "You don't have any object marked. Abandoning spawn." + return + else if(!istype(marked_datum,/atom)) + usr << "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn." + return + else + target = marked_datum if(target) for (var/path in paths) @@ -1835,9 +1861,8 @@ if(path in typesof(/turf)) var/turf/O = target var/turf/N = O.ChangeTurf(path) - if(N) - if(obj_name) - N.name = obj_name + if(N && obj_name) + N.name = obj_name else var/atom/O = new path(target) if(O) @@ -1847,6 +1872,18 @@ if(istype(O,/mob)) var/mob/M = O M.real_name = obj_name + if(where == "inhand" && isliving(usr) && istype(O, /obj/item)) + var/mob/living/L = usr + var/obj/item/I = O + L.put_in_hands(I) + if(isrobot(L)) + var/mob/living/silicon/robot/R = L + if(R.module) + R.module.modules += I + I.loc = R.module + R.module.rebuild() + R.activate_module(I) + if (number == 1) log_admin("[key_name(usr)] created a [english_list(paths)]") @@ -2089,4 +2126,4 @@ message_admins("[key_name_admin(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]") log_admin("[key_name(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]") else - usr << "You may only use this when the game is running" + usr << "You may only use this when the game is running" \ No newline at end of file diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index 8ec3e3f2075..991ebb36886 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -180,7 +180,7 @@ query_tree += val pos++ - del(parser) + qdel(parser) return querys diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 4b6489290d2..fe02a86da7f 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -21,7 +21,7 @@ attach(A2,user) name = "[A.name]-[A2.name] assembly" update_icon() - feedback_add_details("assembly_made","[name]") + feedback_add_details("assembly_made","[type]") /obj/item/device/assembly_holder/proc/attach(obj/item/device/assembly/A, mob/user) if(!A.remove_item_from_storage(src)) diff --git a/code/modules/awaymissions/maploader/swapmaps.dm b/code/modules/awaymissions/maploader/swapmaps.dm index 6c2cba1d0be..127af2e7a1e 100644 --- a/code/modules/awaymissions/maploader/swapmaps.dm +++ b/code/modules/awaymissions/maploader/swapmaps.dm @@ -156,7 +156,7 @@ swapmap if(z2>swapmaps_compiled_maxz ||\ y2>swapmaps_compiled_maxy ||\ x2>swapmaps_compiled_maxx) - del(src) + qdel(src) return x2=x?(x):world.maxx y2=y?(y):world.maxy @@ -179,12 +179,12 @@ swapmap if(!M.key) qdel(M) else M.loc=null areas[A.loc]=null - del(A) + qdel(A) // delete areas that belong only to this map for(var/area/a in areas) - if(a && !a.contents.len) del(a) + if(a && !a.contents.len) qdel(a) if(x2>=world.maxx || y2>=world.maxy || z2>=world.maxz) CutXYZ() - del(areas) + qdel(areas) ..() /* @@ -241,7 +241,7 @@ swapmap sleep() S.cd=oldcd locked=0 - del(areas) + qdel(areas) Read(savefile/S,_id,turf/locorner) var/x @@ -297,7 +297,7 @@ swapmap sleep() S.cd=oldcd locked=0 - del(areas) + qdel(areas) /* Find an empty block on the world map in which to load this map. @@ -321,7 +321,7 @@ swapmap x1=l[1] y1=l[2] z1=l[3] - del(l) + qdel(l) x2+=x1-1 y2+=y1-1 z2+=z1-1 @@ -377,7 +377,7 @@ swapmap // save and delete proc/Unload() Save() - del(src) + qdel(src) proc/Save() if(id==src) return 0 @@ -472,7 +472,7 @@ atom l=l.Copy() for(M in src) if(M.key) l-=M if(l.len) S["contents"]<[user] has smothered \the [C] with \the [src]!", "[user] has smothered you with \the [src]!", "You hear some struggling and muffled cries of surprise.") else - reagents.trans_to(M, reagents.total_volume) - M.visible_message("[user] has smothered \the [A] with \the [src]!", "[user] has smothered you with \the [src]!", "You hear some struggling and muffled cries of surprise.") + reagents.reaction(C, TOUCH) + reagents.clear_reagents() + C.visible_message("[user] has touched \the [C] with \the [src].") + else if(istype(A) && src in user) user.visible_message("[user] starts to wipe down [A] with [src]!", "You start to wipe down [A] with [src]...") if(do_after(user,30, target = A)) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 756d7608141..64a7e9fc72f 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -156,10 +156,10 @@ Gunshots/explosions/opening doors/less rare audio (done) /obj/effect/hallucination/fake_flood/Destroy() SSobj.processing.Remove(src) - del(flood_turfs) + qdel(flood_turfs) if(target.client) target.client.images.Remove(flood_images) target = null - del(flood_images) + qdel(flood_images) return /obj/effect/hallucination/simple/xeno @@ -188,19 +188,20 @@ Gunshots/explosions/opening doors/less rare audio (done) if(!U.welded) pump = U break - xeno = new(pump.loc,target) - sleep(10) - xeno.update_icon("alienh_leap",'icons/mob/alienleap.dmi',-32,-32) - xeno.throw_at(target,7,1, spin = 0, diagonals_first = 1) - sleep(10) - xeno.update_icon("alienh_leap",'icons/mob/alienleap.dmi',-32,-32) - xeno.throw_at(pump,7,1, spin = 0, diagonals_first = 1) - sleep(10) - var/xeno_name = xeno.name - target << "[xeno_name] begins climbing into the ventilation system..." - sleep(10) - qdel(xeno) - target << "[xeno_name] scrambles into the ventilation ducts!" + if(pump) + xeno = new(pump.loc,target) + sleep(10) + xeno.update_icon("alienh_leap",'icons/mob/alienleap.dmi',-32,-32) + xeno.throw_at(target,7,1, spin = 0, diagonals_first = 1) + sleep(10) + xeno.update_icon("alienh_leap",'icons/mob/alienleap.dmi',-32,-32) + xeno.throw_at(pump,7,1, spin = 0, diagonals_first = 1) + sleep(10) + var/xeno_name = xeno.name + target << "[xeno_name] begins climbing into the ventilation system..." + sleep(10) + qdel(xeno) + target << "[xeno_name] scrambles into the ventilation ducts!" qdel(src) /obj/effect/hallucination/singularity_scare diff --git a/code/modules/food&drinks/kitchen machinery/microwave.dm b/code/modules/food&drinks/kitchen machinery/microwave.dm index 0221c4bdc07..400bbd075a9 100644 --- a/code/modules/food&drinks/kitchen machinery/microwave.dm +++ b/code/modules/food&drinks/kitchen machinery/microwave.dm @@ -244,7 +244,7 @@ if(F.cooked_type) var/obj/item/weapon/reagent_containers/food/snacks/S = new F.cooked_type (get_turf(src)) F.initialize_cooked_food(S, efficiency) - feedback_add_details("food_made","[F.name]") + feedback_add_details("food_made","[F.type]") else new /obj/item/weapon/reagent_containers/food/snacks/badrecipe(src) if(dirty < 100) diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 5d649ae44ed..a0d3d291abb 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -686,7 +686,7 @@ H.applyChemicals(S) S.clear_reagents() - del(S) + qdel(S) H.update_icon() if(reagent_source) // If the source wasn't composted and destroyed reagent_source.update_icon() diff --git a/code/modules/hydroponics/seed_extractor.dm b/code/modules/hydroponics/seed_extractor.dm index b8eec1a9ba8..f3ffdb83c81 100644 --- a/code/modules/hydroponics/seed_extractor.dm +++ b/code/modules/hydroponics/seed_extractor.dm @@ -185,7 +185,7 @@ N.amount = max(N.amount - 1, 0) if (N.amount <= 0) piles -= N - del(N) + qdel(N) break for (var/obj/T in contents)//Now we find the seed we need to vend diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 9c4ca620e26..f1334036a89 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -154,3 +154,103 @@ name = "Mining car (not for rails)" icon_crate = "miningcar" icon_state = "miningcar" +/*****************************Survival Pod********************************/ + + +/area/survivalpod + name = "\improper Emergency Shelter" + icon_state = "away" + requires_power = 0 + has_gravity = 1 + +/obj/item/weapon/survivalcapsule + name = "bluespace shelter capsule" + desc = "An emergency shelter stored within a pocket of bluespace." + icon_state = "pill3" + icon = 'icons/obj/chemical.dmi' + w_class = 1.0 + var/used = FALSE + +/obj/item/weapon/survivalcapsule/attack_self() + if(used == FALSE) + src.loc.visible_message("The [src] begins to shake. Stand back!") + used = TRUE + sleep(50) + playsound(get_turf(src), 'sound/effects/phasein.ogg', 100, 1) + PoolOrNew(/obj/effect/effect/smoke, src.loc) + load() + qdel(src) + +/obj/item/weapon/survivalcapsule/proc/load() + var/turf/start_turf = get_turf(src.loc) + var/turf/cur_turf + var/x_size = 5 + var/y_size = 5 + var/list/walltypes = list(/turf/simulated/wall) + var/floor_type = /turf/simulated/floor/wood + var/room + + //Center the room/spawn it + start_turf = locate(start_turf.x -2, start_turf.y - 2, start_turf.z) + + room = spawn_room(start_turf, x_size, y_size, walltypes, floor_type, "Emergency Shelter") + + start_turf = get_turf(src.loc) + + //Fill it + cur_turf = locate(start_turf.x, start_turf.y-2, start_turf.z) + new /obj/machinery/door/airlock/glass(cur_turf) + + cur_turf = locate(start_turf.x+1, start_turf.y, start_turf.z) + new /obj/structure/table/wood(cur_turf) + new /obj/item/weapon/storage/pill_bottle/dice(cur_turf) + + cur_turf = locate(start_turf.x+1, start_turf.y-1, start_turf.z) + var/obj/structure/stool/bed/chair/comfy/C = new /obj/structure/stool/bed/chair/comfy(cur_turf) + C.dir = 1 + + cur_turf = locate(start_turf.x+1, start_turf.y+1, start_turf.z) + new /obj/structure/stool/bed/chair/comfy(cur_turf) + + cur_turf = locate(start_turf.x-1, start_turf.y-1, start_turf.z) + var/obj/machinery/sleeper/S = new /obj/machinery/sleeper(cur_turf) + S.dir = 4 + + cur_turf = locate(start_turf.x-1, start_turf.y, start_turf.z) + new /obj/structure/table/wood(cur_turf) + new /obj/item/weapon/storage/box/donkpockets(cur_turf) + + cur_turf = locate(start_turf.x-1, start_turf.y+1, start_turf.z) + new /obj/structure/table/wood(cur_turf) + new /obj/machinery/microwave(cur_turf) + + var/area/survivalpod/L = new /area/survivalpod + + var/turf/threshhold = locate(start_turf.x, start_turf.y-2, start_turf.z) + threshhold.ChangeTurf(/turf/simulated/floor/wood) + threshhold.blocks_air = 1 //So the air doesn't leak out + threshhold.oxygen = 21 + threshhold.temperature = 293.15 + threshhold.nitrogen = 82 + threshhold.carbon_dioxide = 0 + threshhold.toxins = 0 + L.contents += threshhold + threshhold.overlays.Cut() + + var/list/turfs = room["floors"] + for(var/turf/simulated/floor/A in turfs) + SSair.remove_from_active(A) + A.oxygen = 21 + A.temperature = 293.15 + A.nitrogen = 82 + A.carbon_dioxide = 0 + A.toxins = 0 + A.air.oxygen = 21 + A.air.carbon_dioxide = 0 + A.air.nitrogen = 82 + A.air.toxins = 0 + A.air.temperature = 293.15 + SSair.add_to_active(A) + A.overlays.Cut() + + L.contents += A diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 894d29cbc5c..24a358a10b2 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -432,10 +432,10 @@ var/global/list/rockTurfEdgeCache P.playDigSound() if(do_after(user,P.digspeed, target = src)) - if(istype(src, /turf/simulated/mineral)) + if(istype(src, /turf/simulated/mineral)) user << "You finish cutting into the rock." gets_drilled(user) - feedback_add_details("pick_used_mining","[P.name]") + feedback_add_details("pick_used_mining","[P.type]") else return attack_hand(user) return @@ -565,13 +565,13 @@ var/global/list/rockTurfEdgeCache user << "You start digging..." playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1) //FUCK YO RUSTLE I GOT'S THE DIGS SOUND HERE - + if(do_after(user, digging_speed, target = src)) - if(istype(src, /turf/simulated/floor/plating/asteroid)) + if(istype(src, /turf/simulated/floor/plating/asteroid)) user << "You dig a hole." gets_dug() - feedback_add_details("pick_used_mining","[W.name]") - + feedback_add_details("pick_used_mining","[W.type]") + if(istype(W,/obj/item/weapon/storage/bag/ore)) var/obj/item/weapon/storage/bag/ore/S = W if(S.collection_mode == 1) diff --git a/code/modules/mob/camera/camera.dm b/code/modules/mob/camera/camera.dm index 69f6cb9b558..eb3f4a6c8d0 100644 --- a/code/modules/mob/camera/camera.dm +++ b/code/modules/mob/camera/camera.dm @@ -14,10 +14,6 @@ /mob/camera/experience_pressure_difference() return -/mob/camera/Destroy() - ..() - del(src) - /mob/camera/Login() ..() update_interface() \ No newline at end of file diff --git a/code/modules/mob/living/bloodcrawl.dm b/code/modules/mob/living/bloodcrawl.dm index 3283c0ebb4f..a58fd4401a4 100644 --- a/code/modules/mob/living/bloodcrawl.dm +++ b/code/modules/mob/living/bloodcrawl.dm @@ -35,13 +35,16 @@ sleep(30) playsound(get_turf(src),'sound/magic/Demon_consume.ogg', 100, 1) sleep(30) - src << "You devour [kidnapped]. Your health is fully restored." - src.adjustBruteLoss(-1000) - src.adjustFireLoss(-1000) - src.adjustOxyLoss(-1000) - src.adjustToxLoss(-1000) - kidnapped.ghostize() - qdel(kidnapped) + if(kidnapped) + src << "You devour [kidnapped]. Your health is fully restored." + src.adjustBruteLoss(-1000) + src.adjustFireLoss(-1000) + src.adjustOxyLoss(-1000) + src.adjustToxLoss(-1000) + kidnapped.ghostize() + qdel(kidnapped) + else + src << "You happily devour...nothing? Your meal vanished at some point!" src.notransform = 0 /mob/living/proc/phasein(obj/effect/decal/cleanable/B) diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index e2adcf9323b..ae838e5cff3 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -149,9 +149,10 @@ Des: Gives the client of the alien an image on each infected mob. if (client) for (var/mob/living/C in mob_list) if(C.status_flags & XENO_HOST) - var/obj/item/organ/internal/body_egg/alien_embryo/A = getorgan(/obj/item/organ/internal/body_egg/alien_embryo) - var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[A.stage]") - client.images += I + var/obj/item/organ/internal/body_egg/alien_embryo/A = C.getorgan(/obj/item/organ/internal/body_egg/alien_embryo) + if(A) + var/I = image('icons/mob/alien.dmi', loc = C, icon_state = "infected[A.stage]") + client.images += I return diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index 4c2aee91be8..1a9ba9601a2 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -177,7 +177,7 @@ var/const/MAX_ACTIVE_TIME = 400 Die() icon_state = "[initial(icon_state)]_impregnated" - if(!target.getlimb(/obj/item/organ/limb/robot/chest) && !(target.status_flags & XENO_HOST)) + if(!target.getlimb(/obj/item/organ/limb/robot/chest) && !target.getorgan(/obj/item/organ/internal/body_egg/alien_embryo)) new /obj/item/organ/internal/body_egg/alien_embryo(target) if(iscorgi(target)) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 9dbf026e3c2..8fdb1c39ccf 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -335,11 +335,10 @@ return "trails_2" var/const/NO_SLIP_WHEN_WALKING = 1 -var/const/STEP = 2 -var/const/SLIDE = 4 -var/const/GALOSHES_DONT_HELP = 8 +var/const/SLIDE = 2 +var/const/GALOSHES_DONT_HELP = 4 /mob/living/carbon/slip(s_amount, w_amount, obj/O, lube) - loc.handle_slip(src, s_amount, w_amount, O, lube) + return loc.handle_slip(src, s_amount, w_amount, O, lube) /mob/living/carbon/fall(forced) loc.handle_fall(src, forced)//it's loc so it doesn't call the mob's handle_fall which does nothing @@ -505,7 +504,7 @@ var/const/GALOSHES_DONT_HELP = 8 return 1 /mob/living/carbon/proc/accident(obj/item/I) - if(!I || (I.flags & NODROP)) + if(!I || (I.flags & (NODROP|ABSTRACT))) return unEquip(I) diff --git a/code/modules/mob/living/carbon/human/blood.dm b/code/modules/mob/living/carbon/human/blood.dm index d03805d7d22..e91eca45fb3 100644 --- a/code/modules/mob/living/carbon/human/blood.dm +++ b/code/modules/mob/living/carbon/human/blood.dm @@ -282,7 +282,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122 // Only a certain number of drips (or one large splatter) can be on a given turf. for(var/obj/effect/decal/cleanable/blood/drip/drop in T) drips |= drop.drips - del(drop) + qdel(drop) if(!large && drips.len < 3) decal_type = /obj/effect/decal/cleanable/blood/drip diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 6523c085039..d55681b114f 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -45,6 +45,7 @@ if ("collapse","collapses") Paralyse(2) + adjustStaminaLoss(100) // Hampers abuse against simple mobs, but still leaves it a viable option. message = "[src] collapses!" m_type = 2 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 795c7e68da7..ec19362de9b 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -280,7 +280,12 @@ heart_attack = 0 if(stat == CONSCIOUS) src << "You feel your heart beating again!" - return ..(shock_damage,source,siemens_coeff) + + . = ..(shock_damage,source,siemens_coeff) + if(.) + electrocution_animation(40) + + /mob/living/carbon/human/Topic(href, href_list) if(usr.canUseTopic(src, BE_CLOSE, NO_DEXTERY)) @@ -801,4 +806,30 @@ H.bloody_hands = 0 H.bloody_hands_mob = null H.update_inv_gloves() - update_icons() //apply the now updated overlays to the mob \ No newline at end of file + update_icons() //apply the now updated overlays to the mob + + + +//Turns a mob black, flashes a skeleton overlay +//Just like a cartoon! +/mob/living/carbon/human/proc/electrocution_animation(anim_duration) + //Handle mutant parts if possible + if(dna && dna.species) + dna.species.handle_mutant_bodyparts(src,"black") + dna.species.handle_hair(src,"black") + dna.species.update_color(src,"black") + overlays += "electrocuted_base" + spawn(anim_duration) + if(src) + if(dna && dna.species) + dna.species.handle_mutant_bodyparts(src) + dna.species.handle_hair(src) + dna.species.update_color(src) + overlays -= "electrocuted_base" + + else //or just do a generic animation + var/list/viewing = list() + for(var/mob/M in viewers(src)) + if(M.client) + viewing += M.client + flick_overlay(image(icon,src,"electrocuted_generic",MOB_LAYER+1), viewing, anim_duration) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 86c3b23fd50..7a39b9969fe 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -129,8 +129,8 @@ emp_act var/obj/item/organ/limb/affecting = get_organ(ran_zone(user.zone_sel.selecting)) var/hit_area = parse_zone(affecting.name) var/target_area = parse_zone(target_limb.name) - feedback_add_details("item_used_for_combat","[I.name]|[I.force]") - feedback_add_details("zone_targeted","[def_zone]") + feedback_add_details("item_used_for_combat","[I.type]|[I.force]") + feedback_add_details("zone_targeted","[target_area]") if(dna) // allows your species to affect the attacked_by code return dna.species.spec_attacked_by(I,user,def_zone,affecting,hit_area,src.a_intent,target_limb,target_area,src) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index db366b79fb0..bcad1cea1af 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -118,24 +118,35 @@ else return "[id]" -/datum/species/proc/update_color(mob/living/carbon/human/H) +/datum/species/proc/update_color(mob/living/carbon/human/H, forced_colour) H.remove_overlay(SPECIES_LAYER) var/image/standing var/g = (H.gender == FEMALE) ? "f" : "m" - if(MUTCOLORS in specflags) + if((MUTCOLORS in specflags) || use_skintones) var/image/spec_base var/icon_state_string = "[id]_" - if(sexes) - icon_state_string += "[g]_s" + + if(use_skintones) + if(sexes) + icon_state_string = "[H.skin_tone]_[g]_s" + else + icon_state_string = "[H.skin_tone]_s" else - icon_state_string += "_s" + if(sexes) + icon_state_string += "[g]_s" + else + icon_state_string += "_s" spec_base = image("icon" = 'icons/mob/human.dmi', "icon_state" = icon_state_string, "layer" = -SPECIES_LAYER) - spec_base.color = "#[H.dna.features["mcolor"]]" + if(!forced_colour && !use_skintones) + spec_base.color = "#[H.dna.features["mcolor"]]" + else + spec_base.color = forced_colour + standing = spec_base if(standing) @@ -143,7 +154,7 @@ H.apply_overlay(SPECIES_LAYER) -/datum/species/proc/handle_hair(mob/living/carbon/human/H) +/datum/species/proc/handle_hair(mob/living/carbon/human/H, forced_colour) H.remove_overlay(HAIR_LAYER) var/datum/sprite_accessory/S @@ -156,13 +167,17 @@ img_facial_s = image("icon" = S.icon, "icon_state" = "[S.icon_state]_s", "layer" = -HAIR_LAYER) - if(hair_color) - if(hair_color == "mutcolor") - img_facial_s.color = "#" + H.dna.features["mcolor"] + if(!forced_colour) + if(hair_color) + if(hair_color == "mutcolor") + img_facial_s.color = "#" + H.dna.features["mcolor"] + else + img_facial_s.color = "#" + hair_color else - img_facial_s.color = "#" + hair_color + img_facial_s.color = "#" + H.facial_hair_color else - img_facial_s.color = "#" + H.facial_hair_color + img_facial_s.color = forced_colour + img_facial_s.alpha = hair_alpha standing += img_facial_s @@ -184,13 +199,16 @@ img_hair_s = image("icon" = S.icon, "icon_state" = "[S.icon_state]_s", "layer" = -HAIR_LAYER) - if(hair_color) - if(hair_color == "mutcolor") - img_hair_s.color = "#" + H.dna.features["mcolor"] + if(!forced_colour) + if(hair_color) + if(hair_color == "mutcolor") + img_hair_s.color = "#" + H.dna.features["mcolor"] + else + img_hair_s.color = "#" + hair_color else - img_hair_s.color = "#" + hair_color + img_hair_s.color = "#" + H.hair_color else - img_hair_s.color = "#" + H.hair_color + img_hair_s.color = forced_colour img_hair_s.alpha = hair_alpha standing += img_hair_s @@ -246,7 +264,7 @@ return -/datum/species/proc/handle_mutant_bodyparts(mob/living/carbon/human/H) +/datum/species/proc/handle_mutant_bodyparts(mob/living/carbon/human/H, forced_colour) var/list/bodyparts_to_add = mutant_bodyparts.Copy() var/list/relevent_layers = list(BODY_BEHIND_LAYER, BODY_ADJ_LAYER, BODY_FRONT_LAYER) var/list/standing = list() @@ -359,18 +377,21 @@ I = image("icon" = 'icons/mob/mutant_bodyparts.dmi', "icon_state" = icon_string, "layer" =- layer) if(!(H.disabilities & HUSK)) - switch(S.color_src) - if(MUTCOLORS) - I.color = "#[H.dna.features["mcolor"]]" - if(HAIR) - if(hair_color == "mutcolor") + if(!forced_colour) + switch(S.color_src) + if(MUTCOLORS) I.color = "#[H.dna.features["mcolor"]]" - else - I.color = "#[H.hair_color]" - if(FACEHAIR) - I.color = "#[H.facial_hair_color]" - if(EYECOLOR) - I.color = "#[H.eye_color]" + if(HAIR) + if(hair_color == "mutcolor") + I.color = "#[H.dna.features["mcolor"]]" + else + I.color = "#[H.hair_color]" + if(FACEHAIR) + I.color = "#[H.facial_hair_color]" + if(EYECOLOR) + I.color = "#[H.eye_color]" + else + I.color = forced_colour standing += I if(S.hasinner) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 8f8f5829970..69d80ba80ba 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -53,7 +53,6 @@ Please contact me on #coderbus IRC. ~Carnie x */ /mob/living/carbon/human/proc/update_base_icon_state() - //var/race = dna ? dna.mutantrace : null if(dna) base_icon_state = dna.species.update_base_icon_state(src) else @@ -68,7 +67,6 @@ Please contact me on #coderbus IRC. ~Carnie x //UPDATES OVERLAYS FROM OVERLAYS_STANDING //TODO: Remove all instances where this proc is called. It used to be the fastest way to swap between standing/lying. /mob/living/carbon/human/update_icons() - update_hud() //TODO: remove the need for this if(overlays.len != overlays_standing.len) @@ -79,7 +77,6 @@ Please contact me on #coderbus IRC. ~Carnie x update_transform() - //DAMAGE OVERLAYS //constructs damage icon for each organ from mask * damage field and saves it in our overlays_ lists /mob/living/carbon/human/update_damage_overlays() @@ -123,14 +120,9 @@ Please contact me on #coderbus IRC. ~Carnie x /mob/living/carbon/human/proc/update_body() remove_overlay(BODY_LAYER) + update_base_icon_state() + if(dna) - base_icon_state = dna.species.update_base_icon_state(src) - else - update_base_icon_state() - - icon_state = "[base_icon_state]_s" - - if(dna) // didn't want to have a duplicate if(dna) here, but due to the ordering of the code this was the only way dna.species.handle_body(src) /mob/living/carbon/human/update_fire() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 5fb2d87bf7d..0bc233bc351 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -705,7 +705,7 @@ var/list/ai_list = list() input = input("Select a crew member:") as null|anything in personnel_list var/icon/character_icon = personnel_list[input] if(character_icon) - del(holo_icon)//Clear old icon so we're not storing it in memory. + qdel(holo_icon)//Clear old icon so we're not storing it in memory. holo_icon = getHologramIcon(icon(character_icon)) else alert("No suitable records found. Aborting.") @@ -719,7 +719,7 @@ var/list/ai_list = list() ) input = input("Please select a hologram:") as null|anything in icon_list if(input) - del(holo_icon) + qdel(holo_icon) switch(input) if("default") holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo1")) diff --git a/code/modules/mob/living/simple_animal/friendly/butterfly.dm b/code/modules/mob/living/simple_animal/friendly/butterfly.dm index b1af5b5230e..a020baf05a9 100644 --- a/code/modules/mob/living/simple_animal/friendly/butterfly.dm +++ b/code/modules/mob/living/simple_animal/friendly/butterfly.dm @@ -16,6 +16,7 @@ pass_flags = PASSTABLE | PASSGRILLE | PASSMOB ventcrawler = 2 mob_size = MOB_SIZE_TINY + gold_core_spawnable = 2 /mob/living/simple_animal/butterfly/New() ..() diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index 3268bd3007e..9c253d5d9c1 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -20,6 +20,7 @@ response_help = "pets" response_disarm = "gently pushes aside" response_harm = "kicks" + gold_core_spawnable = 2 //RUNTIME IS ALIVE! SQUEEEEEEEE~ /mob/living/simple_animal/pet/cat/Runtime @@ -31,6 +32,7 @@ gender = FEMALE var/turns_since_scan = 0 var/mob/living/simple_animal/mouse/movement_target + gold_core_spawnable = 0 /mob/living/simple_animal/pet/cat/Runtime/Life() //MICE! @@ -69,6 +71,7 @@ /mob/living/simple_animal/pet/cat/Proc name = "Proc" + gold_core_spawnable = 0 /mob/living/simple_animal/pet/cat/kitten name = "kitten" diff --git a/code/modules/mob/living/simple_animal/friendly/crab.dm b/code/modules/mob/living/simple_animal/friendly/crab.dm index ef3ce5448ad..7bf0522ab86 100644 --- a/code/modules/mob/living/simple_animal/friendly/crab.dm +++ b/code/modules/mob/living/simple_animal/friendly/crab.dm @@ -19,6 +19,7 @@ ventcrawler = 2 var/obj/item/inventory_head var/obj/item/inventory_mask + gold_core_spawnable = 2 /mob/living/simple_animal/crab/Life() ..() @@ -40,4 +41,5 @@ desc = "It's Coffee, the other pet!" response_help = "pets" response_disarm = "gently pushes aside" - response_harm = "stomps" \ No newline at end of file + response_harm = "stomps" + gold_core_spawnable = 0 \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm index bc0ebe9883b..9095888c40d 100644 --- a/code/modules/mob/living/simple_animal/friendly/dog.dm +++ b/code/modules/mob/living/simple_animal/friendly/dog.dm @@ -29,6 +29,7 @@ var/obj/item/inventory_head var/obj/item/inventory_back var/facehugger + gold_core_spawnable = 2 /mob/living/simple_animal/pet/dog/pug name = "\improper pug" @@ -39,6 +40,7 @@ icon_living = "pug" icon_dead = "pug_dead" butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/slab/pug = 3) + gold_core_spawnable = 2 /mob/living/simple_animal/pet/dog/corgi/New() ..() @@ -275,7 +277,9 @@ return valid /mob/living/simple_animal/pet/dog/corgi/proc/update_corgi_fluff() - switch(src.inventory_head.type) + if(!inventory_head) + return + switch(inventory_head.type) if(/obj/item/clothing/head/helmet) name = "Sergeant [real_name]" desc = "The ever-loyal, the ever-vigilant." @@ -388,6 +392,7 @@ response_help = "pets" response_disarm = "bops" response_harm = "kicks" + gold_core_spawnable = 0 /mob/living/simple_animal/pet/dog/corgi/Ian/Life() ..() @@ -511,6 +516,7 @@ response_harm = "kicks" var/turns_since_scan = 0 var/puppies = 0 + gold_core_spawnable = 0 //Lisa already has a cute bow! /mob/living/simple_animal/pet/dog/corgi/Lisa/Topic(href, href_list) diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index 96b24a86fe7..440798466fb 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -105,6 +105,7 @@ attack_sound = 'sound/weapons/punch1.ogg' health = 50 var/datum/reagents/udder = null + gold_core_spawnable = 2 /mob/living/simple_animal/cow/New() udder = new(50) @@ -169,6 +170,7 @@ var/amount_grown = 0 pass_flags = PASSTABLE | PASSGRILLE | PASSMOB mob_size = MOB_SIZE_TINY + gold_core_spawnable = 2 /mob/living/simple_animal/chick/New() ..() @@ -219,6 +221,7 @@ var/global/chicken_count = 0 var/list/feedMessages = list("It clucks happily.","It clucks happily.") var/list/layMessage = list("lays an egg.","squats down and croons.","begins making a huge racket.","begins clucking raucously.") var/list/validColors = list("brown","black","white") + gold_core_spawnable = 2 /mob/living/simple_animal/chicken/New() ..() diff --git a/code/modules/mob/living/simple_animal/friendly/fox.dm b/code/modules/mob/living/simple_animal/friendly/fox.dm index fefd67e907a..a6c4768344b 100644 --- a/code/modules/mob/living/simple_animal/friendly/fox.dm +++ b/code/modules/mob/living/simple_animal/friendly/fox.dm @@ -17,8 +17,10 @@ response_help = "pets" response_disarm = "gently pushes aside" response_harm = "kicks" + gold_core_spawnable = 2 //Captain fox /mob/living/simple_animal/pet/fox/Renault name = "Renault" - desc = "Renault, the Captain's trustworthy fox. I wonder what it says?" \ No newline at end of file + desc = "Renault, the Captain's trustworthy fox. I wonder what it says?" + gold_core_spawnable = 0 \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/friendly/lizard.dm b/code/modules/mob/living/simple_animal/friendly/lizard.dm index b03101df7f1..e958eea35e9 100644 --- a/code/modules/mob/living/simple_animal/friendly/lizard.dm +++ b/code/modules/mob/living/simple_animal/friendly/lizard.dm @@ -18,3 +18,4 @@ density = 0 pass_flags = PASSTABLE | PASSMOB mob_size = MOB_SIZE_SMALL + gold_core_spawnable = 2 diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index 9b0bc3afd0c..fbe54636bcb 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -22,6 +22,7 @@ pass_flags = PASSTABLE | PASSGRILLE | PASSMOB mob_size = MOB_SIZE_TINY var/body_color //brown, gray and white, leave blank for random + gold_core_spawnable = 2 /mob/living/simple_animal/mouse/New() ..() @@ -77,6 +78,7 @@ response_help = "pets" response_disarm = "gently pushes aside" response_harm = "splats" + gold_core_spawnable = 0 /obj/item/trash/deadmouse name = "dead mouse" diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index b102ef80167..ea02c118e75 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -23,6 +23,7 @@ melee_damage_lower = 15 melee_damage_upper = 15 butcher_results = list(/obj/item/weapon/ectoplasm = 1) + AIStatus = AI_OFF var/cooldown = 0 var/damage_transfer = 1 //how much damage from each attack we transfer to the owner var/mob/living/summoner @@ -115,7 +116,7 @@ var/input = stripped_input(src, "Please enter a message to tell your summoner.", "Guardian", "") for(var/mob/M in mob_list) - if(M == src.summoner) + if(M == src.summoner || (M in dead_mob_list)) M << "[src]: [input]" src << "[src]: [input]" @@ -125,8 +126,12 @@ set desc = "Communicate telepathically with your guardian." var/input = stripped_input(src, "Please enter a message to tell your guardian.", "Message", "") - for(var/mob/living/simple_animal/hostile/guardian/M in mob_list) - if(M.summoner == src) + for(var/mob/M in mob_list) + if(istype (M, /mob/living/simple_animal/hostile/guardian)) + var/mob/living/simple_animal/hostile/guardian/G = M + if(G.summoner == src) + G << "[src]: [input]" + else if (M in dead_mob_list) M << "[src]: [input]" src << "[src]: [input]" @@ -138,8 +143,8 @@ /mob/living/simple_animal/hostile/guardian/fire a_intent = "help" - melee_damage_lower = 10 - melee_damage_upper = 10 + melee_damage_lower = 15 + melee_damage_upper = 15 attack_sound = 'sound/items/Welder.ogg' attacktext = "sears" damage_transfer = 0.7 @@ -149,6 +154,7 @@ magic_fluff_string = "..And draw Atmosia, bringer of cleansing fires!" tech_fluff_string = "Boot sequence complete. Incendiary combat modules loaded. Nanoswarm online." bio_fluff_string = "Your scarab swarm finishes mutating and stirs to life, capable of igniting enemies on touch." + pass_flags = PASSMOB /mob/living/simple_animal/hostile/guardian/fire/Crossed(AM as mob|obj) @@ -224,21 +230,6 @@ tech_fluff_string = "Boot sequence complete. Defensive modules active. Nanoswarm online." bio_fluff_string = "Your scarab swarm finishes mutating and stirs to life, helpless, but invulnerable." -//Scout. No damage, high range, high mobility, low resistance - -/mob/living/simple_animal/hostile/guardian/scout - range = 255 - incorporeal_move = 1 - damage_transfer = 1.2 - melee_damage_lower = 0 - melee_damage_upper = 0 - alpha = 60 - friendly = "quietly assesses" - playstyle_string = "As a scout type, you are incapable of attacking, but have infinite range, can pass through walls, and crawl through vents." - magic_fluff_string = "..And draw the AI, all seeing and all knowing." - tech_fluff_string = "Boot sequence complete. Surveillance modules loaded. Nanoswarm online." - bio_fluff_string = "Your scarab swarm finishes mutating and stirs to life, helpless, but near invsible, and capable of near unlimited travel." - //Healer /mob/living/simple_animal/hostile/guardian/healer @@ -264,6 +255,9 @@ C.adjustOxyLoss(-5) C.adjustToxLoss(-5) + +///////////////////Ranged + /obj/item/projectile/guardian name = "crystal spray" icon_state = "guardian" @@ -272,6 +266,7 @@ /mob/living/simple_animal/hostile/guardian/ranged a_intent = "help" + friendly = "quietly assesses" melee_damage_lower = 10 melee_damage_upper = 10 damage_transfer = 1.2 @@ -280,10 +275,81 @@ projectilesound = 'sound/effects/hit_on_shattered_glass.ogg' ranged = 1 range = 13 - playstyle_string = "As a ranged type, you have only light damage resistance, but are capable of spraying shards of crystal at incredibly high speed." + playstyle_string = "As a ranged type, you have only light damage resistance, but are capable of spraying shards of crystal at incredibly high speed. You can also deploy surveillance snares to monitor enemy movement. Finally, you can switch to scout mode, in which you can't attack, but can move without limit." magic_fluff_string = "..And draw the Sentinel, an alien master of ranged combat." tech_fluff_string = "Boot sequence complete. Ranged combat modules active. Nanoswarm online." bio_fluff_string = "Your scarab swarm finishes mutating and stirs to life, capable of spraying shards of crystal." + var/list/snares = list() + var/toggle = FALSE + +/mob/living/simple_animal/hostile/guardian/ranged/verb/ToggleMode() + set name = "Toggle Mode" + set category = "Guardian" + set desc = "Toggle between combat and scout modes." + if(src.loc == summoner) + if(toggle) + ranged = 1 + melee_damage_lower = 10 + melee_damage_upper = 10 + alpha = 255 + range = 13 + incorporeal_move = 0 + src << "You switch to combat mode." + toggle = FALSE + else + ranged = 0 + melee_damage_lower = 0 + melee_damage_upper = 0 + alpha = 60 + range = 255 + incorporeal_move = 1 + src << "You switch to scout mode." + toggle = TRUE + else + src << "You have to be recalled to toggle modes!." + + + +/mob/living/simple_animal/hostile/guardian/ranged/verb/Snare() + set name = "Set Surveillance Trap" + set category = "Guardian" + set desc = "Set an invisible trap that will alert you when living creatures walk over it. Max of 5" + if(src.snares.len <6) + var/turf/snare_loc = get_turf(src.loc) + var/obj/item/effect/snare/S = new /obj/item/effect/snare(snare_loc) + S.spawner = src + S.name = "[get_area(snare_loc)] trap ([rand(1, 1000)])" + src.snares |= S + src << "Surveillance trap deployed!" + else + src << "You have too many traps deployed. Delete some first." + +/mob/living/simple_animal/hostile/guardian/ranged/verb/DisarmSnare() + set name = "Remove Surveillance Trap" + set category = "Guardian" + set desc = "Disarm unwanted surveillance traps." + var/picked_snare = input(src, "Pick which trap to disarm", "Disarm Trap") as null|anything in src.snares + if(picked_snare) + src.snares -= picked_snare + qdel(picked_snare) + src << "Snare disarmed." + +/obj/item/effect/snare + name = "snare" + desc = "You shouldn't be seeing this!" + var/mob/living/spawner + invisibility = 1 + + +/obj/item/effect/snare/Crossed(AM as mob|obj) + if(istype(AM, /mob/living/)) + var/turf/snare_loc = get_turf(src.loc) + if(spawner) + spawner << "[AM] has crossed your surveillance trap at [get_area(snare_loc)]." + + + +///Bluespace /mob/living/simple_animal/hostile/guardian/bluespace @@ -307,6 +373,9 @@ if(!M.anchored && M != src.summoner) do_teleport(M, M, 10) + +////Bomb + /mob/living/simple_animal/hostile/guardian/bomb melee_damage_lower = 15 melee_damage_upper = 15 @@ -339,7 +408,6 @@ var/mob/living/spawner - /obj/item/weapon/guardian_bomb/proc/disguise(var/obj/A) A.loc = src stored_obj = A @@ -395,7 +463,7 @@ var/use_message = "You shuffle the deck..." var/used_message = "All the cards seem to be blank now." var/failure_message = "..And draw a card! It's...blank? Maybe you should try again later." - var/list/possible_guardians = list("Fire", "Standard", "Scout", "Shield", "Ranged", "Healer", "Fast", "Explosive") + var/list/possible_guardians = list("Fire", "Standard", "Shield", "Ranged", "Healer", "Fast", "Explosive") var/random = TRUE /obj/item/weapon/guardiancreator/attack_self(mob/living/user) @@ -439,7 +507,7 @@ if(random) gaurdiantype = pick(possible_guardians) else - gaurdiantype = input(user, "Pick the type pf [mob_name]", "[mob_name] Creation") as null|anything in possible_guardians + gaurdiantype = input(user, "Pick the type of [mob_name]", "[mob_name] Creation") as null|anything in possible_guardians var/pickedtype = /mob/living/simple_animal/hostile/guardian/punch var/picked_color = randomColor(0) switch(gaurdiantype) @@ -450,9 +518,6 @@ if("Standard") pickedtype = /mob/living/simple_animal/hostile/guardian/punch - if("Scout") - pickedtype = /mob/living/simple_animal/hostile/guardian/scout - if("Shield") pickedtype = /mob/living/simple_animal/hostile/guardian/shield diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index 08ca902017d..56465782b39 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -29,6 +29,7 @@ see_in_dark = 8 see_invisible = SEE_INVISIBLE_MINIMUM unique_name = 1 + gold_core_spawnable = 1 /mob/living/simple_animal/hostile/alien/drone name = "alien drone" @@ -130,6 +131,7 @@ butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat/slab/xeno = 10, /obj/item/stack/sheet/animalhide/xeno = 2) mob_size = MOB_SIZE_LARGE + gold_core_spawnable = 0 /obj/item/projectile/neurotox name = "neurotoxin" diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm index 651d97dcb56..b091ed92d39 100644 --- a/code/modules/mob/living/simple_animal/hostile/bear.dm +++ b/code/modules/mob/living/simple_animal/hostile/bear.dm @@ -33,6 +33,7 @@ maxbodytemp = 1500 faction = list("russian") + gold_core_spawnable = 1 //SPACE BEARS! SQUEEEEEEEE~ OW! FUCK! IT BIT MY HAND OFF!! /mob/living/simple_animal/hostile/bear/Hudson diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm index 5c9265578f8..7e1e6677337 100644 --- a/code/modules/mob/living/simple_animal/hostile/bees.dm +++ b/code/modules/mob/living/simple_animal/hostile/bees.dm @@ -21,6 +21,7 @@ pass_flags = PASSTABLE | PASSGRILLE | PASSMOB mob_size = MOB_SIZE_SMALL flying = 1 + gold_core_spawnable = 1 //Spaceborn beings don't get hurt by space atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm index dd872f00853..1fdef2619ff 100644 --- a/code/modules/mob/living/simple_animal/hostile/carp.dm +++ b/code/modules/mob/living/simple_animal/hostile/carp.dm @@ -31,6 +31,7 @@ faction = list("carp") flying = 1 + gold_core_spawnable = 1 /mob/living/simple_animal/hostile/carp/Process_Spacemove(movement_dir = 0) return 1 //No drifting in space for space carp! //original comments do not steal @@ -45,6 +46,7 @@ icon_state = "holocarp" icon_living = "holocarp" maxbodytemp = INFINITY + gold_core_spawnable = 0 /mob/living/simple_animal/hostile/carp/holocarp/death() ..(1) diff --git a/code/modules/mob/living/simple_animal/hostile/creature.dm b/code/modules/mob/living/simple_animal/hostile/creature.dm index 173d8ff913f..66dc786c974 100644 --- a/code/modules/mob/living/simple_animal/hostile/creature.dm +++ b/code/modules/mob/living/simple_animal/hostile/creature.dm @@ -13,4 +13,4 @@ attack_sound = 'sound/weapons/bite.ogg' faction = list("creature") speak_emote = list("screams") - + gold_core_spawnable = 1 diff --git a/code/modules/mob/living/simple_animal/hostile/faithless.dm b/code/modules/mob/living/simple_animal/hostile/faithless.dm index c74afd3be1b..a85c82a9cf9 100644 --- a/code/modules/mob/living/simple_animal/hostile/faithless.dm +++ b/code/modules/mob/living/simple_animal/hostile/faithless.dm @@ -26,6 +26,7 @@ minbodytemp = 0 faction = list("faithless") + gold_core_spawnable = 1 /mob/living/simple_animal/hostile/faithless/Process_Spacemove(movement_dir = 0) return 1 diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index 9eb111c521e..a8a4cdc4357 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -45,6 +45,7 @@ attacktext = "bites" attack_sound = 'sound/weapons/bite.ogg' unique_name = 1 + gold_core_spawnable = 1 //nursemaids - these create webs and eggs /mob/living/simple_animal/hostile/poison/giant_spider/nurse diff --git a/code/modules/mob/living/simple_animal/hostile/headcrab.dm b/code/modules/mob/living/simple_animal/hostile/headcrab.dm index 587e686d67d..18160d68ad2 100644 --- a/code/modules/mob/living/simple_animal/hostile/headcrab.dm +++ b/code/modules/mob/living/simple_animal/hostile/headcrab.dm @@ -20,6 +20,7 @@ ventcrawler = 2 var/datum/mind/origin var/egg_lain = 0 + gold_core_spawnable = 1 /mob/living/simple_animal/hostile/headcrab/proc/Infect(mob/living/carbon/victim) var/obj/item/organ/internal/body_egg/changeling_egg/egg = new(victim) diff --git a/code/modules/mob/living/simple_animal/hostile/hivebot.dm b/code/modules/mob/living/simple_animal/hostile/hivebot.dm index ce67552c952..37981ec6a39 100644 --- a/code/modules/mob/living/simple_animal/hostile/hivebot.dm +++ b/code/modules/mob/living/simple_animal/hostile/hivebot.dm @@ -21,6 +21,7 @@ atmos_requirements = list("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 speak_emote = list("states") + gold_core_spawnable = 1 /mob/living/simple_animal/hostile/hivebot/range name = "hivebot" diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 1f24ed85e1c..613e0d1eda9 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -215,9 +215,8 @@ //////////////END HOSTILE MOB TARGETTING AND AGGRESSION//////////// /mob/living/simple_animal/hostile/death(gibbed) - LoseAggro() + LoseTarget() ..(gibbed) - walk(src, 0) /mob/living/simple_animal/hostile/proc/OpenFire(the_target) diff --git a/code/modules/mob/living/simple_animal/hostile/killertomato.dm b/code/modules/mob/living/simple_animal/hostile/killertomato.dm index 4677cb50cc9..5c032e21bc7 100644 --- a/code/modules/mob/living/simple_animal/hostile/killertomato.dm +++ b/code/modules/mob/living/simple_animal/hostile/killertomato.dm @@ -23,3 +23,4 @@ atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) minbodytemp = 150 maxbodytemp = 500 + gold_core_spawnable = 1 diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 4c99fd62ca2..877739d8bd8 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -1,7 +1,3 @@ -// -// Abstract Class -// - /mob/living/simple_animal/hostile/mimic name = "crate" desc = "A rectangular steel crate." @@ -30,6 +26,7 @@ faction = list("mimic") move_to_delay = 9 + gold_core_spawnable = 1 /mob/living/simple_animal/hostile/mimic/death() ..(1) @@ -37,19 +34,10 @@ ghostize() qdel(src) - - -// -// Crate Mimic -// - - // Aggro when you try to open them. Will also pickup loot when spawns and drop it when dies. /mob/living/simple_animal/hostile/mimic/crate - attacktext = "bites" speak_emote = list("clatters") - stop_automated_movement = 1 wander = 0 var/attempt_open = 0 @@ -96,7 +84,6 @@ icon_state = initial(icon_state) /mob/living/simple_animal/hostile/mimic/crate/death() - var/obj/structure/closet/crate/C = new(get_turf(src)) // Put loot in crate for(var/obj/O in src) @@ -113,21 +100,19 @@ C.visible_message("\The [src] knocks down \the [C]!", \ "\The [src] knocks you down!") -// -// Copy Mimic -// + var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/cable, /obj/structure/window) /mob/living/simple_animal/hostile/mimic/copy - health = 100 maxHealth = 100 var/mob/living/creator = null // the creator var/destroy_objects = 0 var/knockdown_people = 0 + gold_core_spawnable = 0 -/mob/living/simple_animal/hostile/mimic/copy/New(loc, var/obj/copy, var/mob/living/creator, var/destroy_original = 0) +/mob/living/simple_animal/hostile/mimic/copy/New(loc, obj/copy, mob/living/creator, destroy_original = 0) ..(loc) CopyObject(copy, creator, destroy_original) @@ -137,13 +122,11 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca death() /mob/living/simple_animal/hostile/mimic/copy/death() - for(var/atom/movable/M in src) M.loc = get_turf(src) ..() /mob/living/simple_animal/hostile/mimic/copy/ListTargets() - // Return a list of targets that isn't the creator . = ..() return . - creator @@ -159,9 +142,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca return 0 /mob/living/simple_animal/hostile/mimic/copy/proc/CopyObject(obj/O, mob/living/creator, destroy_original = 0) - if(destroy_original || CheckObject(O)) - O.loc = src name = O.name desc = O.desc @@ -169,7 +150,6 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca icon_state = O.icon_state icon_living = icon_state overlays = O.overlays - if(istype(O, /obj/structure) || istype(O, /obj/machinery)) health = (anchored * 50) + 50 destroy_objects = 1 @@ -183,15 +163,13 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca melee_damage_lower = 2 + I.force melee_damage_upper = 2 + I.force move_to_delay = 2 * I.w_class + 1 - maxHealth = health if(creator) - src.creator = creator + creator = creator faction += "\ref[creator]" // very unique if(destroy_original) qdel(O) return 1 - return /mob/living/simple_animal/hostile/mimic/copy/DestroySurroundings() if(destroy_objects) @@ -207,9 +185,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca C.visible_message("\The [src] knocks down \the [C]!", \ "\The [src] knocks you down!") -// -// Machine Mimics (Made by Malf AI) -// + /mob/living/simple_animal/hostile/mimic/copy/machine speak = list("HUMANS ARE IMPERFECT!", "YOU SHALL BE ASSIMILATED!", "YOU ARE HARMING YOURSELF", "You have been deemed hazardous. Will you comply?", \ @@ -225,93 +201,57 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca return 0 return ..() -// -//animated blasters, wands, etc -// + /mob/living/simple_animal/hostile/mimic/copy/ranged - name = "animated shooty gun" - desc = "there's something fishy here." - environment_smash = 0 //needed? seems weird for them to do so - ranged = 1 - retreat_distance = 1 //just enough to shoot - minimum_distance = 6 - projectiletype = /obj/item/projectile/magic/ - projectilesound = 'sound/items/bikehorn.ogg' - casingtype = null - emote_see = list("aims menacingly") var/obj/item/weapon/gun/TrueGun = null - var/obj/item/weapon/gun/magic/Zapstick = list() - var/obj/item/weapon/gun/projectile/Pewgun = list() - var/obj/item/weapon/gun/energy/Zapgun = list() - -/mob/living/simple_animal/hostile/mimic/copy/ranged/New(loc, var/obj/copy, var/mob/living/creator, var/destroy_original = 0) - ..() - + var/obj/item/weapon/gun/magic/Zapstick + var/obj/item/weapon/gun/projectile/Pewgun + var/obj/item/weapon/gun/energy/Zapgun /mob/living/simple_animal/hostile/mimic/copy/ranged/CopyObject(obj/O, mob/living/creator, destroy_original = 0) - if(destroy_original || CheckObject(O)) - - O.loc = src - name = O.name - desc = O.desc - icon = O.icon - icon_state = O.icon_state - icon_living = icon_state - - if(istype(O, /obj/item/weapon/gun)) //leaving for sanity i guess - var/obj/item/weapon/gun/G = O - health = 15 * G.w_class - melee_damage_upper = G.force - melee_damage_lower = G.force - max(0, (G.force / 2)) - move_to_delay = 2 * G.w_class + 1 - projectilesound = G.fire_sound - TrueGun = G - - if(istype(G, /obj/item/weapon/gun/magic)) - Zapstick = G - var/obj/item/ammo_casing/magic/Zapshot = new Zapstick.ammo_type //this is done because ammo_type.proj_type can't be directly checked - projectiletype = Zapshot.projectile_type - qdel(Zapshot) //is this needed? i dare not risk piles of nullspace bullets - - if(istype(G, /obj/item/weapon/gun/projectile)) - Pewgun = G - var/obj/item/ammo_box/magazine/Pewmag = new Pewgun.mag_type //same problem, mag_type.ammo_type.proj_type can't be checked directly - var/obj/item/ammo_casing/Pewshot = new Pewmag.ammo_type - projectiletype = Pewshot.projectile_type - casingtype = Pewmag.ammo_type - qdel(Pewshot) - qdel(Pewmag) - - if(istype(G, /obj/item/weapon/gun/energy)) - Zapgun = G - var/selectfiresetting = Zapgun.select - var/obj/item/ammo_casing/energy/Energyammotype = Zapgun.ammo_type[selectfiresetting] - projectiletype = Energyammotype.projectile_type - - maxHealth = health - if(creator) - src.creator = creator - faction += "\ref[creator]" - if(destroy_original) - qdel(O) - return 1 - return + if(..()) + emote_see = list("aims menacingly") + environment_smash = 0 //needed? seems weird for them to do so + ranged = 1 + retreat_distance = 1 //just enough to shoot + minimum_distance = 6 + var/obj/item/weapon/gun/G = O + melee_damage_upper = G.force + melee_damage_lower = G.force - max(0, (G.force / 2)) + move_to_delay = 2 * G.w_class + 1 + projectilesound = G.fire_sound + TrueGun = G + if(istype(G, /obj/item/weapon/gun/magic)) + Zapstick = G + var/obj/item/ammo_casing/magic/M = Zapstick.ammo_type + projectiletype = initial(M.projectile_type) + if(istype(G, /obj/item/weapon/gun/projectile)) + Pewgun = G + var/obj/item/ammo_box/magazine/M = Pewgun.mag_type + var/obj/item/ammo_casing/A = initial(M.ammo_type) + projectiletype = initial(A.projectile_type) + casingtype = initial(M.ammo_type) + if(istype(G, /obj/item/weapon/gun/energy)) + Zapgun = G + var/selectfiresetting = Zapgun.select + var/obj/item/ammo_casing/energy/E = Zapgun.ammo_type[selectfiresetting] + projectiletype = initial(E.projectile_type) /mob/living/simple_animal/hostile/mimic/copy/ranged/OpenFire(the_target) if(Zapgun) - if(Zapgun.power_supply) //sanity + if(Zapgun.power_supply) var/obj/item/ammo_casing/energy/shot = Zapgun.ammo_type[Zapgun.select] - if(Zapgun.power_supply.charge >= shot.e_cost) //if she can zap + if(Zapgun.power_supply.charge >= shot.e_cost) Zapgun.power_supply.use(shot.e_cost) Zapgun.update_icon() - ..() //zap 'em - if(Zapstick) + ..() + else if(Zapstick) if(Zapstick.charges) Zapstick.charges-- Zapstick.update_icon() ..() - if(Pewgun) + else if(Pewgun) if(Pewgun.chambered) if(Pewgun.chambered.BB) qdel(Pewgun.chambered.BB) @@ -320,7 +260,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca ..() else visible_message("The [src] clears a jam!") - Pewgun.chambered.loc = src.loc //rip revolver immersions, blame shotgun snowflake procs + Pewgun.chambered.loc = loc //rip revolver immersions, blame shotgun snowflake procs Pewgun.chambered = null if(Pewgun.magazine && Pewgun.magazine.stored_ammo.len) Pewgun.chambered = Pewgun.magazine.get_round(0) @@ -330,11 +270,10 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca Pewgun.chambered = Pewgun.magazine.get_round(0) Pewgun.chambered.loc = Pewgun visible_message("The [src] cocks itself!") - - else //if somehow the mimic has no weapon - src.ranged = 0 //BANZAIIII - src.retreat_distance = 0 - src.minimum_distance = 1 - src.icon_state = TrueGun.icon_state - src.icon_living = TrueGun.icon_state - return \ No newline at end of file + else + ranged = 0 //BANZAIIII + retreat_distance = 0 + minimum_distance = 1 + return + icon_state = TrueGun.icon_state + icon_living = TrueGun.icon_state \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index 7e01e2942ef..d06cd0672c7 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -17,7 +17,8 @@ /mob/living/simple_animal/hostile/asteroid/Aggro() ..() - icon_state = icon_aggro + if(vision_range != aggro_vision_range) + icon_state = icon_aggro /mob/living/simple_animal/hostile/asteroid/LoseAggro() ..() @@ -42,7 +43,7 @@ ..() /mob/living/simple_animal/hostile/asteroid/death(gibbed) - feedback_add_details("mobs_killed_mining","[src.name]") + feedback_add_details("mobs_killed_mining","[src.type]") ..(gibbed) /mob/living/simple_animal/hostile/asteroid/basilisk @@ -485,3 +486,131 @@ adjustBruteLoss(2) else if(bodytemperature > maxbodytemp) adjustBruteLoss(20) + + +/mob/living/simple_animal/hostile/asteroid/fugu + name = "wumborian fugu" + desc = "The wumborian fugu rapidly increases its body mass in order to ward off its prey. Great care should be taken to avoid it while it's in this state as it is nearly invincible, but it cannot maintain its form forever." + icon = 'icons/mob/animal.dmi' + icon_state = "Fugu" + icon_living = "Fugu" + icon_aggro = "Fugu" + icon_dead = "Fugu_dead" + icon_gib = "syndicate_gib" + attack_sound = 'sound/weapons/punch4.ogg' + mouse_opacity = 2 + move_to_delay = 5 + friendly = "floats near" + speak_emote = list("puffs") + vision_range = 5 + speed = 0 + maxHealth = 50 + health = 50 + harm_intent_damage = 5 + melee_damage_lower = 0 + melee_damage_upper = 0 + attacktext = "chomps" + attack_sound = 'sound/weapons/punch1.ogg' + throw_message = "is avoided by the" + aggro_vision_range = 9 + idle_vision_range = 5 + mob_size = MOB_SIZE_SMALL + environment_smash = 0 + var/wumbo = 0 + var/inflate_cooldown = 0 + +/mob/living/simple_animal/hostile/asteroid/fugu/Life() + if(!wumbo) + inflate_cooldown = max((inflate_cooldown - 1), 0) + if(target && AIStatus == AI_ON) + Inflate() + ..() + +/mob/living/simple_animal/hostile/asteroid/fugu/adjustBruteLoss(var/damage) + if(wumbo) + return + ..() + +/mob/living/simple_animal/hostile/asteroid/fugu/Aggro() + ..() + Inflate() + +/mob/living/simple_animal/hostile/asteroid/fugu/verb/Inflate() + set name = "Inflate" + set category = "Fugu" + set desc = "Temporarily increases your size, and makes you significantly more dangerous and tough." + if(wumbo) + src << "You're already inflated." + return + if(inflate_cooldown) + src << "We need time to gather our strength." + return + if(buffed) + src << "Something is interfering with our growth." + return + wumbo = 1 + icon_state = "Fugu_big" + melee_damage_lower = 15 + melee_damage_upper = 20 + harm_intent_damage = 0 + throw_message = "is absorbed by the girth of the" + retreat_distance = null + minimum_distance = 1 + move_to_delay = 6 + transform *= 2 + environment_smash = 2 + mob_size = MOB_SIZE_LARGE + speed = 1 + spawn(100) + Deflate() + +/mob/living/simple_animal/hostile/asteroid/fugu/proc/Deflate() + if(wumbo) + walk(src, 0) + wumbo = 0 + icon_state = "Fugu" + melee_damage_lower = 0 + melee_damage_upper = 0 + harm_intent_damage = 5 + throw_message = "is avoided by the" + retreat_distance = 9 + minimum_distance = 9 + move_to_delay = 2 + transform /= 2 + inflate_cooldown = 4 + environment_smash = 0 + mob_size = MOB_SIZE_SMALL + speed = 0 + +/mob/living/simple_animal/hostile/asteroid/fugu/death(gibbed) + Deflate() + var/obj/item/asteroid/fugu_gland/F = new /obj/item/asteroid/fugu_gland(src.loc) + F.layer = 4.1 + ..(gibbed) + +/obj/item/asteroid/fugu_gland + name = "wumborian fugu gland" + desc = "The key to the wumborian fugu's ability to increase its mass arbitrarily, this disgusting remnant can apply the same effect to other creatures, giving them great strength." + icon = 'icons/obj/mining.dmi' + icon_state = "fugu_gland" + flags = NOBLUDGEON + w_class = 3 + layer = 4 + origin_tech = "biotech=6" + var/list/banned_mobs() + +/obj/item/asteroid/fugu_gland/afterattack(atom/target, mob/user, proximity_flag) + if(proximity_flag && istype(target, /mob/living/simple_animal)) + var/mob/living/simple_animal/A = target + if(A.buffed || A.type in banned_mobs || A.stat) + user << "Something's interfering with the [src]'s effects. It's no use." + return + A.buffed++ + A.maxHealth *= 1.5 + A.health = min(A.maxHealth,A.health*1.5) + A.melee_damage_lower = max((A.melee_damage_lower * 2), 10) + A.melee_damage_upper = max((A.melee_damage_upper * 2), 10) + A.transform *= 2 + A.environment_smash += 2 + user << "You increase the size of [A], giving it a surge of strength!" + qdel(src) diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index 8ff2d451a10..491fd2c1440 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -44,6 +44,7 @@ var/cannot_be_seen = 1 var/mob/living/creator = null + gold_core_spawnable = 1 // No movement while seen code. diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm index 38987cf6d27..f04ded89b18 100644 --- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm +++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm @@ -132,8 +132,9 @@ atmos_requirements = list("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 mob_size = MOB_SIZE_TINY - flying + flying = 1 speak_emote = list("states") + gold_core_spawnable = 1 /mob/living/simple_animal/hostile/viscerator/death(gibbed) ..(gibbed) diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm index 0acc9aad7ef..fa43d85572e 100644 --- a/code/modules/mob/living/simple_animal/hostile/tree.dm +++ b/code/modules/mob/living/simple_animal/hostile/tree.dm @@ -33,6 +33,7 @@ faction = list("hostile") var/drop_type = /obj/item/stack/sheet/mineral/wood + gold_core_spawnable = 1 /mob/living/simple_animal/hostile/tree/AttackingTarget() ..() diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 41c36669023..f600071a076 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -56,6 +56,7 @@ friendly = "grooms" mob_size = MOB_SIZE_SMALL flying = 1 + gold_core_spawnable = 2 var/parrot_damage_upper = 10 var/parrot_state = PARROT_WANDER //Hunt for a perch when created @@ -809,6 +810,7 @@ name = "Poly" desc = "Poly the Parrot. An expert on quantum cracker theory." speak = list("Poly wanna cracker!", ":e Check the singlo, you chucklefucks!",":e Wire the solars, you lazy bums!",":e WHO TOOK THE DAMN HARDSUITS?",":e OH GOD ITS FREE CALL THE SHUTTLE") + gold_core_spawnable = 0 /mob/living/simple_animal/parrot/Poly/New() ears = new /obj/item/device/radio/headset/headset_eng(src) diff --git a/code/modules/mob/living/simple_animal/revenant/revenant.dm b/code/modules/mob/living/simple_animal/revenant/revenant.dm index a59553b7832..22d6da50275 100644 --- a/code/modules/mob/living/simple_animal/revenant/revenant.dm +++ b/code/modules/mob/living/simple_animal/revenant/revenant.dm @@ -17,6 +17,7 @@ response_help = "passes through" response_disarm = "swings at" response_harm = "punches through" + unsuitable_atmos_damage = 0 atmos_requirements = list("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 = INFINITY @@ -25,6 +26,7 @@ status_flags = 0 wander = 0 density = 0 + flying = 1 anchored = 1 var/essence = 25 //The resource of revenants. Max health is equal to three times this amount @@ -33,19 +35,16 @@ var/essence_regen_amount = 2 //How much essence regenerates var/essence_min = 1 //The minimum amount of essence a revenant can have; by default, it never drops below one var/essence_accumulated = 0 //How much essence the revenant has stolen - var/strikes = 0 //How many times a revenant can die before dying for good var/revealed = 0 //If the revenant can take damage from normal sources. var/inhibited = 0 //If the revenant's abilities are blocked by a chaplain's power. + var/essence_drained = 0 //How much essence the revenant has drained. + var/draining = 0 //If the revenant is draining someone. + var/list/drained_mobs = list() //Cannot harvest the same mob twice /mob/living/simple_animal/revenant/Life() ..() if(essence < essence_min) essence = essence_min - if(strikes > 0) - strikes-- - src << "Your essence has dropped below critical levels. You barely manage to save yourself - [strikes ? "you can't keep this up!" : "next time, it's death."]" - else if(strikes <= 0) - death() if(essence_regenerating && !inhibited && essence < essence_regen_cap) //While inhibited, essence will not regenerate essence += essence_regen_amount if(essence > essence_regen_cap) @@ -57,6 +56,9 @@ /mob/living/simple_animal/revenant/ex_act(severity, target) return 1 //Immune to the effects of explosions. +/mob/living/simple_animal/revenant/blob_act() + return //blah blah blobs aren't in tune with the spirit world, or something. + /mob/living/simple_animal/revenant/ClickOn(atom/A, params) //Copypaste from ghost code - revenants can't interact with the world directly. if(client.buildmode) build_click(src, client.buildmode, params, A) @@ -79,6 +81,72 @@ if(world.time <= next_move) return A.attack_ghost(src) + if(ishuman(A) && in_range(src, A)) + Harvest(A) + + +/mob/living/simple_animal/revenant/proc/Harvest(mob/living/carbon/human/target) + if(!castcheck(0)) + return + if(draining) + src << "You are already siphoning the essence of a soul!" + return + if(target in drained_mobs) + src << "[target]'s soul is dead and empty." + return + if(!target.stat) + src << "This being's soul is too strong to harvest." + if(prob(10)) + target << "You feel as if you are being watched." + return + draining = 1 + essence_drained = 2 + src << "You search for the soul of [target]." + if(do_after(src, 10, 3, 0, target)) //did they get deleted in that second? + if(target.ckey) + src << "Their soul burns with intelligence." + essence_drained += 2 + if(target.stat != DEAD) + src << "Their soul blazes with life!" + essence_drained += 2 + else + src << "Their soul is weak and faltering." + if(do_after(src, 20, 6, 0, target)) //did they get deleted NOW? + switch(essence_drained) + if(1 to 2) + src << "[target] will not yield much essence. Still, every bit counts." + if(3 to 4) + src << "[target] will yield an average amount of essence." + if(5 to INFINITY) + src << "Such a feast! [target] will yield much essence to you." + if(do_after(src, 30, 9, 0, target)) //how about now + if(!target.stat) + src << "They are now powerful enough to fight off your draining." + target << "You feel something tugging across your body before subsiding." + draining = 0 + return //hey, wait a minute... + src << "You begin siphoning essence from [target]'s soul." + if(target.stat != DEAD) + target << "You feel a horribly unpleasant draining sensation as your grip on life weakens..." + icon_state = "revenant_draining" + reveal(65) + stun(65) + target.visible_message("[target] suddenly rises slightly into the air, their skin turning an ashy gray.") + target.Beam(src,icon_state="drain_life",icon='icons/effects/effects.dmi',time=60) + if(target) //As one cannot prove the existance of ghosts, ghosts cannot prove the existance of the target they were draining. + change_essence_amount(essence_drained * 5, 0, target) + src << "[target]'s soul has been considerably weakened and will yield no more essence for the time being." + target.visible_message("[target] gently slumps back onto the ground.") + drained_mobs.Add(target) + target.death(0) + icon_state = "revenant_idle" + else + src << "You are not close enough to siphon [target]'s soul. The link has been broken." + draining = 0 + return + draining = 0 + return + /mob/living/simple_animal/revenant/say(message) return 0 //Revenants cannot speak out loud. @@ -113,25 +181,12 @@ src.mind.objectives += objective2 src << "Objective #2: [objective2.explanation_text]" ticker.mode.traitors |= src.mind //Necessary for announcing - if(!src.giveSpells()) - message_admins("Revenant was created but has no mind. Trying again in five seconds.") - spawn(50) - if(!src.giveSpells()) - message_admins("Revenant still has no mind. Deleting...") - qdel(src) - -/mob/living/simple_animal/revenant/proc/giveSpells() - if(src.mind) - src.mind.spell_list += new /obj/effect/proc_holder/spell/targeted/revenant_harvest - src.mind.spell_list += new /obj/effect/proc_holder/spell/targeted/revenant_transmit - src.mind.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/revenant_light - src.mind.spell_list += new /obj/effect/proc_holder/spell/aoe_turf/revenant_defile - return 1 - return 0 + mob_spell_list += new /obj/effect/proc_holder/spell/targeted/revenant_transmit + mob_spell_list += new /obj/effect/proc_holder/spell/aoe_turf/revenant_light + mob_spell_list += new /obj/effect/proc_holder/spell/aoe_turf/revenant_defile + mob_spell_list += new /obj/effect/proc_holder/spell/aoe_turf/revenant_malf /mob/living/simple_animal/revenant/death() - if(strikes) - return 0 //Impossible to die with strikes still active ..(1) src << "NO! No... it's too late, you can feel yourself fading..." notransform = 1 @@ -151,7 +206,6 @@ /mob/living/simple_animal/revenant/attackby(obj/item/W, mob/living/user, params) - ..() if(istype(W, /obj/item/weapon/nullrod)) visible_message("[src] violently flinches!", \ "As the null rod passes through you, you feel your essence draining away!") @@ -159,62 +213,70 @@ inhibited = 1 spawn(30) inhibited = 0 - + ..() /mob/living/simple_animal/revenant/proc/castcheck(essence_cost) - var/mob/living/simple_animal/revenant/user = usr - if(!istype(user) || !user) + if(!src) return - var/turf/T = get_turf(usr) + var/turf/T = get_turf(src) if(istype(T, /turf/simulated/wall)) - user << "You cannot use abilities from inside of a wall." + src << "You cannot use abilities from inside of a wall." return 0 - if(!user.change_essence_amount(essence_cost, 1)) - user << "You lack the essence to use that ability." + if(src.inhibited) + src << "Your powers have been suppressed by nulling energy!" return 0 - if(user.inhibited) - user << "Your powers have been suppressed by nulling energy!" + if(!src.change_essence_amount(essence_cost, 1)) + src << "You lack the essence to use that ability." return 0 return 1 /mob/living/simple_animal/revenant/proc/change_essence_amount(essence_amt, silent = 0, source = null) - var/mob/living/simple_animal/revenant/user = usr - if(!istype(usr) || !usr) + if(!src) return - if(user.essence + essence_amt <= 0) + if(essence + essence_amt <= 0) return - user.essence += essence_amt - user.essence = max(0, user.essence) + essence += essence_amt + essence = max(0, essence) if(essence_amt > 0) - user.essence_accumulated += essence_amt - user.essence_accumulated = max(0, user.essence_accumulated) + essence_accumulated += essence_amt + essence_accumulated = max(0, essence_accumulated) if(!silent) if(essence_amt > 0) - user << "Gained [essence_amt]E from [source]." + src << "Gained [essence_amt]E from [source]." else - user << "Lost [essence_amt]E from [source]." + src << "Lost [essence_amt]E from [source]." return 1 -/mob/living/simple_animal/revenant/proc/reveal(time, stun) - var/mob/living/simple_animal/revenant/R = usr - if(!istype(usr) || !usr) +/mob/living/simple_animal/revenant/proc/reveal(time) + if(!src) return - R.revealed = 1 - R.invisibility = 0 - if(stun) - R.notransform = 1 - R << "You have been revealed[stun ? " and cannot move" : ""]." + if(time <= 0) + return + revealed = 1 + invisibility = 0 + src << "You have been revealed." spawn(time) - R.revealed = 0 - R.invisibility = INVISIBILITY_OBSERVER - if(stun) - R.notransform = 0 - R << "You are once more concealed[stun ? " and can move again" : ""]." + revealed = 0 + invisibility = INVISIBILITY_OBSERVER + src << "You are once more concealed." + +/mob/living/simple_animal/revenant/proc/stun(time) + if(!src) + return + if(time <= 0) + return + notransform = 1 + src << "You cannot move!" + spawn(time) + notransform = 0 + src << "You can move again!" + + /datum/objective/revenant dangerrating = 10 diff --git a/code/modules/mob/living/simple_animal/revenant/revenant_abilities.dm b/code/modules/mob/living/simple_animal/revenant/revenant_abilities.dm index 40dea02e25d..6de716e3180 100644 --- a/code/modules/mob/living/simple_animal/revenant/revenant_abilities.dm +++ b/code/modules/mob/living/simple_animal/revenant/revenant_abilities.dm @@ -1,101 +1,14 @@ -//Harvest Essence: The bread and butter of the revenant. The basic way of harvesting additional essence. -/obj/effect/proc_holder/spell/targeted/revenant_harvest - name = "Harvest (0E)" - desc = "Siphons the lingering spectral essence from a human, empowering yourself." - panel = "Revenant Abilities" - charge_max = 100 //Short cooldown - clothes_req = 0 - range = 1 - var/essence_drained = 0 - var/draining - var/list/drained_mobs = list() //Cannot harvest the same mob twice - -/obj/effect/proc_holder/spell/targeted/revenant_harvest/cast(list/targets, mob/living/simple_animal/revenant/user = usr) - if(!user.castcheck(0)) - charge_counter = charge_max - return - for(var/mob/living/carbon/human/target in targets) - spawn(0) - if(draining) - user << "You are already siphoning the essence of a soul!" - charge_counter = charge_max - return - if(target in drained_mobs) - user << "[target]'s soul is dead and empty." - charge_counter = charge_max - return - if(!target.stat) - user << "This being's soul is too strong to harvest." - if(prob(10)) - target << "You feel as if you are being watched." - return - draining = 1 - essence_drained = 2 - user << "You search for the soul of [target]." - sleep(10) - if(target.ckey) - user << "Their soul burns with intelligence." - essence_drained += 2 - if(target.stat != DEAD) - user << "Their soul blazes with life!" - essence_drained += 2 - else - user << "Their soul is weak and faltering." - sleep(20) - switch(essence_drained) - if(1 to 2) - user << "[target] will not yield much essence. Still, every bit counts." - if(3 to 4) - user << "[target] will yield an average amount of essence." - if(5 to INFINITY) - user << "Such a feast! [target] will yield much essence to you." - sleep(30) - if(!in_range(user, target)) - user << "You are not close enough to siphon [target]'s soul. The link has been broken." - draining = 0 - return - if(!target.stat) - user << "They are now powerful enough to fight off your draining." - target << "You feel something tugging across your body before subsiding." - user << "You begin siphoning essence from [target]'s soul." - if(target.stat != DEAD) - target << "You feel a horribly unpleasant draining sensation as your grip on life weakens..." - user.icon_state = "revenant_draining" - user.reveal(65,1) - target.visible_message("[target] suddenly rises slightly into the air, their skin turning an ashy gray.") - target.Beam(user,icon_state="drain_life",icon='icons/effects/effects.dmi',time=60) - target.death(0) - target.visible_message("[target] gently slumps back onto the ground.") - user.icon_state = "revenant_idle" - user.change_essence_amount(essence_drained * 5, 0, target) - user << "[target]'s soul has been considerably weakened and will yield no more essence for the time being." - drained_mobs.Add(target) - draining = 0 - - //Transmit: the revemant's only direct way to communicate. Sends a single message silently to a single mob for 5E. /obj/effect/proc_holder/spell/targeted/revenant_transmit - name = "Transmit (5E)" + name = "Transmit" desc = "Telepathically transmits a message to the target." - panel = "Revenant Abilities (Locked)" - charge_max = 50 + panel = "Revenant Abilities" + charge_max = 0 clothes_req = 0 - range = -1 - include_user = 1 - var/locked = 1 + range = 7 + include_user = 0 /obj/effect/proc_holder/spell/targeted/revenant_transmit/cast(list/targets, mob/living/simple_animal/revenant/user = usr) - if(!user.castcheck(-5)) - charge_counter = charge_max - return - if(locked) - usr << "You have unlocked Transmit!" - locked = 0 - charge_counter = charge_max - panel = "Revenant Abilities" - range = 7 - include_user = 0 - return for(var/mob/living/M in targets) spawn(0) var/msg = stripped_input(usr, "What do you wish to tell [M]?", null, "") @@ -114,6 +27,8 @@ charge_max = 200 clothes_req = 0 range = 1 + var/reveal = 80 + var/stun = 20 var/locked = 1 /obj/effect/proc_holder/spell/aoe_turf/revenant_light/cast(list/targets, mob/living/simple_animal/revenant/user = usr) @@ -125,7 +40,7 @@ name = "Overload Lights (20E)" panel = "Revenant Abilities" locked = 0 - range = 5 + range = 6 charge_counter = charge_max return if(!user.castcheck(-20)) @@ -138,36 +53,46 @@ if(!L.on) return L.visible_message("\The [L] suddenly flares brightly and begins to spark!") - sleep(20) + sleep(10) + var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + s.set_up(4, 1, L) + s.start() + sleep(10) for(var/mob/living/M in orange(4, L)) if(M == user) return M.Beam(L,icon_state="lightning",icon='icons/effects/effects.dmi',time=5) M.electrocute_act(25, "[L.name]") + var/datum/effect/effect/system/spark_spread/z = new /datum/effect/effect/system/spark_spread + z.set_up(4, 1, M) + z.start() playsound(M, 'sound/machines/defib_zap.ogg', 50, 1, -1) - user.reveal(80) + user.reveal(reveal) + user.stun(stun) //Defile: Corrupts nearby stuff, unblesses floor tiles. /obj/effect/proc_holder/spell/aoe_turf/revenant_defile - name = "Defile (40E)" - desc = "Twists and corrupts certain nearby objects. Also dispels holy auras on floors, but not salt lines." + name = "Defile (35E)" + desc = "Twists and corrupts the nearby area. Also dispels holy auras on floors, but not salt lines." panel = "Revenant Abilities (Locked)" charge_max = 200 clothes_req = 0 range = 1 + var/reveal = 100 + var/stun = 20 var/locked = 1 /obj/effect/proc_holder/spell/aoe_turf/revenant_defile/cast(list/targets, mob/living/simple_animal/revenant/user = usr) if(locked) - if(!user.castcheck(-40)) + if(!user.castcheck(-35)) charge_counter = charge_max return user << "You have unlocked Defile!" name = "Defile (20E)" panel = "Revenant Abilities" locked = 0 - range = 4 + range = 3 charge_counter = charge_max return if(!user.castcheck(-20)) @@ -177,22 +102,58 @@ spawn(0) if(T.flags & NOJAUNT) T.flags -= NOJAUNT - for(var/obj/machinery/bot/bot in T.contents) - bot.locked = 0 - bot.open = 1 - bot.emagged = 2 - bot.Emag(null) + if(!istype(T, /turf/simulated/wall/cult) && istype(T, /turf/simulated/wall) && prob(40)) + T.ChangeTurf(/turf/simulated/wall/cult) + if(!istype(T, /turf/simulated/floor/engine/cult) && istype(T, /turf/simulated/floor) && prob(40)) + T.ChangeTurf(/turf/simulated/floor/engine/cult) for(var/mob/living/carbon/human/human in T.contents) human << "You suddenly feel tired." - human.adjustStaminaLoss(50) - for(var/mob/living/silicon/robot/robot in T.contents) - robot.visible_message("[robot] lets out an alarm!", \ - "01001111 01010110 01000101 01010010 01001100 01001111 01000001 01000100") //Translates to "OVERLOAD" - robot << 'sound/misc/interference.ogg' - robot.emp_act(2) - playsound(robot, 'sound/machines/warning-buzzer.ogg', 50, 1) + human.adjustStaminaLoss(35) for(var/obj/structure/window/window in T.contents) - window.hit(rand(50,200)) + window.hit(rand(50,125)) for(var/obj/machinery/light/light in T.contents) light.flicker() //spooky - user.reveal(100) + user.reveal(reveal) + user.stun(stun) + + +//Malfunction: Makes bad stuff happen to robots and machines. +/obj/effect/proc_holder/spell/aoe_turf/revenant_malf + name = "Malfunction (50E)" + desc = "Corrupts and damages nearby machines and mechanical objects." + panel = "Revenant Abilities (Locked)" + charge_max = 150 + clothes_req = 0 + range = 1 + var/reveal = 60 + var/stun = 30 + var/locked = 1 + +/obj/effect/proc_holder/spell/aoe_turf/revenant_malf/cast(list/targets, mob/living/simple_animal/revenant/user = usr) + if(locked) + if(!user.castcheck(-50)) + charge_counter = charge_max + return + user << "You have unlocked Malfunction!" + name = "Malfunction (15E)" + panel = "Revenant Abilities" + locked = 0 + range = 4 + charge_counter = charge_max + return + if(!user.castcheck(-15)) + charge_counter = charge_max + return + for(var/turf/T in targets) + spawn(0) + for(var/obj/machinery/bot/bot in T.contents) + if(!bot.emagged) + bot.locked = 0 + bot.open = 1 + bot.Emag(null) + for(var/obj/machinery/mach in T.contents) + if(prob(10)) + mach.emag_act(null) + empulse(user.loc, 3, 5) + user.reveal(reveal) + user.stun(stun) \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/revenant/revenant_spawn_event.dm b/code/modules/mob/living/simple_animal/revenant/revenant_spawn_event.dm index b89653728ab..0cb19dab3da 100644 --- a/code/modules/mob/living/simple_animal/revenant/revenant_spawn_event.dm +++ b/code/modules/mob/living/simple_animal/revenant/revenant_spawn_event.dm @@ -3,9 +3,9 @@ /datum/round_event_control/revenant name = "Spawn Revenant" typepath = /datum/round_event/revenant - weight = 30 + weight = 7 max_occurrences = 3 - earliest_start = 3000 //Meant to mix things up early-game. + earliest_start = 6000 //Meant to mix things up early-game. /datum/round_event/revenant diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 64a70739e32..f3910d8af2d 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -57,6 +57,9 @@ var/obj/item/weapon/card/id/access_card = null //innate access uses an internal ID card var/flying = 0 //whether it's flying or touching the ground. + var/buffed = 0 //In the event that you want to have a buffing effect on the mob, but don't want it to stack with other effects, any outside force that applies a buff to a simple mob should at least set this to 1, so we have something to check against + var/gold_core_spawnable = 0 //if 1 can be spawned by plasma with gold core, 2 are 'friendlies' spawned with blood + /mob/living/simple_animal/New() ..() verbs -= /mob/verb/observe diff --git a/code/modules/mob/living/simple_animal/worm.dm b/code/modules/mob/living/simple_animal/worm.dm index 273d14d2c90..f17d5a6ad9a 100644 --- a/code/modules/mob/living/simple_animal/worm.dm +++ b/code/modules/mob/living/simple_animal/worm.dm @@ -168,7 +168,7 @@ if(die) newHead.Die() - del(src) + qdel(src) proc/ProcessStomach() for(var/atom/movable/stomachContent in contents) @@ -177,16 +177,16 @@ if(!istype(stomachContent,/obj/item/stack/sheet/mineral/plasma)) var/obj/item/stack/oldStack = stomachContent new /obj/item/stack/sheet/mineral/plasma(src, oldStack.amount) - del(oldStack) + qdel(oldStack) continue else if(istype(stomachContent,/obj/item)) //converts to plasma, keeping the w_class var/obj/item/oldItem = stomachContent new /obj/item/stack/sheet/mineral/plasma(src, oldItem.w_class) - del(oldItem) + qdel(oldItem) continue else new /obj/item/stack/sheet/mineral/plasma(src, flatPlasmaValue) //just flat amount - del(stomachContent) + qdel(stomachContent) continue if(previous) diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index c6b61942361..f262ddefc1f 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -30,7 +30,7 @@ client.images = null //remove the images such as AIs being unable to see runes client.screen = list() //remove hud items just in case - if(hud_used) del(hud_used) //remove the hud objects + if(hud_used) qdel(hud_used) //remove the hud objects hud_used = new /datum/hud(src) next_move = 1 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 3c0e579eb5f..e5dd2c589dc 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -376,7 +376,7 @@ var/list/slot_equipment_priority = list( \ //this and stop_pulling really ought to be /mob/living procs /mob/proc/start_pulling(atom/movable/AM) - if ( !AM || !src || src==AM || !isturf(src.loc) ) //if there's no person pulling OR the person is pulling themself OR the object being pulled is inside something: abort! + if ( !AM || !src || src==AM || !isturf(AM.loc) ) //if there's no person pulling OR the person is pulling themself OR the object being pulled is inside something: abort! return if (!( AM.anchored )) AM.add_fingerprint(src) @@ -975,4 +975,4 @@ var/list/slot_equipment_priority = list( \ //override to avoid rotating pixel_xy on mobs /mob/shuttleRotate(rotation) - dir = angle2dir(rotation+dir2angle(dir)) \ No newline at end of file + dir = angle2dir(rotation+dir2angle(dir)) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 265a428ba71..51fd9bece6f 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -83,7 +83,7 @@ var/a_intent = "help"//Living var/m_intent = "run"//Living var/lastKnownIP = null - var/obj/structure/stool/bed/buckled = null//Living + var/obj/buckled = null//Living var/obj/item/l_hand = null//Living var/obj/item/r_hand = null//Living var/obj/item/weapon/storage/s_active = null//Carbon diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_stealth.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_stealth.dm index 107502ce151..c7a1f0f143d 100644 --- a/code/modules/ninja/suit/n_suit_verbs/ninja_stealth.dm +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_stealth.dm @@ -18,7 +18,7 @@ Contents: U << "You don't have enough power to enable Stealth!" return s_active=!s_active - animate(U, U.alpha = 0,time = 15) + animate(U, alpha = 0,time = 15) U.visible_message("[U.name] vanishes into thin air!", \ "You are now invisible to normal detection.") return @@ -30,7 +30,7 @@ Contents: return 0 if(s_active) s_active=!s_active - animate(U, U.alpha = 255, time = 15) + animate(U, alpha = 255, time = 15) U.visible_message("[U.name] appears from thin air!", \ "You are now visible.") return 1 diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index cc411f25092..713651e5c45 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -152,7 +152,7 @@ area.power_change() if(occupier) malfvacate(1) - del(wires) + qdel(wires) if(cell) qdel(cell) if(terminal) diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index b99735503ee..152e160e7c9 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -43,7 +43,7 @@ if(charge < amount) return 0 charge = (charge - amount) if(!istype(loc, /obj/machinery/power/apc)) - feedback_add_details("cell_used","[src.name]") + feedback_add_details("cell_used","[src.type]") return 1 // recharge the cell diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 23e6468096f..a054fece023 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -264,4 +264,5 @@ if(!emagged) locked = 0 emagged = 1 - user.visible_message("[user.name] emags the [src.name].","You short out the lock.") + if(user) + user.visible_message("[user.name] emags the [src.name].","You short out the lock.") diff --git a/code/modules/projectiles/firing.dm b/code/modules/projectiles/firing.dm index 2833f2de7f5..1890309581f 100644 --- a/code/modules/projectiles/firing.dm +++ b/code/modules/projectiles/firing.dm @@ -34,7 +34,7 @@ if(targloc == curloc) if(BB.original == user) //if we target ourselves we go straight to bullet_act() user.bullet_act(BB) - del(BB) + qdel(BB) return 1 BB.loc = get_turf(user) BB.starting = get_turf(user) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index cc5bd988992..fe5ef91095c 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -232,7 +232,7 @@ user.update_inv_l_hand() else user.update_inv_r_hand() - feedback_add_details("gun_fired","[src.name]") + feedback_add_details("gun_fired","[src.type]") /obj/item/weapon/gun/attack(mob/M as mob, mob/user) if(user.a_intent == "harm") //Flogging diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm index 45660958359..8b1aaecd735 100644 --- a/code/modules/projectiles/guns/projectile/automatic.dm +++ b/code/modules/projectiles/guns/projectile/automatic.dm @@ -190,13 +190,22 @@ burst_size = 3 fire_delay = 2 pin = /obj/item/device/firing_pin/implant/pindicate -/obj/item/weapon/gun/projectile/automatic/m90/unrestricted - pin = /obj/item/device/firing_pin + /obj/item/weapon/gun/projectile/automatic/m90/New() ..() underbarrel = new /obj/item/weapon/gun/projectile/revolver/grenadelauncher(src) update_icon() return + +/obj/item/weapon/gun/projectile/automatic/m90/unrestricted + pin = /obj/item/device/firing_pin + +/obj/item/weapon/gun/projectile/automatic/m90/unrestricted/New() + ..() + underbarrel = new /obj/item/weapon/gun/projectile/revolver/grenadelauncher/unrestricted(src) + update_icon() + return + /obj/item/weapon/gun/projectile/automatic/m90/afterattack(atom/target, mob/living/user, flag, params) if(select == 2) underbarrel.afterattack(target, user, flag, params) diff --git a/code/modules/projectiles/guns/projectile/launchers.dm b/code/modules/projectiles/guns/projectile/launchers.dm index 4bddd2d3ce4..506f51e306c 100644 --- a/code/modules/projectiles/guns/projectile/launchers.dm +++ b/code/modules/projectiles/guns/projectile/launchers.dm @@ -9,6 +9,10 @@ mag_type = /obj/item/ammo_box/magazine/internal/cylinder/grenadelauncher fire_sound = 'sound/weapons/grenadelaunch.ogg' w_class = 3 + pin = /obj/item/device/firing_pin/implant/pindicate + +/obj/item/weapon/gun/projectile/revolver/grenadelauncher/unrestricted + pin = /obj/item/device/firing_pin /obj/item/weapon/gun/projectile/revolver/grenadelauncher/attackby(obj/item/A, mob/user, params) ..() diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index e83acf03014..56a077bbfa0 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -1,7 +1,9 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 -var/const/TOUCH = 1 -var/const/INGEST = 2 +var/const/TOUCH = 1 //splashing +var/const/INGEST = 2 //injection, ingestion +var/const/VAPOR = 3 //smoke, foam, spray, blob attack +var/const/PATCH = 4 //patches /////////////////////////////////////////////////////////////////////////////////// @@ -429,7 +431,7 @@ var/const/INGEST = 2 if(isliving(A)) var/mob/living/L = A var/touch_protection = 0 - if(method == TOUCH) + if(method == VAPOR) touch_protection = L.get_permeability_protection() for(var/datum/reagent/R in reagent_list) R.reaction_mob(L, method, R.volume*volume_modifier, show_message, touch_protection) diff --git a/code/modules/reagents/Chemistry-Readme.dm b/code/modules/reagents/Chemistry-Readme.dm index 74e9fe0b093..bd28dcb79f1 100644 --- a/code/modules/reagents/Chemistry-Readme.dm +++ b/code/modules/reagents/Chemistry-Readme.dm @@ -69,7 +69,7 @@ About the Holder: This proc calls the appropriate reaction procs of the reagents. I.e. if A is an object, it will call the reagents reaction_obj proc. The method var is used for reaction on mobs. It simply tells - us if the mob TOUCHed the reagent or if it INGESTed the reagent. + us if the mob TOUCHed the reagent, if it INGESTed the reagent, if the reagent was VAPORIZEd on them, or transfered via a PATCH to them.. Since the volume can be checked in a reagents proc, you might want to use the volume_modifier var to modifiy the passed value without actually changing the volume of the reagents. diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index c89a5d434eb..7a58c099077 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -28,21 +28,21 @@ var/overdose_threshold = 0 var/addiction_threshold = 0 var/addiction_stage = 0 - var/overdosed = 0 // You fucked up and this is now triggering it's overdose effects, purge that shit quick. + var/overdosed = 0 // You fucked up and this is now triggering its overdose effects, purge that shit quick. /datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references ..() holder = null -/datum/reagent/proc/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1, touch_protection = 0) +/datum/reagent/proc/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0) if(!istype(M)) return 0 var/datum/reagent/self = src src = null - if(method == TOUCH) + if(method == VAPOR) //smoke, foam, spray if(M.reagents) - var/modifier = Clamp((1 - touch_protection) + rand(-5,5)/100, 0, 1) + var/modifier = Clamp((1 - touch_protection), 0, 1) var/amount = round(volume*modifier, 0.1) if(amount >= 1) M.reagents.add_reagent(self.id, amount) diff --git a/code/modules/reagents/Chemistry-Reagents/Blob-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Blob-Reagents.dm index 5470a6f5db1..6265d0cb858 100644 --- a/code/modules/reagents/Chemistry-Reagents/Blob-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents/Blob-Reagents.dm @@ -4,6 +4,9 @@ var/message = "The blob strikes you" //message sent to any mob hit by the blob var/message_living = null //extension to first mob sent to only living mobs i.e. silicons have no skin to be burnt +/datum/reagent/blob/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message, touch_protection) + return round(reac_volume * min(1.5 - touch_protection, 1), 0.1) //full touch protection means 50% volume, any prot below 0.5 means 100% volume. + /datum/reagent/blob/boiling_oil name = "Boiling Oil" id = "boiling_oil" @@ -11,14 +14,13 @@ color = "#B68D00" message = "The blob splashes you with burning oil" -/datum/reagent/blob/boiling_oil/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.apply_damage(15*ratio, BURN) - M.adjust_fire_stacks(2*ratio) - M.IgniteMob() - if(isliving(M)) - M.emote("scream") +/datum/reagent/blob/boiling_oil/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + M.adjust_fire_stacks(round(reac_volume/12)) + reac_volume = ..() + M.apply_damage(0.6*reac_volume, BURN) + M.IgniteMob() + if(iscarbon(M)) + M.emote("scream") /datum/reagent/blob/toxic_goop name = "Toxic Goop" @@ -27,10 +29,9 @@ color = "#008000" message_living = ", and you feel sick and nauseated" -/datum/reagent/blob/toxic_goop/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.apply_damage(20*ratio, TOX) +/datum/reagent/blob/toxic_goop/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + reac_volume = ..() + M.apply_damage(0.8*reac_volume, TOX) /datum/reagent/blob/skin_ripper name = "Skin Ripper" @@ -39,12 +40,11 @@ color = "#FF4C4C" message_living = ", and you feel your skin ripping and tearing off" -/datum/reagent/blob/skin_ripper/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.apply_damage(20*ratio, BRUTE) - if(iscarbon(M)) - M.emote("scream") +/datum/reagent/blob/skin_ripper/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + reac_volume = ..() + M.apply_damage(0.8*reac_volume, BRUTE) + if(iscarbon(M)) + M.emote("scream") // Combo Reagents @@ -55,15 +55,14 @@ color = "#7F0000" message_living = ", and you feel your skin char and melt" -/datum/reagent/blob/skin_melter/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.apply_damage(10*ratio, BRUTE) - M.apply_damage(10*ratio, BURN) - M.adjust_fire_stacks(2*ratio) - M.IgniteMob() - if(iscarbon(M)) - M.emote("scream") +/datum/reagent/blob/skin_melter/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + M.adjust_fire_stacks(round(reac_volume/12)) + reac_volume = ..() + M.apply_damage(0.4*reac_volume, BRUTE) + M.apply_damage(0.4*reac_volume, BURN) + M.IgniteMob() + if(iscarbon(M)) + M.emote("scream") /datum/reagent/blob/lung_destroying_toxin name = "Lung Destroying Toxin" @@ -72,12 +71,11 @@ color = "#00FFC5" message_living = ", and your lungs feel heavy and weak" -/datum/reagent/blob/lung_destroying_toxin/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.apply_damage(20* ratio, OXY) - M.losebreath += 15*ratio - M.apply_damage(20*ratio, TOX) +/datum/reagent/blob/lung_destroying_toxin/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + reac_volume = ..() + M.apply_damage(0.8* reac_volume, OXY) + M.losebreath += round(0.6*reac_volume) + M.apply_damage(0.8*reac_volume, TOX) // Special Reagents @@ -88,18 +86,17 @@ color = "#00EE00" message_living = ", and your skin feels papery and everything hurts" -/datum/reagent/blob/radioactive_liquid/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.apply_damage(10*ratio, BRUTE) - if(istype(M, /mob/living/carbon/human)) - M.irradiate(40*ratio) - if(prob(33*ratio)) - randmuti(M) - if(prob(98)) - randmutb(M) - domutcheck(M, null) - updateappearance(M) +/datum/reagent/blob/radioactive_liquid/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + reac_volume = ..() + M.apply_damage(0.4*reac_volume, BRUTE) + if(ishuman(M)) + M.irradiate(1.6*reac_volume) + if(prob(1.3*reac_volume)) + randmuti(M) + if(prob(98)) + randmutb(M) + domutcheck(M, null) + updateappearance(M) /datum/reagent/blob/dark_matter name = "Dark Matter" @@ -108,12 +105,10 @@ color = "#61407E" message = "You feel a thrum as the blob strikes you, and everything flies at you" -/datum/reagent/blob/dark_matter/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.apply_damage(15*ratio, BRUTE) - reagent_vortex(M, 0) - +/datum/reagent/blob/dark_matter/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + reagent_vortex(M, 0, reac_volume) + reac_volume = ..() + M.apply_damage(0.6*reac_volume, BRUTE) /datum/reagent/blob/b_sorium name = "Sorium" @@ -122,12 +117,10 @@ color = "#808000" message = "The blob slams into you, and sends you flying" -/datum/reagent/blob/b_sorium/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.apply_damage(15*ratio, BRUTE) - reagent_vortex(M, 1) - +/datum/reagent/blob/b_sorium/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + reagent_vortex(M, 1, reac_volume) + reac_volume = ..() + M.apply_damage(0.6*reac_volume, BRUTE) /datum/reagent/blob/explosive // I'm gonna burn in hell for this one name = "Explosive Gelatin" @@ -136,11 +129,9 @@ color = "#FFA500" message = "The blob strikes you, and its tendrils explode" -/datum/reagent/blob/explosive/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - if(prob(75*ratio)) - explosion(M.loc, 0, 0, 1, 0, 0) +/datum/reagent/blob/explosive/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + if(prob(3*reac_volume)) + explosion(M.loc, 0, 0, 1, 0, 0) /datum/reagent/blob/omnizine name = "Omnizine" @@ -150,10 +141,9 @@ message = "The blob squirts something at you" message_living = ", and you feel great" -/datum/reagent/blob/omnizine/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.reagents.add_reagent("omnizine", 11*ratio) +/datum/reagent/blob/omnizine/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + reac_volume = ..() + M.reagents.add_reagent("omnizine", 0.6*reac_volume) /datum/reagent/blob/spacedrugs name = "Space drugs" @@ -163,17 +153,16 @@ message = "The blob squirts something at you" message_living = ", and you feel funny" -/datum/reagent/blob/spacedrugs/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - var/ratio = volume/25 - M.hallucination += 20*ratio - M.reagents.add_reagent("space_drugs", 15*ratio) - M.apply_damage(10*ratio, TOX) +/datum/reagent/blob/spacedrugs/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + reac_volume = ..() + M.hallucination += 0.8*reac_volume + M.reagents.add_reagent("space_drugs", 0.6*reac_volume) + M.apply_damage(0.4*reac_volume, TOX) -/datum/reagent/blob/proc/reagent_vortex(mob/living/M, setting_type) +/datum/reagent/blob/proc/reagent_vortex(mob/living/M, setting_type, reac_volume) var/turf/pull = get_turf(M) - var/range_power = Clamp(round(volume/5, 1), 1, 5) + var/range_power = Clamp(round(reac_volume/5, 1), 1, 5) for(var/atom/movable/X in range(range_power,pull)) if(istype(X, /obj/effect)) continue diff --git a/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Drink-Reagents/Alcohols.dm b/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Drink-Reagents/Alcohols.dm index df637f4eab8..04eae9fb1b1 100644 --- a/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Drink-Reagents/Alcohols.dm +++ b/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Drink-Reagents/Alcohols.dm @@ -34,13 +34,13 @@ M.adjustToxLoss(2) ..() return -/datum/reagent/consumable/ethanol/reaction_obj(obj/O, volume) +/datum/reagent/consumable/ethanol/reaction_obj(obj/O, reac_volume) if(istype(O,/obj/item/weapon/paper)) var/obj/item/weapon/paper/paperaffected = O paperaffected.clearpaper() usr << "The solution melts away the ink on the paper." if(istype(O,/obj/item/weapon/book)) - if(volume >= 5) + if(reac_volume >= 5) var/obj/item/weapon/book/affectedbook = O affectedbook.dat = null usr << "The solution melts away the ink on the book." @@ -48,12 +48,12 @@ usr << "It wasn't enough..." return -/datum/reagent/consumable/ethanol/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with ethanol isn't quite as good as fuel. +/datum/reagent/consumable/ethanol/reaction_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with ethanol isn't quite as good as fuel. if(!istype(M, /mob/living)) return - if(method == TOUCH) - M.adjust_fire_stacks(volume / 15) - return + if(method == TOUCH || method == VAPOR) + M.adjust_fire_stacks(reac_volume / 15) + ..() /datum/reagent/consumable/ethanol/beer name = "Beer" diff --git a/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Food-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Food-Reagents.dm index 6ca5afcf052..2b4630b4416 100644 --- a/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Food-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents/Consumable-Reagents/Food-Reagents.dm @@ -150,8 +150,8 @@ ..() return -/datum/reagent/consumable/frostoil/reaction_turf(turf/simulated/T, volume) - if(volume >= 5) +/datum/reagent/consumable/frostoil/reaction_turf(turf/simulated/T, reac_volume) + if(reac_volume >= 5) for(var/mob/living/simple_animal/slime/M in T) M.adjustToxLoss(rand(15,30)) //if(istype(T)) @@ -163,12 +163,12 @@ description = "A chemical agent used for self-defense and in police work." color = "#B31008" // rgb: 179, 16, 8 -/datum/reagent/consumable/condensedcapsaicin/reaction_mob(mob/living/M, method=TOUCH, volume) +/datum/reagent/consumable/condensedcapsaicin/reaction_mob(mob/living/M, method=TOUCH, reac_volume) if(!istype(M, /mob/living/carbon/human) && !istype(M, /mob/living/carbon/monkey)) return var/mob/living/carbon/victim = M - if(method == TOUCH) + if(method == TOUCH || method == VAPOR) //check for protection var/mouth_covered = 0 var/eyes_covered = 0 @@ -321,11 +321,11 @@ nutriment_factor = 20 * REAGENTS_METABOLISM color = "#302000" // rgb: 48, 32, 0 -/datum/reagent/consumable/cornoil/reaction_turf(turf/simulated/T, volume) +/datum/reagent/consumable/cornoil/reaction_turf(turf/simulated/T, reac_volume) if (!istype(T)) return src = null - if(volume >= 3) + if(reac_volume >= 3) T.MakeSlippery() var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in T) if(hotspot) @@ -380,11 +380,11 @@ reagent_state = SOLID color = "#FFFFFF" // rgb: 0, 0, 0 -/datum/reagent/consumable/flour/reaction_turf(turf/T, volume) +/datum/reagent/consumable/flour/reaction_turf(turf/T, reac_volume) src = null if(!istype(T, /turf/space)) var/obj/effect/decal/cleanable/reagentdecal = new/obj/effect/decal/cleanable/flour(T) - reagentdecal.reagents.add_reagent("flour", volume) + reagentdecal.reagents.add_reagent("flour", reac_volume) /datum/reagent/consumable/cherryjelly name = "Cherry Jelly" diff --git a/code/modules/reagents/Chemistry-Reagents/Medicine-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Medicine-Reagents.dm index 5a45714ad8a..a8999d8ddac 100644 --- a/code/modules/reagents/Chemistry-Reagents/Medicine-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents/Medicine-Reagents.dm @@ -163,24 +163,22 @@ reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/medicine/silver_sulfadiazine/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) +/datum/reagent/medicine/silver_sulfadiazine/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) if(iscarbon(M) && M.stat != DEAD) - if(method == TOUCH) - M.adjustFireLoss(-volume) + if(method == PATCH) + M.adjustFireLoss(-reac_volume) if(show_message) M << "You feel your burns healing!" M.emote("scream") if(method == INGEST) - M.adjustToxLoss(0.5*volume) + M.adjustToxLoss(0.5*reac_volume) if(show_message) M << "You probably shouldn't have eaten that. Maybe you should of splashed it on, or applied a patch?" ..() - return /datum/reagent/medicine/silver_sulfadiazine/on_mob_life(mob/living/M) M.adjustFireLoss(-2*REM) ..() - return /datum/reagent/medicine/styptic_powder name = "Styptic Powder" @@ -189,25 +187,23 @@ reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/medicine/styptic_powder/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) +/datum/reagent/medicine/styptic_powder/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) if(iscarbon(M) && M.stat != DEAD) - if(method == TOUCH) - M.adjustBruteLoss(-volume) + if(method == PATCH) + M.adjustBruteLoss(-reac_volume) if(show_message) M << "You feel your wounds knitting back together!" - if(M.stat) - M.emote("scream") + M.emote("scream") if(method == INGEST) - M.adjustToxLoss(0.5*volume) + M.adjustToxLoss(0.5*reac_volume) if(show_message) M << "You feel kind of ill. Maybe you ate a medicine you shouldn't have?" ..() - return + /datum/reagent/medicine/styptic_powder/on_mob_life(mob/living/M) M.adjustBruteLoss(-2*REM) ..() - return /datum/reagent/medicine/salglu_solution name = "Saline-Glucose Solution" @@ -222,7 +218,6 @@ M.adjustBruteLoss(-0.5*REM) M.adjustFireLoss(-0.5*REM) ..() - return /datum/reagent/medicine/mine_salve name = "Miner's Salve" @@ -239,20 +234,19 @@ M.adjustBruteLoss(-0.25*REM) M.adjustFireLoss(-0.25*REM) ..() - return -/datum/reagent/medicine/mine_salve/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) +/datum/reagent/medicine/mine_salve/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) if(iscarbon(M)) if(method == TOUCH) if(show_message) M << "You feel your wounds knitting back together!" + method = VAPOR //so it's correctly absorbed in reagent/reaction_mob() if(method == INGEST) if(show_message) M << "That tasted horrible." M.AdjustStunned(2) M.AdjustWeakened(2) ..() - return /datum/reagent/medicine/mine_salve/on_mob_delete(mob/living/M) if(iscarbon(M)) @@ -267,15 +261,15 @@ reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/medicine/synthflesh/reaction_mob(mob/living/M, method=TOUCH, volume,show_message = 1) +/datum/reagent/medicine/synthflesh/reaction_mob(mob/living/M, method=TOUCH, reac_volume,show_message = 1) if(iscarbon(M) && M.stat != DEAD) - if(method == TOUCH) - M.adjustBruteLoss(-1.5*volume) - M.adjustFireLoss(-1.5*volume) + if(method == PATCH) + M.adjustBruteLoss(-1.5*reac_volume) + M.adjustFireLoss(-1.5*reac_volume) if(show_message) M << "You feel your burns healing and your flesh knitting together!" ..() - return + /datum/reagent/medicine/charcoal name = "Charcoal" @@ -659,7 +653,7 @@ color = "#C8A5DC" metabolization_rate = 0.5 * REAGENTS_METABOLISM -/datum/reagent/medicine/strange_reagent/reaction_mob(mob/living/carbon/human/M, method=TOUCH, volume) +/datum/reagent/medicine/strange_reagent/reaction_mob(mob/living/carbon/human/M, method=TOUCH, reac_volume) if(M.stat == DEAD) if(M.getBruteLoss() >= 100 || M.getFireLoss() >= 100) M.visible_message("[M]'s body convulses a bit, and then falls still once more.") diff --git a/code/modules/reagents/Chemistry-Reagents/Other-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Other-Reagents.dm index a5975560f1c..76ce0b07ebe 100644 --- a/code/modules/reagents/Chemistry-Reagents/Other-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents/Other-Reagents.dm @@ -5,7 +5,7 @@ id = "blood" color = "#C80000" // rgb: 200, 0, 0 -/datum/reagent/blood/reaction_mob(mob/M, method=TOUCH, volume) +/datum/reagent/blood/reaction_mob(mob/M, method=TOUCH, reac_volume) var/datum/reagent/blood/self = src src = null if(self.data && self.data["viruses"]) @@ -14,9 +14,9 @@ if(D.spread_flags & SPECIAL || D.spread_flags & NON_CONTAGIOUS) continue - if(method == TOUCH) + if(method == TOUCH || method == VAPOR) M.ContractDisease(D) - else //injected + else //ingest or patch M.ForceContractDisease(D) /datum/reagent/blood/on_new(list/data) @@ -48,11 +48,13 @@ src.data["viruses"] = preserve return 1 -/datum/reagent/blood/reaction_turf(turf/simulated/T, volume)//splash the blood all over the place - if(!istype(T)) return +/datum/reagent/blood/reaction_turf(turf/simulated/T, reac_volume)//splash the blood all over the place + if(!istype(T)) + return var/datum/reagent/blood/self = src src = null - if(!(volume >= 3)) return + if(reac_volume < 3) + return //var/datum/disease/D = self.data["virus"] if(!self.data["donor"] || istype(self.data["donor"], /mob/living/carbon/human)) var/obj/effect/decal/cleanable/blood/blood_prop = locate() in T //find some blood here @@ -93,7 +95,7 @@ id = "vaccine" color = "#C81040" // rgb: 200, 16, 64 -/datum/reagent/vaccine/reaction_mob(mob/M, method=TOUCH, volume) +/datum/reagent/vaccine/reaction_mob(mob/M, method=TOUCH, reac_volume) var/datum/reagent/vaccine/self = src src = null if(islist(self.data) && method == INGEST) @@ -101,13 +103,11 @@ if(D.GetDiseaseID() in self.data) D.cure() M.resistances |= self.data - return /datum/reagent/vaccine/on_merge(list/data) if(istype(data)) src.data |= data.Copy() - /datum/reagent/water name = "Water" id = "water" @@ -119,11 +119,11 @@ * Water reaction to turf */ -/datum/reagent/water/reaction_turf(turf/simulated/T, volume) +/datum/reagent/water/reaction_turf(turf/simulated/T, reac_volume) if (!istype(T)) return var/CT = cooling_temperature src = null - if(volume >= 10) + if(reac_volume >= 10) T.MakeSlippery() for(var/mob/living/simple_animal/slime/M in T) @@ -142,7 +142,7 @@ * Water reaction to an object */ -/datum/reagent/water/reaction_obj(obj/O, volume) +/datum/reagent/water/reaction_obj(obj/O, reac_volume) src = null if(istype(O,/obj/item)) @@ -166,11 +166,12 @@ * Water reaction to a mob */ -/datum/reagent/water/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with water can help put them out! +/datum/reagent/water/reaction_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with water can help put them out! if(!istype(M, /mob/living)) return if(method == TOUCH) - M.adjust_fire_stacks(-(volume / 10)) + M.adjust_fire_stacks(-(reac_volume / 10)) + ..() /datum/reagent/water/holywater name = "Holy Water" @@ -200,10 +201,10 @@ holder.remove_reagent(src.id, 0.4) //fixed consumption to prevent balancing going out of whack return -/datum/reagent/water/holywater/reaction_turf(turf/simulated/T, volume) +/datum/reagent/water/holywater/reaction_turf(turf/simulated/T, reac_volume) ..() if(!istype(T)) return - if(volume>=10) + if(reac_volume>=10) for(var/obj/effect/rune/R in T) qdel(R) T.Bless() @@ -247,10 +248,10 @@ description = "Lubricant is a substance introduced between two moving surfaces to reduce the friction and wear between them. giggity." color = "#009CA8" // rgb: 0, 156, 168 -/datum/reagent/lube/reaction_turf(turf/simulated/T, volume) +/datum/reagent/lube/reaction_turf(turf/simulated/T, reac_volume) if (!istype(T)) return src = null - if(volume >= 1) + if(reac_volume >= 1) T.MakeSlippery(2) /datum/reagent/spraytan @@ -261,9 +262,9 @@ metabolization_rate = 10 * REAGENTS_METABOLISM // very fast, so it can be applied rapidly. But this changes on an overdose overdose_threshold = 11 //Slightly more than one un-nozzled spraybottle. -/datum/reagent/spraytan/reaction_mob(mob/living/M, method=TOUCH, volume, show_message = 1) +/datum/reagent/spraytan/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) if(istype(M, /mob/living/carbon/human)) - if(method == TOUCH) + if(method == PATCH || method == VAPOR) var/mob/living/carbon/human/N = M if(N.dna.species.id == "human") switch(N.skin_tone) @@ -382,9 +383,10 @@ description = "An advanced corruptive toxin produced by slimes." color = "#13BC5E" // rgb: 19, 188, 94 -/datum/reagent/aslimetoxin/reaction_mob(mob/M, volume) +/datum/reagent/aslimetoxin/reaction_mob(mob/M, method=TOUCH, reac_volume) src = null - M.ForceContractDisease(new /datum/disease/transformation/slime(0)) + if(method != TOUCH) + M.ForceContractDisease(new /datum/disease/transformation/slime(0)) /datum/reagent/serotrotium name = "Serotrotium" @@ -463,7 +465,7 @@ reagent_state = SOLID color = "#1C1300" // rgb: 30, 20, 0 -/datum/reagent/carbon/reaction_turf(turf/T, volume) +/datum/reagent/carbon/reaction_turf(turf/T, reac_volume) src = null if(!istype(T, /turf/space)) new /obj/effect/decal/cleanable/dirt(T) @@ -539,12 +541,12 @@ ..() return -/datum/reagent/radium/reaction_turf(turf/T, volume) +/datum/reagent/radium/reaction_turf(turf/T, reac_volume) src = null - if(volume >= 3) + if(reac_volume >= 3) if(!istype(T, /turf/space)) var/obj/effect/decal/cleanable/reagentdecal = new/obj/effect/decal/cleanable/greenglow(T) - reagentdecal.reagents.add_reagent("radium", volume) + reagentdecal.reagents.add_reagent("radium", reac_volume) /datum/reagent/sterilizine name = "Sterilizine" @@ -583,15 +585,13 @@ /datum/reagent/uranium/on_mob_life(mob/living/M) M.apply_effect(1/M.metabolism_efficiency,IRRADIATE,0) ..() - return - -/datum/reagent/uranium/reaction_turf(turf/T, volume) +/datum/reagent/uranium/reaction_turf(turf/T, reac_volume) src = null - if(volume >= 3) + if(reac_volume >= 3) if(!istype(T, /turf/space)) var/obj/effect/decal/cleanable/reagentdecal = new/obj/effect/decal/cleanable/greenglow(T) - reagentdecal.reagents.add_reagent("uranium", volume) + reagentdecal.reagents.add_reagent("uranium", reac_volume) /datum/reagent/aluminium name = "Aluminium" @@ -613,17 +613,17 @@ description = "Required for welders. Flamable." color = "#660000" // rgb: 102, 0, 0 -/datum/reagent/fuel/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with welding fuel to make them easy to ignite! +/datum/reagent/fuel/reaction_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with welding fuel to make them easy to ignite! if(!istype(M, /mob/living)) return - if(method == TOUCH) - M.adjust_fire_stacks(volume / 10) + if(method == TOUCH || method == VAPOR) + M.adjust_fire_stacks(reac_volume / 10) return + ..() /datum/reagent/fuel/on_mob_life(mob/living/M) M.adjustToxLoss(1) ..() - return /datum/reagent/space_cleaner name = "Space cleaner" @@ -631,15 +631,15 @@ description = "A compound used to clean things. Now with 50% more sodium hypochlorite!" color = "#A5F0EE" // rgb: 165, 240, 238 -/datum/reagent/space_cleaner/reaction_obj(obj/O, volume) +/datum/reagent/space_cleaner/reaction_obj(obj/O, reac_volume) if(istype(O,/obj/effect/decal/cleanable)) qdel(O) else if(O) O.clean_blood() -/datum/reagent/space_cleaner/reaction_turf(turf/T, volume) - if(volume >= 1) +/datum/reagent/space_cleaner/reaction_turf(turf/T, reac_volume) + if(reac_volume >= 1) T.clean_blood() for(var/obj/effect/decal/cleanable/C in T) qdel(C) @@ -648,39 +648,40 @@ M.adjustToxLoss(rand(5,10)) if(istype(T, /turf/simulated/floor)) var/turf/simulated/floor/F = T - if(volume >= 1) + if(reac_volume >= 1) F.dirt = 0 -/datum/reagent/space_cleaner/reaction_mob(mob/M, method=TOUCH, volume) - if(iscarbon(M)) - var/mob/living/carbon/C = M - if(istype(M,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(H.lip_style) - H.lip_style = null - H.update_body() - if(C.r_hand) - C.r_hand.clean_blood() - if(C.l_hand) - C.l_hand.clean_blood() - if(C.wear_mask) - if(C.wear_mask.clean_blood()) - C.update_inv_wear_mask() - if(ishuman(M)) - var/mob/living/carbon/human/H = C - if(H.head) - if(H.head.clean_blood()) - H.update_inv_head() - if(H.wear_suit) - if(H.wear_suit.clean_blood()) - H.update_inv_wear_suit() - else if(H.w_uniform) - if(H.w_uniform.clean_blood()) - H.update_inv_w_uniform() - if(H.shoes) - if(H.shoes.clean_blood()) - H.update_inv_shoes() - M.clean_blood() +/datum/reagent/space_cleaner/reaction_mob(mob/M, method=TOUCH, reac_volume) + if(method == TOUCH || VAPOR) + if(iscarbon(M)) + var/mob/living/carbon/C = M + if(istype(M,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.lip_style) + H.lip_style = null + H.update_body() + if(C.r_hand) + C.r_hand.clean_blood() + if(C.l_hand) + C.l_hand.clean_blood() + if(C.wear_mask) + if(C.wear_mask.clean_blood()) + C.update_inv_wear_mask() + if(ishuman(M)) + var/mob/living/carbon/human/H = C + if(H.head) + if(H.head.clean_blood()) + H.update_inv_head() + if(H.wear_suit) + if(H.wear_suit.clean_blood()) + H.update_inv_wear_suit() + else if(H.w_uniform) + if(H.w_uniform.clean_blood()) + H.update_inv_w_uniform() + if(H.shoes) + if(H.shoes.clean_blood()) + H.update_inv_shoes() + M.clean_blood() /datum/reagent/cryptobiolin name = "Cryptobiolin" @@ -717,9 +718,9 @@ description = "Microscopic construction robots." color = "#535E66" // rgb: 83, 94, 102 -/datum/reagent/nanites/reaction_mob(mob/M, method=TOUCH, volume) +/datum/reagent/nanites/reaction_mob(mob/M, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0) src = null - if( (prob(min(10, volume)) && method==TOUCH) || method==INGEST) + if(method==PATCH || method==INGEST || (method == VAPOR && prob(min(reac_volume,100)*(1 - touch_protection)))) M.ForceContractDisease(new /datum/disease/transformation/robot(0)) /datum/reagent/xenomicrobes @@ -728,9 +729,9 @@ description = "Microbes with an entirely alien cellular structure." color = "#535E66" // rgb: 83, 94, 102 -/datum/reagent/xenomicrobes/reaction_mob(mob/M, method=TOUCH, volume) +/datum/reagent/xenomicrobes/reaction_mob(mob/M, method=TOUCH, reac_volume, show_message = 1, touch_protection = 0) src = null - if( (prob(min(10, volume)) && method==TOUCH) || method==INGEST) + if(method==PATCH || method==INGEST || (method == VAPOR && prob(min(reac_volume,100)*(1 - touch_protection)))) M.ContractDisease(new /datum/disease/transformation/xeno(0)) /datum/reagent/fluorosurfactant//foam precursor @@ -909,7 +910,7 @@ reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/carpet/reaction_turf(turf/simulated/T, volume) +/datum/reagent/carpet/reaction_turf(turf/simulated/T, reac_volume) if(istype(T, /turf/simulated/floor/plating) || istype(T, /turf/simulated/floor/plasteel)) var/turf/simulated/floor/F = T F.ChangeTurf(/turf/simulated/floor/carpet) @@ -959,21 +960,20 @@ ..() return -/datum/reagent/colorful_reagent/reaction_mob(mob/living/M, volume) +/datum/reagent/colorful_reagent/reaction_mob(mob/living/M, reac_volume) if(M && isliving(M)) M.color = pick(random_color_list) ..() - return -/datum/reagent/colorful_reagent/reaction_obj(obj/O, volume) + +/datum/reagent/colorful_reagent/reaction_obj(obj/O, reac_volume) if(O) O.color = pick(random_color_list) ..() - return -/datum/reagent/colorful_reagent/reaction_turf(turf/T, volume) + +/datum/reagent/colorful_reagent/reaction_turf(turf/T, reac_volume) if(T) T.color = pick(random_color_list) ..() - return /datum/reagent/hair_dye name = "Quantum Hair Dye" @@ -983,14 +983,13 @@ color = "#C8A5DC" var/list/potential_colors = list("0ad","a0f","f73","d14","d14","0b5","0ad","f73","fc2","084","05e","d22","fa0") // fucking hair code -/datum/reagent/hair_dye/reaction_mob(mob/living/M, volume) - if(M && ishuman(M)) - var/mob/living/carbon/human/H = M - H.hair_color = pick(potential_colors) - H.facial_hair_color = pick(potential_colors) - H.update_hair() - ..() - return +/datum/reagent/hair_dye/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + if(method == TOUCH || method == VAPOR) + if(M && ishuman(M)) + var/mob/living/carbon/human/H = M + H.hair_color = pick(potential_colors) + H.facial_hair_color = pick(potential_colors) + H.update_hair() /datum/reagent/barbers_aid name = "Barber's Aid" @@ -999,16 +998,15 @@ reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/barbers_aid/reaction_mob(mob/living/M, volume) - if(M && ishuman(M)) - var/mob/living/carbon/human/H = M - var/datum/sprite_accessory/hair/picked_hair = pick(hair_styles_list) - var/datum/sprite_accessory/facial_hair/picked_beard = pick(facial_hair_styles_list) - H.hair_style = picked_hair - H.facial_hair_style = picked_beard - H.update_hair() - ..() - return +/datum/reagent/barbers_aid/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + if(method == TOUCH || method == VAPOR) + if(M && ishuman(M)) + var/mob/living/carbon/human/H = M + var/datum/sprite_accessory/hair/picked_hair = pick(hair_styles_list) + var/datum/sprite_accessory/facial_hair/picked_beard = pick(facial_hair_styles_list) + H.hair_style = picked_hair + H.facial_hair_style = picked_beard + H.update_hair() /datum/reagent/concentrated_barbers_aid name = "Concentrated Barber's Aid" @@ -1017,14 +1015,13 @@ reagent_state = LIQUID color = "#C8A5DC" -/datum/reagent/concentrated_barbers_aid/reaction_mob(mob/living/M, volume) - if(M && ishuman(M)) - var/mob/living/carbon/human/H = M - H.hair_style = "Very Long Hair" - H.facial_hair_style = "Very Long Beard" - H.update_hair() - ..() - return +/datum/reagent/concentrated_barbers_aid/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + if(method == TOUCH || method == VAPOR) + if(M && ishuman(M)) + var/mob/living/carbon/human/H = M + H.hair_style = "Very Long Hair" + H.facial_hair_style = "Very Long Beard" + H.update_hair() /datum/reagent/saltpetre name = "Saltpetre" diff --git a/code/modules/reagents/Chemistry-Reagents/Pyrotechnic-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Pyrotechnic-Reagents.dm index 51b06d2774e..c56242773f6 100644 --- a/code/modules/reagents/Chemistry-Reagents/Pyrotechnic-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents/Pyrotechnic-Reagents.dm @@ -6,14 +6,14 @@ reagent_state = SOLID color = "#673910" // rgb: 103, 57, 16 -/datum/reagent/thermite/reaction_turf(turf/T, volume) +/datum/reagent/thermite/reaction_turf(turf/T, reac_volume) src = null - if(volume >= 1 && istype(T, /turf/simulated/wall)) + if(reac_volume >= 1 && istype(T, /turf/simulated/wall)) var/turf/simulated/wall/Wall = T if(istype(Wall, /turf/simulated/wall/r_wall)) - Wall.thermite = Wall.thermite+(volume*2.5) + Wall.thermite = Wall.thermite+(reac_volume*2.5) else - Wall.thermite = Wall.thermite+(volume*10) + Wall.thermite = Wall.thermite+(reac_volume*10) Wall.overlays = list() Wall.overlays += image('icons/effects/effects.dmi',"thermite") @@ -48,29 +48,30 @@ M.adjustFireLoss(burndmg) ..() -/datum/reagent/clf3/reaction_turf(turf/simulated/T, volume) +/datum/reagent/clf3/reaction_turf(turf/simulated/T, reac_volume) if(istype(T, /turf/simulated/floor/plating)) var/turf/simulated/floor/plating/F = T if(prob(1 + F.burnt + 5*F.broken)) //broken or burnt plating is more susceptible to being destroyed F.ChangeTurf(F.baseturf) if(istype(T, /turf/simulated/floor/)) var/turf/simulated/floor/F = T - if(prob(volume/10)) + if(prob(reac_volume/10)) F.make_plating() - else if(prob(volume)) + else if(prob(reac_volume)) F.burn_tile() if(istype(F, /turf/simulated/floor/)) PoolOrNew(/obj/effect/hotspot, F) if(istype(T, /turf/simulated/wall/)) var/turf/simulated/wall/W = T - if(prob(volume/10)) + if(prob(reac_volume/10)) W.ChangeTurf(/turf/simulated/floor/plating) -/datum/reagent/clf3/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH && isliving(M)) - M.adjust_fire_stacks(min(volume/5, 10)) - M.IgniteMob() - PoolOrNew(/obj/effect/hotspot, M.loc) +/datum/reagent/clf3/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + if(istype(M)) + if(method != INGEST) + M.adjust_fire_stacks(min(reac_volume/5, 10)) + M.IgniteMob() + PoolOrNew(/obj/effect/hotspot, M.loc) /datum/reagent/sorium name = "Sorium" @@ -128,8 +129,8 @@ description = "Catches you on fire and makes you ignite." reagent_state = LIQUID color = "#FF9999" - -/datum/reagent/phlogiston/reaction_mob(mob/living/M, method=TOUCH, volume) + +/datum/reagent/phlogiston/reaction_mob(mob/living/M, method=TOUCH, reac_volume) M.IgniteMob() ..() @@ -150,9 +151,10 @@ M.adjust_fire_stacks(1) ..() -/datum/reagent/napalm/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH && isliving(M)) - M.adjust_fire_stacks(min(volume/4, 20)) +/datum/reagent/napalm/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + if(istype(M)) + if(method != INGEST) + M.adjust_fire_stacks(min(reac_volume/4, 20)) /datum/reagent/cryostylane name = "Cryostylane" @@ -175,8 +177,8 @@ holder.handle_reactions() ..() -/datum/reagent/cryostylane/reaction_turf(turf/simulated/T, volume) - if(volume >= 5) +/datum/reagent/cryostylane/reaction_turf(turf/simulated/T, reac_volume) + if(reac_volume >= 5) for(var/mob/living/simple_animal/slime/M in T) M.adjustToxLoss(rand(15,30)) diff --git a/code/modules/reagents/Chemistry-Reagents/Toxin-Reagents.dm b/code/modules/reagents/Chemistry-Reagents/Toxin-Reagents.dm index 2672d7e678a..e13de807739 100644 --- a/code/modules/reagents/Chemistry-Reagents/Toxin-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents/Toxin-Reagents.dm @@ -28,13 +28,13 @@ color = "#13BC5E" // rgb: 19, 188, 94 toxpwr = 0 -/datum/reagent/toxin/mutagen/reaction_mob(mob/living/carbon/M, method=TOUCH, volume) +/datum/reagent/toxin/mutagen/reaction_mob(mob/living/carbon/M, method=TOUCH, reac_volume) if(!..()) return if(!istype(M) || !M.dna) return //No robots, AIs, aliens, Ians or other mobs should be affected by this. src = null - if((method==TOUCH && prob(min(33, volume))) || method==INGEST) + if((method==VAPOR && prob(min(33, reac_volume))) || method==INGEST || method == PATCH) randmuti(M) if(prob(98)) randmutb(M) @@ -42,13 +42,12 @@ randmutg(M) domutcheck(M, null) updateappearance(M) - return + ..() /datum/reagent/toxin/mutagen/on_mob_life(mob/living/carbon/M) if(istype(M)) M.apply_effect(5,IRRADIATE,0) ..() - return /datum/reagent/toxin/plasma name = "Plasma" @@ -66,27 +65,24 @@ ..() return -/datum/reagent/toxin/plasma/reaction_obj(obj/O, volume) +/datum/reagent/toxin/plasma/reaction_obj(obj/O, reac_volume) src = null - /*if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg/slime)) - var/obj/item/weapon/reagent_containers/food/snacks/egg/slime/egg = O - if (egg.grown) - egg.Hatch()*/ - if((!O) || (!volume)) return 0 - O.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, volume) + if((!O) || (!reac_volume)) return 0 + O.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, reac_volume) -/datum/reagent/toxin/plasma/reaction_turf(turf/simulated/T, volume) +/datum/reagent/toxin/plasma/reaction_turf(turf/simulated/T, reac_volume) src = null if(istype(T)) - T.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, volume) + T.atmos_spawn_air(SPAWN_TOXINS|SPAWN_20C, reac_volume) return -/datum/reagent/toxin/plasma/reaction_mob(mob/living/M, method=TOUCH, volume)//Splashing people with plasma is stronger than fuel! +/datum/reagent/toxin/plasma/reaction_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with plasma is stronger than fuel! if(!istype(M, /mob/living)) return - if(method == TOUCH) - M.adjust_fire_stacks(volume / 5) + if(method == TOUCH || method == VAPOR) + M.adjust_fire_stacks(reac_volume / 5) return + ..() /datum/reagent/toxin/lexorin name = "Lexorin" @@ -181,7 +177,7 @@ color = "#49002E" // rgb: 73, 0, 46 toxpwr = 1 -/datum/reagent/toxin/plantbgone/reaction_obj(obj/O, volume) +/datum/reagent/toxin/plantbgone/reaction_obj(obj/O, reac_volume) if(istype(O,/obj/structure/alien/weeds/)) var/obj/structure/alien/weeds/alien_weeds = O alien_weeds.health -= rand(15,35) // Kills alien weeds pretty fast @@ -192,13 +188,15 @@ var/obj/effect/spacevine/SV = O SV.on_chem_effect(src) -/datum/reagent/toxin/plantbgone/reaction_mob(mob/living/M, method=TOUCH, volume) +/datum/reagent/toxin/plantbgone/reaction_mob(mob/living/M, method=TOUCH, reac_volume) src = null - if(iscarbon(M)) - var/mob/living/carbon/C = M - if(!C.wear_mask) // If not wearing a mask - var/damage = min(round(0.4*volume, 0.1),10) - C.adjustToxLoss(damage) + if(method == VAPOR) + if(iscarbon(M)) + var/mob/living/carbon/C = M + if(!C.wear_mask) // If not wearing a mask + var/damage = min(round(0.4*reac_volume, 0.1),10) + C.adjustToxLoss(damage) + /datum/reagent/toxin/plantbgone/weedkiller name = "Weed Killer" id = "weedkiller" @@ -213,13 +211,14 @@ color = "#4B004B" // rgb: 75, 0, 75 toxpwr = 1 -/datum/reagent/toxin/pestkiller/reaction_mob(mob/living/M, method=TOUCH, volume) +/datum/reagent/toxin/pestkiller/reaction_mob(mob/living/M, method=TOUCH, reac_volume) src = null - if(iscarbon(M)) - var/mob/living/carbon/C = M - if(!C.wear_mask) // If not wearing a mask - var/damage = min(round(0.4*volume, 0.1),10) - C.adjustToxLoss(damage) + if(method == VAPOR) + if(iscarbon(M)) + var/mob/living/carbon/C = M + if(!C.wear_mask) // If not wearing a mask + var/damage = min(round(0.4*reac_volume, 0.1),10) + C.adjustToxLoss(damage) /datum/reagent/toxin/spore name = "Spore Toxin" @@ -456,10 +455,9 @@ metabolization_rate = 0.4 * REAGENTS_METABOLISM toxpwr = 0 -/datum/reagent/toxin/itching_powder/reaction_mob(mob/living/M, method=TOUCH, volume) - if(method == TOUCH) - M.reagents.add_reagent("itching_powder", volume) - return +/datum/reagent/toxin/itching_powder/reaction_mob(mob/living/M, method=TOUCH, reac_volume) + if(method != INGEST) + M.reagents.add_reagent("itching_powder", reac_volume) /datum/reagent/toxin/itching_powder/on_mob_life(mob/living/M) if(prob(15)) @@ -623,21 +621,28 @@ toxpwr = 1 var/acidpwr = 10 //the amount of protection removed from the armour -/datum/reagent/toxin/acid/reaction_mob(mob/living/carbon/C, method=TOUCH, volume) +/datum/reagent/toxin/acid/reaction_mob(mob/living/carbon/C, method=TOUCH, reac_volume) if(!istype(C)) return - volume = round(volume,0.1) - if(method != TOUCH) - C.take_organ_damage(min(6*toxpwr, volume * toxpwr)) + reac_volume = round(reac_volume,0.1) + if(method == INGEST) + C.take_organ_damage(min(6*toxpwr, reac_volume * toxpwr)) return + C.acid_act(acidpwr, toxpwr, reac_volume) - C.acid_act(acidpwr, toxpwr, volume) - -/datum/reagent/toxin/acid/reaction_obj(obj/O, volume) +/datum/reagent/toxin/acid/reaction_obj(obj/O, reac_volume) if(istype(O.loc, /mob)) //handled in human acid_act() return - volume = round(volume,0.1) - O.acid_act(acidpwr, toxpwr, volume) + reac_volume = round(reac_volume,0.1) + O.acid_act(acidpwr, reac_volume) + +/datum/reagent/toxin/acid/reaction_turf(turf/T, reac_volume) + if (!istype(T)) + return + src = null + reac_volume = round(reac_volume,0.1) + for(var/obj/O in T) + O.acid_act(acidpwr, reac_volume) /datum/reagent/toxin/acid/fluacid name = "Fluorosulfuric acid" diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index e7f7014e135..51d3caf2b15 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -24,40 +24,15 @@ /datum/chemical_reaction/proc/chemical_mob_spawn(datum/reagents/holder, amount_to_spawn, reaction_name, mob_faction = "chemicalsummon") if(holder && holder.my_atom) - var/blocked = list(/mob/living/simple_animal/hostile, - /mob/living/simple_animal/hostile/pirate, - /mob/living/simple_animal/hostile/pirate/ranged, - /mob/living/simple_animal/hostile/russian, - /mob/living/simple_animal/hostile/russian/ranged, - /mob/living/simple_animal/hostile/syndicate, - /mob/living/simple_animal/hostile/syndicate/melee, - /mob/living/simple_animal/hostile/syndicate/melee/space, - /mob/living/simple_animal/hostile/syndicate/ranged, - /mob/living/simple_animal/hostile/syndicate/ranged/space, - /mob/living/simple_animal/hostile/alien/queen/large, - /mob/living/simple_animal/hostile/mushroom, - /mob/living/simple_animal/hostile/asteroid, - /mob/living/simple_animal/hostile/retaliate, - /mob/living/simple_animal/hostile/asteroid/basilisk, - /mob/living/simple_animal/hostile/asteroid/goldgrub, - /mob/living/simple_animal/hostile/asteroid/goliath, - /mob/living/simple_animal/hostile/asteroid/hivelord, - /mob/living/simple_animal/hostile/asteroid/hivelordbrood, - /mob/living/simple_animal/hostile/carp/holocarp, - /mob/living/simple_animal/hostile/mining_drone, - /mob/living/simple_animal/hostile/poison, - /mob/living/simple_animal/hostile/blob, - /mob/living/simple_animal/ascendant_shadowling - )//exclusion list for things you don't want the reaction to create. - var/list/meancritters = typesof(/mob/living/simple_animal/hostile) - blocked // list of possible hostile mobs - var/list/nicecritters = list(/mob/living/simple_animal/crab, - /mob/living/simple_animal/mouse, - /mob/living/simple_animal/lizard, - /mob/living/simple_animal/parrot, - /mob/living/simple_animal/butterfly, - /mob/living/simple_animal/cow, - /mob/living/simple_animal/chicken) // and possible friendly mobs - nicecritters += typesof(/mob/living/simple_animal/pet) - /mob/living/simple_animal/pet + var/list/meancritters = list() // list of possible hostile mobs + var/list/nicecritters = list() // and possible friendly mobs + for(var/T in typesof(/mob/living/simple_animal)) + var/mob/living/simple_animal/M = new T + switch(M.gold_core_spawnable) + if(1) + meancritters += M.type + if(2) + nicecritters += M.type var/atom/A = holder.my_atom var/turf/T = get_turf(A) var/area/my_area = get_area(T) @@ -77,22 +52,17 @@ for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null)) C.flash_eyes() for(var/i = 1, i <= amount_to_spawn, i++) + var/chosen if (reaction_name == "Friendly Gold Slime") - var/chosen = pick(nicecritters) - var/mob/living/simple_animal/C = new chosen - C.faction |= mob_faction - C.loc = get_turf(holder.my_atom) - if(prob(50)) - for(var/j = 1, j <= rand(1, 3), j++) - step(C, pick(NORTH,SOUTH,EAST,WEST)) + chosen = pick(nicecritters) else - var/chosen = pick(meancritters) - var/mob/living/simple_animal/hostile/C = new chosen - C.faction |= mob_faction - C.loc = get_turf(holder.my_atom) - if(prob(50)) - for(var/j = 1, j <= rand(1, 3), j++) - step(C, pick(NORTH,SOUTH,EAST,WEST)) + chosen = pick(meancritters) + var/mob/living/simple_animal/C = new chosen + C.faction |= mob_faction + C.loc = get_turf(holder.my_atom) + if(prob(50)) + for(var/j = 1, j <= rand(1, 3), j++) + step(C, pick(NORTH,SOUTH,EAST,WEST)) /datum/chemical_reaction/proc/goonchem_vortex(turf/simulated/T, setting_type, range) for(var/atom/movable/X in orange(range, T)) @@ -118,4 +88,4 @@ for(var/i = 0, i < moving_power, i++) sleep(2) if(!step_towards(X, T)) - break \ No newline at end of file + break diff --git a/code/modules/reagents/Chemistry-Recipes/Slime_extracts.dm b/code/modules/reagents/Chemistry-Recipes/Slime_extracts.dm index cd4da1f60d6..09231890a94 100644 --- a/code/modules/reagents/Chemistry-Recipes/Slime_extracts.dm +++ b/code/modules/reagents/Chemistry-Recipes/Slime_extracts.dm @@ -10,7 +10,7 @@ required_other = 1 /datum/chemical_reaction/slimespawn/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/mob/living/simple_animal/slime/S = new /mob/living/simple_animal/slime S.loc = get_turf(holder.my_atom) S.visible_message("Infused with plasma, the core begins to quiver and grow, and soon a new baby slime emerges from it!") @@ -25,7 +25,7 @@ required_container = /obj/item/slime_extract/grey /datum/chemical_reaction/slimeinaprov/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") /datum/chemical_reaction/slimemonkey name = "Slime Monkey" @@ -37,7 +37,7 @@ required_other = 1 /datum/chemical_reaction/slimemonkey/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") for(var/i = 1, i <= 3, i++) var /obj/item/weapon/reagent_containers/food/snacks/monkeycube/M = new /obj/item/weapon/reagent_containers/food/snacks/monkeycube M.loc = get_turf(holder.my_atom) @@ -53,7 +53,7 @@ required_container = /obj/item/slime_extract/green /datum/chemical_reaction/slimemutate/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") //Mutated Green /datum/chemical_reaction/slimemutate_unstable @@ -67,7 +67,7 @@ mix_message = "The mixture rapidly expands and contracts, its appearance shifting into a sickening green." /datum/chemical_reaction/slimemutate_unstable/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") //Metal /datum/chemical_reaction/slimemetal @@ -80,7 +80,7 @@ required_other = 1 /datum/chemical_reaction/slimemetal/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal M.amount = 15 M.loc = get_turf(holder.my_atom) @@ -99,7 +99,7 @@ required_other = 1 /datum/chemical_reaction/slimecrit/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") for(var/mob/O in viewers(get_turf(holder.my_atom), null)) O.show_message(text("The slime extract begins to vibrate violently !"), 1) spawn(50) @@ -116,7 +116,7 @@ required_other = 1 /datum/chemical_reaction/slimecritlesser/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") for(var/mob/O in viewers(get_turf(holder.my_atom), null)) O.show_message(text("The slime extract begins to vibrate violently !"), 1) spawn(50) @@ -133,7 +133,7 @@ required_other = 1 /datum/chemical_reaction/slimecritfriendly/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") for(var/mob/O in viewers(get_turf(holder.my_atom), null)) O.show_message(text("The slime extract begins to vibrate adorably !"), 1) spawn(50) @@ -152,7 +152,7 @@ /datum/chemical_reaction/slimebork/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/list/blocked = list(/obj/item/weapon/reagent_containers/food/snacks, /obj/item/weapon/reagent_containers/food/snacks/store/bread, /obj/item/weapon/reagent_containers/food/snacks/breadslice, @@ -200,7 +200,7 @@ /datum/chemical_reaction/slimebork2/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/list/blocked = list(/obj/item/weapon/reagent_containers/food/drinks) var/list/borks = typesof(/obj/item/weapon/reagent_containers/food/drinks) - blocked @@ -232,7 +232,7 @@ required_other = 1 /datum/chemical_reaction/slimefrost/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") /datum/chemical_reaction/slimestabilizer @@ -245,7 +245,7 @@ required_other = 1 /datum/chemical_reaction/slimestabilizer/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/obj/item/weapon/slimestabilizer/P = new /obj/item/weapon/slimestabilizer P.loc = get_turf(holder.my_atom) @@ -262,7 +262,7 @@ required_other = 1 /datum/chemical_reaction/slimefreeze/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") for(var/mob/O in viewers(get_turf(holder.my_atom), null)) O.show_message(text("The slime extract begins to vibrate violently !"), 1) spawn(50) @@ -283,7 +283,7 @@ required_other = 1 /datum/chemical_reaction/slimecasp/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") /datum/chemical_reaction/slimefire name = "Slime fire" @@ -295,7 +295,7 @@ required_other = 1 /datum/chemical_reaction/slimefire/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") for(var/mob/O in viewers(get_turf(holder.my_atom), null)) O.show_message(text("The slime extract begins to vibrate violently !"), 1) spawn(50) @@ -316,7 +316,7 @@ required_other = 1 /datum/chemical_reaction/slimeoverload/on_reaction(datum/reagents/holder, created_volume) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") empulse(get_turf(holder.my_atom), 3, 7) @@ -330,7 +330,7 @@ required_other = 1 /datum/chemical_reaction/slimecell/on_reaction(datum/reagents/holder, created_volume) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/obj/item/weapon/stock_parts/cell/high/slime/P = new /obj/item/weapon/stock_parts/cell/high/slime P.loc = get_turf(holder.my_atom) @@ -344,7 +344,7 @@ required_other = 1 /datum/chemical_reaction/slimeglow/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") for(var/mob/O in viewers(get_turf(holder.my_atom), null)) O.show_message(text("The slime begins to emit a soft light. Squeezing it will cause it to grow brightly."), 1) var/obj/item/device/flashlight/slime/F = new /obj/item/device/flashlight/slime @@ -362,7 +362,7 @@ required_other = 1 /datum/chemical_reaction/slimepsteroid/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/obj/item/weapon/slimesteroid/P = new /obj/item/weapon/slimesteroid P.loc = get_turf(holder.my_atom) @@ -376,7 +376,7 @@ required_other = 1 /datum/chemical_reaction/slimejam/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") //Dark Purple @@ -390,25 +390,11 @@ required_other = 1 /datum/chemical_reaction/slimeplasma/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/obj/item/stack/sheet/mineral/plasma/P = new /obj/item/stack/sheet/mineral/plasma P.amount = 10 P.loc = get_turf(holder.my_atom) -//Red -/*/datum/chemical_reaction/slimeglycerol - name = "Slime Glycerol" - id = "m_glycerol" - result = "glycerol" - required_reagents = list("plasma" = 1) - result_amount = 8 - required_container = /obj/item/slime_extract/red - required_other = 1 - -/datum/chemical_reaction/slimeglycerol/on_reaction(var/datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") -*/ - /datum/chemical_reaction/slimemutator name = "Slime Mutator" id = "m_slimemutator" @@ -419,7 +405,7 @@ required_other = 1 /datum/chemical_reaction/slimemutator/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/obj/item/weapon/slimemutator/P = new /obj/item/weapon/slimemutator P.loc = get_turf(holder.my_atom) @@ -433,7 +419,7 @@ required_other = 1 /datum/chemical_reaction/slimebloodlust/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") for(var/mob/living/simple_animal/slime/slime in viewers(get_turf(holder.my_atom), null)) slime.rabid = 1 for(var/mob/O in viewers(get_turf(holder.my_atom), null)) @@ -450,7 +436,7 @@ required_other = 1 /datum/chemical_reaction/slimeppotion/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/obj/item/slimepotion/P = new /obj/item/slimepotion P.loc = get_turf(holder.my_atom) @@ -466,7 +452,7 @@ required_container = /obj/item/slime_extract/black /datum/chemical_reaction/slimemutate2/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") //Oil /datum/chemical_reaction/slimeexplosion @@ -479,7 +465,7 @@ required_other = 1 /datum/chemical_reaction/slimeexplosion/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") for(var/mob/O in viewers(get_turf(holder.my_atom), null)) O.show_message(text("The slime extract begins to vibrate violently !"), 1) spawn(50) @@ -497,7 +483,7 @@ required_other = 1 /datum/chemical_reaction/slimepotion2/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/obj/item/slimepotion2/P = new /obj/item/slimepotion2 P.loc = get_turf(holder.my_atom) @@ -512,7 +498,7 @@ required_other = 1 /datum/chemical_reaction/slimegolem/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/obj/effect/golemrune/Z = new /obj/effect/golemrune Z.loc = get_turf(holder.my_atom) notify_ghosts("Golem rune created in [get_area(Z)].", 'sound/effects/ghost2.ogg') @@ -528,7 +514,7 @@ required_other = 1 /datum/chemical_reaction/slimefloor2/on_reaction(datum/reagents/holder, created_volume) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/obj/item/stack/tile/bluespace/P = new /obj/item/stack/tile/bluespace P.amount = 25 P.loc = get_turf(holder.my_atom) @@ -544,7 +530,7 @@ required_other = 1 /datum/chemical_reaction/slimecrystal/on_reaction(datum/reagents/holder, created_volume) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") if(holder.my_atom) var/obj/item/bluespace_crystal/BC = new(get_turf(holder.my_atom)) BC.visible_message("The [BC.name] appears out of thin air!") @@ -560,7 +546,7 @@ required_other = 1 /datum/chemical_reaction/slimepsteroid2/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/obj/item/weapon/slimesteroid2/P = new /obj/item/weapon/slimesteroid2 P.loc = get_turf(holder.my_atom) @@ -575,7 +561,7 @@ required_other = 1 /datum/chemical_reaction/slimestop/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/mob/mob = get_mob_by_key(holder.my_atom.fingerprintslast) var/obj/effect/timestop/T = new /obj/effect/timestop T.loc = get_turf(holder.my_atom) @@ -593,7 +579,7 @@ required_other = 1 /datum/chemical_reaction/slimecamera/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/obj/item/device/camera/P = new /obj/item/device/camera P.loc = get_turf(holder.my_atom) var/obj/item/device/camera_film/Z = new /obj/item/device/camera_film @@ -609,7 +595,7 @@ required_other = 1 /datum/chemical_reaction/slimefloor/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/obj/item/stack/tile/sepia/P = new /obj/item/stack/tile/sepia P.amount = 25 P.loc = get_turf(holder.my_atom) @@ -628,7 +614,7 @@ required_other = 1 /datum/chemical_reaction/slimepaint/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/list/paints = typesof(/obj/item/weapon/paint) - /obj/item/weapon/paint var/chosen = pick(paints) var/obj/P = new chosen @@ -646,7 +632,7 @@ required_container = /obj/item/slime_extract/rainbow /datum/chemical_reaction/slimeRNG/on_reaction(datum/reagents/holder) - feedback_add_details("slime_cores_used","[replacetext(name," ","_")]") + feedback_add_details("slime_cores_used","[type]") var/mob/living/simple_animal/slime/S = new /mob/living/simple_animal/slime S.colour = pick("grey","orange", "metal", "blue", "purple", "dark purple", "dark blue", "green", "silver", "yellow", "gold", "yellow", "red", "silver", "pink", "cerulean", "sepia", "bluespace", "pyrite", "light pink", "oil", "adamantine", "black") S.loc = get_turf(holder.my_atom) diff --git a/code/modules/reagents/reagent_containers/patch.dm b/code/modules/reagents/reagent_containers/patch.dm index f87d3682a7c..1b475da801e 100644 --- a/code/modules/reagents/reagent_containers/patch.dm +++ b/code/modules/reagents/reagent_containers/patch.dm @@ -6,7 +6,7 @@ item_state = "bandaid" possible_transfer_amounts = null volume = 50 - apply_type = TOUCH + apply_type = PATCH apply_method = "apply" /obj/item/weapon/reagent_containers/pill/patch/New() diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 73923de0f62..46aef0834e4 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -79,12 +79,12 @@ continue if(puff_reagent_left <= 0) break - D.reagents.reaction(T) + D.reagents.reaction(T, VAPOR) if(ismob(T)) //mobs are obstacles that consume part of the puff, shortening its range. puff_reagent_left -= 1 if(puff_reagent_left > 0) - D.reagents.reaction(get_turf(D)) + D.reagents.reaction(get_turf(D), VAPOR) puff_reagent_left -= 1 if(puff_reagent_left <= 0) // we used all the puff so we delete it. diff --git a/code/modules/recycling/disposal-structures.dm b/code/modules/recycling/disposal-structures.dm index ca1364644be..3511e08142e 100644 --- a/code/modules/recycling/disposal-structures.dm +++ b/code/modules/recycling/disposal-structures.dm @@ -59,7 +59,6 @@ if(!D.trunk) D.expel(src) // no trunk connected, so expel immediately return - loc = D.trunk active = 1 dir = DOWN @@ -122,11 +121,9 @@ playsound(src.loc, 'sound/effects/clang.ogg', 50, 0, 0) // called to vent all gas in holder to a location -/obj/structure/disposalholder/proc/vent_gas(atom/location) - if(location) - location.assume_air(gas) // vent all gas to turf - air_update_turf() - return +/obj/structure/disposalholder/proc/vent_gas(turf/T) + T.assume_air(gas) + T.air_update_turf() /obj/structure/disposalholder/allow_drop() return 1 @@ -637,6 +634,16 @@ update() return +/obj/structure/disposalpipe/trunk/Destroy() + if(linked) + if(istype(linked, /obj/structure/disposaloutlet)) + var/obj/structure/disposaloutlet/D = linked + D.trunk = null + else if(istype(linked, /obj/machinery/disposal)) + var/obj/machinery/disposal/D = linked + D.trunk = null + ..() + /obj/structure/disposalpipe/trunk/proc/getlinked() linked = null var/obj/machinery/disposal/D = locate() in src.loc diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 1501167a730..c01225e38e1 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -111,15 +111,27 @@ //////////Cybernetic Implants//////////// ///////////////////////////////////////// +/datum/design/cyberimp_welding + name = "Welding Shield implant" + desc = "These reactive micro-shields will protect you from welders and flashes without obscuring your vision." + id = "ci-welding" + req_tech = list("materials" = 4, "biotech" = 2) + build_type = PROTOLATHE | MECHFAB + construction_time = 40 + materials = list(MAT_METAL = 200, MAT_GLASS = 400) + build_path = /obj/item/organ/internal/cyberimp/eyes/shield + category = list("Misc", "Medical Designs") + /datum/design/cyberimp_medical_hud name = "Medical HUD implant" desc = "These cybernetic eyes will display a medical HUD over everything you see. Wiggle eyes to control." id = "ci-medhud" req_tech = list("materials" = 6, "programming" = 4, "biotech" = 4) build_type = PROTOLATHE | MECHFAB + construction_time = 50 materials = list(MAT_METAL = 200, MAT_GLASS = 200, MAT_SILVER = 500, MAT_GOLD = 500) build_path = /obj/item/organ/internal/cyberimp/eyes/hud/medical - category = list("Medical Designs") + category = list("Misc", "Medical Designs") /datum/design/cyberimp_security_hud name = "Security HUD implant" @@ -127,9 +139,10 @@ id = "ci-sechud" req_tech = list("materials" = 6, "programming" = 5, "biotech" = 4, "combat" = 2) build_type = PROTOLATHE | MECHFAB + construction_time = 50 materials = list(MAT_METAL = 200, MAT_GLASS = 200, MAT_SILVER = 750, MAT_GOLD = 750) build_path = /obj/item/organ/internal/cyberimp/eyes/hud/security - category = list("Medical Designs") + category = list("Misc", "Medical Designs") /datum/design/cyberimp_xray name = "X-Ray implant" @@ -137,9 +150,10 @@ id = "ci-xray" req_tech = list("materials" = 7, "programming" = 5, "biotech" = 6, "magnets" = 5) build_type = PROTOLATHE | MECHFAB + construction_time = 60 materials = list(MAT_METAL = 200, MAT_GLASS = 200, MAT_SILVER = 600, MAT_GOLD = 600, MAT_PLASMA = 1000, MAT_URANIUM = 1000, MAT_DIAMOND = 2000) build_path = /obj/item/organ/internal/cyberimp/eyes/xray - category = list("Medical Designs") + category = list("Misc", "Medical Designs") /datum/design/cyberimp_thermals name = "Thermals implant" @@ -147,9 +161,10 @@ id = "ci-thermals" req_tech = list("materials" = 7, "programming" = 5, "biotech" = 5, "magnets" = 5, "syndicate" = 5) build_type = PROTOLATHE | MECHFAB + construction_time = 60 materials = list(MAT_METAL = 200, MAT_GLASS = 200, MAT_SILVER = 600, MAT_GOLD = 600, MAT_PLASMA = 1000, MAT_DIAMOND = 2000) build_path = /obj/item/organ/internal/cyberimp/eyes/thermals - category = list("Medical Designs") + category = list("Misc", "Medical Designs") /datum/design/cyberimp_antidrop name = "Anti-Drop implant" @@ -157,6 +172,7 @@ id = "ci-antidrop" req_tech = list("materials" = 7, "programming" = 5, "biotech" = 5) build_type = PROTOLATHE | MECHFAB + construction_time = 60 materials = list(MAT_METAL = 200, MAT_GLASS = 200, MAT_SILVER = 400, MAT_GOLD = 400) build_path = /obj/item/organ/internal/cyberimp/brain/anti_drop category = list("Medical Designs") @@ -167,6 +183,7 @@ id = "ci-antistun" req_tech = list("materials" = 7, "programming" = 5, "biotech" = 6) build_type = PROTOLATHE | MECHFAB + construction_time = 60 materials = list(MAT_METAL = 200, MAT_GLASS = 200, MAT_SILVER = 500, MAT_GOLD = 1000) build_path = /obj/item/organ/internal/cyberimp/brain/anti_stun category = list("Medical Designs") @@ -177,6 +194,7 @@ id = "ci-nutriment" req_tech = list("materials" = 6, "programming" = 4, "biotech" = 5) build_type = PROTOLATHE | MECHFAB + construction_time = 40 materials = list(MAT_METAL = 200, MAT_GLASS = 200, MAT_GOLD = 500, MAT_URANIUM = 500) build_path = /obj/item/organ/internal/cyberimp/chest/nutriment category = list("Medical Designs") @@ -187,6 +205,7 @@ id = "ci-nutrimentplus" req_tech = list("materials" = 6, "programming" = 4, "biotech" = 6) build_type = PROTOLATHE | MECHFAB + construction_time = 50 materials = list(MAT_METAL = 200, MAT_GLASS = 200, MAT_GOLD = 500, MAT_URANIUM = 750) build_path = /obj/item/organ/internal/cyberimp/chest/nutriment/plus category = list("Medical Designs") @@ -197,6 +216,52 @@ id = "ci-reviver" req_tech = list("materials" = 6, "programming" = 4, "biotech" = 7, "syndicate" = 4) build_type = PROTOLATHE | MECHFAB + construction_time = 60 materials = list(MAT_METAL = 200, MAT_GLASS = 200, MAT_GOLD = 500, MAT_URANIUM = 1000, MAT_DIAMOND = 2000) build_path = /obj/item/organ/internal/cyberimp/chest/reviver + category = list("Misc", "Medical Designs") + + +///////////////////////////////////////// +////////////Regular Implants///////////// +///////////////////////////////////////// + +/datum/design/implanter + name = "Implanter" + desc = "A sterile automatic implant injector." + id = "implanter" + req_tech = list("materials" = 1, "programming" = 2, "biotech" = 3) + build_type = PROTOLATHE + materials = list(MAT_METAL = 600, MAT_GLASS = 200) + build_path = /obj/item/weapon/implanter + category = list("Medical Designs") + +/datum/design/implantcase + name = "Implant Case" + desc = "A glass case containing an implant." + id = "implantcase" + req_tech = list("materials" = 1, "biotech" = 2) + build_type = PROTOLATHE + materials = list(MAT_GLASS = 500) + build_path = /obj/item/weapon/implantcase + category = list("Medical Designs") + +/datum/design/implant_freedom + name = "Freedom Implant Case" + desc = "A glass case containing an implant." + id = "implant_freedom" + req_tech = list("materials" = 2, "biotech" = 3, "magnets" = 3, "syndicate" = 5) + build_type = PROTOLATHE + materials = list(MAT_METAL = 50, MAT_GLASS = 500, MAT_GOLD = 250) + build_path = /obj/item/weapon/implantcase/freedom + category = list("Medical Designs") + +/datum/design/implant_adrenalin + name = "Adrenalin Implant Case" + desc = "A glass case containing an implant." + id = "implant_adrenalin" + req_tech = list("materials" = 2, "biotech" = 5, "combat" = 3, "syndicate" = 6) + build_type = PROTOLATHE + materials = list(MAT_METAL = 50, MAT_GLASS = 500, MAT_GOLD = 500, MAT_URANIUM = 100, MAT_DIAMOND = 200) + build_path = /obj/item/weapon/implantcase/adrenaline category = list("Medical Designs") \ No newline at end of file diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index a3e8c47888d..7cbe1fe68f1 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -60,7 +60,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, check_tech = new T() if(check_tech.id == ID) return_name = check_tech.name - del(check_tech) + qdel(check_tech) check_tech = null break @@ -94,7 +94,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, temp_reagent = new R() if(temp_reagent.id == ID) return_name = temp_reagent.name - del(temp_reagent) + qdel(temp_reagent) temp_reagent = null break return return_name @@ -278,7 +278,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, if(linked_lathe) //Also sends salvaged materials to a linked protolathe, if any. linked_lathe.m_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.materials[MAT_METAL]*(linked_destroy.decon_mod/10))) linked_lathe.g_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.materials[MAT_GLASS]*(linked_destroy.decon_mod/10))) - feedback_add_details("item_deconstructed","[linked_destroy.loaded_item.name]") + feedback_add_details("item_deconstructed","[linked_destroy.loaded_item.type]") linked_destroy.loaded_item = null else screen = 1.0 @@ -421,7 +421,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, R = max((new_item.reliability/2), 0) new_item.loc = linked_lathe.loc if(!already_logged) - feedback_add_details("item_printed","[new_item.name]|[amount]") + feedback_add_details("item_printed","[new_item.type]|[amount]") already_logged = 1 linked_lathe.busy = 0 screen = old_screen @@ -476,7 +476,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, var/obj/item/new_item = new P(src) new_item.reliability = R new_item.loc = linked_imprinter.loc - feedback_add_details("circuit_printed","[new_item.name]") + feedback_add_details("circuit_printed","[new_item.type]") linked_imprinter.busy = 0 screen = old_screen updateUsrDialog() @@ -575,7 +575,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, var/choice = alert("R&D Console Database Reset", "Are you sure you want to reset the R&D console's database? Data lost cannot be recovered.", "Continue", "Cancel") if(choice == "Continue") screen = 0.0 - del(files) + qdel(files) files = new /datum/research(src) spawn(20) screen = 1.6 @@ -715,11 +715,14 @@ won't update every console in existence) but it's more of a hassle to do. Also, dat += "Load Design to Disk" else dat += "Name: [d_disk.blueprint.name]
" - dat += "Level: [Clamp((d_disk.blueprint.reliability + rand(-15,15)), 0, 100)]
" - switch(d_disk.blueprint.build_type) - if(IMPRINTER) dat += "Lathe Type: Circuit Imprinter
" - if(PROTOLATHE) dat += "Lathe Type: Proto-lathe
" - if(AUTOLATHE) dat += "Lathe Type: Auto-lathe
" + dat += "Level: [d_disk.blueprint.reliability]
" + var/b_type = d_disk.blueprint.build_type + if(b_type) + dat += "Lathe Types:
" + if(b_type & IMPRINTER) dat += "Circuit Imprinter
" + if(b_type & PROTOLATHE) dat += "Proto-lathe
" + if(b_type & AUTOLATHE) dat += "Auto-lathe
" + if(b_type & MECHFAB) dat += "Mech Fabricator
" dat += "Required Materials:
" for(var/M in d_disk.blueprint.materials) if(copytext(M, 1, 2) == "$") dat += "* [copytext(M, 2)] x [d_disk.blueprint.materials[M]]
" @@ -790,7 +793,12 @@ won't update every console in existence) but it's more of a hassle to do. Also, dat += "Origin Tech:
" var/list/temp_tech = linked_destroy.ConvertReqString2List(linked_destroy.loaded_item.origin_tech) for(var/T in temp_tech) - dat += "* [CallTechName(T)] [temp_tech[T]]
" + dat += "* [CallTechName(T)] [temp_tech[T]]" + for(var/datum/tech/F in files.known_tech) + if(F.name == CallTechName(T)) + dat += " (Current: [F.level])" + break + dat += "
" dat += "Options: " dat += "Deconstruct Item" dat += "Eject Item" @@ -1102,4 +1110,4 @@ won't update every console in existence) but it's more of a hassle to do. Also, /obj/machinery/computer/rdconsole/experiment name = "E.X.P.E.R.I-MENTOR R&D Console" desc = "A console used to interface with R&D tools." - id = 1 + id = 3 diff --git a/code/modules/research/research.dm b/code/modules/research/research.dm index ac43f99f99c..d164418c115 100644 --- a/code/modules/research/research.dm +++ b/code/modules/research/research.dm @@ -190,6 +190,7 @@ research holder datum. var/desc = "description" //General description of what it does and what it makes. var/id = "id" //An easily referenced ID. Must be alphanumeric, lower-case, and no symbols. var/level = 1 //A simple number scale of the research level. Level 0 = Secret tech. + var/rare = 1 //How much CentCom wants to get that tech. Used in supply shuttle tech cost calculation. var/list/req_tech = list() //List of ids associated values of techs required to research this tech. "id" = # @@ -209,6 +210,7 @@ research holder datum. name = "Plasma Research" desc = "Research into the mysterious substance colloqually known as 'plasma'." id = "plasmatech" + rare = 3 /datum/tech/powerstorage name = "Power Manipulation Technology" @@ -219,6 +221,7 @@ research holder datum. name = "'Blue-space' Research" desc = "Research into the sub-reality known as 'blue-space'" id = "bluespace" + rare = 2 /datum/tech/biotech name = "Biological Technology" @@ -244,6 +247,8 @@ research holder datum. name = "Illegal Technologies Research" desc = "The study of technologies that violate Nanotrassen regulations." id = "syndicate" + rare = 4 + /* /datum/tech/arcane @@ -273,6 +278,26 @@ research holder datum. */ +/datum/tech/proc/getCost(var/current_level = null) + // Calculates tech disk's supply points sell cost + if(!current_level) + current_level = initial(level) + + if(current_level >= level) + return 0 + + var/cost = 0 + var/i + for(i=current_level+1, i<=level, i++) + if(i == initial(level)) + continue + cost += i*5*rare + + return cost + + + + /obj/item/weapon/disk/tech_disk name = "Technology Disk" desc = "A disk for storing technology data for further research." diff --git a/code/modules/surgery/organs/augments_eyes.dm b/code/modules/surgery/organs/augments_eyes.dm index ab814cbf9df..4ef193183b1 100644 --- a/code/modules/surgery/organs/augments_eyes.dm +++ b/code/modules/surgery/organs/augments_eyes.dm @@ -121,7 +121,8 @@ origin_tech = "materials=4;biotech=3" implant_color = "#101010" flash_protect = 2 - // Welding with thermals will still hurt your eyes a bit. + aug_message = null + eye_color = "fff" /obj/item/organ/internal/cyberimp/eyes/shield/emp_act(severity) return \ No newline at end of file diff --git a/code/world.dm b/code/world.dm index d515df42aed..9635e3fe995 100644 --- a/code/world.dm +++ b/code/world.dm @@ -19,10 +19,6 @@ #endif //logs var/date_string = time2text(world.realtime, "YYYY/MM-Month/DD-Day") -// if(revdata && istext(revdata.revision) && length(revdata.revision)>7) -// log = file("data/logs/runtime/[copytext(revdata.revision,1,8)].log") -// else -// log = file("data/logs/runtime/[time2text(world.realtime,"YYYY-MM")].log") //funtimelog href_logfile = file("data/logs/[date_string] hrefs.htm") diary = file("data/logs/[date_string].log") diaryofmeanpeople = file("data/logs/[date_string] Attack.log") @@ -46,7 +42,6 @@ investigate_reset() if(config && config.server_name != null && config.server_suffix && world.port > 0) - // dumb and hardcoded but I don't care~ config.server_name += " #[(world.port % 1000) / 100]" timezoneOffset = text2num(time2text(0,"hh")) * 36000 @@ -128,7 +123,7 @@ if(input["key"] != global.comms_key) return "Bad Key" else -#define CHAT_PULLR 64 //for some reason this has to be here, not sure why. Look in preferences.dm for the "proper" definition. +#define CHAT_PULLR 64 //defined in preferences.dm, but not available here at compilation time for(var/client/C in clients) if(C.prefs && (C.prefs.chat_toggles & CHAT_PULLR)) C << "PR: [input["announce"]]" @@ -156,7 +151,6 @@ #ifdef dellogging var/log = file("data/logs/del.log") log << time2text(world.realtime) - //mergeSort(del_counter, /proc/cmp_descending_associative) //still testing the sorting procs. Use notepad++ to sort the resultant logfile for now. for(var/index in del_counter) var/count = del_counter[index] if(count > 10) @@ -170,7 +164,6 @@ for(var/client/C in clients) if(config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite C << link("byond://[config.server]") - // Note: all clients automatically connect to the world after it restarts ..(0) @@ -295,4 +288,4 @@ var/failed_db_connections = 0 else return 1 -#undef FAILED_DB_CONNECTION_CUTOFF \ No newline at end of file +#undef FAILED_DB_CONNECTION_CUTOFF diff --git a/config/admins.txt b/config/admins.txt index f708dcc3df4..789c36cc02d 100644 --- a/config/admins.txt +++ b/config/admins.txt @@ -32,7 +32,7 @@ korphaeron = Game Master nodrak = Game Master carnwennan = Game Master ikarrus = Game Master -cheridan = Game Master +cheridan = Admin Observer giacomand = Game Master rockdtben = Game Master sieve = Game Master @@ -91,4 +91,4 @@ drovidicorv = Game Master Dunc = Game Master MMMiracles = Game Master bear1ake = Game Master -CoreOverload = Game Master \ No newline at end of file +CoreOverload = Game Master diff --git a/config/config.txt b/config/config.txt index c40c7cc783f..6f12881387b 100644 --- a/config/config.txt +++ b/config/config.txt @@ -193,4 +193,7 @@ NOTIFY_NEW_PLAYER_AGE 0 #AGGRESSIVE_CHANGELOG ## Uncomment to have the game log runtimes to the log folder. (Note: this disables normal output in dd/ds, so it should be left off for testing. -#LOG_RUNTIMES \ No newline at end of file +#LOG_RUNTIMES + +##Comment this out if you've used the mass conversion sql proc for notes or want to stop converting notes +AUTOCONVERT_NOTES \ No newline at end of file diff --git a/html/changelog.html b/html/changelog.html index 2161dfe8fef..74b09bfbaa3 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -55,6 +55,57 @@ -->
+

19 August 2015

+

Joan updated:

+
    +
  • Added a new revenant ability; Malfunction. It does bad stuff to machines.
  • +
  • Defile and Overload Lights now briefly stun the revenant.
  • +
  • You can now Harvest a target by clicking on them while next to them.
  • +
  • Harvesting no longer leaves you draining if the target is deleted mid-drain attempt.
  • +
  • Defile no longer emags bots or disables cyborgs, Malfunction does that now.
  • +
+

Kor updated:

+
    +
  • The Ranged and Scout guardian types have been merged, and gained a new surveillance snare ability.
  • +
+

SconesC updated:

+
    +
  • Added Military Belts to traitor uplinks.
  • +
+

bgobandit updated:

+
    +
  • CentComm now offers its cargo department toys, as well as detective gear so their boss can figure out which tech wasted all the points on them.
  • +
+

phil235 updated:

+
    +
  • You can now partially protect yourself from blob attack effects by wearing impermeable clothes like hardsuits, medical clothes, masks, etc. Max protection effect is capped at 50%.
  • +
  • Splashing someone with chemicals no longer injects those chemicals in their body.
  • +
  • Fixes splashing acid on items or floor with items not having any effect.
  • +
+ +

18 August 2015

+

CoreOverload updated:

+
    +
  • Added a new low-tech eye cyberimplant in RnD - welding shield implant.
  • +
  • Implanter and empty implant case added to protolathe.
  • +
  • You can sell tech disks and maxed reliability design disks in cargo for supply points.
  • +
  • DA menu shows current research levels.
  • +
  • You can print cyberimplants in updated mech fab.
  • +
+

Supermichael777 updated:

+
    +
  • Added an ooc hotkey for borgs = O. They simply didn't have one and it was a consistency issue
  • +
  • Also added Ctrl+O as an any mode keycombo so you dont have to backspace and type ooc. Added to hotkey mode to remain consistent with all other Ctrl combos
  • +
+

bustygoku updated:

+
    +
  • Most backpacks now have 21 or more slots, but are still weight restricted. What this means is that you can have a lot of tiny weight items, but only 7 medium items just like before.
  • +
+

phil235 updated:

+
    +
  • Janicart rider no longer slip on wet floor or bananas. Moving on a floor tile with lube while buckled (chair, roller bed, etc) will make you fall off.
  • +
+

16 August 2015

Joan updated:

    diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 935d513282d..eac761cfbc9 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -1601,3 +1601,48 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. MMMiracles: - tweak: Revamps bioterror darts into a less-lethal, syringe form. Removed the coniine and spore toxins to keep it solely for quiet take-downs. +2015-08-18: + CoreOverload: + - rscadd: Added a new low-tech eye cyberimplant in RnD - welding shield implant. + - rscadd: Implanter and empty implant case added to protolathe. + - rscadd: You can sell tech disks and maxed reliability design disks in cargo for + supply points. + - tweak: DA menu shows current research levels. + - tweak: You can print cyberimplants in updated mech fab. + Supermichael777: + - bugfix: Added an ooc hotkey for borgs = O. They simply didn't have one and it + was a consistency issue + - rscadd: Also added Ctrl+O as an any mode keycombo so you dont have to backspace + and type ooc. Added to hotkey mode to remain consistent with all other Ctrl + combos + bustygoku: + - tweak: Most backpacks now have 21 or more slots, but are still weight restricted. + What this means is that you can have a lot of tiny weight items, but only 7 + medium items just like before. + phil235: + - tweak: Janicart rider no longer slip on wet floor or bananas. Moving on a floor + tile with lube while buckled (chair, roller bed, etc) will make you fall off. +2015-08-19: + Joan: + - rscadd: Added a new revenant ability; Malfunction. It does bad stuff to machines. + - tweak: Defile and Overload Lights now briefly stun the revenant. + - tweak: You can now Harvest a target by clicking on them while next to them. + - bugfix: Harvesting no longer leaves you draining if the target is deleted mid-drain + attempt. + - rscdel: Defile no longer emags bots or disables cyborgs, Malfunction does that + now. + Kor: + - rscadd: The Ranged and Scout guardian types have been merged, and gained a new + surveillance snare ability. + SconesC: + - rscadd: Added Military Belts to traitor uplinks. + bgobandit: + - rscadd: CentComm now offers its cargo department toys, as well as detective gear + so their boss can figure out which tech wasted all the points on them. + phil235: + - rscadd: You can now partially protect yourself from blob attack effects by wearing + impermeable clothes like hardsuits, medical clothes, masks, etc. Max protection + effect is capped at 50%. + - rscdel: Splashing someone with chemicals no longer injects those chemicals in + their body. + - bugfix: Fixes splashing acid on items or floor with items not having any effect. diff --git a/html/create_object.html b/html/create_object.html index f4e0aa8644c..ac47cc7769b 100644 --- a/html/create_object.html +++ b/html/create_object.html @@ -39,7 +39,7 @@ Where:

    @@ -54,7 +54,6 @@ var objects = object_paths == null ? new Array() : object_paths.split(";"); document.spawner.filter.focus(); - populateList(objects); function populateList(from_list) { @@ -72,11 +71,6 @@ function updateSearch() { - if (old_search == document.spawner.filter.value) - { - return; - } - old_search = document.spawner.filter.value; diff --git a/icons/mob/animal.dmi b/icons/mob/animal.dmi index e33396b7049..eefdb1ad455 100644 Binary files a/icons/mob/animal.dmi and b/icons/mob/animal.dmi differ diff --git a/icons/mob/human.dmi b/icons/mob/human.dmi index 2156fd46e0a..cb72485b1bc 100644 Binary files a/icons/mob/human.dmi and b/icons/mob/human.dmi differ diff --git a/icons/obj/mining.dmi b/icons/obj/mining.dmi index c35457d7a25..0439da5683c 100644 Binary files a/icons/obj/mining.dmi and b/icons/obj/mining.dmi differ diff --git a/icons/obj/smooth_structures/reinforced_table.dmi b/icons/obj/smooth_structures/reinforced_table.dmi index be12e9f5fb5..85de93594f9 100644 Binary files a/icons/obj/smooth_structures/reinforced_table.dmi and b/icons/obj/smooth_structures/reinforced_table.dmi differ diff --git a/icons/obj/smooth_structures/table.dmi b/icons/obj/smooth_structures/table.dmi index 3037760db99..ffd88a84fc7 100644 Binary files a/icons/obj/smooth_structures/table.dmi and b/icons/obj/smooth_structures/table.dmi differ diff --git a/interface/interface.dm b/interface/interface.dm index a97aa48e385..578e0f084fd 100644 --- a/interface/interface.dm +++ b/interface/interface.dm @@ -112,6 +112,7 @@ Any-Mode: (hotkey doesn't need to be on) \tCtrl+e = equip \tCtrl+r = throw \tCtrl+b = resist +\tCtrl+O = OOC \tCtrl+x = swap-hand \tCtrl+z = activate held object (or Ctrl+y) \tCtrl+f = cycle-intents-left @@ -141,6 +142,7 @@ Hotkey-Mode: (hotkey-mode must be on) \tw = up \tq = unequip active module \tt = say +\to = OOC \tx = cycle active modules \tb = resist \tz = activate held object (or y) @@ -161,6 +163,7 @@ Any-Mode: (hotkey doesn't need to be on) \tCtrl+q = unequip active module \tCtrl+x = cycle active modules \tCtrl+b = resist +\tCtrl+o = OOC \tCtrl+z = activate held object (or Ctrl+y) \tCtrl+f = cycle-intents-left \tCtrl+g = cycle-intents-right diff --git a/interface/skin.dmf b/interface/skin.dmf index 7db57837c75..ef5ae3f9ebf 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -107,6 +107,14 @@ macro "borghotkeymode" name = "CTRL+B" command = "resist" is-disabled = false + elem + name = "O" + command = "ooc" + is-disabled = false + elem + name = "CTRL+O" + command = "ooc" + is-disabled = false elem name = "D+REP" command = ".east" @@ -373,6 +381,10 @@ macro "macro" name = "F5" command = "Aghost" is-disabled = false + elem + name = "CTRL+O" + command = "ooc" + is-disabled = false elem name = "F6" command = "Player-Panel" @@ -543,6 +555,10 @@ macro "hotkeymode" name = "O" command = "ooc" is-disabled = false + elem + name = "CTRL+O" + command = "ooc" + is-disabled = false elem name = "Q" command = ".northwest" @@ -725,6 +741,10 @@ macro "borgmacro" name = "CTRL+B" command = "resist" is-disabled = false + elem + name = "CTRL+O" + command = "ooc" + is-disabled = false elem name = "CTRL+D+REP" command = ".east" diff --git a/tgstation.dme b/tgstation.dme index 3842999e534..0f73ac1adc9 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -156,7 +156,6 @@ #include "code\controllers\subsystem\shuttles\supply.dm" #include "code\datums\ai_laws.dm" #include "code\datums\browser.dm" -#include "code\datums\computerfiles.dm" #include "code\datums\datacore.dm" #include "code\datums\datumvars.dm" #include "code\datums\debug.dm" @@ -822,9 +821,9 @@ #include "code\modules\admin\IsBanned.dm" #include "code\modules\admin\NewBan.dm" #include "code\modules\admin\newbanjob.dm" -#include "code\modules\admin\player_notes.dm" #include "code\modules\admin\player_panel.dm" #include "code\modules\admin\secrets.dm" +#include "code\modules\admin\sql_notes.dm" #include "code\modules\admin\topic.dm" #include "code\modules\admin\DB ban\functions.dm" #include "code\modules\admin\permissionverbs\permissionedit.dm"