diff --git a/code/WorkInProgress/Chemistry-Holder.dm b/code/WorkInProgress/Chemistry-Holder.dm index ce8385d9939..baf85d31d0f 100644 --- a/code/WorkInProgress/Chemistry-Holder.dm +++ b/code/WorkInProgress/Chemistry-Holder.dm @@ -165,6 +165,8 @@ datum var/total_matching_reagents = 0 var/total_required_catalysts = C.required_catalysts.len var/total_matching_catalysts= 0 + var/matching_container = 0 + var/matching_other = 0 var/list/multipliers = new/list() for(var/B in C.required_reagents) @@ -175,7 +177,27 @@ datum if(has_reagent(B, C.required_catalysts[B])) total_matching_catalysts++ - if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts) + if(!C.required_container) + matching_container = 1 + + else + if(my_atom.type == C.required_container) + matching_container = 1 + + if(!C.required_other) + matching_other = 1 + + else + if(istype(my_atom, /obj/item/metroid_core)) + var/obj/item/metroid_core/M = my_atom + + if(M.POWERFLAG == C.required_other) + matching_other = 1 + + + + + if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts && matching_container && matching_other) var/multiplier = min(multipliers) for(var/B in C.required_reagents) remove_reagent(B, (multiplier * C.required_reagents[B]), safety = 1) diff --git a/code/WorkInProgress/Chemistry-Reagents.dm b/code/WorkInProgress/Chemistry-Reagents.dm index 63a8dfacf7d..4a6e190de89 100644 --- a/code/WorkInProgress/Chemistry-Reagents.dm +++ b/code/WorkInProgress/Chemistry-Reagents.dm @@ -209,7 +209,7 @@ datum T.wet_overlay = null for(var/mob/living/carbon/metroid/M in T) - M.toxloss+=rand(10,50) + M.toxloss+=rand(5,10) var/hotspot = (locate(/obj/hotspot) in T) if(hotspot && !istype(T, /turf/space)) @@ -798,7 +798,7 @@ datum del(C) for(var/mob/living/carbon/metroid/M in T) - M.toxloss+=rand(10,50) + M.toxloss+=rand(5,10) reaction_mob(var/mob/M, var/method=TOUCH, var/volume) M.clean_blood() @@ -1423,7 +1423,7 @@ datum M.take_organ_damage(0, 1) if(istype(M, /mob/living/carbon/metroid)) - M:bodytemperature += rand(5,10) + M:bodytemperature += rand(5,20) ..() return @@ -1439,11 +1439,15 @@ datum if(prob(40)) M.take_organ_damage(0, 1) if(prob(80) && istype(M, /mob/living/carbon/metroid)) - M.fireloss += rand(15,30) + M.fireloss += rand(5,20) if(prob(5)) M << "\red You feel a terrible chill inside your body!" ..() return + reaction_turf(var/turf/simulated/T, var/volume) + for(var/mob/living/carbon/metroid/M in T) + M.toxloss+=rand(15,30) + sodiumchloride name = "Table Salt" id = "sodiumchloride" diff --git a/code/WorkInProgress/Chemistry-Recipes.dm b/code/WorkInProgress/Chemistry-Recipes.dm index c0f103f58b2..12190d8350b 100644 --- a/code/WorkInProgress/Chemistry-Recipes.dm +++ b/code/WorkInProgress/Chemistry-Recipes.dm @@ -503,7 +503,155 @@ datum /////////////////////////////////////METROID CORE REACTIONS /////////////////////////////// - // TODO + metroid_explosion + name = "Explosion" + id = "m_explosion" + result = null + required_reagents = list("blood" = 1) + result_amount = 2 + required_container = /obj/item/metroid_core + required_other = 2 + on_reaction(var/datum/reagents/holder, var/created_volume) + var/location = get_turf(holder.my_atom) + var/datum/effects/system/reagents_explosion/e = new() + e.set_up(round (created_volume/10, 1), location, 0, 0) + e.start() + + holder.clear_reagents() + return + metroidjam + name = "Metroid Jam" + id = "m_jam" + result = "metroid" + required_reagents = list("water" = 1) + result_amount = 1 + required_container = /obj/item/metroid_core + required_other = 2 + metroidsynthi + name = "Metroid Synthetic Flesh" + id = "m_flesh" + result = null + required_reagents = list("sugar" = 1) + result_amount = 1 + required_container = /obj/item/metroid_core + required_other = 2 + on_reaction(var/datum/reagents/holder, var/created_volume) + var/location = get_turf(holder.my_atom) + new /obj/item/weapon/syntiflesh(location) + return + + + + + metroidenzyme + name = "Metroid Enzyme" + id = "m_enzyme" + result = "enzyme" + required_reagents = list("blood" = 1, "water" = 1) + result_amount = 2 + required_container = /obj/item/metroid_core + required_other = 3 + metroidplasma + name = "Metroid Plasma" + id = "m_plasma" + result = "plasma" + required_reagents = list("sugar" = 1, "blood" = 2) + result_amount = 2 + required_container = /obj/item/metroid_core + required_other = 3 + metroidvirus + name = "Metroid Virus" + id = "m_virus" + result = null + required_reagents = list("sugar" = 1, "acid" = 1) + result_amount = 2 + required_container = /obj/item/metroid_core + required_other = 3 + on_reaction(var/datum/reagents/holder, var/created_volume) + holder.clear_reagents() + + var/virus = pick(/datum/disease/flu, /datum/disease/cold, \ + /datum/disease/pierrot_throat, /datum/disease/fake_gbs, \ + /datum/disease/brainrot, /datum/disease/wizarditis, \ + /datum/disease/magnitis) + + + var/datum/disease/F = new virus(0) + var/list/data = list("viruses"= list(F)) + holder.add_reagent("blood", 20, data) + + holder.add_reagent("cyanide", rand(1,10)) + + var/location = get_turf(holder.my_atom) + var/datum/effects/system/bad_smoke_spread/S = new /datum/effects/system/bad_smoke_spread + S.attach(location) + S.set_up(10, 0, location) + playsound(location, 'smoke.ogg', 50, 1, -3) + spawn(0) + S.start() + sleep(10) + S.start() + sleep(10) + S.start() + sleep(10) + S.start() + sleep(10) + S.start() + return + + + + metroidchloral + name = "Metroid Chloral" + id = "m_bunch" + result = "chloralhydrate" + required_reagents = list("blood" = 1, "water" = 2) + result_amount = 2 + required_container = /obj/item/metroid_core + required_other = 5 + metroidxeno + name = "Metroid Xeno" + id = "m_xeno" + result = "xenomicrobes" + required_reagents = list("sugar" = 1) + result_amount = 1 + required_container = /obj/item/metroid_core + required_other = 5 + metroidfoam + name = "Metroid Foam" + id = "m_foam" + result = null + required_reagents = list("acid" = 1) + result_amount = 2 + required_container = /obj/item/metroid_core + required_other = 5 + + on_reaction(var/datum/reagents/holder, var/created_volume) + + + var/location = get_turf(holder.my_atom) + for(var/mob/M in viewers(5, location)) + M << "\red The solution violently bubbles!" + + location = get_turf(holder.my_atom) + + for(var/mob/M in viewers(5, location)) + M << "\red The solution spews out foam!" + + //world << "Holder volume is [holder.total_volume]" + //for(var/datum/reagent/R in holder.reagent_list) + // world << "[R.name] = [R.volume]" + + var/datum/effects/system/foam_spread/s = new() + s.set_up(created_volume, location, holder, 0) + s.start() + holder.clear_reagents() + return + + + + + diff --git a/code/defines/obj.dm b/code/defines/obj.dm index b140a9c9f25..a0b792eb5d7 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -1096,7 +1096,7 @@ var/datum/reagents/R = new/datum/reagents(100) reagents = R R.my_atom = src - POWERFLAG = rand(-5,15) + POWERFLAG = rand(1,10) //flags |= NOREACT spawn() diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index a3176d8cd5c..81782d2b609 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -504,6 +504,14 @@ Neutralize All Unidentified Life Signs: []
"}, if(!emagged) use_power(200) else use_power(400) + else if(istype(E, /obj/item/weapon/gun/energy/freeze)) + A = new /obj/item/projectile/freeze( loc ) + var/obj/item/projectile/freeze/F = A + F.temperature = rand(0, 200) + icon_state = "target_prism" + if(!emagged) use_power(300) + else use_power(600) + else // Energy gun shots if(!emagged) // if it hasn't been emagged, it uses normal taser shots @@ -621,7 +629,7 @@ Neutralize All Unidentified Life Signs: []
"}, if(4) if(istype(W, /obj/item/device/prox_sensor)) build_step = 5 - user << "\blue You add prox sensor to the turret." + user << "\blue You add the prox sensor to the turret." del(W) return diff --git a/code/game/objects/items/weapons/guns_new.dm b/code/game/objects/items/weapons/guns_new.dm index a4ababd0c47..710378e2e02 100644 --- a/code/game/objects/items/weapons/guns_new.dm +++ b/code/game/objects/items/weapons/guns_new.dm @@ -62,6 +62,20 @@ var/const/PROJECTILE_DART = 8 damage_type = PROJECTILE_BOLT icon_state = "cbbolt" + freeze + name = "freeze beam" + icon_state = "ice_2" + var/temperature = 0 + + proc/Freeze(atom/A as mob|obj|turf|area) + if(istype(A, /mob)) + var/mob/M = A + if(M.bodytemperature > temperature) + M.bodytemperature = temperature + + + + Bump(atom/A as mob|obj|turf|area) if(A == firer) loc = A.loc @@ -86,10 +100,16 @@ var/const/PROJECTILE_DART = 8 M.attack_log += text("[] UNKOWN SUBJECT (No longer exists) shot []/[] with a []", world.time, M, M.ckey, src) spawn(0) if(A) - A.bullet_act(damage_type, src, def_zone) - if(istype(A,/turf) && !istype(src, /obj/item/projectile/beam)) - for(var/obj/O in A) - O.bullet_act(damage_type, src, def_zone) + + if(istype(src, /obj/item/projectile/freeze)) + var/obj/item/projectile/freeze/F = src + F.Freeze(A) + else + + A.bullet_act(damage_type, src, def_zone) + if(istype(A,/turf) && !istype(src, /obj/item/projectile/beam)) + for(var/obj/O in A) + O.bullet_act(damage_type, src, def_zone) del(src) return @@ -743,12 +763,90 @@ var/const/PROJECTILE_DART = 8 freeze name = "freeze gun" - icon_state = "freezegun100" + icon_state = "freezegun" fire_sound = 'pulse3.ogg' + desc = "A gun that shoots supercooled hydrogen particles to drastically chill a target's body temperature." + var/temperature = T20C + var/current_temperature = T20C + charge_cost = 100 + origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2" + + + New() + power_supply = new /obj/item/weapon/cell/crap(src) + power_supply.give(power_supply.maxcharge) + spawn() + Life() + + + load_into_chamber() + if(in_chamber) + return 1 + if(power_supply.charge < charge_cost) + return 0 + in_chamber = new /obj/item/projectile/freeze(src) + power_supply.use(charge_cost) + return 1 attack_self(mob/living/user as mob) + user.machine = src + var/temp_text = "" + if(temperature > (T0C - 50)) + temp_text = "[temperature] ([round(temperature-T0C)]°C) ([round(temperature*1.8-459.67)]°F)" + else + temp_text = "[temperature] ([round(temperature-T0C)]°C) ([round(temperature*1.8-459.67)]°F)" + + var/dat = {"Freeze Gun Configuration:
+ Current output temperature: [temp_text]
+ Target output temperature: - - - [current_temperature] + + +
+ "} + + user << browse(dat, "window=freezegun;size=450x300") + onclose(user, "freezegun") + + Topic(href, href_list) + if (..()) + return + usr.machine = src + src.add_fingerprint(usr) + if(href_list["temp"]) + var/amount = text2num(href_list["temp"]) + if(amount > 0) + src.current_temperature = min(T20C, src.current_temperature+amount) + else + src.current_temperature = max(0, src.current_temperature+amount) + if (istype(src.loc, /mob)) + attack_self(src.loc) + src.add_fingerprint(usr) return + proc/Life() + while(src) + sleep(10) + + switch(temperature) + if(0 to 10) charge_cost = 500 + if(11 to 50) charge_cost = 150 + if(51 to 100) charge_cost = 100 + if(101 to 150) charge_cost = 75 + if(151 to 200) charge_cost = 50 + if(201 to 300) charge_cost = 25 + + if(current_temperature != temperature) + var/difference = abs(current_temperature - temperature) + if(difference >= 10) + if(current_temperature < temperature) + temperature -= 10 + else + temperature += 10 + + else + temperature = current_temperature + + if (istype(src.loc, /mob)) + attack_self(src.loc) + + crossbow @@ -881,6 +979,12 @@ var/const/PROJECTILE_DART = 8 user.bullet_act(in_chamber.damage_type) del(in_chamber) else + if(istype(src, /obj/item/weapon/gun/energy/freeze)) + var/obj/item/projectile/freeze/F = in_chamber + var/obj/item/weapon/gun/energy/freeze/Fgun = src + + F.temperature = Fgun.temperature + in_chamber.original = targloc in_chamber.loc = get_turf(user) user.next_move = world.time + 4 diff --git a/code/game/research/designs.dm b/code/game/research/designs.dm index 461f45509a8..878e34716c3 100644 --- a/code/game/research/designs.dm +++ b/code/game/research/designs.dm @@ -930,6 +930,15 @@ datum reliability_base = 76 build_path = "/obj/item/weapon/gun/energy/nuclear" + freeze_gun + name = "Freeze Gun" + desc = "A gun that shoots supercooled hydrogen particles to drastically chill a target's body temperature." + id = "freeze_gun" + req_tech = list("comabat" = 3, "materials" = 4, "powerstorage" = 3, "magnets" = 2) + build_type = PROTOLATHE + materials = list("$metal" = 5000, "$glass" = 500, "$silver" = 3000) + build_path = "/obj/item/weapon/gun/energy/freeze" + large_grenade name = "Large Grenade" desc = "A grenade that affects a larger area and use larger containers." diff --git a/icons/obj/gun.dmi b/icons/obj/gun.dmi index 8a54fde1198..37a5ffaea55 100644 Binary files a/icons/obj/gun.dmi and b/icons/obj/gun.dmi differ diff --git a/icons/obj/projectiles.dmi b/icons/obj/projectiles.dmi index 2b7c9a96871..5d32aab06a9 100644 Binary files a/icons/obj/projectiles.dmi and b/icons/obj/projectiles.dmi differ