mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-22 04:22:40 +01:00
Merge pull request #3767 from Neerti/8/10/2017_make_xenobio_old_again
Make Xenobiology Old(ish) Again
This commit is contained in:
@@ -174,4 +174,17 @@
|
||||
power_supply = new /obj/item/weapon/cell/device/weapon(src)
|
||||
self_recharge = 1
|
||||
processing_objects.Add(src)
|
||||
update_icon()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/get_description_interaction()
|
||||
var/list/results = list()
|
||||
|
||||
if(!battery_lock && !self_recharge)
|
||||
if(power_supply)
|
||||
results += "[desc_panel_image("offhand")]to remove the weapon cell."
|
||||
else
|
||||
results += "[desc_panel_image("weapon cell")]to add a new weapon cell."
|
||||
|
||||
results += ..()
|
||||
|
||||
return results
|
||||
@@ -2,78 +2,14 @@
|
||||
name = "temperature gun"
|
||||
icon_state = "freezegun"
|
||||
fire_sound = 'sound/weapons/pulse3.ogg'
|
||||
desc = "A gun that changes temperatures. It has a small label on the side, 'More extreme temperatures will cost more charge!'"
|
||||
var/temperature = T20C
|
||||
var/current_temperature = T20C
|
||||
charge_cost = 24
|
||||
desc = "A gun that can add or remove heat from entities it hits. In other words, it can fire 'cold', and 'hot' beams."
|
||||
charge_cost = 240
|
||||
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 4, TECH_POWER = 3, TECH_MAGNET = 2)
|
||||
slot_flags = SLOT_BELT|SLOT_BACK
|
||||
|
||||
projectile_type = /obj/item/projectile/temp
|
||||
cell_type = /obj/item/weapon/cell/high
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/attack_self(mob/living/user as mob)
|
||||
user.set_machine(src)
|
||||
var/temp_text = ""
|
||||
if(temperature > (T0C - 50))
|
||||
temp_text = "<FONT color=black>[temperature] ([round(temperature-T0C)]°C) ([round(temperature*1.8-459.67)]°F)</FONT>"
|
||||
else
|
||||
temp_text = "<FONT color=blue>[temperature] ([round(temperature-T0C)]°C) ([round(temperature*1.8-459.67)]°F)</FONT>"
|
||||
|
||||
var/dat = {"<B>Freeze Gun Configuration: </B><BR>
|
||||
Current output temperature: [temp_text]<BR>
|
||||
Target output temperature: <A href='?src=\ref[src];temp=-100'>-</A> <A href='?src=\ref[src];temp=-10'>-</A> <A href='?src=\ref[src];temp=-1'>-</A> [current_temperature] <A href='?src=\ref[src];temp=1'>+</A> <A href='?src=\ref[src];temp=10'>+</A> <A href='?src=\ref[src];temp=100'>+</A><BR>
|
||||
"}
|
||||
|
||||
user << browse(dat, "window=freezegun;size=450x300;can_resize=1;can_close=1;can_minimize=1")
|
||||
onclose(user, "window=freezegun", src)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/Topic(href, href_list)
|
||||
if (..())
|
||||
return 1
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
|
||||
|
||||
if(href_list["temp"])
|
||||
var/amount = text2num(href_list["temp"])
|
||||
if(amount > 0)
|
||||
src.current_temperature = min(500, 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
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/process()
|
||||
switch(temperature)
|
||||
if(0 to 100) charge_cost = 1000
|
||||
if(100 to 250) charge_cost = 500
|
||||
if(251 to 300) charge_cost = 100
|
||||
if(301 to 400) charge_cost = 500
|
||||
if(401 to 500) charge_cost = 1000
|
||||
|
||||
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
|
||||
firemodes = list(
|
||||
list(mode_name="endothermic beam", projectile_type = /obj/item/projectile/temp, charge_cost = 240),
|
||||
list(mode_name="exothermic beam", projectile_type = /obj/item/projectile/temp/hot, charge_cost = 240),
|
||||
)
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
/obj/item/projectile/proc/on_hit(var/atom/target, var/blocked = 0, var/def_zone = null)
|
||||
if(blocked >= 100) return 0//Full block
|
||||
if(!isliving(target)) return 0
|
||||
if(isanimal(target)) return 0
|
||||
// if(isanimal(target)) return 0
|
||||
var/mob/living/L = target
|
||||
L.apply_effects(stun, weaken, paralyze, irradiate, stutter, eyeblur, drowsy, agony, blocked) // add in AGONY!
|
||||
return 1
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
Robot.mmi = new /obj/item/device/mmi(new_mob)
|
||||
Robot.mmi.transfer_identity(M) //Does not transfer key/client.
|
||||
if("slime")
|
||||
new_mob = new /mob/living/carbon/slime(M.loc)
|
||||
new_mob = new /mob/living/simple_animal/slime(M.loc)
|
||||
new_mob.universal_speak = 1
|
||||
else
|
||||
var/mob/living/carbon/human/H
|
||||
|
||||
@@ -35,19 +35,42 @@
|
||||
icon_state = "ice_2"
|
||||
damage = 0
|
||||
damage_type = BURN
|
||||
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
|
||||
nodamage = 1
|
||||
check_armour = "energy"
|
||||
var/temperature = 300
|
||||
check_armour = "energy" // It actually checks heat/cold protection.
|
||||
var/target_temperature = 50
|
||||
light_range = 2
|
||||
light_power = 0.5
|
||||
light_color = "#55AAFF"
|
||||
|
||||
/obj/item/projectile/temp/on_hit(atom/target, blocked = FALSE)
|
||||
..()
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
|
||||
on_hit(var/atom/target, var/blocked = 0)//These two could likely check temp protection on the mob
|
||||
if(istype(target, /mob/living))
|
||||
var/mob/M = target
|
||||
M.bodytemperature = temperature
|
||||
return 1
|
||||
var/protection = null
|
||||
var/potential_temperature_delta = null
|
||||
var/new_temperature = L.bodytemperature
|
||||
|
||||
if(target_temperature >= T20C) // Make it cold.
|
||||
protection = L.get_cold_protection(target_temperature)
|
||||
potential_temperature_delta = 75
|
||||
new_temperature = max(new_temperature - potential_temperature_delta, target_temperature)
|
||||
else // Make it hot.
|
||||
protection = L.get_heat_protection(target_temperature)
|
||||
potential_temperature_delta = 200 // Because spacemen temperature needs stupid numbers to actually hurt people.
|
||||
new_temperature = min(new_temperature + potential_temperature_delta, target_temperature)
|
||||
|
||||
var/temp_factor = abs(protection - 1)
|
||||
|
||||
new_temperature = round(new_temperature * temp_factor)
|
||||
L.bodytemperature = new_temperature
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/temp/hot
|
||||
name = "heat beam"
|
||||
target_temperature = 1000
|
||||
|
||||
/obj/item/projectile/meteor
|
||||
name = "meteor"
|
||||
|
||||
Reference in New Issue
Block a user