diff --git a/baystation12.dme b/baystation12.dme index 554cbd84357..50e8f15a2cb 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -168,6 +168,7 @@ #include "code\datums\spells\turf_teleport.dm" #include "code\datums\spells\wizard.dm" #include "code\defines\obj.dm" +#include "code\defines\vox_sounds.dm" #include "code\defines\obj\hydro.dm" #include "code\defines\obj\weapon.dm" #include "code\defines\procs\AStar.dm" @@ -614,6 +615,7 @@ #include "code\game\objects\structures\musician.dm" #include "code\game\objects\structures\noticeboard.dm" #include "code\game\objects\structures\safe.dm" +#include "code\game\objects\structures\segway.dm" #include "code\game\objects\structures\signs.dm" #include "code\game\objects\structures\tables_racks.dm" #include "code\game\objects\structures\tank_dispenser.dm" @@ -862,6 +864,9 @@ #include "code\modules\mining\money_bag.dm" #include "code\modules\mining\ores_coins.dm" #include "code\modules\mining\satchel_ore_boxdm.dm" +#include "code\modules\mining\laborcamp\laborminerals.dm" +#include "code\modules\mining\laborcamp\laborshuttle.dm" +#include "code\modules\mining\laborcamp\laborstacker.dm" #include "code\modules\mob\death.dm" #include "code\modules\mob\emote.dm" #include "code\modules\mob\inventory.dm" @@ -966,7 +971,6 @@ #include "code\modules\mob\living\carbon\monkey\monkey.dm" #include "code\modules\mob\living\carbon\monkey\powers.dm" #include "code\modules\mob\living\carbon\monkey\update_icons.dm" -#include "code\modules\mob\living\carbon\zombie\zombie.dm" #include "code\modules\mob\living\silicon\death.dm" #include "code\modules\mob\living\silicon\login.dm" #include "code\modules\mob\living\silicon\say.dm" @@ -1114,6 +1118,7 @@ #include "code\modules\projectiles\targeting.dm" #include "code\modules\projectiles\ammunition\boxes.dm" #include "code\modules\projectiles\ammunition\bullets.dm" +#include "code\modules\projectiles\ammunition\magazines.dm" #include "code\modules\projectiles\guns\energy.dm" #include "code\modules\projectiles\guns\projectile.dm" #include "code\modules\projectiles\guns\energy\laser.dm" @@ -1224,22 +1229,18 @@ #include "code\modules\research\xenoarchaeology\finds\finds_fossils.dm" #include "code\modules\research\xenoarchaeology\finds\finds_misc.dm" #include "code\modules\research\xenoarchaeology\finds\finds_talkingitem.dm" -#include "code\modules\research\xenoarchaeology\machinery\analysis_accelerator.dm" -#include "code\modules\research\xenoarchaeology\machinery\analysis_base.dm" -#include "code\modules\research\xenoarchaeology\machinery\analysis_fourier_transform.dm" -#include "code\modules\research\xenoarchaeology\machinery\analysis_gas_chromatography.dm" -#include "code\modules\research\xenoarchaeology\machinery\analysis_hyperspectral.dm" -#include "code\modules\research\xenoarchaeology\machinery\analysis_ion_mobility.dm" -#include "code\modules\research\xenoarchaeology\machinery\analysis_isotope_ratio.dm" #include "code\modules\research\xenoarchaeology\machinery\artifact_analyser.dm" #include "code\modules\research\xenoarchaeology\machinery\artifact_harvester.dm" #include "code\modules\research\xenoarchaeology\machinery\artifact_scanner.dm" +#include "code\modules\research\xenoarchaeology\machinery\coolant.dm" +#include "code\modules\research\xenoarchaeology\machinery\geosample_scanner.dm" #include "code\modules\research\xenoarchaeology\tools\ano_device_battery.dm" #include "code\modules\research\xenoarchaeology\tools\anomaly_suit.dm" #include "code\modules\research\xenoarchaeology\tools\bunsen_burner.dm" #include "code\modules\research\xenoarchaeology\tools\gearbelt.dm" #include "code\modules\research\xenoarchaeology\tools\suspension_generator.dm" #include "code\modules\research\xenoarchaeology\tools\tools.dm" +#include "code\modules\research\xenoarchaeology\tools\tools_anoscanner.dm" #include "code\modules\research\xenoarchaeology\tools\tools_coresampler.dm" #include "code\modules\research\xenoarchaeology\tools\tools_depthscanner.dm" #include "code\modules\research\xenoarchaeology\tools\tools_locater.dm" @@ -1274,6 +1275,7 @@ #include "code\modules\surgery\eye.dm" #include "code\modules\surgery\face.dm" #include "code\modules\surgery\generic.dm" +#include "code\modules\surgery\headreattach.dm" #include "code\modules\surgery\implant.dm" #include "code\modules\surgery\other.dm" #include "code\modules\surgery\ribcage.dm" @@ -1333,6 +1335,9 @@ #include "code\WorkInProgress\Cael_Aislinn\ShieldGen\shield_capacitor.dm" #include "code\WorkInProgress\Cael_Aislinn\ShieldGen\shield_gen.dm" #include "code\WorkInProgress\Cael_Aislinn\ShieldGen\shield_gen_external.dm" +#include "code\WorkInProgress\Cael_Aislinn\Supermatter\Laser2.dm" +#include "code\WorkInProgress\Cael_Aislinn\Supermatter\LaserComputer.dm" +#include "code\WorkInProgress\Cael_Aislinn\Supermatter\ZeroPointLaser.dm" #include "code\WorkInProgress\Chinsky\ashtray.dm" #include "code\WorkInProgress\Cib\MedicalSideEffects.dm" #include "code\WorkInProgress\kilakk\fax.dm" @@ -1341,6 +1346,7 @@ #include "code\WorkInProgress\Ported\policetape.dm" #include "code\WorkInProgress\SkyMarshal\officer_stuff.dm" #include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm" +#include "code\WorkInProgress\Yinadele\Supermatter.dm" #include "code\WorkInProgress\ZomgPonies\karma.dm" #include "code\WorkInProgress\ZomgPonies\clothing\civilian.dm" #include "code\WorkInProgress\ZomgPonies\mobs\pony.dm" diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm index 8ae7ec0023b..9a98b31d75a 100644 --- a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm +++ b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm @@ -161,9 +161,9 @@ var/obj/structure/closet/crate/secure/weapon/C = new(src.loc) var/new_type = pick( 200; /obj/item/weapon/hatchet, \ - /obj/item/weapon/gun/projectile/pistol, \ - /obj/item/weapon/gun/projectile/deagle, \ - /obj/item/weapon/gun/projectile/russian, \ + /obj/item/weapon/gun/projectile/automatic/pistol, \ + /obj/item/weapon/gun/projectile/automatic/deagle, \ + /obj/item/weapon/gun/projectile/revolver/russian, \ ) new new_type(C) if("spacesuit") diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/fusion_reactions.dm b/code/WorkInProgress/Cael_Aislinn/Rust/fusion_reactions.dm index c083cad713a..8293e060f41 100644 --- a/code/WorkInProgress/Cael_Aislinn/Rust/fusion_reactions.dm +++ b/code/WorkInProgress/Cael_Aislinn/Rust/fusion_reactions.dm @@ -145,14 +145,14 @@ datum/fusion_reaction/pergium_tritium energy_production = 0 radiation = 5 -datum/fusion_reaction/pergium_deuterium +datum/fusion_reaction/pergium_obdurium primary_reactant = "Pergium" secondary_reactant = "Obdurium" energy_consumption = 5 energy_production = 0 radiation = 5 -datum/fusion_reaction/pergium_tritium +datum/fusion_reaction/pergium_solonium primary_reactant = "Pergium" secondary_reactant = "Solonium" energy_consumption = 5 diff --git a/code/WorkInProgress/Cael_Aislinn/Supermatter/Laser2.dm b/code/WorkInProgress/Cael_Aislinn/Supermatter/Laser2.dm index 38032c459ca..4a7779c3652 100644 --- a/code/WorkInProgress/Cael_Aislinn/Supermatter/Laser2.dm +++ b/code/WorkInProgress/Cael_Aislinn/Supermatter/Laser2.dm @@ -111,7 +111,7 @@ src.hit() return -/obj/beam/e_beam/HasEntered(atom/movable/AM as mob|obj) +/obj/beam/e_beam/Crossed(atom/movable/AM as mob|obj) if (istype(AM, /obj/beam)) return spawn( 0 ) diff --git a/code/WorkInProgress/Yinadele/Supermatter.dm b/code/WorkInProgress/Yinadele/Supermatter.dm new file mode 100644 index 00000000000..b9af01b938c --- /dev/null +++ b/code/WorkInProgress/Yinadele/Supermatter.dm @@ -0,0 +1,257 @@ + +#define NITROGEN_RETARDATION_FACTOR 4 //Higher == N2 slows reaction more +#define THERMAL_RELEASE_MODIFIER 10 //Higher == less heat released during reaction +#define PLASMA_RELEASE_MODIFIER 1500 //Higher == less plasma released by reaction +#define OXYGEN_RELEASE_MODIFIER 750 //Higher == less oxygen released at high temperature/power +#define REACTION_POWER_MODIFIER 1.1 //Higher == more overall power + + +//These would be what you would get at point blank, decreases with distance +#define DETONATION_RADS 200 +#define DETONATION_HALLUCINATION 600 + + +#define WARNING_DELAY 60 //45 seconds between warnings. + +/obj/machinery/power/supermatter + name = "Supermatter" + desc = "A strangely translucent and iridescent crystal. \red You get headaches just from looking at it." + icon = 'icons/obj/engine.dmi' + icon_state = "darkmatter" + density = 1 + anchored = 0 + + var/gasefficency = 0.25 + + var/base_icon_state = "darkmatter" + + var/damage = 0 + var/damage_archived = 0 + var/safe_alert = "Crystaline hyperstructure returning to safe operating levels." + var/warning_point = 100 + var/warning_alert = "Danger! Crystal hyperstructure instability!" + var/emergency_point = 700 + var/emergency_alert = "CRYSTAL DELAMINATION IMMINENT." + var/explosion_point = 1000 + + var/emergency_issued = 0 + + var/explosion_power = 8 + + var/lastwarning = 0 // Time in 1/10th of seconds since the last sent warning + + var/power = 0 + + //Temporary values so that we can optimize this + //How much the bullets damage should be multiplied by when it is added to the internal variables + var/config_bullet_energy = 2 + //How much of the power is left after processing is finished? +// var/config_power_reduction_per_tick = 0.5 + //How much hallucination should it produce per unit of power? + var/config_hallucination_power = 0.1 + + var/obj/item/device/radio/radio + + shard //Small subtype, less efficient and more sensitive, but less boom. + name = "Supermatter Shard" + desc = "A strangely translucent and iridescent crystal that looks like it used to be part of a larger structure. \red You get headaches just from looking at it." + icon_state = "darkmatter_shard" + base_icon_state = "darkmatter_shard" + + warning_point = 50 + emergency_point = 500 + explosion_point = 900 + + gasefficency = 0.125 + + explosion_power = 3 //3,6,9,12? Or is that too small? + + +/obj/machinery/power/supermatter/New() + . = ..() + radio = new (src) + + +/obj/machinery/power/supermatter/Del() + del radio + . = ..() + +/obj/machinery/power/supermatter/proc/explode() + explosion(get_turf(src), explosion_power, explosion_power * 2, explosion_power * 3, explosion_power * 4, 1) + del src + return + +/obj/machinery/power/supermatter/process() + + var/turf/L = loc + + if(!istype(L)) //If we are not on a turf, uh oh. + del src + + //Ok, get the air from the turf + var/datum/gas_mixture/env = L.return_air() + + //Remove gas from surrounding area + var/datum/gas_mixture/removed = env.remove(gasefficency * env.total_moles) + + if(!removed || !removed.total_moles) + damage += max((power-1600)/10, 0) + power = min(power, 1600) + return 1 + + if (!removed) + return 1 + + damage_archived = damage + damage = max( damage + ( (removed.temperature - 800) / 150 ) , 0 ) + + if(damage > warning_point) // while the core is still damaged and it's still worth noting its status + if((world.timeofday - lastwarning) / 10 >= WARNING_DELAY) + + if(damage > emergency_point) + radio.autosay(emergency_alert, "Supermatter Monitor") + lastwarning = world.timeofday + + else if(damage >= damage_archived) // The damage is still going up + radio.autosay(warning_alert, "Supermatter Monitor") + lastwarning = world.timeofday - 150 + + else // Phew, we're safe + radio.autosay(safe_alert, "Supermatter Monitor") + lastwarning = world.timeofday + + if(damage > explosion_point) + for(var/mob/living/mob in living_mob_list) + if(istype(mob, /mob/living/carbon/human)) + //Hilariously enough, running into a closet should make you get hit the hardest. + mob:hallucination += max(50, min(300, DETONATION_HALLUCINATION * sqrt(1 / (get_dist(mob, src) + 1)) ) ) + var/rads = DETONATION_RADS * sqrt( 1 / (get_dist(mob, src) + 1) ) + mob.apply_effect(rads, IRRADIATE) + + explode() + + //Ok, 100% oxygen atmosphere = best reaction + //Maxes out at 100% oxygen pressure + var/oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / MOLES_CELLSTANDARD, 1), 0) + + var/temp_factor = 100 + + if(oxygen > 0.8) + // with a perfect gas mix, make the power less based on heat + icon_state = "[base_icon_state]_glow" + else + // in normal mode, base the produced energy around the heat + temp_factor = 60 + icon_state = base_icon_state + + power = max( (removed.temperature * temp_factor / T0C) * oxygen + power, 0) //Total laser power plus an overload + + //We've generated power, now let's transfer it to the collectors for storing/usage + transfer_energy() + + var/device_energy = power * REACTION_POWER_MODIFIER + + //To figure out how much temperature to add each tick, consider that at one atmosphere's worth + //of pure oxygen, with all four lasers firing at standard energy and no N2 present, at room temperature + //that the device energy is around 2140. At that stage, we don't want too much heat to be put out + //Since the core is effectively "cold" + + //Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock + //is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall. + removed.temperature += (device_energy / THERMAL_RELEASE_MODIFIER) + + removed.temperature = max(0, min(removed.temperature, 2500)) + + //Calculate how much gas to release + removed.toxins += max(device_energy / PLASMA_RELEASE_MODIFIER, 0) + + removed.oxygen += max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0) + + removed.update_values() + + env.merge(removed) + + for(var/mob/living/carbon/human/l in view(src, round(power ** 0.25))) // you have to be seeing the core to get hallucinations + if(!istype(l.glasses, /obj/item/clothing/glasses/meson)) + l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / get_dist(l, src) ) ) ) + + for(var/mob/living/l in range(src, round((power / 100) ** 0.25))) + var/rads = (power / 10) * sqrt( 1 / get_dist(l, src) ) + l.apply_effect(rads, IRRADIATE) + + power -= (power/500)**3 + + return 1 + + +/obj/machinery/power/supermatter/bullet_act(var/obj/item/projectile/Proj) + if(Proj.flag != "bullet") + power += Proj.damage * config_bullet_energy + else + damage += Proj.damage * config_bullet_energy + return 0 + + +/obj/machinery/power/supermatter/attack_paw(mob/user as mob) + return attack_hand(user) + + +/obj/machinery/power/supermatter/attack_robot(mob/user as mob) + return attack_hand(user) + + +/obj/machinery/power/supermatter/attack_hand(mob/user as mob) + user.visible_message("\The [user] reaches out and touches \the [src] inducing a resonance... \his body starts to glow and catch flame before flashing into ash.",\ + "You reach out and touch \the [src], everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"",\ + "You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.") + + Consume(user) + +/obj/machinery/power/supermatter/proc/transfer_energy() + for(var/obj/machinery/power/rad_collector/R in rad_collectors) + if(get_dist(R, src) <= 15) // Better than using orange() every process + R.receive_pulse(power) + return + +/obj/machinery/power/supermatter/attackby(obj/item/weapon/W as obj, mob/living/user as mob) + user.visible_message("\The [user] touches \a [W] to \the [src] as a silence fills the room...",\ + "You touch \the [W] to \the [src] when everything suddenly goes silent.\"\n\The [W] flashes into dust as you flinch away from \the [src].",\ + "Everything suddenly goes silent.") + + user.drop_from_inventory(W) + Consume(W) + + user.apply_effect(150, IRRADIATE) + + +/obj/machinery/power/supermatter/Bumped(atom/AM as mob|obj) + if(istype(AM, /mob/living)) + AM.visible_message("\The [AM] slams into \the [src] inducing a resonance... \his body starts to glow and catch flame before flashing into ash.",\ + "You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\"",\ + "You hear an uneartly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.") + else + AM.visible_message("\The [AM] smacks into \the [src] and rapidly flashes to ash.",\ + "You hear a loud crack as you are washed with a wave of heat.") + + Consume(AM) + + +/obj/machinery/power/supermatter/proc/Consume(var/mob/living/user) + if(istype(user)) + user.dust() + power += 200 + else + del user + + power += 200 + + //Some poor sod got eaten, go ahead and irradiate people nearby. + for(var/mob/living/l in range(10)) + if(l in view()) + l.show_message("As \the [src] slowly stops resonating, you find your skin covered in new radiation burns.", 1,\ + "The unearthly ringing subsides and you notice you have new radiation burns.", 2) + else + l.show_message("You hear an uneartly ringing and notice your skin is covered in fresh radiation burns.", 2) + var/rads = 500 * sqrt( 1 / (get_dist(l, src) + 1) ) + l.apply_effect(rads, IRRADIATE) + diff --git a/code/WorkInProgress/kilakk/fax.dm b/code/WorkInProgress/kilakk/fax.dm index 7ab0440a6bc..76bcc0baa40 100644 --- a/code/WorkInProgress/kilakk/fax.dm +++ b/code/WorkInProgress/kilakk/fax.dm @@ -1,19 +1,35 @@ +var/list/obj/machinery/faxmachine/allfaxes = list() +var/list/alldepartments = list("Central Command") + /obj/machinery/faxmachine name = "fax machine" icon = 'icons/obj/library.dmi' icon_state = "fax" - req_access = list(access_lawyer) + req_one_access = list(access_lawyer, access_heads) anchored = 1 density = 1 use_power = 1 idle_power_usage = 30 active_power_usage = 200 power_channel = EQUIP + var/obj/item/weapon/card/id/scan = null // identification var/authenticated = 0 - var/obj/item/weapon/paper/tofax = null // what we're sending to central + + var/obj/item/weapon/paper/tofax = null // what we're sending var/sendcooldown = 0 // to avoid spamming fax messages + var/department = "Unknown" // our department + + var/dpt = "Central Command" // the department we're sending to + +/obj/machinery/faxmachine/New() + ..() + allfaxes += src + + if( !("[department]" in alldepartments) ) + alldepartments += department + /obj/machinery/faxmachine/process() return 0 @@ -26,7 +42,7 @@ /obj/machinery/faxmachine/attack_hand(mob/user as mob) user.set_machine(src) - var/dat = "Central Command Fax Machine
" + var/dat = "Fax Machine
" var/scan_name if(scan) @@ -54,14 +70,15 @@ else dat += "Send
" - dat += "Currently sending: [tofax.name]" + dat += "Currently sending: [tofax.name]
" + dat += "Sending to: [dpt]
" else if(sendcooldown) - dat += "Please insert paper to send to Central Command via secure connection.

" + dat += "Please insert paper to send via secure connection.

" dat += "Transmitter arrays realigning. Please stand by.
" else - dat += "Please insert paper to send to Central Command via secure connection.

" + dat += "Please insert paper to send via secure connection.

" else dat += "Proper authentication is required to use this device.

" @@ -76,10 +93,18 @@ /obj/machinery/faxmachine/Topic(href, href_list) if(href_list["send"]) if(tofax) - Centcomm_fax(tofax.info, tofax.name, usr) - usr << "Message transmitted." - sendcooldown = 1 - spawn(3000) // three minute cooldown. might mess with this number a bit as time goes on + + if(dpt == "Central Command") + Centcomm_fax(tofax.info, tofax.name, usr) + sendcooldown = 1800 + + else + SendFax(tofax.info, tofax.name, usr, dpt) + sendcooldown = 600 + + usr << "Message transmitted successfully." + + spawn(sendcooldown) // cooldown time sendcooldown = 0 if(href_list["remove"]) @@ -107,6 +132,9 @@ scan = I authenticated = 0 + if(href_list["dept"]) + dpt = input(usr, "Which department?", "Choose a department", "") as null|anything in alldepartments + if(href_list["auth"]) if ( (!( authenticated ) && (scan)) ) if (check_access(scan)) @@ -148,3 +176,20 @@ var/msg = "\blue CENTCOMM FAX: [key_name(Sender, 1)] (PP) (VV) (SM) (JMP) (CA) (RPLY): Receiving '[sentname]' via secure connection ... view message" admins << msg + +proc/SendFax(var/sent, var/sentname, var/mob/Sender, var/dpt) + + for(var/obj/machinery/faxmachine/F in allfaxes) + if( F.department == dpt ) + if(! (F.stat & (BROKEN|NOPOWER) ) ) + + flick("faxreceive", F) + + // give the sprite some time to flick + spawn(20) + var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( F.loc ) + P.name = "[sentname]" + P.info = "[sent]" + P.update_icon() + + playsound(F.loc, "sound/items/polaroid1.ogg", 50, 1) diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm index fc822a38542..dec05c04834 100644 --- a/code/_onclick/hud/_defines.dm +++ b/code/_onclick/hud/_defines.dm @@ -20,6 +20,9 @@ #define ui_action_slot4 "4:12,14:26" #define ui_action_slot5 "5:14,14:26" +//Middle left indicators +#define ui_alienplasmadisplay "1,6:15" + //Lower left, persistant menu #define ui_inventory "1:6,1:5" diff --git a/code/_onclick/hud/alien.dm b/code/_onclick/hud/alien.dm index 01b10585273..180a9dd324e 100644 --- a/code/_onclick/hud/alien.dm +++ b/code/_onclick/hud/alien.dm @@ -216,6 +216,12 @@ mymob.pullin.name = "pull" mymob.pullin.screen_loc = ui_pull_resist + alien_plasma_display = new /obj/screen() + alien_plasma_display.icon = 'icons/mob/screen_gen.dmi' + alien_plasma_display.icon_state = "power_display" + alien_plasma_display.name = "plasma stored" + alien_plasma_display.screen_loc = ui_alienplasmadisplay + mymob.blind = new /obj/screen() mymob.blind.icon = 'icons/mob/screen1_full.dmi' mymob.blind.icon_state = "blackimageoverlay" @@ -237,5 +243,5 @@ mymob.client.screen = null - mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach ) + mymob.client.screen += list( mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.toxin, mymob.fire, mymob.healths, mymob.pullin, alien_plasma_display, mymob.blind, mymob.flash) //, mymob.hands, mymob.rest, mymob.sleep, mymob.mach ) mymob.client.screen += src.adding + src.other \ No newline at end of file diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 618858d5438..6e542450d61 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -96,6 +96,7 @@ var/datum/global_hud/global_hud = new() var/obj/screen/lingchemdisplay var/obj/screen/blobpwrdisplay var/obj/screen/blobhealthdisplay + var/obj/screen/alien_plasma_display var/obj/screen/r_hand_hud_object var/obj/screen/l_hand_hud_object var/obj/screen/action_intent diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index b3b03e6ac26..704fe8870af 100755 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -456,6 +456,15 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee containername = "fuel tank crate" group = "Engineering" +/datum/supply_packs/coolanttank + name = "Coolant tank crate" + contains = list(/obj/structure/reagent_dispensers/coolanttank) + cost = 16 + containertype = /obj/structure/largecrate + containername = "coolant tank crate" + group = "Medical / Science" + + /datum/supply_packs/solar name = "Solar Pack crate" contains = list(/obj/item/solar_assembly, diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index 209faa93404..ceed04ceba5 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -179,20 +179,20 @@ var/list/uplink_items = list() /datum/uplink_item/dangerous/revolver name = "Fully Loaded Revolver" desc = "A traditional handgun which fires .357 rounds. Has 7 chambers. Can down an unarmoured target with two shots." - item = /obj/item/weapon/gun/projectile + item = /obj/item/weapon/gun/projectile/revolver cost = 6 /datum/uplink_item/dangerous/ammo name = "Ammo-357" desc = "Seven additional rounds for the revolver. Reports indicate the presence of machinery aboard Nanotrasen space stations suitable for producing extra .357 cartridges." - item = /obj/item/ammo_magazine/a357 + item = /obj/item/ammo_box/a357 cost = 2 /datum/uplink_item/dangerous/crossbow name = "Energy Crossbow" desc = "A miniature energy crossbow that is small enough both to fit into a pocket and to slip into a backpack unnoticed by observers. Fires bolts tipped with toxin, a poisonous substance that is the product of a living organism. Stuns enemies for a short period of time. Recharges automatically." item = /obj/item/weapon/gun/energy/crossbow - cost = 5 + cost = 7 /datum/uplink_item/dangerous/sword name = "Energy Sword" @@ -200,6 +200,12 @@ var/list/uplink_items = list() item = /obj/item/weapon/melee/energy/sword cost = 4 +/datum/uplink_item/dangerous/manhacks + name = "Manhack Delivery Grenade" + desc = "The manhack grenade is a highly specialized grenades that, once thrown, will deploy a swarm of Viscerators to attack any nearby crewmembers. WARNING: Viscerator progrmaming does not include safeties. They may turn on you!" + item = /obj/item/weapon/grenade/spawnergrenade/manhacks + cost = 7 + /datum/uplink_item/dangerous/emp name = "5 EMP Grenades" desc = "A box that contains 5 EMP grenades. Useful to disrupt communication and silicon lifeforms." diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index a6bb9c537f2..04ac6729587 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -244,7 +244,7 @@ icon_state = "beartrap[armed]" user << "[src] is now [armed ? "armed" : "disarmed"]" -/obj/item/weapon/legcuffs/beartrap/HasEntered(AM as mob|obj) +/obj/item/weapon/legcuffs/beartrap/Crossed(AM as mob|obj) if(armed) if(ishuman(AM)) if(isturf(src.loc)) diff --git a/code/defines/vox_sounds.dm b/code/defines/vox_sounds.dm new file mode 100644 index 00000000000..6186bb9a94e --- /dev/null +++ b/code/defines/vox_sounds.dm @@ -0,0 +1,722 @@ +// List is required to compile the resources into the game when it loads. +// Dynamically loading it has bad results with sounds overtaking each other, even with the wait variable. + +var/list/vox_sounds = list("," = 'sound/vox/,.wav', +"." = 'sound/vox/..wav', +"a" = 'sound/vox_fem/a.ogg', +"abortions" = 'sound/vox_fem/abortions.ogg', +"accelerating" = 'sound/vox_fem/accelerating.ogg', +"accelerator" = 'sound/vox_fem/accelerator.ogg', +"accepted" = 'sound/vox_fem/accepted.ogg', +"access" = 'sound/vox_fem/access.ogg', +"acknowledge" = 'sound/vox_fem/acknowledge.ogg', +"acknowledged" = 'sound/vox_fem/acknowledged.ogg', +"acquired" = 'sound/vox_fem/acquired.ogg', +"acquisition" = 'sound/vox_fem/acquisition.ogg', +"across" = 'sound/vox_fem/across.ogg', +"activate" = 'sound/vox_fem/activate.ogg', +"activated" = 'sound/vox_fem/activated.ogg', +"activity" = 'sound/vox_fem/activity.ogg', +"adios" = 'sound/vox_fem/adios.ogg', +"administration" = 'sound/vox_fem/administration.ogg', +"advanced" = 'sound/vox_fem/advanced.ogg', +"aft" = 'sound/vox_fem/aft.ogg', +"after" = 'sound/vox_fem/after.ogg', +"agent" = 'sound/vox_fem/agent.ogg', +"ai" = 'sound/vox_fem/ai.ogg', +"alarm" = 'sound/vox_fem/alarm.ogg', +"alert" = 'sound/vox_fem/alert.ogg', +"alien" = 'sound/vox_fem/alien.ogg', +"aligned" = 'sound/vox_fem/aligned.ogg', +"all" = 'sound/vox_fem/all.ogg', +"alpha" = 'sound/vox_fem/alpha.ogg', +"am" = 'sound/vox_fem/am.ogg', +"amigo" = 'sound/vox_fem/amigo.ogg', +"ammunition" = 'sound/vox_fem/ammunition.ogg', +"an" = 'sound/vox_fem/an.ogg', +"and" = 'sound/vox_fem/and.ogg', +"announcement" = 'sound/vox_fem/announcement.ogg', +"anomalous" = 'sound/vox_fem/anomalous.ogg', +"antenna" = 'sound/vox_fem/antenna.ogg', +"any" = 'sound/vox_fem/any.ogg', +"apprehend" = 'sound/vox_fem/apprehend.ogg', +"approach" = 'sound/vox_fem/approach.ogg', +"are" = 'sound/vox_fem/are.ogg', +"area" = 'sound/vox_fem/area.ogg', +"arm" = 'sound/vox_fem/arm.ogg', +"armed" = 'sound/vox_fem/armed.ogg', +"armor" = 'sound/vox_fem/armor.ogg', +"armory" = 'sound/vox_fem/armory.ogg', +"array" = 'sound/vox_fem/array.ogg', +"arrest" = 'sound/vox_fem/arrest.ogg', +"asimov" = 'sound/vox_fem/asimov.ogg', +"ass" = 'sound/vox_fem/ass.ogg', +"asshole" = 'sound/vox_fem/asshole.ogg', +"assholes" = 'sound/vox_fem/assholes.ogg', +"at" = 'sound/vox_fem/at.ogg', +"atomic" = 'sound/vox_fem/atomic.ogg', +"attention" = 'sound/vox_fem/attention.ogg', +"authorize" = 'sound/vox_fem/authorize.ogg', +"authorized" = 'sound/vox_fem/authorized.ogg', +"automatic" = 'sound/vox_fem/automatic.ogg', +"away" = 'sound/vox_fem/away.ogg', +"b" = 'sound/vox_fem/b.ogg', +"back" = 'sound/vox_fem/back.ogg', +"backman" = 'sound/vox_fem/backman.ogg', +"bad" = 'sound/vox_fem/bad.ogg', +"bag" = 'sound/vox_fem/bag.ogg', +"bailey" = 'sound/vox_fem/bailey.ogg', +"barracks" = 'sound/vox_fem/barracks.ogg', +"base" = 'sound/vox_fem/base.ogg', +"bay" = 'sound/vox_fem/bay.ogg', +"be" = 'sound/vox_fem/be.ogg', +"been" = 'sound/vox_fem/been.ogg', +"before" = 'sound/vox_fem/before.ogg', +"beyond" = 'sound/vox_fem/beyond.ogg', +"biohazard" = 'sound/vox_fem/biohazard.ogg', +"biological" = 'sound/vox_fem/biological.ogg', +"birdwell" = 'sound/vox_fem/birdwell.ogg', +"bitch" = 'sound/vox_fem/bitch.ogg', +"bitches" = 'sound/vox_fem/bitches.ogg', +"bizwarn" = 'sound/vox/bizwarn.wav', +"black" = 'sound/vox_fem/black.ogg', +"blast" = 'sound/vox_fem/blast.ogg', +"blocked" = 'sound/vox_fem/blocked.ogg', +"bloop" = 'sound/vox/bloop.wav', +"blue" = 'sound/vox_fem/blue.ogg', +"bottom" = 'sound/vox_fem/bottom.ogg', +"bravo" = 'sound/vox_fem/bravo.ogg', +"breach" = 'sound/vox_fem/breach.ogg', +"breached" = 'sound/vox_fem/breached.ogg', +"break" = 'sound/vox_fem/break.ogg', +"bridge" = 'sound/vox_fem/bridge.ogg', +"bust" = 'sound/vox_fem/bust.ogg', +"but" = 'sound/vox_fem/but.ogg', +"button" = 'sound/vox_fem/button.ogg', +"buzwarn" = 'sound/vox/buzwarn.wav', +"bypass" = 'sound/vox_fem/bypass.ogg', +"c" = 'sound/vox_fem/c.ogg', +"cable" = 'sound/vox_fem/cable.ogg', +"call" = 'sound/vox_fem/call.ogg', +"called" = 'sound/vox_fem/called.ogg', +"canal" = 'sound/vox_fem/canal.ogg', +"cap" = 'sound/vox_fem/cap.ogg', +"captain" = 'sound/vox_fem/captain.ogg', +"capture" = 'sound/vox_fem/capture.ogg', +"cargo" = 'sound/vox_fem/cargo.ogg', +"ceiling" = 'sound/vox_fem/ceiling.ogg', +"celsius" = 'sound/vox_fem/celsius.ogg', +"centcomm" = 'sound/vox_fem/centcomm.ogg', +"center" = 'sound/vox_fem/center.ogg', +"centi" = 'sound/vox_fem/centi.ogg', +"central" = 'sound/vox_fem/central.ogg', +"chamber" = 'sound/vox_fem/chamber.ogg', +"changed" = 'sound/vox_fem/changed.ogg', +"charlie" = 'sound/vox_fem/charlie.ogg', +"check" = 'sound/vox_fem/check.ogg', +"checkpoint" = 'sound/vox_fem/checkpoint.ogg', +"chemical" = 'sound/vox_fem/chemical.ogg', +"cleanup" = 'sound/vox_fem/cleanup.ogg', +"clear" = 'sound/vox_fem/clear.ogg', +"clearance" = 'sound/vox_fem/clearance.ogg', +"close" = 'sound/vox_fem/close.ogg', +"clown" = 'sound/vox_fem/clown.ogg', +"code" = 'sound/vox_fem/code.ogg', +"coded" = 'sound/vox_fem/coded.ogg', +"collider" = 'sound/vox_fem/collider.ogg', +"come" = 'sound/vox_fem/come.ogg', +"command" = 'sound/vox_fem/command.ogg', +"communication" = 'sound/vox_fem/communication.ogg', +"complex" = 'sound/vox_fem/complex.ogg', +"computer" = 'sound/vox_fem/computer.ogg', +"condition" = 'sound/vox_fem/condition.ogg', +"connor" = 'sound/vox_fem/connor.ogg', +"containment" = 'sound/vox_fem/containment.ogg', +"contamination" = 'sound/vox_fem/contamination.ogg', +"contraband" = 'sound/vox_fem/contraband.ogg', +"control" = 'sound/vox_fem/control.ogg', +"coolant" = 'sound/vox_fem/coolant.ogg', +"coomer" = 'sound/vox_fem/coomer.ogg', +"core" = 'sound/vox_fem/core.ogg', +"correct" = 'sound/vox_fem/correct.ogg', +"corridor" = 'sound/vox_fem/corridor.ogg', +"coward" = 'sound/vox_fem/coward.ogg', +"cowards" = 'sound/vox_fem/cowards.ogg', +"crew" = 'sound/vox_fem/crew.ogg', +"cross" = 'sound/vox_fem/cross.ogg', +"cryogenic" = 'sound/vox_fem/cryogenic.ogg', +"cunt" = 'sound/vox_fem/cunt.ogg', +"cyborg" = 'sound/vox_fem/cyborg.ogg', +"cyborgs" = 'sound/vox_fem/cyborgs.ogg', +"d" = 'sound/vox_fem/d.ogg', +"dadeda" = 'sound/vox/dadeda.wav', +"damage" = 'sound/vox_fem/damage.ogg', +"damaged" = 'sound/vox_fem/damaged.ogg', +"danger" = 'sound/vox_fem/danger.ogg', +"day" = 'sound/vox_fem/day.ogg', +"deactivated" = 'sound/vox_fem/deactivated.ogg', +"decompression" = 'sound/vox_fem/decompression.ogg', +"decontamination" = 'sound/vox_fem/decontamination.ogg', +"deeoo" = 'sound/vox_fem/deeoo.ogg', +"defense" = 'sound/vox_fem/defense.ogg', +"degrees" = 'sound/vox_fem/degrees.ogg', +"delta" = 'sound/vox_fem/delta.ogg', +"denied" = 'sound/vox_fem/denied.ogg', +"deploy" = 'sound/vox_fem/deploy.ogg', +"deployed" = 'sound/vox_fem/deployed.ogg', +"destroy" = 'sound/vox_fem/destroy.ogg', +"destroyed" = 'sound/vox_fem/destroyed.ogg', +"detain" = 'sound/vox_fem/detain.ogg', +"detected" = 'sound/vox_fem/detected.ogg', +"detonation" = 'sound/vox_fem/detonation.ogg', +"device" = 'sound/vox_fem/device.ogg', +"did" = 'sound/vox_fem/did.ogg', +"die" = 'sound/vox_fem/die.ogg', +"dimensional" = 'sound/vox_fem/dimensional.ogg', +"dirt" = 'sound/vox_fem/dirt.ogg', +"disengaged" = 'sound/vox_fem/disengaged.ogg', +"dish" = 'sound/vox_fem/dish.ogg', +"disposal" = 'sound/vox_fem/disposal.ogg', +"distance" = 'sound/vox_fem/distance.ogg', +"distortion" = 'sound/vox_fem/distortion.ogg', +"do" = 'sound/vox_fem/do.ogg', +"doctor" = 'sound/vox_fem/doctor.ogg', +"doop" = 'sound/vox/doop.wav', +"door" = 'sound/vox_fem/door.ogg', +"down" = 'sound/vox_fem/down.ogg', +"dual" = 'sound/vox_fem/dual.ogg', +"duct" = 'sound/vox_fem/duct.ogg', +"e" = 'sound/vox_fem/e.ogg', +"east" = 'sound/vox_fem/east.ogg', +"echo" = 'sound/vox_fem/echo.ogg', +"ed" = 'sound/vox_fem/ed.ogg', +"effect" = 'sound/vox_fem/effect.ogg', +"egress" = 'sound/vox_fem/egress.ogg', +"eight" = 'sound/vox_fem/eight.ogg', +"eighteen" = 'sound/vox_fem/eighteen.ogg', +"eighty" = 'sound/vox_fem/eighty.ogg', +"electric" = 'sound/vox_fem/electric.ogg', +"electromagnetic" = 'sound/vox_fem/electromagnetic.ogg', +"elevator" = 'sound/vox_fem/elevator.ogg', +"eleven" = 'sound/vox_fem/eleven.ogg', +"eliminate" = 'sound/vox_fem/eliminate.ogg', +"emergency" = 'sound/vox_fem/emergency.ogg', +"energy" = 'sound/vox_fem/energy.ogg', +"engage" = 'sound/vox_fem/engage.ogg', +"engaged" = 'sound/vox_fem/engaged.ogg', +"engine" = 'sound/vox_fem/engine.ogg', +"enter" = 'sound/vox_fem/enter.ogg', +"entry" = 'sound/vox_fem/entry.ogg', +"environment" = 'sound/vox_fem/environment.ogg', +"error" = 'sound/vox_fem/error.ogg', +"escape" = 'sound/vox_fem/escape.ogg', +"evacuate" = 'sound/vox_fem/evacuate.ogg', +"exchange" = 'sound/vox_fem/exchange.ogg', +"exit" = 'sound/vox_fem/exit.ogg', +"expect" = 'sound/vox_fem/expect.ogg', +"experiment" = 'sound/vox_fem/experiment.ogg', +"experimental" = 'sound/vox_fem/experimental.ogg', +"explode" = 'sound/vox_fem/explode.ogg', +"explosion" = 'sound/vox_fem/explosion.ogg', +"exposure" = 'sound/vox_fem/exposure.ogg', +"exterminate" = 'sound/vox_fem/exterminate.ogg', +"extinguish" = 'sound/vox_fem/extinguish.ogg', +"extinguisher" = 'sound/vox_fem/extinguisher.ogg', +"extreme" = 'sound/vox_fem/extreme.ogg', +"f" = 'sound/vox_fem/f.ogg', +"facility" = 'sound/vox_fem/facility.ogg', +"fahrenheit" = 'sound/vox_fem/fahrenheit.ogg', +"failed" = 'sound/vox_fem/failed.ogg', +"failure" = 'sound/vox_fem/failure.ogg', +"farthest" = 'sound/vox_fem/farthest.ogg', +"fast" = 'sound/vox_fem/fast.ogg', +"feet" = 'sound/vox_fem/feet.ogg', +"field" = 'sound/vox_fem/field.ogg', +"fifteen" = 'sound/vox_fem/fifteen.ogg', +"fifth" = 'sound/vox_fem/fifth.ogg', +"fifty" = 'sound/vox_fem/fifty.ogg', +"final" = 'sound/vox_fem/final.ogg', +"fine" = 'sound/vox_fem/fine.ogg', +"fire" = 'sound/vox_fem/fire.ogg', +"first" = 'sound/vox_fem/first.ogg', +"five" = 'sound/vox_fem/five.ogg', +"flooding" = 'sound/vox_fem/flooding.ogg', +"floor" = 'sound/vox_fem/floor.ogg', +"fool" = 'sound/vox_fem/fool.ogg', +"for" = 'sound/vox_fem/for.ogg', +"forbidden" = 'sound/vox_fem/forbidden.ogg', +"force" = 'sound/vox_fem/force.ogg', +"fore" = 'sound/vox_fem/fore.ogg', +"forms" = 'sound/vox_fem/forms.ogg', +"found" = 'sound/vox_fem/found.ogg', +"four" = 'sound/vox_fem/four.ogg', +"fourteen" = 'sound/vox_fem/fourteen.ogg', +"fourth" = 'sound/vox_fem/fourth.ogg', +"fourty" = 'sound/vox_fem/fourty.ogg', +"foxtrot" = 'sound/vox_fem/foxtrot.ogg', +"freeman" = 'sound/vox_fem/freeman.ogg', +"freezer" = 'sound/vox_fem/freezer.ogg', +"from" = 'sound/vox_fem/from.ogg', +"front" = 'sound/vox_fem/front.ogg', +"fuck" = 'sound/vox_fem/fuck.ogg', +"fucking" = 'sound/vox_fem/fucking.ogg', +"fucks" = 'sound/vox_fem/fucks.ogg', +"fuel" = 'sound/vox_fem/fuel.ogg', +"g" = 'sound/vox_fem/g.ogg', +"gas" = 'sound/vox_fem/gas.ogg', +"get" = 'sound/vox_fem/get.ogg', +"glory" = 'sound/vox_fem/glory.ogg', +"go" = 'sound/vox_fem/go.ogg', +"going" = 'sound/vox_fem/going.ogg', +"good" = 'sound/vox_fem/good.ogg', +"goodbye" = 'sound/vox_fem/goodbye.ogg', +"gordon" = 'sound/vox_fem/gordon.ogg', +"got" = 'sound/vox_fem/got.ogg', +"government" = 'sound/vox_fem/government.ogg', +"granted" = 'sound/vox_fem/granted.ogg', +"gray" = 'sound/vox_fem/gray.ogg', +"great" = 'sound/vox_fem/great.ogg', +"green" = 'sound/vox_fem/green.ogg', +"grenade" = 'sound/vox_fem/grenade.ogg', +"guard" = 'sound/vox_fem/guard.ogg', +"gulf" = 'sound/vox_fem/gulf.ogg', +"gun" = 'sound/vox_fem/gun.ogg', +"guthrie" = 'sound/vox_fem/guthrie.ogg', +"h" = 'sound/vox_fem/h.ogg', +"hacker" = 'sound/vox_fem/hacker.ogg', +"hackers" = 'sound/vox_fem/hackers.ogg', +"handling" = 'sound/vox_fem/handling.ogg', +"hangar" = 'sound/vox_fem/hangar.ogg', +"harm" = 'sound/vox_fem/harm.ogg', +"has" = 'sound/vox_fem/has.ogg', +"have" = 'sound/vox_fem/have.ogg', +"hazard" = 'sound/vox_fem/hazard.ogg', +"head" = 'sound/vox_fem/head.ogg', +"health" = 'sound/vox_fem/health.ogg', +"heat" = 'sound/vox_fem/heat.ogg', +"helicopter" = 'sound/vox_fem/helicopter.ogg', +"helium" = 'sound/vox_fem/helium.ogg', +"hello" = 'sound/vox_fem/hello.ogg', +"help" = 'sound/vox_fem/help.ogg', +"here" = 'sound/vox_fem/here.ogg', +"hide" = 'sound/vox_fem/hide.ogg', +"high" = 'sound/vox_fem/high.ogg', +"highest" = 'sound/vox_fem/highest.ogg', +"hit" = 'sound/vox_fem/hit.ogg', +"hole" = 'sound/vox_fem/hole.ogg', +"hostile" = 'sound/vox_fem/hostile.ogg', +"hot" = 'sound/vox_fem/hot.ogg', +"hotel" = 'sound/vox_fem/hotel.ogg', +"hour" = 'sound/vox_fem/hour.ogg', +"hours" = 'sound/vox_fem/hours.ogg', +"human" = 'sound/vox_fem/human.ogg', +"hundred" = 'sound/vox_fem/hundred.ogg', +"hunger" = 'sound/vox_fem/hunger.ogg', +"hydro" = 'sound/vox_fem/hydro.ogg', +"hydroponics" = 'sound/vox_fem/hydroponics.ogg', +"i" = 'sound/vox_fem/i.ogg', +"idiot" = 'sound/vox_fem/idiot.ogg', +"illegal" = 'sound/vox_fem/illegal.ogg', +"immediate" = 'sound/vox_fem/immediate.ogg', +"immediately" = 'sound/vox_fem/immediately.ogg', +"in" = 'sound/vox_fem/in.ogg', +"inches" = 'sound/vox_fem/inches.ogg', +"india" = 'sound/vox_fem/india.ogg', +"ing" = 'sound/vox_fem/ing.ogg', +"inoperative" = 'sound/vox_fem/inoperative.ogg', +"inside" = 'sound/vox_fem/inside.ogg', +"inspection" = 'sound/vox_fem/inspection.ogg', +"inspector" = 'sound/vox_fem/inspector.ogg', +"interchange" = 'sound/vox_fem/interchange.ogg', +"intruder" = 'sound/vox_fem/intruder.ogg', +"invalid" = 'sound/vox_fem/invalid.ogg', +"invasion" = 'sound/vox_fem/invasion.ogg', +"is" = 'sound/vox_fem/is.ogg', +"it" = 'sound/vox_fem/it.ogg', +"j" = 'sound/vox_fem/j.ogg', +"johnson" = 'sound/vox_fem/johnson.ogg', +"juliet" = 'sound/vox_fem/juliet.ogg', +"k" = 'sound/vox_fem/k.ogg', +"key" = 'sound/vox_fem/key.ogg', +"kill" = 'sound/vox_fem/kill.ogg', +"kilo" = 'sound/vox_fem/kilo.ogg', +"kit" = 'sound/vox_fem/kit.ogg', +"l" = 'sound/vox_fem/l.ogg', +"lab" = 'sound/vox_fem/lab.ogg', +"lambda" = 'sound/vox_fem/lambda.ogg', +"laser" = 'sound/vox_fem/laser.ogg', +"last" = 'sound/vox_fem/last.ogg', +"launch" = 'sound/vox_fem/launch.ogg', +"law" = 'sound/vox_fem/law.ogg', +"laws" = 'sound/vox_fem/laws.ogg', +"leak" = 'sound/vox_fem/leak.ogg', +"leave" = 'sound/vox_fem/leave.ogg', +"left" = 'sound/vox_fem/left.ogg', +"legal" = 'sound/vox_fem/legal.ogg', +"level" = 'sound/vox_fem/level.ogg', +"lever" = 'sound/vox_fem/lever.ogg', +"lie" = 'sound/vox_fem/lie.ogg', +"lieutenant" = 'sound/vox_fem/lieutenant.ogg', +"life" = 'sound/vox_fem/life.ogg', +"light" = 'sound/vox_fem/light.ogg', +"lima" = 'sound/vox_fem/lima.ogg', +"liquid" = 'sound/vox_fem/liquid.ogg', +"loading" = 'sound/vox_fem/loading.ogg', +"locate" = 'sound/vox_fem/locate.ogg', +"located" = 'sound/vox_fem/located.ogg', +"location" = 'sound/vox_fem/location.ogg', +"lock" = 'sound/vox_fem/lock.ogg', +"locked" = 'sound/vox_fem/locked.ogg', +"locker" = 'sound/vox_fem/locker.ogg', +"lockout" = 'sound/vox_fem/lockout.ogg', +"loose" = 'sound/vox_fem/loose.ogg', +"lower" = 'sound/vox_fem/lower.ogg', +"lowest" = 'sound/vox_fem/lowest.ogg', +"m" = 'sound/vox_fem/m.ogg', +"magnetic" = 'sound/vox_fem/magnetic.ogg', +"main" = 'sound/vox_fem/main.ogg', +"maintenance" = 'sound/vox_fem/maintenance.ogg', +"malfunction" = 'sound/vox_fem/malfunction.ogg', +"man" = 'sound/vox_fem/man.ogg', +"mass" = 'sound/vox_fem/mass.ogg', +"materials" = 'sound/vox_fem/materials.ogg', +"maximum" = 'sound/vox_fem/maximum.ogg', +"may" = 'sound/vox_fem/may.ogg', +"me" = 'sound/vox_fem/me.ogg', +"medbay" = 'sound/vox_fem/medbay.ogg', +"medical" = 'sound/vox_fem/medical.ogg', +"men" = 'sound/vox_fem/men.ogg', +"mercy" = 'sound/vox_fem/mercy.ogg', +"mesa" = 'sound/vox_fem/mesa.ogg', +"message" = 'sound/vox_fem/message.ogg', +"meter" = 'sound/vox_fem/meter.ogg', +"micro" = 'sound/vox_fem/micro.ogg', +"middle" = 'sound/vox_fem/middle.ogg', +"mike" = 'sound/vox_fem/mike.ogg', +"miles" = 'sound/vox_fem/miles.ogg', +"military" = 'sound/vox_fem/military.ogg', +"milli" = 'sound/vox_fem/milli.ogg', +"million" = 'sound/vox_fem/million.ogg', +"minefield" = 'sound/vox_fem/minefield.ogg', +"minimum" = 'sound/vox_fem/minimum.ogg', +"minutes" = 'sound/vox_fem/minutes.ogg', +"mister" = 'sound/vox_fem/mister.ogg', +"mode" = 'sound/vox_fem/mode.ogg', +"money" = 'sound/vox_fem/money.ogg', +"motor" = 'sound/vox_fem/motor.ogg', +"motorpool" = 'sound/vox_fem/motorpool.ogg', +"move" = 'sound/vox_fem/move.ogg', +"must" = 'sound/vox_fem/must.ogg', +"my" = 'sound/vox_fem/my.ogg', +"n" = 'sound/vox_fem/n.ogg', +"nanotrasen" = 'sound/vox_fem/nanotrasen.ogg', +"nearest" = 'sound/vox_fem/nearest.ogg', +"nice" = 'sound/vox_fem/nice.ogg', +"nine" = 'sound/vox_fem/nine.ogg', +"nineteen" = 'sound/vox_fem/nineteen.ogg', +"ninety" = 'sound/vox_fem/ninety.ogg', +"no" = 'sound/vox_fem/no.ogg', +"nominal" = 'sound/vox_fem/nominal.ogg', +"north" = 'sound/vox_fem/north.ogg', +"not" = 'sound/vox_fem/not.ogg', +"november" = 'sound/vox_fem/november.ogg', +"now" = 'sound/vox_fem/now.ogg', +"number" = 'sound/vox_fem/number.ogg', +"o" = 'sound/vox_fem/o.ogg', +"objective" = 'sound/vox_fem/objective.ogg', +"observation" = 'sound/vox_fem/observation.ogg', +"obtain" = 'sound/vox_fem/obtain.ogg', +"of" = 'sound/vox_fem/of.ogg', +"officer" = 'sound/vox_fem/officer.ogg', +"ok" = 'sound/vox_fem/ok.ogg', +"on" = 'sound/vox_fem/on.ogg', +"one" = 'sound/vox_fem/one.ogg', +"open" = 'sound/vox_fem/open.ogg', +"operating" = 'sound/vox_fem/operating.ogg', +"operations" = 'sound/vox_fem/operations.ogg', +"operative" = 'sound/vox_fem/operative.ogg', +"option" = 'sound/vox_fem/option.ogg', +"order" = 'sound/vox_fem/order.ogg', +"organic" = 'sound/vox_fem/organic.ogg', +"oscar" = 'sound/vox_fem/oscar.ogg', +"out" = 'sound/vox_fem/out.ogg', +"outside" = 'sound/vox_fem/outside.ogg', +"over" = 'sound/vox_fem/over.ogg', +"overload" = 'sound/vox_fem/overload.ogg', +"override" = 'sound/vox_fem/override.ogg', +"p" = 'sound/vox_fem/p.ogg', +"pacify" = 'sound/vox_fem/pacify.ogg', +"pain" = 'sound/vox_fem/pain.ogg', +"pal" = 'sound/vox_fem/pal.ogg', +"panel" = 'sound/vox_fem/panel.ogg', +"percent" = 'sound/vox_fem/percent.ogg', +"perimeter" = 'sound/vox_fem/perimeter.ogg', +"permitted" = 'sound/vox_fem/permitted.ogg', +"personnel" = 'sound/vox_fem/personnel.ogg', +"pipe" = 'sound/vox_fem/pipe.ogg', +"plant" = 'sound/vox_fem/plant.ogg', +"plasma" = 'sound/vox_fem/plasma.ogg', +"platform" = 'sound/vox_fem/platform.ogg', +"please" = 'sound/vox_fem/please.ogg', +"point" = 'sound/vox_fem/point.ogg', +"port" = 'sound/vox_fem/port.ogg', +"portal" = 'sound/vox_fem/portal.ogg', +"power" = 'sound/vox_fem/power.ogg', +"presence" = 'sound/vox_fem/presence.ogg', +"press" = 'sound/vox_fem/press.ogg', +"primary" = 'sound/vox_fem/primary.ogg', +"proceed" = 'sound/vox_fem/proceed.ogg', +"processing" = 'sound/vox_fem/processing.ogg', +"progress" = 'sound/vox_fem/progress.ogg', +"proper" = 'sound/vox_fem/proper.ogg', +"propulsion" = 'sound/vox_fem/propulsion.ogg', +"prosecute" = 'sound/vox_fem/prosecute.ogg', +"protective" = 'sound/vox_fem/protective.ogg', +"push" = 'sound/vox_fem/push.ogg', +"q" = 'sound/vox_fem/q.ogg', +"quantum" = 'sound/vox_fem/quantum.ogg', +"quebec" = 'sound/vox_fem/quebec.ogg', +"queen" = 'sound/vox_fem/queen.ogg', +"question" = 'sound/vox_fem/question.ogg', +"questioning" = 'sound/vox_fem/questioning.ogg', +"quick" = 'sound/vox_fem/quick.ogg', +"quit" = 'sound/vox_fem/quit.ogg', +"r" = 'sound/vox_fem/r.ogg', +"radiation" = 'sound/vox_fem/radiation.ogg', +"radioactive" = 'sound/vox_fem/radioactive.ogg', +"rads" = 'sound/vox_fem/rads.ogg', +"raider" = 'sound/vox_fem/raider.ogg', +"raiders" = 'sound/vox_fem/raiders.ogg', +"rapid" = 'sound/vox_fem/rapid.ogg', +"reach" = 'sound/vox_fem/reach.ogg', +"reached" = 'sound/vox_fem/reached.ogg', +"reactor" = 'sound/vox_fem/reactor.ogg', +"red" = 'sound/vox_fem/red.ogg', +"relay" = 'sound/vox_fem/relay.ogg', +"released" = 'sound/vox_fem/released.ogg', +"remaining" = 'sound/vox_fem/remaining.ogg', +"removal" = 'sound/vox_fem/removal.ogg', +"renegade" = 'sound/vox_fem/renegade.ogg', +"repair" = 'sound/vox_fem/repair.ogg', +"report" = 'sound/vox_fem/report.ogg', +"reports" = 'sound/vox_fem/reports.ogg', +"required" = 'sound/vox_fem/required.ogg', +"research" = 'sound/vox_fem/research.ogg', +"resevoir" = 'sound/vox_fem/resevoir.ogg', +"resistance" = 'sound/vox_fem/resistance.ogg', +"rest" = 'sound/vox_fem/rest.ogg', +"right" = 'sound/vox_fem/right.ogg', +"rocket" = 'sound/vox_fem/rocket.ogg', +"roger" = 'sound/vox_fem/roger.ogg', +"romeo" = 'sound/vox_fem/romeo.ogg', +"room" = 'sound/vox_fem/room.ogg', +"round" = 'sound/vox_fem/round.ogg', +"run" = 'sound/vox_fem/run.ogg', +"s" = 'sound/vox_fem/s.ogg', +"safe" = 'sound/vox_fem/safe.ogg', +"safety" = 'sound/vox_fem/safety.ogg', +"sarah" = 'sound/vox_fem/sarah.ogg', +"sargeant" = 'sound/vox_fem/sargeant.ogg', +"satellite" = 'sound/vox_fem/satellite.ogg', +"save" = 'sound/vox_fem/save.ogg', +"science" = 'sound/vox_fem/science.ogg', +"scream" = 'sound/vox_fem/scream.ogg', +"screen" = 'sound/vox_fem/screen.ogg', +"search" = 'sound/vox_fem/search.ogg', +"second" = 'sound/vox_fem/second.ogg', +"secondary" = 'sound/vox_fem/secondary.ogg', +"seconds" = 'sound/vox_fem/seconds.ogg', +"sector" = 'sound/vox_fem/sector.ogg', +"secure" = 'sound/vox_fem/secure.ogg', +"secured" = 'sound/vox_fem/secured.ogg', +"security" = 'sound/vox_fem/security.ogg', +"select" = 'sound/vox_fem/select.ogg', +"selected" = 'sound/vox_fem/selected.ogg', +"sensors" = 'sound/vox_fem/sensors.ogg', +"service" = 'sound/vox_fem/service.ogg', +"seven" = 'sound/vox_fem/seven.ogg', +"seventeen" = 'sound/vox_fem/seventeen.ogg', +"seventy" = 'sound/vox_fem/seventy.ogg', +"severe" = 'sound/vox_fem/severe.ogg', +"sewage" = 'sound/vox_fem/sewage.ogg', +"sewer" = 'sound/vox_fem/sewer.ogg', +"shield" = 'sound/vox_fem/shield.ogg', +"shipment" = 'sound/vox_fem/shipment.ogg', +"shirt" = 'sound/vox_fem/shirt.ogg', +"shit" = 'sound/vox_fem/shit.ogg', +"shitlord" = 'sound/vox_fem/shitlord.ogg', +"shits" = 'sound/vox_fem/shits.ogg', +"shitting" = 'sound/vox_fem/shitting.ogg', +"shock" = 'sound/vox_fem/shock.ogg', +"shoot" = 'sound/vox_fem/shoot.ogg', +"shower" = 'sound/vox_fem/shower.ogg', +"shut" = 'sound/vox_fem/shut.ogg', +"shuttle" = 'sound/vox_fem/shuttle.ogg', +"side" = 'sound/vox_fem/side.ogg', +"sierra" = 'sound/vox_fem/sierra.ogg', +"sight" = 'sound/vox_fem/sight.ogg', +"silo" = 'sound/vox_fem/silo.ogg', +"singularity" = 'sound/vox_fem/singularity.ogg', +"six" = 'sound/vox_fem/six.ogg', +"sixteen" = 'sound/vox_fem/sixteen.ogg', +"sixty" = 'sound/vox_fem/sixty.ogg', +"slime" = 'sound/vox_fem/slime.ogg', +"slow" = 'sound/vox_fem/slow.ogg', +"solar" = 'sound/vox_fem/solar.ogg', +"solars" = 'sound/vox_fem/solars.ogg', +"soldier" = 'sound/vox_fem/soldier.ogg', +"some" = 'sound/vox_fem/some.ogg', +"someone" = 'sound/vox_fem/someone.ogg', +"something" = 'sound/vox_fem/something.ogg', +"son" = 'sound/vox_fem/son.ogg', +"sorry" = 'sound/vox_fem/sorry.ogg', +"south" = 'sound/vox_fem/south.ogg', +"squad" = 'sound/vox_fem/squad.ogg', +"square" = 'sound/vox_fem/square.ogg', +"ss13" = 'sound/vox_fem/ss13.ogg', +"stairway" = 'sound/vox_fem/stairway.ogg', +"starboard" = 'sound/vox_fem/starboard.ogg', +"station" = 'sound/vox_fem/station.ogg', +"status" = 'sound/vox_fem/status.ogg', +"sterile" = 'sound/vox_fem/sterile.ogg', +"sterilization" = 'sound/vox_fem/sterilization.ogg', +"storage" = 'sound/vox_fem/storage.ogg', +"stuck" = 'sound/vox_fem/stuck.ogg', +"sub" = 'sound/vox_fem/sub.ogg', +"subsurface" = 'sound/vox_fem/subsurface.ogg', +"sudden" = 'sound/vox_fem/sudden.ogg', +"suffer" = 'sound/vox_fem/suffer.ogg', +"suit" = 'sound/vox_fem/suit.ogg', +"superconducting" = 'sound/vox_fem/superconducting.ogg', +"supercooled" = 'sound/vox_fem/supercooled.ogg', +"supply" = 'sound/vox_fem/supply.ogg', +"surface" = 'sound/vox_fem/surface.ogg', +"surrender" = 'sound/vox_fem/surrender.ogg', +"surround" = 'sound/vox_fem/surround.ogg', +"surrounded" = 'sound/vox_fem/surrounded.ogg', +"switch" = 'sound/vox_fem/switch.ogg', +"syndicate" = 'sound/vox_fem/syndicate.ogg', +"system" = 'sound/vox_fem/system.ogg', +"systems" = 'sound/vox_fem/systems.ogg', +"t" = 'sound/vox_fem/t.ogg', +"tactical" = 'sound/vox_fem/tactical.ogg', +"take" = 'sound/vox_fem/take.ogg', +"talk" = 'sound/vox_fem/talk.ogg', +"tango" = 'sound/vox_fem/tango.ogg', +"tank" = 'sound/vox_fem/tank.ogg', +"target" = 'sound/vox_fem/target.ogg', +"team" = 'sound/vox_fem/team.ogg', +"temperature" = 'sound/vox_fem/temperature.ogg', +"temporal" = 'sound/vox_fem/temporal.ogg', +"ten" = 'sound/vox_fem/ten.ogg', +"terminal" = 'sound/vox_fem/terminal.ogg', +"terminated" = 'sound/vox_fem/terminated.ogg', +"termination" = 'sound/vox_fem/termination.ogg', +"test" = 'sound/vox_fem/test.ogg', +"that" = 'sound/vox_fem/that.ogg', +"the" = 'sound/vox_fem/the.ogg', +"then" = 'sound/vox_fem/then.ogg', +"there" = 'sound/vox_fem/there.ogg', +"third" = 'sound/vox_fem/third.ogg', +"thirteen" = 'sound/vox_fem/thirteen.ogg', +"thirty" = 'sound/vox_fem/thirty.ogg', +"this" = 'sound/vox_fem/this.ogg', +"those" = 'sound/vox_fem/those.ogg', +"thousand" = 'sound/vox_fem/thousand.ogg', +"threat" = 'sound/vox_fem/threat.ogg', +"three" = 'sound/vox_fem/three.ogg', +"through" = 'sound/vox_fem/through.ogg', +"tide" = 'sound/vox_fem/tide.ogg', +"time" = 'sound/vox_fem/time.ogg', +"to" = 'sound/vox_fem/to.ogg', +"top" = 'sound/vox_fem/top.ogg', +"topside" = 'sound/vox_fem/topside.ogg', +"touch" = 'sound/vox_fem/touch.ogg', +"towards" = 'sound/vox_fem/towards.ogg', +"toxins" = 'sound/vox_fem/toxins.ogg', +"track" = 'sound/vox_fem/track.ogg', +"train" = 'sound/vox_fem/train.ogg', +"traitor" = 'sound/vox_fem/traitor.ogg', +"transportation" = 'sound/vox_fem/transportation.ogg', +"truck" = 'sound/vox_fem/truck.ogg', +"tunnel" = 'sound/vox_fem/tunnel.ogg', +"turn" = 'sound/vox_fem/turn.ogg', +"turret" = 'sound/vox_fem/turret.ogg', +"twelve" = 'sound/vox_fem/twelve.ogg', +"twenty" = 'sound/vox_fem/twenty.ogg', +"two" = 'sound/vox_fem/two.ogg', +"u" = 'sound/vox_fem/u.ogg', +"unauthorized" = 'sound/vox_fem/unauthorized.ogg', +"under" = 'sound/vox_fem/under.ogg', +"uniform" = 'sound/vox_fem/uniform.ogg', +"unlocked" = 'sound/vox_fem/unlocked.ogg', +"until" = 'sound/vox_fem/until.ogg', +"up" = 'sound/vox_fem/up.ogg', +"update" = 'sound/vox_fem/update.ogg', +"updated" = 'sound/vox_fem/updated.ogg', +"updating" = 'sound/vox_fem/updating.ogg', +"upload" = 'sound/vox_fem/upload.ogg', +"upper" = 'sound/vox_fem/upper.ogg', +"uranium" = 'sound/vox_fem/uranium.ogg', +"us" = 'sound/vox_fem/us.ogg', +"usa" = 'sound/vox_fem/usa.ogg', +"use" = 'sound/vox_fem/use.ogg', +"used" = 'sound/vox_fem/used.ogg', +"user" = 'sound/vox_fem/user.ogg', +"v" = 'sound/vox_fem/v.ogg', +"vacate" = 'sound/vox_fem/vacate.ogg', +"valid" = 'sound/vox_fem/valid.ogg', +"vapor" = 'sound/vox_fem/vapor.ogg', +"vent" = 'sound/vox_fem/vent.ogg', +"ventilation" = 'sound/vox_fem/ventilation.ogg', +"victor" = 'sound/vox_fem/victor.ogg', +"violated" = 'sound/vox_fem/violated.ogg', +"violation" = 'sound/vox_fem/violation.ogg', +"virology" = 'sound/vox_fem/virology.ogg', +"voltage" = 'sound/vox_fem/voltage.ogg', +"vox" = 'sound/vox_fem/vox.ogg', +"vox_login" = 'sound/vox_fem/vox_login.ogg', +"voxtest" = 'sound/vox_fem/voxtest.ogg', +"voxtest2" = 'sound/vox_fem/voxtest2.ogg', +"w" = 'sound/vox_fem/w.ogg', +"walk" = 'sound/vox_fem/walk.ogg', +"wall" = 'sound/vox_fem/wall.ogg', +"wanker" = 'sound/vox_fem/wanker.ogg', +"want" = 'sound/vox_fem/want.ogg', +"wanted" = 'sound/vox_fem/wanted.ogg', +"warm" = 'sound/vox_fem/warm.ogg', +"warn" = 'sound/vox_fem/warn.ogg', +"warning" = 'sound/vox_fem/warning.ogg', +"waste" = 'sound/vox_fem/waste.ogg', +"water" = 'sound/vox_fem/water.ogg', +"we" = 'sound/vox_fem/we.ogg', +"weapon" = 'sound/vox_fem/weapon.ogg', +"welcome" = 'sound/vox_fem/welcome.ogg', +"west" = 'sound/vox_fem/west.ogg', +"whiskey" = 'sound/vox_fem/whiskey.ogg', +"white" = 'sound/vox_fem/white.ogg', +"wilco" = 'sound/vox_fem/wilco.ogg', +"will" = 'sound/vox_fem/will.ogg', +"with" = 'sound/vox_fem/with.ogg', +"without" = 'sound/vox_fem/without.ogg', +"woody" = 'sound/vox_fem/woody.ogg', +"woop" = 'sound/vox/woop.wav', +"x" = 'sound/vox_fem/x.ogg', +"xeno" = 'sound/vox_fem/xeno.ogg', +"xenobiology" = 'sound/vox_fem/xenobiology.ogg', +"xenomorph" = 'sound/vox_fem/xenomorph.ogg', +"xenomorphs" = 'sound/vox_fem/xenomorphs.ogg', +"y" = 'sound/vox_fem/y.ogg', +"yankee" = 'sound/vox_fem/yankee.ogg', +"yards" = 'sound/vox_fem/yards.ogg', +"year" = 'sound/vox_fem/year.ogg', +"yellow" = 'sound/vox_fem/yellow.ogg', +"yes" = 'sound/vox_fem/yes.ogg', +"you" = 'sound/vox_fem/you.ogg', +"your" = 'sound/vox_fem/your.ogg', +"yourself" = 'sound/vox_fem/yourself.ogg', +"z" = 'sound/vox_fem/z.ogg', +"zero" = 'sound/vox_fem/zero.ogg', +"zone" = 'sound/vox_fem/zone.ogg', +"zulu" = 'sound/vox_fem/zulu.ogg', +) \ No newline at end of file diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 8a18f4ab55b..8f863151526 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -20,6 +20,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station var/atmosalm = 0 var/poweralm = 1 var/party = null + var/radalert = 0 level = null name = "Space" icon = 'icons/turf/areas.dmi' @@ -247,6 +248,21 @@ proc/process_ghost_teleport_locs() /area/shuttle/prison/prison icon_state = "shuttle2" +/area/shuttle/siberia + name = "\improper Labor Camp Shuttle" + music = "music/escape.ogg" + +/area/shuttle/siberia/station + icon_state = "shuttle" + +/area/shuttle/siberia/outpost + icon_state = "shuttle" + +/area/shuttle/transport1/centcom + icon_state = "shuttle" + name = "\improper Transport Shuttle Centcom" + + /area/shuttle/specops/centcom name = "\improper Special Ops Shuttle" icon_state = "shuttlered" @@ -1196,6 +1212,10 @@ proc/process_ghost_teleport_locs() name = "\improper Prison Wing" icon_state = "sec_prison" +/area/security/processing + name = "\improper Prisoner Processing" + icon_state = "sec_prison" + /area/security/warden name = "\improper Warden" icon_state = "Warden" diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 5ddcb45e853..0da9a7d7c79 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -156,6 +156,22 @@ updateicon() return +/area/proc/radiation_alert() + if(name == "Space") + return + if(!radalert) + radalert = 1 + updateicon() + return + +/area/proc/reset_radiation_alert() + if(name == "Space") + return + if(radalert) + radalert = 0 + updateicon() + return + /area/proc/partyalert() if(name == "Space") //no parties in space!!! return @@ -180,8 +196,11 @@ return /area/proc/updateicon() - if ((fire || eject || party) && ((!requires_power)?(!requires_power):power_environ))//If it doesn't require power, can still activate this proc. - if(fire && !eject && !party) + if ((fire || eject || party || radalert) && ((!requires_power)?(!requires_power):power_environ))//If it doesn't require power, can still activate this proc. + // Highest priority at the top. + if(radalert && !fire) + icon_state = "radiation" + else if(fire && !radalert && !eject && !party) icon_state = "blue" /*else if(atmosalm && !fire && !eject && !party) icon_state = "bluenew"*/ diff --git a/code/game/asteroid.dm b/code/game/asteroid.dm index e5b421e9afd..05fc66d2d40 100644 --- a/code/game/asteroid.dm +++ b/code/game/asteroid.dm @@ -1,4 +1,5 @@ + var/global/list/space_surprises = list( /obj/item/clothing/mask/facehugger =4, /obj/item/weapon/pickaxe/silver =4, /obj/item/weapon/pickaxe/drill =4, diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 54717140ba7..a4b610951d9 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -91,9 +91,6 @@ /atom/proc/CheckExit() return 1 -/atom/proc/HasEntered(atom/movable/AM as mob|obj) - return - /atom/proc/HasProximity(atom/movable/AM as mob|obj) return diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 1326e65e5eb..400da3cc439 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -22,6 +22,11 @@ src.last_move = get_dir(A, src.loc) return +// Previously known as Crossed() +// This is automatically called when something enters your square +/atom/movable/Crossed(atom/movable/AM) + return + /atom/movable/Bump(var/atom/A as mob|obj|turf|area, yes) if(src.throwing) src.throw_impact(A) @@ -41,6 +46,8 @@ loc.Exited(src) loc = destination loc.Entered(src) + for(var/atom/movable/AM in loc) + AM.Crossed(src) return 1 return 0 diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index 1049967c451..7b72fc1353f 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -8,7 +8,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon" name = "changeling" config_tag = "changeling" restricted_jobs = list("AI", "Cyborg") - protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain") + protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Blueshield") required_players = 2 required_players_secret = 10 required_enemies = 1 diff --git a/code/game/gamemodes/changeling/modularchangling.dm b/code/game/gamemodes/changeling/modularchangling.dm index 2395e63b270..099d805c056 100644 --- a/code/game/gamemodes/changeling/modularchangling.dm +++ b/code/game/gamemodes/changeling/modularchangling.dm @@ -74,7 +74,7 @@ var/list/datum/power/changeling/powerinstances = list() name = "Silence Sting" desc = "We silently sting a human, completely silencing them for a short time." helptext = "Does not provide a warning to a victim that they have been stung, until they try to speak and cannot." - genomecost = 2 + genomecost = 3 allowduringlesserform = 1 verbpath = /mob/proc/changeling_silence_sting @@ -103,7 +103,7 @@ var/list/datum/power/changeling/powerinstances = list() /datum/power/changeling/paralysis_sting name = "Paralysis Sting" desc = "We silently sting a human, paralyzing them for a short time." - genomecost = 3 + genomecost = 4 verbpath = /mob/proc/changeling_paralysis_sting /datum/power/changeling/LSDSting diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 9f46b312e8b..59d4734b200 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -20,7 +20,7 @@ /datum/game_mode/cult name = "cult" config_tag = "cult" - restricted_jobs = list("Chaplain","AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain") + restricted_jobs = list("Chaplain","AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Blueshield") protected_jobs = list() required_players = 5 required_players_secret = 15 diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index 9334e0f8d63..0b8c0cf6755 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -51,7 +51,7 @@ return return -/obj/effect/gateway/HasEntered(AM as mob|obj) +/obj/effect/gateway/Crossed(AM as mob|obj) spawn(0) return return \ No newline at end of file diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index da0f628d4af..1c00948f67c 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -216,8 +216,8 @@ if(synd_mob.backbag == 2) synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(synd_mob), slot_back) if(synd_mob.backbag == 3) synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(synd_mob), slot_back) if(synd_mob.backbag == 4) synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(synd_mob), slot_back) - synd_mob.equip_to_slot_or_del(new /obj/item/ammo_magazine/a12mm(synd_mob), slot_in_backpack) - synd_mob.equip_to_slot_or_del(new /obj/item/ammo_magazine/a12mm(synd_mob), slot_in_backpack) + synd_mob.equip_to_slot_or_del(new /obj/item/ammo_box/magazine/m12mm(synd_mob), slot_in_backpack) + synd_mob.equip_to_slot_or_del(new /obj/item/ammo_box/magazine/m12mm(synd_mob), slot_in_backpack) synd_mob.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/pill/cyanide(synd_mob), slot_in_backpack) synd_mob.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/c20r(synd_mob), slot_belt) synd_mob.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(synd_mob.back), slot_in_backpack) diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index bc750dd9b36..c852c6e7aaf 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -14,7 +14,7 @@ /datum/game_mode/revolution name = "revolution" config_tag = "revolution" - restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer") + restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer", "Blueshield") required_players = 4 required_players_secret = 15 required_enemies = 3 diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index 6014a37685f..cb3ca41dc8a 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -8,7 +8,7 @@ name = "traitor" config_tag = "traitor" restricted_jobs = list("Cyborg")//They are part of the AI if he is traitor so are they, they use to get double chances - protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain")//AI", Currently out of the list as malf does not work for shit + protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Blueshield")//AI", Currently out of the list as malf does not work for shit required_players = 0 required_enemies = 1 recommended_enemies = 4 diff --git a/code/game/gamemodes/wizard/rightandwrong.dm b/code/game/gamemodes/wizard/rightandwrong.dm index 23a04161120..855a670c258 100644 --- a/code/game/gamemodes/wizard/rightandwrong.dm +++ b/code/game/gamemodes/wizard/rightandwrong.dm @@ -26,21 +26,21 @@ if("laser") new /obj/item/weapon/gun/energy/laser(get_turf(H)) if("revolver") - new /obj/item/weapon/gun/projectile(get_turf(H)) + new /obj/item/weapon/gun/projectile/revolver(get_turf(H)) if("detective") - new /obj/item/weapon/gun/projectile/detective(get_turf(H)) + new /obj/item/weapon/gun/projectile/revolver/detective(get_turf(H)) if("smg") new /obj/item/weapon/gun/projectile/automatic/c20r(get_turf(H)) if("nuclear") new /obj/item/weapon/gun/energy/gun/nuclear(get_turf(H)) if("deagle") - new /obj/item/weapon/gun/projectile/deagle/camo(get_turf(H)) + new /obj/item/weapon/gun/projectile/automatic/deagle/camo(get_turf(H)) if("gyrojet") - new /obj/item/weapon/gun/projectile/gyropistol(get_turf(H)) + new /obj/item/weapon/gun/projectile/automatic/gyropistol(get_turf(H)) if("pulse") new /obj/item/weapon/gun/energy/pulse_rifle(get_turf(H)) if("silenced") - new /obj/item/weapon/gun/projectile/pistol(get_turf(H)) + new /obj/item/weapon/gun/projectile/automatic/pistol(get_turf(H)) new /obj/item/weapon/silencer(get_turf(H)) if("cannon") new /obj/item/weapon/gun/energy/lasercannon(get_turf(H)) @@ -51,7 +51,7 @@ if("combatshotgun") new /obj/item/weapon/gun/projectile/shotgun/pump/combat(get_turf(H)) if("mateba") - new /obj/item/weapon/gun/projectile/mateba(get_turf(H)) + new /obj/item/weapon/gun/projectile/revolver/mateba(get_turf(H)) if("smg") new /obj/item/weapon/gun/projectile/automatic(get_turf(H)) if("uzi") diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm index 375983c87da..e8ae28b2b96 100644 --- a/code/game/jobs/job/captain.dm +++ b/code/game/jobs/job/captain.dm @@ -86,6 +86,12 @@ H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand) else H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack) + var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) + L.imp_in = H + L.implanted = 1 + var/datum/organ/external/affected = H.organs_by_name["head"] + affected.implants += L + L.part = affected return 1 @@ -130,6 +136,9 @@ var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H L.implanted = 1 + var/datum/organ/external/affected = H.organs_by_name["head"] + affected.implants += L + L.part = affected return 1 /datum/job/blueshield @@ -173,4 +182,7 @@ var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H L.implanted = 1 + var/datum/organ/external/affected = H.organs_by_name["head"] + affected.implants += L + L.part = affected return 1 \ No newline at end of file diff --git a/code/game/jobs/job/civilian_chaplain.dm b/code/game/jobs/job/civilian_chaplain.dm index 2a31885c801..bce998b67b8 100644 --- a/code/game/jobs/job/civilian_chaplain.dm +++ b/code/game/jobs/job/civilian_chaplain.dm @@ -10,7 +10,6 @@ selection_color = "#dddddd" access = list(access_morgue, access_chapel_office, access_crematorium, access_maint_tunnels) minimal_access = list(access_morgue, access_chapel_office, access_crematorium, access_maint_tunnels) - alt_titles = list("Counselor","Pastor","Space Shaman") equip(var/mob/living/carbon/human/H) @@ -34,7 +33,7 @@ switch(lowertext(new_religion)) if("christianity") - B.name = pick("The Holy Bible","The Dead Sea Scrolls") + B.name = pick("The Holy Bible") if("satanism") B.name = "The Unholy Bible" if("cthulu") @@ -48,7 +47,7 @@ if("imperium") B.name = "Uplifting Primer" if("toolboxia") - B.name = "Toolbox Manifesto" + B.name = "Toolbox Manifesto Robusto" if("homosexuality") B.name = "Guys Gone Wild" if("lol", "wtf", "gay", "penis", "ass", "poo", "badmin", "shitmin", "deadmin", "cock", "cocks") diff --git a/code/game/jobs/job/silicon.dm b/code/game/jobs/job/silicon.dm index c50767d2f55..f1a0fd2e260 100644 --- a/code/game/jobs/job/silicon.dm +++ b/code/game/jobs/job/silicon.dm @@ -26,6 +26,7 @@ supervisors = "your laws and the AI" //Nodrak selection_color = "#ddffdd" minimal_player_age = 21 + alt_titles = list("Android", "Robot") equip(var/mob/living/carbon/human/H) if(!H) return 0 diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 7314d24f2f9..5b3c1ee435f 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -227,7 +227,7 @@ var/datum/gas_mixture/gas = location.remove_air(0.25*environment.total_moles) var/heat_capacity = gas.heat_capacity() - var/energy_used = max( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE) + var/energy_used = min( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE) //Use power. Assuming that each power unit represents 1000 watts.... use_power(energy_used/1000, ENVIRON) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index c4a55973a6e..7b04e0615af 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -32,7 +32,7 @@ var/global/list/autolathe_recipes = list( \ new /obj/item/weapon/reagent_containers/glass/beaker/large(), \ new /obj/item/weapon/storage/box/blanks(), \ new /obj/item/ammo_casing/shotgun/beanbag(), \ - new /obj/item/ammo_magazine/c38(), \ + new /obj/item/ammo_box/c38(), \ new /obj/item/device/taperecorder(), \ new /obj/item/device/assembly/igniter(), \ new /obj/item/device/assembly/signaler(), \ @@ -52,7 +52,7 @@ var/global/list/autolathe_recipes_hidden = list( \ new /obj/item/device/radio/electropack(), \ new /obj/item/weapon/weldingtool/largetank(), \ new /obj/item/weapon/handcuffs(), \ - new /obj/item/ammo_magazine/a357(), \ + new /obj/item/ammo_box/a357(), \ new /obj/item/ammo_casing/shotgun(), \ new /obj/item/ammo_casing/shotgun/dart(), \ /* new /obj/item/weapon/shield/riot(), */ \ diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index a80f04c3e3d..3e392a5c4d9 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -798,7 +798,7 @@ return get_turf(src) -// called from mob/living/carbon/human/HasEntered() +// called from mob/living/carbon/human/Crossed() // when mulebot is in the same loc /obj/machinery/bot/mulebot/proc/RunOver(var/mob/living/carbon/human/H) src.visible_message("\red [src] drives over [H]!") diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index ca0512e2cbd..2bb0e276ad5 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -12,6 +12,7 @@ var/timeleft = 60 var/stop = 0.0 var/screen = 0 // 0 - No Access Denied, 1 - Access allowed + var/obj/item/weapon/card/id/prisoner/inserted_id attack_ai(var/mob/user as mob) @@ -31,6 +32,14 @@ if(screen == 0) dat += "
Unlock Console" else if(screen == 1) + if(istype(inserted_id)) + var/p = inserted_id:points + var/g = inserted_id:goal + dat += text("[inserted_id]
") + dat += text("Collectd Points: [p]. Reset.
") + dat += text("Card goal: [g]. Set
") + else + dat += text("Insert Prisoner ID.
") dat += "
Chemical Implants
" var/turf/Tr = null for(var/obj/item/weapon/implant/chem/C in world) @@ -76,6 +85,24 @@ if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) usr.set_machine(src) + if(href_list["id"]) + switch(href_list["id"]) + if("0") + var/obj/item/weapon/card/id/prisoner/I = usr.get_active_hand() + if(istype(I)) + usr.drop_item() + I.loc = src + inserted_id = I + else usr << "\red No valid ID." + if("1") + inserted_id.loc = get_step(src,get_turf(usr)) + inserted_id = null + if("2") + inserted_id.points = 0 + if("3") + var/num = round(input(usr, "Choose prisoner's goal:", "Input an Integer", null) as num|null) + if(num >= 0) + inserted_id.goal = num if(href_list["inject1"]) var/obj/item/weapon/implant/I = locate(href_list["inject1"]) if(I) I.activate(1) diff --git a/code/game/machinery/doors/poddoor.dm b/code/game/machinery/doors/poddoor.dm index 00d65241faa..59ccf4868b2 100644 --- a/code/game/machinery/doors/poddoor.dm +++ b/code/game/machinery/doors/poddoor.dm @@ -6,6 +6,11 @@ var/id = 1.0 explosion_resistance = 25 +/obj/machinery/door/poddoor/preopen + icon_state = "open" + density = 0 + opacity = 0 + /obj/machinery/door/poddoor/four_tile_ver/ name = "Large Pod Door" icon = 'icons/obj/doors/1x4blast_vert.dmi' diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index 87001bcf473..09e04ac804c 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -120,7 +120,7 @@ /* //Allow you to push disposal pipes into it (for those with density 1) -/obj/machinery/pipedispenser/disposal/HasEntered(var/obj/structure/disposalconstruct/pipe as obj) +/obj/machinery/pipedispenser/disposal/Crossed(var/obj/structure/disposalconstruct/pipe as obj) if(istype(pipe) && !pipe.anchored) del(pipe) diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm index bc8e30e132f..3546ce951e9 100644 --- a/code/game/machinery/transformer.dm +++ b/code/game/machinery/transformer.dm @@ -33,7 +33,7 @@ if(cooldown == 1) return - // HasEntered didn't like people lying down. + // Crossed didn't like people lying down. if(ishuman(AM)) // Only humans can enter from the west side, while lying down. var/move_dir = get_dir(loc, AM.loc) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index dc227176ea7..9752fd56dfb 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -157,6 +157,13 @@ coin = W user << "\blue You insert the [W] into the [src]" return + + else if(src.panel_open) + for(var/datum/data/vending_product/R in product_records) + if(istype(W, R.product_path)) + stock(R, user) + del(W) + else if(istype(W, /obj/item/weapon/card) && currently_vending) //attempt to connect to a new db, and if that doesn't work then fail if(!linked_db) @@ -169,6 +176,9 @@ usr << "\icon[src]Unable to connect to linked account." else usr << "\icon[src]Unable to connect to accounts database." + + + else ..() @@ -428,6 +438,14 @@ src.updateUsrDialog() + +/obj/machinery/vending/proc/stock(var/datum/data/vending_product/R, var/mob/user) + if(src.panel_open) + user << "\blue You stock the [src] with \a [R.product_name]" + R.amount++ + src.updateUsrDialog() + + /obj/machinery/vending/process() if(stat & (BROKEN|NOPOWER)) return diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 664142a345c..ee98ab1b766 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -44,7 +44,10 @@ /obj/item/robot_parts/l_arm, /obj/item/robot_parts/r_arm, /obj/item/robot_parts/l_leg, - /obj/item/robot_parts/r_leg, + /obj/item/robot_parts/r_leg + ), + +"Robot Repair"=list( /obj/item/robot_parts/robot_component/binary_communication_device, /obj/item/robot_parts/robot_component/radio, /obj/item/robot_parts/robot_component/actuator, diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 5dfe700d767..9d36eadeea5 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -331,7 +331,7 @@ var/obj/O = obstacle if(istype(O, /obj/effect/portal)) //derpfix src.anchored = 0 - O.HasEntered(src) + O.Crossed(src) spawn(0)//countering portal teleport spawn(0), hurr src.anchored = 1 else if(!O.anchored) diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index 364b032fce0..c4616e87e54 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -36,7 +36,7 @@ spawn(DRYING_TIME * (amount+1)) dry() -/obj/effect/decal/cleanable/blood/HasEntered(mob/living/carbon/human/perp) +/obj/effect/decal/cleanable/blood/Crossed(mob/living/carbon/human/perp) if (!istype(perp)) return if(amount < 1) @@ -77,7 +77,7 @@ icon_state = "xfloor1" random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7") -/obj/effect/decal/cleanable/blood/green/HasEntered(mob/living/carbon/human/perp) +/obj/effect/decal/cleanable/blood/green/Crossed(mob/living/carbon/human/perp) if (!istype(perp)) return if(amount < 1) diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 39247929151..b07d99ee20d 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -331,7 +331,7 @@ steam.start() -- spawns the effect return 1 -/obj/effect/effect/bad_smoke/HasEntered(mob/living/carbon/M as mob ) +/obj/effect/effect/bad_smoke/Crossed(mob/living/carbon/M as mob ) ..() if(istype(M, /mob/living/carbon)) if (M.internal != null && M.wear_mask && (M.wear_mask.flags & MASKINTERNALS)) @@ -423,7 +423,7 @@ steam.start() -- spawns the effect return -/obj/effect/effect/chem_smoke/HasEntered(mob/living/carbon/M as mob ) +/obj/effect/effect/chem_smoke/Crossed(mob/living/carbon/M as mob ) ..() reagents.reaction(M) @@ -553,7 +553,7 @@ steam.start() -- spawns the effect M.coughedtime = 0 return -/obj/effect/effect/sleep_smoke/HasEntered(mob/living/carbon/M as mob ) +/obj/effect/effect/sleep_smoke/Crossed(mob/living/carbon/M as mob ) ..() if(istype(M, /mob/living/carbon)) if (M.internal != null && M.wear_mask && (M.wear_mask.flags & MASKINTERNALS)) @@ -642,7 +642,7 @@ steam.start() -- spawns the effect R.updatehealth() return -/obj/effect/effect/mustard_gas/HasEntered(mob/living/carbon/human/R as mob ) +/obj/effect/effect/mustard_gas/Crossed(mob/living/carbon/human/R as mob ) ..() if (istype(R, /mob/living/carbon/human)) if (R.internal != null && usr.wear_mask && (R.wear_mask.flags & MASKINTERNALS) && R.wear_suit != null && !istype(R.wear_suit, /obj/item/clothing/suit/storage/labcoat) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket) && !istype(R.wear_suit, /obj/item/clothing/suit/straight_jacket && !istype(R.wear_suit, /obj/item/clothing/suit/armor))) @@ -882,7 +882,7 @@ steam.start() -- spawns the effect delete() -/obj/effect/effect/foam/HasEntered(var/atom/movable/AM) +/obj/effect/effect/foam/Crossed(var/atom/movable/AM) if(metal) return diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm index b9a2e57dafb..53e24b9fc6f 100644 --- a/code/game/objects/effects/mines.dm +++ b/code/game/objects/effects/mines.dm @@ -12,7 +12,7 @@ /obj/effect/mine/New() icon_state = "uglyminearmed" -/obj/effect/mine/HasEntered(AM as mob|obj) +/obj/effect/mine/Crossed(AM as mob|obj) Bumped(AM) /obj/effect/mine/Bumped(mob/M as mob|obj) diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index ae174260e38..b6fcb88b4f1 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -16,7 +16,7 @@ return return -/obj/effect/portal/HasEntered(AM as mob|obj) +/obj/effect/portal/Crossed(AM as mob|obj) spawn(0) src.teleport(AM) return diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm index 3acecd04b2d..e8cd72b81e9 100644 --- a/code/game/objects/effects/step_triggers.dm +++ b/code/game/objects/effects/step_triggers.dm @@ -9,7 +9,7 @@ /obj/effect/step_trigger/proc/Trigger(var/atom/movable/A) return 0 -/obj/effect/step_trigger/HasEntered(H as mob|obj) +/obj/effect/step_trigger/Crossed(H as mob|obj) ..() if(!H) return diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 793193ebae5..12a13ae873f 100755 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -1123,7 +1123,7 @@ var/global/list/obj/item/device/pda/PDAs = list() src.id.loc = get_turf(src.loc) ..() -/obj/item/device/pda/clown/HasEntered(AM as mob|obj) //Clown PDA is slippery. +/obj/item/device/pda/clown/Crossed(AM as mob|obj) //Clown PDA is slippery. if (istype(AM, /mob/living/carbon)) var/mob/M = AM if ((istype(M, /mob/living/carbon/human) && (istype(M:shoes, /obj/item/clothing/shoes) && M:shoes.flags&NOSLIP)) || M.m_intent == "walk") diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index d382b14b804..bc20a2b4e30 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -276,7 +276,7 @@ return return ..() -/obj/item/weapon/shard/HasEntered(AM as mob|obj) +/obj/item/weapon/shard/Crossed(AM as mob|obj) if(ismob(AM)) var/mob/M = AM M << "\red You step in the broken glass!" diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index e8d980c6325..209d085bd72 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -394,7 +394,7 @@ playsound(src, 'sound/effects/snap.ogg', 50, 1) del(src) -/obj/item/toy/snappop/HasEntered(H as mob|obj) +/obj/item/toy/snappop/Crossed(H as mob|obj) if((ishuman(H))) //i guess carp and shit shouldn't set them off var/mob/living/carbon/M = H if(M.m_intent == "run") diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index f11885912ec..c91f12b7617 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -277,4 +277,45 @@ assignment = "General" New() access = get_all_centcom_access() - ..() \ No newline at end of file + ..() + +/obj/item/weapon/card/id/prisoner + name = "prisoner ID card" + desc = "You are a number, you are not a free man." + icon_state = "orange" + item_state = "orange-id" + assignment = "Prisoner" + registered_name = "Scum" + var/goal = 0 //How far from freedom? + var/points = 0 + +/obj/item/weapon/card/id/prisoner/attack_self(mob/user as mob) + usr << "You have accumulated [points] out of the [goal] points you need for freedom." + +/obj/item/weapon/card/id/prisoner/one + name = "Prisoner #13-001" + registered_name = "Prisoner #13-001" + +/obj/item/weapon/card/id/prisoner/two + name = "Prisoner #13-002" + registered_name = "Prisoner #13-002" + +/obj/item/weapon/card/id/prisoner/three + name = "Prisoner #13-003" + registered_name = "Prisoner #13-003" + +/obj/item/weapon/card/id/prisoner/four + name = "Prisoner #13-004" + registered_name = "Prisoner #13-004" + +/obj/item/weapon/card/id/prisoner/five + name = "Prisoner #13-005" + registered_name = "Prisoner #13-005" + +/obj/item/weapon/card/id/prisoner/six + name = "Prisoner #13-006" + registered_name = "Prisoner #13-006" + +/obj/item/weapon/card/id/prisoner/seven + name = "Prisoner #13-007" + registered_name = "Prisoner #13-007" \ No newline at end of file diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm index 49f0b2e45f5..47d1846e6ad 100644 --- a/code/game/objects/items/weapons/clown_items.dm +++ b/code/game/objects/items/weapons/clown_items.dm @@ -8,7 +8,7 @@ /* * Banana Peals */ -/obj/item/weapon/bananapeel/HasEntered(AM as mob|obj) +/obj/item/weapon/bananapeel/Crossed(AM as mob|obj) if (istype(AM, /mob/living/carbon)) var/mob/M = AM if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP)) @@ -23,7 +23,7 @@ /* * Soap */ -/obj/item/weapon/soap/HasEntered(AM as mob|obj) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist +/obj/item/weapon/soap/Crossed(AM as mob|obj) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist if (istype(AM, /mob/living/carbon)) var/mob/M = AM if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP)) diff --git a/code/game/objects/items/weapons/grenades/bananade.dm b/code/game/objects/items/weapons/grenades/bananade.dm index fb4bcfdb77c..986fae6a358 100644 --- a/code/game/objects/items/weapons/grenades/bananade.dm +++ b/code/game/objects/items/weapons/grenades/bananade.dm @@ -1,3 +1,4 @@ + var/turf/T /obj/item/weapon/grenade/bananade diff --git a/code/game/objects/items/weapons/grenades/clowngrenade.dm b/code/game/objects/items/weapons/grenades/clowngrenade.dm index ddc0b234c49..f27374d9b25 100644 --- a/code/game/objects/items/weapons/grenades/clowngrenade.dm +++ b/code/game/objects/items/weapons/grenades/clowngrenade.dm @@ -63,7 +63,7 @@ throw_speed = 4 throw_range = 20 - HasEntered(AM as mob|obj) + Crossed(AM as mob|obj) var/burned = rand(2,5) if(istype(AM, /mob/living)) var/mob/living/M = AM diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 323bed9ed5b..d86799eaba1 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -116,7 +116,7 @@ "/obj/item/device/flash", "/obj/item/clothing/glasses", "/obj/item/ammo_casing/shotgun", - "/obj/item/ammo_magazine", + "/obj/item/ammo_box", "/obj/item/weapon/reagent_containers/food/snacks/donut/normal", "/obj/item/weapon/reagent_containers/food/snacks/donut/jelly", "/obj/item/weapon/melee/baton", diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 927d9562aaa..5040665f7be 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -359,6 +359,21 @@ new /obj/item/weapon/card/id(src) new /obj/item/weapon/card/id(src) +/obj/item/weapon/storage/box/prisoner + name = "prisoner IDs" + desc = "Take away their last shred of dignity, their name." + icon_state = "id" + + New() + ..() + new /obj/item/weapon/card/id/prisoner/one(src) + new /obj/item/weapon/card/id/prisoner/two(src) + new /obj/item/weapon/card/id/prisoner/three(src) + new /obj/item/weapon/card/id/prisoner/four(src) + new /obj/item/weapon/card/id/prisoner/five(src) + new /obj/item/weapon/card/id/prisoner/six(src) + new /obj/item/weapon/card/id/prisoner/seven(src) + /obj/item/weapon/storage/box/seccarts name = "Spare R.O.B.U.S.T. Cartridges" desc = "A box full of R.O.B.U.S.T. Cartridges, used by Security." diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm index b4a46171a56..6a818056ee2 100644 --- a/code/game/objects/items/weapons/storage/uplink_kits.dm +++ b/code/game/objects/items/weapons/storage/uplink_kits.dm @@ -24,8 +24,8 @@ return if("guns") - new /obj/item/weapon/gun/projectile(src) - new /obj/item/ammo_magazine/a357(src) + new /obj/item/weapon/gun/projectile/revolver(src) + new /obj/item/ammo_box/a357(src) new /obj/item/weapon/card/emag(src) new /obj/item/weapon/plastique(src) return @@ -58,7 +58,7 @@ return if("smoothoperator") - new /obj/item/weapon/gun/projectile/pistol(src) + new /obj/item/weapon/gun/projectile/automatic/pistol(src) new /obj/item/weapon/silencer(src) new /obj/item/weapon/soap/syndie(src) new /obj/item/weapon/storage/bag/trash(src) @@ -132,7 +132,7 @@ /obj/item/weapon/storage/box/syndie_kit/conversion/New() ..() new /obj/item/weapon/conversion_kit(src) - new /obj/item/ammo_magazine/a357(src) + new /obj/item/ammo_box/a357(src) return /obj/item/weapon/storage/box/syndie_kit/greytide diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index a63539ceb53..e873fa06f02 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -284,4 +284,12 @@ if(welded) overlays += "welded" else - icon_state = icon_opened \ No newline at end of file + icon_state = icon_opened + +// Objects that try to exit a locker by stepping were doing so successfully, +// and due to an oversight in turf/Enter() were going through walls. That +// should be independently resolved, but this is also an interesting twist. +/obj/structure/closet/Exit(atom/movable/AM) + open() + if(AM.loc == src) return 0 + return 1 \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 011f19f198a..d4748eca394 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -257,10 +257,10 @@ new /obj/item/device/radio/headset/headset_sec(src) new /obj/item/device/detective_scanner(src) new /obj/item/clothing/suit/armor/det_suit(src) - new /obj/item/ammo_magazine/c38(src) - new /obj/item/ammo_magazine/c38(src) + new /obj/item/ammo_box/c38(src) + new /obj/item/ammo_box/c38(src) + new /obj/item/weapon/gun/projectile/revolver/detective(src) new /obj/item/taperoll/police(src) - new /obj/item/weapon/gun/projectile/detective(src) new /obj/item/clothing/tie/holster/armpit(src) return diff --git a/code/game/objects/structures/crates_lockers/closets/syndicate.dm b/code/game/objects/structures/crates_lockers/closets/syndicate.dm index 5ee7383b654..840c82dd3bf 100644 --- a/code/game/objects/structures/crates_lockers/closets/syndicate.dm +++ b/code/game/objects/structures/crates_lockers/closets/syndicate.dm @@ -31,11 +31,11 @@ /obj/structure/closet/syndicate/nuclear/New() ..() sleep(2) - new /obj/item/ammo_magazine/a12mm(src) - new /obj/item/ammo_magazine/a12mm(src) - new /obj/item/ammo_magazine/a12mm(src) - new /obj/item/ammo_magazine/a12mm(src) - new /obj/item/ammo_magazine/a12mm(src) + new /obj/item/ammo_box/magazine/m12mm(src) + new /obj/item/ammo_box/magazine/m12mm(src) + new /obj/item/ammo_box/magazine/m12mm(src) + new /obj/item/ammo_box/magazine/m12mm(src) + new /obj/item/ammo_box/magazine/m12mm(src) new /obj/item/weapon/storage/box/handcuffs(src) new /obj/item/weapon/storage/box/flashbangs(src) new /obj/item/weapon/gun/energy/gun(src) diff --git a/code/game/objects/structures/segway.dm b/code/game/objects/structures/segway.dm new file mode 100644 index 00000000000..928e4235bd9 --- /dev/null +++ b/code/game/objects/structures/segway.dm @@ -0,0 +1,129 @@ +/obj/structure/stool/bed/chair/segway + name = "security segway" + desc = "Gives the illusion of authority." + icon = 'icons/obj/vehicles.dmi' + icon_state = "sec_seg_idle" + anchored = 1 + density = 1 + + var/health = 100 + var/delay = 4 //Move delay to simulate a speed + var/allowMove = 1 + var/datum/global_iterator/space_move //Handling space movement (i.e. drift forever) + +/obj/structure/stool/bed/chair/segway/New() + handle_rotation() + space_move = new /datum/global_iterator/space_movement(null,0) + return + +/obj/structure/stool/bed/chair/segway/relaymove(mob/user, direction) + if(user.stat || user.stunned || user.weakened || user.paralysis) + unbuckle() + icon_state = "sec_seg_idle" + if(istype(user.l_hand, /obj/item/sec_seg_key) || istype(user.r_hand, /obj/item/sec_seg_key)) + if(!allowMove) + return + if(src.space_move.active()) + return + allowMove = 0 + step(src, direction) + update_mob() + handle_rotation() + if(istype(src.loc, /turf/space)) + src.space_move.start(list(src,direction)) + 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(8) + buckled_mob.Weaken(5) + unbuckle() + step(src, dir) + sleep(delay) + allowMove = 1 + else + user << "Requires key in hand to drive." + +/obj/structure/stool/bed/chair/segway/Move() + . = ..() + if(buckled_mob) + if(buckled_mob.buckled == src) + buckled_mob.loc = loc + return . + +/obj/structure/stool/bed/chair/segway/Bump(var/atom/obstacle) + if(istype(obstacle, /mob)) + step(obstacle, src.dir) + else + obstacle.Bumped(src) + return + +/obj/structure/stool/bed/chair/segway/buckle_mob(mob/M, mob/user) + if(M != user || !ismob(M) || get_dist(src, user) > 1 || user.restrained() || user.lying || user.stat || M.buckled || istype(user, /mob/living/silicon)) + return + + unbuckle() + + M.visible_message(\ + "[M] climbs onto the segway!",\ + "You climb onto the segway!") + M.buckled = src + M.loc = loc + M.dir = dir + M.update_canmove() + buckled_mob = M + update_mob() + add_fingerprint(user) + icon_state = "sec_seg_move" + buckled_mob.pixel_x = 0 + buckled_mob.pixel_y = 5 + +/obj/structure/stool/bed/chair/segway/unbuckle() + if(buckled_mob) + buckled_mob.pixel_x = 0 + buckled_mob.pixel_y = 0 + ..() + +/obj/structure/stool/bed/chair/segway/handle_rotation() + if(dir == NORTH) + layer = OBJ_LAYER + else + layer = FLY_LAYER + + if(buckled_mob) + if(buckled_mob.loc != loc) + buckled_mob.buckled = null + buckled_mob.buckled = src + + update_mob() + +/obj/structure/stool/bed/chair/segway/proc/update_mob() + if(buckled_mob) + buckled_mob.dir = dir + +/obj/structure/stool/bed/chair/segway/bullet_act(var/obj/item/projectile/Proj) + if(buckled_mob) + return buckled_mob.bullet_act(Proj) + else if(istype(Proj, /obj/item/projectile/beam)) + damage(Proj.damage) + +/obj/structure/stool/bed/chair/segway/proc/damage(amount) + health -= amount + if(health <= 0) + if(buckled_mob) + buckled_mob << "The segway was destroyed!" + Del() + +/obj/item/sec_seg_key + name = "security segway key" + desc = "A key for a security segway. You feel the choice of keyring could be more professional." + icon = 'icons/obj/vehicles.dmi' + icon_state = "keys" //Needs a proper sprite + w_class = 1 + +/datum/global_iterator/space_movement //moon_theme.mp3 + delay = 5 + + process(var/obj/structure/stool/bed/chair/segway/seg as obj,direction) + if(!step(seg, direction)) + src.stop() diff --git a/code/game/objects/structures/transit_tubes.dm b/code/game/objects/structures/transit_tubes.dm index 54630d3c4a3..ec6a01cf0d3 100644 --- a/code/game/objects/structures/transit_tubes.dm +++ b/code/game/objects/structures/transit_tubes.dm @@ -97,7 +97,14 @@ obj/structure/ex_act(severity) if(tube_dirs == null) init_dirs() - +/obj/structure/transit_tube/Bumped(mob/AM as mob|obj) + var/obj/structure/transit_tube/T = locate() in AM.loc + if(T) + AM << "The tube's support pylons block your way." + return ..() + else + AM.loc = src.loc + AM << "You slip under the tube." /obj/structure/transit_tube/station/New(loc) ..(loc) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 1a2853f9168..b17d36f4df2 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -189,7 +189,7 @@ del(mymist) ismist = 0 -/obj/machinery/shower/HasEntered(atom/movable/O) +/obj/machinery/shower/Crossed(atom/movable/O) ..() wash(O) if(ismob(O)) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 26a18532dbb..7b0fdb67006 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -50,30 +50,27 @@ if(movement_disabled && usr.ckey != movement_disabled_exception) usr << "\red Movement is admin-disabled." //This is to identify lag problems return - if (!mover || !isturf(mover.loc)) + if (!mover) return 1 - //First, check objects to block exit that are not on the border - for(var/obj/obstacle in mover.loc) - if(!(obstacle.flags & ON_BORDER) && (mover != obstacle) && (forget != obstacle)) - if(!obstacle.CheckExit(mover, src)) + // First, make sure it can leave its square + if(isturf(mover.loc)) + // Nothing but border objects stop you from leaving a tile, only one loop is needed + for(var/obj/obstacle in mover.loc) + if(!obstacle.CheckExit(mover, src) && obstacle != mover && obstacle != forget) mover.Bump(obstacle, 1) return 0 - //Now, check objects to block exit that are on the border - for(var/obj/border_obstacle in mover.loc) - if((border_obstacle.flags & ON_BORDER) && (mover != border_obstacle) && (forget != border_obstacle)) - if(!border_obstacle.CheckExit(mover, src)) - mover.Bump(border_obstacle, 1) - return 0 - + var/list/large_dense = list() //Next, check objects to block entry that are on the border - for(var/obj/border_obstacle in src) - if(border_obstacle.flags & ON_BORDER) + for(var/atom/movable/border_obstacle in src) + if(border_obstacle.flags&ON_BORDER) if(!border_obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != border_obstacle)) mover.Bump(border_obstacle, 1) return 0 + else + large_dense += border_obstacle //Then, check the turf itself if (!src.CanPass(mover, src)) @@ -81,11 +78,10 @@ return 0 //Finally, check objects/mobs to block entry that are not on the border - for(var/atom/movable/obstacle in src) - if(obstacle.flags & ~ON_BORDER) - if(!obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != obstacle)) - mover.Bump(obstacle, 1) - return 0 + for(var/atom/movable/obstacle in large_dense) + if(!obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != obstacle)) + mover.Bump(obstacle, 1) + return 0 return 1 //Nothing found to block so return success! @@ -128,14 +124,6 @@ M:inertia_dir = 0 ..() var/objects = 0 - for(var/atom/A as mob|obj|turf|area in src) - if(objects > loopsanity) break - objects++ - spawn( 0 ) - if ((A && M)) - A.HasEntered(M, 1) - return - objects = 0 for(var/atom/A as mob|obj|turf|area in range(1)) if(objects > loopsanity) break objects++ diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index b0671029aac..45e87cbd86c 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -92,7 +92,6 @@ var/list/admin_verbs_fun = list( /datum/admins/proc/toggle_aliens, /datum/admins/proc/toggle_space_ninja, /client/proc/send_space_ninja, - /client/proc/zombie_event, // ZOMBB-B-BIES /client/proc/cmd_admin_add_freeform_ai_law, /client/proc/cmd_admin_add_random_ai_law, /client/proc/make_sound, diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 4c7f0dd9eb2..8d95f0c9d5b 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2032,6 +2032,11 @@ feedback_add_details("admin_secrets_fun_used","PB") message_admins("[key_name_admin(usr)] has allowed a prison break", 1) prison_break() + if("radiation") + feedback_inc("admin_secrets_fun_used",1) + feedback_add_details("admin_secrets_fun_used","RAD") + message_admins("[key_name_admin(usr)] has started a radiation event", 1) + new /datum/event/radiation_storm if("lightout") feedback_inc("admin_secrets_fun_used",1) feedback_add_details("admin_secrets_fun_used","LO") diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 0659622f6a0..cc2012adcac 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -604,7 +604,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that M.equip_to_slot_or_del(new /obj/item/weapon/cloaking_device(M), slot_r_store) M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile(M), slot_r_hand) - M.equip_to_slot_or_del(new /obj/item/ammo_magazine/a357(M), slot_l_store) + M.equip_to_slot_or_del(new /obj/item/ammo_box/a357(M), slot_l_store) if ("tournament chef") //Steven Seagal FTW M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chef(M), slot_w_uniform) @@ -718,8 +718,8 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that for(var/i=3, i>0, i--) sec_briefcase.contents += new /obj/item/weapon/spacecash/c1000 sec_briefcase.contents += new /obj/item/weapon/gun/energy/crossbow - sec_briefcase.contents += new /obj/item/weapon/gun/projectile/mateba - sec_briefcase.contents += new /obj/item/ammo_magazine/a357 + sec_briefcase.contents += new /obj/item/weapon/gun/projectile/revolver/mateba + sec_briefcase.contents += new /obj/item/ammo_box/a357 sec_briefcase.contents += new /obj/item/weapon/plastique M.equip_to_slot_or_del(sec_briefcase, slot_l_hand) @@ -900,7 +900,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses) M.equip_to_slot_or_del(new /obj/item/clothing/suit/hgpirate(M), slot_wear_suit) M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(M), slot_back) - M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/mateba(M), slot_belt) + M.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(M), slot_belt) M.equip_to_slot_or_del(new /obj/item/clothing/under/soviet(M), slot_w_uniform) var/obj/item/weapon/card/id/W = new(M) W.name = "[M.real_name]'s ID Card" diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm index 8ea48ea4898..27e92cf75be 100644 --- a/code/modules/admin/verbs/striketeam.dm +++ b/code/modules/admin/verbs/striketeam.dm @@ -140,7 +140,7 @@ var/global/sent_strike_team = 0 equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(src), slot_back) equip_to_slot_or_del(new /obj/item/weapon/storage/box(src), slot_in_backpack) - equip_to_slot_or_del(new /obj/item/ammo_magazine/a357(src), slot_in_backpack) + equip_to_slot_or_del(new /obj/item/ammo_box/a357(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/weapon/storage/box/flashbangs(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_in_backpack) @@ -153,7 +153,7 @@ var/global/sent_strike_team = 0 equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword(src), slot_l_store) equip_to_slot_or_del(new /obj/item/weapon/grenade/flashbang(src), slot_r_store) equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen(src), slot_s_store) - equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/mateba(src), slot_belt) + equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(src), slot_belt) equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle(src), slot_r_hand) diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm index e8c446d966e..e71fe284608 100644 --- a/code/modules/admin/verbs/striketeam_syndicate.dm +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -149,7 +149,7 @@ var/global/sent_syndicate_strike_team = 0 equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(src), slot_back) equip_to_slot_or_del(new /obj/item/weapon/storage/box(src), slot_in_backpack) - equip_to_slot_or_del(new /obj/item/ammo_magazine/c45(src), slot_in_backpack) + equip_to_slot_or_del(new /obj/item/ammo_box/c45(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/regular(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/weapon/plastique(src), slot_in_backpack) equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_in_backpack) @@ -162,7 +162,7 @@ var/global/sent_syndicate_strike_team = 0 equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword(src), slot_l_store) equip_to_slot_or_del(new /obj/item/weapon/grenade/empgrenade(src), slot_r_store) equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen(src), slot_s_store) - equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/silenced(src), slot_belt) + equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/automatic/silenced(src), slot_belt) equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle(src), slot_r_hand) //Will change to something different at a later time -- Superxpdude diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 7d834bd0a00..477313114d2 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -104,13 +104,13 @@ special_assembly.HasProximity(AM) - HasEntered(atom/movable/AM as mob|obj) + Crossed(atom/movable/AM as mob|obj) if(a_left) - a_left.HasEntered(AM) + a_left.Crossed(AM) if(a_right) - a_right.HasEntered(AM) + a_right.Crossed(AM) if(special_assembly) - special_assembly.HasEntered(AM) + special_assembly.Crossed(AM) on_found(mob/finder as mob) diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index 3e57e3bed92..47728ad295a 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -253,7 +253,7 @@ hit() return -/obj/effect/beam/i_beam/HasEntered(atom/movable/AM as mob|obj) +/obj/effect/beam/i_beam/Crossed(atom/movable/AM as mob|obj) if(istype(AM, /obj/effect/beam)) return spawn(0) diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 4d2c8fa53b9..ff3abadccba 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -81,7 +81,7 @@ ..() - HasEntered(AM as mob|obj) + Crossed(AM as mob|obj) if(armed) if(ishuman(AM)) var/mob/living/carbon/H = AM diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index dcad6c6878a..9ea065e8e71 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -241,7 +241,7 @@ //send resources to the client. It's here in its own proc so we can move it around easiliy if need be /client/proc/send_resources() - preload_vox() +// preload_vox() getFiles( 'nano/js/libraries.min.js', 'nano/js/nano_update.js', @@ -252,6 +252,7 @@ 'nano/templates/chem_dispenser.tmpl', 'nano/templates/cryo.tmpl', 'nano/templates/dna_modifier.tmpl', + 'nano/templates/geoscanner.tmpl', 'nano/templates/air_alarm.tmpl', 'nano/images/uiBackground.png', 'nano/images/uiIcons16.png', @@ -299,9 +300,5 @@ 'icons/spideros_icons/sos_11.png', 'icons/spideros_icons/sos_12.png', 'icons/spideros_icons/sos_13.png', - 'icons/spideros_icons/sos_14.png', - 'icons/xenoarch_icons/chart1.jpg', - 'icons/xenoarch_icons/chart2.jpg', - 'icons/xenoarch_icons/chart3.jpg', - 'icons/xenoarch_icons/chart4.jpg' + 'icons/spideros_icons/sos_14.png' ) diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 223f9ee257f..685125cb241 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -130,4 +130,5 @@ name = "roman sandals" desc = "Sandals with buckled leather straps on it." icon_state = "roman" - item_state = "roman" \ No newline at end of file + item_state = "roman" + species_restricted = null \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/alien.dm b/code/modules/clothing/spacesuits/alien.dm index cf03526dbe3..181a9473cb8 100644 --- a/code/modules/clothing/spacesuits/alien.dm +++ b/code/modules/clothing/spacesuits/alien.dm @@ -101,7 +101,7 @@ /obj/item/clothing/suit/space/vox w_class = 3 - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank) slowdown = 2 armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS diff --git a/code/modules/clothing/spacesuits/captain.dm b/code/modules/clothing/spacesuits/captain.dm index 7757b1a2096..878f7d14206 100644 --- a/code/modules/clothing/spacesuits/captain.dm +++ b/code/modules/clothing/spacesuits/captain.dm @@ -20,7 +20,7 @@ permeability_coefficient = 0.02 flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS - allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs) + allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs) slowdown = 1.5 armor = list(melee = 65, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT diff --git a/code/modules/clothing/spacesuits/ert.dm b/code/modules/clothing/spacesuits/ert.dm index 416282105cb..50743350a6a 100644 --- a/code/modules/clothing/spacesuits/ert.dm +++ b/code/modules/clothing/spacesuits/ert.dm @@ -28,7 +28,7 @@ icon_state = "ert_commander" item_state = "suit-command" w_class = 3 - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) slowdown = 1 armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 100, rad = 60) allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, \ diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index da74faeaa02..095807f6232 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -19,7 +19,7 @@ permeability_coefficient = 0.02 flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS - allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_magazine, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs) + allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs) slowdown = 1.5 armor = list(melee = 65, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT @@ -77,7 +77,7 @@ icon_state = "pirate" item_state = "pirate" w_class = 3 - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) slowdown = 0 armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) siemens_coefficient = 0.9 diff --git a/code/modules/clothing/spacesuits/ninja.dm b/code/modules/clothing/spacesuits/ninja.dm index 8f49738fbfe..a2eb1d2dd6c 100644 --- a/code/modules/clothing/spacesuits/ninja.dm +++ b/code/modules/clothing/spacesuits/ninja.dm @@ -13,7 +13,7 @@ desc = "A unique, vaccum-proof suit of nano-enhanced armor designed specifically for Spider Clan assassins." icon_state = "s-ninja" item_state = "s-ninja_suit" - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/cell) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen,/obj/item/weapon/cell) slowdown = 0 armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) siemens_coefficient = 0.2 diff --git a/code/modules/clothing/spacesuits/rig.dm b/code/modules/clothing/spacesuits/rig.dm index 55ba6af4a1c..329f4065b56 100644 --- a/code/modules/clothing/spacesuits/rig.dm +++ b/code/modules/clothing/spacesuits/rig.dm @@ -145,7 +145,7 @@ slowdown = 1 w_class = 3 armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 60) - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs) + allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs) siemens_coefficient = 0.6 diff --git a/code/modules/clothing/spacesuits/syndi.dm b/code/modules/clothing/spacesuits/syndi.dm index f2829fbdf87..0e806c2476a 100644 --- a/code/modules/clothing/spacesuits/syndi.dm +++ b/code/modules/clothing/spacesuits/syndi.dm @@ -14,7 +14,7 @@ item_state = "space_suit_syndicate" desc = "Has a tag on it: Totally not property of of a hostile corporation, honest!" w_class = 3 - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) slowdown = 1 armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) siemens_coefficient = 0.8 diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index fdd54d63507..a39a873a96d 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -1,6 +1,6 @@ /obj/item/clothing/suit/armor - allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs) + allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs) body_parts_covered = UPPER_TORSO|LOWER_TORSO flags = FPRINT | TABLEPASS @@ -72,7 +72,7 @@ permeability_coefficient = 0.01 flags = FPRINT | TABLEPASS body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) slowdown = 1 armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 0, rad = 0) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index aa44edc6b69..5938b8bc4e1 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -81,7 +81,7 @@ item_state = "det_suit" blood_overlay_type = "coat" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS - allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder) + allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/device/detective_scanner,/obj/item/device/taperecorder) armor = list(melee = 50, bullet = 10, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0) //Forensics @@ -90,7 +90,7 @@ desc = "A forensics technician jacket." item_state = "det_suit" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/device/detective_scanner,/obj/item/device/taperecorder) + allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/device/detective_scanner,/obj/item/device/taperecorder) armor = list(melee = 10, bullet = 10, laser = 15, energy = 10, bomb = 0, bio = 0, rad = 0) /obj/item/clothing/suit/storage/forensics/red diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 2761d333308..747318b2301 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -940,27 +940,6 @@ name = "well-used stun baton" desc = "A stun baton used for incapacitating targets; there seems to be a bunch of tally marks set into the handle." -///// Deckard .44 - Callum Leamas - Roaper -/obj/item/weapon/gun/projectile/detective/fluff/callum_leamas - name = "Deckard .44" - desc = "A custom built revolver, based off the semi-popular Detective Special model." - icon = 'icons/obj/custom_items.dmi' - icon_state = "leamas-empty" - -/obj/item/weapon/gun/projectile/detective/fluff/callum_leamas/update_icon() - - ..() - if(loaded.len) - icon_state = "leamas-loaded" - else - icon_state = "leamas-empty" - -/obj/item/weapon/gun/projectile/attackby(var/obj/item/A as obj, mob/user as mob) - - if(istype(A, /obj/item/ammo_magazine)) - flick("leamas-reloading",src) - ..() - diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm index ad79eed5164..a288f61a0f9 100644 --- a/code/modules/events/radiation_storm.dm +++ b/code/modules/events/radiation_storm.dm @@ -1,15 +1,36 @@ /datum/event/radiation_storm announceWhen = 1 oneShot = 1 + var/safe_zones = list( + /area/maintenance, + /area/crew_quarters/sleep, + /area/security/brig, + /area/shuttle, + /area/vox_station, + /area/syndicate_station + ) /datum/event/radiation_storm/announce() // Don't do anything, we want to pack the announcement with the actual event +/datum/event/radiation_storm/proc/is_safe_zone(var/area/A) + for(var/szt in safe_zones) + if(istype(A, szt)) + return 1 + return 0 + + /datum/event/radiation_storm/start() spawn() world << sound('sound/AI/radiation.ogg') command_alert("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert") + + for(var/area/A in world) + if(A.z != 1 || is_safe_zone(A)) + continue + A.radiation_alert() + make_maint_all_access() @@ -23,9 +44,7 @@ var/turf/T = get_turf(H) if(!T) continue - if(T.z != 1) - continue - if(istype(T.loc, /area/maintenance) || istype(T.loc, /area/crew_quarters)) + if(T.z != 1 || is_safe_zone(T.loc)) continue if(istype(H,/mob/living/carbon/human)) @@ -52,6 +71,10 @@ command_alert("The station has passed the radiation belt. Please report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert") + for(var/area/A in world) + if(A.z != 1 || is_safe_zone(A)) + continue + A.reset_radiation_alert() sleep(600) // Want to give them time to get out of maintenance. diff --git a/code/modules/events/tgevents/vent_clog.dm b/code/modules/events/tgevents/vent_clog.dm old mode 100644 new mode 100755 index 775c30d6373..b583d584520 --- a/code/modules/events/tgevents/vent_clog.dm +++ b/code/modules/events/tgevents/vent_clog.dm @@ -22,7 +22,9 @@ var/obj/vent = pick_n_take(vents) var/list/gunk = list("water","carbon","flour","radium","toxin","cleaner","nutriment","condensedcapsaicin","psilocybin","lube", - "plantbgone","banana","anti_toxin","space_drugs","hyperzine","holywater","ethanol","hot_coco","pacid") + "plantbgone","banana","anti_toxin","space_drugs","hyperzine","holywater","ethanol","hot_coco","pacid", + "blood","stoxin","flourine","ryetalyn","thermite","mutagen","oxycodone","fuel","plasma","cryptobiolin", + "impedrezene","mindbreaker","nanites","xenomicrobes","lipozine","frostoil","doctorsdelight","beepskysmash","tricordrazine") var/datum/reagents/R = new/datum/reagents(50) R.my_atom = vent R.add_reagent(pick(gunk), 50) @@ -31,4 +33,4 @@ smoke.set_up(R, rand(1, 2), 0, vent, 0, silent = 1) playsound(vent.loc, 'sound/effects/smoke.ogg', 50, 1, -3) smoke.start() - R.delete() //GC the reagents \ No newline at end of file + R.delete() //GC the reagents diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 18e4f2916a5..a73557def85 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -252,7 +252,7 @@ proc/check_panel(mob/M) return - HasEntered(var/mob/M, somenumber) + Crossed(var/mob/M, somenumber) if(M == my_target) step_away(src,my_target,2) if(prob(30)) @@ -332,7 +332,7 @@ proc/check_panel(mob/M) del(O) return -var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/item/ammo_magazine/a357,\ +var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/item/ammo_box/a357,\ /obj/item/weapon/gun/energy/crossbow, /obj/item/weapon/melee/energy/sword,\ /obj/item/weapon/storage/box/syndicate, /obj/item/weapon/storage/box/emps,\ /obj/item/weapon/cartridge/syndicate, /obj/item/clothing/under/chameleon,\ diff --git a/code/modules/mining/laborcamp/laborminerals.dm b/code/modules/mining/laborcamp/laborminerals.dm new file mode 100644 index 00000000000..dec87ade70a --- /dev/null +++ b/code/modules/mining/laborcamp/laborminerals.dm @@ -0,0 +1,2 @@ +/turf/simulated/mineral/random/labormineral + mineralSpawnChanceList = list("Uranium" = 5, "Iron" = 50, "Diamond" = 1, "Gold" = 5, "Silver" = 5, "Plasma" = 25/*, "Adamantine" =5, "Cave" = 1 */) //Don't suffocate the prisoners with caves \ No newline at end of file diff --git a/code/modules/mining/laborcamp/laborshuttle.dm b/code/modules/mining/laborcamp/laborshuttle.dm new file mode 100644 index 00000000000..c9926d429a6 --- /dev/null +++ b/code/modules/mining/laborcamp/laborshuttle.dm @@ -0,0 +1,136 @@ +var/labor_shuttle_tickstomove = 10 +var/labor_shuttle_moving = 0 +var/labor_shuttle_location = 0 // 0 = station 13, 1 = labor station + +proc/move_labor_shuttle() //TODO: Security Access only; add moving the shuttle to the station to the release button. + + if(labor_shuttle_moving) return + labor_shuttle_moving = 1 + spawn(labor_shuttle_tickstomove*10) + var/area/fromArea + var/area/toArea + if (labor_shuttle_location == 1) + fromArea = locate(/area/shuttle/siberia/outpost) + toArea = locate(/area/shuttle/siberia/station) + + else + fromArea = locate(/area/shuttle/siberia/station) + toArea = locate(/area/shuttle/siberia/outpost) + + var/list/dstturfs = list() + var/throwy = world.maxy + + for(var/turf/T in toArea) + dstturfs += T + if(T.y < throwy) + throwy = T.y + + // hey you, get out of the way! + for(var/turf/T in dstturfs) + // find the turf to move things to + var/turf/D = locate(T.x, throwy - 1, 1) + //var/turf/E = get_step(D, SOUTH) + for(var/atom/movable/AM as mob|obj in T) + AM.Move(D) + // NOTE: Commenting this out to avoid recreating mass driver glitch + /* + spawn(0) + AM.throw_at(E, 1, 1) + return + */ + + if(istype(T, /turf/simulated)) + del(T) + + for(var/mob/living/carbon/bug in toArea) // If someone somehow is still in the shuttle's docking area... + bug.gib() + + fromArea.move_contents_to(toArea) + if (labor_shuttle_location) + labor_shuttle_location = 0 + else + labor_shuttle_location = 1 + + for(var/mob/M in toArea) + if(M.client) + spawn(0) + if(M.buckled) + shake_camera(M, 3, 1) // buckled, not a lot of shaking + else + shake_camera(M, 10, 1) // unbuckled, HOLY SHIT SHAKE THE ROOM + if(istype(M, /mob/living/carbon)) + if(!M.buckled) + M.Weaken(3) + + labor_shuttle_moving = 0 + return + +/obj/machinery/computer/labor_shuttle + name = "Labor Shuttle Console" + icon = 'icons/obj/computer.dmi' + icon_state = "shuttle" + circuit = "/obj/item/weapon/circuitboard/labor_shuttle" + var/location = 0 //0 = station, 1 = labor camp + req_access = list(access_brig) + var/hacked = 0 + +/obj/machinery/computer/labor_shuttle/attack_hand(user as mob) + if(..(user)) + return + src.add_fingerprint(usr) + var/dat + dat = text("
Send Labor Shuttle
") + //user << browse("[dat]", "window=laborshuttle;size=200x100") + var/datum/browser/popup = new(user, "laborshuttle", name, 200, 140) + popup.set_content(dat) + popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state)) + popup.open() + +/obj/machinery/computer/labor_shuttle/Topic(href, href_list) + usr.set_machine(src) + src.add_fingerprint(usr) + if(href_list["move"]) + if(!allowed(usr)) + usr << "\red Access denied." + return + if (!labor_shuttle_moving) + usr << "\blue Shuttle recieved message and will be sent shortly." + move_labor_shuttle() + else + usr << "\blue Shuttle is already moving." + +/obj/machinery/computer/labor_shuttle/attackby(obj/item/weapon/W as obj, mob/user as mob) + + if (istype(W, /obj/item/weapon/card/emag)) + src.req_access = list() + hacked = 1 + usr << "You fried the consoles ID checking system. It's now available to everyone!" + + else + ..() + + + +/obj/machinery/computer/labor_shuttle/one_way + name = "Prisoner Shuttle Console" + desc = "A one-way shuttle console, used to summon the shuttle to the labor camp." + circuit = "/obj/item/weapon/circuitboard/one_way_shuttle" + req_access = list( ) + +/obj/machinery/computer/labor_shuttle/one_way/attack_hand(user as mob) + if(..(user)) + return + src.add_fingerprint(usr) + var/dat + dat = text("
Summon Labor Shuttle
") + //user << browse("[dat]", "window=laborshuttle;size=200x100") + var/datum/browser/popup = new(user, "laborshuttle", name, 200, 140) + popup.set_content(dat) + popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state)) + popup.open() + +/obj/machinery/computer/labor_shuttle/one_way/Topic(href, href_list) + if(href_list["move"] && labor_shuttle_location == 1) + usr << "\blue Shuttle is already at the outpost." + return + ..() \ No newline at end of file diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm new file mode 100644 index 00000000000..01091751f8c --- /dev/null +++ b/code/modules/mining/laborcamp/laborstacker.dm @@ -0,0 +1,115 @@ +/**********************Prisoners' Console**************************/ + +/obj/machinery/mineral/labor_claim_console + name = "Point Claim Console" + icon = 'icons/obj/machines/mining_machines.dmi' + icon_state = "console" + desc = "A stacking console with an electromagnetic writer, used to track ore mined by prisoners." + density = 1 + anchored = 1 + var/obj/machinery/mineral/stacking_machine/laborstacker/machine = null + var/machinedir = SOUTH + var/obj/item/weapon/card/id/prisoner/inserted_id + var/obj/machinery/door/airlock/release_door + var/door_tag = "prisonshuttle" + +/obj/machinery/mineral/labor_claim_console/New() + ..() + spawn(7) + src.machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir)) + var/t + for(var/obj/machinery/door/airlock/d in range(5,src)) + t = d.id_tag + if(t == src.door_tag) + src.release_door = d + if (machine && release_door) + machine.CONSOLE = src + else + del(src) + +/obj/machinery/mineral/labor_claim_console/attack_hand(user as mob) + var/dat + dat += text("Point Claim Console

") + if(emagged) + dat += text("QU&#t0A In%aL*D
") + dat += text("Proceed to Station.
") + dat += text("Open release door.
") + if(istype(inserted_id)) + var/p = inserted_id.points + var/g = inserted_id.goal + dat += text("[p] / [g] collected. Eject ID.
") + dat += text("Unclaimed Collection Points: [machine.points]. Claim points.
") + if(p >= g) + dat += text("Quota met.
") + dat += text("Proceed to Station.
") + dat += text("Open release door.
") + else + dat += text("No ID inserted. Insert ID.
") + + + user << browse("[dat]", "window=console_stacking_machine") + + +/obj/machinery/mineral/labor_claim_console/attackby(obj/item/I as obj, mob/user as mob) + if(istype(I, /obj/item/weapon/card/emag)) + emagged = 1 + user << "PZZTTPFFFT" + return + else if(istype(I, /obj/item/weapon/card/id)) + return attack_hand(user) + ..() + + + + + +/obj/machinery/mineral/labor_claim_console/Topic(href, href_list) + usr.set_machine(src) + src.add_fingerprint(usr) + if(href_list["choice"]) + switch(href_list["choice"]) + if("0") + var/obj/item/weapon/card/id/prisoner/I = usr.get_active_hand() + if(istype(I)) + usr.drop_item() + I.loc = src + inserted_id = I + else usr << "\red No valid ID." + if("1") + inserted_id.loc = get_step(src,get_turf(usr)) + inserted_id = null + if("2") + inserted_id.points += machine.points + machine.points = 0 + usr << "Points transferred." + if("3") + if(labor_shuttle_location == 1) + if (!labor_shuttle_moving) + usr << "\blue Shuttle recieved message and will be sent shortly." + move_labor_shuttle() + else + usr << "\blue Shuttle is already moving." + else + usr << "\blue Shuttle is already on-station." + if("4") + if(release_door.density) + release_door.open() + + src.updateUsrDialog() + return + + +/**********************Prisoner Collection Unit**************************/ + + +/obj/machinery/mineral/stacking_machine/laborstacker + var/points = 0 //The unclaimed value of ore stacked. Value for each ore loosely relative to its rarity. Iron = 1; Diamond = 25. + var/list/ore_values = list(("metal" = 1), ("diamond" = 25), ("solid plasma" = 2), ("gold" = 5), ("silver" = 5), ("bananium" = 9999), ("uranium" = 5), ("glass" = 1), ("reinforced glass" = 2), ("plasteel" = 3)) + +/obj/machinery/mineral/stacking_machine/laborstacker/process_sheet(obj/item/stack/sheet/inp) + if(istype(inp)) + var/n = inp.name + var/a = inp.amount + if(n in ore_values) + points += ore_values[n] * a + ..() \ No newline at end of file diff --git a/code/modules/mining/machine_stacking.dm b/code/modules/mining/machine_stacking.dm index 46a37dae549..19cce3caeab 100644 --- a/code/modules/mining/machine_stacking.dm +++ b/code/modules/mining/machine_stacking.dm @@ -18,57 +18,23 @@ else del(src) -/obj/machinery/mineral/stacking_unit_console/process() - updateDialog() - -/obj/machinery/mineral/stacking_unit_console/attack_hand(mob/user) - add_fingerprint(user) - interact(user) - -/obj/machinery/mineral/stacking_unit_console/interact(mob/user) - user.set_machine(src) +/obj/machinery/mineral/stacking_unit_console/attack_hand(user as mob) + var/obj/item/stack/sheet/s var/dat dat += text("Stacking unit console

") - if(machine.ore_iron) - dat += text("Iron: [machine.ore_iron] Release
") - if(machine.ore_plasteel) - dat += text("Plasteel: [machine.ore_plasteel] Release
") - if(machine.ore_glass) - dat += text("Glass: [machine.ore_glass] Release
") - if(machine.ore_rglass) - dat += text("Reinforced Glass: [machine.ore_rglass] Release
") - if(machine.ore_plasma) - dat += text("Plasma: [machine.ore_plasma] Release
") - if(machine.ore_gold) - dat += text("Gold: [machine.ore_gold] Release
") - if(machine.ore_silver) - dat += text("Silver: [machine.ore_silver] Release
") - if(machine.ore_uranium) - dat += text("Uranium: [machine.ore_uranium] Release
") - if(machine.ore_diamond) - dat += text("Diamond: [machine.ore_diamond] Release
") - if(machine.ore_wood) - dat += text("Wood: [machine.ore_wood] Release
") - if(machine.ore_cardboard) - dat += text("Cardboard: [machine.ore_cardboard] Release
") - if(machine.ore_cloth) - dat += text("Cloth: [machine.ore_cloth] Release
") - if(machine.ore_leather) - dat += text("Leather: [machine.ore_leather] Release
") - if(machine.ore_clown) - dat += text("Bananium: [machine.ore_clown] Release
") - if(machine.ore_adamantine) - dat += text ("Adamantine: [machine.ore_adamantine] Release
") - if(machine.ore_mythril) - dat += text ("Mythril: [machine.ore_mythril] Release
") + for(var/O in machine.stack_list) + s = machine.stack_list[O] + if(s.amount > 0) + dat += text("[s.name]: [s.amount] Release
") dat += text("
Stacking: [machine.stack_amt]

") user << browse("[dat]", "window=console_stacking_machine") - onclose(user, "console_stacking_machine") + + return /obj/machinery/mineral/stacking_unit_console/Topic(href, href_list) if(..()) @@ -76,103 +42,13 @@ usr.set_machine(src) src.add_fingerprint(usr) if(href_list["release"]) - switch(href_list["release"]) - if ("plasma") - if (machine.ore_plasma > 0) - var/obj/item/stack/sheet/mineral/plasma/G = new /obj/item/stack/sheet/mineral/plasma - G.amount = machine.ore_plasma - G.loc = machine.output.loc - machine.ore_plasma = 0 - if ("uranium") - if (machine.ore_uranium > 0) - var/obj/item/stack/sheet/mineral/uranium/G = new /obj/item/stack/sheet/mineral/uranium - G.amount = machine.ore_uranium - G.loc = machine.output.loc - machine.ore_uranium = 0 - if ("glass") - if (machine.ore_glass > 0) - var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass - G.amount = machine.ore_glass - G.loc = machine.output.loc - machine.ore_glass = 0 - if ("rglass") - if (machine.ore_rglass > 0) - var/obj/item/stack/sheet/rglass/G = new /obj/item/stack/sheet/rglass - G.amount = machine.ore_rglass - G.loc = machine.output.loc - machine.ore_rglass = 0 - if ("gold") - if (machine.ore_gold > 0) - var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold - G.amount = machine.ore_gold - G.loc = machine.output.loc - machine.ore_gold = 0 - if ("silver") - if (machine.ore_silver > 0) - var/obj/item/stack/sheet/mineral/silver/G = new /obj/item/stack/sheet/mineral/silver - G.amount = machine.ore_silver - G.loc = machine.output.loc - machine.ore_silver = 0 - if ("diamond") - if (machine.ore_diamond > 0) - var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond - G.amount = machine.ore_diamond - G.loc = machine.output.loc - machine.ore_diamond = 0 - if ("iron") - if (machine.ore_iron > 0) - var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal - G.amount = machine.ore_iron - G.loc = machine.output.loc - machine.ore_iron = 0 - if ("plasteel") - if (machine.ore_plasteel > 0) - var/obj/item/stack/sheet/plasteel/G = new /obj/item/stack/sheet/plasteel - G.amount = machine.ore_plasteel - G.loc = machine.output.loc - machine.ore_plasteel = 0 - if ("wood") - if (machine.ore_wood > 0) - var/obj/item/stack/sheet/wood/G = new /obj/item/stack/sheet/wood - G.amount = machine.ore_wood - G.loc = machine.output.loc - machine.ore_wood = 0 - if ("cardboard") - if (machine.ore_cardboard > 0) - var/obj/item/stack/sheet/cardboard/G = new /obj/item/stack/sheet/cardboard - G.amount = machine.ore_cardboard - G.loc = machine.output.loc - machine.ore_cardboard = 0 - if ("cloth") - if (machine.ore_cloth > 0) - var/obj/item/stack/sheet/cloth/G = new /obj/item/stack/sheet/cloth - G.amount = machine.ore_cloth - G.loc = machine.output.loc - machine.ore_cloth = 0 - if ("leather") - if (machine.ore_leather > 0) - var/obj/item/stack/sheet/leather/G = new /obj/item/stack/sheet/leather - G.amount = machine.ore_diamond - G.loc = machine.output.loc - machine.ore_leather = 0 - if ("clown") - if (machine.ore_clown > 0) - var/obj/item/stack/sheet/mineral/clown/G = new /obj/item/stack/sheet/mineral/clown - G.amount = machine.ore_clown - G.loc = machine.output.loc - machine.ore_clown = 0 - if ("adamantine") - if (machine.ore_adamantine > 0) - var/obj/item/stack/sheet/mineral/adamantine/G = new /obj/item/stack/sheet/mineral/adamantine - G.amount = machine.ore_adamantine - G.loc = machine.output.loc - machine.ore_adamantine = 0 - if ("mythril") - if (machine.ore_mythril > 0) - var/obj/item/stack/sheet/mineral/mythril/G = new /obj/item/stack/sheet/mineral/mythril - G.amount = machine.ore_mythril - G.loc = machine.output.loc - machine.ore_mythril = 0 + var/obj/item/stack/sheet/inp = machine.stack_list[text2path(href_list["release"])] + var/obj/item/stack/sheet/out = new inp.type() + out.amount = inp.amount + inp.amount = 0 + out.loc = machine.output.loc + + src.updateUsrDialog() return @@ -191,22 +67,7 @@ var/stk_amt = list() var/obj/machinery/mineral/input = null var/obj/machinery/mineral/output = null - var/ore_gold = 0; - var/ore_silver = 0; - var/ore_diamond = 0; - var/ore_plasma = 0; - var/ore_iron = 0; - var/ore_uranium = 0; - var/ore_clown = 0; - var/ore_glass = 0; - var/ore_rglass = 0; - var/ore_plasteel = 0; - var/ore_wood = 0 - var/ore_cardboard = 0 - var/ore_cloth = 0; - var/ore_leather = 0; - var/ore_adamantine = 0; - var/ore_mythril = 0; + var/stack_list[0] //Key: Type. Value: Instance of type. var/stack_amt = 50; //ammount to stack before releassing /obj/machinery/mineral/stacking_machine/New() @@ -218,177 +79,32 @@ for (var/dir in cardinal) src.output = locate(/obj/machinery/mineral/output, get_step(src, dir)) if(src.output) break + if(!istype(output) || !istype(input)) + del(src) + return processing_objects.Add(src) return return +/obj/machinery/mineral/stacking_machine/proc/process_sheet(obj/item/stack/sheet/inp) + if(!istype(inp)) //Non-sheets. Yuck. + return + if(!(inp.type in stack_list)) //It's the first of this sheet added + stack_list[inp.type] = new inp.type(src,0) + var/obj/item/stack/sheet/storage = stack_list[inp.type] + storage.amount += inp.amount //Stack the sheets + inp.loc = null //Let the old sheet garbage collect + while(storage.amount > stack_amt) //Get rid of excessive stackage + var/obj/item/stack/sheet/out = new inp.type() + out.amount = stack_amt + out.loc = output.loc + storage.amount -= stack_amt + + /obj/machinery/mineral/stacking_machine/process() - if (src.output && src.input) - var/obj/item/O - while (locate(/obj/item, input.loc)) - O = locate(/obj/item, input.loc) - if (istype(O,/obj/item/stack/sheet/metal)) - ore_iron+= O:amount; - del(O) - continue - if (istype(O,/obj/item/stack/sheet/mineral/diamond)) - ore_diamond+= O:amount; - del(O) - continue - if (istype(O,/obj/item/stack/sheet/mineral/plasma)) - ore_plasma+= O:amount - del(O) - continue - if (istype(O,/obj/item/stack/sheet/mineral/gold)) - ore_gold+= O:amount - del(O) - continue - if (istype(O,/obj/item/stack/sheet/mineral/silver)) - ore_silver+= O:amount - del(O) - continue - if (istype(O,/obj/item/stack/sheet/mineral/clown)) - ore_clown+= O:amount - del(O) - continue - if (istype(O,/obj/item/stack/sheet/mineral/uranium)) - ore_uranium+= O:amount - del(O) - continue - if (istype(O,/obj/item/stack/sheet/glass)) - ore_glass+= O:amount - del(O) - continue - if (istype(O,/obj/item/stack/sheet/rglass)) - ore_rglass+= O:amount - del(O) - continue - if (istype(O,/obj/item/stack/sheet/plasteel)) - ore_plasteel+= O:amount - del(O) - continue - if (istype(O,/obj/item/stack/sheet/mineral/adamantine)) - ore_adamantine+= O:amount - del(O) - continue - if (istype(O,/obj/item/stack/sheet/mineral/mythril)) - ore_mythril+= O:amount - del(O) - continue - if (istype(O,/obj/item/stack/sheet/cardboard)) - ore_cardboard+= O:amount - del(O) - continue - if (istype(O,/obj/item/stack/sheet/wood)) - ore_wood+= O:amount - del(O) - continue - if (istype(O,/obj/item/stack/sheet/cloth)) - ore_cloth+= O:amount - del(O) - continue - if (istype(O,/obj/item/stack/sheet/leather)) - ore_leather+= O:amount - del(O) - continue - if (istype(O,/obj/item/weapon/ore/slag)) - del(O) - continue - O.loc = src.output.loc - if (ore_gold >= stack_amt) - var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold - G.amount = stack_amt - G.loc = output.loc - ore_gold -= stack_amt - return - if (ore_silver >= stack_amt) - var/obj/item/stack/sheet/mineral/silver/G = new /obj/item/stack/sheet/mineral/silver - G.amount = stack_amt - G.loc = output.loc - ore_silver -= stack_amt - return - if (ore_diamond >= stack_amt) - var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond - G.amount = stack_amt - G.loc = output.loc - ore_diamond -= stack_amt - return - if (ore_plasma >= stack_amt) - var/obj/item/stack/sheet/mineral/plasma/G = new /obj/item/stack/sheet/mineral/plasma - G.amount = stack_amt - G.loc = output.loc - ore_plasma -= stack_amt - return - if (ore_iron >= stack_amt) - var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal - G.amount = stack_amt - G.loc = output.loc - ore_iron -= stack_amt - return - if (ore_clown >= stack_amt) - var/obj/item/stack/sheet/mineral/clown/G = new /obj/item/stack/sheet/mineral/clown - G.amount = stack_amt - G.loc = output.loc - ore_clown -= stack_amt - return - if (ore_uranium >= stack_amt) - var/obj/item/stack/sheet/mineral/uranium/G = new /obj/item/stack/sheet/mineral/uranium - G.amount = stack_amt - G.loc = output.loc - ore_uranium -= stack_amt - return - if (ore_glass >= stack_amt) - var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass - G.amount = stack_amt - G.loc = output.loc - ore_glass -= stack_amt - return - if (ore_rglass >= stack_amt) - var/obj/item/stack/sheet/rglass/G = new /obj/item/stack/sheet/rglass - G.amount = stack_amt - G.loc = output.loc - ore_rglass -= stack_amt - return - if (ore_plasteel >= stack_amt) - var/obj/item/stack/sheet/plasteel/G = new /obj/item/stack/sheet/plasteel - G.amount = stack_amt - G.loc = output.loc - ore_plasteel -= stack_amt - return - if (ore_wood >= stack_amt) - var/obj/item/stack/sheet/wood/G = new /obj/item/stack/sheet/wood - G.amount = stack_amt - G.loc = output.loc - ore_wood -= stack_amt - return - if (ore_cardboard >= stack_amt) - var/obj/item/stack/sheet/cardboard/G = new /obj/item/stack/sheet/cardboard - G.amount = stack_amt - G.loc = output.loc - ore_cardboard -= stack_amt - return - if (ore_cloth >= stack_amt) - var/obj/item/stack/sheet/cloth/G = new /obj/item/stack/sheet/cloth - G.amount = stack_amt - G.loc = output.loc - ore_cloth -= stack_amt - return - if (ore_leather >= stack_amt) - var/obj/item/stack/sheet/leather/G = new /obj/item/stack/sheet/leather - G.amount = stack_amt - G.loc = output.loc - ore_leather -= stack_amt - return - if (ore_adamantine >= stack_amt) - var/obj/item/stack/sheet/mineral/adamantine/G = new /obj/item/stack/sheet/mineral/adamantine - G.amount = stack_amt - G.loc = output.loc - ore_adamantine -= stack_amt - return - if (ore_mythril >= stack_amt) - var/obj/item/stack/sheet/mineral/mythril/G = new /obj/item/stack/sheet/mineral/mythril - G.amount = stack_amt - G.loc = output.loc - ore_mythril -= stack_amt - return + var/obj/item/stack/sheet/O + while (locate(/obj/item/stack/sheet, input.loc)) + O = locate(/obj/item/stack/sheet, input.loc) + if(istype(O,/obj/item/stack/sheet)) + process_sheet(O) return diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 0eb859083ad..df97e620462 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -4,6 +4,8 @@ #define XENOARCH_SPREAD_CHANCE 15 #define ARTIFACT_SPAWN_CHANCE 20 +/datum/controller/game_controller/var/list/artifact_spawning_turfs = list() + /turf/simulated/mineral //wall piece name = "Rock" icon = 'icons/turf/walls.dmi' @@ -127,7 +129,7 @@ //dont create artifact machinery in animal or plant digsites, or if we already have one if(!artifact_find && digsite != 1 && digsite != 2 && prob(ARTIFACT_SPAWN_CHANCE)) artifact_find = new() - artifact_spawning_turfs.Add(src) + master_controller.artifact_spawning_turfs.Add(src) if(!src.geological_data) src.geological_data = new/datum/geosample(src) @@ -165,6 +167,7 @@ M = new/turf/simulated/mineral/uranium(src) if("Iron") M = new/turf/simulated/mineral/iron(src) + M.icon_state = "rock_Iron[rand(1,3)]" if("Diamond") M = new/turf/simulated/mineral/diamond(src) if("Gold") @@ -173,6 +176,7 @@ M = new/turf/simulated/mineral/silver(src) if("Plasma") M = new/turf/simulated/mineral/plasma(src) + M.icon_state = "rock_Plasma[rand(1,3)]" /*if("Adamantine") M = new/turf/simulated/mineral/adamantine(src)*/ if(M) @@ -210,7 +214,7 @@ /turf/simulated/mineral/iron name = "Iron deposit" - icon_state = "rock_Iron" + icon_state = "rock_Iron1" mineralName = "Iron" mineralAmt = 5 spreadChance = 25 @@ -246,7 +250,7 @@ /turf/simulated/mineral/plasma name = "Plasma deposit" - icon_state = "rock_Plasma" + icon_state = "rock_Plasma1" mineralName = "Plasma" mineralAmt = 5 spreadChance = 25 @@ -369,29 +373,25 @@ commented out in r5061, I left it because of the shroom thingies //just pull the surrounding rock out excavate_find(0, F) - if( src.excavation_level + P.excavation_amount >= 100 || (!finds.len && !excavation_minerals.len) ) - //if players have been excavating this turf, have a chance to leave some rocky debris behind - var/boulder_prob = 0 + if( src.excavation_level + P.excavation_amount >= 100 ) + //if players have been excavating this turf, leave some rocky debris behind var/obj/structure/boulder/B - - if(src.excavation_level > 15) - boulder_prob = 10 if(artifact_find) - boulder_prob += 25 - if(src.excavation_level >= 100) - boulder_prob += 40 - else if(src.excavation_level > 95) - boulder_prob += 25 - else if(src.excavation_level > 90) - boulder_prob += 10 - if(prob(boulder_prob)) + if( src.excavation_level > 0 || prob(15) ) + //boulder with an artifact inside + B = new(src) + if(artifact_find) + B.artifact_find = artifact_find + else + artifact_debris(1) + else if(prob(15)) + //empty boulder B = new(src) - if(artifact_find) - B.artifact_find = artifact_find - else if(artifact_find && src.excavation_level + P.excavation_amount >= 100) - artifact_debris(1) - gets_drilled(B ? 0 : 1) + if(B) + gets_drilled(0) + else + gets_drilled(1) return else src.excavation_level += P.excavation_amount @@ -475,7 +475,7 @@ commented out in r5061, I left it because of the shroom thingies if(prob(50)) pain = 1 for(var/mob/living/M in range(src, 200)) - M << "[pick("A high pitched [pick("keening","wailing","whistle")]","A rumbling noise like [pick("thunder","heavy machinery")]")] somehow penetrates your mind before fadaing away!" + M << "[pick("A high pitched [pick("keening","wailing","whistle")]","A rumbling noise like [pick("thunder","heavy machinery")]")] somehow penetrates your mind before fading away!" if(pain) flick("pain",M.pain) if(prob(50)) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 19296347f7e..dec9cff8370 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -101,7 +101,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(NewLoc) loc = NewLoc for(var/obj/effect/step_trigger/S in NewLoc) - S.HasEntered(src) + S.Crossed(src) return loc = get_turf(src) //Get out of closets and such as a ghost @@ -115,7 +115,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp x-- for(var/obj/effect/step_trigger/S in locate(x, y, z)) //<-- this is dumb - S.HasEntered(src) + S.Crossed(src) /mob/dead/observer/examine() if(usr) diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index c2eb527ccca..c199ba06791 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -32,6 +32,7 @@ /mob/living/carbon/alien/adjustToxLoss(amount) storedPlasma = min(max(storedPlasma + amount,0),max_plasma) //upper limit of max_plasma, lower limit of 0 + hud_used.alien_plasma_display.maptext = "
[storedPlasma]
" return /mob/living/carbon/alien/adjustFireLoss(amount) // Weak to Fire diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index f1561344386..8418f5ee70b 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -80,7 +80,7 @@ var/const/MAX_ACTIVE_TIME = 400 /obj/item/clothing/mask/facehugger/equipped(mob/M) Attach(M) -/obj/item/clothing/mask/facehugger/HasEntered(atom/target) +/obj/item/clothing/mask/facehugger/Crossed(atom/target) HasProximity(target) return diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 0ea45f0cbe8..8f0e5bf7fdd 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -46,14 +46,18 @@ dna.mutantrace = "slime" ..() -/mob/living/carbon/human/skellington/New() - species = new /datum/species/skellington(src) +/mob/living/carbon/human/grey/New() + set_species("Grey") + ..() + +/mob/living/carbon/human/human/New() + species = new /datum/species/human(src) ..() /mob/living/carbon/human/New() if(!species) - set_species() + set_species("Human") if(species.language) var/datum/language/L = all_languages[species.language] @@ -428,7 +432,7 @@ // called when something steps onto a human // this could be made more general, but for now just handle mulebot -/mob/living/carbon/human/HasEntered(var/atom/movable/AM) +/mob/living/carbon/human/Crossed(var/atom/movable/AM) var/obj/machinery/bot/mulebot/MB = AM if(istype(MB)) MB.RunOver(src) @@ -896,7 +900,7 @@ xylophone=0 return -/mob/living/carbon/human/proc/vomit() +/mob/living/carbon/human/proc/vomit(hairball=0) if(!lastpuke) lastpuke = 1 src << "You feel nauseous..." @@ -905,15 +909,19 @@ spawn(100) //and you have 10 more for mad dash to the bucket Stun(5) - src.visible_message("[src] throws up!","You throw up!") + if(hairball) + src.visible_message("[src] hacks up a hairball!","You hack up a hairball!") + else + src.visible_message("[src] throws up!","You throw up!") playsound(loc, 'sound/effects/splat.ogg', 50, 1) var/turf/location = loc if (istype(location, /turf/simulated)) location.add_vomit_floor(src, 1) - nutrition -= 40 - adjustToxLoss(-3) + if(!hairball) + nutrition -= 40 + adjustToxLoss(-3) spawn(350) //wait 35 seconds before next volley lastpuke = 0 @@ -1322,7 +1330,7 @@ mob/living/carbon/human/yank_out_object() new_species = "Human" if(species && (species.name && species.name == new_species)) - return + return 1 species = all_species[new_species] @@ -1335,6 +1343,10 @@ mob/living/carbon/human/yank_out_object() if(species.name=="Slime People") dna.mutantrace = "slime" + if(mutations.len==0) + mutations=species.default_mutations + + spawn(0) update_icons() diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 0084fab689c..82ac38a018e 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -117,7 +117,7 @@ log_attack("[M.name] ([M.ckey]) [M.species.attack_verb]ed [src.name] ([src.ckey])") - var/damage = rand(0, 5)//BS12 EDIT + var/damage = rand(0, M.species.max_hurt_damage)//BS12 EDIT if(!damage) if(M.species.attack_verb == "punch") playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 77cd52317da..7ff6e907406 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -733,3 +733,28 @@ It can still be worn/put on as normal. if(source.machine == target) target.show_inv(source) del(src) + + +/mob/proc/get_item_by_slot(slot_id) + switch(slot_id) + if(slot_l_hand) + return l_hand + if(slot_r_hand) + return r_hand + return null + +/mob/living/carbon/human/get_item_by_slot(slot_id) + switch(slot_id) + if(slot_back) + return back + if(slot_wear_mask) + return wear_mask + if(slot_handcuffed) + return handcuffed + if(slot_legcuffed) + return legcuffed + if(slot_l_hand) + return l_hand + if(slot_r_hand) + return r_hand + return null \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 521d3345c06..db38edf07d9 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -188,6 +188,11 @@ if(3) emote("drool") + if(species.name == "Tajaran") + if(prob(1)) + if(prob(1)) + vomit(1) // Hairball + if(stat != 2) var/rn = rand(0, 200) @@ -1273,6 +1278,7 @@ else see_invisible = SEE_INVISIBLE_LIVING else if(!seer) + see_in_dark = species.darksight see_invisible = SEE_INVISIBLE_LIVING if(healths) @@ -1473,7 +1479,7 @@ if(traumatic_shock >= 80) shock_stage += 1 else - shock_stage = min(shock_stage, 100) + shock_stage = min(shock_stage, 160) shock_stage = max(shock_stage-1, 0) return @@ -1488,17 +1494,28 @@ if(shock_stage == 40) src << ""+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!") - if (shock_stage >= 60) - if(shock_stage == 60) emote("me",1,"'s body becomes limp.") - if (prob(5) && health <= 20) - Stun(20) - lying = 1 + if(shock_stage >=60) + if (prob(2)) + src << ""+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!") + Weaken(20) - if(shock_stage == 80) - src << ""+pick("You see a light at the end of the tunnel!", "You feel like you could die any moment now.", "You're about to lose consciousness.") + if(shock_stage >= 80) + if (prob(5)) + src << ""+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!") + Weaken(20) + + if(shock_stage >= 120) + if (prob(2)) + src << ""+pick("You black out!", "You feel like you could die any moment now.", "You're about to lose consciousness.") + Paralyse(5) + + if(shock_stage == 150) + emote("me",1,"can no longer stand, collapsing!") + Weaken(20) + + if(shock_stage >= 150) + Weaken(20) - if (shock_stage > 100 && health <= 20) - Paralyse(rand(15,28)) proc/handle_pulse() if(life_tick % 5) return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load) diff --git a/code/modules/mob/living/carbon/shock.dm b/code/modules/mob/living/carbon/shock.dm index fd2356be26d..447f27fa1c8 100644 --- a/code/modules/mob/living/carbon/shock.dm +++ b/code/modules/mob/living/carbon/shock.dm @@ -5,11 +5,11 @@ /mob/living/carbon/proc/updateshock() src.traumatic_shock = \ 1 * src.getOxyLoss() + \ - 0.5 * src.getToxLoss() + \ - 2.5 * src.getFireLoss() + \ - 1.5 * src.getBruteLoss() + \ - 2 * src.getCloneLoss() + \ - 1 * src.halloss + 0.7 * src.getToxLoss() + \ + 1.5 * src.getFireLoss() + \ + 1.2 * src.getBruteLoss() + \ + 1.7 * src.getCloneLoss() + \ + 2 * src.halloss if(reagents.has_reagent("alkysine")) src.traumatic_shock -= 10 @@ -35,7 +35,7 @@ else if(organ.status & ORGAN_BROKEN || organ.open) src.traumatic_shock += 30 if(organ.status & ORGAN_SPLINTED) - src.traumatic_shock -= 20 + src.traumatic_shock -= 25 if(src.traumatic_shock < 0) src.traumatic_shock = 0 diff --git a/code/modules/mob/living/carbon/species.dm b/code/modules/mob/living/carbon/species.dm index 742fc1e368d..42de10957c2 100644 --- a/code/modules/mob/living/carbon/species.dm +++ b/code/modules/mob/living/carbon/species.dm @@ -31,6 +31,7 @@ var/warning_low_pressure = WARNING_LOW_PRESSURE // Low pressure warning. var/hazard_low_pressure = HAZARD_LOW_PRESSURE // Dangerously low pressure. + // This shit is apparently not even wired up. var/brute_resist // Physical damage reduction. var/burn_resist // Burn damage reduction. @@ -38,11 +39,17 @@ var/bloodflags=0 var/bodyflags=0 + // For grays + var/max_hurt_damage = 5 // Max melee damage dealt + 5 if hulk + var/default_mutations = list() + /datum/species/human name = "Human" + icobase = 'icons/mob/human_races/r_human.dmi' + deform = 'icons/mob/human_races/r_def_human.dmi' primitive = /mob/living/carbon/monkey - path = /mob/living/carbon/human + path = /mob/living/carbon/human/human flags = HAS_SKIN_TONE | HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT /datum/species/unathi @@ -134,18 +141,6 @@ flags = NO_BREATHE | REQUIRE_LIGHT | NON_GENDERED | NO_SCAN | IS_PLANT | RAD_ABSORB bloodflags = BLOOD_GREEN -/datum/species/skellington // /vg/ - name = "Skellington" - icobase = 'icons/mob/human_races/r_skeleton.dmi' - deform = 'icons/mob/human_races/r_skeleton.dmi' // TODO: Need deform. - path = /mob/living/carbon/human/skellington - language = "Clatter" - attack_verb = "punch" - - flags = WHITELISTED | HAS_LIPS | HAS_TAIL | NO_EAT | NO_BREATHE | NON_GENDERED - - - /datum/species/kidan name = "Kidan" icobase = 'icons/mob/human_races/r_kidan.dmi' @@ -168,4 +163,18 @@ primitive = /mob/living/carbon/slime/adult flags = WHITELISTED | NO_BREATHE | HAS_LIPS | NO_INTORGANS - bloodflags = BLOOD_SLIME \ No newline at end of file + bloodflags = BLOOD_SLIME + + +/datum/species/grey + name = "Grey" + icobase = 'icons/mob/human_races/r_grey.dmi' + deform = 'icons/mob/human_races/r_def_grey.dmi' + language = "Galactic Standard" + attack_verb = "punch" + path = /mob/living/carbon/human/grey + darksight = 5 // BOOSTED from 2 + max_hurt_damage = 3 // From 5 (for humans) + default_mutations=list(mRemotetalk) // TK is also another candidate, but TK is overpowered as fuck. + + flags = WHITELISTED | HAS_LIPS | HAS_UNDERWEAR | CAN_BE_FAT \ No newline at end of file diff --git a/code/modules/mob/living/carbon/zombie/zombie.dm b/code/modules/mob/living/carbon/zombie/zombie.dm deleted file mode 100644 index 9818123b6d2..00000000000 --- a/code/modules/mob/living/carbon/zombie/zombie.dm +++ /dev/null @@ -1,582 +0,0 @@ -#define cycle_pause 4 //min 1 -#define viewrange 7 //min 2 - -/mob/living/carbon/human/zombie/New() - ..() - // Uh, what? - N3X - src.mind = new/datum/mind(src) - - -/mob/living/carbon/human/zombie //Define - name = "zombie" - desc = "A Zombie." - a_intent = "harm" - - var/state = 0 - - var/list/path = new/list() - - var/frustration = 0 - var/mob/living/carbon/target - var/list/path_target = new/list() - - var/turf/trg_idle - var/list/path_idle = new/list() - - var/alive = 1 //1 alive, 0 dead - - var/zsay = new/list() - - New() - ..() - zsay += "braaaaains" - zsay += "Mrrrhrrrrrrmmmm" - zsay += "BRAIIIIIIIIINSSSSS" - zsay += "uuuuuuuuuuuhhhh" - zsay += "grrrr-grrrii-gggrii-fffee-rrr" - zsay += "UHhuHUhuhhhh" - zsay += "thriii-thirriiill--errrr" - zsay += "GRRRRRRRRR" - zsay += "ahhhaaaarraaghh" - zsay += "eeemmmmmmaaarrrrrrraggh" - zsay += "AAARRAAAGGGGHHHHHH" - zsay += "FFFFEEEEERRAAAAG" - zsay += "bbbb-bbb-ainnnnnns" - - src.contract_disease(new/datum/disease/z_virus) - - src.process() - - emote(var/act) - act = "[src] moans." - for (var/mob/O in hearers(src, null)) - O.show_message(act, 2) - - Bumped(AM as mob|obj) - // ..() - if(istype(AM, /mob/living/carbon/human/zombie)) - return - if(ismob(AM) && (ishuman(AM) || ismonkey(AM)) ) - src.target = AM - set_attack() - else if(ismob(AM)) - spawn(0) - var/turf/T = get_turf(src) - AM:loc = T - - Bump(atom/A) - if(istype(A, /mob/living/carbon/human/zombie)) - return - if(ismob(A) && (ishuman(A) || ismonkey(A))) - src.target = A - set_attack() - else if(ismob(A)) - src.loc = A:loc - - - proc/set_attack() - state = 1 - if(path_idle.len) path_idle = new/list() - trg_idle = null - - proc/set_idle() - state = 2 - if (path_target.len) path_target = new/list() - target = null - frustration = 0 - - proc/set_null() - state = 0 - if (path_target.len) path_target = new/list() - if (path_idle.len) path_idle = new/list() - target = null - trg_idle = null - frustration = 0 - - proc/process() - set background = 1 - var/quick_move = 1 - var/slow_move = 0 - - if (src.stat == 2) - return - - if (src.stat > 0 || lying) - spawn(cycle_pause) - src.process() - return - - if(istype(src.shoes, /obj/item/clothing/shoes/orange)) - var/obj/item/clothing/shoes/orange/Os = src.shoes - if(Os.chained) - slow_move = 1 - else if(istype(src.wear_suit, /obj/item/clothing/suit/straight_jacket)) - slow_move = 1 - - - else if (!target) - if (path_target.len) path_target = new/list() - - var/last_health = INFINITY - - for (var/mob/living/carbon/C in range(viewrange-2,src.loc)) - if (C.stat == 2 || !can_see(src,C,viewrange) || istype(C, /mob/living/carbon/human/zombie) || istype(C, /mob/living/carbon/monkey)) - continue - if(C:stunned || C:paralysis || C:weakened) - target = C - break - if(C:health < last_health) - last_health = C:health - target = C - - if(target) - set_attack() - else if(state != 2) - set_idle() - idle() - - else if(target) - var/turf/distance = get_dist(src, target) - set_attack() - - if(can_see(src,target,viewrange)) - if(distance <= 1 && !istype(src.wear_mask, /obj/item/clothing/mask)) - if(prob(25)) - for(var/mob/O in viewers(world.view,src)) - O.show_message("\red [src] has attempted to bite [src.target]!", 1, "\red You hear struggling.", 2) - else - for(var/mob/O in viewers(world.view,src)) - O.show_message("\red [src.target] has been bitten by [src]!", 1, "\red You hear struggling.", 2) - var/mob/living/carbon/human/T = target - T.bruteloss += rand(1,7) - var/datum/organ/external/affecting - if(T.organs["head"]) affecting = T.organs["head"] - affecting.take_damage(rand(1,7), 0) - playsound(src.loc, 'sound/items/eatfood.ogg', 50, 1) - if(prob(25)) - target.contract_disease(new/datum/disease/z_virus) - src.add_blood(src.target) - if (prob(33)) - var/turf/location = src.target.loc - if (istype(location, /turf/simulated)) - location.add_blood(src.target) - if (src.wear_mask) - src.wear_mask.add_blood(src.target) - if (src.head) - src.head.add_blood(src.target) - if (src.glasses && prob(33)) - src.glasses.add_blood(src.target) - if (src.gloves) - src.gloves.add_blood(src.target) - if (prob(15)) - if (src.wear_suit) - src.wear_suit.add_blood(src.target) - else if (src.w_uniform) - src.w_uniform.add_blood(src.target) - sleep(5) - //target:paralysis = max(target:paralysis, 10) - else if(distance <= 1 && !src.handcuffed && !istype(src.wear_suit, /obj/item/clothing/suit/straight_jacket)) - if(prob(25) && src.equipped()) - var/obj/item/weapon/A = src.equipped() - A.attack(src.target, src) - else if(prob(25)) - for(var/mob/O in viewers(world.view,src)) - O.show_message("\red [src] has attempted to claw [src.target]!", 1, "\red You hear struggling.", 2) - else - for(var/mob/O in viewers(world.view,src)) - O.show_message("\red [src.target] has been clawed by [src]!", 1, "\red You hear struggling.", 2) - var/mob/living/carbon/human/T = target - T.bruteloss += rand(1,7) - var/datum/organ/external/affecting - if(T.organs["head"]) affecting = T.organs["head"] - affecting.take_damage(rand(1,7), 0) - if(prob(12.5)) - target.contract_disease(new/datum/disease/z_virus) - src.add_blood(src.target) - if (prob(33)) - var/turf/location = src.target.loc - if (istype(location, /turf/simulated)) - location.add_blood(src.target) - if (src.wear_mask) - src.wear_mask.add_blood(src.target) - if (src.head) - src.head.add_blood(src.target) - if (src.glasses && prob(33)) - src.glasses.add_blood(src.target) - if (src.gloves) - src.gloves.add_blood(src.target) - if (prob(15)) - if (src.wear_suit) - src.wear_suit.add_blood(src.target) - else if (src.w_uniform) - src.w_uniform.add_blood(src.target) - - else - step_towards(src,get_step_towards2(src , target)) - set_null() - if(!slow_move) - spawn(cycle_pause) src.process() - else - spawn(cycle_pause*2) src.process() - return - - else - if( !path_target.len ) - - path_attack(target) - if(!path_target.len) - set_null() - if(!slow_move) - spawn(cycle_pause) src.process() - else - spawn(cycle_pause*2) src.process() - return - else - var/turf/next = path_target[1] - - if(next in range(1,src)) - path_attack(target) - - if(!path_target.len) - src.frustration += 5 - else - next = path_target[1] - path_target -= next - step_towards(src,next) - quick_move = 1 - - if (get_dist(src, src.target) >= distance) src.frustration++ - else src.frustration-- - if(frustration >= 35) set_null() - - if(prob(3) && !src.stat == 2) - if(prob(50)) - src.say(pick(zsay)) - else - src.emote("moan") - - if(slow_move) - spawn(cycle_pause*2) - src.process() - else if(quick_move) - spawn(cycle_pause/2) - src.process() - else - spawn(cycle_pause) - src.process() - - - for(var/obj/machinery/door/D in oview(1)) - D.Bumped(src) - - - - - proc/idle() - set background = 1 - var/quick_move = 0 - - if(state != 2 || src.stat == 2 || target) return - - step_rand(src) - - if(prob(3)) - if(prob(10)) - src.say(pick(zsay)) - else - src.emote("moan") - - if(quick_move) - spawn(cycle_pause/2) - idle() - else - spawn(cycle_pause) - idle() - - proc/path_idle(var/atom/trg) - path_idle = AStar(src.loc, get_turf(trg), /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 250, null, null) - path_idle = reverselist(path_idle) - - proc/path_attack(var/atom/trg) - target = trg - path_target = AStar(src.loc, target.loc, /turf/proc/CardinalTurfsWithAccess, /turf/proc/Distance, 0, 250, null, null) - path_target = reverselist(path_target) - - - proc/healthcheck() - return - - -//Zombies! - -/datum/disease/z_virus - name = "T-Virus" - max_stages = 5 - spread = "Contact" - cure = "???" - spread_type = SPECIAL - cure_id = "zed" - affected_species = list("Human", "Human/Zombie") - -/datum/disease/z_virus/stage_act() - ..() - if(istype(affected_mob, /mob/living/carbon/human/zombie) && !src.carrier) - src.carrier = 1 - return - switch(stage) - if(1) - if (prob(8)) - affected_mob << pick("\red Something about you doesnt feel right.","\red Your head starts to itch.") - if(2) - if (prob(8)) - affected_mob << "\red Your limbs feel numb." - affected_mob.bruteloss += 1 - affected_mob.updatehealth() - if (prob(9)) - affected_mob << "\red You feel ill..." - if (prob(9)) - affected_mob << "\red You feel a pain in your stomache..." - if(3) - if (prob(8)) - affected_mob << text("\red []", pick("owww...","I want...","Please...")) - affected_mob.bruteloss += 1 - affected_mob.updatehealth() - if (prob(10)) - affected_mob << "\red You feel very ill." - affected_mob.bruteloss += 5 - affected_mob.updatehealth() - if (prob(4)) - affected_mob << "\red You feel a stabbing pain in your head." - affected_mob.paralysis += 2 - if (prob(4)) - affected_mob << "\red Whats going to happen to me?" - if(4) - if (prob(10)) - affected_mob << pick("\red You feel violently sick.") - affected_mob.bruteloss += 8 - affected_mob.updatehealth() - if (prob(20)) - affected_mob.say(pick("Mmmmm.", "Hey... You look...", "Hsssshhhhh!")) - if (prob(8)) - affected_mob << "\red You cant... feel..." - if(5) - affected_mob.toxloss += 10 - affected_mob.updatehealth() - affected_mob << "You feel the life slowly slip away from you as you join the army of the undead.." - affected_mob:Zombify() - - -/mob/living/carbon/human/proc/Zombify() - if (src.monkeyizing) - return - update_icons() // update_clothing() - var/mob/living/carbon/human/zombie/O = new/mob/living/carbon/human/zombie( src.loc ) - //Yay, Zombie! - O.name = name - O.r_hair = name - O.g_hair = g_hair - O.b_hair = b_hair - O.h_style = h_style - O.r_facial = r_facial - O.g_facial = g_facial - O.b_facial = b_facial - O.f_style = f_style - O.r_eyes = r_eyes - O.g_eyes = g_eyes - O.b_eyes = b_eyes - O.s_tone = s_tone - O.age = age - - O.real_name = real_name - - O.wear_mask = wear_mask - O.l_hand = l_hand - O.r_hand = r_hand - O.wear_suit = wear_suit - O.w_uniform = w_uniform -// O.w_radio = null - O.shoes = shoes - O.belt = belt - O.gloves = gloves - O.glasses = glasses - O.head = head - O.r_ear = r_ear - O.l_ear = l_ear - O.wear_id = wear_id - O.r_store = r_store - O.l_store = l_store - O.back = back - - O.stand_icon = stand_icon - O.lying_icon = lying_icon - - //O.last_b_state = last_b_state - - //O.face_standing = face_standing - //O.face_lying = face_lying - - //O.hair_icon_state = hair_icon_state - //O.face_icon_state = face_icon_state - - //O.body_standing = body_standing - //O.body_lying = body_lying - for(var/obj/Q in src) - Q.loc = O - O.update_icons()//update_clothing() - src.ghostize() - O.loc = src.loc - del(src) - return - -/obj/item/weapon/reagent_containers/glass/bottle/t_virus - name = "Z-Virus culture bottle" - desc = "A small bottle. Contains Z-Virus virion in synthblood medium." - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle3" - amount_per_transfer_from_this = 5 - - New() - var/datum/reagents/R = new/datum/reagents(20) - reagents = R - R.my_atom = src - var/datum/disease/F = new /datum/disease/z_virus(0) - var/list/data = list("virus"= F) - R.add_reagent("blood", 20, data) - -///////////////////////////CURE////////////////////////////////////////// - -datum/reagent/zed - name = "Zombie Elixer" - id = "zed" - description = "For treating the Z-Virus." - //reagent_state = LIQUID - - on_mob_life(var/mob/M)//no more mr. panacea - holder.remove_reagent(src.id, 0.2) - return - - - -/obj/item/weapon/zedpen - desc = "Small non-refillable auto-injector for curing the Z-Virus in early stages." - name = "Z.E.D. Pen." - icon = 'icons/obj/items.dmi' - icon_state = "zed_1" - flags = FPRINT | TABLEPASS/* | ONBELT*/ - throwforce = 0 - w_class = 1.0 - throw_speed = 7 - throw_range = 15 - m_amt = 60 - -/obj/item/weapon/zedpen/attack_paw(mob/user as mob) - return src.attack_hand(user) - return - -/obj/item/weapon/zedpen/New() - var/datum/reagents/R = new/datum/reagents(10) - reagents = R - R.my_atom = src - R.add_reagent("zed", 10) - ..() - return - -/obj/item/weapon/zedpen/attack(mob/M as mob, mob/user as mob) - if (!( istype(M, /mob) )) - return - if (reagents.total_volume) - for(var/mob/O in viewers(M, null)) - O.show_message(text("\blue [] has been stabbed with [] by [].", M, src, user), 1) -// user << "\red You stab [M] with the pen." -// M << "\red You feel a tiny prick!" - if(M.reagents) reagents.trans_to(M, 10) - icon_state = "zed_0" - return - - - - -/obj/item/weapon/storage/firstaid/zed - name = "Zed-Kit" - icon_state = "zedkit" - item_state = "firstaid-zed" - -/obj/item/weapon/storage/firstaid/zed/New() - - ..() - new /obj/item/weapon/zedpen( src ) - new /obj/item/weapon/zedpen( src ) - new /obj/item/weapon/zedpen( src ) - new /obj/item/weapon/zedpen( src ) - new /obj/item/weapon/zedpen( src ) - new /obj/item/weapon/zedpen( src ) - new /obj/item/device/healthanalyzer( src ) - return - - -////////////////////////////////////////////event code///////////////////////////////////////// - -/obj/landmark/zspawn - name = "zombie spawn" - -/* -/client/update_admins(var/rank) - ..() - if(rank == "Game Master"/* || rank == "Coder" || rank == "Primary Administrator" || rank == "Administrator"*/) - src.verbs += /client/proc/zombie_event -*/ - -/client/proc/zombie_event() - set category = "Special Verbs" - set name = "Spawn Zombies" - -// if(!istype(ticker.mode, /datum/game_mode/biohazard)) -// if(src) -// src << "\red Wrong game mode!" -// return - - if(usr) message_admins("[key_name_admin(usr)] has spawned a zombie", 1) -// command_alert("Confirmed outbreak of level 13 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert") - var/list/t = list() - for(var/obj/landmark/zspawn/O in world) - t += O - if(!t.len) - usr<<"No spawn points exist." - return - var/obj/landmark/s = pick(t) - var/mob/living/carbon/human/zombie/Z = new/mob/living/carbon/human/zombie(s.loc) - - Z.gender = pick(MALE, FEMALE) - - var/flooks = new/list() - var/mlooks = new/list() - - flooks += "0990CC0FF000000000DC0000033000902136F93" - flooks += "0CC000033000000000DC0000033000C4308DEB4" - flooks += "066000033000000000B90000033000E1E03FD3F" - flooks += "066000033000000000690000033000A0F06C6D5" - flooks += "0CC000000000000000EB0000000066D1F11EDA3" - //flooks += "0FF0000FF000000000F50000000066B360B819" - - mlooks += "066000033000000000CD000000000071E0F7382" - mlooks += "066000033000000000B9006603300037909B45A" - mlooks += "000000000000000000690000000066487060580" - mlooks += "000000000000000000CD0000000000638074390" - mlooks += "066000033066000033CD00000000000D8D20B9B" - - if(Z.gender == MALE) - Z.dna.unique_enzymes = pick(mlooks) - else - Z.dna.unique_enzymes = pick(flooks) - - updateappearance(Z, Z.dna.unique_enzymes) - - if(Z.gender == MALE) - Z.real_name = text("[] []", pick(first_names_male), pick(last_names)) - else - Z.real_name = text("[] []", pick(first_names_female), pick(last_names)) - - //var/a = pick("Janitor", "Medical Doctor", "Assistant", "Atmospheric Technician", "Security Officer", "Botanist", "Cargo Technician") - //Z.Equip_Rank(a, 0) - //Commented out by pygmy. Reason: Triggers my anti-spawn-at-menu code. Compromising this risks server. - Z.loc = s.loc \ No newline at end of file diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm index 945a9657c2f..c173dd20c6a 100644 --- a/code/modules/mob/living/silicon/ai/say.dm +++ b/code/modules/mob/living/silicon/ai/say.dm @@ -1,128 +1,128 @@ /mob/living/silicon/ai/say(var/message) - if(parent && istype(parent) && parent.stat != 2) - parent.say(message) - return - //If there is a defined "parent" AI, it is actually an AI, and it is alive, anything the AI tries to say is said by the parent instead. - ..(message) + if(parent && istype(parent) && parent.stat != 2) + parent.say(message) + return + //If there is a defined "parent" AI, it is actually an AI, and it is alive, anything the AI tries to say is said by the parent instead. + ..(message) -/mob/living/silicon/say_understands(var/other) - if (istype(other, /mob/living/carbon/human)) - return 1 - if (istype(other, /mob/living/silicon)) - return 1 - if (istype(other, /mob/living/carbon/brain)) - return 1 - return ..() +/mob/living/silicon/ai/say_understands(var/other) + if (istype(other, /mob/living/carbon/human)) + return 1 + if (istype(other, /mob/living/silicon/robot)) + return 1 + if (istype(other, /mob/living/silicon/decoy)) + return 1 + if (istype(other, /mob/living/carbon/brain)) + return 1 + if (istype(other, /mob/living/silicon/pai)) + return 1 + return ..() + +/mob/living/silicon/ai/say_quote(var/text) + var/ending = copytext(text, length(text)) + + if (ending == "?") + return "queries, \"[text]\""; + else if (ending == "!") + return "declares, \"[text]\""; + + return "states, \"[text]\""; + +/mob/living/silicon/ai/proc/IsVocal() var/announcing_vox = 0 // Stores the time of the last announcement var/const/VOX_CHANNEL = 200 -var/const/VOX_DELAY = 100 // 10 seconds -var/const/VOX_PATH = "sound/vox/" +var/const/VOX_DELAY = 600 /mob/living/silicon/ai/verb/announcement_help() - set name = "Announcement Help" - set desc = "Display a list of vocal words to announce to the crew." - set category = "AI Commands" + set name = "Announcement Help" + set desc = "Display a list of vocal words to announce to the crew." + set category = "AI Commands" - var/dat = "Here is a list of words you can type into the 'Announcement' button to create sentences to vocally announce to everyone on the same level at you.
\ -
  • You can also click on the word to preview it.
  • \ -
  • You can only say 30 words for every announcement.
  • \ -
  • Do not use punctuation as you would normally, if you want a pause you can use the full stop and comma characters by separating them with spaces, like so: 'Alpha . Test , Bravo'.
\ - WARNING:
Misuse of the announcement system will get you job banned.
" - var/index = 0 - var/list/vox_words = flist(VOX_PATH) // flist will return a list of strings with all the files in the path - for(var/word in vox_words) - index++ - var/stripped_word = copytext(word, 1, length(word) - 3) // Remove the .wav - dat += "[capitalize(stripped_word)]" - if(index != vox_words.len) - dat += " / " + var/dat = "Here is a list of words you can type into the 'Announcement' button to create sentences to vocally announce to everyone on the same level at you.
\ +
  • You can also click on the word to preview it.
  • \ +
  • You can only say 30 words for every announcement.
  • \ +
  • Do not use punctuation as you would normally, if you want a pause you can use the full stop and comma characters by separating them with spaces, like so: 'Alpha . Test , Bravo'.
\ + WARNING:
Misuse of the announcement system will get you job banned.
" - src << browse(dat, "window=announce_help;size=500x400") + var/index = 0 + for(var/word in vox_sounds) + index++ + dat += "[capitalize(word)]" + if(index != vox_sounds.len) + dat += " / " + + var/datum/browser/popup = new(src, "announce_help", "Announcement Help", 500, 400) + popup.set_content(dat) + popup.open() /mob/living/silicon/ai/verb/announcement() - set name = "Announcement" - set desc = "Create a vocal announcement by typing in the available words to create a sentence." - set category = "AI Commands" + set name = "Announcement" + set desc = "Create a vocal announcement by typing in the available words to create a sentence." + set category = "AI Commands" - if(announcing_vox > world.time) - src << "Please wait [round((announcing_vox - world.time) / 10)] seconds." - return + if(announcing_vox > world.time) + src << "Please wait [round((announcing_vox - world.time) / 10)] seconds." + return - var/message = input(src, "WARNING: Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'", "Announcement", src.last_announcement) as text + var/message = input(src, "WARNING: Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'", "Announcement", src.last_announcement) as text - last_announcement = message + last_announcement = message - if(!message || announcing_vox > world.time) - return + if(!message || announcing_vox > world.time) + return - var/list/words = stringsplit(trim(message), " ") - var/list/incorrect_words = list() + var/list/words = stringsplit(trim(message), " ") + var/list/incorrect_words = list() - if(words.len > 30) - words.len = 30 + if(words.len > 30) + words.len = 30 - // Detect incorrect words which aren't .wav files. + for(var/word in words) + word = trim(word) + if(!word) + words -= word + continue + if(!vox_sounds[word]) + incorrect_words += word - for(var/word in words) - word = trim(word) - if(!word) - words -= word - continue - if(!vox_word_exists(word)) - incorrect_words += word + if(incorrect_words.len) + src << "These words are not available on the announcement system: [english_list(incorrect_words)]." + return - if(incorrect_words.len) - src << "These words are not available on the announcement system: [english_list(incorrect_words)]." - return + announcing_vox = world.time + VOX_DELAY - announcing_vox = world.time + VOX_DELAY + log_game("[key_name_admin(src)] made a vocal announcement with the following message: [message].") - log_game("[key_name_admin(src)] made a vocal announcement with the following message: [message].") + for(var/word in words) + play_vox_word(word, src.z, null) - for(var/word in words) - play_vox_word(word, src.z, null) /proc/play_vox_word(var/word, var/z_level, var/mob/only_listener) - word = lowertext(word) + word = lowertext(word) - if(vox_word_exists(word)) + if(vox_sounds[word]) - var/sound_file = get_vox_file(word) - var/sound/voice = sound(sound_file, wait = 1, channel = VOX_CHANNEL) - voice.status = SOUND_STREAM + var/sound_file = vox_sounds[word] + var/sound/voice = sound(sound_file, wait = 1, channel = VOX_CHANNEL) + voice.status = SOUND_STREAM -// If there is no single listener, broadcast to everyone in the same z level - if(!only_listener) - // Play voice for all mobs in the z level - for(var/mob/M in player_list) - if(M.client) - var/turf/T = get_turf(M) - if(T.z == z_level) - M << voice - else - only_listener << voice - return 1 - return 0 + // If there is no single listener, broadcast to everyone in the same z level + if(!only_listener) + // Play voice for all mobs in the z level + for(var/mob/M in player_list) + if(M.client) + var/turf/T = get_turf(M) + if(T.z == z_level) + M << voice + else + only_listener << voice + return 1 + return 0 -/proc/vox_word_exists(var/word) - return fexists("[VOX_PATH][word].wav") - -/proc/get_vox_file(var/word) - if(vox_word_exists(word)) - return file("[VOX_PATH][word].wav") - -// Dynamically loading it has bad results with sounds overtaking each other, even with the wait variable. -// We send the file to the user when they login. - -/client/proc/preload_vox() - var/list/vox_files = flist(VOX_PATH) - for(var/file in vox_files) - // src << "Downloading [file]" - var/sound/S = sound("[VOX_PATH][file]") - src << browse_rsc(S) \ No newline at end of file +// VOX sounds moved to /code/defines/vox_sounds.dm \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm index f6bef71393b..9041d7e3480 100644 --- a/code/modules/mob/living/silicon/robot/examine.dm +++ b/code/modules/mob/living/silicon/robot/examine.dm @@ -7,6 +7,9 @@ return var/msg = "*---------*\nThis is \icon[src] \a [src][custom_name ? ", [modtype] [braintype]" : ""]!\n" + var/obj/act_module = get_active_hand() + if(act_module) + msg += "It is holding \icon[act_module] \a [act_module].\n" msg += "" if (src.getBruteLoss()) if (src.getBruteLoss() < 75) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index f2a47b56f98..c9f72e0e019 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1035,38 +1035,41 @@ if(!module) pick_module() return - var/dat = "Modules\n" - dat += {"Close + var/dat = {"Close

Activated Modules
- Module 1: [module_state_1 ? "[module_state_1]" : "No Module"]
- Module 2: [module_state_2 ? "
[module_state_2]" : "No Module"]
- Module 3: [module_state_3 ? "
[module_state_3]" : "No Module"]
-
- Installed Modules

"} - + + + + +
Module 1:[module_state_1 ? "[module_state_1]" : "No Module"]
Module 2:[module_state_2 ? "[module_state_2]" : "No Module"]
Module 3:[module_state_3 ? "[module_state_3]" : "No Module"]

+ Installed Modules

+ "} for (var/obj in module.modules) if (!obj) - dat += text("Resource depleted
") + dat += text("") else if(activated(obj)) - dat += text("[obj]: Activated
") + dat += text("") else - dat += text("[obj]: Activate
") + dat += text("") if (emagged) if(activated(module.emag)) - dat += text("[module.emag]: Activated
") + dat += text("") else - dat += text("[module.emag]: Activate
") + dat += text("") + dat += "
Resource depleted
[obj]Activated
[obj]Activate
[module.emag]Activated
[module.emag]Activate
" /* if(activated(obj)) dat += text("[obj]: \[Activated | Deactivate\]
") else dat += text("[obj]: \[Activate | Deactivated\]
") */ - src << browse(dat, "window=robotmod&can_close=0") + var/datum/browser/popup = new(src, "robotmod", "Modules") + popup.set_content(dat) + popup.open() /mob/living/silicon/robot/Topic(href, href_list) diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index ab4080ed501..4066a45a82a 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -172,7 +172,7 @@ src.modules += new /obj/item/weapon/reagent_containers/food/drinks/beer(src) src.modules += new /obj/item/weapon/reagent_containers/food/condiment/enzyme(src) src.modules += new /obj/item/weapon/pen/robopen(src) - + src.modules += new /obj/item/device/violin(src) var/obj/item/weapon/rsf/M = new /obj/item/weapon/rsf(src) M.matter = 30 src.modules += M diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index 29f4223a8e6..bee64e60c36 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -170,7 +170,7 @@ src << "You are too small to pull anything." return -/mob/living/simple_animal/mouse/HasEntered(AM as mob|obj) +/mob/living/simple_animal/mouse/Crossed(AM as mob|obj) if( ishuman(AM) ) if(!stat) var/mob/M = AM diff --git a/code/modules/mob/living/simple_animal/hostile/russian.dm b/code/modules/mob/living/simple_animal/hostile/russian.dm index 6e8b9b84904..c31082cdc59 100644 --- a/code/modules/mob/living/simple_animal/hostile/russian.dm +++ b/code/modules/mob/living/simple_animal/hostile/russian.dm @@ -38,7 +38,7 @@ icon_state = "russianranged" icon_living = "russianranged" corpse = /obj/effect/landmark/mobcorpse/russian/ranged - weapon1 = /obj/item/weapon/gun/projectile/mateba + weapon1 = /obj/item/weapon/gun/projectile/revolver/mateba ranged = 1 projectiletype = /obj/item/projectile/bullet projectilesound = 'sound/weapons/Gunshot.ogg' diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 0ef8269f138..60a7b107081 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -369,10 +369,10 @@ new_character = new /mob/living/carbon/human/vox(loc) if("Kidan") new_character = new /mob/living/carbon/human/kidan(loc) - if("Skellington") - new_character = new /mob/living/carbon/human/skellington(loc) + if("Grey") + new_character = new /mob/living/carbon/human/grey(loc) if("Human") - new_character = new /mob/living/carbon/human(loc) + new_character = new /mob/living/carbon/human/human(loc) // new_character.set_species(client.prefs.species) if(chosen_species.language) new_character.add_language(chosen_species.language) diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm index 316541ddb23..73a75b9545b 100644 --- a/code/modules/mob/new_player/sprite_accessories.dm +++ b/code/modules/mob/new_player/sprite_accessories.dm @@ -51,7 +51,7 @@ name = "Bald" icon_state = "bald" gender = MALE - species_allowed = list("Human","Unathi","Vox","Diona","Skellington","Kidan") + species_allowed = list("Human","Unathi","Vox","Diona","Kidan","Greys") short name = "Short Hair" // try to capatilize the names please~ @@ -305,7 +305,7 @@ name = "Shaved" icon_state = "bald" gender = NEUTER - species_allowed = list("Human","Unathi","Tajaran","Skrell","Vox","Diona","Skellington","Kidan") + species_allowed = list("Human","Unathi","Tajaran","Skrell","Vox","Diona","Kidan","Greys") watson name = "Watson Mustache" diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 02467ae4e14..f6c57b8989f 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -172,8 +172,15 @@ O.loc = loc O.job = "Cyborg" - O.mmi = new /obj/item/device/mmi(O) - O.mmi.transfer_identity(src)//Does not transfer key/client. + if(O.mind.assigned_role == "Cyborg") + if(O.mind.role_alt_title == "Android") + O.mmi = new /obj/item/device/mmi/posibrain(O) + if(O.mind.role_alt_title == "Robot") + O.mmi = new /obj/item/device/mmi/posibrain(O) //Ravensdale wants a circuit based brain for another robot class, this is a placeholder. + else + O.mmi = new /obj/item/device/mmi(O) + O.mmi.transfer_identity(src)//Does not transfer key/client. + O.Namepick() @@ -373,48 +380,3 @@ return 1 // ZOMG PONIES WHEEE //Not in here? Must be untested! return 0 - - -/* - -//////////////////////Grutor: -/////////////////////Zombie tranformation into NPC type zombie////////////// -////////////////////I'm very certain we can just remove player key////////// -////////////////move it to AI control instead and change body icon////////// -////////////////////////to zombie. But o'well lol////////////////////////// -/mob/living/carbon/human/proc/Turnundead() - if (monkeyizing) - return - for(var/obj/item/W in src) - drop_from_inventory(W) //should be replace with look for something that can transfer items - regenerate_icons() - monkeyizing = 1 - canmove = 0 - icon = null - invisibility = 101 - for(var/t in organs) //this really should not be necessary - del(t) - - var/mob/living/simple_animal/hostile/new_zombie = new /mob/living/simple_animal/hostile/zombie (src.loc) - - new_zombie.name = "Zombie \red[name]" - new_zombie.desc = "A person that has fallen victim to cannibles." - new_zombie.loc = loc - //If you wish everything from here to there can be edited out... - new_zombie.dna = dna //Don't know why I did this, you can't prick em with a needle - if(src.viruses) //Checks and see if the source has any viruses - for(var/datum/disease/tempvirus in new_zombie.viruses) //retrieves anything of disease type - tempvirus.cure(0) //For each virus found cure it - //One day we will need this... - for(var/datum/disease/cv in src.viruses) - new_zombie.viruses += cv //Add/assign the list to the zombie - cv.affected_mob = new_zombie //Change the copy's var to zombie - cv.strain_data = cv.strain_data.Copy() //what? line 520 does this already.... - cv.holder = new_zombie //new_zombie is holder of the virus - cv.carrier = 1 - //Edit from there to hear if you wish. - spawn(0)//To prevent the proc from returning null. - del(src) - return - -*/ \ No newline at end of file diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index b599c9fe7e0..cce7953c544 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -270,7 +270,7 @@ return //Bone fracurtes - if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & (ORGAN_ROBOT|ORGAN_PEG))) + if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & (ORGAN_ROBOT|ORGAN_PEG)) && !(istype(owner, /mob/living/carbon/human/slime))) src.fracture() if(!(status & ORGAN_BROKEN)) perma_injury = 0 diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 9b0a931a838..79df43cfdcc 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -13,6 +13,8 @@ var/copies = 1 //how many copies to print! var/toner = 30 //how much toner is left! woooooo~ var/maxcopies = 10 //how many copies can be copied at once- idea shamelessly stolen from bs12's copier! + var/mob/living/ass = null + attack_ai(mob/user as mob) return attack_hand(user) @@ -24,7 +26,7 @@ user.set_machine(src) var/dat = "Photocopier

" - if(copy || photocopy) + if(copy || photocopy || (ass && (ass.loc == src.loc))) dat += "Remove Paper
" if(toner) dat += "Copy
" @@ -85,6 +87,36 @@ else break updateUsrDialog() + else if(ass) //ASS COPY. By Miauw + for(var/i = 0, i < copies, i++) + var/icon/temp_img + if(ishuman(ass) && (ass.get_item_by_slot(slot_w_uniform) || ass.get_item_by_slot(slot_wear_suit))) + usr << "You feel kind of silly copying [ass == usr ? "your" : ass][ass == usr ? "" : "\'s"] ass with [ass == usr ? "your" : "their"] clothes on." + else if(toner >= 5 && check_ass()) //You have to be sitting on the copier and either be a xeno or a human without clothes on. + if(isalien(ass) || istype(ass,/mob/living/simple_animal/hostile/alien)) //Xenos have their own asses, thanks to Pybro. + temp_img = icon('icons/ass/assalien.png') + else if(ishuman(ass)) //Suit checks are in check_ass + if(ass.gender == MALE) + temp_img = icon('icons/ass/assmale.png') + else if(ass.gender == FEMALE) + temp_img = icon('icons/ass/assfemale.png') + else //In case anyone ever makes the generic ass. For now I'll be using male asses. + temp_img = icon('icons/ass/assmale.png') + else + break + var/obj/item/weapon/photo/p = new /obj/item/weapon/photo (loc) + p.desc = "You see [ass]'s ass on the photo." + p.pixel_x = rand(-10, 10) + p.pixel_y = rand(-10, 10) + p.img = temp_img + var/icon/small_img = icon(temp_img) //Icon() is needed or else temp_img will be rescaled too >.> + var/icon/ic = icon('icons/obj/items.dmi',"photo") + small_img.Scale(8, 8) + ic.Blend(small_img,ICON_OVERLAY, 10, 13) + p.icon = ic + toner -= 5 + sleep(15) + updateUsrDialog() else if(href_list["remove"]) if(copy) copy.loc = usr.loc @@ -98,6 +130,8 @@ usr << "You take the photo out of \the [src]." photocopy = null updateUsrDialog() + else if(check_ass()) + ass << "You feel a slight pressure on your ass." else if(href_list["min"]) if(copies > 1) copies-- @@ -119,7 +153,7 @@ else user << "There is already something in \the [src]." else if(istype(O, /obj/item/weapon/photo)) - if(!copy && !photocopy) + if(copier_empty()) user.drop_item() photocopy = O O.loc = src @@ -129,7 +163,7 @@ else user << "There is already something in \the [src]." else if(istype(O, /obj/item/device/toner)) - if(toner == 0) + if(toner <= 0) user.drop_item() del(O) toner = 30 @@ -141,6 +175,20 @@ playsound(loc, 'sound/items/Ratchet.ogg', 50, 1) anchored = !anchored user << "You [anchored ? "wrench" : "unwrench"] \the [src]." + else if(istype(O, /obj/item/weapon/grab)) //For ass-copying. + var/obj/item/weapon/grab/G = O + if(ismob(G.affecting) && G.affecting != ass) + var/mob/GM = G.affecting + visible_message("[usr] drags [GM.name] onto the photocopier!") + GM.loc = get_turf(src) + ass = GM + if(photocopy) + photocopy.loc = src.loc + photocopy = null + else if(copy) + copy.loc = src.loc + copy = null + updateUsrDialog() return ex_act(severity) @@ -170,6 +218,50 @@ toner = 0 return +/obj/machinery/photocopier/MouseDrop_T(mob/target, mob/user) + check_ass() //Just to make sure that you can re-drag somebody onto it after they moved off. + if (!istype(target) || target.buckled || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || istype(user, /mob/living/silicon/ai) || target == ass) + return + src.add_fingerprint(user) + if(target == user && !user.stat && !user.weakened && !user.stunned && !user.paralysis) + visible_message("[usr] jumps onto the photocopier!") + else if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis) + if(target.anchored) return + if(!ishuman(user) && !ismonkey(user)) return + visible_message("[usr] drags [target.name] onto the photocopier!") + target.loc = get_turf(src) + ass = target + if(photocopy) + photocopy.loc = src.loc + visible_message("[photocopy] is shoved out of the way by [ass]!") + photocopy = null + else if(copy) + copy.loc = src.loc + visible_message("[copy] is shoved out of the way by [ass]!") + copy = null + updateUsrDialog() + +/obj/machinery/photocopier/proc/check_ass() //I'm not sure wether I made this proc because it's good form or because of the name. + if(!ass) + return 0 + if(ass.loc != src.loc) + ass = null + updateUsrDialog() + return 0 + else if(istype(ass,/mob/living/carbon/human)) + if(!ass.get_item_by_slot(slot_w_uniform) && !ass.get_item_by_slot(slot_wear_suit)) + return 1 + else + return 0 + else + return 1 + +/obj/machinery/photocopier/proc/copier_empty() + if(copy || photocopy || check_ass()) + return 0 + else + return 1 + /obj/item/device/toner name = "toner cartridge" icon_state = "tonercartridge" diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index f331df770c1..149bd745a70 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -691,10 +691,10 @@ t += "

Override Programming
" else t += "

APC Hacked
" - /*if(!src.occupant) + if(!src.occupant) t += "Shunt Core Processes
" else - t += "Core Processes Uploaded
"*/ + t += "Core Processes Uploaded
" t += "

Close" diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 4e4e4d85304..8d08a7abab1 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -11,19 +11,25 @@ var/projectile_type = ""//The bullet type to create when New() is called var/obj/item/projectile/BB = null //The loaded bullet +/obj/item/ammo_casing/New() + ..() + if(projectile_type) + BB = new projectile_type(src) + pixel_x = rand(-10.0, 10) + pixel_y = rand(-10.0, 10) + dir = pick(alldirs) + update_icon() + +/obj/item/ammo_casing/update_icon() + ..() + icon_state = "[initial(icon_state)][BB ? "-live" : ""]" + desc = "[initial(desc)][BB ? "" : " This one is spent"]" - New() - ..() - if(projectile_type) - BB = new projectile_type(src) - pixel_x = rand(-10.0, 10) - pixel_y = rand(-10.0, 10) - dir = pick(cardinal) //Boxes of ammo -/obj/item/ammo_magazine +/obj/item/ammo_box name = "ammo box (.357)" desc = "A box of ammo" icon_state = "357" @@ -40,15 +46,61 @@ var/ammo_type = "/obj/item/ammo_casing" var/max_ammo = 7 var/multiple_sprites = 0 + var/caliber = "" +/obj/item/ammo_box/New() + for(var/i = 1, i <= max_ammo, i++) + stored_ammo += new ammo_type(src) + update_icon() - New() - for(var/i = 1, i <= max_ammo, i++) - stored_ammo += new ammo_type(src) +/obj/item/ammo_box/proc/get_round(var/keep = 0) + if (!stored_ammo.len) + return null + else + var/b = stored_ammo[stored_ammo.len] + stored_ammo -= b + if (keep) + stored_ammo.Insert(1,b) + return b + +/obj/item/ammo_box/proc/give_round(var/obj/item/ammo_casing/r) + var/obj/item/ammo_casing/rb = r + if (rb) + if (stored_ammo.len < max_ammo && rb.caliber == caliber) + stored_ammo += rb + rb.loc = src + return 1 + return 0 + +/obj/item/ammo_box/attackby(var/obj/item/A as obj, mob/user as mob) + var/num_loaded = 0 + if(istype(A, /obj/item/ammo_box)) + var/obj/item/ammo_box/AM = A + for(var/obj/item/ammo_casing/AC in AM.stored_ammo) + if(give_round(AC)) + AM.stored_ammo -= AC + num_loaded++ + else + break + if(istype(A, /obj/item/ammo_casing)) + var/obj/item/ammo_casing/AC = A + if(give_round(AC)) + user.drop_item() + AC.loc = src + num_loaded++ + if(num_loaded) + user << "You load [num_loaded] shell\s into \the [src]!" + A.update_icon() update_icon() - - update_icon() - if(multiple_sprites) +/obj/item/ammo_box/update_icon() + switch(multiple_sprites) + if(1) icon_state = "[initial(icon_state)]-[stored_ammo.len]" - desc = "There are [stored_ammo.len] shell\s left!" + if(2) + icon_state = "[initial(icon_state)]-[stored_ammo.len ? "[max_ammo]" : "0"]" + desc = "There are [stored_ammo.len] shell\s left!" + +//Behavior for magazines +/obj/item/ammo_box/magazine/proc/ammo_count() + return stored_ammo.len \ No newline at end of file diff --git a/code/modules/projectiles/ammunition/boxes.dm b/code/modules/projectiles/ammunition/boxes.dm index cd696e1ca00..89ac19ed71b 100644 --- a/code/modules/projectiles/ammunition/boxes.dm +++ b/code/modules/projectiles/ammunition/boxes.dm @@ -1,4 +1,4 @@ -/obj/item/ammo_magazine/a357 +/obj/item/ammo_box/a357 name = "ammo box (.357)" desc = "A box of .357 ammo" icon_state = "357" @@ -6,7 +6,7 @@ max_ammo = 7 multiple_sprites = 1 -/obj/item/ammo_magazine/c38 +/obj/item/ammo_box/c38 name = "speed loader (.38)" icon_state = "38" ammo_type = "/obj/item/ammo_casing/c38" @@ -15,7 +15,7 @@ -/obj/item/ammo_magazine/a418 +/obj/item/ammo_box/a418 name = "ammo box (.418)" icon_state = "418" ammo_type = "/obj/item/ammo_casing/a418" @@ -24,7 +24,7 @@ -/obj/item/ammo_magazine/a666 +/obj/item/ammo_box/a666 name = "ammo box (.666)" icon_state = "666" ammo_type = "/obj/item/ammo_casing/a666" @@ -32,18 +32,7 @@ multiple_sprites = 1 -/obj/item/ammo_magazine/mc9mm - name = "magazine (9mm)" - icon_state = "9x19p" - origin_tech = "combat=2" - ammo_type = "/obj/item/ammo_casing/c9mm" - max_ammo = 8 - multiple_sprites = 1 - -/obj/item/ammo_magazine/mc9mm/empty - max_ammo = 0 - -/obj/item/ammo_magazine/c9mm +/obj/item/ammo_box/c9mm name = "Ammunition Box (9mm)" icon_state = "9mm" origin_tech = "combat=2" @@ -52,7 +41,7 @@ -/obj/item/ammo_magazine/c45 +/obj/item/ammo_box/c45 name = "Ammunition Box (.45)" icon_state = "9mm" origin_tech = "combat=2" @@ -61,61 +50,9 @@ -/obj/item/ammo_magazine/a12mm - name = "magazine (12mm)" - icon_state = "12mm" +/obj/item/ammo_box/a12mm + name = "Ammunition Box (12mm)" + icon_state = "9mm" origin_tech = "combat=2" ammo_type = "/obj/item/ammo_casing/a12mm" - max_ammo = 20 - multiple_sprites = 1 - - -/obj/item/ammo_magazine/a12mm/empty - name = "magazine (12mm)" - icon_state = "12mm" - ammo_type = "/obj/item/ammo_casing/12mm" - max_ammo = 0 - -/obj/item/ammo_magazine/a50 - name = "magazine (.50)" - icon_state = "50ae" - origin_tech = "combat=2" - ammo_type = "/obj/item/ammo_casing/a50" - max_ammo = 7 - multiple_sprites = 1 - -/obj/item/ammo_magazine/a50/empty - name = "magazine (.50)" - icon_state = "50ae" - ammo_type = "/obj/item/ammo_casing/a50" - max_ammo = 0 - -/obj/item/ammo_magazine/a75 - name = "ammo magazine (.75)" - icon_state = "75" - ammo_type = "/obj/item/ammo_casing/a75" - multiple_sprites = 1 - max_ammo = 8 - -/obj/item/ammo_magazine/a75/empty - name = "ammo magazine (.75)" - icon_state = "75" - ammo_type = "/obj/item/ammo_casing/a75" - max_ammo = 0 - -/obj/item/ammo_magazine/a762 - name = "magazine (a762)" - icon_state = "a762" - origin_tech = "combat=2" - ammo_type = "/obj/item/ammo_casing/a762" - max_ammo = 50 - multiple_sprites = 1 - -/obj/item/ammo_magazine/a762/empty - name = "magazine (a762)" - icon_state = "a762" - ammo_type = "/obj/item/ammo_casing/a762" - max_ammo = 0 - multiple_sprites = 1 - -/obj/item/ammo_magazine \ No newline at end of file + max_ammo = 30 diff --git a/code/modules/projectiles/ammunition/bullets.dm b/code/modules/projectiles/ammunition/bullets.dm index e4b90d2b98f..87083bf1920 100644 --- a/code/modules/projectiles/ammunition/bullets.dm +++ b/code/modules/projectiles/ammunition/bullets.dm @@ -43,6 +43,10 @@ caliber = ".45" projectile_type = "/obj/item/projectile/bullet/midbullet" +/obj/item/ammo_casing/c10mm + desc = "A 10mm bullet casing." + caliber = "10mm" + projectile_type = "obj/item/projectile/bullet/midbullet2" /obj/item/ammo_casing/a12mm desc = "A 12mm bullet casing." @@ -96,6 +100,15 @@ projectile_type = "/obj/item/projectile/energy/dart" m_amt = 12500 +obj/item/ammo_casing/shotgun/dart/New() + ..() + flags |= NOREACT + create_reagents(30) + +/obj/item/ammo_casing/shotgun/dart/attackby() + return + + /obj/item/ammo_casing/a762 desc = "A 7.62 bullet casing." caliber = "a762" diff --git a/code/modules/projectiles/ammunition/magazines.dm b/code/modules/projectiles/ammunition/magazines.dm new file mode 100644 index 00000000000..919c48b0bda --- /dev/null +++ b/code/modules/projectiles/ammunition/magazines.dm @@ -0,0 +1,149 @@ +////////////////INTERNAL MAGAZINES////////////////////// +/obj/item/ammo_box/magazine/internal/cylinder + name = "revolver cylinder" + desc = "Oh god, this shouldn't be here" + ammo_type = "/obj/item/ammo_casing/a357" + caliber = "357" + max_ammo = 7 + +/obj/item/ammo_box/magazine/internal/cylinder/ammo_count(var/countempties = 1) + if (!countempties) + var/boolets = 0 + for (var/i = 1, i <= stored_ammo.len, i++) + var/obj/item/ammo_casing/bullet = stored_ammo[i] + if (bullet.BB) + boolets++ + return boolets + else + return stored_ammo.len + +/obj/item/ammo_box/magazine/internal/cylinder/rus357 + name = "russian revolver cylinder" + desc = "Oh god, this shouldn't be here" + ammo_type = "/obj/item/ammo_casing/a357" + caliber = "357" + max_ammo = 6 + +/obj/item/ammo_box/magazine/internal/cylinder/rus357/New() + stored_ammo += new ammo_type(src) + +/obj/item/ammo_box/magazine/internal/cylinder/rev38 + name = "d-tiv revolver cylinder" + desc = "Oh god, this shouldn't be here" + ammo_type = "/obj/item/ammo_casing/c38" + caliber = "38" + max_ammo = 6 + +/obj/item/ammo_box/magazine/internal/shot + name = "shotgun internal magazine" + desc = "Oh god, this shouldn't be here" + ammo_type = "/obj/item/ammo_casing/shotgun/beanbag" + caliber = "shotgun" + max_ammo = 4 + +/obj/item/ammo_box/magazine/internal/shotcom + name = "combat shotgun internal magazine" + desc = "Oh god, this shouldn't be here" + ammo_type = "/obj/item/ammo_casing/shotgun" + caliber = "shotgun" + max_ammo = 8 + +/obj/item/ammo_box/magazine/internal/cylinder/dualshot + name = "double-barrel shotgun internal magazine" + desc = "This doesn't even exist" + ammo_type = "/obj/item/ammo_casing/shotgun/beanbag" + caliber = "shotgun" + max_ammo = 2 + +///////////EXTERNAL MAGAZINES//////////////// +/obj/item/ammo_box/magazine/m9mm + name = "magazine (9mm)" + icon_state = "9x19p" + origin_tech = "combat=2" + ammo_type = "/obj/item/ammo_casing/c9mm" + caliber = "9mm" + max_ammo = 8 + multiple_sprites = 2 + +/obj/item/ammo_box/magazine/msmg9mm + name = "SMG magazine (9mm)" + icon_state = "smg9mm" + ammo_type = "/obj/item/ammo_casing/c9mm" + caliber = "9mm" + max_ammo = 18 + +/obj/item/ammo_box/magazine/msmg9mm/update_icon() + ..() + icon_state = "[initial(icon_state)]-[round(ammo_count(),3)]" + +/obj/item/ammo_box/magazine/m10mm + name = "magazine (10mm)" + icon_state = "9x19p" + origin_tech = "combat=2" + ammo_type = "/obj/item/ammo_casing/c10mm" + caliber = "10mm" + max_ammo = 8 + multiple_sprites = 2 + +/obj/item/ammo_box/magazine/m12mm + name = "magazine (12mm)" + icon_state = "12mm" + origin_tech = "combat=2" + ammo_type = "/obj/item/ammo_casing/a12mm" + caliber = "12mm" + max_ammo = 20 + +/obj/item/ammo_box/magazine/m12mm/update_icon() + ..() + icon_state = "[initial(icon_state)]-[round(ammo_count(),2)]" + +/obj/item/ammo_box/magazine/sm45 + name = "magazine (.45)" + icon_state = "9x19p" + ammo_type = "/obj/item/ammo_casing/c45" + caliber = ".45" + max_ammo = 12 + +/obj/item/ammo_box/magazine/sm45/update_icon() + ..() + icon_state = "[initial(icon_state)]-[ammo_count() ? "8" : "0"]" + +/obj/item/ammo_box/magazine/uzim45 + name = "Uzi magazine (.45)" + icon_state = "uzi45" + ammo_type = "/obj/item/ammo_casing/c45" + caliber = ".45" + max_ammo = 16 + +/obj/item/ammo_box/magazine/uzim45/update_icon() + ..() + icon_state = "[initial(icon_state)]-[round(ammo_count(),2)]" + +/obj/item/ammo_box/magazine/m50 + name = "magazine (.50ae)" + icon_state = "50ae" + origin_tech = "combat=2" + ammo_type = "/obj/item/ammo_casing/a50" + caliber = ".50" + max_ammo = 7 + multiple_sprites = 1 + +/obj/item/ammo_box/magazine/m75 + name = "magazine (.75)" + icon_state = "75" + ammo_type = "/obj/item/ammo_casing/a75" + caliber = "75" + multiple_sprites = 2 + max_ammo = 8 + +/obj/item/ammo_box/magazine/m762 + name = "magazine (7.62mm)" + icon_state = "a762" + origin_tech = "combat=2" + ammo_type = "/obj/item/ammo_casing/a762" + caliber = "a762" + max_ammo = 50 + +/obj/item/ammo_box/magazine/m762/update_icon() + ..() + icon_state = "[initial(icon_state)]-[round(ammo_count(),10)]" \ No newline at end of file diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 62f4a9884f9..2afec0d1f9d 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -17,10 +17,8 @@ var/fire_sound = 'sound/weapons/Gunshot.ogg' var/obj/item/projectile/in_chamber = null - var/caliber = "" var/silenced = 0 var/recoil = 0 - var/ejectshell = 1 var/clumsy_check = 1 var/tmp/list/mob/living/target //List of who yer targeting. var/tmp/lock_time = -100 @@ -40,7 +38,7 @@ else return 0 - proc/load_into_chamber() + proc/process_chambered() return 0 proc/special_check(var/mob/M) //Placeholder for any special checks, like detective's revolver. @@ -101,7 +99,7 @@ user << "[src] is not ready to fire again!" return - if(!load_into_chamber()) //CHECK + if(!process_chambered()) //CHECK return click_empty(user) if(!in_chamber) @@ -136,6 +134,15 @@ in_chamber.current = curloc in_chamber.yo = targloc.y - curloc.y in_chamber.xo = targloc.x - curloc.x + if(istype(user, /mob/living/carbon)) + var/mob/living/carbon/mob = user + if(mob.shock_stage > 120) + in_chamber.yo += rand(-2,2) + in_chamber.xo += rand(-2,2) + else if(mob.shock_stage > 70) + in_chamber.yo += rand(-1,1) + in_chamber.xo += rand(-1,1) + if(params) var/list/mouse_control = params2list(params) @@ -158,7 +165,7 @@ user.update_inv_r_hand() /obj/item/weapon/gun/proc/can_fire() - return load_into_chamber() + return process_chambered() /obj/item/weapon/gun/proc/can_hit(var/mob/living/target as mob, var/mob/living/user as mob) return in_chamber.check_fire(target,user) @@ -180,7 +187,7 @@ M.visible_message("\blue [user] decided life was worth living") mouthshoot = 0 return - if (load_into_chamber()) + if (process_chambered()) user.visible_message("[user] pulls the trigger.") if(silenced) playsound(user, fire_sound, 10, 1) @@ -201,7 +208,7 @@ mouthshoot = 0 return - if (src.load_into_chamber()) + if (src.process_chambered()) //Point blank shooting if on harm intent or target we were targeting. if(user.a_intent == "hurt") user.visible_message("\red \The [user] fires \the [src] point blank at [M]!") diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index fb506def213..dfc41f945c8 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -26,7 +26,7 @@ return - load_into_chamber() + process_chambered() if(in_chamber) return 1 if(!power_supply) return 0 if(!power_supply.use(charge_cost)) return 0 diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index c7026905b62..ae23d39cdb0 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -50,7 +50,7 @@ obj/item/weapon/gun/energy/laser/retro -/obj/item/weapon/gun/energy/laser/cyborg/load_into_chamber() +/obj/item/weapon/gun/energy/laser/cyborg/process_chambered() if(in_chamber) return 1 if(isrobot(src.loc)) @@ -76,7 +76,7 @@ obj/item/weapon/gun/energy/laser/retro isHandgun() return 0 -/obj/item/weapon/gun/energy/lasercannon/cyborg/load_into_chamber() +/obj/item/weapon/gun/energy/lasercannon/cyborg/process_chambered() if(in_chamber) return 1 if(isrobot(src.loc)) diff --git a/code/modules/projectiles/guns/energy/pulse.dm b/code/modules/projectiles/guns/energy/pulse.dm index cd990a66a72..3e04e755ec0 100644 --- a/code/modules/projectiles/guns/energy/pulse.dm +++ b/code/modules/projectiles/guns/energy/pulse.dm @@ -36,7 +36,7 @@ isHandgun() return 0 -/obj/item/weapon/gun/energy/pulse_rifle/cyborg/load_into_chamber() +/obj/item/weapon/gun/energy/pulse_rifle/cyborg/process_chambered() if(in_chamber) return 1 if(isrobot(src.loc)) diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index 685122e05c5..bf0f08676c6 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -3,115 +3,92 @@ #define MAGAZINE 2 /obj/item/weapon/gun/projectile - desc = "A classic revolver. Uses 357 ammo" - name = "revolver" - icon_state = "revolver" - caliber = "357" + desc = "Now comes in flavors like GUN. Uses 10mm ammo, for some reason" + name = "projectile gun" + icon_state = "pistol" origin_tech = "combat=2;materials=2" w_class = 3.0 m_amt = 1000 recoil = 1 - var/ammo_type = "/obj/item/ammo_casing/a357" - var/list/loaded = list() - var/max_shells = 7 - var/load_method = SPEEDLOADER //0 = Single shells or quick loader, 1 = box, 2 = magazine - var/obj/item/ammo_magazine/empty_mag = null + var/ammo_type = "/obj/item/ammo_casing/c10mm" + var/mag_type = "/obj/item/ammo_box/magazine/m10mm" //Removes the need for max_ammo and caliber info + var/obj/item/ammo_box/magazine/magazine + var/obj/item/ammo_casing/chambered = null // The round (not bullet) that is in the chamber. + /obj/item/weapon/gun/projectile/New() ..() - for(var/i = 1, i <= max_shells, i++) - loaded += new ammo_type(src) + magazine = new mag_type(src) + chamber_round() update_icon() return -/obj/item/weapon/gun/projectile/load_into_chamber() - if(in_chamber) - return 1 //{R} +/obj/item/weapon/gun/projectile/process_chambered() +// if(in_chamber) +// return 1 - if(!loaded.len) - return 0 - var/obj/item/ammo_casing/AC = loaded[1] //load next casing. - loaded -= AC //Remove casing from loaded list. + var/obj/item/ammo_casing/AC = chambered //Find chambered round if(isnull(AC) || !istype(AC)) return 0 AC.loc = get_turf(src) //Eject casing onto ground. + chambered = null + chamber_round() if(AC.BB) - AC.desc += " This one is spent." //descriptions are magic - only when there's a projectile in the casing in_chamber = AC.BB //Load projectile into chamber. AC.BB.loc = src //Set projectile loc to gun. + AC.update_icon() return 1 return 0 -/obj/item/weapon/gun/projectile/attackby(var/obj/item/A as obj, mob/user as mob) +/obj/item/weapon/gun/projectile/proc/chamber_round() + if (chambered || !magazine) + return + else if (magazine.ammo_count()) + chambered = magazine.get_round() + chambered.loc = src + return - var/num_loaded = 0 - if(istype(A, /obj/item/ammo_magazine)) - if((load_method == MAGAZINE) && loaded.len) return - var/obj/item/ammo_magazine/AM = A - for(var/obj/item/ammo_casing/AC in AM.stored_ammo) - if(loaded.len >= max_shells) - break - if(AC.caliber == caliber && loaded.len < max_shells) - AC.loc = src - AM.stored_ammo -= AC - loaded += AC - num_loaded++ - if(load_method == MAGAZINE) + +/obj/item/weapon/gun/projectile/attackby(var/obj/item/A as obj, mob/user as mob) + if (istype(A, /obj/item/ammo_box/magazine)) + var/obj/item/ammo_box/magazine/AM = A + if (!magazine && istype(AM, text2path(mag_type))) user.remove_from_mob(AM) - empty_mag = AM - empty_mag.loc = src - if(istype(A, /obj/item/ammo_casing) && load_method == SPEEDLOADER) - var/obj/item/ammo_casing/AC = A - if(AC.caliber == caliber && loaded.len < max_shells) - user.drop_item() - AC.loc = src - loaded += AC - num_loaded++ - if(num_loaded) - user << "\blue You load [num_loaded] shell\s into the gun!" - A.update_icon() + magazine = AM + magazine.loc = src + user << "You load a new magazine into \the [src]!" + chamber_round() + A.update_icon() + update_icon() + return 1 + else if (magazine) + user << "There's already a magazine in \the [src]." + return 0 + +/obj/item/weapon/gun/projectile/attack_self(mob/living/user as mob) + if (magazine) + magazine.loc = get_turf(src.loc) + user.put_in_hands(magazine) + magazine.update_icon() + magazine = null + user << "You pull the magazine out of \the [src]!" + else + user << "There's no magazine in \the [src]." update_icon() return -/obj/item/weapon/gun/projectile/attack_self(mob/user as mob) - if (target) - return ..() - if (loaded.len) - if (load_method == SPEEDLOADER) - var/obj/item/ammo_casing/AC = loaded[1] - loaded -= AC - AC.loc = get_turf(src) //Eject casing onto ground. - user << "\blue You unload shell from \the [src]!" - if (load_method == MAGAZINE) - var/obj/item/ammo_magazine/AM = empty_mag - for (var/obj/item/ammo_casing/AC in loaded) - AM.stored_ammo += AC - loaded -= AC - AM.loc = get_turf(src) - empty_mag = null - update_icon() - user << "\blue You unload magazine from \the [src]!" - else - user << "\red Nothing loaded in \the [src]!" - - - /obj/item/weapon/gun/projectile/examine() ..() - usr << "Has [getAmmo()] round\s remaining." -// if(in_chamber && !loaded.len) -// usr << "However, it has a chambered round." -// if(in_chamber && loaded.len) -// usr << "It also has a chambered round." {R} + usr << "Has [get_ammo()] round\s remaining." return -/obj/item/weapon/gun/projectile/proc/getAmmo() - var/bullets = 0 - for(var/obj/item/ammo_casing/AC in loaded) - if(istype(AC)) - bullets += 1 - return bullets - +/obj/item/weapon/gun/projectile/proc/get_ammo(var/countchambered = 1) + var/boolets = 0 //mature var names for mature people + if (chambered && countchambered) + boolets++ + if (magazine) + boolets += magazine.ammo_count() + return boolets diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm index 93a7010d7d1..1d3e576584e 100644 --- a/code/modules/projectiles/guns/projectile/automatic.dm +++ b/code/modules/projectiles/guns/projectile/automatic.dm @@ -3,27 +3,35 @@ desc = "A lightweight, fast firing gun. Uses 9mm rounds." icon_state = "saber" //ugly w_class = 3.0 - max_shells = 18 - caliber = "9mm" origin_tech = "combat=4;materials=2" ammo_type = "/obj/item/ammo_casing/c9mm" automatic = 1 - + mag_type = "/obj/item/ammo_box/magazine/msmg9mm" + var/alarmed = 0 fire_delay = 0 - isHandgun() return 0 +/obj/item/weapon/gun/projectile/automatic/update_icon() + ..() + icon_state = "[initial(icon_state)][magazine ? "-[magazine.max_ammo]" : ""][chambered ? "" : "-e"]" + return + +/obj/item/weapon/gun/projectile/automatic/attackby(var/obj/item/A as obj, mob/user as mob) + if(..() && chambered) + alarmed = 0 + + /obj/item/weapon/gun/projectile/automatic/mini_uzi name = "Uzi" desc = "A lightweight, fast firing gun, for when you want someone dead. Uses .45 rounds." icon_state = "mini-uzi" w_class = 3.0 - max_shells = 16 - caliber = ".45" + origin_tech = "combat=5;materials=2;syndicate=8" ammo_type = "/obj/item/ammo_casing/c45" + mag_type = "/obj/item/ammo_box/magazine/uzim45" isHandgun() return 1 @@ -35,38 +43,29 @@ icon_state = "c20r" item_state = "c20r" w_class = 3.0 - max_shells = 20 - caliber = "12mm" origin_tech = "combat=5;materials=2;syndicate=8" ammo_type = "/obj/item/ammo_casing/a12mm" + mag_type = "/obj/item/ammo_box/magazine/m12mm" fire_sound = 'sound/weapons/Gunshot_smg.ogg' - load_method = 2 - - - New() - ..() - empty_mag = new /obj/item/ammo_magazine/a12mm/empty(src) - update_icon() - return - - - afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag) - ..() - if(!loaded.len && empty_mag) - empty_mag.loc = get_turf(src.loc) - empty_mag = null - playsound(user, 'sound/weapons/smg_empty_alarm.ogg', 40, 1) - update_icon() - return - +/obj/item/weapon/gun/projectile/automatic/c20r/New() + ..() update_icon() - ..() - if(empty_mag) - icon_state = "c20r-[round(loaded.len,4)]" - else - icon_state = "c20r" - return + return + +/obj/item/weapon/gun/projectile/automatic/c20r/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag) + ..() + if(!chambered && !get_ammo() && !alarmed) + playsound(user, 'sound/weapons/smg_empty_alarm.ogg', 40, 1) + update_icon() + alarmed = 1 + return + +/obj/item/weapon/gun/projectile/automatic/c20r/update_icon() + ..() + icon_state = "c20r[magazine ? "-[round(get_ammo(0),4)]" : ""][chambered ? "" : "-e"]" + return + /obj/item/weapon/gun/projectile/automatic/l6_saw name = "\improper L6 SAW" @@ -75,14 +74,13 @@ item_state = "l6closedmag" w_class = 4 slot_flags = 0 - max_shells = 50 - caliber = "a762" origin_tech = "combat=5;materials=1;syndicate=2" ammo_type = "/obj/item/ammo_casing/a762" + mag_type = "/obj/item/ammo_box/magazine/m762" fire_sound = 'sound/weapons/Gunshot_smg.ogg' - load_method = 2 + var/cover_open = 0 - var/mag_inserted = 1 + /obj/item/weapon/gun/projectile/automatic/l6_saw/attack_self(mob/user as mob) @@ -92,7 +90,7 @@ /obj/item/weapon/gun/projectile/automatic/l6_saw/update_icon() - icon_state = "l6[cover_open ? "open" : "closed"][mag_inserted ? round(loaded.len, 25) : "-empty"]" + icon_state = "l6[cover_open ? "open" : "closed"][magazine ? round(magazine.ammo_count() * 2, 25) : "-empty"]" /obj/item/weapon/gun/projectile/automatic/l6_saw/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params) //what I tried to do here is just add a check to see if the cover is open or not and add an icon_state change because I can't figure out how c-20rs do it with overlays @@ -107,19 +105,14 @@ if(loc != user) ..() return //let them pick it up - if(!cover_open || (cover_open && !mag_inserted)) + if(!cover_open || (cover_open && !magazine)) ..() - else if(cover_open && mag_inserted) + else if(cover_open && magazine) //drop the mag - empty_mag = new /obj/item/ammo_magazine/a762(src) - empty_mag.stored_ammo = loaded - empty_mag.icon_state = "a762-[round(loaded.len, 10)]" - empty_mag.desc = "There are [loaded.len] shells left!" - empty_mag.loc = get_turf(src.loc) - user.put_in_hands(empty_mag) - empty_mag = null - mag_inserted = 0 - loaded = list() + magazine.update_icon() + magazine.loc = get_turf(src.loc) + user.put_in_hands(magazine) + magazine = null update_icon() user << "You remove the magazine from [src]." @@ -128,13 +121,6 @@ if(!cover_open) user << "[src]'s cover is closed! You can't insert a new mag!" return - else if(cover_open && mag_inserted) - user << "[src] already has a magazine inserted!" - return - else if(cover_open && !mag_inserted) - mag_inserted = 1 - user << "You insert the magazine!" - update_icon() ..() diff --git a/code/modules/projectiles/guns/projectile/pistol.dm b/code/modules/projectiles/guns/projectile/pistol.dm index c7748091e9f..b6100ebe84c 100644 --- a/code/modules/projectiles/guns/projectile/pistol.dm +++ b/code/modules/projectiles/guns/projectile/pistol.dm @@ -1,114 +1,101 @@ -/obj/item/weapon/gun/projectile/silenced +/obj/item/weapon/gun/projectile/automatic/silenced name = "silenced pistol" desc = "A small, quiet, easily concealable gun. Uses .45 rounds." icon_state = "silenced_pistol" w_class = 3.0 - max_shells = 12 - caliber = ".45" silenced = 1 origin_tech = "combat=2;materials=2;syndicate=8" ammo_type = "/obj/item/ammo_casing/c45" + mag_type = "/obj/item/ammo_box/magazine/sm45" + +/obj/item/weapon/gun/projectile/automatic/silenced/update_icon() + ..() + icon_state = "[initial(icon_state)]" + return -/obj/item/weapon/gun/projectile/deagle +/obj/item/weapon/gun/projectile/automatic/deagle name = "desert eagle" desc = "A robust handgun that uses .50 AE ammo" icon_state = "deagle" force = 14.0 - max_shells = 7 - caliber = ".50" - ammo_type ="/obj/item/ammo_casing/a50" - load_method = 2 - New() - ..() - empty_mag = new /obj/item/ammo_magazine/a50/empty(src) + ammo_type = "/obj/item/ammo_casing/a50" + mag_type = "/obj/item/ammo_box/magazine/m50" + +/obj/item/weapon/gun/projectile/automatic/deagle/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag) + ..() + if(!chambered && !get_ammo() && !alarmed) + playsound(user, 'sound/weapons/smg_empty_alarm.ogg', 40, 1) update_icon() - return + alarmed = 1 + return +/obj/item/weapon/gun/projectile/automatic/deagle/update_icon() + ..() + icon_state = "[initial(icon_state)][magazine ? "" : "-e"]" - afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag) - ..() - if(!loaded.len && empty_mag) - empty_mag.loc = get_turf(src.loc) - empty_mag = null - playsound(user, 'sound/weapons/smg_empty_alarm.ogg', 40, 1) - update_icon() - return - -/obj/item/weapon/gun/projectile/deagle/gold +/obj/item/weapon/gun/projectile/automatic/deagle/gold desc = "A gold plated gun folded over a million times by superior martian gunsmiths. Uses .50 AE ammo." icon_state = "deagleg" item_state = "deagleg" -/obj/item/weapon/gun/projectile/deagle/camo +/obj/item/weapon/gun/projectile/automatic/deagle/camo desc = "A Deagle brand Deagle for operators operating operationally. Uses .50 AE ammo." icon_state = "deaglecamo" item_state = "deagleg" -/obj/item/weapon/gun/projectile/gyropistol +/obj/item/weapon/gun/projectile/automatic/gyropistol name = "gyrojet pistol" desc = "A bulky pistol designed to fire self propelled rounds" icon_state = "gyropistol" - max_shells = 8 - caliber = "75" fire_sound = 'sound/effects/Explosion1.ogg' origin_tech = "combat=3" ammo_type = "/obj/item/ammo_casing/a75" - load_method = 2 - New() - ..() - empty_mag = new /obj/item/ammo_magazine/a75/empty(src) - update_icon() - return - - - afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag) - ..() - if(!loaded.len && empty_mag) - empty_mag.loc = get_turf(src.loc) - empty_mag = null - playsound(user, 'sound/weapons/smg_empty_alarm.ogg', 40, 1) - update_icon() - return + mag_type = "/obj/item/ammo_box/magazine/m75" +/obj/item/weapon/gun/projectile/automatic/gyropistol/New() + ..() update_icon() - ..() - if(empty_mag) - icon_state = "gyropistolloaded" - else - icon_state = "gyropistol" - return + return -/obj/item/weapon/gun/projectile/pistol +/obj/item/weapon/gun/projectile/automatic/gyropistol/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag) + ..() + if(!chambered && !get_ammo() && !alarmed) + playsound(user, 'sound/weapons/smg_empty_alarm.ogg', 40, 1) + update_icon() + alarmed = 1 + return + +/obj/item/weapon/gun/projectile/automatic/gyropistol/update_icon() + ..() + icon_state = "[initial(icon_state)][magazine ? "loaded" : ""]" + return + +/obj/item/weapon/gun/projectile/automatic/pistol name = "\improper Stechtkin pistol" desc = "A small, easily concealable gun. Uses 9mm rounds." icon_state = "pistol" w_class = 2 - max_shells = 8 - caliber = "9mm" silenced = 0 origin_tech = "combat=2;materials=2;syndicate=2" ammo_type = "/obj/item/ammo_casing/c9mm" - load_method = 2 + mag_type = "/obj/item/ammo_box/magazine/m10mm" -/obj/item/weapon/gun/projectile/pistol/New() +/obj/item/weapon/gun/projectile/automatic/pistol/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag) ..() - empty_mag = new /obj/item/ammo_magazine/mc9mm/empty(src) + if(magazine) + if(!chambered && !magazine.ammo_count()) + magazine.update_icon() + magazine.loc = get_turf(src.loc) + magazine = null return -/obj/item/weapon/gun/projectile/pistol/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag) - ..() - if(!loaded.len && empty_mag) - empty_mag.loc = get_turf(src.loc) - empty_mag = null - return - -/obj/item/weapon/gun/projectile/pistol/attack_hand(mob/user as mob) +/obj/item/weapon/gun/projectile/automatic/pistol/attack_hand(mob/user as mob) if(loc == user) if(silenced) if(user.l_hand != src && user.r_hand != src) @@ -123,7 +110,7 @@ ..() -/obj/item/weapon/gun/projectile/pistol/attackby(obj/item/I as obj, mob/user as mob) +/obj/item/weapon/gun/projectile/automatic/pistol/attackby(obj/item/I as obj, mob/user as mob) if(istype(I, /obj/item/weapon/silencer)) if(user.l_hand != src && user.r_hand != src) //if we're not in his hands user << "You'll need [src] in your hands to do that." @@ -137,12 +124,11 @@ return ..() -/obj/item/weapon/gun/projectile/pistol/update_icon() +/obj/item/weapon/gun/projectile/automatic/pistol/update_icon() ..() - if(silenced) - icon_state = "pistol-silencer" - else - icon_state = "pistol" + icon_state = "[initial(icon_state)][silenced ? "-silencer" : ""][chambered ? "" : "-e"]" + return + /obj/item/weapon/silencer name = "silencer" diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index e153281c724..5a9d9d8f7b8 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -1,103 +1,165 @@ -/obj/item/weapon/gun/projectile/detective +/obj/item/weapon/gun/projectile/revolver + desc = "A classic revolver. Uses 357 ammo" + name = "revolver" + icon_state = "revolver" + ammo_type = "/obj/item/ammo_casing/a357" + mag_type = "/obj/item/ammo_box/magazine/internal/cylinder" + +/obj/item/weapon/gun/projectile/revolver/chamber_round() + if (chambered || !magazine) + return + else if (magazine.ammo_count()) + chambered = magazine.get_round(1) + return + +/obj/item/weapon/gun/projectile/revolver/process_chambered() + var/obj/item/ammo_casing/AC = chambered //Find chambered round + if(isnull(AC) || !istype(AC)) + return 0 + chambered = null + chamber_round() + if(AC.BB) + in_chamber = AC.BB //Load projectile into chamber. + AC.BB.loc = src //Set projectile loc to gun. + AC.BB = null + AC.update_icon() + return 1 + return 0 + +/obj/item/weapon/gun/projectile/revolver/attackby(var/obj/item/A as obj, mob/user as mob) + var/num_loaded = 0 + if(istype(A, /obj/item/ammo_box)) + var/obj/item/ammo_box/AM = A + for(var/obj/item/ammo_casing/AC in AM.stored_ammo) + if(magazine.give_round(AC)) + AM.stored_ammo -= AC + num_loaded++ + else + break + if(istype(A, /obj/item/ammo_casing)) + var/obj/item/ammo_casing/AC = A + if(magazine.give_round(AC)) + user.drop_item() + AC.loc = src + num_loaded++ + if(num_loaded) + user << "You load [num_loaded] shell\s into \the [src]!" + A.update_icon() + update_icon() + chamber_round() + +/obj/item/weapon/gun/projectile/revolver/attack_self(mob/living/user as mob) + var/num_unloaded = 0 + while (get_ammo() > 0) + var/obj/item/ammo_casing/CB + CB = magazine.get_round(0) + chambered = null + CB.loc = get_turf(src.loc) + CB.update_icon() + num_unloaded++ + if (num_unloaded) + user << "You unload [num_unloaded] shell\s from [src]!" + else + user << "[src] is empty." + +/obj/item/weapon/gun/projectile/revolver/get_ammo(var/countchambered = 0, var/countempties = 1) + var/boolets = 0 //mature var names for mature people + if (chambered && countchambered) + boolets++ + if (magazine) + boolets += magazine.ammo_count(countempties) + return boolets + +/obj/item/weapon/gun/projectile/revolver/examine() + ..() + usr << "[get_ammo(0,0)] of those are live rounds." + +/obj/item/weapon/gun/projectile/revolver/detective desc = "A cheap Martian knock-off of a Smith & Wesson Model 10. Uses .38-Special rounds." name = "revolver" icon_state = "detective" - max_shells = 6 - caliber = "38" origin_tech = "combat=2;materials=2" ammo_type = "/obj/item/ammo_casing/c38" - - var/perfect = 0 + mag_type = "/obj/item/ammo_box/magazine/internal/cylinder/rev38" - special_check(var/mob/living/carbon/human/M) - if(caliber == initial(caliber)) - return 1 - if(!perfect && prob(70 - (loaded.len * 10))) //minimum probability of 10, maximum of 60 - M << "[src] blows up in your face." - M.take_organ_damage(0,20) - M.drop_item() - del(src) - return 0 +/obj/item/weapon/gun/projectile/revolver/detective/special_check(var/mob/living/carbon/human/M) + if(magazine.caliber == initial(magazine.caliber)) + return 1 + if(prob(70 - (magazine.ammo_count() * 10))) //minimum probability of 10, maximum of 60 + M << "[src] blows up in your face." + M.take_organ_damage(0,20) + M.drop_item() + del(src) + return 0 + return 1 + +/obj/item/weapon/gun/projectile/revolver/detective/verb/rename_gun() + set name = "Name Gun" + set category = "Object" + set desc = "Click to rename your gun." + + var/mob/M = usr + var/input = stripped_input(M,"What do you want to name the gun?", ,"", MAX_NAME_LEN) + + if(src && input && !M.stat && in_range(M,src)) + name = input + M << "You name the gun [input]. Say hello to your new friend." return 1 - verb/rename_gun() - set name = "Name Gun" - set category = "Object" - set desc = "Click to rename your gun. If you're the detective." +/obj/item/weapon/gun/projectile/revolver/detective/verb/reskin_gun() + set name = "Reskin gun" + set category = "Object" + set desc = "Click to reskin your gun." - var/mob/M = usr - var/input = stripped_input(M,"What do you want to name the gun?", ,"", MAX_NAME_LEN) + var/mob/M = usr + var/list/options = list() + options["The Original"] = "detective" + options["Leopard Spots"] = "detective_leopard" + options["Black Panther"] = "detective_panther" + options["Gold Trim"] = "detective_gold" + options["The Peacemaker"] = "detective_peacemaker" + var/choice = input(M,"What do you want to skin the gun to?","Reskin Gun") in options - if(src && input && !M.stat && in_range(M,src)) - name = input - M << "You name the gun [input]. Say hello to your new friend." - return 1 + if(src && choice && !M.stat && in_range(M,src)) + icon_state = options[choice] + M << "Your gun is now skinned as [choice]. Say hello to your new friend." + return 1 - verb/reskin_gun() - set name = "Reskin gun" - set category = "Object" - set desc = "Click to reskin your gun. If you're the detective." - - var/mob/M = usr - var/list/options = list() - options["The Original"] = "detective" - options["Leopard Spots"] = "detective_leopard" - options["Black Panther"] = "detective_panther" - options["Gold Trim"] = "detective_gold" - options["The Peacemaker"] = "detective_peacemaker" - var/choice = input(M,"What do you want to skin the gun to?","Reskin Gun") in options - - if(src && choice && !M.stat && in_range(M,src)) - icon_state = options[choice] - M << "Your gun is now skinned as [choice]. Say hello to your new friend." - return 1 - - attackby(var/obj/item/A as obj, mob/user as mob) - var/obj/item/weapon/conversion_kit/CK - ..() - if(isscrewdriver(A) || istype(A, /obj/item/weapon/conversion_kit)) - if(istype(A, /obj/item/weapon/conversion_kit)) - CK = A - if(!CK.open) - user << "This [CK.name] is useless unless you open it first. " +/obj/item/weapon/gun/projectile/revolver/detective/attackby(var/obj/item/A as obj, mob/user as mob) + ..() + if(istype(A, /obj/item/weapon/screwdriver)) + if(magazine.caliber == "38") + user << "You begin to reinforce the barrel of [src]." + if(magazine.ammo_count()) + afterattack(user, user) //you know the drill + user.visible_message("[src] goes off!", "[src] goes off in your face!") + return + if(do_after(user, 30)) + if(magazine.ammo_count()) + user << "You can't modify it!" return - if(caliber == "38") - user << "You begin to reinforce the barrel of [src]." - if(loaded.len) - afterattack(user, user) //you know the drill - playsound(user, fire_sound, 50, 1) - user.visible_message("[src] goes off!", "[src] goes off in your face!") + magazine.caliber = "357" + desc = "The barrel and chamber assembly seems to have been modified." + user << "You reinforce the barrel of [src]! Now it will fire .357 rounds." + else + user << "You begin to revert the modifications to [src]." + if(magazine.ammo_count()) + afterattack(user, user) //and again + user.visible_message("[src] goes off!", "[src] goes off in your face!") + return + if(do_after(user, 30)) + if(magazine.ammo_count()) + user << "You can't modify it!" return - if(do_after(user, 30)) - if(loaded.len) - user << "You can't modify it!" - return - caliber = "357" - desc = "The barrel and chamber assembly seems to have been modified." - user << "You reinforce the barrel of [src]! Now it will fire .357 rounds." - if(CK && istype(CK)) - perfect = 1 - else - user << "You begin to revert the modifications to [src]." - if(loaded.len) - afterattack(user, user) //and again - playsound(user, fire_sound, 50, 1) - user.visible_message("[src] goes off!", "[src] goes off in your face!") - return - if(do_after(user, 30)) - if(loaded.len) - user << "You can't modify it!" - return - caliber = "38" - desc = initial(desc) - user << "You remove the modifications on [src]! Now it will fire .38 rounds." - perfect = 0 + magazine.caliber = "38" + desc = initial(desc) + user << "You remove the modifications on [src]! Now it will fire .38 rounds." -/obj/item/weapon/gun/projectile/mateba +/obj/item/weapon/gun/projectile/revolver/mateba name = "mateba" desc = "When you absolutely, positively need a 10mm hole in the other guy. Uses .357 ammo." //>10mm hole >.357 icon_state = "mateba" @@ -106,80 +168,87 @@ // A gun to play Russian Roulette! // You can spin the chamber to randomize the position of the bullet. -/obj/item/weapon/gun/projectile/russian +/obj/item/weapon/gun/projectile/revolver/russian name = "Russian Revolver" desc = "A Russian made revolver. Uses .357 ammo. It has a single slot in it's chamber for a bullet." - max_shells = 6 origin_tech = "combat=2;materials=2" + mag_type = "/obj/item/ammo_box/magazine/internal/cylinder/rus357" + var/spun = 0 -/obj/item/weapon/gun/projectile/russian/New() +/obj/item/weapon/gun/projectile/revolver/russian/New() + ..() Spin() update_icon() -/obj/item/weapon/gun/projectile/russian/proc/Spin() - - for(var/obj/item/ammo_casing/AC in loaded) - del(AC) - loaded = list() - var/random = rand(1, max_shells) - for(var/i = 1; i <= max_shells; i++) - if(i != random) - loaded += i // Basically null - else - loaded += new ammo_type(src) - - -/obj/item/weapon/gun/projectile/russian/attackby(var/obj/item/A as obj, mob/user as mob) - - if(!A) return +/obj/item/weapon/gun/projectile/revolver/russian/proc/Spin() + chambered = null + var/random = rand(1, magazine.max_ammo) + if(random <= get_ammo(0,0)) + chamber_round() + spun = 1 +/obj/item/weapon/gun/projectile/revolver/russian/attackby(var/obj/item/A as obj, mob/user as mob) var/num_loaded = 0 - if(istype(A, /obj/item/ammo_magazine)) - - if((load_method == 2) && loaded.len) return - var/obj/item/ammo_magazine/AM = A + if(istype(A, /obj/item/ammo_box)) + var/obj/item/ammo_box/AM = A for(var/obj/item/ammo_casing/AC in AM.stored_ammo) - if(getAmmo() > 0 || loaded.len >= max_shells) - break - if(AC.caliber == caliber && loaded.len < max_shells) - AC.loc = src - AM.stored_ammo -= AC - loaded += AC - num_loaded++ + if(get_ammo() <= 1) + if(magazine.give_round(AC)) + AM.stored_ammo -= AC + num_loaded++ break - A.update_icon() - + if(istype(A, /obj/item/ammo_casing)) + var/obj/item/ammo_casing/AC = A + if(get_ammo() <= 1) + magazine.give_round(AC) + user.drop_item() + AC.loc = src + num_loaded++ if(num_loaded) user.visible_message("[user] loads a single bullet into the revolver and spins the chamber.", "You load a single bullet into the chamber and spin it.") else user.visible_message("[user] spins the chamber of the revolver.", "You spin the revolver's chamber.") - if(getAmmo() > 0) + if(get_ammo() > 0) Spin() update_icon() + A.update_icon() return -/obj/item/weapon/gun/projectile/russian/attack_self(mob/user as mob) - - user.visible_message("[user] spins the chamber of the revolver.", "You spin the revolver's chamber.") - if(getAmmo() > 0) +/obj/item/weapon/gun/projectile/revolver/russian/attack_self(mob/user as mob) + if(!spun && get_ammo(0,0)) + user.visible_message("[user] spins the chamber of the revolver.", "You spin the revolver's chamber.") Spin() + else + var/num_unloaded = 0 + while (get_ammo() > 0) + var/obj/item/ammo_casing/CB + CB = magazine.get_round() + chambered = null + CB.loc = get_turf(src.loc) + CB.update_icon() + num_unloaded++ + if (num_unloaded) + user << "You unload [num_unloaded] shell\s from [src]!" + else + user << "[src] is empty." -/obj/item/weapon/gun/projectile/russian/attack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj) +/obj/item/weapon/gun/projectile/revolver/russian/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params) + ..() + spun = 0 - if(!loaded.len) +/obj/item/weapon/gun/projectile/revolver/russian/attack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj) + + if(!chambered) user.visible_message("\red *click*", "\red *click*") - playsound(user, 'sound/weapons/empty.ogg', 100, 1) return if(isliving(target) && isliving(user)) if(target == user) var/datum/organ/external/affecting = user.zone_sel.selecting if(affecting == "head") - - var/obj/item/ammo_casing/AC = loaded[1] - if(!load_into_chamber()) + var/obj/item/ammo_casing/AC = chambered + if(!process_chambered()) user.visible_message("\red *click*", "\red *click*") - playsound(user, 'sound/weapons/empty.ogg', 100, 1) return if(!in_chamber) return @@ -189,5 +258,7 @@ if(!P.nodamage) user.apply_damage(300, BRUTE, affecting) // You are dead, dead, dead. return + + spun = 0 ..() diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 2d20b7bb9b1..74844a979dc 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -1,137 +1,145 @@ +/obj/item/weapon/gun/projectile/shotgun + name = "shotgun" + desc = "This almost certainly shouldn't be here." + icon_state = "shotgun" + item_state = "shotgun" + ammo_type = "/obj/item/ammo_casing/shotgun" + mag_type = "/obj/item/ammo_box/magazine/internal/shot" + +/obj/item/weapon/gun/projectile/shotgun/attackby(var/obj/item/A as obj, mob/user as mob) + var/num_loaded = 0 + if(istype(A, /obj/item/ammo_box)) + var/obj/item/ammo_box/AM = A + for(var/obj/item/ammo_casing/AC in AM.stored_ammo) + if(magazine && magazine.give_round(AC)) + AM.stored_ammo -= AC + num_loaded++ + else + break + if(istype(A, /obj/item/ammo_casing)) + var/obj/item/ammo_casing/AC = A + if(magazine && magazine.give_round(AC)) + user.drop_item() + AC.loc = src + num_loaded++ + if(num_loaded) + user << "You load [num_loaded] shell\s into \the [src]!" + A.update_icon() + update_icon() + /obj/item/weapon/gun/projectile/shotgun/pump name = "shotgun" desc = "Useful for sweeping alleys." icon_state = "shotgun" item_state = "shotgun" - max_shells = 4 w_class = 4.0 force = 10 flags = FPRINT | TABLEPASS | CONDUCT slot_flags = SLOT_BACK - caliber = "shotgun" origin_tech = "combat=4;materials=2" ammo_type = "/obj/item/ammo_casing/shotgun/beanbag" var/recentpump = 0 // to prevent spammage var/pumped = 0 - var/obj/item/ammo_casing/current_shell = null - isHandgun() + +/obj/item/weapon/gun/projectile/shotgun/pump/process_chambered() + var/obj/item/ammo_casing/AC = chambered //Find chambered round + if(isnull(AC) || !istype(AC)) return 0 - - load_into_chamber() - if(in_chamber) - return 1 - return 0 - - - attack_self(mob/living/user as mob) - if(recentpump) return - pump() - recentpump = 1 - spawn(10) - recentpump = 0 - return - - - proc/pump(mob/M as mob) - playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1) - pumped = 0 - if(current_shell)//We have a shell in the chamber - current_shell.loc = get_turf(src)//Eject casing - current_shell = null - if(in_chamber) - in_chamber = null - if(!loaded.len) return 0 - var/obj/item/ammo_casing/AC = loaded[1] //load next casing. - loaded -= AC //Remove casing from loaded list. - current_shell = AC - if(AC.BB) - in_chamber = AC.BB //Load projectile into chamber. - update_icon() //I.E. fix the desc + if(AC.BB) + if(AC.reagents && AC.BB.reagents) + var/datum/reagents/casting_reagents = AC.reagents + casting_reagents.trans_to(AC.BB, casting_reagents.total_volume) //For chemical darts + casting_reagents.delete() + in_chamber = AC.BB //Load projectile into chamber. + AC.BB.loc = src //Set projectile loc to gun. + AC.BB = null + AC.update_icon() return 1 + return 0 + + +/obj/item/weapon/gun/projectile/shotgun/pump/attack_self(mob/living/user as mob) + if(recentpump) return + pump() + recentpump = 1 + spawn(10) + recentpump = 0 + return + + +/obj/item/weapon/gun/projectile/shotgun/pump/proc/pump(mob/M as mob) + playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1) + pumped = 0 + if(chambered)//We have a shell in the chamber + chambered.loc = get_turf(src)//Eject casing + chambered = null + if(in_chamber) + in_chamber = null + if(!magazine.ammo_count()) return 0 + var/obj/item/ammo_casing/AC = magazine.get_round() //load next casing. + chambered = AC + update_icon() //I.E. fix the desc + return 1 + +/obj/item/weapon/gun/projectile/shotgun/pump/examine() + ..() + if (chambered) + usr << "A [chambered.BB ? "live" : "spent"] one is in the chamber." /obj/item/weapon/gun/projectile/shotgun/pump/combat name = "combat shotgun" icon_state = "cshotgun" - max_shells = 8 origin_tech = "combat=5;materials=2" ammo_type = "/obj/item/ammo_casing/shotgun" + mag_type = "/obj/item/ammo_box/magazine/internal/shotcom" + w_class = 5 -//this is largely hacky and bad :( -Pete -/obj/item/weapon/gun/projectile/shotgun/doublebarrel +/obj/item/weapon/gun/projectile/revolver/doublebarrel name = "double-barreled shotgun" desc = "A true classic." icon_state = "dshotgun" item_state = "shotgun" - max_shells = 2 w_class = 4.0 force = 10 flags = FPRINT | TABLEPASS | CONDUCT slot_flags = SLOT_BACK - caliber = "shotgun" origin_tech = "combat=3;materials=1" ammo_type = "/obj/item/ammo_casing/shotgun/beanbag" + mag_type = "/obj/item/ammo_box/magazine/internal/cylinder/dualshot" - New() - for(var/i = 1, i <= max_shells, i++) - loaded += new ammo_type(src) - - update_icon() - return - - load_into_chamber() - if(in_chamber) - return 1 - if(!loaded.len) - return 0 - - var/obj/item/ammo_casing/AC = loaded[1] //load next casing. - loaded -= AC //Remove casing from loaded list. - AC.desc = "[initial(AC.desc)] This one is spent." - - if(AC.BB) - in_chamber = AC.BB //Load projectile into chamber. - AC.BB.loc = src //Set projectile loc to gun. - return 1 - return 0 - - attack_self(mob/living/user as mob) - if(!(locate(/obj/item/ammo_casing/shotgun) in src) && !loaded.len) - user << "\The [src] is empty." +/obj/item/weapon/gun/projectile/revolver/doublebarrel/attackby(var/obj/item/A as obj, mob/user as mob) + ..() + if (istype(A,/obj/item/ammo_box) || istype(A,/obj/item/ammo_casing)) + chamber_round() + if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/pickaxe/plasmacutter)) + user << "You begin to shorten the barrel of \the [src]." + if(get_ammo()) + afterattack(user, user) //will this work? + afterattack(user, user) //it will. we call it twice, for twice the FUN + playsound(user, fire_sound, 50, 1) + user.visible_message("The shotgun goes off!", "The shotgun goes off in your face!") return + if(do_after(user, 30)) //SHIT IS STEALTHY EYYYYY + icon_state = "sawnshotgun" + w_class = 3.0 + item_state = "gun" + slot_flags &= ~SLOT_BACK //you can't sling it on your back + slot_flags |= SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally) + user << "You shorten the barrel of \the [src]!" + name = "sawn-off shotgun" + desc = "Omar's coming!" - for(var/obj/item/ammo_casing/shotgun/shell in src) //This feels like a hack. //don't code at 3:30am kids!! - if(shell in loaded) - loaded -= shell - shell.loc = get_turf(src.loc) - - user << "You break \the [src]." - update_icon() - - attackby(var/obj/item/A as obj, mob/user as mob) - if(istype(A, /obj/item/ammo_casing) && !load_method) - var/obj/item/ammo_casing/AC = A - if(AC.caliber == caliber && (loaded.len < max_shells) && (contents.len < max_shells)) //forgive me father, for i have sinned - user.drop_item() - AC.loc = src - loaded += AC - user << "You load a shell into \the [src]!" - A.update_icon() - update_icon() - if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/pickaxe/plasmacutter)) - user << "You begin to shorten the barrel of \the [src]." - if(loaded.len) - afterattack(user, user) //will this work? - afterattack(user, user) //it will. we call it twice, for twice the FUN - playsound(user, fire_sound, 50, 1) - user.visible_message("The shotgun goes off!", "The shotgun goes off in your face!") - return - if(do_after(user, 30)) //SHIT IS STEALTHY EYYYYY - icon_state = "sawnshotgun" - w_class = 3.0 - item_state = "gun" - slot_flags &= ~SLOT_BACK //you can't sling it on your back - slot_flags |= SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally) - name = "sawn-off shotgun" - desc = "Omar's coming!" - user << "You shorten the barrel of \the [src]!" \ No newline at end of file +/obj/item/weapon/gun/projectile/revolver/doublebarrel/attack_self(mob/living/user as mob) + var/num_unloaded = 0 + while (get_ammo() > 0) + var/obj/item/ammo_casing/CB + CB = magazine.get_round(0) + chambered = null + CB.loc = get_turf(src.loc) + CB.update_icon() + num_unloaded++ + if (num_unloaded) + user << "You break open \the [src] and unload [num_unloaded] shell\s." + else + user << "[src] is empty." \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 5471e17bb43..6a9bd1ca04d 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -15,9 +15,13 @@ var/amount = 30 var/beaker = null var/recharged = 0 + var/hackedcheck = 0 var/list/dispensable_reagents = list("hydrogen","lithium","carbon","nitrogen","oxygen","fluorine", "sodium","aluminum","silicon","phosphorus","sulfur","chlorine","potassium","iron", "copper","mercury","radium","water","ethanol","sugar","sacid","tungsten") + var/list/broken_requirements = list() + var/broken_on_spawn = 0 + /obj/machinery/chem_dispenser/proc/recharge() if(stat & (BROKEN|NOPOWER)) return @@ -49,6 +53,29 @@ recharge() dispensable_reagents = sortList(dispensable_reagents) + if(broken_on_spawn) + var/amount = pick(1,2,2,3,4) + var/list/options = list() + options[/obj/item/weapon/stock_parts/capacitor/adv] = "Add an advanced capacitor to fix it." + options[/obj/item/weapon/stock_parts/console_screen] = "Replace the console screen to fix it." + options[/obj/item/weapon/stock_parts/manipulator/pico] = "Upgrade to a pico manipulator to fix it." + options[/obj/item/weapon/stock_parts/matter_bin/adv] = "Give it an advanced matter bin to fix it." + options[/obj/item/stack/sheet/mineral/diamond] = "Line up a cut diamond with the nozzle to fix it." + options[/obj/item/stack/sheet/mineral/uranium] = "Position a uranium sheet inside to fix it." + options[/obj/item/stack/sheet/mineral/plasma] = "Enter a block of plasma to fix it." + options[/obj/item/stack/sheet/mineral/silver] = "Cover the internals with a silver lining to fix it." + options[/obj/item/stack/sheet/mineral/gold] = "Wire a golden filament to fix it." + options[/obj/item/stack/sheet/plasteel] = "Surround the outside with a plasteel cover to fix it." + options[/obj/item/stack/sheet/rglass] = "Insert a pane of reinforced glass to fix it." + + while(amount > 0) + amount -= 1 + + var/index = pick(options) + broken_requirements[index] = options[index] + options -= index + + /obj/machinery/chem_dispenser/ex_act(severity) switch(severity) if(1.0) @@ -74,14 +101,18 @@ * * @param user /mob The mob who is interacting with this ui * @param ui_key string A string key to use for this ui. Allows for multiple unique uis on one obj/mob (defaut value "main") - * @param ui /datum/nanoui This parameter is passed by the nanoui process() proc when updating an open ui * * @return nothing */ -/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) +/obj/machinery/chem_dispenser/ui_interact(mob/user, ui_key = "main") if(stat & (BROKEN|NOPOWER)) return if(user.stat || user.restrained()) return + if(broken_requirements.len) + user << "[src] is broken. [broken_requirements[broken_requirements[1]]]" + return + + // this is the data which will be sent to the ui var/data[0] data["amount"] = amount @@ -111,10 +142,7 @@ chemicals.Add(list(list("title" = temp.name, "id" = temp.id, "commands" = list("dispense" = temp.id)))) // list in a list because Byond merges the first list... data["chemicals"] = chemicals - if (!ui) // no ui has been passed, so we'll search for one - { - ui = nanomanager.get_open_ui(user, src, ui_key) - } + var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, ui_key) if (!ui) // the ui does not exist, so we'll create a new one ui = new(user, src, ui_key, "chem_dispenser.tmpl", "Chem Dispenser 5000", 374, 640) @@ -139,7 +167,7 @@ if(href_list["dispense"]) if (dispensable_reagents.Find(href_list["dispense"]) && beaker != null) - var/obj/item/weapon/reagent_containers/B = src.beaker + var/obj/item/weapon/reagent_containers/glass/B = src.beaker var/datum/reagents/R = B.reagents var/space = R.maximum_volume - R.total_volume @@ -155,22 +183,35 @@ add_fingerprint(usr) return 1 // update UIs attached to this object -/obj/machinery/chem_dispenser/attackby(var/obj/item/weapon/reagent_containers/B as obj, var/mob/user as mob) +/obj/machinery/chem_dispenser/attackby(var/obj/item/weapon/reagent_containers/glass/B as obj, var/mob/user as mob) if(isrobot(user)) return - if(!istype(B, /obj/item/weapon/reagent_containers/glass || /obj/item/weapon/reagent_containers/food)) + if(broken_requirements.len && B.type == broken_requirements[1]) + broken_requirements -= broken_requirements[1] + user << "You fix [src]." + if(istype(B,/obj/item/stack)) + var/obj/item/stack/S = B + S.use(1) + else + user.drop_item() + del(B) return + if(!istype(B, /obj/item/weapon/reagent_containers/glass)) + return + + if(src.beaker) user << "Something is already loaded into the machine." return - - src.beaker = B - user.drop_item() - B.loc = src - user << "You set [B] on the machine." - nanomanager.update_uis(src) // update all UIs attached to src + if(istype(B, /obj/item/weapon/reagent_containers/glass||/obj/item/weapon/reagent_containers/food)) + src.beaker = B + user.drop_item() + B.loc = src + user << "You set [B] on the machine." + nanomanager.update_uis(src) // update all UIs attached to src + return /obj/machinery/chem_dispenser/attack_ai(mob/user as mob) return src.attack_hand(user) @@ -184,24 +225,52 @@ ui_interact(user) -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /obj/machinery/chem_dispenser/soda icon_state = "soda_dispenser" name = "soda fountain" desc = "A drink fabricating machine, capable of producing many sugary drinks with just one touch." energy = 100 max_energy = 100 - dispensable_reagents = list("water","ice","coffee","tea","milk","cream","icetea","space_cola","spacemountainwind","dr_gibb","space_up","tonic","sodawater","lemon_line","sugar","orangejuice","limejuice","lemonjuice","tomatojuice","banana","berryjuice","potato_juice","watermelonjuice","carrotjuice") + dispensable_reagents = list("water","ice","coffee","tea","icetea","space_cola","spacemountainwind","dr_gibb","space_up","tonic","sodawater","lemon_lime","sugar","orangejuice","limejuice") + /obj/machinery/chem_dispenser/soda/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob) + ..() + if(istype(B, /obj/item/device/multitool)) + if(hackedcheck == 0) + user << "You change the mode from 'McNano' to 'Pizza King'." + dispensable_reagents += list("thirteenloko") + hackedcheck = 1 + return + + else + user << "You change the mode from 'Pizza King' to 'McNano'." + dispensable_reagents -= list("thirteenloko") + hackedcheck = 0 + return /obj/machinery/chem_dispenser/beer icon_state = "booze_dispenser" - name = "booze-o-mat" + name = "booze dispenser" energy = 100 max_energy = 100 desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one." - dispensable_reagents = list("beer","kahlua","whiskey","wine","vodka","gin","rum","tequila","vermouth","cognac","ale","goldschlager","patron","mead") + dispensable_reagents = list("water","ice","coffee","tea","cream","lemon_lime","sugar","orangejuice","limejuice","cola","sodawater","tonic","beer","kahlua","whisky","wine","vodka","gin","rum","tequila","vermouth","cognac","ale","mead") + + /obj/machinery/chem_dispenser/beer/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob) + ..() + if(istype(B, /obj/item/device/multitool)) + if(hackedcheck == 0) + user << "You disable the 'nanotrasen-are-cheap-bastards' lock, enabling hidden and very expensive boozes." + dispensable_reagents += list("goldschlager","patron","watermelonjuice","berryjuice") + hackedcheck = 1 + return + + else + user << "You re-enable the 'nanotrasen-are-cheap-bastards' lock, disabling hidden and very expensive boozes." + dispensable_reagents -= list("goldschlager","patron","watermelonjuice","berryjuice") + hackedcheck = 0 + return +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /obj/machinery/chem_master name = "ChemMaster 3000" @@ -371,7 +440,7 @@ var/name = reject_bad_text(input(usr,"Name:","Name your pill!","[reagents.get_master_reagent_name()] ([amount_per_pill] units)")) while (count--) var/obj/item/weapon/reagent_containers/pill/P = new/obj/item/weapon/reagent_containers/pill(src.loc) - if(!name) name = "[reagents.get_master_reagent_name()] ([amount_per_pill] units)" + if(!name) name = reagents.get_master_reagent_name() P.name = "[name] pill" P.pixel_x = rand(-7, 7) //random position P.pixel_y = rand(-7, 7) @@ -383,9 +452,9 @@ src.updateUsrDialog() else if (href_list["createbottle"]) if(!condi) - var/name = reject_bad_text(input(usr,"Name:","Name your bottle!","[reagents.get_master_reagent_name()] ([reagents.total_volume] units)")) + var/name = reject_bad_text(input(usr,"Name:","Name your bottle!",reagents.get_master_reagent_name())) var/obj/item/weapon/reagent_containers/glass/bottle/P = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc) - if(!name) name = "[reagents.get_master_reagent_name()] ([reagents.total_volume] units)" + if(!name) name = reagents.get_master_reagent_name() P.name = "[name] bottle" P.pixel_x = rand(-7, 7) //random position P.pixel_y = rand(-7, 7) @@ -478,7 +547,7 @@ if(!condi) dat += "

Create pill (50 units max)
" dat += "Create multiple pills
" - dat += "Create bottle (30 units max)" + dat += "Create bottle (30 units max)" else dat += "Create bottle (50 units max)" if(!condi) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index cf0761eba3f..7c6c9f23319 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -213,6 +213,44 @@ datum color = "#0064C8" // rgb: 0, 100, 200 custom_metabolism = 0.01 + on_mob_life(var/mob/living/M as mob) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species.name=="Grey") + if(!M) M = holder.my_atom + M.adjustToxLoss(1*REM) + M.take_organ_damage(0, 1*REM) + ..() + reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) + if(!istype(M, /mob/living)) + return + + // Grays treat water like acid. + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.species.name=="Grey") + if(method == TOUCH) + if(H.wear_mask) + H << "\red Your mask protects you from the water!" + return + if(H.head) + H << "\red Your helmet protects you from the water!" + return + if(!M.unacidable) + if(prob(15) && volume >= 30) + var/datum/organ/external/affecting = H.get_organ("head") + if(affecting) + if(affecting.take_damage(25, 0)) + H.UpdateDamageIcon() + H.status_flags |= DISFIGURED + H.emote("scream") + else + M.take_organ_damage(min(15, volume * 2)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl + else + if(!M.unacidable) + M.take_organ_damage(min(15, volume * 2)) + + reaction_turf(var/turf/simulated/T, var/volume) if (!istype(T)) return src = null @@ -294,7 +332,7 @@ datum id = "anti_toxin" description = "Dylovene is a broad-spectrum antitoxin." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#006400" // rgb: 0, 100, 0 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -522,7 +560,7 @@ datum id = "inaprovaline" description = "Inaprovaline is a synaptic stimulant and cardiostimulant. Commonly used to stabilize patients." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#0000FF" // rgb: 0, 0, 255 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -826,8 +864,12 @@ datum return if(!M.unacidable) - if(prob(15) && istype(M, /mob/living/carbon/human) && volume >= 30) + if(prob(15) && istype(M, /mob/living/carbon/human/grey) && volume >= 30) var/mob/living/carbon/human/H = M + if(H.species.name=="Grey") + ..() + return // Greys lurve dem some sacid + var/datum/organ/external/affecting = H.get_organ("head") if(affecting) if(affecting.take_damage(25, 0)) @@ -838,6 +880,11 @@ datum M.take_organ_damage(min(15, volume * 2)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl else if(!M.unacidable) + if(ishuman(M)) + var/mob/living/carbon/human/grey/H = M + if(H.species.name=="Grey") + ..() + return // Greys lurve dem some sacid M.take_organ_damage(min(15, volume * 2)) reaction_obj(var/obj/O, var/volume) @@ -1057,14 +1104,14 @@ datum id = "tramadol" description = "A simple, yet effective painkiller." reagent_state = LIQUID - color = "#C8A5DC" + color = "#FAEBD7" //rgb 250, 235, 215 oxycodone name = "Oxycodone" id = "oxycodone" description = "An effective and very addictive painkiller." reagent_state = LIQUID - color = "#C805DC" + color = "#8A2BE2" // rgb 138, 43, 226 virus_food name = "Virus Food" @@ -1085,7 +1132,7 @@ datum id = "sterilizine" description = "Sterilizes wounds in preparation for surgery." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#F0FFF0" // rgb: 240, 255, 240 /* reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) src = null if (method==TOUCH) @@ -1342,7 +1389,7 @@ datum id = "leporazine" description = "Leporazine can be use to stabilize an individuals body temperature." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#E9D66B" // rgb: 233, 214, 107 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1358,7 +1405,7 @@ datum id = "cryptobiolin" description = "Cryptobiolin causes confusion and dizzyness." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#FFD1DC" // rgb: 255, 209, 220 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1374,7 +1421,7 @@ datum id = "lexorin" description = "Lexorin temporarily stops respiration. Causes tissue damage." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#32127A" // rgb: 50, 18, 122 on_mob_life(var/mob/living/M as mob) if(M.stat == 2.0) @@ -1392,7 +1439,7 @@ datum id = "kelotane" description = "Kelotane is a drug used to treat burns." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#ECD540" // rgb: 236, 213, 64 on_mob_life(var/mob/living/M as mob) if(M.stat == 2.0) @@ -1407,7 +1454,7 @@ datum id = "dermaline" description = "Dermaline is the next step in burn medication. Works twice as good as kelotane and enables the body to restore even the direst heat-damaged tissue." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#F4A460" // rgb: 244, 164, 96 on_mob_life(var/mob/living/M as mob) if(M.stat == 2.0) //THE GUY IS **DEAD**! BEREFT OF ALL LIFE HE RESTS IN PEACE etc etc. He does NOT metabolise shit anymore, god DAMN @@ -1422,7 +1469,7 @@ datum id = "dexalin" description = "Dexalin is used in the treatment of oxygen deprivation." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#00CED1" // rgb: 0, 206, 209 on_mob_life(var/mob/living/M as mob) if(M.stat == 2.0) @@ -1439,7 +1486,7 @@ datum id = "dexalinp" description = "Dexalin Plus is used in the treatment of oxygen deprivation. Its highly effective." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#00FFFF" // rgb: 0, 255, 255 on_mob_life(var/mob/living/M as mob) if(M.stat == 2.0) @@ -1456,7 +1503,7 @@ datum id = "tricordrazine" description = "Tricordrazine is a highly potent stimulant, originally derived from cordrazine. Can be used to treat a wide range of injuries." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#DB7093" // rgb: 219, 112, 147 on_mob_life(var/mob/living/M as mob) if(M.stat == 2.0) @@ -1538,7 +1585,7 @@ datum id = "synaptizine" description = "Synaptizine is used to treat various diseases." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#FF4040" // rgb: 255, 64, 64 custom_metabolism = 0.01 on_mob_life(var/mob/living/M as mob) @@ -1560,7 +1607,7 @@ datum id = "impedrezene" description = "Impedrezene is a narcotic that impedes one's ability by slowing down the higher brain cell functions." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#2C1608" // rgb: 44, 22, 8 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1576,7 +1623,7 @@ datum id = "hyronalin" description = "Hyronalin is a medicinal drug used to counter the effect of radiation poisoning." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#74C365" // rgb: 116, 195, 101 custom_metabolism = 0.05 on_mob_life(var/mob/living/M as mob) @@ -1590,7 +1637,7 @@ datum id = "arithrazine" description = "Arithrazine is an unstable medication used for the most extreme cases of radiation poisoning." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#BFFF00" // rgb: 191, 255, 0 custom_metabolism = 0.05 on_mob_life(var/mob/living/M as mob) @@ -1609,7 +1656,7 @@ datum id = "alkysine" description = "Alkysine is a drug used to lessen the damage to neurological tissue after a catastrophic injury. Can heal brain tissue." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#F77FBE" // rgb: 247, 127, 190 custom_metabolism = 0.05 on_mob_life(var/mob/living/M as mob) @@ -1623,7 +1670,7 @@ datum id = "imidazoline" description = "Heals eye damage" reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#FFA500" // rgb: 255, 165, 0 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1640,7 +1687,7 @@ datum id = "bicaridine" description = "Bicaridine is an analgesic medication and can be used to treat blunt trauma." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#FF003F" // rgb: 255, 0, 63 on_mob_life(var/mob/living/M as mob) if(M.stat == 2.0) @@ -1655,7 +1702,7 @@ datum id = "hyperzine" description = "Hyperzine is a highly effective, long lasting, muscle stimulant." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#CCFF00" // rgb: 204, 255, 0 custom_metabolism = 0.03 on_mob_life(var/mob/living/M as mob) @@ -1669,7 +1716,7 @@ datum id = "cryoxadone" description = "A chemical mixture with almost magical healing powers. Its main limitation is that the targets body temperature must be under 170K for it to metabolise correctly." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#BF00FF" // rgb: 191, 0, 255 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1686,7 +1733,7 @@ datum id = "clonexadone" description = "A liquid compound similar to that used in the cloning process. Can be used to 'finish' clones that get ejected early when used in conjunction with a cryo tube." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#FF77FF" // rgb: 255, 119, 255 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1703,7 +1750,7 @@ datum id = "rezadone" description = "A powder derived from fish toxin, this substance can effectively treat genetic damage in humanoids, though excessive consumption has side effects." reagent_state = SOLID - color = "#669900" // rgb: 102, 153, 0 + color = "#E25822" // rgb: 226, 88, 34 on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -1730,7 +1777,7 @@ datum id = "spaceacillin" description = "An all-purpose antiviral agent." reagent_state = LIQUID - color = "#C8A5DC" // rgb: 200, 165, 220 + color = "#228B22" // rgb: 34, 139, 34 custom_metabolism = 0.01 on_mob_life(var/mob/living/M as mob) @@ -3547,64 +3594,28 @@ datum else if(data >= 115 && prob(33)) M.confused = max(M.confused+15,15) ..() + return + + +//Fox +/////////////////Requires Further Balance Testing////////////////// /* - -//Grutor -/////////////////Zombie Stuff////////////////// - - //This isn't implemented yet, future updates might change this - necroblood - name = "Zombie blood" - id = "necroblood" - description = "It's blood, but it looks like jello." + lectrazine + name = "Lectrazine" + id = "lectrazine" + description = "An extremly powerful cardiostimulant and analgesic which is used in revival of deceased." reagent_state = LIQUID + color = "#080000" + custom_metabolism = 0.1 - //So you don't need to be a virologist - necrocure - name = "Zombie Cure" - id = "necrocure" - description = "The thing only stopping you from turning." - reagent_state = LIQUID - nutriment_factor = 0 - color = "#54C754" // rgb: 84, 199, 84 - - z_meat - name = "Zombie Juice" - id = "zmeat" - description = "Definitely smells funny." - reagent_state = LIQUID - color = "#E23351" - var/said_it_before = 0 - var/fate_is_sealed = 0 - - on_mob_life(var/mob/living/M as mob) - ..() - if(said_it_before == 0) - M << "You are starting to have regrets..." - said_it_before = 1 - if(prob(8) && istype(M, /mob/living/carbon) && fate_is_sealed == 0) //Per reagent tick there is a chance this person will explode - fate_is_sealed = 1 - sleep(rand(80, 250)) - for(var/obj/item/W in M) //Some items will not be recovered.. - if(prob(70)) - M.drop_from_inventory(W) - M.gib() - return - - necrovirus - name = "Zombie Virus" - id = "necrodisease" - description = "It's said it can bring the dead back to life." - reagent_state = SOLID - - on_mob_life(var/mob/living/carbon/M as mob) + reaction_mob(var/mob/living/carbon/M as mob, var/methode=INGEST) if(!M) M = holder.my_atom - var/datum/disease/D = new /datum/disease/zombie_transformation - D.holder = M - D.affected_mob = M - M.viruses += D - ..() + M.stat = CONSCIOUS + M.setOxyLoss(0) + M.heal_organ_damage(15,0) + M.SetParalysis(15) + M.adjustBrainLoss(10*REM) return -*/ \ No newline at end of file +*/ diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 85a4d8f2658..ea85ddadb15 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -315,8 +315,8 @@ datum name = "Glycerol" id = "glycerol" result = "glycerol" - required_reagents = list("cornoil" = 3, "sacid" = 1) - result_amount = 1 + required_reagents = list("cornoil" = 3, "sacid" = 2) + result_amount = 5 nitroglycerin name = "Nitroglycerin" @@ -455,8 +455,8 @@ datum name = "Zombie Powder" id = "zombiepowder" result = "zombiepowder" - required_reagents = list("carpotoxin" = 5, "stoxin" = 5, "copper" = 5) - result_amount = 2 + required_reagents = list("carpotoxin" = 1, "stoxin" = 1, "copper" = 1) + result_amount = 3 rezadone name = "Rezadone" @@ -1961,21 +1961,18 @@ datum required_reagents = list("spacemountainwind" = 1, "coffee" = 1) result_amount = 2 -//Grutor -///////////////////////Zombie recipes//////////////////////////// - - necrocure - name = "Zombie Cure" - id = "necrocure" - result = "necrocure" - required_reagents = list("sterilizine" = 2, "zmeat" = 2) - result_amount = 5 - - necrodisease - name = "Zombie Virus" - id = "necrodisease" - result = "necrodisease" - required_reagents = list("zombiepowder" = 2, "cryptobiolin" = 2, "mutagen" = 2) - result_amount = 5 +//Fox +///////////////////////Requires Balance Testing/////////////////// +/* + lectrazine + name = "Lectrazine" + id = "lectrazine" + result = "lectrazine" + required_reagents = list("inaprovaline" = 1, "phosphorus" = 1) + required_catalysts = list("silver" = 5) + result_amount = 2 + +*/ + diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 6ea87725d1b..f2a57d1c212 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -118,7 +118,7 @@ if(istype(W,/obj/item/weapon/storage)) ..() // -> item/attackby() if((slices_num <= 0 || !slices_num) || !slice_path) - return 1 + return 0 var/inaccurate = 0 if( \ istype(W, /obj/item/weapon/kitchenknife) || \ diff --git a/code/modules/reagents/reagent_containers/food/snacks/grown.dm b/code/modules/reagents/reagent_containers/food/snacks/grown.dm index c47103e2821..cada51cf361 100644 --- a/code/modules/reagents/reagent_containers/food/snacks/grown.dm +++ b/code/modules/reagents/reagent_containers/food/snacks/grown.dm @@ -635,7 +635,7 @@ del(src) return -/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato/HasEntered(AM as mob|obj) +/obj/item/weapon/reagent_containers/food/snacks/grown/bluetomato/Crossed(AM as mob|obj) if (istype(AM, /mob/living/carbon)) var/mob/M = AM if (istype(M, /mob/living/carbon/human) && (isobj(M:shoes) && M:shoes.flags&NOSLIP)) diff --git a/code/modules/reagents/reagent_containers/food/snacks/meat.dm b/code/modules/reagents/reagent_containers/food/snacks/meat.dm index a64af273833..3acaaffe9d1 100644 --- a/code/modules/reagents/reagent_containers/food/snacks/meat.dm +++ b/code/modules/reagents/reagent_containers/food/snacks/meat.dm @@ -25,20 +25,3 @@ /obj/item/weapon/reagent_containers/food/snacks/meat/corgi name = "Corgi meat" desc = "Tastes like... well you know..." - -//Grutor -//zombies yum... -/obj/item/weapon/reagent_containers/food/snacks/meat/undead - name = "Rotten flesh" - desc = "You really shouldn't..." - icon = 'icons/obj/food.dmi' - icon_state = "rottenmeat" - - attack(mob/M as mob, mob/user as mob, def_zone) - if(..()) - M << "You are starting to have regrets..." //If you seeing this message twice, remove this one. - - New() - ..() - reagents.add_reagent("carpotoxin", 6) - reagents.add_reagent("zmeat", 20) diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 831c3df795f..7e87f589664 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -123,7 +123,7 @@ else if(istype(target, /obj/machinery/bunsen_burner)) return - else if(istype(target, /obj/machinery/anomaly)) + else if(istype(target, /obj/machinery/radiocarbon_spectrometer)) return else if(reagents.total_volume) diff --git a/code/modules/reagents/reagent_containers/glass/bottle.dm b/code/modules/reagents/reagent_containers/glass/bottle.dm index c4beb0a8f91..a1240ebec56 100644 --- a/code/modules/reagents/reagent_containers/glass/bottle.dm +++ b/code/modules/reagents/reagent_containers/glass/bottle.dm @@ -17,9 +17,40 @@ if(!icon_state) icon_state = "bottle[rand(1,20)]" + + //Copypasta from /obj/item/weapon/reagent_containers/glass/beaker + on_reagent_change() + update_icon() + + pickup(mob/user) + ..() + update_icon() + + dropped(mob/user) + ..() + update_icon() + + attack_hand() + ..() + update_icon() + update_icon() overlays.Cut() + if(reagents.total_volume) + var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]10") + + var/percent = round((reagents.total_volume / volume) * 100) + switch(percent) + if(0 to 24) filling.icon_state = "[icon_state]10" + if(25 to 49) filling.icon_state = "[icon_state]25" + if(50 to 74) filling.icon_state = "[icon_state]50" + if(75 to 90) filling.icon_state = "[icon_state]75" + if(91 to INFINITY) filling.icon_state = "[icon_state]100" + + filling.icon += mix_color_from_reagents(reagents.reagent_list) + overlays += filling + if (!is_open_container()) var/image/lid = image(icon, src, "lid_bottle") overlays += lid diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 9d3aa3b4608..652d16a0f19 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -165,10 +165,23 @@ for(var/datum/reagent/blood/d in src.reagents.reagent_list) B = d break + var/datum/reagent/water/W + for(var/datum/reagent/water/r in src.reagents.reagent_list) + W = r + break var/trans + if(W && istype(target,/mob/living/carbon/human/slime)) + var/mob/living/carbon/human/slime/S = target + S.vessel.add_reagent("water", 5) + S.vessel.update_total() if(B && istype(target,/mob/living/carbon)) - var/mob/living/carbon/C = target - C.inject_blood(src,5) + if(istype(target,/mob/living/carbon/human/slime)) + var/mob/living/carbon/human/slime/S = target + S.reagents.add_reagent("blood", 5) + S.reagents.update_total() + else + var/mob/living/carbon/C = target + C.inject_blood(src,5) else trans = src.reagents.trans_to(target, amount_per_transfer_from_this) user << "\blue You inject [trans] units of the solution. The syringe now contains [src.reagents.total_volume] units." diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index b328d5d495a..ae820ebf219 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -229,6 +229,11 @@ // attack with hand, switch position /obj/machinery/conveyor_switch/attack_hand(mob/user) + if(!allowed(user)) + user << "Access denied." + return + + if(position == 0) if(last_pos < 0) position = 1 diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index bea829b1944..ae3dd52b4cc 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -157,7 +157,7 @@ /obj/item/device/destTagger name = "destination tagger" desc = "Used to set the destination of properly wrapped packages." - icon_state = "forensic0-old" + icon_state = "dest_tagger" var/currTag = 0 //The whole system for the sorttype var is determined based on the order of this list, //disposals must always be 1, since anything that's untagged will automatically go to disposals, or sorttype = 1 --Superxpdude diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index effc3e18844..6fa91b4aaf3 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -101,7 +101,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). user << "\The [name] must be linked to an R&D console first!" return 1 if (O.is_open_container()) - return + return 0 if (!istype(O, /obj/item/stack/sheet/glass) && !istype(O, /obj/item/stack/sheet/mineral/gold) && !istype(O, /obj/item/stack/sheet/mineral/diamond) && !istype(O, /obj/item/stack/sheet/mineral/uranium)) user << "\red You cannot insert this item into the [name]!" return 1 diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 9deb8a8ab40..1f5abd38aa8 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -1490,7 +1490,16 @@ datum/design/ammo_9mm req_tech = list("combat" = 4, "materials" = 3) build_type = PROTOLATHE materials = list("$metal" = 3750, "$silver" = 100) - build_path = "/obj/item/ammo_magazine/c9mm" + build_path = "/obj/item/ammo_box/c9mm" + +datum/design/mag_smg + name = "Submachine Gun Magazine (9mm)" + desc = "A prototype magazine for the submachine gun." + id = "mag_smg" + req_tech = list("combat" = 4, "materials" = 3) + build_type = PROTOLATHE + materials = list("$metal" = 3750, "$silver" = 100) + build_path = "/obj/item/ammo_box/magazine/msmg9mm" datum/design/stunshell name = "Stun Shell" diff --git a/code/modules/research/xenoarchaeology/artifact/artifact.dm b/code/modules/research/xenoarchaeology/artifact/artifact.dm index 3517cd96064..6300a6d71a4 100644 --- a/code/modules/research/xenoarchaeology/artifact/artifact.dm +++ b/code/modules/research/xenoarchaeology/artifact/artifact.dm @@ -13,8 +13,10 @@ artifact_id = "[pick("kappa","sigma","antaeres","beta","omicron","iota","epsilon","omega","gamma","delta","tau","alpha")]-[rand(100,999)]" artifact_find_type = pick(\ + 5;/obj/machinery/power/supermatter,\ 5;/obj/structure/constructshell,\ 5;/obj/machinery/syndicate_beacon,\ + 25;/obj/machinery/power/supermatter/shard,\ 50;/obj/structure/cult/pylon,\ 100;/obj/machinery/auto_cloner,\ 100;/obj/machinery/giga_drill,\ @@ -33,6 +35,7 @@ icon_state = "boulder1" density = 1 opacity = 1 + anchored = 1 var/excavation_level = 0 var/datum/geosample/geological_data var/datum/artifact_find/artifact_find @@ -73,17 +76,14 @@ user << "\blue You finish [P.drill_verb] [src]." excavation_level += P.excavation_amount - var/reveal_prob = 1 - if(excavation_level >= 95) - reveal_prob = 50 + (excavation_level - 90) * (excavation_level - 90) - else if(excavation_level >= 90) - reveal_prob = 5 - if(excavation_level >= 100) + if(excavation_level > 100) //failure user.visible_message("[src] suddenly crumbles away.",\ - "\red [src] has disintegrated under your onslaught, any secrets it was holding long gone.") + "\red [src] has disintegrated under your onslaught, any secrets it was holding are long gone.") del(src) - else if(prob(reveal_prob)) + return + + if(prob(excavation_level)) //success if(artifact_find) var/spawn_type = artifact_find.artifact_find_type diff --git a/code/modules/research/xenoarchaeology/artifact/artifact_unknown_old.dm b/code/modules/research/xenoarchaeology/artifact/artifact_unknown_old.dm deleted file mode 100644 index 3c779caa967..00000000000 --- a/code/modules/research/xenoarchaeology/artifact/artifact_unknown_old.dm +++ /dev/null @@ -1,242 +0,0 @@ -//Part of ISaidNo's public release around July 2011(ish), multiple changes -//many thanks - -#define PLASMA_SPAWN 1 -#define N2_SPAWN 2 -#define CO2_SPAWN 3 -#define RADIATE 4 -#define VIRUS 5 -#define HEAT 6 -#define COLD 7 - -/obj/machinery/artifact - name = "alien artifact" - desc = "A large alien device." - icon = 'icons/obj/xenoarchaeology.dmi' - icon_state = "ano00" - var/icon_num = 0 - anchored = 0 - density = 1 - var/origin = null // Used in the randomisation/research of the artifact. - var/activated = 0 // Whether or not the artifact has been unlocked. - var/charged = 1 // Whether the artifact is ready to have it's effect. - var/chargetime = 0 // How much time until the artifact is charged. - var/recharge = 5 // How long does it take this artifact to recharge? - var/display_id = "" // Artifact ID to display once successfully scanned - var/datum/artifact_effect/my_effect = null - var/being_used = 0 - -/obj/machinery/artifact/New() - ..() - // Origin and appearance randomisation - - my_effect = new() - - - icon_num = rand(0,5) - icon_state = "ano[icon_num]0" - - // Power randomisation - my_effect.trigger = pick("force","energy","chemical","heat","touch","presence") - if (my_effect.trigger == "chemical") - my_effect.triggerX = pick("hydrogen","corrosive","volatile","toxic") - - my_effect.effecttype = pick("healing","injure","stun","roboheal","robohurt","cellcharge","celldrain","planthelper","forcefield","teleport","dnaswitch","emp","sleepy") - - // Select range based on the power - var/canworldpulse = 1 - switch(my_effect.effecttype) - if("healing") - my_effect.effectmode = pick("aura","pulse","contact") - if("injure") - my_effect.effectmode = pick("aura","pulse","contact") - if("stun") - my_effect.effectmode = pick("aura","pulse","contact") - if("roboheal") - my_effect.effectmode = pick("aura","pulse","contact") - if("robohurt") - my_effect.effectmode = pick("aura","pulse","contact") - if("sleepy") - my_effect.effectmode = pick("aura","pulse","contact") - if("cellcharge") - my_effect.effectmode = pick("aura","pulse") - if("celldrain") - my_effect.effectmode = pick("aura","pulse") - if("planthelper") - my_effect.effectmode = pick("aura","pulse") - canworldpulse = 0 - if("forcefield") - my_effect.effectmode = "contact" - canworldpulse = 0 - if("teleport") - my_effect.effectmode = pick("pulse","contact") - if("genderswitch") - my_effect.effectmode = pick("pulse","contact") - if("emp") - my_effect.effectmode = pick("pulse","contact") - - // Recharge timer & range setup - if (my_effect.effectmode == "aura") - my_effect.aurarange = rand(1,4) - if (my_effect.effectmode == "contact") - src.recharge = rand(5,15) - if (my_effect.effectmode == "pulse") - my_effect.aurarange = rand(2,14) - src.recharge = rand(5,20) - if (canworldpulse == 1 && prob(1)) - my_effect.effectmode = "worldpulse" - src.recharge = rand(40,120) - - /* - display_id += pick("kappa","sigma","antaeres","beta","lorard","omicron","iota","upsilon","omega","gamma","delta") - display_id += "-" - display_id += num2text(rand(100,999)) - */ - -/obj/machinery/artifact/Del() - ..() - my_effect.HaltEffect() - -/obj/machinery/artifact/attack_hand(var/mob/user as mob) - if (istype(user, /mob/living/silicon/ai) || istype(user, /mob/dead/)) return - if (istype(user, /mob/living/silicon/robot)) - if (get_dist(user, src) > 1) - user << "\red You can't reach [src] from here." - return - if(ishuman(user) && istype(user:gloves,/obj/item/clothing/gloves)) - return ..() - for(var/mob/O in viewers(src, null)) - O.show_message(text("[] touches [].", user, src), 1) - src.add_fingerprint(user) - src.Artifact_Contact(user) - -/obj/machinery/artifact/attackby(obj/item/weapon/W as obj, mob/living/user as mob) - /*if (istype(W, /obj/item/weapon/cargotele)) - W:cargoteleport(src, user) - return*/ - if (my_effect.trigger == "chemical" && istype(W, /obj/item/weapon/reagent_containers/)) - switch(my_effect.triggerX) - if("hydrogen") - if (W.reagents.has_reagent("hydrogen", 1) || W.reagents.has_reagent("water", 1)) - src.Artifact_Activate() - return - if("corrosive") - if (W.reagents.has_reagent("acid", 1) || W.reagents.has_reagent("pacid", 1) || W.reagents.has_reagent("diethylamine", 1)) - src.Artifact_Activate() - return - if("volatile") - if (W.reagents.has_reagent("plasma", 1) || W.reagents.has_reagent("thermite", 1)) - src.Artifact_Activate() - return - if("toxic") - if (W.reagents.has_reagent("toxin", 1) || W.reagents.has_reagent("cyanide", 1) || W.reagents.has_reagent("amanitin", 1) || W.reagents.has_reagent("neurotoxin", 1)) - src.Artifact_Activate() - return - ..() - if (my_effect.trigger == "force" && W.force >= 10 && !src.activated) src.Artifact_Activate() - if (my_effect.trigger == "energy") - if (istype(W,/obj/item/weapon/melee/baton) && W:status) src.Artifact_Activate() - if (istype(W,/obj/item/weapon/melee/energy)) src.Artifact_Activate() - if (istype(W,/obj/item/weapon/melee/cultblade)) src.Artifact_Activate() - if (istype(W,/obj/item/weapon/gun/energy/)) src.Artifact_Activate() - if (istype(W,/obj/item/device/multitool)) src.Artifact_Activate() - if (istype(W,/obj/item/weapon/card/emag)) src.Artifact_Activate() - if (my_effect.trigger == "heat") - if (istype(W,/obj/item/weapon/match) && W:lit) src.Artifact_Activate() - if (istype(W, /obj/item/weapon/weldingtool) && W:welding) src.Artifact_Activate() - if (istype(W, /obj/item/weapon/lighter) && W:lit) src.Artifact_Activate() - - //Bump(atom/A) - -/obj/machinery/artifact/Bumped(M as mob|obj) - if (istype(M,/obj/item/weapon/) && my_effect.trigger == "force" && M:throwforce >= 10) src.Artifact_Activate() - -/obj/machinery/artifact/bullet_act(var/obj/item/projectile/P) - if (my_effect.trigger == "force") - if(istype(P,/obj/item/projectile/bullet)) src.Artifact_Activate() - else if(istype(P,/obj/item/projectile/hivebotbullet)) src.Artifact_Activate() - if (my_effect.trigger == "energy") - if(istype(P,/obj/item/projectile/beam)) src.Artifact_Activate() - else if(istype(P,/obj/item/projectile/ion)) src.Artifact_Activate() - else if(istype(P,/obj/item/projectile/energy)) src.Artifact_Activate() - if (my_effect.trigger == "heat") - if(istype(P,/obj/item/projectile/temp)) src.Artifact_Activate() - -/obj/machinery/artifact/ex_act(severity) - switch(severity) - if(1.0) del src - if(2.0) - if (prob(50)) del src - if (my_effect.trigger == "force") src.Artifact_Activate() - if (my_effect.trigger == "heat") src.Artifact_Activate() - if(3.0) - if (my_effect.trigger == "force") src.Artifact_Activate() - if (my_effect.trigger == "heat") src.Artifact_Activate() - return - -/obj/machinery/artifact/temperature_expose(null, temp, volume) - if (my_effect.trigger == "heat") src.Artifact_Activate() - -/obj/machinery/artifact/process() - if (!src.activated) - return - if (chargetime > 0) - chargetime -= 1 - else - src.charged = 1 - - my_effect.UpdateEffect(src.loc) - - //activate - if( (my_effect.effectmode == "pulse" || my_effect.effecttype == "worldpulse") && activated) - if(src.charged && my_effect.DoEffect(src)) - src.charged = 0 - src.chargetime = src.recharge - -/obj/machinery/artifact/proc/Artifact_Activate() - src.activated = !src.activated - var/display_msg = "" - if(activated) - if(prob(30)) - switch(rand(4)) - if(0) - display_msg = "momentarily glows brightly!" - if(1) - display_msg = "distorts slightly for a moment!" - if(2) - display_msg = "makes a slightly clicking noise!" - if(3) - display_msg = "flickers slightly!" - if(4) - display_msg = "vibrates!" - else - my_effect.HaltEffect() - if(prob(30)) - switch(rand(2)) - if(0) - display_msg = "grows dull!" - if(1) - display_msg = "fades in intensity!" - if(2) - display_msg = "suddenly becomes very quiet!" - - icon_state = "ano[icon_num][activated]" - for(var/mob/O in viewers(src, null)) - O.show_message(text("[] [display_msg]", src), 1) - -/obj/machinery/artifact/proc/Artifact_Contact(var/mob/user as mob) - // Trigger Code - if (istype (user,/mob/living/carbon/) && my_effect.trigger == "touch" && !src.activated) src.Artifact_Activate() - else if (my_effect.trigger != "touch" && !src.activated) user << "Nothing happens." - - if (my_effect.effectmode == "contact" && src.activated && src.charged) - my_effect.DoEffect(user) - src.charged = 0 - src.chargetime = src.recharge - -// this was used in QM for a time but it fell into disuse and wasn't removed, the purpose being to check if an artifact -// was benevolent or malicious, to determine whether QMs would be paid or punished for shipping it - -/obj/machinery/artifact/Move() - ..() - my_effect.update_move(src, src.loc) diff --git a/code/modules/research/xenoarchaeology/artifact/effect_old.dm b/code/modules/research/xenoarchaeology/artifact/effect_old.dm deleted file mode 100644 index 092cb0d0f58..00000000000 --- a/code/modules/research/xenoarchaeology/artifact/effect_old.dm +++ /dev/null @@ -1,542 +0,0 @@ -// - -/datum/artifact_effect - var/artifact_id = "" // Display ID of the spawning artifact - var/trigger = "touch" // What activates it? - var/triggerX = "none" // Used for more varied triggers - var/effecttype = "healing" // What does it do? - var/effectmode = "aura" // How does it carry out the effect? - var/aurarange = 4 // How far the artifact will extend an aura effect. - var/list/created_field - var/archived_loc - -/datum/artifact_effect/New() - // - created_field = new() - -/datum/artifact_effect/proc/GetOriginString(var/origin) - -/datum/artifact_effect/proc/GetEffectString(var/effect) - -/datum/artifact_effect/proc/GetTriggerString(var/trigger) - -/datum/artifact_effect/proc/GetRangeString(var/range) - switch(effectmode) - if("aura") return "Constant Short-Range Energy Field" - if("pulse") - if(aurarange > 7) return "Long Range Energy Pulses" - else return "Medium Range Energy Pulses" - if("worldpulse") return "Extreme Range Energy Pulses" - if("contact") return "Requires contact with subject" - else return "Unknown Range" - -/datum/artifact_effect/proc/HaltEffect() - for(var/obj/effect/energy_field/F in created_field) - created_field.Remove(F) - del F - -/datum/artifact_effect/proc/UpdateEffect(var/atom/originator) - /*for(var/obj/effect/energy_field/F in created_field) - created_field.Remove(F) - del F*/ - if(originator.loc != archived_loc) - archived_loc = originator.loc - update_move(originator) - - for(var/obj/effect/energy_field/E in created_field) - if(E.strength < 5) - E.Strengthen(0.2) - -/datum/artifact_effect/proc/DoEffect(var/atom/originator) - archived_loc = originator.loc - if (src.effectmode == "contact") - var/mob/living/user = originator - if(!user) - return - switch(src.effecttype) - if("healing") - //caeltodo - if (istype(user, /mob/living/carbon/human/)) - user << "\blue You feel a soothing energy invigorate you." - - var/mob/living/carbon/human/H = user - for(var/datum/organ/external/affecting in H.organs) - if(!affecting) continue - if(!istype(affecting, /datum/organ/external)) continue - affecting.heal_damage(25, 25) //fixes getting hit after ingestion, killing you when game updates organ health - //user:heal_organ_damage(25, 25) - // - user.adjustOxyLoss(-25) - user.adjustToxLoss(-25) - user.adjustBruteLoss(-25) - user.adjustFireLoss(-25) - user.adjustBrainLoss(-25) - user.radiation -= min(user.radiation, 25) - user.nutrition += 50 - H.bodytemperature = initial(H.bodytemperature) - // - H.vessel.add_reagent("blood",50) - spawn(1) - H.fixblood() - H.regenerate_icons() - return 1 - // - if (istype(user, /mob/living/carbon/monkey/)) - user << "\blue You feel a soothing energy invigorate you." - user.adjustOxyLoss(-25) - user.adjustToxLoss(-25) - user.adjustBruteLoss(-25) - user.adjustFireLoss(-25) - user.adjustBrainLoss(-25) - return 1 - else user << "Nothing happens." - if("injure") - if (istype(user, /mob/living/carbon/)) - user << "\red A painful discharge of energy strikes you!" - user.adjustOxyLoss(rand(5,25)) - user.adjustToxLoss(rand(5,25)) - user.adjustBruteLoss(rand(5,25)) - user.adjustFireLoss(rand(5,25)) - user.adjustBrainLoss(rand(5,25)) - user.radiation += 25 - user.nutrition -= min(50, user.nutrition) - user.make_dizzy(6) - user.weakened += 6 - return 1 - else user << "Nothing happens." - if("stun") - if (istype(user, /mob/living/carbon/)) - user << "\red A powerful force overwhelms your consciousness." - user.weakened += 45 - user.stuttering += 45 - if(prob(50)) - user.stunned += rand(1,10) - return 1 - else user << "Nothing happens." - if("roboheal") - if (istype(user, /mob/living/silicon/robot)) - user << "\blue Your systems report damaged components mending by themselves!" - user.adjustBruteLoss(rand(-10,-30)) - user.adjustFireLoss(rand(-10,-30)) - return 1 - else user << "Nothing happens." - if("robohurt") - if (istype(user, /mob/living/silicon/robot)) - user << "\red Your systems report severe damage has been inflicted!" - user.adjustBruteLoss(rand(10,50)) - user.adjustFireLoss(rand(10,50)) - return 1 - else user << "Nothing happens." - if("forcefield") - while(created_field.len < 16) - var/obj/effect/energy_field/E = new (locate(user.x,user.y,user.z)) - created_field.Add(E) - E.strength = 1 - E.density = 1 - E.anchored = 1 - E.invisibility = 0 - return 1 - if("teleport") - var/list/randomturfs = new/list() - for(var/turf/T in orange(user, 50)) - if(!istype(T, /turf/simulated/floor) || T.density) - continue - randomturfs.Add(T) - if(randomturfs.len > 0) - user << "\red You are suddenly zapped away elsewhere!" - if (user.buckled) - user.buckled.unbuckle() - user.loc = pick(randomturfs) - var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() - sparks.set_up(3, 0, get_turf(originator)) //no idea what the 0 is - sparks.start() - return 1 - if("sleepy") - user << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.") - user.drowsyness = min(user.drowsyness + rand(5,25), 50) - user.eye_blurry = min(user.eye_blurry + rand(1,3), 50) - return 1 - else if (src.effectmode == "aura") - switch(src.effecttype) - //caeltodo - if("healing") - for (var/mob/living/carbon/M in range(src.aurarange,originator)) - if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) - continue - if(prob(10)) M << "\blue You feel a soothing energy radiating from something nearby." - M.adjustBruteLoss(-1) - M.adjustFireLoss(-1) - M.adjustToxLoss(-1) - M.adjustOxyLoss(-1) - M.adjustBrainLoss(-1) - M.updatehealth() - return 1 - if("injure") - for (var/mob/living/carbon/M in range(src.aurarange,originator)) - if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) - continue - if(prob(10)) M << "\red You feel a painful force radiating from something nearby." - M.adjustBruteLoss(1) - M.adjustFireLoss(1) - M.adjustToxLoss(1) - M.adjustOxyLoss(1) - M.adjustBrainLoss(1) - M.updatehealth() - return 1 - if("stun") - for (var/mob/living/carbon/M in range(src.aurarange,originator)) - if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) - continue - if(prob(10)) M << "\red Energy radiating from the [originator] is making you feel numb." - if(prob(20)) - M << "\red Your body goes numb for a moment." - M.stunned += 2 - M.weakened += 2 - M.stuttering += 2 - return 1 - if("roboheal") - for (var/mob/living/silicon/robot/M in range(src.aurarange,originator)) - if(prob(10)) M << "\blue SYSTEM ALERT: Beneficial energy field detected!" - M.adjustBruteLoss(-1) - M.adjustFireLoss(-1) - M.updatehealth() - return 1 - if("robohurt") - for (var/mob/living/silicon/robot/M in range(src.aurarange,originator)) - if(prob(10)) M << "\red SYSTEM ALERT: Harmful energy field detected!" - M.adjustBruteLoss(1) - M.adjustFireLoss(1) - M.updatehealth() - return 1 - if("cellcharge") - for (var/obj/machinery/power/apc/C in range(src.aurarange,originator)) - for (var/obj/item/weapon/cell/B in C.contents) - B.charge += 10 - for (var/obj/machinery/power/smes/S in range (src.aurarange,originator)) S.charge += 20 - for (var/mob/living/silicon/robot/M in range(src.aurarange,originator)) - for (var/obj/item/weapon/cell/D in M.contents) - D.charge += 10 - if(prob(10)) M << "\blue SYSTEM ALERT: Energy boosting field detected!" - return 1 - if("celldrain") - for (var/obj/machinery/power/apc/C in range(src.aurarange,originator)) - for (var/obj/item/weapon/cell/B in C.contents) - B.charge = max(B.charge-10,0) - for (var/obj/machinery/power/smes/S in range (src.aurarange,originator)) - S.charge = max(S.charge-20,0) - for (var/mob/living/silicon/robot/M in range(src.aurarange,originator)) - for (var/obj/item/weapon/cell/D in M.contents) - D.charge = max(D.charge-10,0) - if(prob(10)) M << "\red SYSTEM ALERT: Energy draining field detected!" - return 1 - if("planthelper") - for (var/obj/machinery/hydroponics/H in range(src.aurarange,originator)) - //makes weeds and shrooms and stuff more potent too - if(H.planted) - H.waterlevel += 2 - H.nutrilevel += 2 - if(H.toxic > 0) - H.toxic -= 1 - H.health += 1 - if(H.pestlevel > 0) - H.pestlevel -= 1 - if(H.weedlevel > 0) - H.weedlevel -= 1 - H.lastcycle += 5 - return 1 - if("sleepy") - for (var/mob/living/carbon/M in range(src.aurarange,originator)) - if(prob(10)) - M << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.") - M.drowsyness = min(M.drowsyness + 1, 25) - M.eye_blurry = min(M.eye_blurry + 1, 25) - return 1 - else if (src.effectmode == "pulse") - for(var/mob/O in viewers(originator, null)) - O.show_message(text("[] emits a pulse of energy!", originator), 1) - switch(src.effecttype) - //caeltodo - if("healing") - for (var/mob/living/carbon/M in range(src.aurarange,originator)) - if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) - continue - M << "\blue A wave of energy invigorates you." - M.adjustBruteLoss(-5) - M.adjustFireLoss(-5) - M.adjustToxLoss(-5) - M.adjustOxyLoss(-5) - M.adjustBrainLoss(-5) - M.updatehealth() - return 1 - if("injure") - for (var/mob/living/carbon/M in range(src.aurarange,originator)) - if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) - continue - M << "\red A wave of energy causes you great pain!" - M.adjustBruteLoss(5) - M.adjustFireLoss(5) - M.adjustToxLoss(5) - M.adjustOxyLoss(5) - M.adjustBrainLoss(5) - M.make_dizzy(6) - M.weakened += 3 - M.updatehealth() - return 1 - if("stun") - for (var/mob/living/carbon/M in range(src.aurarange,originator)) - if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) - continue - M << "\red A wave of energy overwhelms your senses!" - M.paralysis += 3 - M.weakened += 4 - M.stuttering += 4 - return 1 - if("roboheal") - for (var/mob/living/silicon/robot/M in range(src.aurarange,originator)) - M << "\blue SYSTEM ALERT: Structural damage has been repaired by energy pulse!" - M.adjustBruteLoss(-10) - M.adjustFireLoss(-10) - M.updatehealth() - return 1 - if("robohurt") - for (var/mob/living/silicon/robot/M in range(src.aurarange,originator)) - M << "\red SYSTEM ALERT: Structural damage inflicted by energy pulse!" - M.adjustBruteLoss(10) - M.adjustFireLoss(10) - M.updatehealth() - return 1 - if("cellcharge") - for (var/obj/machinery/power/apc/C in range(src.aurarange,originator)) - for (var/obj/item/weapon/cell/B in C.contents) - B.charge += 250 - for (var/obj/machinery/power/smes/S in range (src.aurarange,originator)) S.charge += 400 - for (var/mob/living/silicon/robot/M in range(src.aurarange,originator)) - for (var/obj/item/weapon/cell/D in M.contents) - D.charge += 250 - M << "\blue SYSTEM ALERT: Large energy boost detected!" - return 1 - if("celldrain") - for (var/obj/machinery/power/apc/C in range(src.aurarange,originator)) - for (var/obj/item/weapon/cell/B in C.contents) - B.charge = max(B.charge-500,0) - for (var/obj/machinery/power/smes/S in range (src.aurarange,originator)) - S.charge = max(S.charge-400,0) - for (var/mob/living/silicon/robot/M in range(src.aurarange,originator)) - for (var/obj/item/weapon/cell/D in M.contents) - D.charge = max(D.charge-500,0) - M << "\red SYSTEM ALERT: Severe energy drain detected!" - return 1 - if("planthelper") - //makes weeds and shrooms and stuff more potent too - for (var/obj/machinery/hydroponics/H in range(src.aurarange,originator)) - if(H.planted) - H.dead = 0 - H.waterlevel = 200 - H.nutrilevel = 200 - H.toxic = 0 - H.health = 100 - H.pestlevel = 0 - H.weedlevel = 0 - H.lastcycle = H.cycledelay - return 1 - if("teleport") - for (var/mob/living/M in range(src.aurarange,originator)) - if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) - continue - var/list/randomturfs = new/list() - for(var/turf/T in orange(M, 30)) - if(!istype(T, /turf/simulated/floor) || T.density) - continue - randomturfs.Add(T) - if(randomturfs.len > 0) - M << "\red You are displaced by a strange force!" - if(M.buckled) - M.buckled.unbuckle() - M.loc = pick(randomturfs) - var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() - sparks.set_up(3, 0, get_turf(originator)) //no idea what the 0 is - sparks.start() - return 1 - if("dnaswitch") - for(var/mob/living/H in range(src.aurarange,originator)) - if(ishuman(H) && istype(H:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(H:head,/obj/item/clothing/head/bio_hood/anomaly)) - continue - - if(prob(30)) - H << pick("\green You feel a little different.","\green You feel strange.","\green You feel different.") - //todo - if (H.gender == FEMALE) - H.gender = MALE - else - H.gender = FEMALE - /*H.dna.ready_dna(H) - H.update_body() - H.update_face()*/ - return 1 - if("emp") - empulse(get_turf(originator), aurarange/2, aurarange) - return 1 - if("sleepy") - for (var/mob/living/carbon/M in range(src.aurarange,originator)) - if(prob(30)) - M << pick("\blue You feel like taking a nap.","\blue You feel a yawn coming on.","\blue You feel a little tired.") - if(prob(50)) - M.drowsyness = min(M.drowsyness + rand(1,5), 25) - if(prob(50)) - M.eye_blurry = min(M.eye_blurry + rand(1,5), 25) - return 1 - else if (src.effectmode == "worldpulse") - for(var/mob/O in viewers(originator, null)) - O.show_message(text("[] emits a powerful burst of energy!", originator), 1) - switch(src.effecttype) - if("healing") - for (var/mob/living/carbon/M in range(200, originator)) - if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) - continue - M << "\blue Waves of soothing energy wash over you." - M.adjustBruteLoss(-3) - M.adjustFireLoss(-3) - M.adjustToxLoss(-3) - M.adjustOxyLoss(-3) - M.adjustBrainLoss(-3) - M.updatehealth() - return 1 - if("injure") - for (var/mob/living/carbon/human/M in range(200, originator)) - M << "\red A wave of painful energy strikes you!" - M.adjustBruteLoss(3) - M.adjustFireLoss(3) - M.adjustToxLoss(3) - M.adjustOxyLoss(3) - M.adjustBrainLoss(3) - M.updatehealth() - return 1 - if("stun") - for (var/mob/living/carbon/M in range(200, originator)) - if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) - continue - M << "\red A powerful force causes you to black out momentarily." - M.paralysis += 5 - M.weakened += 8 - M.stuttering += 8 - return 1 - if("roboheal") - for (var/mob/living/silicon/robot/M in range(200, originator)) - M << "\blue SYSTEM ALERT: Structural damage has been repaired by energy pulse!" - M.adjustBruteLoss(-5) - M.adjustFireLoss(-5) - M.updatehealth() - return 1 - if("robohurt") - for (var/mob/living/silicon/robot/M in range(200, originator)) - M << "\red SYSTEM ALERT: Structural damage inflicted by energy pulse!" - M.adjustBruteLoss(5) - M.adjustFireLoss(5) - M.updatehealth() - return 1 - if("cellcharge") - for (var/obj/machinery/power/apc/C in range(200, originator)) - for (var/obj/item/weapon/cell/B in C.contents) - B.charge += 100 - for (var/obj/machinery/power/smes/S in range (src.aurarange,src)) S.charge += 250 - for (var/mob/living/silicon/robot/M in world) - for (var/obj/item/weapon/cell/D in M.contents) - D.charge += 100 - M << "\blue SYSTEM ALERT: Energy boost detected!" - return 1 - if("celldrain") - for (var/obj/machinery/power/apc/C in range(200, originator)) - for (var/obj/item/weapon/cell/B in C.contents) - B.charge = max(B.charge-250,0) - for (var/obj/machinery/power/smes/S in range (src.aurarange,src)) - S.charge = max(S.charge-250,0) - for (var/mob/living/silicon/robot/M in world) - for (var/obj/item/weapon/cell/D in M.contents) - D.charge = max(D.charge-250,0) - M << "\red SYSTEM ALERT: Energy drain detected!" - return 1 - if("teleport") - for (var/mob/living/M in range(200, originator)) - if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly)) - continue - var/list/randomturfs = new/list() - for(var/turf/T in orange(M, 15)) - if(!istype(T, /turf/simulated/floor) || T.density) - continue - randomturfs.Add(T) - if(randomturfs.len > 0) - M << "\red You are displaced by a strange force!" - if(M.buckled) - M.buckled.unbuckle() - M.loc = pick(randomturfs) - var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() - sparks.set_up(3, 0, get_turf(originator)) //no idea what the 0 is - sparks.start() - return 1 - if("dnaswitch") - for(var/mob/living/H in range(200, originator)) - if(ishuman(H) && istype(H:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(H:head,/obj/item/clothing/head/bio_hood/anomaly)) - continue - - if(prob(30)) - H << pick("\green You feel a little different.","\green You feel strange.","\green You feel different.") - //todo - if (H.gender == FEMALE) - H.gender = MALE - else - H.gender = FEMALE - /*H.dna.ready_dna(H) - H.update_body() - H.update_face()*/ - return 1 - if("sleepy") - for(var/mob/living/H in range(200, originator)) - H.drowsyness = min(H.drowsyness + rand(5,15), 50) - H.eye_blurry = min(H.eye_blurry + rand(5,15), 50) - return 1 - -//initially for the force field artifact -/datum/artifact_effect/proc/update_move(var/atom/originator) - switch(effecttype) - if("forcefield") - while(created_field.len < 16) - //for now, just instantly respawn the fields when they get destroyed - var/obj/effect/energy_field/E = new (locate(originator.x,originator.y,originator)) - created_field.Add(E) - E.strength = 1 - E.density = 1 - E.anchored = 1 - E.invisibility = 0 - - var/obj/effect/energy_field/E = created_field[1] - E.loc = locate(originator.x + 2,originator.y + 2,originator.z) - E = created_field[2] - E.loc = locate(originator.x + 2,originator.y + 1,originator.z) - E = created_field[3] - E.loc = locate(originator.x + 2,originator.y,originator.z) - E = created_field[4] - E.loc = locate(originator.x + 2,originator.y - 1,originator.z) - E = created_field[5] - E.loc = locate(originator.x + 2,originator.y - 2,originator.z) - E = created_field[6] - E.loc = locate(originator.x + 1,originator.y + 2,originator.z) - E = created_field[7] - E.loc = locate(originator.x + 1,originator.y - 2,originator.z) - E = created_field[8] - E.loc = locate(originator.x,originator.y + 2,originator.z) - E = created_field[9] - E.loc = locate(originator.x,originator.y - 2,originator.z) - E = created_field[10] - E.loc = locate(originator.x - 1,originator.y + 2,originator.z) - E = created_field[11] - E.loc = locate(originator.x - 1,originator.y - 2,originator.z) - E = created_field[12] - E.loc = locate(originator.x - 2,originator.y + 2,originator.z) - E = created_field[13] - E.loc = locate(originator.x - 2,originator.y + 1,originator.z) - E = created_field[14] - E.loc = locate(originator.x - 2,originator.y,originator.z) - E = created_field[15] - E.loc = locate(originator.x - 2,originator.y - 1,originator.z) - E = created_field[16] - E.loc = locate(originator.x - 2,originator.y - 2,originator.z) diff --git a/code/modules/research/xenoarchaeology/finds/finds.dm b/code/modules/research/xenoarchaeology/finds/finds.dm index 4e5c733abd3..43c3d1ec70c 100644 --- a/code/modules/research/xenoarchaeology/finds/finds.dm +++ b/code/modules/research/xenoarchaeology/finds/finds.dm @@ -88,7 +88,7 @@ if(new_item_type) find_type = new_item_type else - find_type = rand(1,34) //update this when you add new find types + find_type = rand(1,33) //update this when you add new find types var/item_type = "object" icon_state = "unknown[rand(1,4)]" @@ -323,34 +323,33 @@ item_type = new_item.name if(26) //energy gun - var/spawn_type = pick( - /obj/item/weapon/gun/energy/laser/practice;100,\ - /obj/item/weapon/gun/energy/laser;75,\ - /obj/item/weapon/gun/energy/xray;50,\ - /obj/item/weapon/gun/energy/laser/captain;25,\ - ) - if(isnull(spawn_type)) - spawn_type = /obj/item/weapon/gun/energy/laser - var/obj/item/weapon/gun/energy/new_gun = new spawn_type(src.loc) - new_item = new_gun - new_item.icon_state = "egun[rand(1,6)]" + var/spawn_type = pick(\ + /obj/item/weapon/gun/energy/laser/practice,\ + /obj/item/weapon/gun/energy/laser,\ + /obj/item/weapon/gun/energy/xray,\ + /obj/item/weapon/gun/energy/laser/captain) + if(spawn_type) + var/obj/item/weapon/gun/energy/new_gun = new spawn_type(src.loc) + new_item = new_gun + new_item.icon_state = "egun[rand(1,6)]" + new_gun.desc = "This is an antique energy weapon, you're not sure if it will fire or not." - //5% chance to explode when first fired - //10% chance to have an unchargeable cell - //15% chance to gain a random amount of starting energy, otherwise start with an empty cell - if(prob(5)) - new_gun.power_supply.rigged = 1 - if(prob(10)) - new_gun.power_supply.maxcharge = 0 - if(prob(15)) - new_gun.power_supply.charge = rand(0, new_gun.power_supply.maxcharge) - else - new_gun.power_supply.charge = 0 + //5% chance to explode when first fired + //10% chance to have an unchargeable cell + //15% chance to gain a random amount of starting energy, otherwise start with an empty cell + if(prob(5)) + new_gun.power_supply.rigged = 1 + if(prob(10)) + new_gun.power_supply.maxcharge = 0 + if(prob(15)) + new_gun.power_supply.charge = rand(0, new_gun.power_supply.maxcharge) + else + new_gun.power_supply.charge = 0 item_type = "gun" - if(27) +/* if(27) //revolver - var/obj/item/weapon/gun/projectile/new_gun = new /obj/item/weapon/gun/projectile(src.loc) + var/obj/item/weapon/gun/projectile/revolver/new_gun = new /obj/item/weapon/gun/projectile/revolver(src.loc) new_item = new_gun new_item.icon_state = "gun[rand(1,4)]" new_item.icon = 'icons/obj/xenoarchaeology.dmi' @@ -382,7 +381,7 @@ new_gun.loaded.Remove(I) I.loc = null - item_type = "gun" + item_type = "gun"*/ if(28) //completely unknown alien device if(prob(50)) @@ -448,7 +447,7 @@ "A pile of wires and crap metal that looks vaguely robotic.") apply_image_decorations = 0 apply_material_decorations = 0 - if(34) + if(27) //xenos remains apply_prefix = 0 item_type = "alien [pick("remains","skeleton")]" diff --git a/code/modules/research/xenoarchaeology/finds/finds_defines.dm b/code/modules/research/xenoarchaeology/finds/finds_defines.dm index b9649d074b3..6de9b4c8061 100644 --- a/code/modules/research/xenoarchaeology/finds/finds_defines.dm +++ b/code/modules/research/xenoarchaeology/finds/finds_defines.dm @@ -206,6 +206,28 @@ ) return find_type +var/list/responsive_carriers = list( \ + "carbon", \ + "potassium", \ + "hydrogen", \ + "nitrogen", \ + "mercury", \ + "iron", \ + "chlorine", \ + "phosphorus", \ + "plasma") + +var/list/finds_as_strings = list( \ + "Trace organic cells", \ + "Long exposure particles", \ + "Trace water particles", \ + "Crystalline structures", \ + "Metallic derivative", \ + "Metallic composite", \ + "Metamorphic/igneous rock composite", \ + "Metamorphic/sedimentary rock composite", \ + "Anomalous material" ) + #undef ARCHAEO_BOWL #undef ARCHAEO_URN #undef ARCHAEO_CUTLERY diff --git a/code/modules/research/xenoarchaeology/geosample.dm b/code/modules/research/xenoarchaeology/geosample.dm index 91d5f1bd62c..47a5bd3da1a 100644 --- a/code/modules/research/xenoarchaeology/geosample.dm +++ b/code/modules/research/xenoarchaeology/geosample.dm @@ -29,30 +29,6 @@ pixel_x = rand(0,16)-8 pixel_y = rand(0,8)-8 -var/list/responsive_carriers = list( \ - "carbon", \ - "potassium", \ - "hydrogen", \ - "nitrogen", \ - "mercury", \ - "iron", \ - "chlorine", \ - "phosphorus", \ - "plasma") - -var/list/finds_as_strings = list( \ - "Trace organic cells", \ - "Long exposure particles", \ - "Trace water particles", \ - "Crystalline structures", \ - "Metallic derivative", \ - "Metallic composite", \ - "Metamorphic/igneous rock composite", \ - "Metamorphic/sedimentary rock composite", \ - "Anomalous material" ) - -var/list/artifact_spawning_turfs = list() - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Geosample datum @@ -64,7 +40,6 @@ var/list/artifact_spawning_turfs = list() var/artifact_id = "" //id of a nearby artifact, if there is one var/artifact_distance = -1 //proportional to distance var/source_mineral = "chlorine" //machines will pop up a warning telling players that the sample may be confused - var/total_spread = 0 // //var/source_mineral //all potential finds are initialised to null, so nullcheck before you access them @@ -76,11 +51,11 @@ var/list/artifact_spawning_turfs = list() //this should only need to be called once /datum/geosample/proc/UpdateTurf(var/turf/simulated/mineral/container) + set background = 1 if(!container || !istype(container)) return age = rand(1,999) - total_spread = 0 switch(container.mineralName) if("Uranium") @@ -132,8 +107,15 @@ var/list/artifact_spawning_turfs = list() var/responsive_reagent = get_responsive_reagent(F.find_type) find_presence[responsive_reagent] = F.dissonance_spread - for(var/entry in find_presence) - total_spread += find_presence[entry] + //loop over again to reset values to percentages + var/total_presence = 0 + for(var/carrier in find_presence) + total_presence += find_presence[carrier] + for(var/carrier in find_presence) + find_presence[carrier] = find_presence[carrier] / total_presence + + /*for(var/entry in find_presence) + total_spread += find_presence[entry]*/ //have this separate from UpdateTurf() so that we dont have a billion turfs being updated (redundantly) every time an artifact spawns /datum/geosample/proc/UpdateNearbyArtifactInfo(var/turf/simulated/mineral/container) @@ -144,14 +126,14 @@ var/list/artifact_spawning_turfs = list() artifact_distance = rand() artifact_id = container.artifact_find.artifact_id else - for(var/turf/simulated/mineral/holder in artifact_spawning_turfs) - if(holder.artifact_find) - var/dist = get_dist(container, holder) - if(dist < holder.artifact_find.artifact_detect_range && dist < src.artifact_distance) - src.artifact_distance = dist - src.artifact_id = holder.artifact_find.artifact_id + for(var/turf/simulated/mineral/T in master_controller.artifact_spawning_turfs) + if(T.artifact_find) + var/cur_dist = get_dist(container, T) * 2 + if( (artifact_distance < 0 || cur_dist < artifact_distance) && cur_dist <= T.artifact_find.artifact_detect_range ) + artifact_distance = cur_dist + rand() * 2 - 1 + artifact_id = T.artifact_find.artifact_id else - artifact_spawning_turfs.Remove(holder) + master_controller.artifact_spawning_turfs.Remove(T) /* #undef FIND_PLANT diff --git a/code/modules/research/xenoarchaeology/machinery/analysis_accelerator.dm b/code/modules/research/xenoarchaeology/machinery/analysis_accelerator.dm deleted file mode 100644 index 74ac904dc9b..00000000000 --- a/code/modules/research/xenoarchaeology/machinery/analysis_accelerator.dm +++ /dev/null @@ -1,44 +0,0 @@ - -// This machine shows the age for extremely old finds - -obj/machinery/anomaly/accelerator - name = "Accelerator spectrometer" - -obj/machinery/anomaly/accelerator/ScanResults() - var/results = "The scan was inconclusive. Check sample integrity and carrier consistency." - - var/datum/geosample/scanned_sample - var/carrier_name - var/num_reagents = 0 - - for(var/datum/reagent/A in held_container.reagents.reagent_list) - var/datum/reagent/R = A - if(istype(R, /datum/reagent/analysis_sample)) - scanned_sample = R.data - else - carrier_name = R.id - num_reagents++ - - if(num_reagents == 2 && scanned_sample && carrier_name) - var/specifity = GetResultSpecifity(scanned_sample, carrier_name) - results = "Kinetic acceleration of carrier ([carrier_name]) indicates age ([100 * specifity]% accuracy):

" - - if(scanned_sample.age_billion) - var/displayed_age_millions = scanned_sample.age_million + max(scanned_sample.age_million * ((1 - specifity) * (2 * rand() - 1)), 0) - var/displayed_age_billions = scanned_sample.age_billion + max(scanned_sample.age_billion * ((1 - specifity) * (2 * rand() - 1)), 0) - results += "[displayed_age_billions + displayed_age_millions / 1000] billion years.
" - else if(scanned_sample.age_million) - var/displayed_age_thousands = scanned_sample.age_thousand + max(scanned_sample.age_thousand * ((1 - specifity) * (4 * rand() - 2)), 0) - var/displayed_age_millions = scanned_sample.age_million + max(scanned_sample.age_million * ((1 - specifity) * (2 * rand() - 1)), 0) - results += "[displayed_age_millions + displayed_age_thousands / 1000] million years.
" - else if(scanned_sample.age_thousand) - var/displayed_age = scanned_sample.age + max(scanned_sample.age * ((1 - specifity) * (8 * rand() - 4)), 0) - var/displayed_age_thousands = scanned_sample.age_thousand + max(scanned_sample.age * ((1 - specifity) * (4 * rand() - 2)), 0) - results += "[displayed_age_thousands + displayed_age / 1000] thousand years.
" - else - var/displayed_age = scanned_sample.age + max(scanned_sample.age * ((1 - specifity) * (8 * rand() - 4)), 0) - results += "[displayed_age] years.
" - - results += "
Warning, results only valid for ages on the scale of billions of years." - - return results diff --git a/code/modules/research/xenoarchaeology/machinery/analysis_base.dm b/code/modules/research/xenoarchaeology/machinery/analysis_base.dm deleted file mode 100644 index a462bd98fa0..00000000000 --- a/code/modules/research/xenoarchaeology/machinery/analysis_base.dm +++ /dev/null @@ -1,203 +0,0 @@ -//Handles how much the temperature changes on power use. (Joules/Kelvin) -//Equates to as much heat energy per kelvin as a quarter tile of air. -#define XENOARCH_HEAT_CAPACITY 5000 - -//Handles heat transfer to the air. (In watts) -//Can heat a single tile 2 degrees per tick. -#define XENOARCH_MAX_ENERGY_TRANSFER 4000 - -//How many joules of electrical energy produce how many joules of heat energy? -#define XENOARCH_HEAT_COEFFICIENT 3 - - -/obj/machinery/anomaly - name = "Analysis machine" - desc = "A specialised, complex analysis machine." - anchored = 1 - density = 1 - icon = 'icons/obj/virology.dmi' - icon_state = "analyser" - - idle_power_usage = 20 //watts - active_power_usage = 300 //Because I need to make up numbers~ - - var/obj/item/weapon/reagent_containers/glass/held_container - var/obj/item/weapon/tank/fuel_container - var/target_scan_ticks = 30 - var/report_num = 0 - var/scan_process = 0 - var/temperature = 273 //measured in kelvin, if this exceeds 1200, the machine is damaged and requires repairs - //if this exceeds 600 and safety is enabled it will shutdown - //temp greater than 600 also requires a safety prompt to initiate scanning - var/max_temp = 450 - -/obj/machinery/anomaly/New() - ..() - - //for analysis debugging - /*var/obj/item/weapon/reagent_containers/glass/solution_tray/S = new(src.loc) - var/turf/simulated/mineral/diamond/D - for(var/turf/simulated/mineral/diamond/M in world) - D = M - break - S.reagents.add_reagent("analysis_sample", 1, D.geological_data) - S.reagents.add_reagent("chlorine", 1, null)*/ - -/obj/machinery/anomaly/process() - //not sure if everything needs to heat up, or just the GLPC - var/datum/gas_mixture/env = loc.return_air() - var/environmental_temp = env.temperature - if(scan_process) - if(scan_process++ > target_scan_ticks) - FinishScan() - else if(temperature > 400) - src.visible_message("\blue \icon[src] shuts down from the heat!", 2) - scan_process = 0 - else if(temperature > 350 && prob(10)) - src.visible_message("\blue \icon[src] bleets plaintively.", 2) - if(temperature > 400) - scan_process = 0 - - //show we're busy - if(prob(5)) - src.visible_message("\blue \icon[src] [pick("whirrs","chuffs","clicks")][pick(" quietly"," softly"," sadly"," excitedly"," energetically"," angrily"," plaintively")].", 2) - - use_power = 2 - - else - use_power = 1 - - auto_use_power() - - //Add 3000 joules when active. This is about 0.6 degrees per tick. - //May need adjustment - if(use_power == 1) - var/heat_added = active_power_usage *XENOARCH_HEAT_COEFFICIENT - - if(temperature < max_temp) - temperature += heat_added/XENOARCH_HEAT_CAPACITY - - var/temperature_difference = abs(environmental_temp-temperature) - var/datum/gas_mixture/removed = loc.remove_air(env.total_moles*0.25) - var/heat_capacity = removed.heat_capacity() - - heat_added = max(temperature_difference*heat_capacity, XENOARCH_MAX_ENERGY_TRANSFER) - - if(temperature > environmental_temp) - //cool down to match the air - temperature = max(TCMB, temperature - heat_added/XENOARCH_HEAT_CAPACITY) - removed.temperature = max(TCMB, removed.temperature + heat_added/heat_capacity) - - if(temperature_difference > 10 && prob(5)) - src.visible_message("\blue \icon[src] hisses softly.", 2) - - else - //heat up to match the air - temperature = max(TCMB, temperature + heat_added/XENOARCH_HEAT_CAPACITY) - removed.temperature = max(TCMB, removed.temperature - heat_added/heat_capacity) - - if(temperature_difference > 10 && prob(5)) - src.visible_message("\blue \icon[src] plinks quietly.", 2) - - env.merge(removed) - - -//this proc should be overriden by each individual machine -/obj/machinery/anomaly/attack_hand(var/mob/user as mob) - if(stat & (NOPOWER|BROKEN)) - return - user.machine = src - var/dat = "[src.name]
" - dat += "Module heat level: [temperature] kelvin
" - dat += "Safeties set at 350k, shielding failure at 400k. Failure to maintain safe heat levels may result in equipment damage.
" - dat += "
" - if(scan_process) - dat += "Scan in progress


" - else - dat += "[held_container ? "Eject beaker" : "No beaker inserted."]
" - //dat += "[fuel_container ? "Eject fuel tank" : "No fuel tank inserted."]
" - dat += "[held_container ? "Begin scanning" : ""]" - dat += "
" - dat += "Refresh
" - dat += "Close
" - user << browse(dat, "window=anomaly;size=450x500") - onclose(user, "anomaly") - -obj/machinery/anomaly/attackby(obj/item/weapon/W as obj, mob/living/user as mob) - if(istype(W, /obj/item/weapon/reagent_containers/glass)) - //var/obj/item/weapon/reagent_containers/glass/G = W - if(held_container) - user << "\red You must remove the [held_container] first." - else - user << "\blue You put the [W] into the [src]." - user.drop_item(W) - held_container = W - held_container.loc = src - updateDialog() - - /*else if(istype(W, /obj/item/weapon/tank)) - //var/obj/item/weapon/reagent_containers/glass/G = W - if(fuel_container) - user << "\red You must remove the [fuel_container] first." - else - user << "\blue You put the [fuel_container] into the [src]." - user.drop_item(W) - fuel_container.loc = src - fuel_container = W - updateDialog()*/ - else - return ..() - -obj/machinery/anomaly/proc/ScanResults() - //instantiate in children to produce unique scan behaviour - return "\red Error initialising scanning components." - -obj/machinery/anomaly/proc/FinishScan() - scan_process = 0 - updateDialog() - - //determine the results and print a report - if(held_container) - src.visible_message("\blue \icon[src] makes an insistent chime.", 2) - var/obj/item/weapon/paper/P = new(src.loc) - P.name = "[src] report #[++report_num]" - P.info = "[src] analysis report #[report_num]

" + ScanResults() - P.stamped = list(/obj/item/weapon/stamp) - P.overlays = list("paper_stamped") - else - src.visible_message("\blue \icon[src] makes a low buzzing noise.", 2) - -obj/machinery/anomaly/Topic(href, href_list) - ..() - usr.set_machine(src) - if(href_list["close"]) - usr << browse(null, "window=anomaly") - usr.machine = null - if(href_list["eject_beaker"]) - held_container.loc = src.loc - held_container = null - if(href_list["eject_fuel"]) - fuel_container.loc = src.loc - fuel_container = null - if(href_list["begin"]) - if(temperature >= 350) - var/proceed = input("Unsafe internal temperature detected, enter YES below to continue.","Warning") - if(proceed == "YES" && get_dist(src, usr) <= 1) - scan_process = 1 - else - scan_process = 1 - - updateUsrDialog() - -//whether the carrier sample matches the possible finds -//results greater than a threshold of 0.6 means a positive result -obj/machinery/anomaly/proc/GetResultSpecifity(var/datum/geosample/scanned_sample, var/carrier_name) - var/specifity = 0 - if(scanned_sample && carrier_name) - - if(scanned_sample.find_presence.Find(carrier_name)) - specifity = 0.75 * (scanned_sample.find_presence[carrier_name] / scanned_sample.total_spread) + 0.25 - else - specifity = rand(0, 0.5) - - return specifity diff --git a/code/modules/research/xenoarchaeology/machinery/analysis_fourier_transform.dm b/code/modules/research/xenoarchaeology/machinery/analysis_fourier_transform.dm deleted file mode 100644 index 98c49b2372a..00000000000 --- a/code/modules/research/xenoarchaeology/machinery/analysis_fourier_transform.dm +++ /dev/null @@ -1,34 +0,0 @@ - -// This machine tells the distance to a nearby artifact, if there is one - -obj/machinery/anomaly/fourier_transform - name = "Fourier Transform spectroscope" - -obj/machinery/anomaly/fourier_transform/ScanResults() - var/results = "The scan was inconclusive. Check sample integrity and carrier consistency." - - var/datum/geosample/scanned_sample - var/carrier - var/num_reagents = 0 - - for(var/datum/reagent/A in held_container.reagents.reagent_list) - var/datum/reagent/R = A - if(istype(R, /datum/reagent/analysis_sample)) - scanned_sample = R.data - else - carrier = R.id - num_reagents++ - - if(num_reagents == 2 && scanned_sample && carrier) - //all necessary components are present - var/specifity = GetResultSpecifity(scanned_sample, carrier) - var/distance = scanned_sample.artifact_distance - if(distance > 0) - distance += (2 * rand() - 1) * distance * 0.05 - results = "Fourier transform analysis on anomalous energy absorption through carrier ([carrier]) indicates source located inside emission radius ([95 * specifity]% accuracy): [distance]." - else - results = "Energy dispersion detected throughout sample consistent with background readings.
" - if(carrier == scanned_sample.source_mineral) - results += "Warning, analysis may be contaminated by high quantities of molecular carrier present throughout sample." - - return results diff --git a/code/modules/research/xenoarchaeology/machinery/analysis_gas_chromatography.dm b/code/modules/research/xenoarchaeology/machinery/analysis_gas_chromatography.dm deleted file mode 100644 index bd6dbeb9b36..00000000000 --- a/code/modules/research/xenoarchaeology/machinery/analysis_gas_chromatography.dm +++ /dev/null @@ -1,39 +0,0 @@ - -// This machine shows the materials that are present - -obj/machinery/anomaly/gas_chromatography - name = "Gas Chromatography spectrometer" - -obj/machinery/anomaly/gas_chromatography/ScanResults() - var/results = "The scan was inconclusive. Check sample integrity and carrier consistency." - - var/datum/geosample/scanned_sample - var/carrier - var/num_reagents = 0 - - for(var/datum/reagent/A in held_container.reagents.reagent_list) - var/datum/reagent/R = A - if(istype(R, /datum/reagent/analysis_sample)) - scanned_sample = R.data - else - carrier = R.id - num_reagents++ - - if(num_reagents == 2 && scanned_sample) - var/specifity = GetResultSpecifity(scanned_sample, carrier) - results = "Chromatography partitioning analysis over carrier ([carrier]) indicates the following elements present ([100 * specifity]% accuracy):

" - - var/num_found = 0 - for(var/index=1,index <= scanned_sample.find_presence.len, index++) - var/find = scanned_sample.find_presence[index] - if(find && prob(100 * specifity)) - results += " - " + finds_as_strings[index] + "
" - num_found++ - - if(!num_found) - results = "Chromatography partitioning results over carrier ([carrier]) to determine elemental makeup were inconclusive.
" - - if(!carrier) - results += "
No carrier detected, scan accuracy affected.
" - - return results diff --git a/code/modules/research/xenoarchaeology/machinery/analysis_hyperspectral.dm b/code/modules/research/xenoarchaeology/machinery/analysis_hyperspectral.dm deleted file mode 100644 index a070a61a5d3..00000000000 --- a/code/modules/research/xenoarchaeology/machinery/analysis_hyperspectral.dm +++ /dev/null @@ -1,55 +0,0 @@ - -obj/machinery/anomaly/hyperspectral - name = "Hyperspectral Imager" - icon = 'icons/obj/xenoarchaeology.dmi' - icon_state = "scanner" - -obj/machinery/anomaly/hyperspectral/process() - ..() - if(scan_process) - icon_state = "scanner_active" - else if(prob(10)) - icon_state = "scanner" - flick(src, "scanner_active") - -obj/machinery/anomaly/hyperspectral/ScanResults() - var/results = "The scan was inconclusive. Check sample integrity and carrier consistency." - - var/datum/geosample/scanned_sample - var/carrier - var/num_reagents = 0 - - for(var/datum/reagent/A in held_container.reagents.reagent_list) - var/datum/reagent/R = A - if(istype(R, /datum/reagent/analysis_sample)) - scanned_sample = R.data - else - carrier = R.id - num_reagents++ - - if(num_reagents == 2 && scanned_sample && carrier) - //all necessary components are present - var/specifity = GetResultSpecifity(scanned_sample, carrier) - results = "Spectral signature over carrier ([carrier]):
" - if(specifity <= 0.25) - //results += "
" - results += "" - else if(specifity <= 0.5) - //results += "
" - results += "" - else if(specifity <= 0.75) - //results += "
" - results += "" - else - //results += "
" - results += "" - - results += "
" - if(scanned_sample.artifact_id) - results += "Detected energy signatures [100 * (1 - specifity)]% consistent with standard background readings.
" - if(prob( (specifity + 0.5 * (1 - specifity)) * 100)) - results += "Anomalous exotic energy signature isolated: [scanned_sample.artifact_id]." - else - results += "Detected energy signatures [95 + 5 * (2 * rand() - 1) * (1 - specifity)]% consistent with standard background readings." - - return results diff --git a/code/modules/research/xenoarchaeology/machinery/analysis_ion_mobility.dm b/code/modules/research/xenoarchaeology/machinery/analysis_ion_mobility.dm deleted file mode 100644 index 9b37d20df91..00000000000 --- a/code/modules/research/xenoarchaeology/machinery/analysis_ion_mobility.dm +++ /dev/null @@ -1,47 +0,0 @@ - -// This machine shows the amount of a certain material that is present - -obj/machinery/anomaly/ion_mobility - name = "Ion Mobility Spectrometer" - desc = "A specialised, complex analysis machine." - icon = 'icons/obj/virology.dmi' - icon_state = "analyser" - -obj/machinery/anomaly/ion_mobility/ScanResults() - var/results = "The scan was inconclusive. Check sample integrity and carrier consistency." - - var/datum/geosample/scanned_sample - var/carrier - var/num_reagents = 0 - - for(var/datum/reagent/A in held_container.reagents.reagent_list) - var/datum/reagent/R = A - if(istype(R, /datum/reagent/analysis_sample)) - scanned_sample = R.data - else - carrier = R.id - num_reagents++ - - if(num_reagents == 2 && scanned_sample && carrier) - //all necessary components are present - results = "Kinetic analysis on sample's ionic residue in carrier ([carrier]) indicates the dissonance spread:

" - var/found = 0 - if(scanned_sample.find_presence.Find(carrier)) - var/dis_ratio = scanned_sample.find_presence[carrier] - var/desc_index = responsive_carriers.Find(carrier) - results += " - [finds_as_strings[desc_index]]: [dis_ratio]
" - found++ - /* - for(var/index=1,index <= scanned_sample.find_presence.len, index++) - var/find = scanned_sample.find_presence[index] - //world << "index: [index], find: [find], response: [responsive_carriers[index]], carrier: [carrier]" - if(find && responsive_carriers[index] == carrier) - results += " - [finds_as_strings[index]] [find * 100]%
" - found++ - */ - if(!found) - results = "Kinetic analysis on sample's ionic residue in carrier ([carrier]) to determine composition were inconclusive.
" - if(carrier == scanned_sample.source_mineral) - results += "Warning, analysis may be contaminated by high quantities of molecular carrier present throughout sample." - - return results diff --git a/code/modules/research/xenoarchaeology/machinery/analysis_isotope_ratio.dm b/code/modules/research/xenoarchaeology/machinery/analysis_isotope_ratio.dm deleted file mode 100644 index 04efb278ad9..00000000000 --- a/code/modules/research/xenoarchaeology/machinery/analysis_isotope_ratio.dm +++ /dev/null @@ -1,51 +0,0 @@ - -// This machine shows the age for newer finds - -obj/machinery/anomaly/isotope_ratio - name = "Isotope ratio spectrometer" - desc = "A specialised, complex analysis machine." - icon = 'icons/obj/virology.dmi' - icon_state = "analyser" - -obj/machinery/anomaly/isotope_ratio/ScanResults() - var/results = "The scan was inconclusive. Check sample integrity and carrier consistency." - - var/datum/geosample/scanned_sample - var/carrier_name - var/num_reagents = 0 - - for(var/datum/reagent/A in held_container.reagents.reagent_list) - var/datum/reagent/R = A - if(istype(R, /datum/reagent/analysis_sample)) - scanned_sample = R.data - else - carrier_name = R.id - num_reagents++ - - if(num_reagents == 2 && scanned_sample && carrier_name) - var/accuracy = GetResultSpecifity(scanned_sample, carrier_name) - accuracy += 0.5 * (1 - accuracy) / scanned_sample.total_spread - if(!accuracy) - accuracy = rand(0.01, 0.5) - results = "Isotope decay analysis in carrier ([carrier_name]) indicates age ([100 * accuracy]% accuracy):

" - - if(scanned_sample.age_billion) - //scramble the results - var/displayed_age_thousands = rand(0, 999) - var/displayed_age_millions = rand(0, 999) - results += "[displayed_age_millions + displayed_age_thousands / 1000] million years.
" - else if(scanned_sample.age_million) - var/displayed_age_thousands = scanned_sample.age_thousand + max(scanned_sample.age_thousand * ((1 - accuracy) * (2 * rand() - 1)), 0) - var/displayed_age_millions = scanned_sample.age_million + max(scanned_sample.age_million * ((1 - accuracy) * (4 * rand() - 2)), 0) - results += "[displayed_age_millions + displayed_age_thousands / 1000] million years.
" - else if(scanned_sample.age_thousand) - var/displayed_age = scanned_sample.age + scanned_sample.age * ((1 - accuracy) * (2 * rand() - 1)) - var/displayed_age_thousands = scanned_sample.age_thousand + max(scanned_sample.age_thousand * ((1 - accuracy) * (2 * rand() - 1)), 0) - results += "[displayed_age_thousands + displayed_age / 1000] thousand years.
" - else - var/displayed_age = scanned_sample.age + max(scanned_sample.age * ((1 - accuracy) * (2 * rand() - 1)), 0) - results += "[displayed_age] years.
" - - results += "
Warning, results only valid up to ages of one billion years." - - return results diff --git a/code/modules/research/xenoarchaeology/machinery/artifact_analyser.dm b/code/modules/research/xenoarchaeology/machinery/artifact_analyser.dm index c489bfc10e1..7daa0a665aa 100644 --- a/code/modules/research/xenoarchaeology/machinery/artifact_analyser.dm +++ b/code/modules/research/xenoarchaeology/machinery/artifact_analyser.dm @@ -134,11 +134,11 @@ ecosystem involving self cannibalism and a symbiotic relationship with the contained liquid.

\ Structure is composed of a carbo-titanium alloy with interlaced reinforcing energy fields, and the contained liquid \ resembles proto-plasmic residue supportive of single cellular developmental conditions." -// if(/obj/machinery/power/supermatter) -// return "Super dense plasma clump - Appears to have been shaped or hewn, structure is composed of matter 2000% denser than ordinary carbon matter residue.\ + if(/obj/machinery/power/supermatter) + return "Super dense plasma clump - Appears to have been shaped or hewn, structure is composed of matter 2000% denser than ordinary carbon matter residue.\ Potential application as unrefined plasma source." -// if(/obj/machinery/power/supermatter) -// return "Super dense plasma clump - Appears to have been shaped or hewn, structure is composed of matter 2000% denser than ordinary carbon matter residue.\ + if(/obj/machinery/power/supermatter) + return "Super dense plasma clump - Appears to have been shaped or hewn, structure is composed of matter 2000% denser than ordinary carbon matter residue.\ Potential application as unrefined plasma source." if(/obj/structure/constructshell) return "Tribal idol - Item resembles statues/emblems built by superstitious pre-warp civilisations to honour their gods. Material appears to be a \ diff --git a/code/modules/research/xenoarchaeology/machinery/artifact_analyser_old.dm b/code/modules/research/xenoarchaeology/machinery/artifact_analyser_old.dm deleted file mode 100644 index ff1415997b1..00000000000 --- a/code/modules/research/xenoarchaeology/machinery/artifact_analyser_old.dm +++ /dev/null @@ -1,318 +0,0 @@ - -//cael - some changes here. the analysis pad is entirely new - -/obj/machinery/artifact_analyser - name = "Artifact Analyser" - desc = "Studies the structure of artifacts to discover their uses." - icon = 'icons/obj/virology.dmi' - icon_state = "analyser" - anchored = 1 - density = 1 - var/working = 0 - var/accuO = 0 - var/accuT = 0 - var/accuE1 = 0 - var/accuE2 = 0 - var/aorigin = "None" - var/atrigger = "None" - var/aeffect1 = "None" - var/aeffect2 = "None" - var/list/origin_bonuses - var/list/trigger_bonuses - var/list/function_bonuses - var/list/range_bonuses - var/cur_id = "" - var/scan_num = 0 - var/obj/machinery/artifact/cur_artifact = null - var/obj/machinery/analyser_pad/owned_pad = null - var/list/allorigins = list("Ancient Robots","Martian","Wizard Federation","Extradimensional","Precursor") - var/list/alltriggers = list("Contact with Living Organism","Heavy Impact","Contact with Energy Source","Contact with Hydrogen","Contact with Corrosive Substance","Contact with Volatile Substance","Contact with Toxins","Exposure to Heat") - var/list/alleffects = list("Healing Device","Anti-biological Weapon","Non-lethal Stunning Trap","Mechanoid Repair Module","Mechanoid Deconstruction Device","Power Generator","Power Drain","Stellar Mineral Attractor","Agriculture Regulator","Shield Generator","Space-Time Displacer") - var/list/allranges = list("Constant Short-Range Energy Field","Medium Range Energy Pulses","Long Range Energy Pulses","Extreme Range Energy Pulses","Requires contact with subject") - -/obj/machinery/artifact_analyser/New() - ..() - origin_bonuses = new/list() - origin_bonuses["ancient"] = 0 - origin_bonuses["martian"] = 0 - origin_bonuses["wizard"] = 0 - origin_bonuses["eldritch"] = 0 - origin_bonuses["precursor"] = 0 - trigger_bonuses = new/list() - trigger_bonuses["ancient"] = 0 - trigger_bonuses["martian"] = 0 - trigger_bonuses["wizard"] = 0 - trigger_bonuses["eldritch"] = 0 - trigger_bonuses["precursor"] = 0 - function_bonuses = new/list() - function_bonuses["ancient"] = 0 - function_bonuses["martian"] = 0 - function_bonuses["wizard"] = 0 - function_bonuses["eldritch"] = 0 - function_bonuses["precursor"] = 0 - range_bonuses = new/list() - range_bonuses["ancient"] = 0 - range_bonuses["martian"] = 0 - range_bonuses["wizard"] = 0 - range_bonuses["eldritch"] = 0 - range_bonuses["precursor"] = 0 - // - spawn(10) - owned_pad = locate() in orange(1, src) - -/obj/machinery/artifact_analyser/attack_hand(var/mob/user as mob) - if(stat & (NOPOWER|BROKEN)) - return - user.machine = src - var/dat = "Artifact Analyser
" - dat += "

" - if(!owned_pad) - dat += "Unable to locate analysis pad.
" - dat += "

" - else if (!src.working) - dat += "Artifact ID: [cur_id]
" - dat += "Artifact Origin: [aorigin] ([accuO]%)
" - dat += "Activation Trigger: [atrigger] ([accuT]%)
" - dat += "Artifact Function: [aeffect1] ([accuE1]%)
" - dat += "Artifact Range: [aeffect2] ([accuE2]%)

" - dat += "

" - dat += "Artifact ID is determined from unique energy emission signatures.
" - dat += "Analyse Artifact (Scan number #[scan_num+1])
" - dat += "Upload/update artifact scan
" - dat += "Print Page
" - else - dat += "Please wait. Analysis in progress.
" - dat += "

" - // - dat += "Close
" - user << browse(dat, "window=artanalyser;size=450x500") - onclose(user, "artanalyser") - -/obj/machinery/artifact_analyser/process() - if(stat & (NOPOWER|BROKEN)) - return - use_power(350) - // - if(!owned_pad) - for(var/obj/machinery/analyser_pad/pad in range(1)) - owned_pad = pad - break - -/obj/machinery/artifact_analyser/proc/AA_FailedAnalysis(var/failtype) - switch(failtype) - if(1) - src.aorigin = "Failed to Identify" - if (prob(20)) src.aorigin = pick(src.allorigins) - if(2) - src.atrigger = "Failed to Identify" - if (prob(20)) src.atrigger = pick(src.alltriggers) - if(3) - src.aeffect1 = "Failed to Identify" - if (prob(20)) src.aeffect1 = pick(src.alleffects) - if(4) - src.aeffect2 = "Failed to Identify" - if (prob(20)) src.aeffect2 = pick(src.allranges) - -/obj/machinery/artifact_analyser/proc/AA_Analyse() - if(!cur_artifact) - return - src.accuO = 5 + rand(0,10) + origin_bonuses[cur_artifact.origin] + cur_artifact.activated * 50 - src.accuT = 5 + rand(0,10) + trigger_bonuses[cur_artifact.origin] + cur_artifact.activated * 50 - src.accuE1 = 5 + rand(0,10) + function_bonuses[cur_artifact.origin] + cur_artifact.activated * 50 - src.accuE2 = 5 + rand(0,10) + range_bonuses[cur_artifact.origin] + cur_artifact.activated * 50 - - //keep any correctly determined properties the same - var/origin_correct = 0 - var/trigger_correct = 0 - var/function_correct = 0 - var/range_correct = 0 - if(cur_id == cur_artifact.display_id) - if(src.aorigin == cur_artifact.origin) - origin_correct = 1 - - if(src.atrigger == cur_artifact.my_effect.trigger) - trigger_correct = 1 - else if(src.atrigger == cur_artifact.my_effect.triggerX) - trigger_correct = 1 - - if(src.aeffect1 == cur_artifact.my_effect.effecttype) - function_correct = 1 - - if(src.aeffect2 == cur_artifact.my_effect.effectmode) - range_correct = 1 - - if (src.accuO > 100) src.accuO = 100 - if (src.accuT > 100) src.accuT = 100 - if (src.accuE1 > 100) src.accuE1 = 100 - if (src.accuE2 > 100) src.accuE2 = 100 - // Roll to generate report - if (prob(accuO) || origin_correct) - switch(cur_artifact.origin) - if("ancient") src.aorigin = "Ancient Robots" - if("martian") src.aorigin = "Martian" - if("wizard") src.aorigin = "Wizard Federation" - if("eldritch") src.aorigin = "Extradimensional" - if("precursor") src.aorigin = "Precursor" - else src.aorigin = "Unknown Origin" - origin_bonuses[cur_artifact.origin] += 10 - else - AA_FailedAnalysis(1) - origin_bonuses[cur_artifact.origin] += 5 - if (prob(accuT) || trigger_correct) - switch(cur_artifact.my_effect.trigger) - if("touch") src.atrigger = "Contact with Living Organism" - if("force") src.atrigger = "Heavy Impact" - if("energy") src.atrigger = "Contact with Energy Source" - if("chemical") - switch(cur_artifact.my_effect.triggerX) - if("hydrogen") src.atrigger = "Contact with Hydrogen" - if("corrosive") src.atrigger = "Contact with Corrosive Substance" - if("volatile") src.atrigger = "Contact with Volatile Substance" - if("toxin") src.atrigger = "Contact with Toxins" - if("heat") src.atrigger = "Exposure to Heat" - else src.atrigger = "Unknown Trigger" - trigger_bonuses[cur_artifact.origin] += 5 - else - AA_FailedAnalysis(2) - trigger_bonuses[cur_artifact.origin] += 1 - if (prob(accuE1) || function_correct) - switch(cur_artifact.my_effect.effecttype) - if("healing") src.aeffect1 = "Healing Device" - if("injure") src.aeffect1 = "Anti-biological Weapon" - // if("stun") src.aeffect1 = "Non-lethal Stunning Trap" - if("roboheal") src.aeffect1 = "Mechanoid Repair Module" - if("robohurt") src.aeffect1 = "Mechanoid Deconstruction Device" - if("cellcharge") src.aeffect1 = "Power Generator" - if("celldrain") src.aeffect1 = "Power Drain" - if("planthelper") src.aeffect1 = "Agriculture Regulator" - if("forcefield") src.aeffect1 = "Shield Generator" - if("teleport") src.aeffect1 = "Space-Time Displacer" - else src.aeffect1 = "Unknown Effect" - function_bonuses[cur_artifact.origin] += 5 - else - AA_FailedAnalysis(3) - function_bonuses[cur_artifact.origin] += 1 - if (prob(accuE2) || range_correct) - switch(cur_artifact.my_effect.effectmode) - if("aura") src.aeffect2 = "Constant Short-Range Energy Field" - if("pulse") - if(cur_artifact.my_effect.aurarange > 7) src.aeffect2 = "Long Range Energy Pulses" - else src.aeffect2 = "Medium Range Energy Pulses" - if("worldpulse") src.aeffect2 = "Extreme Range Energy Pulses" - if("contact") src.aeffect2 = "Requires contact with subject" - else src.aeffect2 = "Unknown Range" - range_bonuses[cur_artifact.origin] += 5 - else - AA_FailedAnalysis(4) - range_bonuses[cur_artifact.origin] += 1 - - cur_artifact.name = "alien artifact ([cur_artifact.display_id])" - cur_artifact.desc = "A large alien device. It has a small tag near the bottom that reads \"[cur_artifact.display_id]\"." - cur_id = cur_artifact.display_id - cur_artifact.my_effect.artifact_id = cur_artifact.display_id - -/obj/machinery/artifact_analyser/Topic(href, href_list) - - if(href_list["analyse"]) - if(owned_pad) - var/turf/pad_turf = get_turf(owned_pad) - var/findarti = 0 - for(var/obj/machinery/artifact/A in pad_turf.contents) - findarti++ - cur_artifact = A - if (findarti == 1) - if(cur_artifact && cur_artifact.being_used) - var/message = "[src] states, \"Cannot analyse. Excess energy drain is disrupting signal.\"" - src.visible_message(message, message) - else - cur_artifact.anchored = 1 - cur_artifact.being_used = 1 - src.working = 1 - src.icon_state = "analyser_processing" - var/time = rand(30,50) + max(0, 300 - scan_num * 10) - /*for(var/i = artifact_research.starting_tier, i <= artifact_research.max_tiers, i++) - for(var/datum/artiresearch/R in artifact_research.researched_items[i]) - if (R.bonustype == "analyser") time -= R.bonusTime*/ - time *= 10 - var/message = "[src] states, \"Commencing analysis.\"" - src.visible_message(message, message) - use_power(500) - spawn(time) - src.working = 0 - icon_state = "analyser" - cur_artifact.anchored = 0 - cur_artifact.being_used = 0 - if(cur_artifact.loc == pad_turf) - AA_Analyse() - scan_num++ - message = "[src] states, \"Analysis complete.\"" - src.visible_message(message, message) - use_power(500) - else if (findarti > 1) - var/message = "[src] states, \"Cannot analyse. Error isolating energy signature.\"" - src.visible_message(message, message) - else - var/message = "[src] states, \"Cannot analyse. No noteworthy energy signature isolated.\"" - src.visible_message(message, message) - - if(href_list["upload"] && cur_id != "") - //add new datum to every DB in the world - for(var/obj/machinery/computer/artifact_database/DB in world) - var/update = 0 - for(var/datum/catalogued_artifact/CA in DB.catalogued_artifacts) - if(CA.display_id == cur_id) - //already there, so update it - update = 1 - CA.origin = aorigin + " ([accuO]%)" - CA.trigger = atrigger + " ([accuT]%)" - CA.effecttype = aeffect1 + " ([accuE1]%)" - CA.effectmode = aeffect2 + " ([accuE2]%)" - if(!update) - //not there, so add it - var/datum/catalogued_artifact/CA = new() - CA.display_id = cur_id - CA.origin = aorigin + " ([accuO]%)" - CA.trigger = atrigger + " ([accuT]%)" - CA.effecttype = aeffect1 + " ([accuE1]%)" - CA.effectmode = aeffect2 + " ([accuE2]%)" - DB.catalogued_artifacts.Add(CA) - use_power(100) - - if(href_list["print"]) - var/r = "Artifact Analysis Report (Scan #[scan_num])
" - r += "Artifact ID: [cur_id] (determined from unique energy emission signatures)
" - r += "Artifact Origin: [aorigin] ([accuO]%)
" - r += "Activation Trigger: [atrigger] ([accuT]%)
" - r += "Artifact Function: [aeffect1] ([accuE1]%)
" - r += "Artifact Range: [aeffect2] ([accuE2]%)

" - var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src.loc) - P.name = "Artifact Analysis Report #[scan_num]" - P.info = r - for(var/mob/O in hearers(src, null)) - O.show_message("\icon[src] \blue The [src.name] prints a sheet of paper", 3) - use_power(10) - - if(href_list["close"]) - usr << browse(null, "window=artanalyser") - usr.machine = null - - src.updateDialog() - -//stick artifacts onto this then switch the analyser on -/obj/machinery/analyser_pad - name = "artifact analysis pad" - desc = "Studies the structure of artifacts to discover their uses." - icon = 'icons/obj/stationobjs.dmi' - icon_state = "tele0" - anchored = 1 - density = 0 - -/obj/machinery/analyser_pad/New() - ..() - /*spawn(10) - for(var/obj/machinery/artifact_analyser/analyser in orange(1)) - world << "pad found analyser" - if(!analyser.owned_pad) - analyser.owned_pad = src - world << "pad set analyser to self" - break*/ diff --git a/code/modules/research/xenoarchaeology/machinery/artifact_db_old.dm b/code/modules/research/xenoarchaeology/machinery/artifact_db_old.dm deleted file mode 100644 index c6e0d1fb3fa..00000000000 --- a/code/modules/research/xenoarchaeology/machinery/artifact_db_old.dm +++ /dev/null @@ -1,58 +0,0 @@ - -/datum/catalogued_artifact - var/trigger = "touch" // What activates it? - var/effecttype = "healing" // What does it do? - var/effectmode = "aura" // How does it carry out the effect? - var/display_id = "" // Artifact ID to display once successfully scanned - var/origin = "" - -/obj/machinery/computer/artifact_database - name = "Artifact Database" - icon_state = "rdcomp" - var/list/catalogued_artifacts - -/obj/machinery/computer/artifact_database/New() - ..() - catalogued_artifacts = new/list - -/obj/machinery/computer/artifact_database/Topic(href, href_list) - ..() - if( href_list["close"] ) - usr << browse(null, "window=artifact_db") - usr.machine = null - updateDialog() - -/obj/machinery/computer/artifact_database/process() - ..() - updateDialog() - -/obj/machinery/computer/artifact_database/interact(mob/user) - if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) ) - if (!istype(user, /mob/living/silicon)) - user.machine = null - user << browse(null, "window=artifact_db") - return - var/t = "Artifact Database
" - t += "
" - for(var/datum/catalogued_artifact/CA in catalogued_artifacts) - t += "Artifact ID: [CA.display_id] (determined from unique energy emission signatures)
" - t += "Artifact Origin: [CA.origin]
" - t += "Activation Trigger: [CA.trigger]
" - t += "Artifact Function: [CA.effecttype]
" - t += "Artifact Range: [CA.effectmode]

" - t += "
" - t += "
Refresh Close
" - user << browse(t, "window=artifact_db;size=500x800") - user.machine = src - -/* -/datum/artifact_effect - var/origin = null // Used in the randomisation/research of the artifact. - var/trigger = "touch" // What activates it? - var/triggerX = "none" // Used for more varied triggers - var/effecttype = "healing" // What does it do? - var/effectmode = "aura" // How does it carry out the effect? - var/aurarange = 4 // How far the artifact will extend an aura effect. - var/display_id = "" // Artifact ID to display once successfully scanned - var/list/created_field -*/ \ No newline at end of file diff --git a/code/modules/research/xenoarchaeology/machinery/coolant.dm b/code/modules/research/xenoarchaeology/machinery/coolant.dm new file mode 100644 index 00000000000..bc03553bee0 --- /dev/null +++ b/code/modules/research/xenoarchaeology/machinery/coolant.dm @@ -0,0 +1,59 @@ + +datum/reagent/coolant + name = "Coolant" + id = "coolant" + description = "Industrial cooling substance." + reagent_state = LIQUID + color = "#C8A5DC" // rgb: 200, 165, 220 + +datum/chemical_reaction/coolant + name = "Coolant" + id = "coolant" + result = "coolant" + required_reagents = list("tungsten" = 1, "oxygen" = 1, "water" = 1) + result_amount = 3 + + + +/obj/structure/reagent_dispensers/coolanttank + name = "coolant tank" + desc = "A tank of industrial coolant" + icon = 'icons/obj/objects.dmi' + icon_state = "coolanttank" + amount_per_transfer_from_this = 10 + New() + ..() + reagents.add_reagent("coolant",1000) + +/obj/structure/reagent_dispensers/coolanttank/bullet_act(var/obj/item/projectile/Proj) + if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet)) + if(!istype(Proj ,/obj/item/projectile/beam/lastertag) && !istype(Proj ,/obj/item/projectile/beam/practice) ) + explode() + +/obj/structure/reagent_dispensers/coolanttank/blob_act() + explode() + +/obj/structure/reagent_dispensers/coolanttank/ex_act() + explode() + +/obj/structure/reagent_dispensers/coolanttank/proc/explode() + var/datum/effect/effect/system/harmless_smoke_spread/S = new /datum/effect/effect/system/harmless_smoke_spread + //S.attach(src) + S.set_up(5, 0, src.loc) + + playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) + spawn(0) + S.start() + + var/datum/gas_mixture/env = src.loc.return_air() + if(env) + if (reagents.total_volume > 750) + env.temperature = 0 + else if (reagents.total_volume > 500) + env.temperature -= 100 + else + env.temperature -= 50 + + sleep(10) + if(src) + del(src) diff --git a/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm b/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm new file mode 100644 index 00000000000..6dcd45c8255 --- /dev/null +++ b/code/modules/research/xenoarchaeology/machinery/geosample_scanner.dm @@ -0,0 +1,363 @@ + +/obj/machinery/radiocarbon_spectrometer + name = "Radiocarbon spectrometer" + desc = "A specialised, complex scanner for gleaning information on all manner of small things." + anchored = 1 + density = 1 + icon = 'icons/obj/virology.dmi' + icon_state = "analyser" + + use_power = 1 //1 = idle, 2 = active + idle_power_usage = 20 + active_power_usage = 300 + + //var/obj/item/weapon/reagent_containers/glass/coolant_container + var/scanning = 0 + var/report_num = 0 + // + var/obj/item/scanned_item + var/last_scan_data = "No scans on record." + // + var/last_process_worldtime = 0 + // + var/scanner_progress = 0 + var/scanner_rate = 1.25 //80 seconds per scan + var/scanner_rpm = 0 + var/scanner_rpm_dir = 1 + var/scanner_temperature = 0 + var/scanner_seal_integrity = 100 + // + var/coolant_usage_rate = 0 //measured in u/microsec + var/fresh_coolant = 0 + var/coolant_purity = 0 + var/datum/reagents/coolant_reagents + var/used_coolant = 0 + var/list/coolant_reagents_purity = list() + // + var/maser_wavelength = 0 + var/optimal_wavelength = 0 + var/optimal_wavelength_target = 0 + var/tleft_retarget_optimal_wavelength = 0 + var/maser_efficiency = 0 + // + var/radiation = 0 //0-100 mSv + var/t_left_radspike = 0 + var/rad_shield = 0 + +/obj/machinery/radiocarbon_spectrometer/New() + ..() + create_reagents(500) + coolant_reagents_purity["water"] = 0.5 + coolant_reagents_purity["icecoffee"] = 0.6 + coolant_reagents_purity["icetea"] = 0.6 + coolant_reagents_purity["milkshake"] = 0.6 + coolant_reagents_purity["leporazine"] = 0.7 + coolant_reagents_purity["kelotane"] = 0.7 + coolant_reagents_purity["sterilizine"] = 0.7 + coolant_reagents_purity["dermaline"] = 0.7 + coolant_reagents_purity["hyperzine"] = 0.8 + coolant_reagents_purity["cryoxadone"] = 0.9 + coolant_reagents_purity["coolant"] = 1 + coolant_reagents_purity["adminordrazine"] = 2 + +/obj/machinery/radiocarbon_spectrometer/attack_hand(var/mob/user as mob) + ui_interact(user) + +/obj/machinery/radiocarbon_spectrometer/attackby(var/obj/I as obj, var/mob/user as mob) + if(scanning) + user << "You can't do that while [src] is scanning!" + else + if(istype(I, /obj/item/stack/nanopaste)) + var/choice = alert("What do you want to do with the nanopaste?","Radiometric Scanner","Scan nanopaste","Fix seal integrity") + if(choice == "Fix seal integrity") + var/obj/item/stack/nanopaste/N = I + var/amount_used = min(N.amount, 10 - scanner_seal_integrity / 10) + N.use(amount_used) + scanner_seal_integrity = round(scanner_seal_integrity + amount_used * 10) + return + if(istype(I, /obj/item/weapon/reagent_containers/glass)) + var/choice = alert("What do you want to do with the container?","Radiometric Scanner","Add coolant","Empty coolant","Scan container") + if(choice == "Add coolant") + var/obj/item/weapon/reagent_containers/glass/G = I + var/amount_transferred = min(src.reagents.maximum_volume - src.reagents.total_volume, G.reagents.total_volume) + G.reagents.trans_to(src, amount_transferred) + user << "You empty [amount_transferred]u of coolant into [src]." + update_coolant() + return + else if(choice == "Empty coolant") + var/obj/item/weapon/reagent_containers/glass/G = I + var/amount_transferred = min(G.reagents.maximum_volume - G.reagents.total_volume, src.reagents.total_volume) + src.reagents.trans_to(G, amount_transferred) + user << "You remove [amount_transferred]u of coolant from [src]." + update_coolant() + return + user.drop_item() + I.loc = src + scanned_item = I + +/obj/machinery/radiocarbon_spectrometer/proc/update_coolant() + var/total_purity = 0 + fresh_coolant = 0 + coolant_purity = 0 + var/num_reagent_types = 0 + for (var/datum/reagent/current_reagent in src.reagents.reagent_list) + if (!current_reagent) + continue + var/cur_purity = coolant_reagents_purity[current_reagent.id] + if(!cur_purity) + cur_purity = 0.1 + else if(cur_purity > 1) + cur_purity = 1 + total_purity += cur_purity * current_reagent.volume + fresh_coolant += current_reagent.volume + num_reagent_types += 1 + if(total_purity && fresh_coolant) + coolant_purity = total_purity / fresh_coolant + +/obj/machinery/radiocarbon_spectrometer/ui_interact(mob/user, ui_key = "radio_spectro") + + if(user.stat) + return + + // this is the data which will be sent to the ui + var/data[0] + data["scanned_item"] = (scanned_item ? scanned_item.name : "") + data["scanned_item_desc"] = (scanned_item ? (scanned_item.desc ? scanned_item.desc : "No information on record.") : "") + data["last_scan_data"] = last_scan_data + // + data["scan_progress"] = round(scanner_progress) + data["scanning"] = scanning + // + data["scanner_seal_integrity"] = round(scanner_seal_integrity) + data["scanner_rpm"] = round(scanner_rpm) + data["scanner_temperature"] = round(scanner_temperature) + // + data["coolant_usage_rate"] = "[coolant_usage_rate]" + data["unused_coolant_abs"] = round(fresh_coolant) + data["unused_coolant_per"] = round(fresh_coolant / reagents.maximum_volume * 100) + data["coolant_purity"] = "[coolant_purity * 100]" + // + data["optimal_wavelength"] = round(optimal_wavelength) + data["maser_wavelength"] = round(maser_wavelength) + data["maser_efficiency"] = round(maser_efficiency * 100) + // + data["radiation"] = round(radiation) + data["t_left_radspike"] = round(t_left_radspike) + data["rad_shield_on"] = rad_shield + + var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, ui_key) + if (!ui) + // the ui does not exist, so we'll create a new one + ui = new(user, src, ui_key, "geoscanner.tmpl", "High Res Radiocarbon Spectrometer", 900, 825) + // When the UI is first opened this is the data it will use + ui.set_initial_data(data) + ui.open() + // Auto update every Master Controller tick + ui.set_auto_update(1) + else + // The UI is already open so push the new data to it + ui.push_data(data) + return + +/obj/machinery/radiocarbon_spectrometer/process() + if(scanning) + if(!scanned_item || scanned_item.loc != src) + scanned_item = null + stop_scanning() + else if(scanner_progress >= 100) + complete_scan() + else + //calculate time difference + var/deltaT = (world.time - last_process_worldtime) * 0.1 + + //modify the RPM over time + //i want 1u to last for 10 sec at 500 RPM, scaling linearly + scanner_rpm += scanner_rpm_dir * 50 * deltaT + if(scanner_rpm > 1000) + scanner_rpm = 1000 + scanner_rpm_dir = -1 * pick(0.5, 2.5, 5.5) + else if(scanner_rpm < 1) + scanner_rpm = 1 + scanner_rpm_dir = 1 * pick(0.5, 2.5, 5.5) + + //heat up according to RPM + //each unit of coolant + scanner_temperature += scanner_rpm * deltaT * 0.05 + + //radiation + t_left_radspike -= deltaT + if(t_left_radspike > 0) + //ordinary radiation + radiation = rand() * 15 + else + //radspike + if(t_left_radspike > -5) + radiation = rand() * 15 + 85 + if(!rad_shield) + //irradiate nearby mobs + for(var/mob/living/M in view(7,src)) + M.apply_effect(radiation / 25, IRRADIATE, 0) + else + t_left_radspike = pick(10,15,25) + + //use some coolant to cool down + if(coolant_usage_rate > 0) + var/coolant_used = min(fresh_coolant, coolant_usage_rate * deltaT) + if(coolant_used > 0) + fresh_coolant -= coolant_used + used_coolant += coolant_used + scanner_temperature = max(scanner_temperature - coolant_used * coolant_purity * 20, 0) + + //modify the optimal wavelength + tleft_retarget_optimal_wavelength -= deltaT + if(tleft_retarget_optimal_wavelength <= 0) + tleft_retarget_optimal_wavelength = pick(4,8,15) + optimal_wavelength_target = rand() * 9900 + 100 + // + if(optimal_wavelength < optimal_wavelength_target) + optimal_wavelength = min(optimal_wavelength + 700 * deltaT, optimal_wavelength_target) + else if(optimal_wavelength > optimal_wavelength_target) + optimal_wavelength = max(optimal_wavelength - 700 * deltaT, optimal_wavelength_target) + // + maser_efficiency = 1 - max(min(10000, abs(optimal_wavelength - maser_wavelength) * 3), 1) / 10000 + + //make some scan progress + if(!rad_shield) + scanner_progress = min(100, scanner_progress + scanner_rate * maser_efficiency * deltaT) + + //degrade the seal over time according to temperature + //i want temperature of 50K to degrade at 1%/sec + scanner_seal_integrity -= (max(scanner_temperature, 1) / 1000) * deltaT + + //emergency stop if seal integrity reaches 0 + if(scanner_seal_integrity <= 0 || (scanner_temperature >= 1273 && !rad_shield)) + stop_scanning() + src.visible_message("\blue \icon[src] buzzes unhappily. It has failed mid-scan!", 2) + + if(prob(5)) + src.visible_message("\blue \icon[src] [pick("whirrs","chuffs","clicks")][pick(" excitedly"," energetically"," busily")].", 2) + else + //gradually cool down over time + if(scanner_temperature > 0) + scanner_temperature = max(scanner_temperature - 5 - 10 * rand(), 0) + if(prob(0.75)) + src.visible_message("\blue \icon[src] [pick("plinks","hisses")][pick(" quietly"," softly"," sadly"," plaintively")].", 2) + last_process_worldtime = world.time + +/obj/machinery/radiocarbon_spectrometer/proc/stop_scanning() + scanning = 0 + scanner_rpm_dir = 1 + scanner_rpm = 0 + optimal_wavelength = 0 + maser_efficiency = 0 + maser_wavelength = 0 + coolant_usage_rate = 0 + radiation = 0 + t_left_radspike = 0 + if(used_coolant) + src.reagents.remove_any(used_coolant) + used_coolant = 0 + +/obj/machinery/radiocarbon_spectrometer/proc/complete_scan() + src.visible_message("\blue \icon[src] makes an insistent chime.", 2) + + if(scanned_item) + //create report + var/obj/item/weapon/paper/P = new(src) + P.name = "[src] report #[++report_num]: [scanned_item.name]" + P.stamped = list(/obj/item/weapon/stamp) + P.overlays = list("paper_stamped") + + //work out data + var/data = " - Mundane object: [scanned_item.desc ? scanned_item.desc : "No information on record."]
" + var/datum/geosample/G + switch(scanned_item.type) + if(/obj/item/weapon/ore) + var/obj/item/weapon/ore/O = scanned_item + if(O.geological_data) + G = O.geological_data + + if(/obj/item/weapon/rocksliver) + var/obj/item/weapon/rocksliver/O = scanned_item + if(O.geological_data) + G = O.geological_data + + if(/obj/item/weapon/archaeological_find) + data = " - Mundane object (archaic xenos origins)
" + + var/obj/item/weapon/archaeological_find/A = scanned_item + if(A.speaking_to_players) + data = " - Exhibits properties consistent with sonic reproduction.
" + if(A.listening_to_players) + data = " - Exhibits properties similar to audio capture technology.
" + + var/anom_found = 0 + if(G) + data = " - Spectometric analysis on mineral sample has determined type [finds_as_strings[responsive_carriers.Find(G.source_mineral)]]
" + if(G.age_billion > 0) + data += " - Radiometric dating shows age of [G.age_billion].[G.age_million] billion years
" + else if(G.age_million > 0) + data += " - Radiometric dating shows age of [G.age_million].[G.age_thousand] million years
" + else + data += " - Radiometric dating shows age of [G.age_thousand * 1000 + G.age] years
" + data += " - Chromatographic analysis shows the following materials present:
" + for(var/carrier in G.find_presence) + if(G.find_presence[carrier]) + var/index = responsive_carriers.Find(carrier) + if(index > 0 && index <= finds_as_strings.len) + data += " > [100 * G.find_presence[carrier]]% [finds_as_strings[index]]
" + + if(G.artifact_id && G.artifact_distance >= 0) + anom_found = 1 + data += " - Hyperspectral imaging reveals exotic energy wavelength detected with ID: [G.artifact_id]
" + data += " - Fourier transform analysis on anomalous energy absorption indicates energy source located inside emission radius of [G.artifact_distance]m
" + + if(!anom_found) + data += " - No anomalous data
" + + P.info = "[src] analysis report #[report_num]
" + P.info += "Scanned item: [scanned_item.name]

" + data + last_scan_data = P.info + P.loc = src.loc + + scanned_item.loc = src.loc + scanned_item = null + +/obj/machinery/radiocarbon_spectrometer/Topic(href, href_list) + if(stat & (NOPOWER|BROKEN)) + return 0 // don't update UIs attached to this object + + if(href_list["scanItem"]) + if(scanning) + stop_scanning() + else + if(scanned_item) + if(scanner_seal_integrity > 0) + scanner_progress = 0 + scanning = 1 + t_left_radspike = pick(5,10,15) + usr << "Scan initiated." + else + usr << "Could not initiate scan, seal requires replacing." + else + usr << "Insert an item to scan." + + if(href_list["maserWavelength"]) + maser_wavelength = max(min(maser_wavelength + 1000 * text2num(href_list["maserWavelength"]), 10000), 1) + + if(href_list["coolantRate"]) + coolant_usage_rate = max(min(coolant_usage_rate + text2num(href_list["coolantRate"]), 10000), 0) + + if(href_list["toggle_rad_shield"]) + if(rad_shield) + rad_shield = 0 + else + rad_shield = 1 + + if(href_list["ejectItem"]) + if(scanned_item) + scanned_item.loc = src.loc + scanned_item = null + + add_fingerprint(usr) + return 1 // update UIs attached to this object diff --git a/code/modules/research/xenoarchaeology/manuals.dm b/code/modules/research/xenoarchaeology/manuals.dm index ceaa3d036ea..99be3a6849c 100644 --- a/code/modules/research/xenoarchaeology/manuals.dm +++ b/code/modules/research/xenoarchaeology/manuals.dm @@ -49,6 +49,8 @@
  • Core sampler - use this to take core samples from rock faces, which you can then run to the lab for analysis.
  • Depth scanner - uses x-ray diffraction to locate anomalous densities in rock, indicating archaeological deposits or mineral veins. Comes with a handy reference log containing co-ordinates and time of each scan.
  • +
  • Alden-Saraspova counter - uses a patented application of Fourier Transform analysis to determine the difference between background and + exotic radiation. Use it to determine how far you are from anomalous energy sources.
  • Radio beacon locater - leave a beacon at an item of interest, then track it down later with this handy gadget. Watch for interference from other devices though.
  • Flashlight or portable light source - Self explanatory, I hope.
  • @@ -129,51 +131,50 @@

    Contents

    1. A note on terms
    2. -
    3. Isotope ratio spectrometer
    4. -
    5. Accelerator spectrometer
    6. -
    7. Gas chromatography spectrometer
    8. -
    9. Ion mobility spectrometer
    10. +
    11. Analysis progression
    12. +
    13. Heat management
    14. +
    15. Ambient radiation

    A note on terms

    -
  • Dissonance ratio - This is a pseudoarbitrary value indicating the overal presence of a particular element in a greater composite. - It takes into account volume, density, molecular excitation and isotope spread.
  • Mass spectrometry - MS is the procedure used used to measure and quantify the components of matter. The most prized tool in the field of 'Materials analysis'
  • Radiometric dating - MS applied using the right carrier reagents can be used to accurately determine the age of a sample.
  • -
  • Sample specifity - A pseudoarbitrary value used to indicate how well a sample resonates with the employed carrier reagent. Great specifity - (material resonance) indicates that there is much of the carrier reagent present in the sample.
  • +
  • Dissonance ratio - This is a pseudoarbitrary value indicating the overal presence of a particular element in a greater composite. + It takes into account volume, density, molecular excitation and isotope spread.
  • +
  • Vacuum seal integrity - A reference to how close an airtight seal is to failure.

  • Contents -

    Isotope ratio spectrometer

    - Isotope ratio mass spectrometers work by coating a small surface with a semiliquid stationary phase consisting of the sample to be - analysed, and recording it's interactions with a gaseous mobile phase comprised of an inert or nonreactive gas such as helium or nitrogen.
    +

    Analysis progression

    + Modern mass spectrometry requires constant attention from the diligant researcher in order to be successul. There are many different elements to juggle, + and later chapters will delve into them. For the spectrometry assistant, the first thing you need to know is that the scanner wavelength is automatically + calculated for you. Just tweak the settings and try to match it with the actual wavelength as closely as possible.

    - IRMS are employed as radiometric daters, extremely accurate but only so up to ages of one billion years.
    Contents -

    Accelerator spectrometer

    - The accelerator mass spectrometer works by accelerating ions to extraordinarily high kinetic energies before mass analysis. The special strength of AMS is - isolate rare or low-strength isotopes, making it able to determine much greater ages with reasonable accuracy.
    +

    Seal integrity

    + In order to maintain sterile and environmentally static procedures, a special chamber is setup inside the spectrometer. It's protected by a proprietary vacuum seal + produced by top tier industrial science. It will only last for a certain number of scans before failing outright, but it can be resealed through use of nanite paste. + Unfortunately, it's susceptible to malforming under heat stress so exposing it to higher temperatures will cause it's operation life to drop significantly.

    - AMS are employed as extreme age radiometric daters, able to determine the age of the sample on a scale of billions of years. - They are commonly located in geology and archaeology laboratories.
    Contents -

    Gas chromatography spectrometer

    - Gas-liquid chromatography mass spectrometers work by coating a small surface with a semiliquid stationary phase consisting of the sample to be - analysed, and recording it's interactions with a gaseous mobile phase comprised of an inert or nonreactive gas such as helium or nitrogen.
    +

    Heat management

    + The scanner relies on a gyro-rotational system that varies in speed and intensity. Over the course of an ordinary scan, the RPMs can change dramatically. Higher RPMs + means greater heat generation, but is necessary for the ongoing continuation of the scan. To offset heat production, spectrometers have an inbuilt cooling system. + Researchers can modify the flow rate of coolant to aid in dropping temperature as necessary, but are advised that frequent coolant replacements may be necessary + depending on coolant purity. Water and substances such as cryoxadone are viable substitutes, but nowhere near as effective as pure coolant itself.

    - GLCS are employed in forensic and geological analysis to determine what elements are present in a sample.
    Contents -

    Ion mobility spectrometer

    - Ion mobility mass spectrometers work by examining the mobility of ionized molecules in an inert carrier gas
    +

    Ambient radiation

    + Researchers are warned that while operational, mass spectrometers emit period bursts of radiation and are thus advised to wear protective gear. In the event of + radiation spikes, there is also a special shield that can be lowered to block emissions. Lowering this, however, will have the effect of blocking the scanner + so use it sparingly.

    - IMS returns a dissonance ratio over the scanned sample and carrier reagent, indicating the average total presence of the sample.
    Contents @@ -197,67 +198,17 @@ -

    Contents

    -
      -
    1. Some useful phrases for you
    2. -
    3. Sample preparation and analysis
    4. -
    5. Fourier transform spectroscope
    6. -
    7. Hyperspectral Imager
    8. -
    - -
    -

    Some useful phrases for you

    - -
  • Spectroscopy - Spectroscopy is the study of the behaviour of light, commonly used in the 26th century for analysis of anomalous - behaviour of energy or light.
  • -
  • Sample specifity - A pseudoarbitrary value used to indicate how well a sample resonates with the employed carrier reagent. Great specifity - (material resonance) indicates that there is much of the carrier reagent present in the sample.
  • -
  • Anomalies - Inexplicable or uncategorised occurrences in the cosmos. A fascinating and dangerous study is made to determine the function of - these rare finds, and the term is often applied to describe technology left behind by vastly superior ancient alien forerunners.
  • -

    - Contents - -

    Sample preparation and analysis

    - When you are readying your spectrometry lab for analysis, you'll need to make sure the sample is in a form the machines can glean data from. - -
  • Obtain material sample - This should be an ordinary chunk of matter the size of your finger, a good example is a 6mm rock core.
  • -
  • Run density separation treatment - Perform the DST procedure on your sample, following generic specifications.
  • -
  • Ensure sample purity - DST can sometimes leave behind chemical waste or chunks of matter, make sure there aren't any before proceeding.
  • -
  • Prepare analysis tray - A sample tray holds a miniscule amount of liquid (2u), but that's all that our spectrometers require for a good reading.
  • -
  • Choose carrier reagent - Standard spectrometers require 1u of the material sample, and 1u of a 'carrier' reagent to provide control comparison - and to enable refraction inferencing.
  • -
  • Insert sample tray into machine - And press the 'Go' button. Now go make a cup of coffee.
  • -
  • Monitor machine heat levels - The upper end mass spectrometers have quite complex internals, and have a tendency to critically overheat. - Make sure the heat limit isn't exceeded, or there may be potentially disastrous consequences.
  • -
  • Examine analysis report - it won't always make sense or provide the information you hoped for, but if you've been careful during DST and ensured - sample integrity, then there's always something to be learnt. Just don't lose the paperwork!
  • -

    - Contents - -

    Fourier transform spectroscope

    - The FTS measures temporal coherence of radiating energy, then applies time-and-space domain measurements on the collected emission data. The collective - procedure is known as the Fourier Transform Procedure, with the mathematical algorithms dating back to the 19th century on Earth.
    -
    - As well as providing background energy readings, an FTS calculates the approximate distance and direction towards any anomalous energy signatures from - the location the scanned sample was taken from.
    - Contents - -

    Hyperspectral Imager

    - The imager scans and collates spectral energy signatures from across the electromagnetic spectrum. The collected data is then presented to the viewer in - graph form, with any anomalous (uncatalogued or unidentified) energy signatures highlighted.
    -
    - As well as visualising background energy readings, a hyperspectral imager will isolate and identify any anomalous energy signatures in the sample.
    - Contents - - - + It's perhaps one of the most exciting times to be alive, with the recent breakthroughs in understanding and categorisation of things we may one day no longer call + 'anomalies,' but rather 'infrequent or rare occurrences of certain celestial weather or phenomena.' Perhaps a little more long winded, but no less eloquent all the + same! Why, look at the strides we're making in piercing the walls of bluespace or our steadily improving ability to clarify and stabilise subspace emissions; it's + certainly an exciting time to be alive. For the moment the Hydrolian hasn't seen two spatial anomalies alike but the day will come and it is soon, I can feel it. "} /obj/item/weapon/book/manual/materials_chemistry_analysis - name = "Chemical preparation for materials analysis" + name = "Materials analysis and the chemical implications" icon_state = "chemistry" author = "Jasper Pascal, Senior Lecturer in Materials Analysis at the University of Jol'Nar" - title = "Chemical preparation for materials analysis" + title = "Materials analysis and the chemical implications" dat = {"